Commit 2c66e442 authored by eric.le.bihan.dev@free.fr's avatar eric.le.bihan.dev@free.fr Committed by Peter Korsgaard
Browse files

systemd: bump to v207



This patch bumps systemd to v207 but also declares it as a provider for the
udev virtual package.

Starting with systemd 183, udev has been merged into
systemd. The udev daemon is now installed as /lib/systemd/systemd-udevd.
This means that /dev management using udev is only available if systemd
is chosen as init system.

When configuring systemd, the following options are available:

- activation of systemd-journal-gatewayd, to access the journal via
  HTTP.
- activation of extra features like journal compression and sealing.

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the
  programs included in Systemd. So using glibc does not matter.

Signed-off-by: default avatarEric Le Bihan <eric.le.bihan.dev@free.fr>
Reviewed-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent fabcb119
Loading
Loading
Loading
Loading
+25 −16
Original line number Diff line number Diff line
@@ -106,11 +106,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
	select BR2_LEGACY
	help
	  The 'udev' package has been converted to a virtual package.
	  There is currently one provider for this feature: 'eudev'.
	  The providers for this feature are: 'eudev', 'systemd'.

	  Therefore, you must choose 'Dynamic using eudev' in the
	  '/dev management' menu to get the same behaviour as in your
	   old configuration.
	  Therefore, if you are not using 'systemd' as init system, you
	  must choose 'Dynamic using eudev' in the '/dev management'
	  menu to get the same behaviour as in your old configuration.

	  If you are using 'systemd', its internal implementation of
	  'udev' will be used automatically.

	  You must also check the packages depending on 'udev' are still
	  selected.
@@ -121,35 +124,41 @@ config BR2_PACKAGE_UDEV
	select BR2_PACKAGE_HAS_UDEV
	help
	  The 'udev' package has been converted to a virtual package.
	  There is currently one provider for this feature: 'eudev'.
	  The providers for this feature are: 'eudev', 'systemd'.

	  Your old configuration refers to packages depending on 'udev',
	  either for build or at runtime.

	  Check that a 'udev' provider is selected, i.e. that 'eudev' is
	  selected, which is the case if '/dev management' is set to
	  'Dynamic using eudev'.
	  Check that a 'udev' provider is selected. If you are not using
	  'systemd' as init system, 'eudev' should be selected, which is
	  the case if '/dev management' is set to 'Dynamic using eudev'.

	  If you are using 'systemd', its internal implementation of 'udev'
	  is used.

config BR2_PACKAGE_UDEV_RULES_GEN
	bool "udev rules generation handled by eudev"
	bool "udev rules generation handled by provider"
	select BR2_LEGACY
	select BR2_PACKAGE_EUDEV
	select BR2_PACKAGE_EUDEV_RULES_GEN
	select BR2_PACKAGE_EUDEV if !BR2_INIT_SYSTEMD
	select BR2_PACKAGE_EUDEV_RULES_GEN if !BR2_INIT_SYSTEMD
	help
	  The 'udev' package has been converted to a virtual package.
	  There is currently one provider for this feature: 'eudev'.
	  The providers for this feature are: 'eudev', 'systemd'.

	  udev rules generation will now be handled by 'eudev'.
	  If you are not using 'systemd' as init system, udev rules
	  generation will be handled by 'eudev'. Check that
	  '/dev management' is set to 'Dynamic using eudev' to get
	  the same behaviour as in your old configuration.

	  Check that '/dev management' is set to 'Dynamic using eudev'
	  to get the same behaviour as in your old configuration.
	  If you are using 'systemd', it internal implementation of 'udev'
	  will generate the rules.

config BR2_PACKAGE_UDEV_ALL_EXTRAS
	bool "udev extras removed"
	select BR2_LEGACY
	help
	  The 'udev' package has been converted to a virtual package.
	  There is currently one provider for this feature: 'eudev'.
	  The providers for this feature are: 'eudev', 'systemd'.

	  The option to enable the extra features of 'udev' (gudev, ...)
	  has been removed. These features are automatically enabled in
+2 −1
Original line number Diff line number Diff line
@@ -194,7 +194,8 @@ define LINUX_CONFIGURE_CMDS
		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
	$(if $(BR2_PACKAGE_SYSTEMD),
		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config))
		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
	yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
+42 −5
Original line number Diff line number Diff line
config BR2_PACKAGE_SYSTEMD
	bool "systemd"
	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
	depends on BR2_INIT_SYSTEMD
	depends on !BR2_avr32 # no epoll_create1
	depends on BR2_LARGEFILE # util-linux
	depends on BR2_USE_WCHAR # util-linux
	depends on BR2_INET_IPV6
	depends on !BR2_PREFER_STATIC_LIB # kmod
	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
	depends on BR2_USE_MMU # dbus
	select BR2_PACKAGE_HAS_UDEV
	select BR2_PACKAGE_DBUS
	select BR2_PACKAGE_LIBCAP
	select BR2_PACKAGE_UTIL_LINUX
	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
	select BR2_PACKAGE_KMOD
	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
	select BR2_PACKAGE_KMOD_TOOLS
	help
	  systemd is a system and service manager for Linux, compatible with
	  SysV and LSB init scripts. systemd provides aggressive parallelization
