Commit Graph

44 Commits

Author SHA256 Message Date
Franck Bui
4dd7db0039 document the previous change
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=41
2020-11-02 08:55:25 +00:00
Franck Bui
c6f0727a32 - Drop DISABLE_STOP_ON_REMOVAL support (jsc#SLE-8968)
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=40
2020-10-30 17:40:53 +00:00
Franck Bui
622c3bb210 - Bump version to 4.1
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=39
2020-09-25 09:26:01 +00:00
Franck Bui
d81d9c2469 Accepting request 829057 from home:Pharaoh_Atem:branches:Base:System
- Sync missing macros of directory paths from upstream systemd macros
  + %_environmentdir
  + %_modulesloaddir
  + %_modprobedir

OBS-URL: https://build.opensuse.org/request/show/829057
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=38
2020-08-25 06:25:03 +00:00
Franck Bui
8fac5fa9ed Accepting request 684198 from home:fbui:branches:Base:System
- $1 can never be empty or it's an rpm bug

- Get rid of $FIRST_ARG
  $FIRST_ARG was probably introduced because the %service_* macros
  were playing tricks on the shell positional parameters. This is bad
  practice and error prone so let's assume that no macros should do
  that anymore and hence it's safe to assume that positional
  parameters remains unchanged after any rpm macro call.
  All users of $FIRST_ARG should have been fixed by now and in most
  cases the use of the variable was unneeded (since the macros don't
  change the shell parameters) and thus confusing.
  'net-snmp' has a different use of FIRST_ARG though as it tried to
  fake an update during a package installation. Fortunately this could
  have been fixed too.

OBS-URL: https://build.opensuse.org/request/show/684198
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=37
2019-03-12 08:20:41 +00:00
Franck Bui
f337315c0b Accepting request 680383 from home:fbui:branches:Base:System
- Fix %_restart_on_update_force: drop one extra trailing '}'
  Thanks Werner for spotting.

- Simplify %_restart_on_update and %_stop_on_removal
  There's no need to spawn sub shells when these macros are used.

- Macros arguments are mandatory
  Especially in %_restart_on_update_never and %_stop_on_removal_never,
  let's assume that they always receive unit names as arguments. This
  allows to make them slightly simpler (less rpm macro black magic).
  Callers will fail earlier if no arguments are passed anyway.

OBS-URL: https://build.opensuse.org/request/show/680383
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=36
2019-03-01 09:27:15 +00:00
Franck Bui
7b2e3f4d22 - Make sure %_restart_on_update_never and %_stop_on_removal_never
don't expand to the empty string
  Otherwise sequences like the following would result in incorrect
  shell syntax:
  if [ ]; then
     %_restart_on_update_never
  fi

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=35
2019-02-27 14:16:36 +00:00
Franck Bui
ec2ade1bb2 - Restore one daemon-reload command
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=34
2019-02-27 12:21:44 +00:00
Franck Bui
8685313b9b - Bump version to 4
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=33
2019-02-25 09:56:11 +00:00
Thomas Blume
e5d6d1a3e5 Accepting request 678270 from home:fbui:branches:Base:System
- Introduce %service_del_postun_without_restart
  This is another step to make the SUSE rpm macros closer to their
  upstream counterparts.
  Introduce %service_del_postun_without_restart which should help in
  getting rid of '-f' and '-n' switches of %service_del_postun.

OBS-URL: https://build.opensuse.org/request/show/678270
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=32
2019-02-25 09:47:37 +00:00
Franck Bui
283ce5b854 - Drop $YAST_IS_RUNNING in favor of $SYSTEMD_OFFLINE (bsc#1117489)
libzypp now kindly defines SYSTEMD_OFFLINE when appropriate (see
  bsc#1118758). Therefore we don't need to rely on YAST_IS_RUNNING
  anymore. It's a tiny step to make the SUSE macros closer to their
  upstream counterparts.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=31
2019-02-21 18:00:10 +00:00
Franck Bui
7ac942a4ee - systemd-sysv-convert has been moved from /usr/sbin to /usr/lib/systemd
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=30
2018-11-26 13:56:33 +00:00
Franck Bui
c6c149ba4c - remove confusing --user before --global
Backport from
  28d36da64a.
  This was spotted in bsc#1090785.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=29
2018-05-22 12:56:47 +00:00
Franck Bui
3adc1714da - Fix %systemd_post(): it's never called during package removal
Also make it useful by restoring its original implementation.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=28
2018-02-14 14:07:02 +00:00
Franck Bui
1f25658464 - Import more definitions from upstream (v237)
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=27
2018-02-12 16:58:33 +00:00
Franck Bui
30f9356379 Accepting request 568124 from home:dimstar:Factory
- Fix system_user_post macro for usage with RPM 4.14, backport from
  https://github.com/systemd/systemd/commit/e67ba783.

Addresses build issues like
https://build.opensuse.org/package/live_build_log/openSUSE:Factory/appimaged/standard/x86_64

OBS-URL: https://build.opensuse.org/request/show/568124
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=26
2018-01-22 14:11:14 +00:00
Franck Bui
dcc8869b9f Accepting request 556888 from home:fbui:branches:Base:System
- Move macros.systemd in /usr/lib/rpm
  The file is not supposed to be customized by the user.

- Make %systemd_add_pre() more similar to %systemd_add_post()

- Make sure to apply presets if packages start shipping units during upgrades (bsc#1071543)

OBS-URL: https://build.opensuse.org/request/show/556888
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=25
2017-12-15 09:52:31 +00:00
Franck Bui
d1be0ff64f - Make sure to clean up "new-in-upgrade" tag file (bsc#1059627)
The tag file might have been incorrectly left by a preceding update.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=24
2017-12-01 10:51:04 +00:00
Franck Bui
5305ff9a1f - Restore previous changes
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=23
2017-11-22 14:47:28 +00:00
Franck Bui
b7d0b19728 - Revert previous changes
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=22
2017-11-17 09:25:35 +00:00
ecab9f8fb5 Accepting request 542567 from home:kukuk:branches:Base:System
- Don't execute systemd-tmpfiles if we run in transactional update
  mode

OBS-URL: https://build.opensuse.org/request/show/542567
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=21
2017-11-17 09:10:26 +00:00
Franck Bui
d0cd081100 - Remove a useless test in %service_add_pre()
The test was placed where the condition '[ "$FIRST_ARG" -gt 1 ]' was
  always true.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=20
2017-11-02 16:12:23 +00:00
5e363286ea Accepting request 500587 from home:dimstar:Factory
- BuildIgnore systemd-rpm-macros: a small cycle that can be
  avoided. system-rpm-macros is being pulled in by rpm-build as
  conveniance to the packagers.

OBS-URL: https://build.opensuse.org/request/show/500587
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=19
2017-06-06 08:26:34 +00:00
Franck Bui
729db3f61e Reference bsc#956849 to please the new OBS 'sanity' check (bsc#1041386)
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=18
2017-06-02 09:37:54 +00:00
Franck Bui
e4ed23ee4e Accepting request 478957 from home:fbui:branches:Base:System
- Kill preset macros

OBS-URL: https://build.opensuse.org/request/show/478957
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=17
2017-03-14 14:17:09 +00:00
Thomas Blume
e03239fdc0 Accepting request 449714 from home:jengelh:branches:Base:System
- RPM group fix

OBS-URL: https://build.opensuse.org/request/show/449714
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=16
2017-01-11 16:20:27 +00:00
349a80f2cb Accepting request 399987 from home:tsaupe:branches:Base:System:systemd-rpm-macros-bsc982343
%service_add_post() suppress daemon-reload when in installation system

OBS-URL: https://build.opensuse.org/request/show/399987
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=15
2016-06-07 08:03:30 +00:00
Dr. Werner Fink
35441a3b44 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=14
2016-03-03 10:09:49 +00:00
34f074503f Accepting request 362153 from home:dimstar:Factory
- Also honor DISABLE_STOP_ON_REMOVAL and DISABLE_RESTART_ON_UPDATE
  when specified by a package directly in the .spec file. Some
  package know that a restart of their service is fatal
  (boo#968405).

OBS-URL: https://build.opensuse.org/request/show/362153
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=13
2016-02-29 07:00:30 +00:00
Dr. Werner Fink
32642573a0 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=12
2015-11-20 16:54:39 +00:00
Stephan Kulow
301f758bd3 Accepting request 332015 from home:sbrabec:branches:systemd-preset-2
- Skip %systemd_preset_* during the clean installation to prevent
  presetting of all services (boo#946216).

OBS-URL: https://build.opensuse.org/request/show/332015
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=11
2015-09-19 05:53:33 +00:00
5f77f48552 Accepting request 320474 from home:sbrabec:branches:systemd-preset
- Add %systemd_preset_pre and %systemd_preset_posttrans that will
  do one shot presetting of all services with changed system
  preset. It makes possible to to fix bad default service state
  (bnc#900935#c46, FATE#318949, FATE#317727, bnc#921075).
- Increment version to 3.

OBS-URL: https://build.opensuse.org/request/show/320474
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=10
2015-08-05 15:23:06 +00:00
Dr. Werner Fink
a40b70d414 Accepting request 312224 from home:jengelh:branches:Base:System
- Check for presence/executability of systemd programs before
  executing them, and do not suppress warnings/errors resulting
  from them.

OBS-URL: https://build.opensuse.org/request/show/312224
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=9
2015-07-10 08:14:04 +00:00
12d04da2cd Accepting request 280610 from home:jengelh:branches:Base:System
- Update with new macros from systemd 218

OBS-URL: https://build.opensuse.org/request/show/280610
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=8
2015-01-12 09:12:57 +00:00
Dr. Werner Fink
a5d2fa379b .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=7
2014-11-18 15:16:57 +00:00
Dr. Werner Fink
45953f9b68 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=6
2014-11-18 13:57:10 +00:00
Dr. Werner Fink
9c1f03c0b4 Accepting request 256883 from home:tsaupe:branches:Base:System
make systemd aware of changed unit file content after update

OBS-URL: https://build.opensuse.org/request/show/256883
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=5
2014-10-16 14:07:21 +00:00
Dr. Werner Fink
7c92600cb3 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=4
2014-03-27 14:45:24 +00:00
Dr. Werner Fink
bb1da458e8 Accepting request 227735 from home:fcrozat:branches:Base:System
- Add support to not restart services if running in YaST2 or
  if DISABLE_RESTART_ON_UPDATE is set to yes [bnc#858429]

OBS-URL: https://build.opensuse.org/request/show/227735
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=3
2014-03-27 12:38:37 +00:00
Dr. Werner Fink
bf76b3fc74 .
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=2
2014-02-28 10:10:57 +00:00
Stephan Kulow
f1dbc7e965 Accepting request 221246 from Base:System
- Make systemd rpm macros package a separate to avoid rebuild of
  the full package tree if systemd package change

OBS-URL: https://build.opensuse.org/request/show/221246
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd-rpm-macros?expand=0&rev=4
2014-02-11 09:46:34 +00:00
Stephan Kulow
12dd43bb94 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd-rpm-macros?expand=0&rev=3 2014-02-07 13:56:41 +00:00
4fc530766b Split 13.1 from Factory
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd-rpm-macros?expand=0&rev=2
2013-09-20 08:12:39 +00:00
Stephan Kulow
c614fc8313 add link
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd-rpm-macros?expand=0&rev=1
2013-06-20 13:51:16 +00:00