commit systemd for openSUSE:Factory
Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at Thu Oct 13 00:02:23 CEST 2011. -------- --- openSUSE:Factory/systemd/systemd-gtk.changes 2011-10-08 11:44:38.000000000 +0200 +++ /mounts/work_src_done/STABLE/systemd/systemd-gtk.changes 2011-10-12 15:41:18.000000000 +0200 @@ -1,0 +2,35 @@ +Wed Oct 12 13:21:15 UTC 2011 - fcrozat@suse.com + +- Shadow single sysv service, it was breaking runlevel 1. +- Add modules_on_boot.patch to handle /etc/sysconfig/kernel + MODULES_ON_BOOT variable (bnc#721662). + +------------------------------------------------------------------- +Wed Oct 12 08:38:36 UTC 2011 - fcrozat@suse.com + +- Update to release 37: + - many bugfixes + - ConditionCapability added, useful for containers. + - locale mechanism got extend to kbd configuration for + both X and the console + - don't try to guess PID for SysV services anymore (bnc#723194) +- Drop detect-non-running.patch, logind-warning.patch. +- Rewrite systemd-sysv-convert in bash (bnc#716939) +------------------------------------------------------------------- +Tue Oct 11 13:57:32 UTC 2011 - coolo@suse.com + +- make sure updaters get in the /sbin/init from here - the sub package + of the split package will decide which init wins in update case + +------------------------------------------------------------------- +Tue Oct 11 13:10:27 UTC 2011 - coolo@suse.com + +- under openSUSE if it's not systemd, chances are good it's + sysvinit + +------------------------------------------------------------------- +Tue Oct 11 11:07:02 UTC 2011 - coolo@suse.com + +- do not list specific sbin_init providers + +------------------------------------------------------------------- --- openSUSE:Factory/systemd/systemd.changes 2011-10-11 17:59:44.000000000 +0200 +++ /mounts/work_src_done/STABLE/systemd/systemd.changes 2011-10-12 15:22:07.000000000 +0200 @@ -1,0 +2,18 @@ +Wed Oct 12 13:21:15 UTC 2011 - fcrozat@suse.com + +- Shadow single sysv service, it was breaking runlevel 1. +- Add modules_on_boot.patch to handle /etc/sysconfig/kernel + MODULES_ON_BOOT variable (bnc#721662). + +------------------------------------------------------------------- +Wed Oct 12 08:38:36 UTC 2011 - fcrozat@suse.com + +- Update to release 37: + - many bugfixes + - ConditionCapability added, useful for containers. + - locale mechanism got extend to kbd configuration for + both X and the console + - don't try to guess PID for SysV services anymore (bnc#723194) +- Drop detect-non-running.patch, logind-warning.patch. +- Rewrite systemd-sysv-convert in bash (bnc#716939) +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- detect-non-running.patch logind-warning.patch systemd-36.tar.bz2 New: ---- modules_on_boot.patch systemd-37.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-gtk.spec ++++++ --- /var/tmp/diff_new_pack.QoMGG6/_old 2011-10-13 00:02:19.000000000 +0200 +++ /var/tmp/diff_new_pack.QoMGG6/_new 2011-10-13 00:02:19.000000000 +0200 @@ -20,7 +20,7 @@ Name: systemd-gtk Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 36 +Version: 37 Release: 1 License: GPLv2+ Group: System/Base ++++++ systemd.spec ++++++ --- /var/tmp/diff_new_pack.QoMGG6/_old 2011-10-13 00:02:19.000000000 +0200 +++ /var/tmp/diff_new_pack.QoMGG6/_new 2011-10-13 00:02:19.000000000 +0200 @@ -21,7 +21,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 36 +Version: 37 Release: 1 License: GPLv2+ Group: System/Base @@ -66,13 +66,12 @@ Patch10: 0001-service-Fix-dependencies-added-when-parsing-insserv..patch Patch13: 0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch Patch15: support-sysvinit.patch +Patch16: modules_on_boot.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. -Patch12: detect-non-running.patch -Patch14: logind-warning.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -120,10 +119,9 @@ %patch6 -p1 %patch8 -p1 %patch10 -p1 -%patch12 -p1 %patch13 -p1 -%patch14 -p1 %patch15 -p1 +%patch16 -p1 %build autoreconf -fiv @@ -184,6 +182,7 @@ #ln -s /dev/null %{buildroot}/lib/systemd/system/localnet.service ln -s /dev/null %{buildroot}/lib/systemd/system/proc.service ln -s fsck-root.service %{buildroot}/lib/systemd/system/rootfsck.service +ln -s /dev/null %{buildroot}/lib/systemd/system/single.service ln -s /dev/null %{buildroot}/lib/systemd/system/swap.service ln -s /dev/null %{buildroot}/lib/systemd/system/startpreload.service ln -s /dev/null %{buildroot}/lib/systemd/system/stoppreload.service @@ -298,6 +297,7 @@ %{_datadir}/polkit-1 %{_datadir}/polkit-1/actions %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy +%{_datadir}/systemd %if %{build_plymouth} # Packaged in plymouth subpackage %exclude /lib/systemd/system/plymouth-*.service ++++++ modules_on_boot.patch ++++++
From 051e407e1af70e779c092c81733a98832c29d6b4 Mon Sep 17 00:00:00 2001 From: Frederic Crozat
Date: Wed, 12 Oct 2011 15:18:29 +0200 Subject: [PATCH] module-load: handle SUSE /etc/sysconfig/kernel module list
--- src/modules-load.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/src/modules-load.c b/src/modules-load.c index 8dd98f7..73ef5f5 100644 --- a/src/modules-load.c +++ b/src/modules-load.c @@ -36,6 +36,9 @@ int main(int argc, char *argv[]) { char **arguments = NULL; unsigned n_arguments = 0, n_allocated = 0; char **files, **fn; +#if defined(TARGET_SUSE) + char *modules_on_boot = NULL; +#endif if (argc > 1) { log_error("This program takes no argument."); @@ -126,6 +129,42 @@ int main(int argc, char *argv[]) { } strv_free(files); +#if defined(TARGET_SUSE) + if ((r = parse_env_file("/etc/sysconfig/kernel", NEWLINE, + "MODULES_LOADED_ON_BOOT", &modules_on_boot, + NULL)) < 0) { + if (r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/kernel: %s", strerror(-r)); + } + if (modules_on_boot) { + char **modules = strv_split(modules_on_boot,WHITESPACE); + char **module; + if (modules) { + STRV_FOREACH(module, modules) { + if (n_arguments >= n_allocated) { + char **a; + unsigned m; + + m = MAX(16U, n_arguments*2); + + if (!(a = realloc(arguments, sizeof(char*) * (m+1)))) { + log_error("Failed to increase module array size."); + free(*module); + r = EXIT_FAILURE; + continue; + } + + arguments = a; + n_allocated = m; + } + log_debug("adding module: %s\n", *module); + arguments[n_arguments++] = strdup(*module); + } + } + strv_free(modules); + } +#endif + finish: if (n_arguments > 3) { @@ -138,6 +177,9 @@ finish: } strv_free(arguments); +#if defined(TARGET_SUSE) + free(modules_on_boot); +#endif return r; } -- 1.7.3.4 ++++++ systemd-36.tar.bz2 -> systemd-37.tar.bz2 ++++++ ++++ 5374 lines of diff (skipped) ++++++ systemd-sysv-convert ++++++ --- /var/tmp/diff_new_pack.QoMGG6/_old 2011-10-13 00:02:20.000000000 +0200 +++ /var/tmp/diff_new_pack.QoMGG6/_new 2011-10-13 00:02:20.000000000 +0200 @@ -1,148 +1,175 @@ -#!/usr/bin/python -# -*- Mode: Python; python-indent: 8; indent-tabs-mode: t -*- +#!/bin/bash -import sys, os, argparse, errno +if [ "$UID" != "0" ]; then + echo Need to be root. + exit 1 +fi + +declare -A results_runlevel +declare -A results_priority + +usage() { +cat << EOF +usage: systemd-sysv-convert [-h] [--save] [--show] [--apply] + SERVICE [SERVICE ...] +EOF +} + +help() { +usage +cat << EOF +Save and Restore SusV Service Runlevel Information + +positional arguments: + SERVICE Service names + +optional arguments: + -h, --help show this help message and exit + --save Save SysV runlevel information for one or more services + --show Show saved SysV runlevel information for one or more services + --apply Apply saved SysV runlevel information for one or more services + to systemd counterparts +EOF +} + +find_service() { +local service +local runlevel +declare -i priority +service=$1 +runlevel=$2 +priority=-1 +for l in /etc/rc.d/rc$runlevel.d/* ; do + initscript=$(basename $l) + if [ ${initscript:0:1} != "S" -o ${initscript:3} != "$service" ]; then + continue + fi + if [ ${initscript:1:2} -ge 0 -a ${initscript:1:2} -le 99 -a ${initscript:1:2} -ge $priority ]; then + if [ ${initscript:1:1} == 0 ]; then + priority=${initscript:2:1} + else + priority=${initscript:1:2} + fi + fi +done +if [ $priority -ge 0 ]; then + return $priority +else + return 255 +fi +} + +lookup_database() { +local services +local service +local runlevel +local priority +local -i k +declare -a parsed +services=$@ +k=0 +results_runlevel=() +results_priority=() +while read line ; do + k+=1 + parsed=($line) + service=${parsed[0]} + runlevel=${parsed[1]} + priority=${parsed[2]} + if [ $runlevel -lt 2 -o $runlevel -gt 5 ]; then + echo "Runlevel out of bounds in database line $k. Ignoring" >/dev/stderr + continue + fi + if [ $priority -lt 0 -o $priority -gt 99 ]; then + echo "Priority out of bounds in database line $k. Ignoring" >/dev/stderr + continue + fi + + declare -i found + found=0 + for s in $services ; do + if [ $s == $service ]; then + found=1 + continue + fi + done + if [ $found -eq 0 ]; then + continue + fi + results_runlevel[$service]+=" $runlevel" + results_priority[$service]+=" $priority" +done < /var/lib/systemd/sysv-convert/database +} + +case "$1" in + -h|--help) + help + exit 0 + ;; + --save) + shift + for service in $@ ; do + if [ ! -r "/etc/init.d/$service" ]; then + echo "SysV service $service does not exist" >/dev/stderr + exit 1 + fi + for runlevel in 2 3 4 5; do + find_service $service $runlevel + priority=$? + if [ $priority -lt 255 ]; then + echo "$service $runlevel $priority" >> /var/lib/systemd/sysv-convert/database + fi + done + done + ;; + --show) + shift + services=$@ + lookup_database $services + fail=0 + for service in $services; do + if [ -z "${results_runlevel[$service]}" ]; then + echo No information found about service $service found. >/dev/stderr + fail=1 + continue + fi + declare -i count + count=0 + priority=(${results_priority[$service]}) + for runlevel in ${results_runlevel[$service]}; do + echo SysV service $service enabled in runlevel $runlevel at priority ${priority[$count]} + count+=1 + done + done + exit $fail + ;; + --apply) + shift + services=$@ + for service in $services; do + if [ ! -f "/lib/systemd/system/$service.service" ]; then + echo systemd service $service.service does not exist. >/dev/stderr + exit 1 + fi + done + lookup_database $services + for service in $services; do + if [ -z "${results_runlevel[$service]}" ]; then + echo No information found about service $service found. >/dev/stderr + fail=1 + continue + fi + for runlevel in ${results_runlevel[$service]}; do + echo ln -sf /lib/systemd/system/$service.service /etc/systemd/system/runlevel$runlevel.target.wants/$service.service >/dev/stderr + mkdir -p "/etc/systemd/system/runlevel$runlevel.target.wants" + /bin/ln -sf /lib/systemd/system/$service.service /etc/systemd/system/runlevel$runlevel.target.wants/$service.service + done + + done + ;; + *) usage + exit 2;; +esac -def find_service(service, runlevel): - priority = -1 - for l in os.listdir("/etc/rc.d/rc%i.d" % runlevel): - if len(l) < 4: - continue - - if l[0] != 'S' or l[3:] != service: - continue - - p = int(l[1:3]) - - if p >= 0 and p <= 99 and p >= priority: - priority = p; - - return priority - -def lookup_database(services): - try: - database = open("/var/lib/systemd/sysv-convert/database", "r") - except IOError, e: - if e.errno != errno.ENOENT: - raise e - - return {} - - found = {} - k = 0 - - for line in database: - service, r, p = line.strip().split("\t", 3) - k += 1 - - try: - runlevel = int(r) - priority = int(p) - except ValueError, e: - sys.stderr.write("Failed to parse database line %i. Ignoring." % k) - continue - - if runlevel not in (2, 3, 4, 5): - sys.stderr.write("Runlevel out of bounds in database line %i. Ignoring." % k) - continue - - if priority < 0 or priority > 99: - sys.stderr.write("Priority out of bounds in database line %i. Ignoring." % k) - continue - - if service not in services: - continue - - if service not in found: - found[service] = {} - - if runlevel not in found[service] or found[service][runlevel] < priority: - found[service][runlevel] = priority - - return found - -def mkdir_p(path): - try: - os.makedirs(path, 0755) - except OSError, e: - if e.errno != errno.EEXIST: - raise e - -if os.geteuid() != 0: - sys.stderr.write("Need to be root.\n") - sys.exit(1) - -parser = argparse.ArgumentParser(description='Save and Restore SysV Service Runlevel Information') - -parser.add_argument('services', metavar='SERVICE', type=str, nargs='+', - help='Service names') - -parser.add_argument('--save', dest='save', action='store_const', - const=True, default=False, - help='Save SysV runlevel information for one or more services') - -parser.add_argument('--show', dest='show', action='store_const', - const=True, default=False, - help='Show saved SysV runlevel information for one or more services') - -parser.add_argument('--apply', dest='apply', action='store_const', - const=True, default=False, - help='Apply saved SysV runlevel information for one or more services to systemd counterparts') - -a = parser.parse_args() - -if a.save: - for service in a.services: - if not os.access("/etc/init.d/%s" % service, os.F_OK): - sys.stderr.write("SysV service %s does not exist.\n" % service) - sys.exit(1) - - mkdir_p("/var/lib/systemd/sysv-convert") - database = open("/var/lib/systemd/sysv-convert/database", "a") - - for runlevel in (2, 3, 4, 5): - priority = find_service(service, runlevel) - - if priority >= 0: - database.write("%s\t%s\t%s\n" % (service, runlevel, priority)) - -elif a.show: - found = lookup_database(a.services) - - if len(found) <= 0: - sys.stderr.write("No information about passed services found.\n") - sys.exit(1) - - for service, data in found.iteritems(): - for runlevel, priority in data.iteritems(): - sys.stdout.write("SysV service %s enabled in runlevel %s at priority %s\n" % (service, runlevel, priority)) - -elif a.apply: - for service in a.services: - if not os.access("/lib/systemd/system/%s.service" % service, os.F_OK): - sys.stderr.write("systemd service %s.service does not exist.\n" % service) - sys.exit(1) - - found = lookup_database(a.services) - - if len(found) <= 0: - sys.stderr.write("No information about passed services found.\n") - sys.exit(1) - - for service, data in found.iteritems(): - for runlevel in data.iterkeys(): - - sys.stderr.write("ln -sf /lib/systemd/system/%s.service /etc/systemd/system/runlevel%i.target.wants/%s.service\n" % (service, runlevel, service)) - - mkdir_p("/etc/systemd/system/runlevel%i.target.wants" % runlevel) - - try: - os.symlink("/lib/systemd/system/%s.service" % service, - "/etc/systemd/system/runlevel%i.target.wants/%s.service" % (runlevel, service)) - except OSError, e: - if e.errno != errno.EEXIST: - raise e -else: - parser.print_help() continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de