- merged 1.12.4 from PLD
authorMarcin Krol <hawk@tld-linux.org>
Fri, 16 Mar 2018 13:49:57 +0000 (13:49 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Fri, 16 Mar 2018 13:49:57 +0000 (13:49 +0000)
dbus-daemon-1-profile.d-sh
dbus-xinitrc.sh
dbus.spec

index 5b572f047b914607572f027a756eee3df0dadf36..45fec817fc8cb4cd93cec7345a6ed42f2abdb5d5 100644 (file)
@@ -1,9 +1,11 @@
 #! /bin/sh
 
+[ -x /usr/bin/dbus-launch -a -f /var/run/dbus.pid ] || return
+
 # Get configuration
 . /etc/sysconfig/messagebus
 
-# Take from rc-scripts
+# Taken from rc-scripts
 is_yes()
 {
        # Check value
@@ -19,12 +21,8 @@ is_yes()
        esac
 }
 
-if is_yes "${SESSION_BUS_PROFILE_D}"; then
-    if [ -f /usr/bin/dbus-launch ]; then
-       if [ -f /var/run/dbus.pid ]; then
-           if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
-               eval `dbus-launch --sh-syntax --exit-with-session`
-           fi    
-       fi
-    fi
-fi
\ No newline at end of file
+if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && is_yes "${SESSION_BUS_PROFILE_D}"; then
+       eval `dbus-launch --sh-syntax --exit-with-session`
+fi
+
+unset -f is_yes
index e1abd0f70178c4c9c01244ccdd518f799af4fdd7..a321dc0081ff1e2826f894b854c63d4e3b3f515f 100644 (file)
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+[ -x /usr/bin/dbus-launch -a -f /var/run/dbus.pid ] || return
+
 # Get configuration
 . /etc/sysconfig/messagebus
 
@@ -19,12 +21,8 @@ is_yes()
        esac
 }
 
-if is_yes "${SESSION_BUS_X_SESSION}"; then
-    if  [ -f /usr/bin/dbus-launch ]; then
-       if [ -f /var/run/dbus.pid ]; then
-           if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
-               eval `dbus-launch --sh-syntax --exit-with-session`
-           fi    
-       fi
-    fi
+if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && is_yes "${SESSION_BUS_X_SESSION}"; then
+       eval `dbus-launch --sh-syntax --exit-with-session`
 fi
+
+unset -f is_yes
index add27dc7c65864f9e823e672e43eec266c830c8a..0300d376804d1244c016f38ca43cbe8d3a75f830 100644 (file)
--- a/dbus.spec
+++ b/dbus.spec
@@ -1,18 +1,22 @@
+# TODO:
+# - enable ducktype-docs when it works
+# - move /etc/dbus-1 from -libs to base after external packages transition to /usr/share/dbus-1
 #
 # Conditional build:
-%bcond_without selinux         # build without SELinux support
-%bcond_without X11             # build without X11 support
+%bcond_without apparmor        # AppArmor support
+%bcond_without selinux         # SELinux support
+%bcond_without X11             # X11 support
 
 %define                expat_version   1:1.95.5
 Summary:       D-BUS message bus
 Summary(pl.UTF-8):     Magistrala przesyłania komunikatów D-BUS
 Name:          dbus
-Version:       1.8.18
-Release:       1
-License:       AFL v2.1 or GPL v2
+Version:       1.12.4
+Release:       2
+License:       AFL v2.1 or GPL v2+
 Group:         Libraries
-Source0:       http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
-# Source0-md5: 83e607e9ccb1c921d5b6bbea2376a36c
+Source0:       https://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
+# Source0-md5: 89745b5a6c45c26751dcf673d912f745
 Source1:       messagebus.init
 Source2:       %{name}-daemon-1-profile.d-sh
 Source3:       %{name}-sysconfig
@@ -21,22 +25,25 @@ Patch0:             %{name}-nolibs.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-no_fatal_checks.patch
 Patch3:                %{name}-allow-introspection.patch
-URL:           http://www.freedesktop.org/Software/dbus
+URL:           https://www.freedesktop.org/Software/dbus
 BuildRequires: audit-libs-devel
 BuildRequires: autoconf >= 2.63
