Accepting request 844510 from home:tsaupe:branches:Base:System:rsyslog-cleanup-requires-pr820064
remove legacy stuff from specfile OBS-URL: https://build.opensuse.org/request/show/844510 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=323
This commit is contained in:
parent
562b3d0724
commit
b2df5a42d9
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 28 07:10:22 UTC 2020 - Thomas Blume <thomas.blume@suse.com>
|
||||||
|
|
||||||
|
- remove legacy stuff from specfile
|
||||||
|
* sysvinit is not supported anymore, so remove all tests
|
||||||
|
related to systemv in the specfile
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 20 17:30:46 UTC 2020 - Michael Ströder <michael@stroeder.com>
|
Tue Oct 20 17:30:46 UTC 2020 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
90
rsyslog.spec
90
rsyslog.spec
@ -27,22 +27,9 @@ License: (GPL-3.0-or-later AND Apache-2.0)
|
|||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Version: 8.2010.0
|
Version: 8.2010.0
|
||||||
Release: 0
|
Release: 0
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
%bcond_without systemd
|
|
||||||
%bcond_without udpspoof
|
|
||||||
%bcond_without dbi
|
|
||||||
%bcond_without pkgconfig
|
|
||||||
%else
|
|
||||||
%bcond_with systemd
|
|
||||||
%bcond_with udpspoof
|
%bcond_with udpspoof
|
||||||
%bcond_with dbi
|
%bcond_with dbi
|
||||||
%bcond_with pkgconfig
|
%bcond_with pkgconfig
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1230
|
|
||||||
%bcond_with systemv
|
|
||||||
%else
|
|
||||||
%bcond_without systemv
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1230
|
%if 0%{?suse_version} > 1230
|
||||||
%bcond_without journal
|
%bcond_without journal
|
||||||
%else
|
%else
|
||||||
@ -86,27 +73,16 @@ Release: 0
|
|||||||
URL: http://www.rsyslog.com/
|
URL: http://www.rsyslog.com/
|
||||||
# Upstream library deprecated and we want to support migration
|
# Upstream library deprecated and we want to support migration
|
||||||
Obsoletes: %{name}-module-guardtime <= 8.38.0
|
Obsoletes: %{name}-module-guardtime <= 8.38.0
|
||||||
%if %{with systemd}
|
|
||||||
Provides: syslog
|
Provides: syslog
|
||||||
Provides: sysvinit(syslog)
|
Provides: sysvinit(syslog)
|
||||||
Conflicts: otherproviders(syslog)
|
Conflicts: otherproviders(syslog)
|
||||||
Requires(pre): %fillup_prereq
|
Requires(pre): %fillup_prereq
|
||||||
%if %{with systemv}
|
|
||||||
Requires(pre): %insserv_prereq
|
|
||||||
Requires(pre): syslog-service < 2.0
|
|
||||||
Requires(pre): /etc/init.d/syslog
|
|
||||||
%else
|
|
||||||
Requires(pre): syslog-service >= 2.0
|
Requires(pre): syslog-service >= 2.0
|
||||||
%endif
|
|
||||||
%{?systemd_ordering}
|
%{?systemd_ordering}
|
||||||
BuildRequires: pkgconfig(systemd) >= 209
|
BuildRequires: pkgconfig(systemd) >= 209
|
||||||
%if %{with journal}
|
%if %{with journal}
|
||||||
BuildRequires: pkgconfig(libsystemd) >= 234
|
BuildRequires: pkgconfig(libsystemd) >= 234
|
||||||
%endif
|
%endif
|
||||||
%else
|
|
||||||
Requires(pre): %insserv_prereq %fillup_prereq /etc/init.d/syslog
|
|
||||||
BuildRequires: klogd
|
|
||||||
%endif
|
|
||||||
# for patch1
|
# for patch1
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -219,10 +195,6 @@ BuildRequires: pkgconfig(tcl)
|
|||||||
BuildRequires: tcl-devel
|
BuildRequires: tcl-devel
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd}
|
|
||||||
%{?systemd_ordering}
|
|
||||||
BuildRequires: pkgconfig(systemd)
|
|
||||||
%endif
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{version}.tar.gz
|
||||||
Source1: rsyslog.sysconfig
|
Source1: rsyslog.sysconfig
|
||||||
@ -585,14 +557,12 @@ This module provides an output module for TCL.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -a 14
|
%setup -q -a 14
|
||||||
#
|
#
|
||||||
%if %{with systemd}
|
|
||||||
for file in rsyslog-service-prepare; do
|
for file in rsyslog-service-prepare; do
|
||||||
sed \
|
sed \
|
||||||
-e 's;RUN_DIR;%{rsyslog_rundir};g' \
|
-e 's;RUN_DIR;%{rsyslog_rundir};g' \
|
||||||
-e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \
|
-e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \
|
||||||
"%{_sourcedir}/${file}.in" > "${file}"
|
"%{_sourcedir}/${file}.in" > "${file}"
|
||||||
done
|
done
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../../grammar"
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../../grammar"
|
||||||
@ -694,7 +664,7 @@ autoreconf -fiv
|
|||||||
--enable-imdiag \
|
--enable-imdiag \
|
||||||
--enable-diagtools \
|
--enable-diagtools \
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd} && %{with journal}
|
%if %{with journal}
|
||||||
--enable-imjournal \
|
--enable-imjournal \
|
||||||
--enable-omjournal \
|
--enable-omjournal \
|
||||||
%endif
|
%endif
|
||||||
@ -791,14 +761,8 @@ fi
|
|||||||
# it is simply broken (bnc#890228)
|
# it is simply broken (bnc#890228)
|
||||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/zpipe
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/zpipe
|
||||||
#
|
#
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
install -m755 rsyslog-service-prepare %{buildroot}%{_sbindir}/
|
install -m755 rsyslog-service-prepare %{buildroot}%{_sbindir}/
|
||||||
ln -svf service %buildroot/%{_sbindir}/rc%{name}
|
ln -svf service %buildroot/%{_sbindir}/rc%{name}
|
||||||
%else
|
|
||||||
if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then
|
|
||||||
rm -f %{buildroot}%{_unitdir}/rsyslog.service
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
#
|
#
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d
|
install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d
|
||||||
install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog
|
install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog
|
||||||
@ -839,12 +803,10 @@ install -m644 plugins/ommysql/createDB.sql \
|
|||||||
install -m644 plugins/ompgsql/createDB.sql \
|
install -m644 plugins/ompgsql/createDB.sql \
|
||||||
%{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql
|
%{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd}
|
|
||||||
install -d -m0755 %{buildroot}%{_unitdir}
|
install -d -m0755 %{buildroot}%{_unitdir}
|
||||||
install -m644 %{SOURCE3} %{buildroot}%{_unitdir}/
|
install -m644 %{SOURCE3} %{buildroot}%{_unitdir}/
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}/systemd/journald.conf.d
|
install -d -m0755 %{buildroot}%{_sysconfdir}/systemd/journald.conf.d
|
||||||
install -m644 %{SOURCE16} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/rsyslog.conf
|
install -m644 %{SOURCE16} %{buildroot}%{_sysconfdir}/systemd/journald.conf.d/rsyslog.conf
|
||||||
%endif
|
|
||||||
# create ghosts
|
# create ghosts
|
||||||
install -d -m0755 %{buildroot}%{rsyslog_rundir}
|
install -d -m0755 %{buildroot}%{rsyslog_rundir}
|
||||||
touch %{buildroot}%{rsyslog_sockets_cfg}
|
touch %{buildroot}%{rsyslog_sockets_cfg}
|
||||||
@ -870,13 +832,9 @@ if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then
|
|||||||
rm -rf "%{buildroot}"
|
rm -rf "%{buildroot}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%{service_add_pre rsyslog.service}
|
%{service_add_pre rsyslog.service}
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
#
|
#
|
||||||
# update linker caches
|
# update linker caches
|
||||||
@ -887,23 +845,10 @@ fi
|
|||||||
#
|
#
|
||||||
%{remove_and_set -n syslog SYSLOG_DAEMON SYSLOG_REQUIRES_NETWORK}
|
%{remove_and_set -n syslog SYSLOG_DAEMON SYSLOG_REQUIRES_NETWORK}
|
||||||
%{remove_and_set -n syslog RSYSLOGD_COMPAT_VERSION RSYSLOGD_NATIVE_VERSION}
|
%{remove_and_set -n syslog RSYSLOGD_COMPAT_VERSION RSYSLOGD_NATIVE_VERSION}
|
||||||
%if %{with systemv}
|
|
||||||
%{fillup_and_insserv -ny syslog syslog}
|
|
||||||
%endif
|
|
||||||
#
|
#
|
||||||
# add RSYSLOGD_* variables
|
# add RSYSLOGD_* variables
|
||||||
#
|
#
|
||||||
%{fillup_only -ns syslog rsyslog}
|
%{fillup_only -ns syslog rsyslog}
|
||||||
%if %{with systemv}
|
|
||||||
#
|
|
||||||
# switch SYSLOG_DAEMON to outself
|
|
||||||
#
|
|
||||||
if test -f etc/sysconfig/syslog ; then
|
|
||||||
sed -i \
|
|
||||||
-e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \
|
|
||||||
etc/sysconfig/syslog
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
#
|
#
|
||||||
# Do not use multiple facilities with the same priority pattern.
|
# Do not use multiple facilities with the same priority pattern.
|
||||||
# It causes start failure since rsyslog-6.4.x (bnc#780607).
|
# It causes start failure since rsyslog-6.4.x (bnc#780607).
|
||||||
@ -939,7 +884,6 @@ fi # first install
|
|||||||
#
|
#
|
||||||
# Enable the rsyslogservice to be started by systemd
|
# Enable the rsyslogservice to be started by systemd
|
||||||
#
|
#
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
# This macro enables based on a systemctl preset config file only
|
# This macro enables based on a systemctl preset config file only
|
||||||
%{service_add_post rsyslog.service}
|
%{service_add_post rsyslog.service}
|
||||||
# But we want to enable a syslog-daemon regardless of the preset;
|
# But we want to enable a syslog-daemon regardless of the preset;
|
||||||
@ -947,51 +891,23 @@ fi # first install
|
|||||||
# We do not check the obsolete SYSLOG_DAEMON variable as we want
|
# We do not check the obsolete SYSLOG_DAEMON variable as we want
|
||||||
# to switch when installing it and there is a provider conflict.
|
# to switch when installing it and there is a provider conflict.
|
||||||
/usr/bin/systemctl -f enable rsyslog.service >/dev/null 2>&1 || :
|
/usr/bin/systemctl -f enable rsyslog.service >/dev/null 2>&1 || :
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#
|
#
|
||||||
# stop the rsyslogd daemon when it is running
|
# stop the rsyslogd daemon when it is running
|
||||||
#
|
#
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
%{service_del_preun syslog.socket}
|
%{service_del_preun syslog.socket}
|
||||||
%{service_del_preun rsyslog.service}
|
%{service_del_preun rsyslog.service}
|
||||||
%else
|
|
||||||
if test -x /etc/init.d/syslog ; then
|
|
||||||
%{stop_on_removal syslog}
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# reset SYSLOG_DAEMON variable on removal
|
|
||||||
#
|
|
||||||
if test "$1" = "0" -a -f etc/sysconfig/syslog ; then
|
|
||||||
sed -i \
|
|
||||||
-e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \
|
|
||||||
etc/sysconfig/syslog
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
#
|
#
|
||||||
# update linker caches
|
# update linker caches
|
||||||
#
|
#
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
#
|
#
|
||||||
# cleanup init scripts
|
# cleanup init scripts
|
||||||
#
|
#
|
||||||
%{service_del_postun rsyslog.service}
|
%{service_del_postun rsyslog.service}
|
||||||
%else
|
|
||||||
#
|
|
||||||
# stop the rsyslogd daemon when it is running
|
|
||||||
#
|
|
||||||
if test -x /etc/init.d/syslog ; then
|
|
||||||
%{restart_on_update syslog}
|
|
||||||
fi
|
|
||||||
#
|
|
||||||
# cleanup init scripts
|
|
||||||
#
|
|
||||||
%{insserv_cleanup}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -1050,7 +966,7 @@ fi
|
|||||||
%if %{with rfc3195}
|
%if %{with rfc3195}
|
||||||
%{rsyslog_module_dir_nodeps}/im3195.so
|
%{rsyslog_module_dir_nodeps}/im3195.so
|
||||||
%endif
|
%endif
|
||||||
%if %{with systemd} && %{with journal}
|
%if %{with journal}
|
||||||
%{rsyslog_module_dir_nodeps}/imjournal.so
|
%{rsyslog_module_dir_nodeps}/imjournal.so
|
||||||
%{rsyslog_module_dir_nodeps}/omjournal.so
|
%{rsyslog_module_dir_nodeps}/omjournal.so
|
||||||
%dir %{_sysconfdir}/systemd/journald.conf.d/
|
%dir %{_sysconfdir}/systemd/journald.conf.d/
|
||||||
@ -1068,11 +984,9 @@ fi
|
|||||||
%{_fillupdir}/sysconfig.syslog-rsyslog
|
%{_fillupdir}/sysconfig.syslog-rsyslog
|
||||||
%attr(0755,root,root) %dir %ghost %{rsyslog_rundir}
|
%attr(0755,root,root) %dir %ghost %{rsyslog_rundir}
|
||||||
%attr(0644,root,root) %ghost %{rsyslog_sockets_cfg}
|
%attr(0644,root,root) %ghost %{rsyslog_sockets_cfg}
|
||||||
%if %{with systemd} && ! %{with systemv}
|
|
||||||
%{_sbindir}/rsyslog-service-prepare
|
%{_sbindir}/rsyslog-service-prepare
|
||||||
%{_unitdir}/rsyslog.service
|
%{_unitdir}/rsyslog.service
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
%endif
|
|
||||||
%{APPARMOR_PROFILE_PATH_DIR_COMMANDS}
|
%{APPARMOR_PROFILE_PATH_DIR_COMMANDS}
|
||||||
%config %{APPARMOR_PROFILE_PATH}/usr.sbin.rsyslogd
|
%config %{APPARMOR_PROFILE_PATH}/usr.sbin.rsyslogd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user