From f728a2485a826fa0e25826453d9c5115618c401f7d356f82be02262f908782ba Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 4 Aug 2011 07:21:02 +0000 Subject: [PATCH] Accepting request 77911 from Base:System - Add root-fsck.patch: do not run fsck on / if it is rw - Ship a non null localfs.service, fixes static mount points not being mounted properly. - Update to version 33: * optimizations and bugfixes. * New PrivateNetwork= service setting which allows you to shut off networking for a specific service (i.e. all routable network interfaces will disappear for that service). * Merged insserv-parsing.patch and bash-completion-restart.patch patches. OBS-URL: https://build.opensuse.org/request/show/77911 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=49 --- bash-completion-restart.patch | 43 --------------- gperf-missing.patch | 25 +++++++++ insserv-parsing.patch | 100 ---------------------------------- localfs.service | 6 ++ root-fsck.patch | 25 +++++++++ systemd-32.tar.bz2 | 3 - systemd-33.tar.bz2 | 3 + systemd.changes | 18 ++++++ systemd.spec | 15 +++-- 9 files changed, 86 insertions(+), 152 deletions(-) delete mode 100644 bash-completion-restart.patch create mode 100644 gperf-missing.patch delete mode 100644 insserv-parsing.patch create mode 100644 localfs.service create mode 100644 root-fsck.patch delete mode 100644 systemd-32.tar.bz2 create mode 100644 systemd-33.tar.bz2 diff --git a/bash-completion-restart.patch b/bash-completion-restart.patch deleted file mode 100644 index da169c26..00000000 --- a/bash-completion-restart.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 54a437057e83ca41f329f010e2a0e968ed3880b2 Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Mon, 1 Aug 2011 18:43:01 +0200 -Subject: [PATCH] bash: Allow to restart already started service. - -Allow to restart all services, not only inactive one. - -https://bugzilla.novell.com/show_bug.cgi?id=704782 ---- - src/systemctl-bash-completion.sh | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/src/systemctl-bash-completion.sh b/src/systemctl-bash-completion.sh -index acdc086..6369a6c 100644 ---- a/src/systemctl-bash-completion.sh -+++ b/src/systemctl-bash-completion.sh -@@ -79,10 +79,11 @@ _systemctl () { - local -A VERBS=( - [ALL_UNITS]='enable disable is-active is-enabled status show' - [FAILED_UNITS]='reset-failed' -- [STARTABLE_UNITS]='start restart reload-or-restart' -+ [STARTABLE_UNITS]='start' - [STOPPABLE_UNITS]='stop kill try-restart condrestart' - [ISOLATABLE_UNITS]='isolate' - [RELOADABLE_UNITS]='reload reload-or-try-restart force-reload' -+ [RESTARTABLE_UNITS]='restart reload-or-restart' - [JOBS]='cancel' - [SNAPSHOTS]='delete' - [ENVS]='set-environment unset-environment' -@@ -110,6 +111,10 @@ _systemctl () { - comps=$( __filter_units_by_property CanStart yes \ - $( __get_inactive_units | grep -Ev '\.(device|snapshot)$' )) - -+ elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then -+ comps=$( __filter_units_by_property CanStart yes \ -+ $( __get_all_units | grep -Ev '\.(device|snapshot|socket|timer)$' )) -+ - elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then - comps=$( __filter_units_by_property CanStop yes \ - $( __get_active_units ) ) --- -1.7.3.4 - diff --git a/gperf-missing.patch b/gperf-missing.patch new file mode 100644 index 00000000..49eb98b5 --- /dev/null +++ b/gperf-missing.patch @@ -0,0 +1,25 @@ +From: Thierry Reding +To: systemd-devel@lists.freedesktop.org +Date: Wed, 3 Aug 2011 08:40:27 +0200 +Subject: [systemd-devel] [PATCH] gperf: Include missing.h. + +Older GNU C libraries don't define RLIMIT_RTTIME, so including the +missing.h is required to fix the build. +--- + src/load-fragment-gperf.gperf.m4 | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/src/load-fragment-gperf.gperf.m4 b/src/load-fragment-gperf.gperf.m4 +index 650f444..8e52890 100644 +--- a/src/load-fragment-gperf.gperf.m4 ++++ b/src/load-fragment-gperf.gperf.m4 +@@ -2,6 +2,7 @@ + #include + #include "conf-parser.h" + #include "load-fragment.h" ++#include "missing.h" + %} + struct ConfigPerfItem; + %null_strings +-- +1.7.6 diff --git a/insserv-parsing.patch b/insserv-parsing.patch deleted file mode 100644 index 329e3917..00000000 --- a/insserv-parsing.patch +++ /dev/null @@ -1,100 +0,0 @@ -From de3910a324aefcb15c26be27033d6917494e5946 Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Wed, 29 Jun 2011 13:59:34 +0200 -Subject: [PATCH] service: parse insserv.conf and plugs its system facilities into systemd. - ---- - src/service.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 70 insertions(+), 0 deletions(-) - -diff --git a/src/service.c b/src/service.c -index 4e3b6e7..0464d1e 100644 ---- a/src/service.c -+++ b/src/service.c -@@ -2968,6 +2968,72 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { - } - - #ifdef HAVE_SYSV_COMPAT -+ -+#ifdef TARGET_SUSE -+static void sysv_facility_in_insserv_conf(Manager *mgr) { -+ FILE *f=NULL; -+ int r; -+ -+ if (!(f = fopen("/etc/insserv.conf", "re"))) { -+ r = errno == ENOENT ? 0 : -errno; -+ goto finish; -+ } -+ -+ while (!feof(f)) { -+ char l[LINE_MAX], *t; -+ char **parsed = NULL; -+ -+ if (!fgets(l, sizeof(l), f)) { -+ if (feof(f)) -+ break; -+ -+ r = -errno; -+ log_error("Failed to read configuration file '/etc/insserv.conf': %s", strerror(-r)); -+ goto finish; -+ } -+ -+ t = strstrip(l); -+ if (*t != '$' && *t != '<') -+ continue; -+ -+ parsed = strv_split(t,WHITESPACE); -+ /* we ignore , not used, equivalent to X-Interactive */ -+ if (parsed && !startswith_no_case (parsed[0], "")) { -+ char *facility; -+ Unit *u; -+ if (sysv_translate_facility(parsed[0], NULL, &facility) < 0) -+ continue; -+ if ((u = manager_get_unit(mgr, facility)) && (u->meta.type == UNIT_TARGET)) { -+ UnitDependency e; -+ char *dep = NULL, *name, **j; -+ -+ STRV_FOREACH (j, parsed+1) { -+ if (*j[0]=='+') { -+ e = UNIT_WANTS; -+ name = *j+1; -+ } -+ else { -+ e = UNIT_REQUIRES; -+ name = *j; -+ } -+ if (sysv_translate_facility(name, NULL, &dep) < 0) -+ continue; -+ -+ r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true); -+ free(dep); -+ } -+ } -+ free(facility); -+ } -+ strv_free(parsed); -+ } -+finish: -+ if (f) -+ fclose(f); -+ -+} -+#endif -+ - static int service_enumerate(Manager *m) { - char **p; - unsigned i; -@@ -3116,6 +3182,10 @@ static int service_enumerate(Manager *m) { - - r = 0; - -+#ifdef TARGET_SUSE -+ sysv_facility_in_insserv_conf (m); -+#endif -+ - finish: - free(path); - free(fpath); --- -1.7.3.4 - diff --git a/localfs.service b/localfs.service new file mode 100644 index 00000000..d8ff1048 --- /dev/null +++ b/localfs.service @@ -0,0 +1,6 @@ +[Unit] +Description=Shadow /etc/init.d/boot.localfs + +[Service] +RemainAfterExit=true +ExecStart=/bin/true diff --git a/root-fsck.patch b/root-fsck.patch new file mode 100644 index 00000000..f9ca4f00 --- /dev/null +++ b/root-fsck.patch @@ -0,0 +1,25 @@ +From 687d70cc43b34eb2359598d0ca0b69e996aa1b38 Mon Sep 17 00:00:00 2001 +From: Frederic Crozat +Date: Wed, 3 Aug 2011 16:46:52 +0200 +Subject: [PATCH] units: detect SUSE initrd and do not run fsck on /. + +--- + units/fsck-root.service.in | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/units/fsck-root.service.in b/units/fsck-root.service.in +index 7b3529d..2f8c8f5 100644 +--- a/units/fsck-root.service.in ++++ b/units/fsck-root.service.in +@@ -13,6 +13,8 @@ Before=local-fs.target shutdown.target + + # Dracut informs us with this flag file if the root fsck was already run + ConditionPathExists=!/run/initramfs/root-fsck ++# Detect SUSE initrd too ++ConditionPathExists=!/dev/shm/initrd_exports.sh + + [Service] + Type=oneshot +-- +1.7.3.4 + diff --git a/systemd-32.tar.bz2 b/systemd-32.tar.bz2 deleted file mode 100644 index cf746355..00000000 --- a/systemd-32.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:714bd00ceb44639a675e8a7b7ee4f6bff42b70a442110c70e64ff41056828dae -size 877943 diff --git a/systemd-33.tar.bz2 b/systemd-33.tar.bz2 new file mode 100644 index 00000000..e014b2bd --- /dev/null +++ b/systemd-33.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0de8b842841859b329dec26ecb3d7c10f6616ef80a074192800315893e3d5c3d +size 879459 diff --git a/systemd.changes b/systemd.changes index 37ff80fb..3e8caacd 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Aug 3 16:03:25 UTC 2011 - fcrozat@suse.com + +- Add root-fsck.patch: do not run fsck on / if it is rw +- Ship a non null localfs.service, fixes static mount points not + being mounted properly. + +------------------------------------------------------------------- +Wed Aug 3 07:11:33 UTC 2011 - aj@suse.de + +- Update to version 33: + * optimizations and bugfixes. + * New PrivateNetwork= service setting which allows you to shut off + networking for a specific service (i.e. all routable network + interfaces will disappear for that service). + * Merged insserv-parsing.patch and bash-completion-restart.patch + patches. + ------------------------------------------------------------------- Tue Aug 2 08:29:30 UTC 2011 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 2ec83934..e85217c7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -21,7 +21,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 32 +Version: 33 Release: 5 License: GPLv2+ Group: System/Base @@ -30,6 +30,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libudev-devel udev BuildRequires: dbus-1-devel BuildRequires: audit-devel +BuildRequires: gperf BuildRequires: libcap-devel BuildRequires: tcpd-devel BuildRequires: pam-devel @@ -46,16 +47,18 @@ Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 Source1: systemd-rpmlintrc +Source2: localfs.service Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.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. -# PATCH-FIX-UPSTREAM fcrozat@suse.com -- read/parse insserv.conf (git) -Patch2: insserv-parsing.patch -# PATCH-FIX-UPSTREAM fcrozat@suse.com bnc704782 -- fix bash completion for restart command (git) -Patch3: bash-completion-restart.patch +# PATCH-FIX-UPSTREAM aj@suse.de gperf: Include missing.h +Patch2: gperf-missing.patch +# PATCH-FIX-UPSTREAM fcrozat@suse.com -- don't run fsck on rw / +Patch3: root-fsck.patch + %description Systemd is a system and service manager, compatible with SysV and LSB @@ -161,7 +164,7 @@ ln -s /dev/null %{buildroot}/lib/systemd/system/kbd.service ln -s /dev/null %{buildroot}/lib/systemd/system/klog.service ln -s /dev/null %{buildroot}/lib/systemd/system/ldconfig.service ln -s /dev/null %{buildroot}/lib/systemd/system/loadmodules.service -ln -s /dev/null %{buildroot}/lib/systemd/system/localfs.service +install -m644 %{S:2} %{buildroot}/lib/systemd/system/localfs.service 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