Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=9e6ba144a150c57573a2b66c25658d09ed3b5061

commit 9e6ba144a150c57573a2b66c25658d09ed3b5061
Author: crazy <[EMAIL PROTECTED]>
Date:   Thu Nov 1 20:43:29 2007 +0100

dbus-1.1.2-1-i686
* Version bump
* changed on how we use auto dbus-launch
* we use now /usr/bin/dbus-1-launch ( which is old /etc/profile.d/dbus.sh )
* for KDE3 we symlink dbus-1-launch to /usr/env/dbus-1-launch.sh and
* for GNOME/XFCE we use /etc/xdg/autostart/dbus-1-launch.desktop to start it
* these changes should make boobaa happy :P
* added an patch to fix compile errors also

diff --git a/source/apps/dbus/FrugalBuild b/source/apps/dbus/FrugalBuild
index 91bc946..63008af 100644
--- a/source/apps/dbus/FrugalBuild
+++ b/source/apps/dbus/FrugalBuild
@@ -2,22 +2,24 @@
# Maintainer: crazy <[EMAIL PROTECTED]>

pkgname=dbus
-pkgver=1.0.2
-pkgrel=2
+pkgver=1.1.2
+pkgrel=1
pkgdesc="A message bus system"
url="http://freedesktop.org/wiki/Software_2fdbus";
-depends=('libxml2')
+depends=('libxml2' 'expat')
makedepends=('libx11' 'libsm' 'doxygen')
rodepends=('shadow')
groups=('apps')
archs=('i686' 'x86_64')
up2date="lynx -dump http://dbus.freedesktop.org/releases/dbus/|Flasttar"
source=(http://dbus.freedesktop.org/releases/dbus/$pkgname-$pkgver.tar.gz \
-       rc.$pkgname dbus.sh dbus-0.95-dont-crash.patch)
-sha1sums=('2870efd6ea0b5b0d14e52195f560238a74bb1e0e' \
+       rc.$pkgname activation-helper.patch \
+       dbus-1-launch dbus-1-launch.desktop)
+sha1sums=('4f4b1e430807acc2ed5aa3e21bde3015661423a9' \
'b5b036bbdd1a3fbe97218ae57bdd565f85160cd9' \
+          'fcbdbb62ea65cb5a32ee2facbf277c575d5b6879' \
'740af74eb43cadf1277346029577aadd3d10f2b5' \
-          '7c35583080fdf47bab1888cbcad75870bace315c')
+          'da9efab479aa3a2a8fb365a89ed658646486c39f')

subpkgs=('dbus-x11')
subconflicts=('dbus-gtk+2')
@@ -31,34 +33,47 @@ subarchs=('i686 x86_64')
build()
{
Fbuild  \
+               --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--exec-prefix=/ \
--libdir=/usr/lib \
--bindir=/usr/bin \
+               --libexecdir=/usr/lib/$pkgname-1 \
--with-x \
--with-system-pid-file=/var/run/dbus/dbus.pid \
--with-system-socket=/var/run/dbus/system_bus_socket \
--with-session-socket-dir=/tmp \
--with-dbus-user=messagebus \
--enable-doxygen-docs \
-               --with-xml=libxml \
--enable-dnotify \
--with-gnu-ld \
--disable-xml-docs \
-               --enable-asserts=no \
-               --enable-checks=no \
-               --enable-tests=no \
+               --disable-asserts \
+               --disable-checks \
+               --disable-tests \
--disable-selinux
Frcd
+
## not sure about that
Fmkdir /var/run/console
-       Fexe /etc/profile.d/dbus.sh
+
+       ## DO NOT change that without to ask the Maintainer! ##
+       ## Install wrapper
+       Fexe /usr/bin/dbus-1-launch
+
+       ## we use /usr/env for KDE3 so let us symlink to there
+       Fln /usr/bin/dbus-1-launch /usr/env/dbus-1-launch.sh
+
+       ## and we use /etc/xdg/autostart for GNOME/XFCE
+       Fexe /etc/xdg/autostart/dbus-1-launch.desktop
+
## just to keep this dirs
Fmkdir /etc/dbus-1/system.d/.holdme
Fmkdir /usr/share/dbus-1/services/.holdme
Fmkdir /var/run/dbus/.holdme
-       Fsplit dbus-x11 usr/bin/dbus-launch etc/profile.d/dbus.sh
+
+       Fsplit dbus-x11 usr/bin/dbus-launch usr/env /etc/xdg 
usr/bin/dbus-1-launch

}

