* Re: systemd-183
From: Bruce Dubbs @ 2012-05-31 19:33 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
William Hubbs wrote:
> Hi Kay,
>
> On Sun, May 27, 2012 at 01:34:11PM +0200, Kay Sievers wrote:
>> We support stand-alone *operation* of the udev tools, but the build
>> system does not support a stand-alone *build*. The systemd tree needs
>> to be built and udev picked out of it.
>>
>> There are also several other generally useful tools in the built tree,
>> which you might need too over time, like tmpfiles, module-load,
>> sysconf, binfmt, ... A couple of D-Bus services to manage system
>> settings from the desktop.
>>
>> Various upstream tools start to install config files or use these
>> interfaces. It might be the simplest to install them too, even when
>> systemd is not used.
>
> I understand that folks might want these tools, but I don't want to
> install the ones that udev doesn't need as part of the udev package. I
> am also concerned about libcap and dbus being hard requirements of the
> udev build process.
>
> If udev, or the tools that it needs, like tmpfiles, requires these
> libraries, that is one thing, otherwise I really do not want
> to make them dependencies of the udev package. The issue is that in
> gentoo, since we are source based, I would have to require all of our
> users to install dbus and libcap just to build udev.
The Linux From Scratch community has the same problem. We are working
on this in two ways.
1. I've developed a make.sh script and an install.sh script to build,
link, and install udev from the systemd sources bypassing the autotools
environment completely. This is not desirable, but it gets the job done
and is a proof of concept.
2. We are working to modify configure.ac and Makefile.in to do the
right thing. That may take a little more time.
I can say that there are several packages currently required by
configure that are not needed by a udev only build: intltool,
XML::Parser, libpcap2, attr, usbutils, libusb, pciutils, and dbus.
The common/systemd files needed for the udev applications are:
src/shared:
log.c label.c mkdir.c cgroup-util.c strv.c path-util.c conf-files.c
hashmap.c set.c exit-status.c util.c dev-setup.c
src/libsystemd-daemon:
sd-daemon.c
src/login:
sd-login.c
If those files are built and put into a separate library, it would make
the rest of a udev only build much more straight forward.
I'll get back to this list when we have more progress.
-- Bruce
^ permalink raw reply
* Re: systemd-183
From: Tom Gundersen @ 2012-05-31 19:46 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
On Thu, May 31, 2012 at 9:33 PM, Bruce Dubbs <bruce.dubbs@gmail.com> wrote:
> I can say that there are several packages currently required by configure
> that are not needed by a udev only build: Â intltool, XML::Parser, libpcap2,
> attr, usbutils, libusb, pciutils, and dbus.
Regarding usbutils and pciutils: these are not needed at compile-time
if you pass in the correct configure switch to set the {pci,usb}ids
path.
The {pci,usb}ids databases are however needed by udev on runtime and
they are traditionally shipped with {usb,pci}utils, so that's
something to keep in mind.
On Arch (as well as on Gentoo), we deal with this by shipping the
databases in a separate package[0], and dropping the dependency on
{pci,usb}utils. Maybe that's something other's would benefit from too.
Cheers,
Tom
[0]: <http://www.archlinux.org/packages/core/any/hwids/>
^ permalink raw reply
* Re: systemd-183
From: Kay Sievers @ 2012-05-31 19:57 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
On Thu, May 31, 2012 at 9:46 PM, Tom Gundersen <teg@jklm.no> wrote:
> On Thu, May 31, 2012 at 9:33 PM, Bruce Dubbs <bruce.dubbs@gmail.com> wrote:
>> I can say that there are several packages currently required by configure
>> that are not needed by a udev only build: Â intltool, XML::Parser, libpcap2,
>> attr, usbutils, libusb, pciutils, and dbus.
>
> Regarding usbutils and pciutils: these are not needed at compile-time
> if you pass in the correct configure switch to set the {pci,usb}ids
> path.
>
> The {pci,usb}ids databases are however needed by udev on runtime and
> they are traditionally shipped with {usb,pci}utils, so that's
> something to keep in mind.
>
> On Arch (as well as on Gentoo), we deal with this by shipping the
> databases in a separate package[0], and dropping the dependency on
> {pci,usb}utils. Maybe that's something other's would benefit from too.
It's probably not worth to put too much effort into it. We are about
to make a more generic query-able hardware database with pre-compiled
efficient lookup interfaces. It will provide additional key/value
pairs that further classify devices we care about. All this will go
far beyond the human readable strings the ids files provide.
Just saying, pretty soon, the ids files will no longer directly read
by udev. We will see how all that will look like when we get there.
Kay
^ permalink raw reply
* Re: systemd-183
From: Kay Sievers @ 2012-05-31 20:15 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
On Thu, May 31, 2012 at 7:35 PM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> I am also concerned about libcap and dbus being hard requirements of the
> udev build process.
> The issue is that in
> gentoo, since we are source based, I would have to require all of our
> users to install dbus and libcap just to build udev.
Libcap should be gone with the one include Bryan patched out.
D-Bus should no longer be pulled into the shared stuff udev needs, but
the build-sys still requires D-Bus at configure time.
Kay
^ permalink raw reply
* Re: [PATCH] Don't require dbus for libudev-core.la
From: Kay Sievers @ 2012-05-31 20:22 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC70280.1090200@kadzban.is-a-geek.net>
On Thu, May 31, 2012 at 7:32 AM, Bryan Kadzban
<bryan@kadzban.is-a-geek.net> wrote:
> Split libsystemd-label.la into libsystemd-label-no-dbus.la and
> libsystemd-label.la (which depends on the first). Â Link the first into
> libudev-core, and keep linking the second in everywhere else.
>
> Fixes compilation of standalone udevd on systems that don't have dbus
> installed.
I split-off the unit-related files, it *should* have the same effect.
Thanks,
Kay
^ permalink raw reply
* Re: systemd-183
From: Bruce Dubbs @ 2012-05-31 20:30 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
Tom Gundersen wrote:
> On Thu, May 31, 2012 at 9:33 PM, Bruce Dubbs <bruce.dubbs@gmail.com> wrote:
>> I can say that there are several packages currently required by configure
>> that are not needed by a udev only build: intltool, XML::Parser, libpcap2,
>> attr, usbutils, libusb, pciutils, and dbus.
>
> Regarding usbutils and pciutils: these are not needed at compile-time
> if you pass in the correct configure switch to set the {pci,usb}ids
> path.
>
> The {pci,usb}ids databases are however needed by udev on runtime and
> they are traditionally shipped with {usb,pci}utils, so that's
> something to keep in mind.
>
> On Arch (as well as on Gentoo), we deal with this by shipping the
> databases in a separate package[0], and dropping the dependency on
> {pci,usb}utils. Maybe that's something other's would benefit from too.
We may have been doing it incorrectly, but we've used
--with-usb-ids-path=no
--with-pci-ids-path=no
in LFS for some time with udev. No one has reported any problems with
that, but there may have been some latent issues we are not aware of.
-- Bruce
^ permalink raw reply
* Re: systemd-183
From: Kay Sievers @ 2012-05-31 20:52 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
On Thu, May 31, 2012 at 10:30 PM, Bruce Dubbs <bruce.dubbs@gmail.com> wrote:
> Tom Gundersen wrote:
>>
>> On Thu, May 31, 2012 at 9:33 PM, Bruce Dubbs <bruce.dubbs@gmail.com>
>> wrote:
>>>
>>> I can say that there are several packages currently required by configure
>>> that are not needed by a udev only build: intltool, XML::Parser,
>>> libpcap2,
>>> attr, usbutils, libusb, pciutils, and dbus.
>>
>>
>> Regarding usbutils and pciutils: these are not needed at compile-time
>> if you pass in the correct configure switch to set the {pci,usb}ids
>> path.
>>
>> The {pci,usb}ids databases are however needed by udev on runtime and
>> they are traditionally shipped with {usb,pci}utils, so that's
>> something to keep in mind.
>>
>> On Arch (as well as on Gentoo), we deal with this by shipping the
>> databases in a separate package[0], and dropping the dependency on
>> {pci,usb}utils. Maybe that's something other's would benefit from too.
>
>
> We may have been doing it incorrectly, but we've used
>
> --with-usb-ids-path=no
> --with-pci-ids-path=no
>
> in LFS for some time with udev. No one has reported any problems with that,
> but there may have been some latent issues we are not aware of.
Nothing should go wrong.
It's only that some user interfaces want to be nice and show the
'real' name of the devices. But if the ids databases are not around,
they will fall back to things like "Audio Device" instead of "Intel
HDA Audio" and such.
Kay
^ permalink raw reply
* Re: systemd-183
From: Tom Gundersen @ 2012-05-31 21:45 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FBE8DC4.1070202@gmail.com>
On Thu, May 31, 2012 at 9:57 PM, Kay Sievers <kay@vrfy.org> wrote:
> It's probably not worth to put too much effort into it. We are about
> to make a more generic query-able hardware database with pre-compiled
> efficient lookup interfaces. It will provide additional key/value
> pairs that further classify devices we care about. All this will go
> far beyond the human readable strings the ids files provide.
>
> Just saying, pretty soon, the ids files will no longer directly read
> by udev. We will see how all that will look like when we get there.
That makes a lot of sense. Hopefully it will be similar to the hwids
package from a packaging point of view (i.e. a standalone db that can
be shipped independently from any libs/tools).
Cheers,
Tom
^ permalink raw reply
* Re: [PATCH] Don't require dbus for libudev-core.la
From: Bryan Kadzban @ 2012-06-01 3:43 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC70280.1090200@kadzban.is-a-geek.net>
Kay Sievers wrote:
> On Thu, May 31, 2012 at 7:32 AM, Bryan Kadzban
> <bryan@kadzban.is-a-geek.net> wrote:
>> Split libsystemd-label.la into libsystemd-label-no-dbus.la and
>> libsystemd-label.la (which depends on the first). Link the first
>> into libudev-core, and keep linking the second in everywhere else.
>>
>> Fixes compilation of standalone udevd on systems that don't have
>> dbus installed.
>
> I split-off the unit-related files, it *should* have the same effect.
Yes, this seems to be working fine. Thanks!
^ permalink raw reply
* rfc: udev should be able to re-exec itself
From: William Hubbs @ 2012-06-01 23:45 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
All,
currently udev does not have a way to restart itself. This would be a
useful feature, because we could then use this command when we upgrade
or downgrade udev on user's systems so that the most current version of
udev is always running.
One of gentoo's developers did suggest a patch quite a while back, but
some how it got lost in the shuffel. This patch will not apply now, but
it gives the impression that something like this could be added very
easily [1].
Thoughts anyone?
Thanks,
William
[1] https://bugs.gentoo.org/show_bug.cgi?id=129204#c7
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-02 6:56 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
Add a new ./configure arg (--disable-systemd) that causes the build
system to build, test, and install only udev.
Allows udev to be built on a system with many fewer of the build-time
dependencies present.
Signed-Off-By: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
----
Possible points of discussion:
Should this flag be called --disable-systemd, as I did? (That follows
the autoconf docs, which say --disable-* should only ever turn stuff
off, and --enable-* should only ever turn stuff on.) Or are the
autoconf docs irrelevant, and this should be called --enable-udev-only
or something, instead? The flag name isn't terribly important to me.
(Note that the flag is set to *enable* systemd by default. Disabling it
is probably not to be done lightly, and a bunch of other stuff needs to
be turned off as well for this to actually build.)
Also, a few notes on usage. First, to fully avoid installing systemd
stuff, a bunch of directories need to be set to the empty string at
"make install" time, or they'll be created and left empty.
("pkgdatadir= polkitpolicydir= bashcompletiondir= pkgsysconfdir=
userunitdir= tmpfilesdir= sysctldir= systemunitdir= pkgincludedir=
systemgeneratordir=" is the full list.)
Second, "make check" fails in the po/ directory if systemd was not
enabled at configure time, because intltool was skipped. The udev tests
all succeed though, so "make SUBDIRS=. check" works.
Third, "make distdir" also require systemd to be enabled, otherwise some
of the .policy.in files don't make it into the directory (and so
"dist-xz" won't put them into the generated tarball). But that's not
likely to be an issue, considering who does the releases.
Last, on the changes to configure.ac. The intltool and m4 path checks
are not needed anymore if only udev is being built. Neither is gperf,
so skip the "no gperf found" error message in that case. No need to
check pkg-config for dbus-1. cap_init and sys/capability.h are no
longer required either, so skip them as well. Finally, none of the
--with-{dbus,pam}*dir args need a default value for a udev-only build.
[-- Attachment #2: systemd-make-systemd-optional.patch --]
[-- Type: text/plain, Size: 9621 bytes --]
diff --git a/Makefile.am b/Makefile.am
index 597711e..4712c11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -202,6 +202,13 @@ endif
endif
# ------------------------------------------------------------------------------
+if !ENABLE_SYSTEMD
+# stubs
+bin_PROGRAMS =
+rootlibexec_PROGRAMS =
+endif
+
+if ENABLE_SYSTEMD
rootbin_PROGRAMS = \
systemctl \
systemd-notify \
@@ -442,6 +449,8 @@ EXTRA_DIST += \
units/systemd-ask-password-plymouth.service.in
endif
+endif # ENABLE_SYSTEMD
+
dist_doc_DATA = \
README \
NEWS \
@@ -453,6 +462,7 @@ dist_doc_DATA = \
@INTLTOOL_POLICY_RULE@
# ------------------------------------------------------------------------------
+if ENABLE_SYSTEMD
MANPAGES = \
man/systemd.1 \
man/systemctl.1 \
@@ -510,13 +520,19 @@ MANPAGES_ALIAS = \
man/systemd-modules-load.8 \
man/systemd-sysctl.8 \
man/systemd-journald.8
+else
+MANPAGES =
+MANPAGES_ALIAS =
+endif
+if ENABLE_SYSTEMD
man/reboot.8: man/halt.8
man/poweroff.8: man/halt.8
man/init.1: man/systemd.1
man/systemd-modules-load.8: man/systemd-modules-load.service.8
man/systemd-sysctl.8: man/systemd-sysctl.service.8
man/systemd-journald.8: man/systemd-journald.service.8
+endif
XML_FILES = \
${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
@@ -595,6 +611,7 @@ libsystemd_shared_la_SOURCES = \
src/shared/hwclock.c \
src/shared/hwclock.h
+if ENABLE_SYSTEMD
#-------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-dbus.la
@@ -627,6 +644,7 @@ libsystemd_units_la_SOURCES = \
libsystemd_units_la_CFLAGS = \
$(AM_CFLAGS) \
$(DBUS_CFLAGS)
+endif
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
@@ -651,6 +669,7 @@ libsystemd_label_la_CFLAGS = \
libsystemd_label_la_LIBADD = \
$(SELINUX_LIBS)
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-logs.la
@@ -692,6 +711,8 @@ libsystemd_audit_la_SOURCES = \
libsystemd_audit_la_LIBADD = \
libsystemd-capability.la
+endif # ENABLE_SYSTEMD
+
# ------------------------------------------------------------------------------
if HAVE_ACL
noinst_LTLIBRARIES += \
@@ -709,6 +730,7 @@ libsystemd_acl_la_LIBADD = \
$(ACL_LIBS)
endif
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-core.la
@@ -1355,6 +1377,8 @@ EXTRA_DIST += \
src/libsystemd-daemon/libsystemd-daemon.pc.in \
src/libsystemd-daemon/libsystemd-daemon.sym
+endif # ENABLE_SYSTEMD
+
# ------------------------------------------------------------------------------
if ENABLE_GTK_DOC
SUBDIRS += \
@@ -1443,8 +1467,12 @@ udev-confdirs:
INSTALL_DATA_HOOKS += udev-confdirs
+if ENABLE_SYSTEMD
+SYSTEMD_UDEV_RULES = rules/99-systemd.rules
+endif
+
dist_udevrules_DATA += \
- rules/99-systemd.rules \
+ $(SYSTEMD_UDEV_RULES) \
rules/42-usb-hid-pm.rules \
rules/50-udev-default.rules \
rules/60-persistent-storage-tape.rules \
@@ -1471,9 +1499,10 @@ EXTRA_DIST += \
src/udev/udev.pc.in
CLEANFILES += \
- rules/99-systemd.rules \
+ $(SYSTEMD_UDEV_RULES) \
src/udev/udev.pc
+if ENABLE_SYSTEMD
EXTRA_DIST += \
units/systemd-udev.service.in \
units/systemd-udev-trigger.service.in \
@@ -1493,6 +1522,7 @@ systemd-install-hook:
ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
INSTALL_DATA_HOOKS += systemd-install-hook
+endif
bin_PROGRAMS += \
udevadm
@@ -2017,6 +2047,7 @@ dist_udevrules_DATA += \
udevlibexec_PROGRAMS += \
mtd_probe
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
libsystemd_id128_la_SOURCES = \
src/libsystemd-id128/sd-id128.c
@@ -2984,6 +3015,8 @@ CLEANFILES += \
src/login/71-seat.rules \
src/login/73-seat-late.rules
endif
+
+endif # ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
SED_PROCESS = \
@@ -3113,6 +3146,8 @@ DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
CLEANFILES += \
$(dbusinterface_DATA)
+if ENABLE_SYSTEMD
+
systemd-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(tmpfilesdir) \
@@ -3321,11 +3356,17 @@ if TARGET_MAGEIA
$(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
endif
+endif # ENABLE_SYSTEMD
+
install-exec-hook: $(INSTALL_EXEC_HOOKS)
uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
-install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
+if ENABLE_SYSTEMD
+SYSTEMD_INSTALL_DATA_HOOK = systemd-install-data-hook
+endif
+
+install-data-hook: $(SYSTEMD_INSTALL_DATA_HOOK) $(INSTALL_DATA_HOOKS)
distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
diff --git a/configure.ac b/configure.ac
index a4f9fea..bf825bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,8 +44,23 @@ AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
LT_PREREQ(2.2)
LT_INIT
+dnl Figure out if we want a udev-only build early. Inverted logic to match
+dnl autoconf expectations (passing --enable-foo should only ever turn something
+dnl on, never turn something off).
+AC_ARG_ENABLE([systemd],
+ [AS_HELP_STRING([--disable-systemd],
+ [build udevd only, not systemd @<:@default: systemd enabled@:>@])],
+ [enable_systemd=$enableval], [enable_systemd=yes])
+
+dnl Anything other than --disable-systemd means "yes, build systemd as well"
+AS_IF([test "x$enable_systemd" != "xno"], [enable_systemd=yes])
+
+AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" = "xyes"])
+
# i18n stuff for the PolicyKit policy files
+AS_IF([test "x$enable_systemd" = "xyes"], [
IT_PROG_INTLTOOL([0.40.0])
+])
GETTEXT_PACKAGE=systemd
AC_SUBST(GETTEXT_PACKAGE)
@@ -61,7 +76,9 @@ AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
+AS_IF([test "x$enable_systemd" = "xyes"], [
AC_PATH_PROG([M4], [m4])
+])
# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
m4_ifdef([GTK_DOC_CHECK], [
@@ -75,7 +92,7 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
-if test -z "$GPERF" ; then
+if test -z "$GPERF" && test "x$enable_systemd" = "xyes" ; then
AC_MSG_ERROR([*** gperf not found])
fi
@@ -132,6 +149,7 @@ AC_SUBST([GCLDFLAGS], $with_ldflags)
AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
+AS_IF([test "x$enable_systemd" = "xyes"], [
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
@@ -139,11 +157,14 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n
CAP_LIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(CAP_LIBS)
+])
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+AS_IF([test "x$enable_systemd" = "xyes"], [
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+])
PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
@@ -655,22 +676,22 @@ AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
- [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
- [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
- [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
[],
- [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
@@ -684,7 +705,7 @@ AC_ARG_WITH([rootlibdir],
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
- [with_pamlibdir=${with_rootlibdir}/security])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_pamlibdir=${with_rootlibdir}/security])])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
^ permalink raw reply related
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: William Hubbs @ 2012-06-02 20:49 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
Hi Bryan,
this looks good to me, but there are still pieces being installed which
should not be installed for a udev-only build afaik.
You might want to look at removing those also.
Thanks,
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb
From: Lauri Kasanen @ 2012-06-03 15:28 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
Hi all
Udev was the limiting factor for us on low-RAM systems.
Given an average RSS of 180kb, 128 workers would require ~23mb of RAM.
Now, please consider what happens when there is only, say, 15mb free.
Udev protects itself from OOM, and the kernel can do nothing but panic.
28 workers * 0.18mb = ~5mb. This change should not affect more powerful
systems much, given that they still get the addition from the amount of RAM.
PS: Please CC me.
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
---
src/udev/udevd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 7905310..229031c 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1353,9 +1353,9 @@ int main(int argc, char *argv[])
/* set value depending on the amount of RAM */
if (memsize > 0)
- children_max = 128 + (memsize / 8);
+ children_max = 28 + (memsize / 8);
else
- children_max = 128;
+ children_max = 28;
}
log_debug("set children_max to %u\n", children_max);
--
1.7.2.1
--
http://www.fastmail.fm - The professional email service
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-udev-Lower-the-starting-children_max-drop-the-minimu.patch --]
[-- Type: text/x-diff; name="0001-udev-Lower-the-starting-children_max-drop-the-minimu.patch", Size: 1415 bytes --]
From f08a54bd6b39d448702d8dcbc59910fea419c456 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <curaga@operamail.com>
Date: Sun, 3 Jun 2012 18:11:58 +0300
Subject: [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb
Udev was the limiting factor for us on low-RAM systems.
Given an average RSS of 180kb, 128 workers would require ~23mb of RAM.
Now, please consider what happens when there is only, say, 15mb free.
Udev protects itself from OOM, and the kernel can do nothing but panic.
28 workers * 0.18mb = ~5mb. This change should not affect more powerful
systems much, given that they still get the addition from the amount of RAM.
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
---
src/udev/udevd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 7905310..229031c 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1353,9 +1353,9 @@ int main(int argc, char *argv[])
/* set value depending on the amount of RAM */
if (memsize > 0)
- children_max = 128 + (memsize / 8);
+ children_max = 28 + (memsize / 8);
else
- children_max = 128;
+ children_max = 28;
}
log_debug("set children_max to %u\n", children_max);
--
1.7.2.1
^ permalink raw reply related
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-03 16:55 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
William Hubbs wrote:
> this looks good to me, but there are still pieces being installed
> which should not be installed for a udev-only build afaik.
>
> You might want to look at removing those also.
Which pieces?
The only things that get installed in my case are the rules, udev.conf,
systemd-udevd, udevadm, the helper binaries, the manpages, libudev, the
udev and libudev pkg-config files, and stuff in /usr/share/doc. Though
I do use a lot of the existing ./configure knobs to turn other systemd
things off; maybe that's related.
Unless you mean the directories that are getting created, as in the
previous message -- but I don't see a way to stop automake from doing
that. Well, other than setting them to nothing in the Makefile.am if
!ENABLE_SYSTEMD; duh, I should have done that. But that still seems a
bit cosmetic to me.
(One thing I need to do today is fix this so that "make distdir" works
even with --disable-systemd. Should be able to pull the EXTRA_DIST
stuff out of the conditionals to do that. So I'll probably look into
setting these directories to nothing in that case as well.)
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-03 21:21 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
Bryan Kadzban wrote:
> Unless you mean the directories that are getting created, as in the
> previous message -- but I don't see a way to stop automake from doing
> that.
Digging a bit (the initial attempt at setting directories to "" resulted
in several warnings from automake about conditionally changing pkg*dir
variables), recent versions of automake no longer create empty
directories. Upgrading my system to 1.12.1 (most recent) and rerunning
"autoreconf --force" removed almost all of the requirements to set these
directories to the empty string.
I still need to set "pkgincludedir= pkgsysconfdir=", and that looks like
a too-simple check for no files (it doesn't work if there's only
whitespace). But I don't think it's a huge deal either.
> (One thing I need to do today is fix this so that "make distdir"
> works even with --disable-systemd.)
This is now done, just without the directory changes, since a newer
automake fixes that. v2 patch (including header) attached.
Still wondering which bits of systemd got installed in your setup
though. :-)
[-- Attachment #2: systemd-make-systemd-optional.patch --]
[-- Type: text/plain, Size: 20213 bytes --]
Add a new ./configure arg (--disable-systemd) that causes the build
system to build, test, and install only udev.
Allows udev to be built on a system with many fewer of the build-time
dependencies present.
v2: Handle EXTRA_DIST correctly; always distribute everything. This
also fixes several cases where using e.g. --disable-gudev on the
distributor's system causes "make dist" to not distribute some of the
gudev source files. Also handle polkitpolicy* files: always include
the filenames in the $(*_files) variables, since EXTRA_DIST is built
from those variables, but skip the installation rules unless
ENABLE_SYSTEMD is on.
Signed-Off-By: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
diff --git a/Makefile.am b/Makefile.am
index 597711e..12baedd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -202,6 +202,13 @@ endif
endif
# ------------------------------------------------------------------------------
+if !ENABLE_SYSTEMD
+# stubs
+bin_PROGRAMS =
+rootlibexec_PROGRAMS =
+endif
+
+if ENABLE_SYSTEMD
rootbin_PROGRAMS = \
systemctl \
systemd-notify \
@@ -349,6 +356,8 @@ dist_userunit_DATA = \
nodist_userunit_DATA = \
units/user/exit.service
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
units/getty@.service.m4 \
units/serial-getty@.service.m4 \
@@ -383,6 +392,8 @@ EXTRA_DIST += \
introspect.awk \
man/custom-html.xsl
+if ENABLE_SYSTEMD
+
if TARGET_FEDORA
dist_systemunit_DATA += \
units/fedora/prefdm.service \
@@ -437,10 +448,12 @@ dist_systemunit_DATA += \
nodist_systemunit_DATA += \
units/systemd-ask-password-plymouth.service
+
+endif
+endif # ENABLE_SYSTEMD
EXTRA_DIST += \
units/systemd-ask-password-plymouth.service.in
-endif
dist_doc_DATA = \
README \
@@ -453,6 +466,7 @@ dist_doc_DATA = \
@INTLTOOL_POLICY_RULE@
# ------------------------------------------------------------------------------
+if ENABLE_SYSTEMD
MANPAGES = \
man/systemd.1 \
man/systemctl.1 \
@@ -510,13 +524,19 @@ MANPAGES_ALIAS = \
man/systemd-modules-load.8 \
man/systemd-sysctl.8 \
man/systemd-journald.8
+else
+MANPAGES =
+MANPAGES_ALIAS =
+endif
+if ENABLE_SYSTEMD
man/reboot.8: man/halt.8
man/poweroff.8: man/halt.8
man/init.1: man/systemd.1
man/systemd-modules-load.8: man/systemd-modules-load.service.8
man/systemd-sysctl.8: man/systemd-sysctl.service.8
man/systemd-journald.8: man/systemd-journald.service.8
+endif
XML_FILES = \
${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubst %.7,%.xml,${patsubst %.8,%.xml,$(MANPAGES)}}}}}
@@ -595,6 +615,7 @@ libsystemd_shared_la_SOURCES = \
src/shared/hwclock.c \
src/shared/hwclock.h
+if ENABLE_SYSTEMD
#-------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-dbus.la
@@ -627,6 +648,7 @@ libsystemd_units_la_SOURCES = \
libsystemd_units_la_CFLAGS = \
$(AM_CFLAGS) \
$(DBUS_CFLAGS)
+endif
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
@@ -651,6 +673,7 @@ libsystemd_label_la_CFLAGS = \
libsystemd_label_la_LIBADD = \
$(SELINUX_LIBS)
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-logs.la
@@ -692,6 +715,8 @@ libsystemd_audit_la_SOURCES = \
libsystemd_audit_la_LIBADD = \
libsystemd-capability.la
+endif # ENABLE_SYSTEMD
+
# ------------------------------------------------------------------------------
if HAVE_ACL
noinst_LTLIBRARIES += \
@@ -709,6 +734,7 @@ libsystemd_acl_la_LIBADD = \
$(ACL_LIBS)
endif
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
libsystemd-core.la
@@ -844,9 +870,13 @@ src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@ || rm $@
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
src/core/load-fragment-gperf.gperf.m4
+if ENABLE_SYSTEMD
+
CLEANFILES += \
src/core/load-fragment-gperf.gperf \
src/core/load-fragment-gperf.c \
@@ -891,9 +921,6 @@ dbusinterface_DATA += \
org.freedesktop.systemd1.Swap.xml \
org.freedesktop.systemd1.Path.xml
-polkitpolicy_in_in_files = \
- src/core/org.freedesktop.systemd1.policy.in.in
-
org.freedesktop.systemd1.%.xml: systemd
$(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.$* $< $@.tmp && \
$(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
@@ -902,9 +929,16 @@ org.freedesktop.systemd1.%.xml: systemd
pkgconfigdata_DATA = \
src/core/systemd.pc
+endif # ENABLE_SYSTEMD
+
+polkitpolicy_in_in_files = \
+ src/core/org.freedesktop.systemd1.policy.in.in
+
EXTRA_DIST += \
src/core/systemd.pc.in
+if ENABLE_SYSTEMD
+
# ------------------------------------------------------------------------------
noinst_PROGRAMS += \
test-engine \
@@ -1351,6 +1385,8 @@ man/sd_is_socket_inet.3: man/sd_is_fifo.3
man/sd_is_mq.3: man/sd_is_fifo.3
man/sd_notifyf.3: man/sd_notify.3
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
src/libsystemd-daemon/libsystemd-daemon.pc.in \
src/libsystemd-daemon/libsystemd-daemon.sym
@@ -1443,8 +1479,12 @@ udev-confdirs:
INSTALL_DATA_HOOKS += udev-confdirs
+if ENABLE_SYSTEMD
+SYSTEMD_UDEV_RULES = rules/99-systemd.rules
+endif
+
dist_udevrules_DATA += \
- rules/99-systemd.rules \
+ $(SYSTEMD_UDEV_RULES) \
rules/42-usb-hid-pm.rules \
rules/50-udev-default.rules \
rules/60-persistent-storage-tape.rules \
@@ -1471,7 +1511,7 @@ EXTRA_DIST += \
src/udev/udev.pc.in
CLEANFILES += \
- rules/99-systemd.rules \
+ $(SYSTEMD_UDEV_RULES) \
src/udev/udev.pc
EXTRA_DIST += \
@@ -1479,6 +1519,7 @@ EXTRA_DIST += \
units/systemd-udev-trigger.service.in \
units/systemd-udev-settle.service.in
+if ENABLE_SYSTEMD
CLEANFILES += \
units/systemd-udev.service \
units/systemd-udev-trigger.service \
@@ -1493,6 +1534,7 @@ systemd-install-hook:
ln -sf ../systemd-udev-trigger.service $(DESTDIR)$(systemunitdir)/sysinit.target.wants/systemd-udev-trigger.service
INSTALL_DATA_HOOKS += systemd-install-hook
+endif
bin_PROGRAMS += \
udevadm
@@ -1731,9 +1773,12 @@ lib_LTLIBRARIES += libgudev-1.0.la
pkgconfiglib_DATA += \
src/gudev/gudev-1.0.pc
+endif
+
EXTRA_DIST += \
src/gudev/gudev-1.0.pc.in
+if ENABLE_GUDEV
CLEANFILES += \
src/gudev/gudev-1.0.pc
@@ -1784,6 +1829,8 @@ libgudev_1_0_la_LDFLAGS = \
-export-dynamic -no-undefined \
-export-symbols-regex '^g_udev_.*'
+endif
+
EXTRA_DIST += \
src/gudev/gudevmarshal.list \
src/gudev/gudevenumtypes.h.template \
@@ -1792,6 +1839,7 @@ EXTRA_DIST += \
src/gudev/seed-example-enum.js \
src/gudev/seed-example.js
+if ENABLE_GUDEV
CLEANFILES += \
$(nodist_libgudev_1_0_la_SOURCES)
@@ -1910,10 +1958,14 @@ dist_udevhome_SCRIPTS = \
TESTS += \
src/udev/keymap/check-keymaps.sh
+endif
+
EXTRA_DIST += \
src/udev/keymap/check-keymaps.sh \
src/udev/keymap/keyboard-force-release.sh.in
+if ENABLE_KEYMAP
+
CLEANFILES += \
$(nodist_keymap_SOURCES) \
src/udev/keymap/keys.txt \
@@ -2019,6 +2071,7 @@ dist_udevrules_DATA += \
udevlibexec_PROGRAMS += \
mtd_probe
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
libsystemd_id128_la_SOURCES = \
src/libsystemd-id128/sd-id128.c
@@ -2077,10 +2130,14 @@ libsystemd-id128-uninstall-hook:
UNINSTALL_EXEC_HOOKS += \
libsystemd-id128-uninstall-hook
+endif
+
EXTRA_DIST += \
src/libsystemd-id128/libsystemd-id128.pc.in \
src/libsystemd-id128/libsystemd-id128.sym
+if ENABLE_SYSTEMD
+
# ------------------------------------------------------------------------------
systemd_journald_SOURCES = \
src/journal/journald.c \
@@ -2275,12 +2332,16 @@ journal-install-data-hook:
INSTALL_DATA_HOOKS += \
journal-install-data-hook
+endif
+
EXTRA_DIST += \
src/journal/libsystemd-journal.pc.in \
src/journal/libsystemd-journal.sym \
units/systemd-journald.service.in \
src/journal/journald-gperf.gperf
+if ENABLE_SYSTEMD
+
CLEANFILES += \
src/journal/journald-gperf.c
@@ -2305,9 +2366,15 @@ rootlibexec_PROGRAMS += \
sysctl_DATA = \
sysctl.d/coredump.conf
+endif # ENABLE_COREDUMP
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
sysctl.d/coredump.conf.in
+if ENABLE_SYSTEMD
+if ENABLE_COREDUMP
+
CLEANFILES += \
sysctl.d/coredump.conf
endif
@@ -2353,9 +2420,13 @@ MANPAGES_ALIAS += \
man/systemd-binfmt.8: man/systemd-binfmt.service.8
+endif
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
units/systemd-binfmt.service.in
-endif
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_VCONSOLE
@@ -2384,9 +2455,13 @@ INSTALL_DATA_HOOKS += \
MANPAGES += \
man/vconsole.conf.5
+endif
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
units/systemd-vconsole-setup.service.in
-endif
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_READAHEAD
@@ -2425,15 +2500,19 @@ nodist_systemunit_DATA += \
units/systemd-readahead-replay.service \
units/systemd-readahead-done.service
+MANPAGES += \
+ man/sd_readahead.3 \
+ man/sd-readahead.7
+
+endif
+endif # ENABLE_SYSTEMD
+
EXTRA_DIST += \
units/systemd-readahead-collect.service.in \
units/systemd-readahead-replay.service.in \
units/systemd-readahead-done.service.in
-MANPAGES += \
- man/sd_readahead.3 \
- man/sd-readahead.7
-endif
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_QUOTACHECK
@@ -2443,15 +2522,19 @@ rootlibexec_PROGRAMS += \
nodist_systemunit_DATA += \
units/quotacheck.service
-EXTRA_DIST += \
- units/quotacheck.service.in
-
systemd_quotacheck_SOURCES = \
src/quotacheck/quotacheck.c
systemd_quotacheck_LDADD = \
libsystemd-shared.la
+
endif
+endif # ENABLE_SYSTEMD
+
+EXTRA_DIST += \
+ units/quotacheck.service.in
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_RANDOMSEED
@@ -2462,10 +2545,6 @@ nodist_systemunit_DATA += \
units/systemd-random-seed-save.service \
units/systemd-random-seed-load.service
-EXTRA_DIST += \
- units/systemd-random-seed-save.service.in \
- units/systemd-random-seed-load.service.in
-
systemd_random_seed_SOURCES = \
src/random-seed/random-seed.c
@@ -2486,7 +2565,15 @@ randomseed-install-data-hook:
INSTALL_DATA_HOOKS += \
randomseed-install-data-hook
+
endif
+endif # ENABLE_SYSTEMD
+
+EXTRA_DIST += \
+ units/systemd-random-seed-save.service.in \
+ units/systemd-random-seed-load.service.in
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if HAVE_LIBCRYPTSETUP
@@ -2556,9 +2643,6 @@ dist_dbuspolicy_DATA += \
dist_dbussystemservice_DATA += \
src/hostname/org.freedesktop.hostname1.service
-polkitpolicy_in_files += \
- src/hostname/org.freedesktop.hostname1.policy.in
-
dbusinterface_DATA += \
org.freedesktop.hostname1.xml
@@ -2575,9 +2659,16 @@ hostnamed-install-data-hook:
INSTALL_DATA_HOOKS += \
hostnamed-install-data-hook
+endif
+endif # ENABLE_SYSTEMD
+
+polkitpolicy_in_files += \
+ src/hostname/org.freedesktop.hostname1.policy.in
+
EXTRA_DIST += \
units/systemd-hostnamed.service.in
-endif
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_LOCALED
@@ -2606,9 +2697,6 @@ dist_dbuspolicy_DATA += \
dist_dbussystemservice_DATA += \
src/locale/org.freedesktop.locale1.service
-polkitpolicy_in_files += \
- src/locale/org.freedesktop.locale1.policy.in
-
dbusinterface_DATA += \
org.freedesktop.locale1.xml
@@ -2625,9 +2713,6 @@ localed-install-data-hook:
INSTALL_DATA_HOOKS += \
localed-install-data-hook
-EXTRA_DIST += \
- units/systemd-localed.service.in
-
dist_pkgdata_DATA = \
src/locale/kbd-model-map
@@ -2638,6 +2723,15 @@ update-kbd-model-map:
src/locale/generate-kbd-model-map > src/locale/kbd-model-map
endif
+endif # ENABLE_SYSTEMD
+
+polkitpolicy_in_files += \
+ src/locale/org.freedesktop.locale1.policy.in
+
+EXTRA_DIST += \
+ units/systemd-localed.service.in
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_TIMEDATED
@@ -2665,9 +2759,6 @@ dist_dbuspolicy_DATA += \
nodist_systemunit_DATA += \
units/systemd-timedated.service
-polkitpolicy_in_files += \
- src/timedate/org.freedesktop.timedate1.policy.in
-
org.freedesktop.timedate1.xml: systemd-timedated
$(AM_V_GEN)$(LIBTOOL) --mode=execute $(OBJCOPY) -O binary -j introspect.timedate1 $< $@.tmp && \
$(STRINGS) $@.tmp | $(AWK) -f $(srcdir)/introspect.awk | \
@@ -2684,9 +2775,16 @@ timedated-install-data-hook:
INSTALL_DATA_HOOKS += \
timedated-install-data-hook
+endif
+endif # ENABLE_SYSTEMD
+
+polkitpolicy_in_files += \
+ src/timedate/org.freedesktop.timedate1.policy.in
+
EXTRA_DIST += \
units/systemd-timedated.service.in
-endif
+
+if ENABLE_SYSTEMD
# ------------------------------------------------------------------------------
if ENABLE_LOGIND
@@ -2882,9 +2980,6 @@ lib_LTLIBRARIES += \
pkgconfiglib_DATA += \
src/login/libsystemd-login.pc
-polkitpolicy_in_files += \
- src/login/org.freedesktop.login1.policy.in
-
logind-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(systemunitdir)/multi-user.target.wants \
@@ -2972,6 +3067,17 @@ man/sd_seat_can_multi_session.3: man/sd_seat_get_active.3
man/sd_get_sessions.3: man/sd_get_seats.3
man/sd_get_uids.3: man/sd_get_seats.3
+CLEANFILES += \
+ src/login/logind-gperf.c \
+ src/login/71-seat.rules \
+ src/login/73-seat-late.rules
+
+endif
+endif # ENABLE_SYSTEMD
+
+polkitpolicy_in_files += \
+ src/login/org.freedesktop.login1.policy.in
+
EXTRA_DIST += \
src/login/logind-gperf.gperf \
src/login/libsystemd-login.pc.in \
@@ -2981,11 +3087,6 @@ EXTRA_DIST += \
units/systemd-logind.service.in \
units/systemd-user-sessions.service.in
-CLEANFILES += \
- src/login/logind-gperf.c \
- src/login/71-seat.rules \
- src/login/73-seat-late.rules
-endif
# ------------------------------------------------------------------------------
SED_PROCESS = \
@@ -3057,9 +3158,13 @@ units/%: units/%.m4 Makefile
units/user/%: units/%.m4 Makefile
$(M4_PROCESS_USER)
+if ENABLE_SYSTEMD
nodist_polkitpolicy_DATA = \
$(polkitpolicy_in_files:.policy.in=.policy) \
$(polkitpolicy_in_in_files:.policy.in.in=.policy)
+else
+nodist_polkitpolicy_DATA =
+endif
EXTRA_DIST += \
$(polkitpolicy_in_files) \
@@ -3115,6 +3220,8 @@ DBUS_PREPROCESS = $(CPP) -P $(DBUS_CFLAGS) -imacros dbus/dbus-protocol.h
CLEANFILES += \
$(dbusinterface_DATA)
+if ENABLE_SYSTEMD
+
systemd-install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(tmpfilesdir) \
@@ -3323,11 +3430,17 @@ if TARGET_MAGEIA
$(LN_S) $(systemunitdir)/display-manager.service display-manager.service )
endif
+endif # ENABLE_SYSTEMD
+
install-exec-hook: $(INSTALL_EXEC_HOOKS)
uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
-install-data-hook: systemd-install-data-hook $(INSTALL_DATA_HOOKS)
+if ENABLE_SYSTEMD
+SYSTEMD_INSTALL_DATA_HOOK = systemd-install-data-hook
+endif
+
+install-data-hook: $(SYSTEMD_INSTALL_DATA_HOOK) $(INSTALL_DATA_HOOKS)
distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
diff --git a/configure.ac b/configure.ac
index a4f9fea..bf825bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,8 +44,23 @@ AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
LT_PREREQ(2.2)
LT_INIT
+dnl Figure out if we want a udev-only build early. Inverted logic to match
+dnl autoconf expectations (passing --enable-foo should only ever turn something
+dnl on, never turn something off).
+AC_ARG_ENABLE([systemd],
+ [AS_HELP_STRING([--disable-systemd],
+ [build udevd only, not systemd @<:@default: systemd enabled@:>@])],
+ [enable_systemd=$enableval], [enable_systemd=yes])
+
+dnl Anything other than --disable-systemd means "yes, build systemd as well"
+AS_IF([test "x$enable_systemd" != "xno"], [enable_systemd=yes])
+
+AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" = "xyes"])
+
# i18n stuff for the PolicyKit policy files
+AS_IF([test "x$enable_systemd" = "xyes"], [
IT_PROG_INTLTOOL([0.40.0])
+])
GETTEXT_PACKAGE=systemd
AC_SUBST(GETTEXT_PACKAGE)
@@ -61,7 +76,9 @@ AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
+AS_IF([test "x$enable_systemd" = "xyes"], [
AC_PATH_PROG([M4], [m4])
+])
# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
m4_ifdef([GTK_DOC_CHECK], [
@@ -75,7 +92,7 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
-if test -z "$GPERF" ; then
+if test -z "$GPERF" && test "x$enable_systemd" = "xyes" ; then
AC_MSG_ERROR([*** gperf not found])
fi
@@ -132,6 +149,7 @@ AC_SUBST([GCLDFLAGS], $with_ldflags)
AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
+AS_IF([test "x$enable_systemd" = "xyes"], [
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
@@ -139,11 +157,14 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n
CAP_LIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(CAP_LIBS)
+])
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+AS_IF([test "x$enable_systemd" = "xyes"], [
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+])
PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
@@ -655,22 +676,22 @@ AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
- [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
- [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
- [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
[],
- [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
@@ -684,7 +705,7 @@ AC_ARG_WITH([rootlibdir],
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
- [with_pamlibdir=${with_rootlibdir}/security])
+ [AS_IF([test "x$enable_systemd" = "xyes"], [with_pamlibdir=${with_rootlibdir}/security])])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
^ permalink raw reply related
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: William Hubbs @ 2012-06-03 21:22 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]
On Sun, Jun 03, 2012 at 09:55:55AM -0700, Bryan Kadzban wrote:
> William Hubbs wrote:
> > this looks good to me, but there are still pieces being installed
> > which should not be installed for a udev-only build afaik.
> >
> > You might want to look at removing those also.
>
> Which pieces?
>
> The only things that get installed in my case are the rules, udev.conf,
> systemd-udevd, udevadm, the helper binaries, the manpages, libudev, the
> udev and libudev pkg-config files, and stuff in /usr/share/doc. Though
> I do use a lot of the existing ./configure knobs to turn other systemd
> things off; maybe that's related.
Maybe it is, because I get the following things that would also be
installed:
etc/bash_completion.d
etc/systemd
usr/include/systemd
usr/lib/sysctl.d
usr/lib/systemd/system-generators
usr/lib/systemd/user
usr/share/man/man1
usr/share/man/man3
usr/share/man/man5
usr/share/polkit-1
usr/share/polkit-1/actions
usr/share/systemd
> Unless you mean the directories that are getting created, as in the
> previous message -- but I don't see a way to stop automake from doing
> that. Well, other than setting them to nothing in the Makefile.am if
> !ENABLE_SYSTEMD; duh, I should have done that. But that still seems a
> bit cosmetic to me.
Yes, I am referring to empty directories and I can see how you might
see it as cosmetic, but would you consider not creating the
directories?
> (One thing I need to do today is fix this so that "make distdir" works
> even with --disable-systemd. Should be able to pull the EXTRA_DIST
> stuff out of the conditionals to do that. So I'll probably look into
> setting these directories to nothing in that case as well.)
Ok, that may do it.
One more thing though, thinking about it, is that we will need the
systemd-tmpfiles tool because udev is not going to support the
/lib/udev/devices directory any longer for creating custom devices, so
you might want to still build and install all of the parts of that for a
standalone udev build if doing so doesn't bring in more dependencies.
Thanks,
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-03 22:00 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
William Hubbs wrote:
> On Sun, Jun 03, 2012 at 09:55:55AM -0700, Bryan Kadzban wrote:
>> Which pieces?
>
> etc/bash_completion.d
> etc/systemd
> usr/include/systemd
> usr/lib/sysctl.d
> usr/lib/systemd/system-generators
> usr/lib/systemd/user
> usr/share/man/man1
> usr/share/man/man3
> usr/share/man/man5
> usr/share/polkit-1
> usr/share/polkit-1/actions
> usr/share/systemd
Those are all the empty directories that a newer automake will get rid
of, except two. You can suppress those at install time with:
make pkgincludedir= pkgsysconfdir= install
I can't fix pkgincludedir without warnings from automake (since it's
unconditionally set to $(includedir)/$(PACKAGE), and overriding it in
different branches of a conditional generates warnings), so I didn't fix
either of them.
> One more thing though, thinking about it, is that we will need the
> systemd-tmpfiles tool because udev is not going to support the
> /lib/udev/devices directory any longer for creating custom devices, so
> you might want to still build and install all of the parts of that for a
> standalone udev build if doing so doesn't bring in more dependencies.
I'd rather not replace "cp -a /lib/udev/devices/* /dev" in a boot script
with a binary that nothing else uses, plus its configuration (which
doesn't use nodes in /lib/udev/devices like what has been the udev ABI
for *years*, but instead uses a list of device descriptions), plus any
systemd-level libraries it may or may not need in the future.
If a system is already running systemd, then systemd-tmpfiles may or may
not be the best place to do this (the ABI change is a problem for those
systems, unless I'm missing something in the *tmpfiles* manpages). But
if systemd is not running, then sticking to the previous ABI explicitly
is the right way to go I think.
(Previously, packages could dump a device node into /lib/udev/devices
and it would show up on every boot. Now, they have to describe the
device node and dump a file into $(tmpfilesdir), wherever that happens
to be. This is obviously an interface change.)
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: William Hubbs @ 2012-06-04 1:50 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]
On Sun, Jun 03, 2012 at 03:00:27PM -0700, Bryan Kadzban wrote:
> > One more thing though, thinking about it, is that we will need the
> > systemd-tmpfiles tool because udev is not going to support the
> > /lib/udev/devices directory any longer for creating custom devices, so
> > you might want to still build and install all of the parts of that for a
> > standalone udev build if doing so doesn't bring in more dependencies.
>
> I'd rather not replace "cp -a /lib/udev/devices/* /dev" in a boot script
> with a binary that nothing else uses, plus its configuration (which
> doesn't use nodes in /lib/udev/devices like what has been the udev ABI
> for *years*, but instead uses a list of device descriptions), plus any
> systemd-level libraries it may or may not need in the future.
Actually other things could use it because of /tmp and /run and
creating/removing files/directories there on bootup.
> If a system is already running systemd, then systemd-tmpfiles may or may
> not be the best place to do this (the ABI change is a problem for those
> systems, unless I'm missing something in the *tmpfiles* manpages). But
> if systemd is not running, then sticking to the previous ABI explicitly
> is the right way to go I think.
Unless you don't have a previous abi. Gentoo relies on udev copying
things from /lib/udev/devices, which is gone with this version of udev,
so we need the new abi.
So, how about an extra switch --enable-tmpfiles-d that will toggle on or
off whether that is built on a standalone udev build?
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-04 2:13 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
William Hubbs wrote:
> On Sun, Jun 03, 2012 at 03:00:27PM -0700, Bryan Kadzban wrote:
>> I'd rather not replace "cp -a /lib/udev/devices/* /dev" in a boot
>> script with a binary that nothing else uses, plus its configuration
>> (which doesn't use nodes in /lib/udev/devices like what has been
>> the udev ABI for *years*, but instead uses a list of device
>> descriptions), plus any systemd-level libraries it may or may not
>> need in the future.
>
> Actually other things could use it because of /tmp and /run and
> creating/removing files/directories there on bootup.
Possibly, but the full functionality will require systemd anyway. The
program still has to be run by something; simply installing it won't do
anything useful. Plus it will have to depend on having mounted the
various temporary filesystems that it changes.
>> If a system is already running systemd, then systemd-tmpfiles may
>> or may not be the best place to do this (the ABI change is a
>> problem for those systems, unless I'm missing something in the
>> *tmpfiles* manpages). But if systemd is not running, then sticking
>> to the previous ABI explicitly is the right way to go I think.
>
> Unless you don't have a previous abi.
Except that udev-182 and earlier *provided* an ABI. "Put files in
/lib/udev/devices and they'll be copied to /dev at boot time" was the
rule, just like "put programs in /lib/udev and refer to them in rules
you install with IMPORT{program}="" or RUN+="" without a path" was the
rule.
Now that rule has apparently been changed, so programs are going to have
to expend effort coping. Unless I'm missing some functionality of
systemd-tmpfiles when I read the docs.
> Gentoo relies on udev copying things from /lib/udev/devices, which is
> gone with this version of udev, so we need the new abi.
I think you need something in the bootscripts somewhere that implements
the *old* ABI. Adding a line to the udev start script that does the
copy will give you that.
Building and installing systemd-tmpfiles will not, unless you also add a
bootscript that runs it. But then you also need to add configuration
files for it, and teach all the other programs that your users want to
run how to adapt to using the new configuration instead of the old
static tree.
(See man/tmpfiles.d.xml for the docs I'm looking at. There is no way to
describe "copy this tree over to this other root", only "create this
file", "write this data to this file", "create this character device",
"create this block device", "delete this file", etc.)
^ permalink raw reply
* Re: rfc: udev should be able to re-exec itself
From: Kay Sievers @ 2012-06-04 13:43 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <20120601234543.GA4330@linux1>
On Sat, Jun 2, 2012 at 1:45 AM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> currently udev does not have a way to restart itself. This would be a
> useful feature, because we could then use this command when we upgrade
> or downgrade udev on user's systems so that the most current version of
> udev is always running.
>
> One of gentoo's developers did suggest a patch quite a while back, but
> some how it got lost in the shuffel. This patch will not apply now, but
> it gives the impression that something like this could be added very
> easily [1].
>
> Thoughts anyone?
We do not want daemons to re-execute themselves. It's far more
complicated than usually expected, and in most cases it should be
avoided.
The problem of interruption-free upgrades is in most cases solved with
systemd's socket activation. But I don't think any distribution uses
that possibility when they upgrade udev today, but they easily could,
all the things are there to make it work.
Udev should not re-execute itself, but stopped, installed, and
restarted. If you want fancy upgrade setups, use an init system that
supports that properly while keeping things simple, and which allows
interruption-free restarts by keeping the sockets open.
Don't hack up daemons with half-baken things; it's *really* hard to get right.
Thanks,
Kay
^ permalink raw reply
* Re: [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb
From: Kay Sievers @ 2012-06-04 14:38 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <1338737288.24120.140661084367789.5D16C15D@webmail.messagingengine.com>
On Sun, Jun 3, 2012 at 5:28 PM, Lauri Kasanen <curaga@operamail.com> wrote:
> Udev was the limiting factor for us on low-RAM systems.
> Given an average RSS of 180kb, 128 workers would require ~23mb of RAM.
All workers are direct clone()s of the master process without exec(),
you are sure that every of them uses additional 128k?
> Now, please consider what happens when there is only, say, 15mb free.
> Udev protects itself from OOM, and the kernel can do nothing but panic.
It does, if does not get started by systemd.
> 28 workers * 0.18mb = ~5mb. This change should not affect more powerful
> systems much, given that they still get the addition from the amount of RAM.
That logic is from the time we needed to fork() for every event. Even
on a system with lots of devices we usually do not need more than
30-50 workers. Today, workers are re-used; we could lower that limit
even more if needed, without bad side effects.
Applied.
Thanks,
Kay
^ permalink raw reply
* Re: [PATCH] udev: Lower the starting children_max -> drop the minimum required RAM from 23mb to 5mb
From: Lauri Kasanen @ 2012-06-04 16:21 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <1338737288.24120.140661084367789.5D16C15D@webmail.messagingengine.com>
Hi
On Mon, Jun 4, 2012, at 16:38, Kay Sievers wrote:
> All workers are direct clone()s of the master process without exec(),
> you are sure that every of them uses additional 128k?
I'm not sure whether it was every worker, but without that commit our
system required 43mb to boot.
With that commit we could boot with only 30mb.
> It does, if does not get started by systemd.
Yep, not using systemd.
Thanks,
- Lauri
--
http://www.fastmail.fm - Access all of your messages and folders
wherever you are
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: William Hubbs @ 2012-06-04 18:51 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 2845 bytes --]
On Sun, Jun 03, 2012 at 07:13:03PM -0700, Bryan Kadzban wrote:
> William Hubbs wrote:
> > On Sun, Jun 03, 2012 at 03:00:27PM -0700, Bryan Kadzban wrote:
> >> I'd rather not replace "cp -a /lib/udev/devices/* /dev" in a boot
> >> script with a binary that nothing else uses, plus its configuration
> >> (which doesn't use nodes in /lib/udev/devices like what has been
> >> the udev ABI for *years*, but instead uses a list of device
> >> descriptions), plus any systemd-level libraries it may or may not
> >> need in the future.
> >
> > Actually other things could use it because of /tmp and /run and
> > creating/removing files/directories there on bootup.
>
> Possibly, but the full functionality will require systemd anyway. The
> program still has to be run by something; simply installing it won't do
> anything useful. Plus it will have to depend on having mounted the
> various temporary filesystems that it changes.
I agree that just installing it does nothing. But, it can be run at the
appropriate time by your boot scripts, so the other concerns you mention
here would be taken care of that way.
> >> If a system is already running systemd, then systemd-tmpfiles may
> >> or may not be the best place to do this (the ABI change is a
> >> problem for those systems, unless I'm missing something in the
> >> *tmpfiles* manpages). But if systemd is not running, then sticking
> >> to the previous ABI explicitly is the right way to go I think.
> >
> > Unless you don't have a previous abi.
>
> Except that udev-182 and earlier *provided* an ABI. "Put files in
> /lib/udev/devices and they'll be copied to /dev at boot time" was the
> rule, just like "put programs in /lib/udev and refer to them in rules
> you install with IMPORT{program}="" or RUN+="" without a path" was the
> rule.
>
> Now that rule has apparently been changed, so programs are going to have
> to expend effort coping. Unless I'm missing some functionality of
> systemd-tmpfiles when I read the docs.
It has definitely been changed. See the systemd NEWS file. That is
exactly why I think we need the systemd-tmpfiles executable and man
page.
There are several tools in the systemd build that can be used on
non-systemd systems. Maybe those don't belong as part of the udev
ebuild, but as a separate --enable/--disable-tools switch or something
like that.
> > Gentoo relies on udev copying things from /lib/udev/devices, which is
> > gone with this version of udev, so we need the new abi.
>
> I think you need something in the bootscripts somewhere that implements
> the *old* ABI. Adding a line to the udev start script that does the
> copy will give you that.
Also it will allow users to copy any kind of file they please into /dev,
just by putting it in /usr/lib/udev/devices.
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: Bryan Kadzban @ 2012-06-05 3:10 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
William Hubbs wrote:
> On Sun, Jun 03, 2012 at 07:13:03PM -0700, Bryan Kadzban wrote:
>> William Hubbs wrote:
>>> Actually other things could use it because of /tmp and /run and
>>> creating/removing files/directories there on bootup.
>> Possibly, but the full functionality will require systemd anyway.
>> The program still has to be run by something; simply installing it
>> won't do anything useful. Plus it will have to depend on having
>> mounted the various temporary filesystems that it changes.
>
> I agree that just installing it does nothing. But, it can be run at
> the appropriate time by your boot scripts, so the other concerns you
> mention here would be taken care of that way.
Why put effort into bootscripts that run a random other tool, when
instead we can resurrect the single line cp from a few years back?
It's somewhat annoying that we have to do anything, but that's what happens.
>> Except that udev-182 and earlier *provided* an ABI. "Put files in
>> /lib/udev/devices and they'll be copied to /dev at boot time" was
>> the rule, just like "put programs in /lib/udev and refer to them in
>> rules you install with IMPORT{program}="" or RUN+="" without a
>> path" was the rule.
>>
>> Now that rule has apparently been changed, so programs are going to
>> have to expend effort coping. Unless I'm missing some
>> functionality of systemd-tmpfiles when I read the docs.
>
> It has definitely been changed. See the systemd NEWS file. That is
> exactly why I think we need the systemd-tmpfiles executable and man
> page.
But see, the thing about ABIs is that they're not supposed to change.
What I will be doing in my own bootscripts is adding back the
single-line copy, to allow programs that are still using the old
interface to continue to work. (Like old versions of the nvidia driver,
which dumped the nvidia0 / nvidia1 / nvidiactl character device files in
that directory, when they couldn't use the sysfs class functions in the
kernel directly. It's been a while since that was happening, of
course.)
If you want to try to get systemd-tmpfiles to work, and figure out which
extra dependencies are needed (like, oh for instance, selinux or
libcap), feel free; that patch shouldn't be too hard to apply on top of
this one, if this gets committed.
>>> Gentoo relies on udev copying things from /lib/udev/devices,
>>> which is gone with this version of udev, so we need the new abi.
>> I think you need something in the bootscripts somewhere that
>> implements the *old* ABI. Adding a line to the udev start script
>> that does the copy will give you that.
>
> Also it will allow users to copy any kind of file they please into
> /dev, just by putting it in /usr/lib/udev/devices.
Well, /lib/udev/devices; there is no such thing as /usr/lib/udev unless
you're also buying into merging /usr, which I'm not yet. And if your
system build has done it, then /lib/udev/devices will continue to work
as well. That's the (previously-)accepted path.
But ignoring that -- yes, exactly, good point. Some software (sysvinit,
sysklogd, gpm) puts named pipes or sockets in /dev -- although they do
it without support from the udev bootscript, so not supporting those
files would be OK for them. I don't know what's running in the wild
that has relied on this behavior in the past, though.
^ permalink raw reply
* Re: [PATCH] Allow disabling the build of all of systemd, leaving just udev
From: William Hubbs @ 2012-06-05 17:56 UTC (permalink / raw)
To: linux-hotplug
In-Reply-To: <4FC9B938.6020608@kadzban.is-a-geek.net>
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
Hi Bryan,
On Mon, Jun 04, 2012 at 08:10:28PM -0700, Bryan Kadzban wrote:
> If you want to try to get systemd-tmpfiles to work, and figure out which
> extra dependencies are needed (like, oh for instance, selinux or
> libcap), feel free; that patch shouldn't be too hard to apply on top of
> this one, if this gets committed.
I spoke with Kay on irc, and he expressed doubts that it will be
committed. However, I did get another suggestion from one of the guys
there.
Automake supports includes, so it would be good to break up Makefile.am
into several modules. That way it would be easy to include them based
on condissionals.
I have started breaking things apart, but if you want, I can send you
the patch as I have it so far and we can collaborate on it. :-)
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox