[systemd-devel] [PATCH] build-sys: Add --disable-timedated configure switch

Miklos Vajna vmiklos at frugalware.org
Tue Aug 2 15:05:50 PDT 2011


Hi,

See the attached patch.

Thanks.
-------------- next part --------------
From da6a563f9e44dc032ac94bdb1e1c71dc77ed6f92 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Tue, 2 Aug 2011 23:58:46 +0200
Subject: [PATCH] build-sys: Add --disable-timedated configure switch

---
 Makefile.am  |   52 ++++++++++++++++++++++++++++++++++++++++++----------
 configure.ac |    8 ++++++++
 2 files changed, 50 insertions(+), 10 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c446527..3fc25e8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,7 +172,6 @@ rootlibexec_PROGRAMS = \
 	systemd-detect-virt \
 	systemd-sysctl \
         systemd-localed \
-        systemd-timedated \
         systemd-logind \
         systemd-uaccess
 
@@ -186,6 +185,11 @@ rootlibexec_PROGRAMS += \
 	systemd-hostnamed
 endif
 
+if ENABLE_TIMEDATED
+rootlibexec_PROGRAMS += \
+	systemd-timedated
+endif
+
 systemgenerator_PROGRAMS = \
 	systemd-getty-generator
 
@@ -231,7 +235,6 @@ dist_pkgsysconf_DATA = \
 dist_dbuspolicy_DATA = \
 	src/org.freedesktop.systemd1.conf \
         src/org.freedesktop.locale1.conf \
-        src/org.freedesktop.timedate1.conf \
         src/org.freedesktop.login1.conf
 
 if ENABLE_HOSTNAMED
@@ -239,10 +242,14 @@ dist_dbuspolicy_DATA += \
 	src/org.freedesktop.hostname1.conf
 endif
 
+if ENABLE_TIMEDATED
+dist_dbuspolicy_DATA += \
+	src/org.freedesktop.timedate1.conf
+endif
+
 dist_dbussystemservice_DATA = \
 	src/org.freedesktop.systemd1.service \
         src/org.freedesktop.locale1.service \
-        src/org.freedesktop.timedate1.service \
         src/org.freedesktop.login1.service
 
 if ENABLE_HOSTNAMED
@@ -250,6 +257,11 @@ dist_dbussystemservice_DATA += \
 	src/org.freedesktop.hostname1.service
 endif
 
+if ENABLE_TIMEDATED
+dist_dbussystemservice_DATA += \
+	src/org.freedesktop.timedate1.service
+endif
+
 dist_udevrules_DATA = \
         src/70-uaccess.rules \
         src/71-seat.rules
@@ -272,14 +284,18 @@ dbusinterface_DATA = \
 	org.freedesktop.systemd1.Snapshot.xml \
 	org.freedesktop.systemd1.Swap.xml \
 	org.freedesktop.systemd1.Path.xml \
-        org.freedesktop.locale1.xml \
-        org.freedesktop.timedate1.xml
+        org.freedesktop.locale1.xml
 
 if ENABLE_HOSTNAMED
 dbusinterface_DATA += \
 	org.freedesktop.hostname1.xml
 endif
 
+if ENABLE_TIMEDATED
+dbusinterface_DATA += \
+	org.freedesktop.timedate1.xml
+endif
+
 dist_bashcompletion_DATA = \
 	src/systemctl-bash-completion.sh
 
@@ -365,7 +381,6 @@ nodist_systemunit_DATA = \
 	units/systemd-logger.service \
 	units/systemd-shutdownd.service \
 	units/systemd-localed.service \
-	units/systemd-timedated.service \
 	units/systemd-logind.service \
 	units/systemd-kmsg-syslogd.service \
 	units/systemd-modules-load.service \
@@ -404,6 +419,11 @@ nodist_systemunit_DATA += \
 	units/systemd-hostnamed.service
 endif
 
+if ENABLE_TIMEDATED
+nodist_systemunit_DATA += \
+	units/systemd-timedated.service
+endif
+
 dist_userunit_DATA = \
 	units/user/default.target \
 	units/user/exit.target