@@ -16,9 +26,36 @@ config BR2_PACKAGE_SYSTEMD
	  elaborate transactional dependency-based service control logic.
	  It can work as a drop-in replacement for sysvinit.

	  Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
	  tmpfs vfs and tmpfs POSIX ACL enabled.

	  Systemd also provides udev, the userspace device daemon.

	  The selection of other packages will enable some features:

	  - libglib2 package will add support for gudev.
	  - acl package will add support for multi-seat.

	  http://freedesktop.org/wiki/Software/systemd

comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
	depends on BR2_USE_MMU
	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
		!BR2_TOOLCHAIN_HAS_THREADS
if BR2_PACKAGE_SYSTEMD

config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
	bool "enable all extras"
	select BR2_PACKAGE_XZ
	select BR2_PACKAGE_LIBGCRYPT
	help
	  Enable extra features for Systemd: journal compression and
	  signing.

config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
	bool "HTTP server for journal events"
	select BR2_PACKAGE_LIBMICROHTTPD
	help
	  systemd-journal-gatewayd serves journal events over the
	  network. Clients must connect using HTTP. The server
	  listens on port 19531 by default.

	  http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html

endif
+17 −19
Original line number Diff line number Diff line
Prefer getty to agetty in console setup systemd units

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 units/getty@.service.m4        |    2 +-
 units/serial-getty@.service.m4 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: systemd-37/units/getty@.service.m4
Index: systemd-206/units/getty@.service.m4
===================================================================
--- systemd-37.orig/units/getty@.service.m4
+++ systemd-37/units/getty@.service.m4
@@ -32,7 +32,7 @@
--- systemd-206.orig/units/getty@.service.m4	2013-07-22 00:43:28.000000000 +0200
+++ systemd-206/units/getty@.service.m4	2013-09-18 10:20:17.000000000 +0200
@@ -27,7 +27,7 @@

 [Service]
 Environment=TERM=linux
-ExecStart=-/sbin/agetty %I 38400
 # the VT is cleared by TTYVTDisallocate
-ExecStart=-/sbin/agetty --noclear %I
+ExecStart=-/sbin/getty -L %I 115200 vt100
 Type=idle
 Restart=always
 RestartSec=0
 UtmpIdentifier=%I
Index: systemd-37/units/serial-getty@.service.m4
Index: systemd-206/units/serial-getty@.service.m4
===================================================================
--- systemd-37.orig/units/serial-getty@.service.m4
+++ systemd-37/units/serial-getty@.service.m4
@@ -32,7 +32,7 @@
--- systemd-206.orig/units/serial-getty@.service.m4	2013-07-22 00:43:28.000000000 +0200
+++ systemd-206/units/serial-getty@.service.m4	2013-09-18 10:21:31.000000000 +0200
@@ -22,7 +22,7 @@
 IgnoreOnIsolate=yes

 [Service]
 Environment=TERM=vt100
-ExecStart=-/sbin/agetty -s %I 115200,38400,9600
-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
+ExecStart=-/sbin/getty -L %I 115200 vt100
 Type=idle
 Restart=always
 RestartSec=0
 UtmpIdentifier=%I
+0 −43
Original line number Diff line number Diff line
commit 7264278fbbdc1dc6c30fedc902d1337594aa6ff6
Author: Lennart Poettering <lennart@poettering.net>
Date:   Wed Mar 21 23:47:44 2012 +0100

    journal: PAGE_SIZE is not known on ppc and other archs
    
    Let's use NAME_MAX, as suggested by Dan Walsh

diff --git a/src/journal/journald.c b/src/journal/journald.c
index d27cb60..87390bd 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -29,7 +29,6 @@
 #include <sys/ioctl.h>
 #include <linux/sockios.h>
 #include <sys/statvfs.h>
-#include <sys/user.h>
 
 #include <systemd/sd-journal.h>
 #include <systemd/sd-login.h>
@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) {
                         size_t label_len = 0;
                         union {
                                 struct cmsghdr cmsghdr;
+
+                                /* We use NAME_MAX space for the
+                                 * SELinux label here. The kernel
+                                 * currently enforces no limit, but
+                                 * according to suggestions from the
+                                 * SELinux people this will change and
+                                 * it will probably be identical to
+                                 * NAME_MAX. For now we use that, but
+                                 * this should be updated one day when
+                                 * the final limit is known.*/
                                 uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
                                             CMSG_SPACE(sizeof(struct timeval)) +
-                                            CMSG_SPACE(sizeof(int)) +
-                                            CMSG_SPACE(PAGE_SIZE)]; /* selinux label */
+                                            CMSG_SPACE(sizeof(int)) + /* fd */
+                                            CMSG_SPACE(NAME_MAX)]; /* selinux label */
                         } control;
                         ssize_t n;
                         int v;
Loading