]> git.pld-linux.org Git - packages/rpm-pld-macros.git/commitdiff
- 2.010, use upstream systemd macros auto/th/rpm-pld-macros-2.010-1
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 4 Jan 2022 21:39:45 +0000 (22:39 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 4 Jan 2022 21:39:45 +0000 (22:39 +0100)
disable-systemd.patch [deleted file]
macros.systemd [deleted file]
rpm-pld-macros.spec

diff --git a/disable-systemd.patch b/disable-systemd.patch
deleted file mode 100644 (file)
index 1dadbca..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
---- rpm-build-macros-1.680/rpm.macros~ 2013-11-27 01:15:12.122464636 +0200
-+++ rpm-build-macros-1.680/rpm.macros  2013-11-27 01:16:06.644922965 +0200
-@@ -716,7 +716,7 @@
- # tmpfiles.d configuration. Warn and terminate build if config is
- # missing.
- #
--#%no_install_post_check_tmpfiles 1
-+%no_install_post_check_tmpfiles 1
- #
- %__spec_install_post_check_tmpfiles { \
- __spec_install_post_check_tmpfiles() { \
-@@ -2258,79 +2258,17 @@
- # BuildRequires:      rpmbuild(macros) >= 1.671
- # Requires:   systemd-units >= 38
--%systemd_reload /bin/systemd_booted && SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog /bin/systemctl --quiet daemon-reload || :
--
--%systemd_service_enable() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemctl --quiet enable %{*} || : \
--      /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
--%{nil}
--
--%systemd_service_disable() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemctl --quiet disable %{*} || : \
--%{nil}
--
--%systemd_service() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet %{*} || : \
--%{nil}
--
--%systemd_service_start() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet start %{*} || : \
--%{nil}
--
--%systemd_service_stop() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet stop %{*} || : \
--%{nil}
--
--%systemd_service_restart() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet try-restart %{*} || : \
--%{nil}
--
--%systemd_service_reload() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet reload %{*} || : \
--%{nil}
--
--%systemd_trigger() \
--want_enable_service() { \
--      [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
--      [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && return 1 \
--      [ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service})" = "/etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service}" ] && return 1 \
--      return 0 \
--}\
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      for s in %{*}; do \
--              if want_enable_service $s; then \
--                      /bin/systemctl --quiet enable $s || : \
--              fi \
--      done \
--%{nil}
--
--%systemd_post() \
--      export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--      /bin/systemd_booted && /bin/systemctl --quiet daemon-reload || : \
--      if [ $1 -eq 1 ]; then \
--              /bin/systemctl --quiet enable %{*} || : \
--              /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
--      elif [ -z "$NORESTART" ]; then \
--              /bin/systemd_booted && /bin/systemctl --quiet try-restart %{*} || : \
--      else \
--              /bin/systemd_booted && echo 'Run "/bin/systemctl restart %{*}" to restart %{*}.' || : \
--      fi \
--%{nil}
--
--%systemd_preun() \
--      if [ $1 -eq 0 ]; then \
--              export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
--              /bin/systemd_booted && /bin/systemctl --quiet stop %{*} || : \
--              /bin/systemctl --quiet disable %{*} || : \
--      fi \
--%{nil}
-+%systemd_reload %{nil}
-+%systemd_service_enable() %{nil}
-+%systemd_service_disable() %{nil}
-+%systemd_service() %{nil}
-+%systemd_service_start() %{nil}
-+%systemd_service_stop() %{nil}
-+%systemd_service_restart() %{nil}
-+%systemd_service_reload() %{nil}
-+%systemd_trigger() %{nil}
-+%systemd_post() %{nil}
-+%systemd_preun() %{nil}
- %systemdunitdir /lib/systemd/system
- %systemdtmpfilesdir /usr/lib/tmpfiles.d
---- ./service_generator.sh     1 Feb 2012 17:46:43 -0000       1.13
-+++ ./service_generator.sh     4 Jan 2012 05:09:03 -0000       1.11
-@@ -19,8 +19,7 @@
- # common part
- service_body() {
-       cat <<-EOF
--              if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
--                      if [ -f /var/lock/subsys/$service ]; then
-+              if [ -f /var/lock/subsys/$service ]; then
-       EOF
-       if [ "$noop" = 1 ]; then
-               echo :
-@@ -32,12 +31,11 @@
-       if [ "$quiet" != 1 ]; then
-               cat <<-EOF
--                      else
--                              echo 'Run "/sbin/service $service start" to start $desc.'
-+              else
-+                      echo 'Run "/sbin/service $service start" to start $desc.'
-               EOF
-       fi
-       cat <<-EOF
--                      fi
-               fi
-       EOF
- }
-@@ -61,10 +59,8 @@
-       echo 'else'
-               # service restart was disabled, tell them to restart it
-       cat <<-EOF
--              if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
--                      if [ -f /var/lock/subsys/$service ]; then
--                              echo 'Run "/sbin/service $service restart" to restart $desc.'
--                      fi
-+              if [ -f /var/lock/subsys/$service ]; then
-+                      echo 'Run "/sbin/service $service restart" to restart $desc.'
-               fi
-       EOF
-       echo 'fi'
diff --git a/macros.systemd b/macros.systemd
deleted file mode 100644 (file)
index 9a1f638..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# pre/post script for packages supporting systemd units
-#
-# Authors:     Bartlomiej Zimon <uzi18@o2.pl>
-#              Jan Rękorajski <baggins@mimuw.edu.pl>
-#
-# Usage:
-# %systemd_reload
-# %systemd_service <unit command> service_name1.service service_name2.service
-# %systemd_service_enable service_name1.service service_name2.service
-# %systemd_service_disable service_name1.service service_name2.service
-# %systemd_service_start service_name1.service service_name2.service
-# %systemd_service_stop service_name1.service service_name2.service
-# %systemd_service_restart service_name1.service service_name2.service
-# %systemd_service_reload service_name1.service service_name2.service
-#
-# %systemd_post service_name1.service service_name2.service
-# %systemd_preun service_name1.service service_name2.service
-# %systemd_trigger service_name1.service service_name2.service
-#
-# Sample:
-# %post
-# %systemd_post %{name}.service
-#
-# %preun
-# %systemd_preun %{name}.service
-#
-# %postun
-# %systemd_reload
-#
-# %triggerpostun -- %{name} < first-version-with-systemd-units
-# %systemd_trigger %{name}.service
-#
-# Requirements:
-# BuildRequires:       rpmbuild(macros) >= 1.671
-# Requires:    systemd-units >= 38
-
-%systemd_reload /bin/systemd_booted && SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog /bin/systemctl daemon-reload || :
-
-%systemd_service_enable() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemctl preset --preset-mode=enable-only %{*} || : \
-       /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
-%{nil}
-
-%systemd_service_disable() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemctl --quiet disable %{*} || : \
-%{nil}
-
-%systemd_service() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl %{*} || : \
-%{nil}
-
-%systemd_service_start() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl start %{*} || : \
-%{nil}
-
-%systemd_service_stop() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl stop %{*} || : \
-%{nil}
-
-# NOTE: doesn't honour RPM_SKIP_AUTO_RESTART, avoid using
-%systemd_service_restart() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl try-restart %{*} || : \
-%{nil}
-
-# NOTE: doesn't honour RPM_SKIP_AUTO_RESTART, avoid using
-%systemd_service_reload() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl reload %{*} || : \
-%{nil}
-
-# NOTE: this trigger disobeys systemd.preset in favour of RPM_ENABLE_SYSTEMD_SERVICE
-%systemd_trigger() \
-want_enable_service() { \
-       [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm \
-       [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && return 1 \
-       [ "$(echo /etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service})" = "/etc/rc.d/rc[0-6].d/S[0-9][0-9]${1%.service}" ] && return 1 \
-       return 0 \
-}\
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       for s in %{*}; do \
-               if want_enable_service $s; then \
-                       /bin/systemctl enable $s || : \
-               fi \
-       done \
-%{nil}
-
-%systemd_post() \
-       export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-       /bin/systemd_booted && /bin/systemctl daemon-reload || : \
-       if [ $1 -eq 1 ]; then \
-               /bin/systemctl preset --preset-mode=enable-only %{*} >/dev/null || : \
-               /bin/systemd_booted && echo 'Run "/bin/systemctl start %{*}" to start %{*}.' || : \
-       elif [ -z "$NORESTART" ]; then \
-               /bin/systemd_booted && /bin/systemctl try-restart %{*} || : \
-       else \
-               /bin/systemd_booted && echo 'Run "/bin/systemctl restart %{*}" to restart %{*}.' || : \
-       fi \
-%{nil}
-
-%systemd_preun() \
-       if [ $1 -eq 0 ]; then \
-               export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog \
-               /bin/systemd_booted && /bin/systemctl stop %{*} || : \
-               /bin/systemctl --quiet disable %{*} || : \
-       fi \
-%{nil}
-
-%systemdunitdir /lib/systemd/system
-%systemduserunitdir /usr/lib/systemd/user
-%systemdtmpfilesdir /usr/lib/tmpfiles.d
-
-# BuildRequires:       rpmbuild(macros) >= 1.721
-%journal_catalog_update() [ ! -x /bin/journalctl ] || /bin/journalctl --update-catalog >/dev/null 2>&1 || :
index fd0b74441a1abd5abf32280d7b00aa627f1f1a9f..6507845d40272e6431db92ca3fb96a51391bc356 100644 (file)
@@ -1,4 +1,4 @@
-%define                rpm_macros_rev  2.009
+%define                rpm_macros_rev  2.010
 %define                find_lang_rev   1.40
 # split into individual X_prov_ver if there is a reason to desync
 %define                prov_ver        4.15
@@ -43,7 +43,6 @@ Source44:     macros.nagios
 Source45:      macros.openldap
 Source46:      macros.perl
 Source47:      macros.python
-Source48:      macros.systemd
 Source49:      macros.tcl
 Source50:      macros.upstart
 Source51:      macros.webapp
@@ -58,7 +57,6 @@ Source60:     macros.gstreamer
 Source61:      attr.gstreamer
 
 Source62:      kmod-deps.sh
-Patch0:                disable-systemd.patch
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: sed >= 4.0
 Obsoletes:     rpm-macros
@@ -85,6 +83,7 @@ Requires:     %{name} = %{version}-%{release}
 Requires:      findutils >= 1:4.2.26
 Provides:      rpmbuild(find_lang) = %{find_lang_rev}
 Provides:      rpmbuild(macros) = %{rpm_macros_rev}
+Requires:      rpm-macros-systemd
 Obsoletes:     rpm-build-macros
 Conflicts:     gettext-devel < 0.11
 # macros.d/*
@@ -169,11 +168,6 @@ pakietach RPM.
 cp -p %{SOURCE0} .
 cp -p %{SOURCE1} .
 
-%if "%{pld_release}" == "ac"
-%{__sed} -i -e '/libtoolize --copy --force --install/s/ --install//' macros.pld
-%patch0 -p1
-%endif
-
 %build
 %{__sed} -i -e 's,{Revision},%{rpm_macros_rev},' macros.pld
 
@@ -230,7 +224,6 @@ cp -p %{SOURCE44} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.nagios
 cp -p %{SOURCE45} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.openldap
 cp -p %{SOURCE46} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.perl
 cp -p %{SOURCE47} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.python
-cp -p %{SOURCE48} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.systemd
 cp -p %{SOURCE49} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.tcl
 cp -p %{SOURCE50} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.upstart
 cp -p %{SOURCE51} $RPM_BUILD_ROOT%{_usrlibrpm}/macros.d/macros.webapp
@@ -277,7 +270,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_usrlibrpm}/macros.d/macros.ruby
 %{_usrlibrpm}/macros.d/macros.rust
 %{_usrlibrpm}/macros.d/macros.selinux
-%{_usrlibrpm}/macros.d/macros.systemd
 %{_usrlibrpm}/macros.d/macros.tcl
 %{_usrlibrpm}/macros.d/macros.upstart
 %{_usrlibrpm}/macros.d/macros.webapp
This page took 0.065832 seconds and 4 git commands to generate.