@@ -420,7 +440,6 @@ EXTRA_DIST = \
 	units/systemd-logger.service.in \
 	units/systemd-shutdownd.service.in \
 	units/systemd-localed.service.in \
-	units/systemd-timedated.service.in \
 	units/systemd-logind.service.in \
 	units/systemd-kmsg-syslogd.service.in \
 	units/systemd-modules-load.service.in \
@@ -467,6 +486,11 @@ EXTRA_DIST += \
 	units/systemd-hostnamed.service.in
 endif
 
+if ENABLE_TIMEDATED
+EXTRA_DIST += \
+	units/systemd-timedated.service.in
+endif
+
 if TARGET_FEDORA
 dist_systemunit_DATA += \
 	units/fedora/prefdm.service \
@@ -530,7 +554,6 @@ pkgconfiglib_DATA = \
 # Passed through intltool only
 polkitpolicy_in_files = \
         src/org.freedesktop.locale1.policy.in \
-        src/org.freedesktop.timedate1.policy.in \
         src/org.freedesktop.login1.policy.in
 
 if ENABLE_HOSTNAMED
@@ -538,6 +561,11 @@ polkitpolicy_in_files += \
 	src/org.freedesktop.hostname1.policy.in
 endif
 
+if ENABLE_TIMEDATED
+polkitpolicy_in_files += \
+	src/org.freedesktop.timedate1.policy.in
+endif
+
 # First passed through sed, followed by intltool
 polkitpolicy_in_in_files = \
 	src/org.freedesktop.systemd1.policy.in.in
@@ -1761,11 +1789,10 @@ endif
 		$(LN_S) graphical.target runlevel5.target && \
 		$(LN_S) reboot.target runlevel6.target )
 	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.locale1.service dbus-org.freedesktop.timedate1.service dbus-org.freedesktop.login1.service autovt at .service && \
+		rm -f default.target ctrl-alt-del.target dbus-org.freedesktop.locale1.service dbus-org.freedesktop.login1.service autovt at .service && \
 		$(LN_S) graphical.target default.target && \
 		$(LN_S) reboot.target ctrl-alt-del.target && \
                 $(LN_S) systemd-localed.service dbus-org.freedesktop.locale1.service && \
-                $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service && \
                 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service && \
                 $(LN_S) getty at .service autovt at .service )
 	( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
@@ -1817,6 +1844,11 @@ if ENABLE_HOSTNAMED
 		rm -f dbus-org.freedesktop.hostname1.service && \
 		$(LN_S) systemd-hostnamed.service dbus-org.freedesktop.hostname1.service )
 endif
+if ENABLE_TIMEDATED
+	( cd $(DESTDIR)$(systemunitdir) && \
+		rm -f dbus-org.freedesktop.timedate1.service  && \
+                $(LN_S) systemd-timedated.service dbus-org.freedesktop.timedate1.service )
+endif
 	( cd $(DESTDIR)$(systemunitdir)/basic.target.wants && \
 		rm -f systemd-tmpfiles-clean.timer && \
 		$(LN_S) ../systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.timer )
diff --git a/configure.ac b/configure.ac
index 6b33018..2efc35d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,6 +307,13 @@ if test "x$enable_hostnamed" != "xno"; then
 fi
 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
 
+have_timedated=no
+AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
+if test "x$enable_timedated" != "xno"; then
+	have_timedated=yes
+fi
+AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
+
 have_gtk=no
 AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
 if test "x$enable_gtk" != "xno"; then
@@ -569,6 +576,7 @@ AC_MSG_RESULT([
         ACL:                     ${have_acl}
         binfmt:                  ${have_binfmt}
         hostnamed:               ${have_hostnamed}
+        timedated:               ${have_timedated}
         plymouth:                ${have_plymouth}
         prefix:                  ${prefix}
         root dir:                ${with_rootdir}
-- 
1.7.6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110803/656f4e05/attachment.pgp>


More information about the systemd-devel mailing list