diff --git a/dbus-1-x11.changes b/dbus-1-x11.changes index ab4418e..066e11f 100644 --- a/dbus-1-x11.changes +++ b/dbus-1-x11.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Sep 23 15:42:27 UTC 2021 - Stefan Schubert + +- Added BuildRequires alts for libalternatives. + +------------------------------------------------------------------- +Thu Sep 16 12:52:55 UTC 2021 - Stefan Schubert + +- Fixed spec file regarding removing old update-alternatives + entries. + +------------------------------------------------------------------- +Wed Aug 4 10:04:12 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + ------------------------------------------------------------------- Thu Jul 16 21:28:10 UTC 2020 - Matthias Eliasson diff --git a/dbus-1-x11.spec b/dbus-1-x11.spec index cd02f4f..407ab6f 100644 --- a/dbus-1-x11.spec +++ b/dbus-1-x11.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %define _name dbus %define _libname libdbus-1-3 %if 0%{?suse_version} <= 1320 @@ -45,8 +51,13 @@ BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: pkgconfig(libsystemd) >= 209 BuildRequires: pkgconfig(x11) +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else Requires(post): update-alternatives Requires(preun):update-alternatives +%endif Supplements: (dbus-1 and libX11-6) Provides: dbus-launch %if %{with selinux} @@ -94,8 +105,27 @@ tdir=$(mktemp -d) make DESTDIR=$tdir install mkdir -p %{buildroot}/%{_bindir} mv $tdir/%{_bindir}/dbus-launch %{buildroot}/%{_bindir}/dbus-launch.x11 +%if ! %{with libalternatives} +# create symlinks for update-alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/dbus-launch %{buildroot}%{_bindir}/dbus-launch +%else +# create entries for libalternatives +ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/dbus-launch +mkdir -p %{buildroot}%{_datadir}/libalternatives/dbus-launch +cat > %{buildroot}%{_datadir}/libalternatives/dbus-launch/20.conf < + +- Add CONFIG parameter to %sysusers_generate_pre + +------------------------------------------------------------------- +Thu Sep 23 15:41:27 UTC 2021 - Stefan Schubert + +- Added BuildRequires alts for libalternatives. + +------------------------------------------------------------------- +Thu Sep 16 12:51:27 UTC 2021 - Stefan Schubert + +- Fixed spec file regarding removing old update-alternatives + entries. + +------------------------------------------------------------------- +Wed Aug 4 10:03:46 UTC 2021 - Stefan Schubert + +- Use libalternatives instead of update-alternatives. + ------------------------------------------------------------------- Wed Apr 7 22:35:58 UTC 2021 - Dirk Müller diff --git a/dbus-1.spec b/dbus-1.spec index 7bbd57c..d167547 100644 --- a/dbus-1.spec +++ b/dbus-1.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + %define with_systemd 1 %define _name dbus %define _libname libdbus-1-3 @@ -43,15 +49,19 @@ BuildRequires: libcap-ng-devel BuildRequires: libexpat-devel >= 2.1.0 BuildRequires: permissions BuildRequires: pkgconfig -BuildRequires: sysuser-shadow BuildRequires: sysuser-tools BuildRequires: xmlto BuildRequires: pkgconfig(libsystemd) >= 209 Requires(post): %{_libname} = %{version} -Requires(post): update-alternatives Requires(post): diffutils Requires(pre): permissions +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else +Requires(post): update-alternatives Requires(preun):update-alternatives +%endif Provides: dbus-launch %sysusers_requires %if %{with selinux} @@ -124,7 +134,7 @@ export V=1 # The original dbus sysusers config does not create our account, # overwrite it with our user definition cp %{SOURCE5} bus/sysusers.d/dbus.conf -%sysusers_generate_pre %{SOURCE5} messagebus +%sysusers_generate_pre %{SOURCE5} messagebus dbus.conf %check %make_build check @@ -161,8 +171,19 @@ ln -sf /%{_bindir}/dbus-update-activation-environment %{buildroot}/bin/dbus-upda ln -sf /%{_bindir}/dbus-uuidgen %{buildroot}/bin/dbus-uuidgen %endif +%if ! %{with libalternatives} +# create symlinks for update-alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/dbus-launch %{buildroot}%{_bindir}/dbus-launch +%else +# create entries for libalternatives +ln -sf %{_bindir}/alts %{buildroot}%{_bindir}/dbus-launch +mkdir -p %{buildroot}%{_datadir}/libalternatives/dbus-launch +cat > %{buildroot}%{_datadir}/libalternatives/dbus-launch/10.conf <