Skip to contentSkip to conversation

Systemd updates

PATCH In review Koen Kooi 3 participants 12 messages Sep 17, 2012 – Sep 18, 2012

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

cover Systemd updates

A big update to systemd v189. Runtime tested on angstrom.

This patchset depends on the bluez updates sent to the oe-core list since bluez uses a deprecated udev API that went away somewhere in between 182 and 189.

Andreas Müller (3):
systemd-systemctl-native: Add additional messages for better
debugging
systemd-systemctl-native: handle ALIAS tag
gdm: do not rely on dev-tty7.device

Denis 'GNUtoo' Carikli (1):
meta-systemd: systemd-systemctl-native: Also add support for
WantedBy=*.service

Koen Kooi (1):
systemd: update to v189

Martin Jansa (1):
systemd-systemctl-native: extend systemctl wrapper to support mask
action

 meta-gnome/recipes-gnome/gdm/gdm/gdm.service       |    3 +-
 meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb         |    2 +-
 .../systemd/systemd-systemctl-native.bb            |    2 +-
 .../systemd/systemd-systemctl-native/systemctl     |   42 +++-
 .../systemd/systemd/format-replace-m-uclibc.patch  |  380 --------------------
 meta-oe/recipes-core/systemd/systemd/gtk-doc.make  |  230 ++++++++++++
 .../recipes-core/systemd/systemd/modprobe.rules    |   17 +
 .../systemd/systemd/paper-over-mkostemp.patch      |   19 -
 .../systemd-pam-configure-check-uclibc.patch       |   26 ++
 .../systemd/systemd/systemd-pam-fix-execvpe.patch  |   29 ++
 .../systemd/systemd-pam-fix-fallocate.patch        |   82 +++++
 .../systemd/systemd-pam-fix-getty-unit.patch       |   35 ++
 .../systemd/systemd/systemd-pam-fix-mkostemp.patch |  166 +++++++++
 .../systemd/systemd/systemd-pam-fix-msformat.patch |  335 +++++++++++++++++
 .../recipes-core/systemd/systemd/touchscreen.rules |   18 +
 .../systemd/systemd/use-rootlibdir.patch           |   94 +++++
 meta-oe/recipes-core/systemd/systemd_git.bb        |  105 +++++-
 17 files changed, 1167 insertions(+), 418 deletions(-)
 delete mode 100644 meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/gtk-doc.make
 create mode 100644 meta-oe/recipes-core/systemd/systemd/modprobe.rules
 delete mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/touchscreen.rules
 create mode 100644 meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
Signature · 1 line
1.7.7.6
author
#1 lore raw

PATCH 1/6 systemd-systemctl-native: Add additional messages for better debugging

From: Andreas Müller <[email protected]>

These messages helped me to fix the breakage of networkmanager/systemd

---
 .../systemd/systemd-systemctl-native.bb            |    2 +-
 .../systemd/systemd-systemctl-native/systemctl     |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native.bb +1 -1
index 78eb8f3..7ca77ae 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r2"
+PR = "r3"
 
 inherit native
 
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +5 -0
index c4a0a3f..46e74e8 100755
@@ -1,4 +1,5 @@
 #!/bin/sh
+echo "Started $0 $*"
 
 ROOT=
 
@@ -42,6 +43,7 @@ while [ $# != 0 ]; do
 done
 
 for service in $services; do
+	echo "Try to find location of $service..."
 	# find service file
 	for p in $ROOT/etc/systemd/system \
 		 $ROOT/lib/systemd/system \
@@ -55,6 +57,7 @@ for service in $services; do
 		echo "'$service' couldn't be found; exiting with error"
 		exit 1
 	fi
+	echo "Found $service in $service_file"
 
 	# create the required symbolic links
 	wanted_by=$(grep WantedBy $ROOT/$service_file \
@@ -63,6 +66,7 @@ for service in $services; do
 		        | grep '\.target$')
 
 	for r in $wanted_by; do
+		echo "WantedBy=$r found in $service"
 		if [ "$action" = "enable" ]; then
 			mkdir -p $ROOT/etc/systemd/system/$r.wants
 			ln -s $service_file $ROOT/etc/systemd/system/$r.wants
@@ -79,6 +83,7 @@ for service in $services; do
 		   | sed 's,Also=,,g' \
 		   | tr ',' '\n')
 	for a in $also; do
