* [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189
@ 2012-12-24 12:26 Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 2/3] systemd: recover previous _git recipe Eric Bénard
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Eric Bénard @ 2012-12-24 12:26 UTC (permalink / raw)
To: openembedded-devel; +Cc: koen, Eric Bénard
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
.../recipes-core/systemd/{systemd => systemd-v189}/gtk-doc.make | 0
.../recipes-core/systemd/{systemd => systemd-v189}/modprobe.rules | 0
.../systemd-pam-configure-check-uclibc.patch | 0
.../{systemd => systemd-v189}/systemd-pam-fix-execvpe.patch | 0
.../{systemd => systemd-v189}/systemd-pam-fix-fallocate.patch | 0
.../{systemd => systemd-v189}/systemd-pam-fix-getty-unit.patch | 0
.../{systemd => systemd-v189}/systemd-pam-fix-mkostemp.patch | 0
.../{systemd => systemd-v189}/systemd-pam-fix-msformat.patch | 0
.../systemd/{systemd => systemd-v189}/touchscreen.rules | 0
.../systemd/{systemd => systemd-v189}/use-rootlibdir.patch | 0
meta-oe/recipes-core/systemd/systemd-v189/var-run.conf | 4 ++++
meta-oe/recipes-core/systemd/{systemd_git.bb => systemd_v189.bb} | 4 ----
12 files changed, 4 insertions(+), 4 deletions(-)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/gtk-doc.make (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/modprobe.rules (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-configure-check-uclibc.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-execvpe.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-fallocate.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-getty-unit.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-mkostemp.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-msformat.patch (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/touchscreen.rules (100%)
rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/use-rootlibdir.patch (100%)
create mode 100644 meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
rename meta-oe/recipes-core/systemd/{systemd_git.bb => systemd_v189.bb} (99%)
diff --git a/meta-oe/recipes-core/systemd/systemd/gtk-doc.make b/meta-oe/recipes-core/systemd/systemd-v189/gtk-doc.make
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/gtk-doc.make
rename to meta-oe/recipes-core/systemd/systemd-v189/gtk-doc.make
diff --git a/meta-oe/recipes-core/systemd/systemd/modprobe.rules b/meta-oe/recipes-core/systemd/systemd-v189/modprobe.rules
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/modprobe.rules
rename to meta-oe/recipes-core/systemd/systemd-v189/modprobe.rules
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-configure-check-uclibc.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-configure-check-uclibc.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-execvpe.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-execvpe.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-fallocate.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-fallocate.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-getty-unit.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-getty-unit.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-mkostemp.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-mkostemp.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-msformat.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-msformat.patch
diff --git a/meta-oe/recipes-core/systemd/systemd/touchscreen.rules b/meta-oe/recipes-core/systemd/systemd-v189/touchscreen.rules
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/touchscreen.rules
rename to meta-oe/recipes-core/systemd/systemd-v189/touchscreen.rules
diff --git a/meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch b/meta-oe/recipes-core/systemd/systemd-v189/use-rootlibdir.patch
similarity index 100%
rename from meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
rename to meta-oe/recipes-core/systemd/systemd-v189/use-rootlibdir.patch
diff --git a/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf b/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
new file mode 100644
index 0000000..c2c18e2
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
@@ -0,0 +1,4 @@
+# empty /var/run
+R /var/run/* - - - - -
+# systemd-update-utmp-runlevel.service fails to start without this
+f /var/run/utmp 0644 root root - -
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_v189.bb
similarity index 99%
rename from meta-oe/recipes-core/systemd/systemd_git.bb
rename to meta-oe/recipes-core/systemd/systemd_v189.bb
index 712ec79..613f703 100644
--- a/meta-oe/recipes-core/systemd/systemd_git.bb
+++ b/meta-oe/recipes-core/systemd/systemd_v189.bb
@@ -15,10 +15,6 @@ SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
SECTION = "base/shell"
-inherit gitpkgv
-PKGV = "v${GITPKGVTAG}"
-
-PV = "git"
PR = "r6"
inherit useradd pkgconfig autotools perlnative
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [meta-oe][PATCH for denzil 2/3] systemd: recover previous _git recipe
2012-12-24 12:26 [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Eric Bénard
@ 2012-12-24 12:26 ` Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1 Eric Bénard
2012-12-24 12:48 ` [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Koen Kooi
2 siblings, 0 replies; 5+ messages in thread
From: Eric Bénard @ 2012-12-24 12:26 UTC (permalink / raw)
To: openembedded-devel; +Cc: koen, Eric Bénard
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
.../systemd/systemd/format-replace-m-uclibc.patch | 380 ++++++++++++++++++++
.../systemd/systemd/paper-over-mkostemp.patch | 19 +
meta-oe/recipes-core/systemd/systemd_git.bb | 161 +++++++++
3 files changed, 560 insertions(+)
create mode 100644 meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
create mode 100644 meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
create mode 100644 meta-oe/recipes-core/systemd/systemd_git.bb
diff --git a/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch b/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
new file mode 100644
index 0000000..1c95023
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch
@@ -0,0 +1,380 @@
+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 <raj.khem@gmail.com>
+
+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;
+ }
+
diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
new file mode 100644
index 0000000..ca10440
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
@@ -0,0 +1,19 @@
+uclibc does not have mkostemp() so we redefine it to use mkstemp()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+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))
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb
new file mode 100644
index 0000000..fd10aa7
--- /dev/null
+++ b/meta-oe/recipes-core/systemd/systemd_git.bb
@@ -0,0 +1,161 @@
+DESCRIPTION = "Systemd a init replacement"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline udev dbus libcap libcgroup tcp-wrappers"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+DEFAULT_PREFERENCE = "2"
+
+SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
+
+SECTION = "base/shell"
+
+inherit gitpkgv
+PKGV = "v${GITPKGVTAG}"
+
+PV = "git"
+PR = "r28"
+
+inherit useradd pkgconfig autotools vala perlnative
+
+SRCREV = "3eff4208ffecedd778fec260f0d4b18e94dab443"
+
+SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
+ ${UCLIBCPATCHES} \
+ file://var-run.conf \
+ "
+UCLIBCPATCHES = ""
+UCLIBCPATCHES_libc-uclibc = "file://paper-over-mkostemp.patch \
+ file://format-replace-m-uclibc.patch \
+ "
+
+LDFLAGS_libc-uclibc_append = " -lrt"
+
+S = "${WORKDIR}/git"
+
+SYSTEMDDISTRO ?= "debian"
+SYSTEMDDISTRO_angstrom = "angstrom"
+
+# The gtk+ tools should get built as a separate recipe e.g. systemd-tools
+EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
+ --with-rootprefix=${base_prefix} \
+ --with-rootlibdir=${base_libdir} \
+ ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
+ --disable-gtk \
+ --enable-xz \
+ --disable-manpages \
+ --disable-coredump \
+ "
+
+# There's no docbook-xsl-native, so for the xsltproc check to false
+do_configure_prepend() {
+ sed -i /xsltproc/d configure.ac
+
+ # we only have /home/root, not /root
+ sed -i -e 's:=/root:=/home/root:g' units/*.service*
+}
+
+do_install() {
+ autotools_do_install
+ # provided by a seperate recipe
+ rm ${D}${systemd_unitdir}/system/serial-getty* -f
+
+ # provide support for initramfs
+ ln -s ${systemd_unitdir}/systemd ${D}/init
+
+ # create dir for journal
+ install -d ${D}${localstatedir}/log/journal
+
+ # create machine-id
+ # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+ touch ${D}${sysconfdir}/machine-id
+
+ install -m 0644 ${WORKDIR}/var-run.conf ${D}${sysconfdir}/tmpfiles.d/
+}
+
+python populate_packages_prepend (){
+ systemdlibdir = d.getVar("base_libdir", True)
+ do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r lock"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+RDEPENDS_${PN}-analyze = "python-dbus"
+RRECOMMENDS_${PN}-analyze = "python-pycairo"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
+ ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+ ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts"
+
+FILES_${PN} = " ${base_bindir}/* \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/polkit-1 \
+ ${datadir}/${PN} \
+ ${sysconfdir} \
+ ${systemd_unitdir}/* \
+ ${systemd_unitdir}/system/* \
+ ${base_libdir}/udev/rules.d \
+ ${base_libdir}/security/*.so \
+ /cgroup \
+ ${bindir}/systemd* \
+ ${libdir}/tmpfiles.d/*.conf \
+ ${libdir}/systemd \
+ ${libdir}/binfmt.d \
+ ${libdir}/modules-load.d \
+ ${libdir}/sysctl.d \
+ ${localstatedir} \
+ ${libexecdir} \
+ "
+
+FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/"
+
+RDEPENDS_${PN} += "dbus-systemd udev-systemd"
+
+# kbd -> loadkeys,setfont
+# systemd calls 'modprobe -sab --', which busybox doesn't support due to lack
+# of blacklist support, so use proper modprobe from module-init-tools
+# And pull in the kernel modules mentioned in INSTALL
+# swapon -p is also not supported by busybox
+# busybox mount is broken
+RRECOMMENDS_${PN} += "systemd-serialgetty \
+ util-linux-agetty \
+ util-linux-swaponoff \
+ util-linux-fsck e2fsprogs-e2fsck \
+ module-init-tools \
+ util-linux-mount util-linux-umount \
+ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+"
+
+# TODO:
+# u-a for runlevel and telinit
+
+pkg_postinst_systemd () {
+update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300
+update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
+update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
+update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
+update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
+}
+
+pkg_prerm_systemd () {
+update-alternatives --remove init ${systemd_unitdir}/systemd
+update-alternatives --remove halt ${base_bindir}/systemctl
+update-alternatives --remove reboot ${base_bindir}/systemctl
+update-alternatives --remove shutdown ${base_bindir}/systemctl
+update-alternatives --remove poweroff ${base_bindir}/systemctl
+}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1
2012-12-24 12:26 [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 2/3] systemd: recover previous _git recipe Eric Bénard
@ 2012-12-24 12:26 ` Eric Bénard
2012-12-24 12:48 ` Koen Kooi
2012-12-24 12:48 ` [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Koen Kooi
2 siblings, 1 reply; 5+ messages in thread
From: Eric Bénard @ 2012-12-24 12:26 UTC (permalink / raw)
To: openembedded-devel; +Cc: koen, Eric Bénard
now users have the choice :
* keep the old behaviour when not using systemd :
PREFERRED_PROVIDER_udev = "udev"
* switch to systemd (while keeping upgrade path) :
PREFERRED_PROVIDER_udev = "systemd"
PREFFERED_VERSION_systemd = "v189"
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
meta-oe/recipes-core/systemd/systemd_v189.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta-oe/recipes-core/systemd/systemd_v189.bb b/meta-oe/recipes-core/systemd/systemd_v189.bb
index 613f703..633e542 100644
--- a/meta-oe/recipes-core/systemd/systemd_v189.bb
+++ b/meta-oe/recipes-core/systemd/systemd_v189.bb
@@ -8,6 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
PROVIDES = "udev"
+DEFAULT_PREFERENCE = "-1"
+
DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers usbutils glib-2.0 libgcrypt"
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1 Eric Bénard
@ 2012-12-24 12:48 ` Koen Kooi
0 siblings, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2012-12-24 12:48 UTC (permalink / raw)
To: Eric Bénard; +Cc: openembedded-devel
Awesome solution!
Op 24 dec. 2012, om 13:26 heeft Eric Bénard <eric@eukrea.com> het volgende geschreven:
> now users have the choice :
> * keep the old behaviour when not using systemd :
> PREFERRED_PROVIDER_udev = "udev"
> * switch to systemd (while keeping upgrade path) :
> PREFERRED_PROVIDER_udev = "systemd"
> PREFFERED_VERSION_systemd = "v189"
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> meta-oe/recipes-core/systemd/systemd_v189.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta-oe/recipes-core/systemd/systemd_v189.bb b/meta-oe/recipes-core/systemd/systemd_v189.bb
> index 613f703..633e542 100644
> --- a/meta-oe/recipes-core/systemd/systemd_v189.bb
> +++ b/meta-oe/recipes-core/systemd/systemd_v189.bb
> @@ -8,6 +8,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
>
> PROVIDES = "udev"
>
> +DEFAULT_PREFERENCE = "-1"
> +
> DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers usbutils glib-2.0 libgcrypt"
> DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
>
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189
2012-12-24 12:26 [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 2/3] systemd: recover previous _git recipe Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1 Eric Bénard
@ 2012-12-24 12:48 ` Koen Kooi
2 siblings, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2012-12-24 12:48 UTC (permalink / raw)
To: Eric Bénard; +Cc: openembedded-devel
Op 24 dec. 2012, om 13:26 heeft Eric Bénard <eric@eukrea.com> het volgende geschreven:
> Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> .../recipes-core/systemd/{systemd => systemd-v189}/gtk-doc.make | 0
> .../recipes-core/systemd/{systemd => systemd-v189}/modprobe.rules | 0
> .../systemd-pam-configure-check-uclibc.patch | 0
> .../{systemd => systemd-v189}/systemd-pam-fix-execvpe.patch | 0
> .../{systemd => systemd-v189}/systemd-pam-fix-fallocate.patch | 0
> .../{systemd => systemd-v189}/systemd-pam-fix-getty-unit.patch | 0
> .../{systemd => systemd-v189}/systemd-pam-fix-mkostemp.patch | 0
> .../{systemd => systemd-v189}/systemd-pam-fix-msformat.patch | 0
> .../systemd/{systemd => systemd-v189}/touchscreen.rules | 0
> .../systemd/{systemd => systemd-v189}/use-rootlibdir.patch | 0
> meta-oe/recipes-core/systemd/systemd-v189/var-run.conf | 4 ++++
> meta-oe/recipes-core/systemd/{systemd_git.bb => systemd_v189.bb} | 4 ----
> 12 files changed, 4 insertions(+), 4 deletions(-)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/gtk-doc.make (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/modprobe.rules (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-configure-check-uclibc.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-execvpe.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-fallocate.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-getty-unit.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-mkostemp.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/systemd-pam-fix-msformat.patch (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/touchscreen.rules (100%)
> rename meta-oe/recipes-core/systemd/{systemd => systemd-v189}/use-rootlibdir.patch (100%)
> create mode 100644 meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
> rename meta-oe/recipes-core/systemd/{systemd_git.bb => systemd_v189.bb} (99%)
>
> diff --git a/meta-oe/recipes-core/systemd/systemd/gtk-doc.make b/meta-oe/recipes-core/systemd/systemd-v189/gtk-doc.make
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/gtk-doc.make
> rename to meta-oe/recipes-core/systemd/systemd-v189/gtk-doc.make
> diff --git a/meta-oe/recipes-core/systemd/systemd/modprobe.rules b/meta-oe/recipes-core/systemd/systemd-v189/modprobe.rules
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/modprobe.rules
> rename to meta-oe/recipes-core/systemd/systemd-v189/modprobe.rules
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-configure-check-uclibc.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-configure-check-uclibc.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-execvpe.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-execvpe.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-fallocate.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-fallocate.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-getty-unit.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-getty-unit.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-mkostemp.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-mkostemp.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch b/meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-msformat.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/systemd-pam-fix-msformat.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/systemd-pam-fix-msformat.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd/touchscreen.rules b/meta-oe/recipes-core/systemd/systemd-v189/touchscreen.rules
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/touchscreen.rules
> rename to meta-oe/recipes-core/systemd/systemd-v189/touchscreen.rules
> diff --git a/meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch b/meta-oe/recipes-core/systemd/systemd-v189/use-rootlibdir.patch
> similarity index 100%
> rename from meta-oe/recipes-core/systemd/systemd/use-rootlibdir.patch
> rename to meta-oe/recipes-core/systemd/systemd-v189/use-rootlibdir.patch
> diff --git a/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf b/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
> new file mode 100644
> index 0000000..c2c18e2
> --- /dev/null
> +++ b/meta-oe/recipes-core/systemd/systemd-v189/var-run.conf
> @@ -0,0 +1,4 @@
> +# empty /var/run
> +R /var/run/* - - - - -
> +# systemd-update-utmp-runlevel.service fails to start without this
> +f /var/run/utmp 0644 root root - -
> diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_v189.bb
> similarity index 99%
> rename from meta-oe/recipes-core/systemd/systemd_git.bb
> rename to meta-oe/recipes-core/systemd/systemd_v189.bb
> index 712ec79..613f703 100644
> --- a/meta-oe/recipes-core/systemd/systemd_git.bb
> +++ b/meta-oe/recipes-core/systemd/systemd_v189.bb
> @@ -15,10 +15,6 @@ SERIAL_CONSOLE ?= "115200 /dev/ttyS0"
>
> SECTION = "base/shell"
>
> -inherit gitpkgv
> -PKGV = "v${GITPKGVTAG}"
> -
> -PV = "git"
> PR = "r6"
>
> inherit useradd pkgconfig autotools perlnative
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-24 13:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-24 12:26 [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 2/3] systemd: recover previous _git recipe Eric Bénard
2012-12-24 12:26 ` [meta-oe][PATCH for denzil 3/3] systemd_v189: add D_P=-1 Eric Bénard
2012-12-24 12:48 ` Koen Kooi
2012-12-24 12:48 ` [meta-oe][PATCH for denzil 1/3] systemd: move _git to _v189 Koen Kooi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox