On Wed, May 30, 2012 at 10:12:10PM +0100, Matt Burgess wrote:
> On Wed, 2012-05-30 at 05:33 -0700, Dan Nicholson wrote:
> > On Mon, May 28, 2012 at 1:00 PM, Jeremy Huntwork
> >
> > Have any of you guys considered actually making patches and sending
> > them upstream? The autotools are not that scary. Having been both
> > upstream and downstream, my guess is that those guys will accept
> > patches that allow a udev-only build, but they just don't have any
> > interest in doing that work themselves. I'm sure there are more than a
> > few people around who are interested in that scenario (they're already
> > showing up on the hotplug list) who would test and push for the
> > patches. If it's that critical to keep systemd out of LFS, then you'd
> > probably be best served by taking control of the situation. IMO.
> >
> > Here's an untested patch to get you started.
>
> Thanks Dan. I'd much prefer to see a patch that is likely to be accepted
> upstream too. I'll see if I can test your patch out soon.
>
Actually, for some of us they *are* scary. I thought I was making
some progress (persuaded autoreconf to complete without errors using
the attached -A.patch), but then configure went into an infinite
loop spewing out '=no' lines. That's around the check to see if we
only want udev. But after the test for whether to build static
libraries my configure script has the following :
4 blank lines, 'fi' which vim is highlighting as unmatched,
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
[about 15 blank lines here]
ac_config_commands="$ac_config_commands libtool"
[ 4 blank lines ]
# Only expand once:
[ 3 blank lines ]
and then the test for --enable-udev-only, i.e.
# figure out early if we only want udev
# Check whether --enable-udev-only was given.
if test "${enable_udev_only+set}" = set; then :
enableval=$enable_udev_only;
else
(etc.)
Again, this is testing on a completed recent desktop, just hoping
to find out what this approach will do.
I'm attaching the -A patch in case it's useful to someone else
trying this (obviously, diff it against Dan's original), but I don't
think I'm cut out for this.
ĸen
--
das eine Mal als Tragödie, das andere Mal als Farce
--- systemd-183/Makefile.am.orig 2012-05-31 00:34:12.920265084 +0100
+++ systemd-183/Makefile.am 2012-05-31 00:34:28.888674726 +0100
@@ -201,6 +201,9 @@
endif
#
------------------------------------------------------------------------------
+if UDEV_ONLY
+rootlibexec_PROGRAMS = ""
+else # normal systemd
rootbin_PROGRAMS = \
systemctl \
systemd-notify \
@@ -347,6 +350,7 @@
nodist_userunit_DATA = \
units/user/exit.service
+endif # normal systemd
EXTRA_DIST += \
units/[email protected] \
@@ -382,6 +386,7 @@
introspect.awk \
man/custom-html.xsl
+if !UDEV_ONLY
if TARGET_FEDORA
dist_systemunit_DATA += \
units/fedora/prefdm.service \
@@ -436,6 +441,7 @@
nodist_systemunit_DATA += \
units/systemd-ask-password-plymouth.service
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-ask-password-plymouth.service.in
@@ -452,6 +458,7 @@
@INTLTOOL_POLICY_RULE@
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
MANPAGES = \
man/systemd.1 \
man/systemctl.1 \
@@ -503,6 +510,7 @@
man/reboot.8 \
man/poweroff.8 \
man/init.1
+endif # !UDEV_ONLY
man/reboot.8: man/halt.8
man/poweroff.8: man/halt.8
@@ -527,8 +535,10 @@
$(MANPAGES_ALIAS)
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-shared.la
+endif
libsystemd_shared_la_SOURCES = \
src/shared/linux/auto_dev-ioctl.h \
@@ -586,8 +596,10 @@
src/shared/hwclock.h
#-------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-dbus.la
+endif
libsystemd_dbus_la_SOURCES = \
src/shared/dbus-common.c \
@@ -605,8 +617,10 @@
$(DBUS_LIBS)
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-label.la
+endif
libsystemd_label_la_SOURCES = \
src/shared/install.c \
@@ -633,8 +647,10 @@
$(SELINUX_LIBS)
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-logs.la
+endif
libsystemd_logs_la_SOURCES = \
src/shared/logs-show.c \
@@ -648,8 +664,10 @@
libsystemd-id128.la
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-capability.la
+endif
libsystemd_capability_la_SOURCES = \
src/shared/capability.c \
@@ -663,8 +681,10 @@
$(CAP_LIBS)
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-audit.la
+endif
libsystemd_audit_la_SOURCES = \
src/shared/audit.c \
@@ -675,8 +695,10 @@
#
------------------------------------------------------------------------------
if HAVE_ACL
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-acl.la
+endif
libsystemd_acl_la_SOURCES = \
src/shared/acl-util.c \
@@ -691,8 +713,10 @@
endif
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_LTLIBRARIES += \
libsystemd-core.la
+endif
libsystemd_core_la_SOURCES = \
src/core/unit.c \
@@ -833,6 +857,7 @@
src/core/load-fragment-gperf-nulstr.c
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
systemd_SOURCES = \
src/core/main.c
@@ -881,11 +906,13 @@
pkgconfigdata_DATA = \
src/core/systemd.pc
+endif # !UDEV_ONLY
EXTRA_DIST += \
src/core/systemd.pc.in
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
noinst_PROGRAMS += \
test-engine \
test-job-type \
@@ -903,6 +930,7 @@
test-job-type \
test-env-replace \
test-strv
+endif
test_engine_SOURCES = \
src/test/test-engine.c
@@ -990,8 +1018,10 @@
libsystemd-shared.la
#
------------------------------------------------------------------------------
+if !UDEV_ONLY
systemd_initctl_SOURCES = \
src/initctl/initctl.c
+endif
systemd_initctl_CFLAGS = \
$(AM_CFLAGS) \
@@ -1281,8 +1311,10 @@
-version-info
$(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE)
\
-Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon/libsystemd-daemon.sym
+if !UDEV_ONLY
pkginclude_HEADERS += \
src/systemd/sd-daemon.h
+endif
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
libsystemd-daemon-install-hook:
@@ -1294,12 +1326,15 @@
mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.*
$(DESTDIR)$(rootlibdir); \
fi
+if !UDEV_ONLY
INSTALL_EXEC_HOOKS += \
libsystemd-daemon-install-hook
+endif
libsystemd-daemon-uninstall-hook:
rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
+if !UDEV_ONLY
UNINSTALL_EXEC_HOOKS += \
libsystemd-daemon-uninstall-hook
@@ -1322,6 +1357,7 @@
man/sd_is_socket_inet.3 \
man/sd_is_mq.3 \
man/sd_notifyf.3
+endif # !UDEV_ONLY
man/sd_is_socket.3: man/sd_is_fifo.3
man/sd_is_socket_unix.3: man/sd_is_fifo.3
@@ -1410,6 +1446,9 @@
libsystemd-shared.la
#
------------------------------------------------------------------------------
+if UDEV_ONLY
+MANPAGES = ""
+endif #UDEV_ONLY
MANPAGES += \
man/udev.7 \
man/udevadm.8 \
@@ -1470,13 +1509,19 @@
ln -sf ../systemd-udev.service
$(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev.service
ln -sf ../systemd-udev-trigger.service
$(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
+if !UDEV_ONLY
INSTALL_DATA_HOOKS += systemd-install-hook
+else
+bin_PROGRAMS = ""
+endif
bin_PROGRAMS += \
udevadm
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-udevd
+endif
noinst_LTLIBRARIES += \
libudev-core.la
@@ -2019,6 +2064,7 @@
libsystemd-shared.la \
libsystemd-id128.la
+if !UDEV_ONLY
noinst_PROGRAMS += \
test-id128
@@ -2052,6 +2098,7 @@
UNINSTALL_EXEC_HOOKS += \
libsystemd-id128-uninstall-hook
+endif # !UDEV_ONLY
EXTRA_DIST += \
src/libsystemd-id128/libsystemd-id128.pc.in \
@@ -2182,6 +2229,7 @@
$(XZ_LIBS)
endif
+if !UDEV_ONLY
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
libsystemd-journal-install-hook:
if test "$(libdir)" != "$(rootlibdir)"; then \
@@ -2246,6 +2294,7 @@
INSTALL_DATA_HOOKS += \
journal-install-data-hook
+endif # !UDEV_ONLY
EXTRA_DIST += \
src/journal/libsystemd-journal.pc.in \
@@ -2267,11 +2316,13 @@
libsystemd-label.la \
libsystemd-shared.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-coredump
sysctl_DATA = \
sysctl.d/coredump.conf
+endif
EXTRA_DIST += \
sysctl.d/coredump.conf.in
@@ -2288,6 +2339,7 @@
systemd_binfmt_LDADD = \
libsystemd-shared.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-binfmt
@@ -2314,6 +2366,7 @@
MANPAGES += \
man/binfmt.d.5
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-binfmt.service.in
@@ -2327,6 +2380,7 @@
systemd_vconsole_setup_LDADD = \
libsystemd-shared.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-vconsole-setup
@@ -2345,6 +2399,7 @@
MANPAGES += \
man/vconsole.conf.5
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-vconsole-setup.service.in
@@ -2371,6 +2426,7 @@
libsystemd-daemon.la \
libudev.la
+if !UDEV_ONLY
pkginclude_HEADERS += \
src/systemd/sd-readahead.h
@@ -2386,24 +2442,29 @@
units/systemd-readahead-collect.service \
units/systemd-readahead-replay.service \
units/systemd-readahead-done.service
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-readahead-collect.service.in \
units/systemd-readahead-replay.service.in \
units/systemd-readahead-done.service.in
+if !UDEV_ONLY
MANPAGES += \
man/sd_readahead.3 \
man/sd-readahead.7
endif
+endif
#
------------------------------------------------------------------------------
if ENABLE_QUOTACHECK
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-quotacheck
nodist_systemunit_DATA += \
units/quotacheck.service
+endif
EXTRA_DIST += \
units/quotacheck.service.in
@@ -2417,12 +2478,14 @@
#
------------------------------------------------------------------------------
if ENABLE_RANDOMSEED
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-random-seed
nodist_systemunit_DATA += \
units/systemd-random-seed-save.service \
units/systemd-random-seed-load.service
+endif
EXTRA_DIST += \
units/systemd-random-seed-save.service.in \
@@ -2446,12 +2509,15 @@
rm -f systemd-random-seed-load.service && \
$(LN_S) ../systemd-random-seed-load.service
systemd-random-seed-load.service )
+if !UDEV_ONLY
INSTALL_DATA_HOOKS += \
randomseed-install-data-hook
endif
+endif
#
------------------------------------------------------------------------------
if HAVE_LIBCRYPTSETUP
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-cryptsetup
@@ -2460,6 +2526,7 @@
dist_systemunit_DATA += \
units/cryptsetup.target
+endif # !UDEV_ONLY
systemd_cryptsetup_SOURCES = \
src/cryptsetup/cryptsetup.c
@@ -2488,9 +2555,11 @@
rm -f cryptsetup.target && \
$(LN_S) ../cryptsetup.target cryptsetup.target )
+if !UDEV_ONLY
INSTALL_DATA_HOOKS += \
cryptsetup-install-data-hook
endif
+endif
#
------------------------------------------------------------------------------
if ENABLE_HOSTNAMED
@@ -2506,6 +2575,7 @@
libsystemd-daemon.la \
libsystemd-dbus.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-hostnamed
@@ -2536,6 +2606,7 @@
INSTALL_DATA_HOOKS += \
hostnamed-install-data-hook
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-hostnamed.service.in
@@ -2556,6 +2627,7 @@
libsystemd-daemon.la \
libsystemd-dbus.la
+if !UDEV_ONLY
nodist_systemunit_DATA += \
units/systemd-localed.service
@@ -2586,15 +2658,18 @@
INSTALL_DATA_HOOKS += \
localed-install-data-hook
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-localed.service.in
+if !UDEV_ONLY
dist_pkgdata_DATA = \
src/locale/kbd-model-map
dist_noinst_SCRIPT = \
src/locale/generate-kbd-model-map
+endif
update-kbd-model-map:
src/locale/generate-kbd-model-map > src/locale/kbd-model-map
@@ -2615,6 +2690,7 @@
libsystemd-daemon.la \
libsystemd-dbus.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-timedated
@@ -2645,6 +2721,7 @@
INSTALL_DATA_HOOKS += \
timedated-install-data-hook
+endif # !UDEV_ONLY
EXTRA_DIST += \
units/systemd-timedated.service.in
@@ -2717,8 +2794,10 @@
libsystemd-dbus.la \
libudev.la
+if !UDEV_ONLY
rootbin_PROGRAMS += \
loginctl
+endif
systemd_inhibit_SOURCES = \
src/login/inhibit.c
@@ -2731,8 +2810,10 @@
libsystemd-shared.la \
libsystemd-dbus.la
+if !UDEV_ONLY
rootbin_PROGRAMS += \
systemd-inhibit
+endif
test_login_SOURCES = \
src/login/test-login.c
@@ -2752,9 +2833,11 @@
$(AM_CFLAGS) \
$(DBUS_CFLAGS)
+if !UDEV_ONLY
noinst_PROGRAMS += \
test-login \
test-inhibit
+endif
libsystemd_login_la_SOURCES = \
src/login/sd-login.c
@@ -2797,10 +2880,13 @@
libsystemd-shared.la \
$(PAM_LIBS)
+if !UDEV_ONLY
pamlib_LTLIBRARIES = \
pam_systemd.la
endif
+endif
+if !UDEV_ONLY
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
libsystemd-login-install-hook:
if test "$(libdir)" != "$(rootlibdir)"; then \
@@ -2859,6 +2945,7 @@
INSTALL_DATA_HOOKS += \
logind-install-data-hook
+endif # !UDEV_ONLY
systemd_multi_seat_x_SOURCES = \
src/login/multi-seat-x.c
@@ -2868,6 +2955,7 @@
libsystemd-shared.la \
libudev.la
+if !UDEV_ONLY
rootlibexec_PROGRAMS += \
systemd-multi-seat-x
@@ -2908,6 +2996,7 @@
man/sd_seat_can_multi_session.3 \
man/sd_get_sessions.3 \
man/sd_get_uids.3
+endif # !UDEV_ONLY
man/sd_login_monitor_unref.3: man/sd_login_monitor_new.3
man/sd_login_monitor_flush.3: man/sd_login_monitor_new.3
@@ -3011,9 +3100,11 @@
units/user/%: units/%.m4 Makefile
$(M4_PROCESS_USER)
+if !UDEV_ONLY
nodist_polkitpolicy_DATA = \
$(polkitpolicy_in_files:.policy.in=.policy) \
$(polkitpolicy_in_in_files:.policy.in.in=.policy)
+endif
EXTRA_DIST += \
$(polkitpolicy_in_files) \
@@ -3069,6 +3160,7 @@
CLEANFILES += \
$(dbusinterface_DATA)
+if !UDEV_ONLY
systemd-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(tmpfilesdir) \
@@ -3276,6 +3368,7 @@
rm -f display-manager.service && \
$(LN_S) $(systemunitdir)/display-manager.service
display-manager.service )
endif
+endif # !UDEV_ONLY
install-exec-hook: $(INSTALL_EXEC_HOOKS)
--- systemd-183/configure.ac.orig 2012-05-31 00:34:22.152501987 +0100
+++ systemd-183/configure.ac 2012-05-31 00:34:28.888674726 +0100
@@ -44,8 +44,21 @@
LT_PREREQ(2.2)
LT_INIT
+# figure out early if we only want udev
+AC_ARG_ENABLE([udev-only],
+ [AS_HELP_STRING([--enable-udev-only],
+ [build only udev (default: no)])],,
+ [enable_udev_only=no])
+case "$enable_udev_only" in
+yes|no) ;;
+*) enable_udev_only=no ;;
+esac
+AM_CONDITIONAL([UDEV_ONLY], [test $enable_udev_only = yes])
+
# i18n stuff for the PolicyKit policy files
-IT_PROG_INTLTOOL([0.40.0])
+if [ $enable_udev_only = no ]; then
+ IT_PROG_INTLTOOL([0.40.0])
+fi
GETTEXT_PACKAGE=systemd
AC_SUBST(GETTEXT_PACKAGE)
@@ -143,7 +156,9 @@
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install
pkg-config])
-PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+if [ $enable_udev_only = no ]; then
+ PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+fi
PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page