-BuildRequires: automake >= 1:1.10
+BuildRequires: automake >= 1:1.13
 BuildRequires: docbook-dtd44-xml
 BuildRequires: doxygen
 BuildRequires: expat-devel >= %{expat_version}
+%{?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: sed >= 4.0
 BuildRequires: xmlto
 %{?with_X11:BuildRequires:     xorg-lib-libX11-devel}
+#BuildRequires:        yelp-tools
 Requires(post,postun): /sbin/ldconfig
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
@@ -47,6 +54,8 @@ Requires(pre):        /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 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
 Provides:      group(messagebus)
 Provides:      user(messagebus)
@@ -109,6 +118,9 @@ 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.
@@ -145,12 +157,15 @@ D-BUS wraz z sesją X11 użytkownika.
 %{__autoheader}
 %{__automake}
 %configure \
-       %{?debug:--enable-verbose-mode} \
+       %{!?with_apparmor:--disable-apparmor} \
        --disable-asserts \
+       --disable-ducktype-docs \
+       %{?debug:--enable-verbose-mode} \
+       %{!?with_selinux:--disable-selinux} \
        --disable-silent-rules \
+       --disable-systemd \
        --disable-tests \
-       --enable-abstract-sockets=auto \
-       %{?with_selinux:--enable-selinux} \
+       --enable-user-session \
        --with-console-auth-dir=%{_localstatedir}/run/console/ \
        --with-session-socket-dir=/tmp \
        --with-system-pid-file=%{_localstatedir}/run/dbus.pid \
@@ -173,10 +188,8 @@ install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d/dbus-daemon-1.sh
 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/messagebus
 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d
 
-# upstart (/sbin/init) requires libdbus so it must be in /lib(64)
-mv -f $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so.* $RPM_BUILD_ROOT/%{_lib}
-ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libdbus-1.so.*.*.*) \
-       $RPM_BUILD_ROOT%{_libdir}/libdbus-1.so
+# for local configuration in dbus 1.10+
+install -d $RPM_BUILD_ROOT/etc/dbus-1/{session.d,system.d}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -222,10 +235,16 @@ fi
 %attr(755,root,root) %{_bindir}/dbus-monitor
 %attr(755,root,root) %{_bindir}/dbus-run-session
 %attr(755,root,root) %{_bindir}/dbus-send
-%attr(4754,root,messagebus) %{_libdir}/dbus-daemon-launch-helper
+%attr(755,root,root) %{_bindir}/dbus-test-tool
+%attr(755,root,root) %{_bindir}/dbus-update-activation-environment
+%attr(4754,root,messagebus) %{_libexecdir}/dbus-daemon-launch-helper
 %dir %{_datadir}/dbus-1/services
 %dir %{_datadir}/dbus-1/system-services
-%config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/*.conf
+%{_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
 %attr(754,root,root) /etc/rc.d/init.d/messagebus
 %attr(755,root,root) /etc/profile.d/dbus-daemon-1.sh
@@ -237,19 +256,25 @@ fi
 %{_mandir}/man1/dbus-monitor.1*
 %{_mandir}/man1/dbus-run-session.1*
 %{_mandir}/man1/dbus-send.1*
+%{_mandir}/man1/dbus-test-tool.1*
+%{_mandir}/man1/dbus-update-activation-environment.1*
 
 %files libs
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING ChangeLog NEWS README doc/TODO
-%attr(755,root,root) /%{_lib}/libdbus-1.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/libdbus-1.so.3
-%dir /etc/dbus-1
-%dir /etc/dbus-1/system.d
-%dir /etc/dbus-1/session.d
+%attr(755,root,root) %{_libdir}/libdbus-1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libdbus-1.so.3
 %dir %{_datadir}/dbus-1
+%dir %{_datadir}/dbus-1/session.d
+%dir %{_datadir}/dbus-1/system.d
 # interfaces is basically devel thing, but keep dir here
 # in case something uses it at runtime
 %dir %{_datadir}/dbus-1/interfaces
+# 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
+%dir /etc/dbus-1/session.d
+%dir /etc/dbus-1/system.d
 
 %files devel
 %defattr(644,root,root,755)
@@ -257,6 +282,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
@@ -265,7 +291,6 @@ fi
 %{_docdir}/dbus/*.svg
 %{_docdir}/dbus/*.txt
 
-
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libdbus-1.a