+		echo "Also=$a found in $service"
 		if [ "$action" = "enable" ]; then
 			$0 --root=$ROOT enable $a
 		fi
Signature · 1 line
1.7.7.6
author
#2 lore raw

PATCH 2/6 systemd-systemctl-native: extend systemctl wrapper to support mask action

In reply to Koen Kooi

From: Martin Jansa <[email protected]>

---
 .../systemd/systemd-systemctl-native.bb            |    2 +-
 .../systemd/systemd-systemctl-native/systemctl     |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native.bb +1 -1
index 7ca77ae..5f23e98 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r3"
+PR = "r4"
 
 inherit native
 
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +18 -0
index 46e74e8..f74adf6 100755
@@ -25,6 +25,14 @@ while [ $# != 0 ]; do
 			cmd_args="1"
 			shift
 			;;
+		mask)
+			shift
+
+			action="$opt"
+			services="$1"
+			cmd_args="1"
+			shift
+			;;
 		--root=*)
 			ROOT=${opt##--root=}
 			cmd_args="0"
@@ -43,6 +51,16 @@ while [ $# != 0 ]; do
 done
 
 for service in $services; do
+	if [ "$action" = "mask" ]; then
+		if [ ! -d $ROOT/etc/systemd/system/ ]; then
+			mkdir -p $ROOT/etc/systemd/system/
+		fi
+		cmd="ln -s /dev/null $ROOT/etc/systemd/system/$service"
+		echo "$cmd"
+		$cmd
+		exit 0
+	fi
+
 	echo "Try to find location of $service..."
 	# find service file
 	for p in $ROOT/etc/systemd/system \
Signature · 1 line
1.7.7.6
author
#3 lore raw

PATCH 3/6 systemd-systemctl-native: handle ALIAS tag

In reply to Koen Kooi

From: Andreas Müller <[email protected]>

---
 .../systemd/systemd-systemctl-native.bb            |    2 +-
 .../systemd/systemd-systemctl-native/systemctl     |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native.bb +1 -1
index 5f23e98..25ddbda 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r4"
+PR = "r5"
 
 inherit native
 
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +17 -0
index f74adf6..196e729 100755
@@ -96,6 +96,23 @@ for service in $services; do
 		fi
 	done
 
+	# create the required symbolic 'Alias' links
+	alias=$(grep Alias $ROOT/$service_file \
+		        | sed 's,Alias=,,g' \
+		        | tr ',' '\n' \
+		        | grep '\.service$')
+
+	for r in $alias; do
+		if [ "$action" = "enable" ]; then
+			mkdir -p $ROOT/etc/systemd/system
+			ln -s $service_file $ROOT/etc/systemd/system/$r
+			echo "Enabled $service for $alias."
+		else
+			rm -f $ROOT/etc/systemd/system/$r
+			echo "Disabled $service for $alias."
+		fi
+	done
+
 	# call us for the other required scripts
 	also=$(grep Also $ROOT/$service_file \
 		   | sed 's,Also=,,g' \
Signature · 1 line
1.7.7.6
author
#4 lore raw

PATCH 4/6 meta-systemd: systemd-systemctl-native: Also add support for WantedBy=*.service

In reply to Koen Kooi

From: Denis 'GNUtoo' Carikli <[email protected]>

Right now there was only WantedBy=*.target, which prevented some services from beeing installed,
which prevent them from running at boot.

---
 .../systemd/systemd-systemctl-native.bb            |    2 +-
 .../systemd/systemd-systemctl-native/systemctl     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/systemd/systemd-systemctl-native.bb +1 -1
index 25ddbda..5940584 100644
@@ -3,7 +3,7 @@ DESCRIPTION = "Wrapper to enable of systemd services"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
 
-PR = "r5"
+PR = "r6"
 
 inherit native
 
meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +1 -1
index 196e729..6b8832b 100755
@@ -81,7 +81,7 @@ for service in $services; do
 	wanted_by=$(grep WantedBy $ROOT/$service_file \
 		        | sed 's,WantedBy=,,g' \
 		        | tr ',' '\n' \
-		        | grep '\.target$')
+		        | grep '\(\.target$\)\|\(\.service$\)')
 
 	for r in $wanted_by; do
 		echo "WantedBy=$r found in $service"
Signature · 1 line
1.7.7.6
author
#5 lore raw

PATCH 5/6 gdm: do not rely on dev-tty7.device

In reply to Koen Kooi

From: Andreas Müller <[email protected]>

Error message was:

[ TIME ] Timed out waiting for device dev-tty7.device. [DEPEND] Dependency failed for Gnome Display Manager.

run tested on overo/xfce

---
 meta-gnome/recipes-gnome/gdm/gdm/gdm.service |    3 +--
 meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb   |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
meta-gnome/recipes-gnome/gdm/gdm/gdm.service +1 -2
index 72a56f9..dbfc4f8 100644
@@ -1,7 +1,6 @@
 [Unit]
 Description=Gnome Display Manager
-Requires=dev-tty7.device
-After=dev-tty7.device systemd-user-sessions.service
+After=systemd-user-sessions.service
 
 [Service]
 ExecStart=/usr/sbin/gdm -nodaemon
meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb +1 -1
index d71c7d8..6ebd587 100644
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 DEPENDS = "xinput gnome-panel tcp-wrappers libcanberra libxklavier grep consolekit libpam gnome-doc-utils gtk+ xrdb"
 
-PR = "r7"
+PR = "r8"
 
 inherit gnome update-rc.d systemd
 
Signature · 1 line
1.7.7.6
author
#6 lore raw

PATCH 6/6 systemd: update to v189

In reply to Koen Kooi
---
 .../systemd/systemd/format-replace-m-uclibc.patch  |  380 --------------------
 meta-oe/recipes-core/systemd/systemd/gtk-doc.make  |  230 ++++++++++++
 .../recipes-core/systemd/systemd/modprobe.rules    |   17 +
 .../systemd/systemd/paper-over-mkostemp.patch      |   19 -
 .../systemd-pam-configure-check-uclibc.patch       |   26 ++
 .../systemd/systemd/systemd-pam-fix-execvpe.patch  |   29 ++
 .../systemd/systemd-pam-fix-fallocate.patch        |   82 +++++
 .../systemd/systemd-pam-fix-getty-unit.patch       |   35 ++
 .../systemd/systemd/systemd-pam-fix-mkostemp.patch |  166 +++++++++
 .../systemd/systemd/systemd-pam-fix-msformat.patch |  335 +++++++++++++++++
 .../recipes-core/systemd/systemd/touchscreen.rules |   18 +
 .../systemd/systemd/use-rootlibdir.patch           |   94 +++++
 meta-oe/recipes-core/systemd/systemd_git.bb        |  105 +++++-
 13 files changed, 1123 insertions(+), 413 deletions(-)
 delete mode 100644 meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/gtk-doc.make
 create mode 100644 meta-oe/recipes-core/systemd/systemd/modprobe.rules
 delete mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
 create mode 100644 meta-oe/recipes-core/systemd/systemd/touchscreen.rules
 create mode 100644 meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch deleted +0 -380
deleted file mode 100644
index 1c95023..0000000
@@ -1,380 +0,0 @@
-Patch from Henning. %m is a glibc only thing. For uclibc we need to do it
-differently. So we use static strings instead of mallocing them and free'ing
-
-I dont know if upstream systemd have plans to make systemd work on non
-glibc system libraries if not then this patch would not make sense for 
-upstream
-
-Signed-off-by: Khem Raj <[email protected]>
-
-Index: git/src/mount-setup.c
-===================================================================
---- git.orig/src/mount-setup.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/mount-setup.c	2012-01-25 21:59:43.897031326 -0800
-@@ -182,10 +182,10 @@
-         (void) fgets(buf, sizeof(buf), f);
- 
-         for (;;) {
--                char *controller;
-+                char controller[30];
-                 int enabled = 0;
- 
--                if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
-+                if (fscanf(f, "%s %*i %*i %i", controller, &enabled) != 2) {
- 
-                         if (feof(f))
-                                 break;
-@@ -196,14 +196,12 @@
-                 }
- 
-                 if (!enabled) {
--                        free(controller);
-                         continue;
-                 }
- 
-                 r = set_put(controllers, controller);
-                 if (r < 0) {
-                         log_error("Failed to add controller to set.");
--                        free(controller);
-                         goto finish;
-                 }
-         }
-@@ -273,7 +271,6 @@
-                 p.fatal = false;
- 
-                 r = mount_one(&p, true);
--                free(controller);
-                 free(where);
- 
-                 if (r < 0) {
-Index: git/src/socket-util.c
-===================================================================
---- git.orig/src/socket-util.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/socket-util.c	2012-01-25 21:59:43.897031326 -0800
-@@ -192,7 +192,7 @@
- int socket_address_parse_netlink(SocketAddress *a, const char *s) {
-         int family;
-         unsigned group = 0;
--        char* sfamily = NULL;
-+        char sfamily[50];
-         assert(a);
-         assert(s);
- 
-@@ -200,17 +200,14 @@
-         a->type = SOCK_RAW;
- 
-         errno = 0;
--        if (sscanf(s, "%ms %u", &sfamily, &group) < 1)
-+        if (sscanf(s, "%49s %u", &sfamily, &group) < 1)
-                 return errno ? -errno : -EINVAL;
- 
-         if ((family = netlink_family_from_string(sfamily)) < 0)
-                 if (safe_atoi(sfamily, &family) < 0) {
--                        free(sfamily);
-                         return -EINVAL;
-                 }
- 
--        free(sfamily);
--
-         a->sockaddr.nl.nl_family = AF_NETLINK;
-         a->sockaddr.nl.nl_groups = group;
- 
-Index: git/src/swap.c
-===================================================================
---- git.orig/src/swap.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/swap.c	2012-01-25 21:59:43.897031326 -0800
-@@ -1049,11 +1049,12 @@
-         (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n");
- 
-         for (i = 1;; i++) {
--                char *dev = NULL, *d;
-+                char *d;
-+                char dev[20];
-                 int prio = 0, k;
- 
-                 if ((k = fscanf(m->proc_swaps,
--                                "%ms "  /* device/file */
-+                                "%19s "  /* device/file */
-                                 "%*s "  /* type of swap */
-                                 "%*s "  /* swap size */
-                                 "%*s "  /* used */
-@@ -1064,12 +1065,10 @@
-                                 break;
- 
-                         log_warning("Failed to parse /proc/swaps:%u.", i);
--                        free(dev);
-                         continue;
-                 }
- 
-                 d = cunescape(dev);
--                free(dev);
- 
-                 if (!d)
-                         return -ENOMEM;
-Index: git/src/tmpfiles.c
-===================================================================
---- git.orig/src/tmpfiles.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/tmpfiles.c	2012-01-25 22:06:58.649052774 -0800
-@@ -73,8 +73,8 @@
- typedef struct Item {
-         ItemType type;
- 
--        char *path;
--        char *argument;
-+        char path[50];
-+        char argument[50];
-         uid_t uid;
-         gid_t gid;
-         mode_t mode;
-@@ -822,7 +822,6 @@
-         case CREATE_CHAR_DEVICE:
-         case CREATE_BLOCK_DEVICE:
-         case IGNORE_PATH:
--        case RELABEL_PATH:
-         case RECURSIVE_RELABEL_PATH:
-         case WRITE_FILE:
-                 break;
-@@ -858,8 +857,6 @@
- static void item_free(Item *i) {
-         assert(i);
- 
--        free(i->path);
--        free(i->argument);
-         free(i);
- }
- 
-@@ -906,7 +903,7 @@
- 
- static int parse_line(const char *fname, unsigned line, const char *buffer) {
-         Item *i, *existing;
--        char *mode = NULL, *user = NULL, *group = NULL, *age = NULL;
-+        char mode[50], user[50], group[50], age[50];
-         char type;
-         Hashmap *h;
-         int r, n = -1;
-@@ -923,18 +920,18 @@
- 
-         if (sscanf(buffer,
-                    "%c "
--                   "%ms "
--                   "%ms "
--                   "%ms "
--                   "%ms "
--                   "%ms "
-+                   "%s "
-+                   "%s "
-+                   "%s "
-+                   "%s "
-+                   "%s "
-                    "%n",
-                    &type,
-                    &i->path,
--                   &mode,
--                   &user,
--                   &group,
--                   &age,
-+                   mode,
-+                   user,
-+                   group,
-+                   age,
-                    &n) < 2) {
-                 log_error("[%s:%u] Syntax error.", fname, line);
-                 r = -EIO;
-@@ -1096,11 +1093,6 @@
-         r = 0;
- 
- finish:
--        free(user);
--        free(group);
--        free(mode);
--        free(age);
--
-         if (i)
-                 item_free(i);
- 
-Index: git/src/mount.c
-===================================================================
---- git.orig/src/mount.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/mount.c	2012-01-25 21:59:43.901031505 -0800
-@@ -24,6 +24,7 @@
- #include <mntent.h>
- #include <sys/epoll.h>
- #include <signal.h>
-+#include <string.h>
- 
- #include "unit.h"
- #include "mount.h"
-@@ -1561,7 +1562,13 @@
- static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
-         int r = 0;
-         unsigned i;
--        char *device, *path, *options, *options2, *fstype, *d, *p, *o;
-+        char *d, *p, *o;
-+        char device[50];
-+        char path[50];
-+        char options[50];
-+        char options2[50];
-+        char fstype[50];
-+
- 
-         assert(m);
- 
-@@ -1570,26 +1577,26 @@
-         for (i = 1;; i++) {
-                 int k;
- 
--                device = path = options = options2 = fstype = d = p = o = NULL;
-+                d = p = o = NULL;
- 
-                 if ((k = fscanf(m->proc_self_mountinfo,
-                                 "%*s "       /* (1) mount id */
-                                 "%*s "       /* (2) parent id */
-                                 "%*s "       /* (3) major:minor */
-                                 "%*s "       /* (4) root */
--                                "%ms "       /* (5) mount point */
--                                "%ms"        /* (6) mount options */
-+                                "%49s "       /* (5) mount point */
-+                                "%49s"        /* (6) mount options */
-                                 "%*[^-]"     /* (7) optional fields */
-                                 "- "         /* (8) separator */
--                                "%ms "       /* (9) file system type */
--                                "%ms"        /* (10) mount source */
--                                "%ms"        /* (11) mount options 2 */
-+                                "%49s "       /* (9) file system type */
-+                                "%49s"        /* (10) mount source */
-+                                "%49s"        /* (11) mount options 2 */
-                                 "%*[^\n]",   /* some rubbish at the end */
--                                &path,
--                                &options,
--                                &fstype,
--                                &device,
--                                &options2)) != 5) {
-+                                path,
-+                                options,
-+                                fstype,
-+                                device,
-+                                options2)) != 5) {
- 
-                         if (k == EOF)
-                                 break;
-@@ -1613,22 +1620,12 @@
-                         r = k;
- 
- clean_up:
--                free(device);
--                free(path);
--                free(options);
--                free(options2);
--                free(fstype);
-                 free(d);
-                 free(p);
-                 free(o);
-         }
- 
- finish:
--        free(device);
--        free(path);
--        free(options);
--        free(options2);
--        free(fstype);
-         free(d);
-         free(p);
-         free(o);
-Index: git/src/umount.c
-===================================================================
---- git.orig/src/umount.c	2012-01-25 21:27:23.000000000 -0800
-+++ git/src/umount.c	2012-01-25 21:59:43.901031505 -0800
-@@ -60,7 +60,9 @@
- 
- static int mount_points_list_get(MountPoint **head) {
-         FILE *proc_self_mountinfo;
--        char *path, *p;
-+        char *p;
-+        char path[50];
-+
-         unsigned int i;
-         int r;
- 
-@@ -72,17 +74,17 @@
-         for (i = 1;; i++) {
-                 int k;
-                 MountPoint *m;
--                char *root;
-+                char root[50];
-                 bool skip_ro;
- 
--                path = p = NULL;
-+                p = NULL;
- 
-                 if ((k = fscanf(proc_self_mountinfo,
-                                 "%*s "       /* (1) mount id */
-                                 "%*s "       /* (2) parent id */
-                                 "%*s "       /* (3) major:minor */
--                                "%ms "       /* (4) root */
--                                "%ms "       /* (5) mount point */
-+                                "%49s "       /* (4) root */
-+                                "%49s "       /* (5) mount point */
-                                 "%*s"        /* (6) mount options */
-                                 "%*[^-]"     /* (7) optional fields */
-                                 "- "         /* (8) separator */
-@@ -90,24 +92,21 @@
-                                 "%*s"        /* (10) mount source */
-                                 "%*s"        /* (11) mount options 2 */
-                                 "%*[^\n]",   /* some rubbish at the end */
--                                &root,
--                                &path)) != 2) {
-+                                root,
-+                                path)) != 2) {
-                         if (k == EOF)
-                                 break;
- 
-                         log_warning("Failed to parse /proc/self/mountinfo:%u.", i);
- 
--                        free(path);
-                         continue;
-                 }
- 
-                 /* If we encounter a bind mount, don't try to remount
-                  * the source dir too early */
-                 skip_ro = !streq(root, "/");
--                free(root);
- 
-                 p = cunescape(path);
--                free(path);
- 
-                 if (!p) {
-                         r = -ENOMEM;
-@@ -152,28 +151,28 @@
- 
-         for (i = 2;; i++) {
-                 MountPoint *swap;
--                char *dev = NULL, *d;
-+                char *d;
-+                char dev[50];
-+
-                 int k;
- 
-                 if ((k = fscanf(proc_swaps,
--                                "%ms " /* device/file */
-+                                "%50s " /* device/file */
-                                 "%*s " /* type of swap */
-                                 "%*s " /* swap size */
-                                 "%*s " /* used */
-                                 "%*s\n", /* priority */
--                                &dev)) != 1) {
-+                                dev)) != 1) {
- 
-                         if (k == EOF)
-                                 break;
- 
-                         log_warning("Failed to parse /proc/swaps:%u.", i);
- 
--                        free(dev);
-                         continue;
-                 }
- 
-                 if (endswith(dev, "(deleted)")) {
--                        free(dev);
-                         continue;
-                 }
- 
meta-oe/recipes-core/systemd/systemd/gtk-doc.make new file +230 -0

230 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd/modprobe.rules new file +17 -0
new file mode 100644
index 0000000..d4a096b
@@ -0,0 +1,17 @@
+# There are a number of modifiers that are allowed to be used in some
+# of the different fields. They provide the following subsitutions:
+#
+# %n the "kernel number" of the device.
+#    For example, 'sda3' has a "kernel number" of '3'
+# %e the smallest number for that name which does not matches an existing node
+# %k the kernel name for the device
+# %M the kernel major number for the device
+# %m the kernel minor number for the device
+# %b the bus id for the device
+# %c the string returned by the PROGRAM
+# %s{filename} the content of a sysfs attribute
+# %% the '%' char itself
+#
+
+# Try and modprobe for drivers for new hardware
+ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch deleted +0 -19
deleted file mode 100644
index ca10440..0000000
@@ -1,19 +0,0 @@
-uclibc does not have mkostemp() so we redefine it to use mkstemp()
-
-Signed-off-by: Khem Raj <[email protected]>
-
-Index: git/src/macro.h
-===================================================================
---- git.orig/src/macro.h	2011-06-30 10:33:53.000000000 -0700
-+++ git/src/macro.h	2011-06-30 15:07:28.285270006 -0700
-@@ -27,6 +27,10 @@
- #include <sys/uio.h>
- #include <inttypes.h>
- 
-+#ifdef __UCLIBC__
-+/* uclibc does not implement mkostemp GNU extention */
-+#define mkostemp(x,y) mkstemp(x)
-+#endif
- #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
- #define _sentinel_ __attribute__ ((sentinel))
- #define _noreturn_ __attribute__((noreturn))
meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch new file +26 -0
new file mode 100644
index 0000000..1bfc3bd
@@ -0,0 +1,26 @@
+--- systemd-185.orig/configure.ac	2012-06-04 14:15:16.000000000 -0400
++++ systemd-pam-185/configure.ac	2012-06-21 22:57:10.000000000 -0400
+@@ -63,6 +63,23 @@
+ 
+ AC_PATH_PROG([M4], [m4])
+ 
++# check for few functions not implemented in uClibc
++
++AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
++
++# check for %ms format support - assume always no if cross compiling
++
++AC_MSG_CHECKING([whether %ms format is supported by *scanf])
++
++AC_RUN_IFELSE(
++	[AC_LANG_PROGRAM([[ include <stdio.h> ]],
++			[[ char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
++			   int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
++			   return (rc==3)?0:1;]])],
++	[AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
++	[AC_MSG_RESULT([no])],
++	[AC_MSG_RESULT([no])])
++
+ # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
+ m4_ifdef([GTK_DOC_CHECK], [
+ GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch new file +29 -0
new file mode 100644
index 0000000..ea8b3ff
@@ -0,0 +1,29 @@
+--- systemd-pam-185/src/nspawn/nspawn.c.orig	2012-06-21 05:31:24.000000000 -0400
++++ systemd-pam-185/src/nspawn/nspawn.c	2012-06-21 05:29:50.000000000 -0400
+@@ -61,6 +61,8 @@
+ #include "path-util.h"
+ #include "loopback-setup.h"
+ 
++#include "config.h"
++
+ static char *arg_directory = NULL;
+ static char *arg_user = NULL;
+ static char **arg_controllers = NULL;
+@@ -1315,9 +1317,14 @@
+ 
+                         a[0] = (char*) "/sbin/init";
+                         execve(a[0], a, (char**) envp);
+-                } else if (argc > optind)
+-                        execvpe(argv[optind], argv + optind, (char**) envp);
+-                else {
++                } else if (argc > optind) {
++#ifdef HAVE_EXECVPE
++			execvpe(argv[optind], argv + optind, (char**) envp);
++#else
++			environ = (char **)envp;
++			execvp(argv[optind], argv + optind);
++#endif	/* HAVE_EXECVPE */
++		} else {
+                         chdir(home ? home : "/root");
+                         execle("/bin/bash", "-bash", NULL, (char**) envp);
+                 }
meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch new file +82 -0

82 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch new file +35 -0
new file mode 100644
index 0000000..3e5ea71
@@ -0,0 +1,35 @@
+Prefer getty to agetty in console setup systemd units
+
+Signed-off-by: Maxime Ripard <[email protected]>
+---
+ units/[email protected]        |    2 +-
+ units/[email protected] |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: systemd-37/units/[email protected]
+===================================================================
+--- systemd-37.orig/units/[email protected]
++++ systemd-37/units/[email protected]
+@@ -41,7 +41,7 @@
+ 
+ [Service]
+ Environment=TERM=linux
+ # the VT is cleared by TTYVTDisallocate
+-ExecStart=-/sbin/agetty --noclear %I 38400
++ExecStart=-/sbin/getty -L %I 115200 linux
+ Type=idle
+ Restart=always
+ RestartSec=0
+Index: systemd-37/units/[email protected]
+===================================================================
+--- systemd-37.orig/units/[email protected]
++++ systemd-37/units/[email protected]
+@@ -37,7 +37,7 @@
+ 
+ [Service]
+ Environment=TERM=vt102
+-ExecStart=-/sbin/agetty -s %I 115200,38400,9600
++ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
+ Restart=always
+ RestartSec=0
meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch new file +166 -0

166 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch new file +335 -0

335 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd/touchscreen.rules new file +18 -0
new file mode 100644
index 0000000..d83fd16
@@ -0,0 +1,18 @@
+# There are a number of modifiers that are allowed to be used in some
+# of the different fields. They provide the following subsitutions:
+#
+# %n the "kernel number" of the device.
+#    For example, 'sda3' has a "kernel number" of '3'
+# %e the smallest number for that name which does not matches an existing node
+# %k the kernel name for the device
+# %M the kernel major number for the device
+# %m the kernel minor number for the device
+# %b the bus id for the device
+# %c the string returned by the PROGRAM
+# %s{filename} the content of a sysfs attribute
+# %% the '%' char itself
+#
+
+# Create a symlink to any touchscreen input device
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
+SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch new file +94 -0

94 lines not on this page · raw message

meta-oe/recipes-core/systemd/systemd_git.bb +91 -14

174 lines not on this page · raw message

Signature · 1 line
1.7.7.6
#7 lore raw
In reply to Koen Kooi
Quoted 3 lines · Koen Kooi

A big update to systemd v189. Runtime tested on angstrom.

This patchset depends on the bluez updates sent to the oe-core list since bluez uses a deprecated udev API that went away somewhere in between 182 and 189.

This is a too big update for a stable branch in my point of view.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#8 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-09-12 15:13, Otavio Salvador schreef:

Quoted 9 lines
Quoted 5 lines · Koen Kooi

A big update to systemd v189. Runtime tested on angstrom.

This patchset depends on the bluez updates sent to the oe-core list since bluez uses a deprecated udev API that went away somewhere in between 182 and 189.

This is a too big update for a stable branch in my point of view.

It however is the only sane way to fix all the bugs users have reported with system v44. I stopped with backporting patches after the stack grew to 30+ patches.

So what's your plan for getting the systemd bugs fixed in this branch?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQVyU0MkyGM64RGpERAhdKAJ4q1oqH4fKmnJybuBW+AM1MO3+P8ACcDN8Z PzJwU9L8SY0kjTUUOJ199aA=
=jw6F
-----END PGP SIGNATURE-----

#9 lore raw
Quoted 12 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-09-12 15:13, Otavio Salvador schreef:

Quoted 8 lines
Quoted 5 lines · Koen Kooi

A big update to systemd v189. Runtime tested on angstrom.

This patchset depends on the bluez updates sent to the oe-core list since bluez uses a deprecated udev API that went away somewhere in between 182 and 189.

Quoted 7 lines
Quoted 1 line

This is a too big update for a stable branch in my point of view.

It however is the only sane way to fix all the bugs users have reported with system v44. I stopped with backporting patches after the stack grew to 30+ patches.

So what's your plan for getting the systemd bugs fixed in this branch?

I think the backport is the only option; how you tested it against regressions?

Seriously I'd love a new systemd version in denzil but the risk seems too high

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#10 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-09-12 15:31, Otavio Salvador schreef:

Quoted 15 lines
Quoted 13 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Op 17-09-12 15:13, Otavio Salvador schreef:

Quoted 9 lines
Quoted 5 lines · Koen Kooi

A big update to systemd v189. Runtime tested on angstrom.

This patchset depends on the bluez updates sent to the oe-core list since bluez uses a deprecated udev API that went away somewhere in between 182 and 189.

This is a too big update for a stable branch in my point of view.

Quoted 7 lines
Quoted 5 lines

It however is the only sane way to fix all the bugs users have reported with system v44. I stopped with backporting patches after the stack grew to 30+ patches.

So what's your plan for getting the systemd bugs fixed in this branch?

I think the backport is the only option;

I trust upstream releases more than my ability to do backports TBH

Quoted 1 line

how you tested it against regressions?

By running the same production tests as always. Bootup, shutdown, GUI, adding services, removing them, inspecting the logs, things like that. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQV1lSMkyGM64RGpERAuBtAKCFzScChycnk3CG9XYEffGeubRqiACeMb1j v0is/KhDzrIQtORpLSBqJlg=
=8jRm
-----END PGP SIGNATURE-----

#11 lore raw
Quoted 5 lines · Koen Kooi
Quoted 2 lines

how you tested it against regressions?

By running the same production tests as always. Bootup, shutdown, GUI, adding services, removing them, inspecting the logs, things like that.

One word of warning. I am using meta-oe's version of systemd (v189) and the journald process easily grows to 189MB virtual size within seconds on my system. I only see VSZ as busybox's top does not show RSS.

holger