]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2007-07-24 Richard Hughes <richard@hughsie.com>
authorRichard Hughes <richard@hughsie.com>
Tue, 24 Jul 2007 12:10:58 +0000 (12:10 +0000)
committerRichard Hughes <richard@hughsie.com>
Tue, 24 Jul 2007 12:10:58 +0000 (12:10 +0000)
* bus/Makefile.am:
* bus/test.h:
Add the build glue for the lauch helper, and also add the launch-helper
OOM checks into make check. I've probably broken the build, give me 2.

ChangeLog
bus/Makefile.am
bus/test.h

index 5b31938a750efe3565847676596c476a727ad68b..25e39c1b4e733432359b0d94b0bc99bff5230ea6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-24  Richard Hughes  <richard@hughsie.com>
+
+       * bus/Makefile.am:
+       * bus/test.h:
+       Add the build glue for the lauch helper, and also add the launch-helper
+       OOM checks into make check. I've probably broken the build, give me 2.
+
 2007-07-24  Richard Hughes  <richard@hughsie.com>
 
        * bus/test-launch-helper.c: (die), (check_memleaks),
index d8dd22d47da562f8d19a4e1d319ee8eae23a7d5c..5892e33c39b9fd2a3f92944d643576dab3bc5de5 100644 (file)
@@ -77,21 +77,88 @@ dbus_daemon_LDADD=                                  \
        $(DBUS_BUS_LIBS)                                \
        $(top_builddir)/dbus/libdbus-convenience.la
 
-dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
+dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
+
+LAUNCH_HELPER_SOURCES=                         \
+       $(XML_SOURCES)                          \
+       config-parser-common.c                  \
+       config-parser-common.h                  \
+       config-parser-trivial.c                 \
+       config-parser-trivial.h                 \
+       desktop-file.c                          \
+       desktop-file.h                          \
+       utils.c                                 \
+       utils.h                                 \
+       activation-exit-codes.h                 \
+       activation-helper.h                     \
+       activation-helper.c
+
+## This is the installed launch helper with the setuid checks
+dbus_daemon_launch_helper_SOURCES=             \
+       activation-helper-bin.c                 \
+       $(LAUNCH_HELPER_SOURCES)
+
+dbus_daemon_launch_helper_LDADD=               \
+       $(DBUS_LAUNCHER_LIBS)                   \
+       $(top_builddir)/dbus/libdbus-convenience.la
+
+dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
+
+## we build another binary so we can do the launch testing without root privs.
+## DO NOT INSTALL THIS FILE
+dbus_daemon_launch_helper_test_SOURCES=                \
+       activation-helper-bin.c                 \
+       $(LAUNCH_HELPER_SOURCES)
+
+dbus_daemon_launch_helper_test_LDADD=          \
+       $(DBUS_LAUNCHER_LIBS)                   \
+       $(top_builddir)/dbus/libdbus-convenience.la
+
+dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
+dbus_daemon_launch_helper_test_CPPFLAGS=       \
+       -DACTIVATION_LAUNCHER_TEST
+
+## we build yet another binary so we can do the OOM tests
+## DO NOT INSTALL THIS FILE
+bus_test_launch_helper_SOURCES=                \
+       test-launch-helper.c            \
+       $(LAUNCH_HELPER_SOURCES)
+
+bus_test_launch_helper_LDADD=          \
+       $(DBUS_LAUNCHER_LIBS)                   \
+       $(top_builddir)/dbus/libdbus-convenience.la
+
+bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
+bus_test_launch_helper_CPPFLAGS=       \
+       -DACTIVATION_LAUNCHER_TEST      \
+       -DACTIVATION_LAUNCHER_DO_OOM
 
 ## note that TESTS has special meaning (stuff to use in make check)
 ## so if adding tests not to be run in make check, don't add them to 
 ## TESTS
 if DBUS_BUILD_TESTS
 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
-TESTS=bus-test
+TESTS=bus-test bus-test-launch-helper
 else
 TESTS=
 endif
 
 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
 ## even when not doing "make check"
-noinst_PROGRAMS=$(TESTS) dbus-daemon
+noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper
+
+bus_test_system_SOURCES=                       \
+       $(XML_SOURCES)                          \
+       config-parser-common.c                  \
+       config-parser-common.h                  \
+       config-parser-trivial.c                 \
+       config-parser-trivial.h                 \
+       utils.c                                 \
+       utils.h                                 \
+       test-system.c
+
+bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
+bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
 
 bus_test_SOURCES=                              \
        $(BUS_SOURCES)                          \
@@ -106,6 +173,7 @@ clean-local:
 
 uninstall-hook:
        rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon
+       rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper
 
 install-data-hook:
        if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
@@ -117,6 +185,17 @@ install-data-hook:
        $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
        $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
        $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
+       $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
+       $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
+       $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
+       ## This is SETUID! <insert suitable warning here...>
+       if test `id -u` -eq 0; then \
+               chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
+               chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
+       else \
+               echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
+               echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
+       fi
 
 #### Init scripts fun
 SCRIPT_IN_FILES=messagebus.in \
index f94783950789c1a133553b02d5e5a7af87671fe2..5aab0ea9e971e8a8821f562ee4ca5abd33c7d8a5 100644 (file)
@@ -36,6 +36,7 @@ dbus_bool_t bus_dispatch_test         (const DBusString             *test_data_d
 dbus_bool_t bus_dispatch_sha1_test    (const DBusString             *test_data_dir);
 dbus_bool_t bus_policy_test           (const DBusString             *test_data_dir);
 dbus_bool_t bus_config_parser_test    (const DBusString             *test_data_dir);
+dbus_bool_t bus_config_parser_trivial_test (const DBusString        *test_data_dir);
 dbus_bool_t bus_signals_test          (const DBusString             *test_data_dir);
 dbus_bool_t bus_expire_list_test      (const DBusString             *test_data_dir);
 dbus_bool_t bus_activation_service_reload_test (const DBusString    *test_data_dir);