systemd: Upgrade to 197
LGPL-2.1 licensce is updated to reflect the new FSF address Drop patches to disable argparse and dbus-python analyser has been implemented in C lets use that patch and get rid of the python version disable hostname detection for uclibc bases systems since uclibc lacks NSS (From OE-Core rev: af17e816dd4ee0c2a7401f26a148129ad8f8e1fa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Conflicts: meta/recipes-core/systemd/systemd_197.bb Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f366fd3f4a
commit
de51b42596
|
@ -1,106 +0,0 @@
|
|||
Upstream-Status: Backport [revert]
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
|
||||
From 2003e63f48cee2f497de7b90b66284f98c1c9919 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 10 Dec 2012 12:24:32 +0100
|
||||
Subject: [PATCH 1/2] Revert "systemd-analyze: use argparse instead of getopt"
|
||||
|
||||
This reverts commit 0c0271841ab45595f71528c50bcf1904d4b841d5.
|
||||
|
||||
Argparse is broken in current OE python
|
||||
---
|
||||
src/analyze/systemd-analyze | 60 ++++++++++++++++++++++++++++---------------
|
||||
1 files changed, 39 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
|
||||
index 88699d6..87a83dd 100755
|
||||
--- a/src/analyze/systemd-analyze
|
||||
+++ b/src/analyze/systemd-analyze
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
-import sys, os
|
||||
-import argparse
|
||||
+import getopt, sys, os
|
||||
from gi.repository import Gio
|
||||
try:
|
||||
import cairo
|
||||
@@ -76,6 +75,20 @@ def draw_text(context, x, y, text, size = 12, r = 0, g = 0, b = 0, vcenter = 0.5
|
||||
|
||||
context.restore()
|
||||
|
||||
+def usage():
|
||||
+ sys.stdout.write("""systemd-analyze [--user] time
|
||||
+systemd-analyze [--user] blame
|
||||
+systemd-analyze [--user] plot
|
||||
+
|
||||
+Process systemd profiling information
|
||||
+
|
||||
+ -h --help Show this help
|
||||
+""")
|
||||
+
|
||||
+def help():
|
||||
+ usage()
|
||||
+ sys.exit()
|
||||
+
|
||||
def time():
|
||||
|
||||
initrd_time, start_time, finish_time = acquire_start_time()
|
||||
@@ -266,29 +279,34 @@ def plot():
|
||||
|
||||
surface.finish()
|
||||
|
||||
-parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
- description='Process systemd profiling information',
|
||||
- epilog='''\
|
||||
-time - print time spent in the kernel before reaching userspace
|
||||
-blame - print list of running units ordered by time to init
|
||||
-plot - output SVG graphic showing service initialization
|
||||
-''')
|
||||
-
|
||||
-parser.add_argument('action', choices=('time', 'blame', 'plot'),
|
||||
- default='time', nargs='?',
|
||||
- help='action to perform (default: time)')
|
||||
-parser.add_argument('--user', action='store_true',
|
||||
- help='use the session bus')
|
||||
+def unknown_verb():
|
||||
+ sys.stderr.write("Unknown verb '%s'.\n" % args[0])
|
||||
+ usage()
|
||||
+ sys.exit(1)
|
||||
|
||||
-args = parser.parse_args()
|
||||
+bus = Gio.BusType.SYSTEM
|
||||
|
||||
-if args.user:
|
||||
- bus = Gio.BusType.SESSION
|
||||
-else:
|
||||
- bus = Gio.BusType.SYSTEM
|
||||
+try:
|
||||
+ opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
|
||||
+except getopt.GetoptError as err:
|
||||
+ sys.stdout.write(str(err) + "\n")
|
||||
+ usage()
|
||||
+ sys.exit(2)
|
||||
+for o, a in opts:
|
||||
+ if o in ("-h", "--help"):
|
||||
+ help()
|
||||
+ elif o == '--user':
|
||||
+ bus = Gio.BusType.SESSION
|
||||
+ else:
|
||||
+ assert False, "unhandled option"
|
||||
|
||||
verb = {'time' : time,
|
||||
'blame': blame,
|
||||
'plot' : plot,
|
||||
+ 'help' : help,
|
||||
}
|
||||
-verb.get(args.action)()
|
||||
+
|
||||
+if len(args) == 0:
|
||||
+ time()
|
||||
+else:
|
||||
+ verb.get(args[0], unknown_verb)()
|
||||
--
|
||||
1.7.7.6
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,94 +0,0 @@
|
|||
Upstream-Status: Backport [revert]
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
|
||||
From 8079db861b8ffdce69fa10a9ab9ef4740045187f Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 10 Dec 2012 12:25:00 +0100
|
||||
Subject: [PATCH 2/2] Revert "analyze: use GDBus instead of dbus-python"
|
||||
|
||||
This reverts commit 4940c64240541e91411620b7dc0963e012aa6b91.
|
||||
|
||||
Python-gobject is too old in current OE
|
||||
---
|
||||
src/analyze/systemd-analyze | 31 ++++++++++++++-----------------
|
||||
1 files changed, 14 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/analyze/systemd-analyze b/src/analyze/systemd-analyze
|
||||
index 87a83dd..636fd74 100755
|
||||
--- a/src/analyze/systemd-analyze
|
||||
+++ b/src/analyze/systemd-analyze
|
||||
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
-import getopt, sys, os
|
||||
-from gi.repository import Gio
|
||||
+import getopt, dbus, sys, os
|
||||
try:
|
||||
import cairo
|
||||
except ImportError:
|
||||
cairo = None
|
||||
|
||||
def acquire_time_data():
|
||||
- manager = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
|
||||
- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.systemd1.Manager', None)
|
||||
+
|
||||
+ manager = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.systemd1.Manager')
|
||||
units = manager.ListUnits()
|
||||
|
||||
l = []
|
||||
@@ -18,25 +17,23 @@ def acquire_time_data():
|
||||
if i[5] != "":
|
||||
continue
|
||||
|
||||
- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
|
||||
- None, 'org.freedesktop.systemd1', i[6], 'org.freedesktop.DBus.Properties', None)
|
||||
+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', i[6]), 'org.freedesktop.DBus.Properties')
|
||||
|
||||
- ixt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic')
|
||||
- aet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic')
|
||||
- axt = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic')
|
||||
- iet = properties.Get('(ss)', 'org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic')
|
||||
+ ixt = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveExitTimestampMonotonic'))
|
||||
+ aet = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveEnterTimestampMonotonic'))
|
||||
+ axt = int(properties.Get('org.freedesktop.systemd1.Unit', 'ActiveExitTimestampMonotonic'))
|
||||
+ iet = int(properties.Get('org.freedesktop.systemd1.Unit', 'InactiveEnterTimestampMonotonic'))
|
||||
|
||||
l.append((str(i[0]), ixt, aet, axt, iet))
|
||||
|
||||
return l
|
||||
|
||||
def acquire_start_time():
|
||||
- properties = Gio.DBusProxy.new_for_bus_sync(bus, Gio.DBusProxyFlags.NONE,
|
||||
- None, 'org.freedesktop.systemd1', '/org/freedesktop/systemd1', 'org.freedesktop.DBus.Properties', None)
|
||||
+ properties = dbus.Interface(bus.get_object('org.freedesktop.systemd1', '/org/freedesktop/systemd1'), 'org.freedesktop.DBus.Properties')
|
||||
|
||||
- initrd_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic')
|
||||
- userspace_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic')
|
||||
- finish_time = properties.Get('(ss)', 'org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic')
|
||||
+ initrd_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'InitRDTimestampMonotonic'))
|
||||
+ userspace_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'UserspaceTimestampMonotonic'))
|
||||
+ finish_time = int(properties.Get('org.freedesktop.systemd1.Manager', 'FinishTimestampMonotonic'))
|
||||
|
||||
if finish_time == 0:
|
||||
sys.stderr.write("Bootup is not yet finished. Please try again later.\n")
|
||||
@@ -284,7 +281,7 @@ def unknown_verb():
|
||||
usage()
|
||||
sys.exit(1)
|
||||
|
||||
-bus = Gio.BusType.SYSTEM
|
||||
+bus = dbus.SystemBus()
|
||||
|
||||
try:
|
||||
opts, args = getopt.gnu_getopt(sys.argv[1:], "h", ["help", "user"])
|
||||
@@ -296,7 +293,7 @@ for o, a in opts:
|
||||
if o in ("-h", "--help"):
|
||||
help()
|
||||
elif o == '--user':
|
||||
- bus = Gio.BusType.SESSION
|
||||
+ bus = dbus.SessionBus()
|
||||
else:
|
||||
assert False, "unhandled option"
|
||||
|
||||
--
|
||||
1.7.7.6
|
||||
|
|
@ -3,7 +3,7 @@ HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
|
|||
|
||||
LICENSE = "GPLv2 & LGPLv2.1 & MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
|
||||
file://LICENSE.LGPL2.1;md5=fb919cc88dbe06ec0b0bd50e001ccf1f \
|
||||
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \
|
||||
file://LICENSE.MIT;md5=544799d0b492f119fa04641d1b8868ed"
|
||||
|
||||
PROVIDES = "udev"
|
||||
|
@ -18,17 +18,16 @@ SECTION = "base/shell"
|
|||
inherit gtk-doc useradd pkgconfig autotools perlnative
|
||||
|
||||
SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
|
||||
file://0001-Revert-systemd-analyze-use-argparse-instead-of-getop.patch \
|
||||
file://0002-Revert-analyze-use-GDBus-instead-of-dbus-python.patch \
|
||||
file://touchscreen.rules \
|
||||
file://modprobe.rules \
|
||||
file://var-run.conf \
|
||||
${UCLIBCPATCHES} \
|
||||
file://00-create-volatile.conf \
|
||||
file://0001-systemd-analyze-rewrite-in-C.patch \
|
||||
file://0001-test-unit-file-Add-libsystemd-daemon.la-to-LDADD.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "05ebd7f108e420e2b4e4810ea4b3c810"
|
||||
SRC_URI[sha256sum] = "6bd4a658a5dd8198235b17ad1b1f0cc56d9e6f00d646ddcffdfc6f058b55e4bf"
|
||||
SRC_URI[md5sum] = "56a860dceadfafe59f40141eb5223743"
|
||||
SRC_URI[sha256sum] = "e6857ea21ae24d7056e7b0f4c2aaaba73b8bf57025b8949c0a8af0c1bc9774b5"
|
||||
|
||||
UCLIBCPATCHES = ""
|
||||
UCLIBCPATCHES_libc-uclibc = "file://systemd-pam-configure-check-uclibc.patch \
|
||||
|
@ -67,6 +66,8 @@ EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \
|
|||
--disable-microhttpd \
|
||||
--without-python \
|
||||
"
|
||||
# uclibc does not have NSS
|
||||
EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
|
||||
|
||||
# There's no docbook-xsl-native, so for the xsltproc check to false
|
||||
do_configure_prepend() {
|
||||
|
@ -150,6 +151,7 @@ FILES_${PN} = " ${base_bindir}/* \
|
|||
${systemd_unitdir}/system/* \
|
||||
/lib/udev/rules.d/99-systemd.rules \
|
||||
${base_libdir}/security/*.so \
|
||||
${libdir}/libnss_myhostname.so.2 \
|
||||
/cgroup \
|
||||
${bindir}/systemd* \
|
||||
${bindir}/localectl \
|
Loading…
Reference in New Issue