Accepting request 933402 from Base:System
OBS-URL: https://build.opensuse.org/request/show/933402 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dbus-1?expand=0&rev=167
This commit is contained in:
commit
20f8054c59
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 23 15:42:27 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Added BuildRequires alts for libalternatives.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 16 12:52:55 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Fixed spec file regarding removing old update-alternatives
|
||||||
|
entries.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 4 10:04:12 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 16 21:28:10 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>
|
Thu Jul 16 21:28:10 UTC 2020 - Matthias Eliasson <elimat@opensuse.org>
|
||||||
|
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%define _name dbus
|
%define _name dbus
|
||||||
%define _libname libdbus-1-3
|
%define _libname libdbus-1-3
|
||||||
%if 0%{?suse_version} <= 1320
|
%if 0%{?suse_version} <= 1320
|
||||||
@ -45,8 +51,13 @@ BuildRequires: libtool
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: pkgconfig(libsystemd) >= 209
|
BuildRequires: pkgconfig(libsystemd) >= 209
|
||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
|
%endif
|
||||||
Supplements: (dbus-1 and libX11-6)
|
Supplements: (dbus-1 and libX11-6)
|
||||||
Provides: dbus-launch
|
Provides: dbus-launch
|
||||||
%if %{with selinux}
|
%if %{with selinux}
|
||||||
@ -94,8 +105,27 @@ tdir=$(mktemp -d)
|
|||||||
make DESTDIR=$tdir install
|
make DESTDIR=$tdir install
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
mv $tdir/%{_bindir}/dbus-launch %{buildroot}/%{_bindir}/dbus-launch.x11
|
mv $tdir/%{_bindir}/dbus-launch %{buildroot}/%{_bindir}/dbus-launch.x11
|
||||||
|
%if ! %{with libalternatives}
|
||||||
|
# create symlinks for update-alternatives
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
ln -s -f %{_sysconfdir}/alternatives/dbus-launch %{buildroot}%{_bindir}/dbus-launch
|
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 <<EOF
|
||||||
|
binary=%{_bindir}/dbus-launch.x11
|
||||||
|
group=dbus-launch
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with libalternatives}
|
||||||
|
%pre
|
||||||
|
# removing old update-alternatives entries
|
||||||
|
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.x11
|
||||||
|
fi
|
||||||
|
%else
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/dbus-launch dbus-launch %{_bindir}/dbus-launch.x11 20
|
%{_sbindir}/update-alternatives --install %{_bindir}/dbus-launch dbus-launch %{_bindir}/dbus-launch.x11 20
|
||||||
@ -104,9 +134,16 @@ ln -s -f %{_sysconfdir}/alternatives/dbus-launch %{buildroot}%{_bindir}/dbus-lau
|
|||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.x11
|
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.x11
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_sysconfdir}/alternatives/dbus-launch
|
%ghost %{_sysconfdir}/alternatives/dbus-launch
|
||||||
|
%else
|
||||||
|
%dir %{_datadir}/libalternatives
|
||||||
|
%dir %{_datadir}/libalternatives/dbus-launch
|
||||||
|
%{_datadir}/libalternatives/dbus-launch/20.conf
|
||||||
|
%endif
|
||||||
%{_bindir}/dbus-launch
|
%{_bindir}/dbus-launch
|
||||||
%{_bindir}/dbus-launch.x11
|
%{_bindir}/dbus-launch.x11
|
||||||
|
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 8 16:42:10 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
- Add CONFIG parameter to %sysusers_generate_pre
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 23 15:41:27 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Added BuildRequires alts for libalternatives.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 16 12:51:27 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Fixed spec file regarding removing old update-alternatives
|
||||||
|
entries.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 4 10:03:46 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 7 22:35:58 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Wed Apr 7 22:35:58 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
43
dbus-1.spec
43
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 with_systemd 1
|
||||||
%define _name dbus
|
%define _name dbus
|
||||||
%define _libname libdbus-1-3
|
%define _libname libdbus-1-3
|
||||||
@ -43,15 +49,19 @@ BuildRequires: libcap-ng-devel
|
|||||||
BuildRequires: libexpat-devel >= 2.1.0
|
BuildRequires: libexpat-devel >= 2.1.0
|
||||||
BuildRequires: permissions
|
BuildRequires: permissions
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: sysuser-shadow
|
|
||||||
BuildRequires: sysuser-tools
|
BuildRequires: sysuser-tools
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: pkgconfig(libsystemd) >= 209
|
BuildRequires: pkgconfig(libsystemd) >= 209
|
||||||
Requires(post): %{_libname} = %{version}
|
Requires(post): %{_libname} = %{version}
|
||||||
Requires(post): update-alternatives
|
|
||||||
Requires(post): diffutils
|
Requires(post): diffutils
|
||||||
Requires(pre): permissions
|
Requires(pre): permissions
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun):update-alternatives
|
||||||
|
%endif
|
||||||
Provides: dbus-launch
|
Provides: dbus-launch
|
||||||
%sysusers_requires
|
%sysusers_requires
|
||||||
%if %{with selinux}
|
%if %{with selinux}
|
||||||
@ -124,7 +134,7 @@ export V=1
|
|||||||
# The original dbus sysusers config does not create our account,
|
# The original dbus sysusers config does not create our account,
|
||||||
# overwrite it with our user definition
|
# overwrite it with our user definition
|
||||||
cp %{SOURCE5} bus/sysusers.d/dbus.conf
|
cp %{SOURCE5} bus/sysusers.d/dbus.conf
|
||||||
%sysusers_generate_pre %{SOURCE5} messagebus
|
%sysusers_generate_pre %{SOURCE5} messagebus dbus.conf
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%make_build 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
|
ln -sf /%{_bindir}/dbus-uuidgen %{buildroot}/bin/dbus-uuidgen
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with libalternatives}
|
||||||
|
# create symlinks for update-alternatives
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
ln -s -f %{_sysconfdir}/alternatives/dbus-launch %{buildroot}%{_bindir}/dbus-launch
|
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 <<EOF
|
||||||
|
binary=%{_bindir}/dbus-launch.nox11
|
||||||
|
group=dbus-launch
|
||||||
|
EOF
|
||||||
|
%endif
|
||||||
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
|
|
||||||
@ -176,6 +197,12 @@ rm -Rf %{buildroot}%{_datadir}/doc/dbus
|
|||||||
|
|
||||||
%pre -f messagebus.pre
|
%pre -f messagebus.pre
|
||||||
%service_add_pre dbus.service dbus.socket
|
%service_add_pre dbus.service dbus.socket
|
||||||
|
%if %{with libalternatives}
|
||||||
|
# removing old update-alternatives entries
|
||||||
|
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ -e %{_localstatedir}/lib/dbus/machine-id -a -e %{_sysconfdir}/machine-id ]; then
|
if [ -e %{_localstatedir}/lib/dbus/machine-id -a -e %{_sysconfdir}/machine-id ]; then
|
||||||
@ -191,14 +218,18 @@ fi
|
|||||||
|
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%set_permissions %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
|
%set_permissions %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/dbus-launch dbus-launch %{_bindir}/dbus-launch.nox11 10
|
%{_sbindir}/update-alternatives --install %{_bindir}/dbus-launch dbus-launch %{_bindir}/dbus-launch.nox11 10
|
||||||
|
%endif
|
||||||
%service_add_post dbus.service dbus.socket
|
%service_add_post dbus.service dbus.socket
|
||||||
%tmpfiles_create %{_prefix}/lib/tmpfiles.d/dbus.conf
|
%tmpfiles_create %{_prefix}/lib/tmpfiles.d/dbus.conf
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
%if ! %{with libalternatives}
|
||||||
if [ "$1" = 0 ] ; then
|
if [ "$1" = 0 ] ; then
|
||||||
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
|
%{_sbindir}/update-alternatives --remove dbus-launch %{_bindir}/dbus-launch.nox11
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
%service_del_preun dbus.service dbus.socket
|
%service_del_preun dbus.service dbus.socket
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
@ -259,7 +290,13 @@ fi
|
|||||||
%{_userunitdir}/dbus.socket
|
%{_userunitdir}/dbus.socket
|
||||||
%dir %{_userunitdir}/sockets.target.wants
|
%dir %{_userunitdir}/sockets.target.wants
|
||||||
%{_userunitdir}/sockets.target.wants/dbus.socket
|
%{_userunitdir}/sockets.target.wants/dbus.socket
|
||||||
|
%if ! %{with libalternatives}
|
||||||
%ghost %{_sysconfdir}/alternatives/dbus-launch
|
%ghost %{_sysconfdir}/alternatives/dbus-launch
|
||||||
|
%else
|
||||||
|
%dir %{_datadir}/libalternatives
|
||||||
|
%dir %{_datadir}/libalternatives/dbus-launch
|
||||||
|
%{_datadir}/libalternatives/dbus-launch/10.conf
|
||||||
|
%endif
|
||||||
%{_bindir}/dbus-launch.nox11
|
%{_bindir}/dbus-launch.nox11
|
||||||
%{_bindir}/dbus-launch
|
%{_bindir}/dbus-launch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user