SHA256
1
0
forked from pool/systemd

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
This commit is contained in:
Sascha Peilicke 2011-08-04 07:21:02 +00:00 committed by Git OBS Bridge
commit e740aeafdd
9 changed files with 86 additions and 152 deletions

View File

@ -1,43 +0,0 @@
From 54a437057e83ca41f329f010e2a0e968ed3880b2 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
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

25
gperf-missing.patch Normal file
View File

@ -0,0 +1,25 @@
From: Thierry Reding <thierry.reding@avionic-design.de>
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 <stddef.h>
#include "conf-parser.h"
#include "load-fragment.h"
+#include "missing.h"
%}
struct ConfigPerfItem;
%null_strings
--
1.7.6

View File

@ -1,100 +0,0 @@
From de3910a324aefcb15c26be27033d6917494e5946 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
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 <interactive>, not used, equivalent to X-Interactive */
+ if (parsed && !startswith_no_case (parsed[0], "<interactive>")) {
+ 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

6
localfs.service Normal file
View File

@ -0,0 +1,6 @@
[Unit]
Description=Shadow /etc/init.d/boot.localfs
[Service]
RemainAfterExit=true
ExecStart=/bin/true

25
root-fsck.patch Normal file
View File

@ -0,0 +1,25 @@
From 687d70cc43b34eb2359598d0ca0b69e996aa1b38 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:714bd00ceb44639a675e8a7b7ee4f6bff42b70a442110c70e64ff41056828dae
size 877943

3
systemd-33.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0de8b842841859b329dec26ecb3d7c10f6616ef80a074192800315893e3d5c3d
size 879459

View File

@ -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

View File

@ -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