]> git.pld-linux.org Git - packages/dbus.git/blobdiff - dbus.spec
- add systemd user service startup, rel 2
[packages/dbus.git] / dbus.spec
index cfba1066ce0605610f3992bd59d72313cd9d9085..d4f1ac6d3cd3d6b25393e78219c5a342c1717246 100644 (file)
--- a/dbus.spec
+++ b/dbus.spec
 Summary:       D-BUS message bus
 Summary(pl.UTF-8):     Magistrala przesyłania komunikatów D-BUS
 Name:          dbus
-Version:       1.10.14
-Release:       1
-License:       AFL v2.1 or GPL v2
+Version:       1.12.20
+Release:       2
+License:       AFL v2.1 or GPL v2+
 Group:         Libraries
 Source0:       https://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
-# Source0-md5: 3f7b013ce8f641cd4c897acda0ef3467
+# Source0-md5: dfe8a71f412e0b53be26ed4fbfdc91c4
 Source1:       messagebus.init
 Source2:       %{name}-daemon-1-profile.d-sh
 Source3:       %{name}-sysconfig
@@ -27,21 +27,24 @@ Patch0:             %{name}-nolibs.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-no_fatal_checks.patch
 Patch3:                %{name}-allow-introspection.patch
+Patch4:                %{name}-autoconf-archive.patch
 URL:           https://www.freedesktop.org/Software/dbus
 BuildRequires: audit-libs-devel
 BuildRequires: autoconf >= 2.63
+BuildRequires: autoconf-archive >= 2019.01.06
 BuildRequires: automake >= 1:1.13
 BuildRequires: docbook-dtd44-xml
 BuildRequires: doxygen
 BuildRequires: expat-devel >= %{expat_version}
-%{?with_apparmor:BuildRequires:        libapparmor-devel >= 1:2.8.95}
+%{?with_apparmor:BuildRequires:        libapparmor-devel >= 1:2.10}
 BuildRequires: libcap-ng-devel
-%{?with_selinux:BuildRequires: libselinux-devel}
+%{?with_selinux:BuildRequires: libselinux-devel >= 2.0.86}
 BuildRequires: libtool >= 2:2.0
 BuildRequires: libxslt-progs
 BuildRequires: pkgconfig
 #BuildRequires:        python3-ducktype
-BuildRequires: rpmbuild(macros) >= 1.626
+BuildRequires: rpm-build >= 4.6
+BuildRequires: rpmbuild(macros) >= 2.011
 BuildRequires: sed >= 4.0
 %{?with_systemd:BuildRequires: systemd-devel >= 32}
 BuildRequires: xmlto
@@ -55,11 +58,13 @@ Requires(pre):      /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires(post,preun,postun):   systemd-units >= 38
+Requires(post,preun,postun):   systemd-units >= 250.1
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      expat >= %{expat_version}
+%{?with_apparmor:Requires:     libapparmor >= 1:2.10}
+%{?with_selinux:Requires:      libselinux >= 2.0.86}
 Requires:      rc-scripts >= 0.4.3.0
-Requires:      systemd-units >= 38
+Requires:      systemd-units >= 250.1
 Provides:      group(messagebus)
 Provides:      user(messagebus)
 Obsoletes:     dbus-glib-tools
@@ -123,9 +128,7 @@ Summary(pl.UTF-8):  Dokumentacja API D-BUS
 Group:         Documentation
 # dbus.devhelp refers also to common docs packaged in -devel
 Requires:      %{name}-devel = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
 BuildArch:     noarch
-%endif
 
 %description apidocs
 D-BUS API documentation.
@@ -154,6 +157,9 @@ D-BUS wraz z sesją X11 użytkownika.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' tools/GetAllMatchRules.py
 
 %build
 %{__libtoolize}
@@ -197,8 +203,13 @@ install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d
 
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
+%if %{with systemd}
 ln -s dbus.service $RPM_BUILD_ROOT%{systemdunitdir}/messagebus.service
 
+# we are creating messagebus user from rpm pre
+%{__rm} $RPM_BUILD_ROOT/usr/lib/sysusers.d/dbus.conf
+%endif
+
 # for local configuration in dbus 1.10+
 install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d}
 
@@ -214,12 +225,14 @@ rm -rf $RPM_BUILD_ROOT
 %service -n messagebus restart "D-Bus daemon"
 export NORESTART="yes"
 %systemd_post messagebus.service
+%systemd_user_post dbus.service dbus.socket
 
 %preun
 if [ "$1" = "0" ];then
        %service messagebus stop
        /sbin/chkconfig --del messagebus
 fi
+%systemd_user_preun dbus.service dbus.socket
 
 %postun
 if [ "$1" = "0" ]; then
@@ -251,11 +264,10 @@ fi
 %attr(755,root,root) %{_bindir}/dbus-send
 %attr(755,root,root) %{_bindir}/dbus-test-tool
 %attr(755,root,root) %{_bindir}/dbus-update-activation-environment
-%attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper
-%dir %{_datadir}/dbus-1/services
-%dir %{_datadir}/dbus-1/system-services
+%attr(4754,root,messagebus) %{_libexecdir}/dbus-daemon-launch-helper
 %{_datadir}/dbus-1/session.conf
 %{_datadir}/dbus-1/system.conf
+%{_datadir}/xml/dbus-1
 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/session.conf
 %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.conf
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/messagebus
@@ -273,15 +285,16 @@ fi
 %{_mandir}/man1/dbus-test-tool.1*
 %{_mandir}/man1/dbus-update-activation-environment.1*
 
+%if %{with systemd}
 %{systemdunitdir}/dbus.service
 %{systemdunitdir}/dbus.socket
-%{systemdunitdir}/dbus.target.wants/dbus.socket
 %{systemdunitdir}/messagebus.service
 %{systemdunitdir}/multi-user.target.wants/dbus.service
 %{systemdunitdir}/sockets.target.wants/dbus.socket
 %{systemduserunitdir}/dbus.service
 %{systemduserunitdir}/dbus.socket
 %{systemduserunitdir}/sockets.target.wants/dbus.socket
+%endif
 
 %files libs
 %defattr(644,root,root,755)
@@ -294,6 +307,8 @@ fi
 # interfaces is basically devel thing, but keep dir here
 # in case something uses it at runtime
 %dir %{_datadir}/dbus-1/interfaces
+%dir %{_datadir}/dbus-1/services
+%dir %{_datadir}/dbus-1/system-services
 # TODO: now it's only for local configuration - move to base dbus package
 #       after all packages place constant configuration in %{_datadir}/dbus-1
 %dir /etc/dbus-1
@@ -306,6 +321,7 @@ fi
 %{_libdir}/libdbus-1.la
 %dir %{_libdir}/dbus-1.0
 %{_libdir}/dbus-1.0/include
+%{_libdir}/cmake/DBus1
 %{_includedir}/dbus-1.0
 %{_pkgconfigdir}/dbus-1.pc
 %dir %{_docdir}/dbus
@@ -321,7 +337,7 @@ fi
 %files apidocs
 %defattr(644,root,root,755)
 %{_docdir}/dbus/api
-%{_docdir}/dbus/dbus.devhelp
+%{_docdir}/dbus/dbus.devhelp2
 
 %files x11
 %defattr(644,root,root,755)
This page took 0.788661 seconds and 4 git commands to generate.