summaryrefslogtreecommitdiffstats
path: root/meta-systemd/recipes-core
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-11-22 20:20:25 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2012-12-14 13:09:34 +0100
commitda9e2d4a115cc94efba7f0b833ca782d7ed8e89c (patch)
tree0438e3a7ba3b8ed8663197549939f70671223e62 /meta-systemd/recipes-core
parent03d3a7f75d79755d426a8197779c462c021b9329 (diff)
downloadmeta-openembedded-da9e2d4a115cc94efba7f0b833ca782d7ed8e89c.tar.gz
systemd: update to v196
Systemd-analyze has 2 reverts to keep it working with the python currently present in OE-core The LGPLv2.1 was update to the latest text from gnu.org, so match checksum to that. Runtime tested on beaglebone/angstrom and soekris-net6501/angstrom Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-systemd/recipes-core')
-rw-r--r--meta-systemd/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch103
-rw-r--r--meta-systemd/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch91
-rw-r--r--meta-systemd/recipes-core/systemd/systemd/use-rootlibdir.patch107
-rw-r--r--meta-systemd/recipes-core/systemd/systemd_git.bb12
4 files changed, 201 insertions, 112 deletions
diff --git a/meta-systemd/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch b/meta-systemd/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch
new file mode 100644
index 000000000..7de2705ac
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch
@@ -0,0 +1,103 @@
1From 2003e63f48cee2f497de7b90b66284f98c1c9919 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 10 Dec 2012 12:24:32 +0100
4Subject: [PATCH 1/2] Revert "systemd-analyze: use argparse instead of getopt"
5
6This reverts commit 0c0271841ab45595f71528c50bcf1904d4b841d5.
7
8Argparse is broken in current OE python
9---
10 src/analyze/systemd-analyze | 60 ++++++++++++++++++++++++++++---------------
11 1 files changed, 39 insertions(+), 21 deletions(-)
12
13diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
14index 88699d6..87a83dd 100755
15--- a/src/analyze/systemd-analyze
16+++ b/src/analyze/systemd-analyze
17@@ -1,7 +1,6 @@
18 #!/usr/bin/python
19
20-import sys, os
21-import argparse
22+import getopt, sys, os
23 from gi.repository import Gio
24 try:
25 import cairo
26@@ -76,6 +75,20 @@ def draw_text(context, x, y, text, size = 12, r = 0, g = 0, b = 0, vcenter = 0.5
27
28 context.restore()
29
30+def usage():
31+ sys.stdout.write("""systemd-analyze [--user] time
32+systemd-analyze [--user] blame
33+systemd-analyze [--user] plot
34+
35+Process systemd profiling information
36+
37+ -h --help Show this help
38+""")
39+
40+def help():
41+ usage()
42+ sys.exit()
43+
44 def time():
45
46 initrd_time, start_time, finish_time = acquire_start_time()
47@@ -266,29 +279,34 @@ def plot():
48
49 surface.finish()
50
51-parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
52- description='Process systemd profiling information',
53- epilog='''\
54-time - print time spent in the kernel before reaching userspace
55-blame - print list of running units ordered by time to init
56-plot - output SVG graphic showing service initialization
57-''')
58-
59-parser.add_argument('action', choices=('time', 'blame', 'plot'),
60- default='time', nargs='?',
61- help='action to perform (default: time)')
62-parser.add_argument('--user', action='store_true',
63- help='use the session bus')
64+def unknown_verb():
65+ sys.stderr.write("Unknown verb '%s'.\n" % args[0])
66+ usage()
67+ sys.exit(1)
68
69-args = parser.parse_args()
70+bus = Gio.BusType.SYSTEM
71
72-if args.user:
73- bus = Gio.BusType.SESSION
74-else:
75- bus = Gio.BusType.SYSTEM
76+try:
77+ opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
78+except getopt.GetoptError as err:
79+ sys.stdout.write(str(err) + "\n")
80+ usage()
81+ sys.exit(2)
82+for o, a in opts:
83+ if o in ("-h", "--help"):
84+ help()
85+ elif o == '--user':
86+ bus = Gio.BusType.SESSION
87+ else:
88+ assert False, "unhandled option"
89
90 verb = {'time' : time,
91 'blame': blame,
92 'plot' : plot,
93+ 'help' : help,
94 }
95-verb.get(args.action)()
96+
97+if len(args) == 0:
98+ time()
99+else:
100+ verb.get(args[0], unknown_verb)()
101--
1021.7.7.6
103
diff --git a/meta-systemd/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch b/meta-systemd/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch
new file mode 100644
index 000000000..e5e8d7df0
--- /dev/null
+++ b/meta-systemd/recipes-core/systemd/systemd/0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch
@@ -0,0 +1,91 @@
1From 8079db861b8ffdce69fa10a9ab9ef4740045187f Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 10 Dec 2012 12:25:00 +0100
4Subject: [PATCH 2/2] Revert "analyze: use GDBus instead of dbus-python"
5
6This reverts commit 4940c64240541e91411620b7dc0963e012aa6b91.
7
8Python-gobject is too old in current OE
9---
10 src/analyze/systemd-analyze | 31 ++++++++++++++-----------------
11 1 files changed, 14 insertions(+), 17 deletions(-)
12
13diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
14index 87a83dd..636fd74 100755
15--- a/src/analyze/systemd-analyze
16+++ b/src/analyze/systemd-analyze
17@@ -1,15 +1,14 @@
18 #!/usr/bin/python
19
20-import getopt, sys, os
21-from gi.repository import Gio
22+import getopt, dbus, sys, os
23 try:
24 import cairo
25 except ImportError:
26 cairo = None
27
28 def acquire_time_data():
29- manager = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
30- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.systemd1.Manager', None)
31+
32+ manager = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.systemd1.Manager')
33 units = manager.ListUnits()
34
35 l = []
36@@ -18,25 +17,23 @@ def acquire_time_data():
37 if i[5] != "":
38 continue
39
40- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
41- None, 'org.freedesktop.systemd1', i[6], 'org.freedesktop.DBus.Properties', None)
42+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', i[6]), 'org.freedesktop.DBus.Properties')
43
44- ixt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic')
45- aet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic')
46- axt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic')
47- iet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic')
48+ ixt = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic'))
49+ aet = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic'))
50+ axt = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic'))
51+ iet = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic'))
52
53 l.append((str(i[0]), ixt, aet, axt, iet))
54
55 return l
56
57 def acquire_start_time():
58- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
59- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.DBus.Properties', None)
60+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.DBus.Properties')
61
62- initrd_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic')
63- userspace_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic')
64- finish_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic')
65+ initrd_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic'))
66+ userspace_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic'))
67+ finish_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic'))
68
69 if finish_time == 0:
70 sys.stderr.write("Bootup is not yet finished. Please try again later.\n")
71@@ -284,7 +281,7 @@ def unknown_verb():
72 usage()
73 sys.exit(1)
74
75-bus = Gio.BusType.SYSTEM
76+bus = dbus.SystemBus()
77
78 try:
79 opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
80@@ -296,7 +293,7 @@ for o, a in opts:
81 if o in ("-h", "--help"):
82 help()
83 elif o == '--user':
84- bus = Gio.BusType.SESSION
85+ bus = dbus.SessionBus()
86 else:
87 assert False, "unhandled option"
88
89--
901.7.7.6
91
diff --git a/meta-systemd/recipes-core/systemd/systemd/use-rootlibdir.patch b/meta-systemd/recipes-core/systemd/systemd/use-rootlibdir.patch
deleted file mode 100644
index 4c471b673..000000000
--- a/meta-systemd/recipes-core/systemd/systemd/use-rootlibdir.patch
+++ /dev/null
@@ -1,107 +0,0 @@
1Upstream-Status: Undecided
2
3This patch removes some of hardcoded references to /lib
4and /usr/lib since on some architectures it should be
5/lib64 and /usr/lib64 atleast in OE
6
7I am not sure about the intention of hardcoded values
8thats why status is undecided
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12Index: git/Makefile.am
13===================================================================
14--- git.orig/Makefile.am 2012-09-22 11:07:58.811981199 -0700
15+++ git/Makefile.am 2012-09-22 11:09:11.267983956 -0700
16@@ -64,25 +64,25 @@
17
18 # Our own, non-special dirs
19 pkgsysconfdir=$(sysconfdir)/systemd
20-userunitdir=$(prefix)/lib/systemd/user
21-userpresetdir=$(prefix)/lib/systemd/user-preset
22-tmpfilesdir=$(prefix)/lib/tmpfiles.d
23-sysctldir=$(prefix)/lib/sysctl.d
24-usergeneratordir=$(prefix)/lib/systemd/user-generators
25+userunitdir=$(prefix)/$(rootlibdir)/systemd/user
26+userpresetdir=$(prefix)/$(rootlibdir)/systemd/user-preset
27+tmpfilesdir=$(prefix)/$(rootlibdir)/tmpfiles.d
28+sysctldir=$(prefix)/$(rootlibdir)/sysctl.d
29+usergeneratordir=$(prefix)/$(rootlibdir)/systemd/user-generators
30 pkgincludedir=$(includedir)/systemd
31 systemgeneratordir=$(rootlibexecdir)/system-generators
32 systemshutdowndir=$(rootlibexecdir)/system-shutdown
33 systemsleepdir=$(rootlibexecdir)/system-sleep
34-systemunitdir=$(rootprefix)/lib/systemd/system
35-systempresetdir=$(rootprefix)/lib/systemd/system-preset
36-udevlibexecdir=$(rootprefix)/lib/udev
37+systemunitdir=$(rootprefix)/$(rootlibdir)/systemd/system
38+systempresetdir=$(rootprefix)/$(rootlibdir)/systemd/system-preset
39+udevlibexecdir=$(rootprefix)/$(rootlibdir)/udev
40 udevhomedir = $(udevlibexecdir)
41 udevrulesdir = $(udevlibexecdir)/rules.d
42
43 # And these are the special ones for /
44 rootprefix=@rootprefix@
45 rootbindir=$(rootprefix)/bin
46-rootlibexecdir=$(rootprefix)/lib/systemd
47+rootlibexecdir=$(rootprefix)/$(rootlibdir)/systemd
48
49 CLEANFILES = $(BUILT_SOURCES)
50 EXTRA_DIST =
51@@ -132,7 +132,7 @@
52 -DSYSTEMD_STDIO_BRIDGE_BINARY_PATH=\"$(bindir)/systemd-stdio-bridge\" \
53 -DROOTPREFIX=\"$(rootprefix)\" \
54 -DRUNTIME_DIR=\"/run\" \
55- -DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
56+ -DRANDOM_SEED=\"$(localstatedir)/$(rootlibdir)/random-seed\" \
57 -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
58 -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
59 -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
60@@ -2692,7 +2692,7 @@
61
62 binfmt-install-data-hook:
63 $(MKDIR_P) -m 0755 \
64- $(DESTDIR)$(prefix)/lib/binfmt.d \
65+ $(DESTDIR)$(prefix)/$(rootlibdir)/binfmt.d \
66 $(DESTDIR)$(sysconfdir)/binfmt.d \
67 $(DESTDIR)$(systemunitdir)/sysinit.target.wants
68 ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
69@@ -3107,7 +3107,7 @@
70
71 timedated-install-data-hook:
72 $(MKDIR_P) -m 0755 \
73- $(DESTDIR)$(prefix)/lib/systemd/ntp-units.d \
74+ $(DESTDIR)$(prefix)/$(rootlibdir)/systemd/ntp-units.d \
75 $(DESTDIR)$(sysconfdir)/systemd/ntp-units.d
76 ( cd $(DESTDIR)$(systemunitdir) && \
77 rm -f dbus-org.freedesktop.timedate1.service && \
78@@ -3337,7 +3337,7 @@
79 logind-install-data-hook:
80 $(MKDIR_P) -m 0755 \
81 $(DESTDIR)$(systemunitdir)/multi-user.target.wants \
82- $(DESTDIR)$(localstatedir)/lib/systemd
83+ $(DESTDIR)$(localstatedir)/$(rootlibdir)/systemd
84 ( cd $(DESTDIR)$(systemunitdir) && \
85 rm -f dbus-org.freedesktop.login1.service && \
86 $(LN_S) systemd-logind.service dbus-org.freedesktop.login1.service)
87@@ -3494,7 +3494,7 @@
88 -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
89 -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
90 -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \
91- -e 's,@RANDOM_SEED\@,$(localstatedir)/lib/random-seed,g' \
92+ -e 's,@RANDOM_SEED\@,$(localstatedir)/$(rootlibdir)/random-seed,g' \
93 -e 's,@prefix\@,$(prefix),g' \
94 -e 's,@exec_prefix\@,$(exec_prefix),g' \
95 -e 's,@libdir\@,$(libdir),g' \
96@@ -3619,9 +3619,9 @@
97 $(MKDIR_P) -m 0755 \
98 $(DESTDIR)$(tmpfilesdir) \
99 $(DESTDIR)$(sysconfdir)/tmpfiles.d \
100- $(DESTDIR)$(prefix)/lib/modules-load.d \
101+ $(DESTDIR)$(prefix)/$(rootlibdir)/modules-load.d \
102 $(DESTDIR)$(sysconfdir)/modules-load.d \
103- $(DESTDIR)$(prefix)/lib/sysctl.d \
104+ $(DESTDIR)$(prefix)/$(rootlibdir)/sysctl.d \
105 $(DESTDIR)$(sysconfdir)/sysctl.d \
106 $(DESTDIR)$(systemshutdowndir) \
107 $(DESTDIR)$(systemsleepdir) \
diff --git a/meta-systemd/recipes-core/systemd/systemd_git.bb b/meta-systemd/recipes-core/systemd/systemd_git.bb
index 9005abddc..7fa7ac61e 100644
--- a/meta-systemd/recipes-core/systemd/systemd_git.bb
+++ b/meta-systemd/recipes-core/systemd/systemd_git.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
3 3
4LICENSE = "GPLv2 & LGPLv2.1 & MIT" 4LICENSE = "GPLv2 & LGPLv2.1 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ 5LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
6 file://LICENSE.LGPL2.1;md5=fb919cc88dbe06ec0b0bd50e001ccf1f \ 6 file://LICENSE.LGPL2.1;md5=f0df8fd67dfa1db3cc0bd431837f0b89 \
7 file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed" 7 file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
8 8
9PROVIDES = "udev" 9PROVIDES = "udev"
@@ -19,7 +19,7 @@ inherit gitpkgv
19PKGV = "v${GITPKGVTAG}" 19PKGV = "v${GITPKGVTAG}"
20 20
21PV = "git" 21PV = "git"
22PR = "r12" 22PR = "r13"
23 23
24# need to export these variables for python-config to work 24# need to export these variables for python-config to work
25export BUILD_SYS 25export BUILD_SYS
@@ -29,9 +29,10 @@ export STAGING_LIBDIR
29 29
30inherit useradd pkgconfig autotools perlnative pythonnative python-dir 30inherit useradd pkgconfig autotools perlnative pythonnative python-dir
31 31
32SRCREV = "4d92e078e9d7e9a9d346065ea5e4afbafbdadb48" 32SRCREV = "decd634e801bee2c554edb35383cc9d43417a850"
33SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \ 33SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \
34 file://use-rootlibdir.patch \ 34 file://0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch \
35 file://0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch \
35 file://gtk-doc.make \ 36 file://gtk-doc.make \
36 file://touchscreen.rules \ 37 file://touchscreen.rules \
37 file://modprobe.rules \ 38 file://modprobe.rules \
@@ -119,7 +120,7 @@ USERADD_PACKAGES = "${PN}"
119GROUPADD_PARAM_${PN} = "-r lock" 120GROUPADD_PARAM_${PN} = "-r lock"
120 121
121FILES_${PN}-analyze = "${bindir}/systemd-analyze" 122FILES_${PN}-analyze = "${bindir}/systemd-analyze"
122RDEPENDS_${PN}-analyze = "python-dbus" 123RDEPENDS_${PN}-analyze = "python-dbus python-argparse python-textutils"
123RRECOMMENDS_${PN}-analyze = "python-pycairo" 124RRECOMMENDS_${PN}-analyze = "python-pycairo"
124 125
125FILES_python-${PN}-journal = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so" 126FILES_python-${PN}-journal = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so"
@@ -225,6 +226,7 @@ FILES_udev += "${base_libdir}/udev/udevd \
225 ${base_libdir}/udev/rules.d/78*.rules \ 226 ${base_libdir}/udev/rules.d/78*.rules \
226 ${base_libdir}/udev/rules.d/8*.rules \ 227 ${base_libdir}/udev/rules.d/8*.rules \
227 ${base_libdir}/udev/rules.d/95*.rules \ 228 ${base_libdir}/udev/rules.d/95*.rules \
229 ${base_libdir}/udev/hwdb.d \
228 ${sysconfdir}/udev \ 230 ${sysconfdir}/udev \
229 " 231 "
230 232