OBS User unknown 2007-10-20 15:36:33 +00:00 committed by Git OBS Bridge
parent 579dc38a9a
commit 859cf55949
11 changed files with 206 additions and 194 deletions

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Fri Oct 19 18:46:53 CEST 2007 - jpr@suse.de
- Correct error in fix for b.n.c 332845, extraneous $DBUS_DAEMON_PID
-------------------------------------------------------------------
Fri Oct 19 16:39:51 CEST 2007 - meissner@suse.de
- adjust permissions handling
-------------------------------------------------------------------
Fri Oct 12 12:35:00 CEST 2007 - thoenig@suse.de
- Don't use startproc (b.n.c 332845)
- Merge D-Bus package from build service
-------------------------------------------------------------------
Tue Oct 2 08:00:00 CEST 2007 - tambet@novell.com
- Update to 1.1.2 for system service activation.
- Add patches from RedHat:
dbus-lsb.patch
dbus-audit-user.patch
dbus-no-abort.patch
-------------------------------------------------------------------
Tue Sep 25 12:13:35 CEST 2007 - dmueller@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package dbus-1-x11 (Version 1.0.2)
# spec file for package dbus-1-x11 (Version 1.1.2)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@ -19,14 +19,19 @@ Summary: X11-requiring add-ons for D-Bus
# COMMON1-BEGIN
# COMMON1-BEGIN
BuildRequires: doxygen libexpat-devel libzio pkgconfig
Version: 1.0.2
Release: 68
Version: 1.1.2
Release: 1
AutoReqProv: on
Source0: dbus-%{version}.tar.gz
Source1: rc.boot.dbus
Source2: dbus-1.desktop
Patch0: dbus-do-not-abort-on-check-thoenig-01.patch
Patch1: dbus-display-errors-from-dbus-launch.diff
# https://bugs.freedesktop.org/show_bug.cgi?id=11491
Patch1: dbus-lsb.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=12429
Patch2: dbus-audit-user.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=12430
Patch3: dbus-no-abort.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# COMMON1-END
# COMMON1-END
@ -60,7 +65,9 @@ Authors:
%setup -n dbus-%{version} -q
# Disable this until we hit RC phase
#%patch0
%patch1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -fi
@ -74,6 +81,7 @@ export CXXFLAGS="$CXXFLAGS -fstack-protector"
--prefix=%{_prefix} \
--bindir=/bin \
--exec_prefix=%{_exec_prefix} \
--libexecdir=/%{_lib}/%{name} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--localstatedir=%{_localstatedir} \
@ -106,6 +114,19 @@ rm -rf $tdir
%{_bindir}/dbus-launch
%{_mandir}/man1/dbus-launch.1*
%changelog
* Fri Oct 19 2007 - jpr@suse.de
- Correct error in fix for b.n.c 332845, extraneous $DBUS_DAEMON_PID
* Fri Oct 19 2007 - meissner@suse.de
- adjust permissions handling
* Fri Oct 12 2007 - thoenig@suse.de
- Don't use startproc (b.n.c 332845)
- Merge D-Bus package from build service
* Tue Oct 02 2007 - tambet@novell.com
- Update to 1.1.2 for system service activation.
- Add patches from RedHat:
dbus-lsb.patch
dbus-audit-user.patch
dbus-no-abort.patch
* Tue Sep 25 2007 - dmueller@suse.de
- install a interfaces directory
* Fri Aug 10 2007 - dmueller@suse.de

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8a004125f58512a69575f21f105aead0d1217fce9cb54cbafeac06b4be28c6ca
size 1400278

3
dbus-1.1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb46371f6a51696965d31a8f908807379fb4c6be789854ad0e7a02965fd83fde
size 1380562

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Fri Oct 19 18:46:53 CEST 2007 - jpr@suse.de
- Correct error in fix for b.n.c 332845, extraneous $DBUS_DAEMON_PID
-------------------------------------------------------------------
Fri Oct 19 16:39:51 CEST 2007 - meissner@suse.de
- adjust permissions handling
-------------------------------------------------------------------
Fri Oct 12 12:35:00 CEST 2007 - thoenig@suse.de
- Don't use startproc (b.n.c 332845)
- Merge D-Bus package from build service
-------------------------------------------------------------------
Tue Oct 2 08:00:00 CEST 2007 - tambet@novell.com
- Update to 1.1.2 for system service activation.
- Add patches from RedHat:
dbus-lsb.patch
dbus-audit-user.patch
dbus-no-abort.patch
-------------------------------------------------------------------
Tue Sep 25 12:13:35 CEST 2007 - dmueller@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package dbus-1 (Version 1.0.2)
# spec file for package dbus-1 (Version 1.1.2)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@ -17,17 +17,22 @@ Group: System/Daemons
Summary: D-Bus Message Bus System
# COMMON1-BEGIN
BuildRequires: doxygen libexpat-devel libzio pkgconfig
Version: 1.0.2
Release: 60
Version: 1.1.2
Release: 1
AutoReqProv: on
Source0: dbus-%{version}.tar.gz
Source1: rc.boot.dbus
Source2: dbus-1.desktop
Patch0: dbus-do-not-abort-on-check-thoenig-01.patch
Patch1: dbus-display-errors-from-dbus-launch.diff
# https://bugs.freedesktop.org/show_bug.cgi?id=11491
Patch1: dbus-lsb.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=12429
Patch2: dbus-audit-user.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=12430
Patch3: dbus-no-abort.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# COMMON1-END
PreReq: /usr/sbin/groupadd /usr/sbin/useradd /sbin/insserv /etc/init.d/boot.localfs
PreReq: permissions /usr/sbin/groupadd /usr/sbin/useradd /sbin/insserv /etc/init.d/boot.localfs
%package -n dbus-1-devel
Summary: Developer package for D-Bus
@ -127,7 +132,9 @@ Authors:
%setup -n dbus-%{version} -q
# Disable this until we hit RC phase
#%patch0
%patch1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -fi
@ -141,6 +148,7 @@ export CXXFLAGS="$CXXFLAGS -fstack-protector"
--prefix=%{_prefix} \
--bindir=/bin \
--exec_prefix=%{_exec_prefix} \
--libexecdir=/%{_lib}/%{name} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--localstatedir=%{_localstatedir} \
@ -165,8 +173,8 @@ install -d %{buildroot}/%{_localstatedir}/run/dbus
mkdir -p %{buildroot}/%{_datadir}/susehelp/meta/Development/Libraries/
install -m 0644 %SOURCE2 \
%{buildroot}/%{_datadir}/susehelp/meta/Development/Libraries/dbus-1.desktop
mkdir -p %{buildroot}/%{_datadir}/dbus-1/interfaces
mkdir -p %{buildroot}/%{_libdir}/pkgconfig
mkdir -p %{buildroot}/%{_datadir}/dbus-1/interfaces
sed -e 's@-I${libdir}@-I${prefix}/%{_lib}@' %{buildroot}/%{_lib}/pkgconfig/dbus-1.pc > %{buildroot}/%{_libdir}/pkgconfig/dbus-1.pc
rm -f %{buildroot}/%{_lib}/pkgconfig/dbus-1.pc
mkdir -p %{buildroot}/%{_libdir}/dbus-1.0/include/
@ -192,6 +200,9 @@ chmod a-x AUTHORS COPYING HACKING NEWS README doc/*.txt doc/file-boilerplate.c d
mkdir -p %{_localstatedir}/lib/dbus
%{insserv_force_if_yast dbus}
%{run_ldconfig}
%{run_permissions}
%verifyscript
%verify_permissions -e %{_libexecdir}/dbus-1/dbus-daemon-launch-helper
%postun
%{restart_on_update dbus}
@ -216,6 +227,7 @@ mkdir -p %{_localstatedir}/lib/dbus
/bin/dbus-monitor
/bin/dbus-send
/bin/dbus-uuidgen
/%{_lib}/dbus-1
/%{_lib}/*dbus-1.so.*
%{_mandir}/man1/dbus-cleanup-sockets.1.*
%{_mandir}/man1/dbus-daemon.1.*
@ -224,6 +236,9 @@ mkdir -p %{_localstatedir}/lib/dbus
%{_mandir}/man1/dbus-uuidgen.1.*
%{_sbindir}/rcdbus
%attr(-,messagebus,messagebus) %{_localstatedir}/run/dbus
# See doc/system-activation.txt in source tarball for the rationale
# behind these permissions
%verify(not mode) /%{_lib}/%{name}/dbus-daemon-launch-helper
%files -n dbus-1-devel
%defattr(-,root,root)
@ -239,6 +254,19 @@ mkdir -p %{_localstatedir}/lib/dbus
%doc doc/*.txt doc/file-boilerplate.c doc/TODO
%{_datadir}/susehelp
%changelog
* Fri Oct 19 2007 - jpr@suse.de
- Correct error in fix for b.n.c 332845, extraneous $DBUS_DAEMON_PID
* Fri Oct 19 2007 - meissner@suse.de
- adjust permissions handling
* Fri Oct 12 2007 - thoenig@suse.de
- Don't use startproc (b.n.c 332845)
- Merge D-Bus package from build service
* Tue Oct 02 2007 - tambet@novell.com
- Update to 1.1.2 for system service activation.
- Add patches from RedHat:
dbus-lsb.patch
dbus-audit-user.patch
dbus-no-abort.patch
* Tue Sep 25 2007 - dmueller@suse.de
- install a interfaces directory
* Fri Aug 10 2007 - dmueller@suse.de

57
dbus-audit-user.patch Normal file
View File

@ -0,0 +1,57 @@
Index: dbus-1.1.2/bus/selinux.c
===================================================================
--- dbus-1.1.2.orig/bus/selinux.c
+++ dbus-1.1.2/bus/selinux.c
@@ -113,7 +113,7 @@ static const struct avc_lock_callback lo
static int audit_fd = -1;
#endif
-static void
+void
audit_init(void)
{
#ifdef HAVE_LIBAUDIT
@@ -350,12 +350,8 @@ bus_selinux_full_init (void)
freecon (bus_context);
- audit_init ();
-
- return TRUE;
-#else
- return TRUE;
#endif /* HAVE_SELINUX */
+ return TRUE;
}
/**
Index: dbus-1.1.2/dbus/dbus-sysdeps-util-unix.c
===================================================================
--- dbus-1.1.2.orig/dbus/dbus-sysdeps-util-unix.c
+++ dbus-1.1.2/dbus/dbus-sysdeps-util-unix.c
@@ -300,7 +300,7 @@ _dbus_change_to_daemon_user (const char
* run as ... doesn't really help. But keeps people happy.
*/
- if (!we_were_root)
+ if (we_were_root)
{
cap_value_t new_cap_list[] = { CAP_AUDIT_WRITE };
cap_value_t tmp_cap_list[] = { CAP_AUDIT_WRITE, CAP_SETUID, CAP_SETGID };
@@ -376,7 +376,7 @@ _dbus_change_to_daemon_user (const char
}
#ifdef HAVE_LIBAUDIT
- if (!we_were_root)
+ if (we_were_root)
{
if (cap_set_proc (new_caps))
{
@@ -395,6 +395,7 @@ _dbus_change_to_daemon_user (const char
_dbus_strerror (errno));
return FALSE;
}
+ audit_init();
}
#endif

View File

@ -1,178 +0,0 @@
? test/name-test/Makefile.in
Index: dbus/dbus-sysdeps-unix.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps-unix.c,v
retrieving revision 1.18
diff -u -p -B -b -r1.18 dbus-sysdeps-unix.c
--- dbus/dbus-sysdeps-unix.c 1 Jan 2007 21:29:59 -0000 1.18
+++ dbus/dbus-sysdeps-unix.c 13 Feb 2007 18:41:40 -0000
@@ -2434,8 +2434,9 @@ dbus_bool_t
_dbus_get_autolaunch_address (DBusString *address,
DBusError *error)
{
- static char *argv[5];
- int address_pipe[2];
+ static char *argv[6];
+ int address_pipe[2] = { -1, -1 };
+ int errors_pipe[2] = { -1, -1 };
pid_t pid;
int ret;
int status;
@@ -2464,6 +2465,8 @@ _dbus_get_autolaunch_address (DBusString
++i;
argv[i] = "--binary-syntax";
++i;
+ argv[i] = "--close-stderr";
+ ++i;
argv[i] = NULL;
++i;
@@ -2482,6 +2485,15 @@ _dbus_get_autolaunch_address (DBusString
_dbus_strerror (errno));
goto out;
}
+ if (pipe (errors_pipe) < 0)
+ {
+ dbus_set_error (error, _dbus_error_from_errno (errno),
+ "Failed to create a pipe: %s",
+ _dbus_strerror (errno));
+ _dbus_verbose ("Failed to create a pipe to call dbus-launch: %s\n",
+ _dbus_strerror (errno));
+ goto out;
+ }
pid = fork ();
if (pid < 0)
@@ -2504,6 +2516,7 @@ _dbus_get_autolaunch_address (DBusString
/* set-up stdXXX */
close (address_pipe[READ_END]);
+ close (errors_pipe[READ_END]);
close (0); /* close stdin */
close (1); /* close stdout */
close (2); /* close stderr */
@@ -2512,11 +2525,12 @@ _dbus_get_autolaunch_address (DBusString
_exit (1);
if (dup2 (address_pipe[WRITE_END], 1) == -1)
_exit (1);
- if (dup2 (fd, 2) == -1)
+ if (dup2 (errors_pipe[WRITE_END], 2) == -1)
_exit (1);
close (fd);
close (address_pipe[WRITE_END]);
+ close (errors_pipe[WRITE_END]);
execv (DBUS_BINDIR "/dbus-launch", argv);
@@ -2529,6 +2543,10 @@ _dbus_get_autolaunch_address (DBusString
/* parent process */
close (address_pipe[WRITE_END]);
+ close (errors_pipe[WRITE_END]);
+ address_pipe[WRITE_END] = -1;
+ errors_pipe[WRITE_END] = -1;
+
ret = 0;
do
{
@@ -2549,7 +2567,21 @@ _dbus_get_autolaunch_address (DBusString
_dbus_string_get_length (address) == orig_len)
{
/* The process ended with error */
+ DBusString error_message;
+ _dbus_string_init (&error_message);
+ ret = 0;
+ do
+ {
+ ret = _dbus_read (errors_pipe[READ_END], &error_message, 1024);
+ }
+ while (ret > 0);
+
_dbus_string_set_length (address, orig_len);
+ if (_dbus_string_get_length (&error_message) > 0)
+ dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED,
+ "dbus-launch failed to autolaunch D-Bus session: %s",
+ _dbus_string_get_data (&error_message));
+ else
dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED,
"Failed to execute dbus-launch to autolaunch D-Bus session");
goto out;
@@ -2563,6 +2595,15 @@ _dbus_get_autolaunch_address (DBusString
else
_DBUS_ASSERT_ERROR_IS_SET (error);
+ if (address_pipe[0] != -1)
+ close (address_pipe[0]);
+ if (address_pipe[1] != -1)
+ close (address_pipe[1]);
+ if (errors_pipe[0] != -1)
+ close (errors_pipe[0]);
+ if (errors_pipe[1] != -1)
+ close (errors_pipe[1]);
+
_dbus_string_free (&uuid);
return retval;
}
Index: tools/dbus-launch.c
===================================================================
RCS file: /cvs/dbus/dbus/tools/dbus-launch.c,v
retrieving revision 1.21
diff -u -p -B -b -r1.21 dbus-launch.c
--- tools/dbus-launch.c 26 Oct 2006 15:55:44 -0000 1.21
+++ tools/dbus-launch.c 13 Feb 2007 18:41:40 -0000
@@ -596,6 +596,27 @@ babysit (int exit_with_session,
exit (0);
}
+static void do_close_stderr (void)
+{
+ fflush (stderr);
+
+ /* dbus-launch is a Unix-only program, so we can rely on /dev/null being there.
+ * We're including unistd.h and we're dealing with sh/csh launch sequences...
+ */
+ int fd = open ("/dev/null", O_RDWR);
+ if (fd == -1)
+ {
+ fprintf (stderr, "Internal error: cannot open /dev/null: %s", strerror (errno));
+ exit (1);
+ }
+
+ close (2);
+ if (dup2 (fd, 2) == -1)
+ // error; we can't report an error anymore...
+ exit (1);
+ close (fd);
+}
+
#define READ_END 0
#define WRITE_END 1
@@ -613,6 +634,7 @@ main (int argc, char **argv)
int auto_shell_syntax = FALSE;
int autolaunch = FALSE;
int requires_arg = FALSE;
+ int close_stderr = FALSE;
int i;
int ret;
int bus_pid_to_launcher_pipe[2];
@@ -647,6 +669,8 @@ main (int argc, char **argv)
version ();
else if (strcmp (arg, "--exit-with-session") == 0)
exit_with_session = TRUE;
+ else if (strcmp (arg, "--close-stderr") == 0)
+ close_stderr = TRUE;
else if (strstr (arg, "--autolaunch=") == arg)
{
const char *s;
@@ -837,6 +861,9 @@ main (int argc, char **argv)
char write_pid_fd_as_string[MAX_FD_LEN];
char write_address_fd_as_string[MAX_FD_LEN];
+ if (close_stderr)
+ do_close_stderr ();
+
verbose ("=== Babysitter's intermediate parent created\n");
/* Fork once more to create babysitter */

21
dbus-lsb.patch Normal file
View File

@ -0,0 +1,21 @@
Index: dbus-1.1.2/bus/messagebus.in
===================================================================
--- dbus-1.1.2.orig/bus/messagebus.in
+++ dbus-1.1.2/bus/messagebus.in
@@ -9,6 +9,16 @@
# processname: dbus-daemon
# pidfile: @DBUS_SYSTEM_PID_FILE@
#
+### BEGIN INIT INFO
+# Provides: messagebus
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: The D-Bus systemwide message bus
+# Description: This is a daemon which broadcasts notifications of system
+# events and other messages. See http://www.freedesktop.org/software/dbus
+### END INIT INFO
# Sanity checks.
[ -x @EXPANDED_BINDIR@/dbus-daemon ] || exit 0

13
dbus-no-abort.patch Normal file
View File

@ -0,0 +1,13 @@
Index: dbus-1.1.2/bus/bus.c
===================================================================
--- dbus-1.1.2.orig/bus/bus.c
+++ dbus-1.1.2/bus/bus.c
@@ -1206,7 +1206,7 @@ bus_context_check_security_policy (BusCo
dest ? dest : DBUS_SERVICE_DBUS, error))
{
- if (dbus_error_is_set (error) &&
+ if (error != NULL && dbus_error_is_set (error) &&
dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
{
return FALSE;

View File

@ -68,7 +68,7 @@ case "$1" in
fi
fi
echo -n "Starting D-Bus daemon";
startproc -f -p $DBUS_DAEMON_PID $DBUS_DAEMON_BIN $DBUS_DAEMON_PARAMETER
$DBUS_DAEMON_BIN $DBUS_DAEMON_PARAMETER
rc_status -v
;;
stop)