diff --git a/source/apps/dbus/activation-helper.patch 
b/source/apps/dbus/activation-helper.patch
new file mode 100644
index 0000000..440146b
--- /dev/null
+++ b/source/apps/dbus/activation-helper.patch
@@ -0,0 +1,36 @@
+--- a/bus/activation-helper.c
++++ b/bus/activation-helper.c
+@@ -381,14 +381,20 @@ exec_for_correct_user (char *exec, char
+ }
+
+ static dbus_bool_t
+-check_bus_name (const char *bus_name, DBusError *error)
++check_bus_name (const char *bus_name,
++                DBusError  *error)
+ {
+-  if (!_dbus_check_is_valid_bus_name (bus_name))
++  DBusString str;
++
++  _dbus_string_init_const (&str, bus_name);
++  if (!_dbus_validate_bus_name (&str, 0, _dbus_string_get_length (&str)))
+     {
+       dbus_set_error (error, DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND,
+-                      "bus name '%s' not found\n", bus_name);
++                      "bus name '%s' is not a valid bus name\n",
++                      bus_name);
+       return FALSE;
+     }
++
+   return TRUE;
+ }
+
+@@ -517,7 +523,8 @@ check_dbus_user (BusConfigParser *parser
+ }
+
+ dbus_bool_t
+-run_launch_helper (const char *bus_name, DBusError *error)
++run_launch_helper (const char *bus_name,
++                   DBusError  *error)
+ {
+   BusConfigParser *parser;
+   dbus_bool_t retval;
diff --git a/source/apps/dbus/dbus-0.95-dont-crash.patch 
b/source/apps/dbus/dbus-0.95-dont-crash.patch
deleted file mode 100644
index fd62914..0000000
--- a/source/apps/dbus/dbus-0.95-dont-crash.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- dbus-0.94/tools/dbus-launch.h.dont-crash   2006-11-12 23:44:51.000000000 
-0500
-+++ dbus-0.94/tools/dbus-launch.h      2006-11-12 23:45:14.000000000 -0500
-@@ -49,7 +49,7 @@
-
- #ifdef DBUS_BUILD_X11
- /* defined in dbus-launch-x11.c */
--int x11_init (void);
-+int x11_init (int should_init_x_atoms);
- int x11_get_address (char **paddress, pid_t *pid, long *wid);
- int x11_save_address (char *address, pid_t pid, long *wid);
- void x11_handle_event (void);
---- dbus-0.94/tools/dbus-launch-x11.c.dont-crash       2006-11-12 
23:44:38.000000000 -0500
-+++ dbus-0.94/tools/dbus-launch-x11.c  2006-11-12 23:47:25.000000000 -0500
-@@ -247,6 +247,12 @@
-
-   machine = get_machine_uuid ();
-
-+  if (machine == NULL)
-+    {
-+      verbose ("Could not determine machine identity; aborting X11 
integration.\n");
-+      return FALSE;
-+    }
-+
-   atom_name = malloc (strlen (machine) + strlen (user_name) + 2 +
-                       MAX (strlen (selection_prefix),
-                            MAX (strlen (address_prefix),
-@@ -441,9 +447,10 @@
- }
-
- int
--x11_init (void)
-+x11_init (int should_init_x_atoms)
- {
--  return open_x11 () != NULL && init_x_atoms (xdisplay);
-+  return (open_x11 () != NULL) &&
-+       (!should_init_x_atoms || init_x_atoms (xdisplay));
- }
-
- void
---- dbus-0.94/tools/dbus-launch.c.dont-crash   2006-11-12 23:45:00.000000000 
-0500
-+++ dbus-0.94/tools/dbus-launch.c      2006-11-12 23:47:09.000000000 -0500
-@@ -381,7 +381,7 @@
-   sigaction (SIGTERM,  &act, NULL);
-
- #ifdef DBUS_BUILD_X11
--  x11_init();
-+  x11_init (FALSE);
-   if (xdisplay != NULL)
-     {
-       x_fd = ConnectionNumber (xdisplay);
-@@ -790,7 +790,7 @@
-         exit_with_session = TRUE;
-       }
-
--      if (!x11_init ())
-+      if (!x11_init (TRUE))
-       {
-         fprintf (stderr, "Autolaunch error: X11 initialization failed.\n");
-         exit (1);
diff --git a/source/apps/dbus/dbus-1-launch b/source/apps/dbus/dbus-1-launch
new file mode 100644
index 0000000..3d24bcf
--- /dev/null
+++ b/source/apps/dbus/dbus-1-launch
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+dbuslaunch="`which dbus-launch 2>/dev/null`"
+if [ "`whoami`" != "fst"  -a "`whoami`" != "root" ]; then
+       if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z 
"$DBUS_SESSION_BUS_ADDRESS" ]; then
+               eval `$dbuslaunch --auto-syntax --exit-with-session`
+       fi
+fi
diff --git a/source/apps/dbus/dbus-1-launch.desktop 
b/source/apps/dbus/dbus-1-launch.desktop
new file mode 100644
index 0000000..09b80ee
--- /dev/null
+++ b/source/apps/dbus/dbus-1-launch.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=dbus-1-launch
+Comment=dbus-launch starter
+Exec=/usr/bin/dbus-1-launch
+Terminal=false
+
diff --git a/source/apps/dbus/dbus.install b/source/apps/dbus/dbus.install
index 6ea3587..4601b95 100644
--- a/source/apps/dbus/dbus.install
+++ b/source/apps/dbus/dbus.install
@@ -5,6 +5,10 @@ post_install()
/usr/sbin/groupadd -g 38 messagebus 2>/dev/null
/usr/sbin/useradd -s /bin/false -c "D-BUS system user" -d '/' -u 38 -g 
messagebus messagebus 2>/dev/null
fi
+       ## DO NOT touch that or things will break!
+        chown root:messagebus /usr/lib/dbus-1/dbus-daemon-launch-helper
+        chmod 4750 /usr/lib/dbus-1/dbus-daemon-launch-helper
+
if [ -e /usr/sbin/chkconfig ] && [ -x /usr/sbin/chkconfig ]; then
/usr/sbin/chkconfig --add rc.dbus
fi
@@ -20,6 +24,10 @@ post_upgrade()
/usr/sbin/groupadd -g 38 messagebus 2>/dev/null
/usr/sbin/useradd  -s /bin/false -c "D-BUS system user" -d '/' -u 38 -g 
messagebus messagebus 2>/dev/null
fi
+       ## DO NOT touch that or things will break!
+       chown root:messagebus /usr/lib/dbus-1/dbus-daemon-launch-helper
+        chmod 4750 /usr/lib/dbus-1/dbus-daemon-launch-helper
+
}
pre_remove()
{
diff --git a/source/apps/dbus/dbus.sh b/source/apps/dbus/dbus.sh
deleted file mode 100644
index 3d24bcf..0000000
--- a/source/apps/dbus/dbus.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-dbuslaunch="`which dbus-launch 2>/dev/null`"
-if [ "`whoami`" != "fst"  -a "`whoami`" != "root" ]; then
-       if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z 
"$DBUS_SESSION_BUS_ADDRESS" ]; then
-               eval `$dbuslaunch --auto-syntax --exit-with-session`
-       fi
-fi
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to