diff options
Diffstat (limited to 'meta/packages/dbus/dbus-1.2.24')
-rw-r--r-- | meta/packages/dbus/dbus-1.2.24/99_dbus | 1 | ||||
-rw-r--r-- | meta/packages/dbus/dbus-1.2.24/dbus-1.init | 121 | ||||
-rw-r--r-- | meta/packages/dbus/dbus-1.2.24/fix-install-daemon.patch | 56 | ||||
-rw-r--r-- | meta/packages/dbus/dbus-1.2.24/tmpdir.patch | 34 |
4 files changed, 212 insertions, 0 deletions
diff --git a/meta/packages/dbus/dbus-1.2.24/99_dbus b/meta/packages/dbus/dbus-1.2.24/99_dbus new file mode 100644 index 0000000000..6821ae4dba --- /dev/null +++ b/meta/packages/dbus/dbus-1.2.24/99_dbus | |||
@@ -0,0 +1 @@ | |||
d messagebus messagebus 0755 /var/run/dbus none | |||
diff --git a/meta/packages/dbus/dbus-1.2.24/dbus-1.init b/meta/packages/dbus/dbus-1.2.24/dbus-1.init new file mode 100644 index 0000000000..4abc4cbf73 --- /dev/null +++ b/meta/packages/dbus/dbus-1.2.24/dbus-1.init | |||
@@ -0,0 +1,121 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: dbus | ||
4 | # Required-Start: $remote_fs $syslog | ||
5 | # Required-Stop: $remote_fs $syslog | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 1 | ||
8 | # Short-Description: D-Bus systemwide message bus | ||
9 | # Description: D-Bus is a simple interprocess messaging system, used | ||
10 | # for sending messages between applications. | ||
11 | ### END INIT INFO | ||
12 | # | ||
13 | # -*- coding: utf-8 -*- | ||
14 | # Debian init.d script for D-BUS | ||
15 | # Copyright © 2003 Colin Walters <walters@debian.org> | ||
16 | |||
17 | set -e | ||
18 | |||
19 | DAEMON=/usr/bin/dbus-daemon | ||
20 | NAME=dbus | ||
21 | DAEMONUSER=messagebus | ||
22 | PIDDIR=/var/run/dbus | ||
23 | PIDFILE=$PIDDIR/pid | ||
24 | UUIDDIR=/var/lib/dbus | ||
25 | DESC="system message bus" | ||
26 | EVENTDIR=/etc/dbus-1/event.d | ||
27 | |||
28 | test -x $DAEMON || exit 0 | ||
29 | |||
30 | # Source defaults file; edit that file to configure this script. | ||
31 | ENABLED=1 | ||
32 | PARAMS="" | ||
33 | if [ -e /etc/default/dbus ]; then | ||
34 | . /etc/default/dbus | ||
35 | fi | ||
36 | |||
37 | test "$ENABLED" != "0" || exit 0 | ||
38 | |||
39 | start_it_up() | ||
40 | { | ||
41 | if [ ! -d $PIDDIR ]; then | ||
42 | mkdir -p $PIDDIR | ||
43 | chown $DAEMONUSER $PIDDIR | ||
44 | chgrp $DAEMONUSER $PIDDIR | ||
45 | fi | ||
46 | if [ -e $PIDFILE ]; then | ||
47 | PIDDIR=/proc/$(cat $PIDFILE) | ||
48 | if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then | ||
49 | echo "$DESC already started; not starting." | ||
50 | else | ||
51 | echo "Removing stale PID file $PIDFILE." | ||
52 | rm -f $PIDFILE | ||
53 | fi | ||
54 | fi | ||
55 | |||
56 | if [ ! -d $UUIDDIR ]; then | ||
57 | mkdir -p $UUIDDIR | ||
58 | chown $DAEMONUSER $UUIDDIR | ||
59 | chgrp $DAEMONUSER $UUIDDIR | ||
60 | fi | ||
61 | |||
62 | dbus-uuidgen --ensure | ||
63 | |||
64 | echo -n "Starting $DESC: " | ||
65 | start-stop-daemon --start --quiet --pidfile $PIDFILE \ | ||
66 | --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS | ||
67 | echo "$NAME." | ||
68 | if [ -d $EVENTDIR ]; then | ||
69 | run-parts --arg=start $EVENTDIR | ||
70 | fi | ||
71 | } | ||
72 | |||
73 | shut_it_down() | ||
74 | { | ||
75 | if [ -d $EVENTDIR ]; then | ||
76 | # TODO: --reverse when busybox supports it | ||
77 | run-parts --arg=stop $EVENTDIR | ||
78 | fi | ||
79 | echo -n "Stopping $DESC: " | ||
80 | start-stop-daemon --stop --quiet --pidfile $PIDFILE \ | ||
81 | --user $DAEMONUSER | ||
82 | # We no longer include these arguments so that start-stop-daemon | ||
83 | # can do its job even given that we may have been upgraded. | ||
84 | # We rely on the pidfile being sanely managed | ||
85 | # --exec $DAEMON -- --system $PARAMS | ||
86 | echo "$NAME." | ||
87 | rm -f $PIDFILE | ||
88 | } | ||
89 | |||
90 | reload_it() | ||
91 | { | ||
92 | echo -n "Reloading $DESC config: " | ||
93 | dbus-send --print-reply --system --type=method_call \ | ||
94 | --dest=org.freedesktop.DBus \ | ||
95 | / org.freedesktop.DBus.ReloadConfig > /dev/null | ||
96 | # hopefully this is enough time for dbus to reload it's config file. | ||
97 | echo "done." | ||
98 | } | ||
99 | |||
100 | case "$1" in | ||
101 | start) | ||
102 | start_it_up | ||
103 | ;; | ||
104 | stop) | ||
105 | shut_it_down | ||
106 | ;; | ||
107 | reload|force-reload) | ||
108 | reload_it | ||
109 | ;; | ||
110 | restart) | ||
111 | shut_it_down | ||
112 | sleep 1 | ||
113 | start_it_up | ||
114 | ;; | ||
115 | *) | ||
116 | echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 | ||
117 | exit 1 | ||
118 | ;; | ||
119 | esac | ||
120 | |||
121 | exit 0 | ||
diff --git a/meta/packages/dbus/dbus-1.2.24/fix-install-daemon.patch b/meta/packages/dbus/dbus-1.2.24/fix-install-daemon.patch new file mode 100644 index 0000000000..edb63a5faf --- /dev/null +++ b/meta/packages/dbus/dbus-1.2.24/fix-install-daemon.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | # Update fix-daemon-install patch to use automake magic to avoid the wrapper scripts | ||
2 | # | ||
3 | # original by RP, updated to handle dbus-daemon-launch-helper by Kevin Tian <kevin.tian@intel.com>, 2010-07-10 | ||
4 | Index: dbus-1.2.14/bus/Makefile.am | ||
5 | =================================================================== | ||
6 | --- dbus-1.2.14.orig/bus/Makefile.am 2009-04-17 20:45:29.000000000 +0100 | ||
7 | +++ dbus-1.2.14/bus/Makefile.am 2009-11-13 09:47:24.000000000 +0000 | ||
8 | @@ -149,7 +149,7 @@ endif | ||
9 | |||
10 | ## we use noinst_PROGRAMS not check_PROGRAMS so that we build | ||
11 | ## even when not doing "make check" | ||
12 | -noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper | ||
13 | +noinst_PROGRAMS=$(TESTS) dbus-daemon-launch-helper-test | ||
14 | |||
15 | bus_test_system_SOURCES= \ | ||
16 | $(XML_SOURCES) \ | ||
17 | @@ -171,34 +171,22 @@ bus_test_SOURCES= \ | ||
18 | bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS) | ||
19 | bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ | ||
20 | |||
21 | +dbusdaemondir = $(DBUS_DAEMONDIR) | ||
22 | +dbusdaemon_PROGRAMS = dbus-daemon | ||
23 | + | ||
24 | +libexec_PROGRAMS = dbus-daemon-launch-helper | ||
25 | + | ||
26 | ## mop up the gcov files | ||
27 | clean-local: | ||
28 | /bin/rm *.bb *.bbg *.da *.gcov || true | ||
29 | |||
30 | -uninstall-hook: | ||
31 | - rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon | ||
32 | - rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper | ||
33 | - | ||
34 | install-data-hook: | ||
35 | - if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \ | ||
36 | - $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \ | ||
37 | - chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \ | ||
38 | - fi | ||
39 | - $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR) | ||
40 | $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus | ||
41 | $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d | ||
42 | $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d | ||
43 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services | ||
44 | $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services | ||
45 | $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1 | ||
46 | - $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir) | ||
47 | - if test `id -u` -eq 0; then \ | ||
48 | - chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ | ||
49 | - chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \ | ||
50 | - else \ | ||
51 | - echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \ | ||
52 | - echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \ | ||
53 | - fi | ||
54 | |||
55 | #### Init scripts fun | ||
56 | SCRIPT_IN_FILES=messagebus.in \ | ||
diff --git a/meta/packages/dbus/dbus-1.2.24/tmpdir.patch b/meta/packages/dbus/dbus-1.2.24/tmpdir.patch new file mode 100644 index 0000000000..f5c22af129 --- /dev/null +++ b/meta/packages/dbus/dbus-1.2.24/tmpdir.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | # avoid to check tmp dir at build time. instead uses hard coded /tmp here | ||
2 | # | ||
3 | # comment added by Kevin Tian <kevin.tian@intel.com> | ||
4 | |||
5 | --- dbus-0.22/configure.in.orig 2004-08-13 00:57:16.000000000 +0200 | ||
6 | +++ dbus-0.22/configure.in 2004-12-30 21:15:57.000000000 +0100 | ||
7 | @@ -1047,15 +1048,18 @@ | ||
8 | AC_SUBST(ABSOLUTE_TOP_BUILDDIR) | ||
9 | |||
10 | #### Find socket directories | ||
11 | -if ! test -z "$TMPDIR" ; then | ||
12 | - DEFAULT_SOCKET_DIR=$TMPDIR | ||
13 | -elif ! test -z "$TEMP" ; then | ||
14 | - DEFAULT_SOCKET_DIR=$TEMP | ||
15 | -elif ! test -z "$TMP" ; then | ||
16 | - DEFAULT_SOCKET_DIR=$TMP | ||
17 | -else | ||
18 | - DEFAULT_SOCKET_DIR=/tmp | ||
19 | -fi | ||
20 | +#if ! test -z "$TMPDIR" ; then | ||
21 | +# DEFAULT_SOCKET_DIR=$TMPDIR | ||
22 | +#elif ! test -z "$TEMP" ; then | ||
23 | +# DEFAULT_SOCKET_DIR=$TEMP | ||
24 | +#elif ! test -z "$TMP" ; then | ||
25 | +# DEFAULT_SOCKET_DIR=$TMP | ||
26 | +#else | ||
27 | +# DEFAULT_SOCKET_DIR=/tmp | ||
28 | +#fi | ||
29 | + | ||
30 | +# checks disabled to avoid expanding this at build time | ||
31 | +DEFAULT_SOCKET_DIR=/tmp | ||
32 | |||
33 | if ! test -z "$with_test_socket_dir" ; then | ||
34 | TEST_SOCKET_DIR="$with_test_socket_dir" | ||