[packages/systemd] pass args from %systemd_service_{enable,disable} to %systemd_{post,preun}; rel 2

Elan Ruusamäe glen at pld-linux.org
Thu Apr 28 21:14:31 CEST 2022


On 26.04.2022 21:02, atler wrote:
> commit 1820298a2883170393ed481ce681e66198884809
> Author: Jan Palus <atler at pld-linux.org>
> Date:   Tue Apr 26 20:01:38 2022 +0200
>
>      pass args from %systemd_service_{enable,disable} to %systemd_{post,preun}; rel 2
>
>   rpm-macros.patch | 4 ++--
>   systemd.spec     | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> ---
> diff --git a/systemd.spec b/systemd.spec
> index a703c84..2c61be6 100644
> --- a/systemd.spec
> +++ b/systemd.spec
> @@ -29,7 +29,7 @@ Summary(pl.UTF-8):	systemd - zarządca systemu i usług dla Linuksa
>   Name:		systemd
>   # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often)
>   Version:	250.4
> -Release:	1
> +Release:	2
>   Epoch:		1
>   License:	GPL v2+ (udev), LGPL v2.1+ (the rest)
>   Group:		Base
> diff --git a/rpm-macros.patch b/rpm-macros.patch
> index 6926763..43dd90d 100644
> --- a/rpm-macros.patch
> +++ b/rpm-macros.patch
> @@ -66,8 +66,8 @@
>   +		{{SYSTEMD_UPDATE_HELPER_PATH}} system-reload || : \
>   +%{nil}
>   +
> -+%systemd_service_enable %systemd_post
> -+%systemd_service_disable %systemd_preun
> ++%systemd_service_enable() %systemd_post $*
> ++%systemd_service_disable() %systemd_preun $*
>   +
>   +%systemd_service_start() \
>   +	[ -d /run/systemd/system ] && /bin/systemctl start %{*} || : \
> ================================================================


shouldn't you use rpm args, %{*},  rather shell args, $* like 
%systemd_service_start()?

also when using shell args, always use "$@" to preserve spaces



More information about the pld-devel-en mailing list