SHA256
1
0
forked from pool/systemd

Accepting request 85813 from home:fcrozat:systemd

- Update to version 36 :
  - many bugfixes
  - systemd now requires socket-activated syslog implementations
  - After=syslog.target is no longer needed in .service files
  - X-Interactive is ignored in LSB headers (was not working)
- Enable back insserv.conf parsing in systemd core and fix added
  dependencies (bnc#721428).
- Fix detection of LSB services status when running daemon
  (bnc#721426).
- Drop 0001-execute-fix-bus-serialization-for-commands.patch,
  fix-reload.patch

OBS-URL: https://build.opensuse.org/request/show/85813
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=204
This commit is contained in:
Frederic Crozat 2011-09-30 15:58:39 +00:00 committed by Git OBS Bridge
parent d7a8930eb1
commit 9ac6f10566
13 changed files with 137 additions and 217 deletions

View File

@ -1,44 +0,0 @@
From 7daa9e6e29b546275566084512ea4e547bc79b91 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 29 Aug 2011 19:44:52 +0200
Subject: [PATCH] execute: fix bus serialization for commands
---
src/dbus-execute.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/dbus-execute.c b/src/dbus-execute.c
index 6ceffc5..201f6b5 100644
--- a/src/dbus-execute.c
+++ b/src/dbus-execute.c
@@ -308,13 +308,14 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
assert(i);
assert(property);
- if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttuii)", &sub))
+ if (!dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(sasbttttuii)", &sub))
return -ENOMEM;
LIST_FOREACH(command, c, c) {
char **l;
uint32_t pid;
int32_t code, status;
+ dbus_bool_t b;
if (!c->path)
continue;
@@ -332,8 +333,10 @@ int bus_execute_append_command(DBusMessageIter *i, const char *property, void *d
code = (int32_t) c->exec_status.code;
status = (int32_t) c->exec_status.status;
+ b = !!c->ignore;
+
if (!dbus_message_iter_close_container(&sub2, &sub3) ||
- !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &c->ignore) ||
+ !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_BOOLEAN, &b) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.realtime) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.start_timestamp.monotonic) ||
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT64, &c->exec_status.exit_timestamp.realtime) ||
--
1.7.3.4

View File

@ -1,4 +1,4 @@
From 07f0fb4424105c0e90e2add79efe48109b6c9fd1 Mon Sep 17 00:00:00 2001
From 5c894bc1e45f7c34bf7fc4ca0d20bf1c3b679bef Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Thu, 18 Aug 2011 18:28:01 +0200
Subject: [PATCH] handle disable_caplock and compose_table and kbd_rate
@ -8,18 +8,18 @@ Subject: [PATCH] handle disable_caplock and compose_table and kbd_rate
1 files changed, 121 insertions(+), 3 deletions(-)
diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c
index 4347a20..af558ef 100644
index c5f3628..6603a75 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole-setup.c
@@ -39,6 +39,7 @@
#include "util.h"
@@ -40,6 +40,7 @@
#include "log.h"
#include "macro.h"
#include "virt.h"
+#include "strv.h"
static bool is_vconsole(int fd) {
unsigned char data[1];
@@ -78,8 +79,8 @@ static int disable_utf8(int fd) {
@@ -79,8 +80,8 @@ static int disable_utf8(int fd) {
return r;
}
@ -30,7 +30,7 @@ index 4347a20..af558ef 100644
int i = 0;
pid_t pid;
@@ -98,6 +99,8 @@ static int load_keymap(const char *vc, const char *map, const char *map_toggle,
@@ -99,6 +100,8 @@ static int load_keymap(const char *vc, const char *map, const char *map_toggle,
args[i++] = map;
if (map_toggle)
args[i++] = map_toggle;
@ -39,7 +39,7 @@ index 4347a20..af558ef 100644
args[i++] = NULL;
if ((pid = fork()) < 0) {
@@ -149,6 +152,96 @@ static int load_font(const char *vc, const char *font, const char *map, const ch
@@ -150,6 +153,96 @@ static int load_font(const char *vc, const char *font, const char *map, const ch
return 0;
}
@ -136,7 +136,7 @@ index 4347a20..af558ef 100644
int main(int argc, char **argv) {
const char *vc;
char *vc_keymap = NULL;
@@ -162,8 +255,16 @@ int main(int argc, char **argv) {
@@ -163,8 +256,16 @@ int main(int argc, char **argv) {
#ifdef TARGET_MANDRIVA
char *vc_keytable = NULL;
#endif
@ -153,7 +153,7 @@ index 4347a20..af558ef 100644
int r = EXIT_FAILURE;
pid_t font_pid = 0, keymap_pid = 0;
@@ -268,6 +369,10 @@ int main(int argc, char **argv) {
@@ -265,6 +366,10 @@ int main(int argc, char **argv) {
#elif defined(TARGET_SUSE)
if ((r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
"KEYTABLE", &vc_keymap,
@ -164,7 +164,7 @@ index 4347a20..af558ef 100644
NULL)) < 0) {
if (r != -ENOENT)
@@ -283,6 +388,7 @@ int main(int argc, char **argv) {
@@ -280,6 +385,7 @@ int main(int argc, char **argv) {
if (r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
}
@ -172,7 +172,7 @@ index 4347a20..af558ef 100644
#elif defined(TARGET_ARCH)
if ((r = parse_env_file("/etc/rc.conf", NEWLINE,
@@ -439,7 +545,11 @@ int main(int argc, char **argv) {
@@ -436,7 +542,11 @@ int main(int argc, char **argv) {
if (!utf8)
disable_utf8(fd);
@ -185,7 +185,7 @@ index 4347a20..af558ef 100644
load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
r = EXIT_SUCCESS;
@@ -447,6 +557,14 @@ finish:
@@ -444,6 +554,14 @@ finish:
if (keymap_pid > 0)
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);

View File

@ -0,0 +1,44 @@
From 6620bceb7233a830be3635a4f7a7dc75c13a9c8e Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 30 Sep 2011 14:12:45 +0200
Subject: [PATCH] service: Fix dependencies added when parsing insserv.conf
---
src/service.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/service.c b/src/service.c
index c2053ce..4abc7e7 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3031,18 +3031,20 @@ static void sysv_facility_in_insserv_conf(Manager *mgr) {
char *dep = NULL, *name, **j;
STRV_FOREACH (j, parsed+1) {
- if (*j[0]=='+') {
- e = UNIT_WANTS;
+ if (*j[0]=='+')
name = *j+1;
- }
- else {
- e = UNIT_REQUIRES;
+ else
name = *j;
- }
+ if (streq(name, "boot.localfs") ||
+ streq(name, "boot.crypto"))
+ continue;
+
if (sysv_translate_facility(name, NULL, &dep) < 0)
continue;
- r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true);
+ r = unit_add_dependency_by_name_inverse(u, UNIT_BEFORE, dep, NULL, true);
+ if (*j[0]!='+')
+ r = unit_add_dependency_by_name(u, UNIT_REQUIRES, dep, NULL, true);
free(dep);
}
}
--
1.7.3.4

View File

@ -0,0 +1,38 @@
From 700b1261115a67392014ff2c887a9cffc28108ab Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 30 Sep 2011 12:58:17 +0200
Subject: [PATCH] service: flags sysv service with detected pid as RemainAfterExit=false
LSB header doesn't give pidfile, so all LSB initscripts have
RemainAfterExit=false, causing daemon termination to not be reported as
such by systemd. Checking at startup if daemon is still running for
sysv initscript to disable RemainAfterExit helps a lot.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=721426
---
src/service.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/service.c b/src/service.c
index 6b7064a..eb2699c 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2012,9 +2012,15 @@ static void service_enter_running(Service *s, bool success) {
main_pid_ok = main_pid_good(s);
cgroup_ok = cgroup_good(s);
+
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
- (s->bus_name_good || s->type != SERVICE_DBUS))
+ (s->bus_name_good || s->type != SERVICE_DBUS)) {
+#ifdef HAVE_SYSV_COMPAT
+ if (s->sysv_enabled && !s->pid_file)
+ s->remain_after_exit = false;
+#endif
service_set_state(s, SERVICE_RUNNING);
+ }
else if (s->remain_after_exit)
service_set_state(s, SERVICE_EXITED);
else
--
1.7.3.4

View File

@ -1,43 +0,0 @@
From a82e5507a6e03766957d43ca8818112ae9766288 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Thu, 22 Sep 2011 21:32:18 +0200
Subject: [PATCH] unit: don't recheck conditions when a unit is already starting but unit_start() is invoked
---
src/unit.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/unit.c b/src/unit.c
index 3ce87ea..0b435cb 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -888,16 +888,20 @@ int unit_start(Unit *u) {
if (u->meta.load_state != UNIT_LOADED)
return -EINVAL;
- /* If this is already (being) started, then this will
- * succeed. Note that this will even succeed if this unit is
- * not startable by the user. This is relied on to detect when
- * we need to wait for units and when waiting is finished. */
+ /* If this is already started, then this will succeed. Note
+ * that this will even succeed if this unit is not startable
+ * by the user. This is relied on to detect when we need to
+ * wait for units and when waiting is finished. */
state = unit_active_state(u);
if (UNIT_IS_ACTIVE_OR_RELOADING(state))
return -EALREADY;
- /* If the conditions failed, don't do anything at all */
- if (!unit_condition_test(u)) {
+ /* If the conditions failed, don't do anything at all. If we
+ * already are activating this call might still be useful to
+ * speed up activation in case there is some hold-off time,
+ * but we don't want to recheck the condition in that case. */
+ if (state != UNIT_ACTIVATING &&
+ !unit_condition_test(u)) {
log_debug("Starting of %s requested but condition failed. Ignoring.", u->meta.id);
return -EALREADY;
}
--
1.7.3.4

View File

@ -1,103 +0,0 @@
From b0ff66c6e92ca9d9458f3236ee37397635bb0f0e Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 9 Sep 2011 11:19:26 +0200
Subject: [PATCH] Revert "service: parse insserv.conf and plugs its system facilities into systemd."
Let's use a generator instead
This reverts commit de3910a324aefcb15c26be27033d6917494e5946.
---
src/service.c | 70 ---------------------------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/src/service.c b/src/service.c
index abd8f36..37cb0bc 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2969,72 +2969,6 @@ 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;
@@ -3183,10 +3117,6 @@ 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

View File

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

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

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

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Fri Sep 30 13:55:31 UTC 2011 - fcrozat@suse.com
- Update to version 36 :
- many bugfixes
- systemd now requires socket-activated syslog implementations
- After=syslog.target is no longer needed in .service files
- X-Interactive is ignored in LSB headers (was not working)
- Enable back insserv.conf parsing in systemd core and fix added
dependencies (bnc#721428).
- Fix detection of LSB services status when running daemon
(bnc#721426).
- Drop 0001-execute-fix-bus-serialization-for-commands.patch,
fix-reload.patch
-------------------------------------------------------------------
Thu Sep 29 16:08:33 UTC 2011 - fcrozat@suse.com

View File

@ -20,8 +20,8 @@
Name: systemd-gtk
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 34
Release: 5
Version: 36
Release: 1
License: GPLv2+
Group: System/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-build

View File

@ -25,7 +25,7 @@ while read line ; do
stripped_dep=${dep/boot./}
case "$stripped_dep" in
+*) ln -s -f /lib/systemd/system/${facilities[${stripped_dep:2}]:-${stripped_dep:1}.service} $1/$target.wants/ ;;
*) ln -s -f /lib/systemd/system/${facilities[${stripped_dep:1}]:-${stripped_dep}.service} $1/$target.wants/ ;;
*) ln -s -f /lib/systemd/system/${facilities[${stripped_dep:1}]:-${stripped_dep}.service} $1/$target.requires/ ;;
esac
done
;;

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Fri Sep 30 13:55:31 UTC 2011 - fcrozat@suse.com
- Update to version 36 :
- many bugfixes
- systemd now requires socket-activated syslog implementations
- After=syslog.target is no longer needed in .service files
- X-Interactive is ignored in LSB headers (was not working)
- Enable back insserv.conf parsing in systemd core and fix added
dependencies (bnc#721428).
- Fix detection of LSB services status when running daemon
(bnc#721426).
- Drop 0001-execute-fix-bus-serialization-for-commands.patch,
fix-reload.patch
-------------------------------------------------------------------
Thu Sep 29 16:08:33 UTC 2011 - fcrozat@suse.com

View File

@ -21,8 +21,8 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 34
Release: 5
Version: 36
Release: 1
License: GPLv2+
Group: System/Base
Summary: A System and Session Manager
@ -63,15 +63,13 @@ Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch
Patch6: 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch
# don't start getty on tty1 until all password request are done
Patch8: tty1.patch
Patch10: revert_insserv_conf_parsing.patch
Patch10: 0001-service-Fix-dependencies-added-when-parsing-insserv..patch
Patch13: 0001-service-flags-sysv-service-with-detected-pid-as-Rema.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.
Patch9: 0001-execute-fix-bus-serialization-for-commands.patch
# PATCH-FIX-UPSTREAM fix-reload.patch fcrozat@suse.com bnc#719221 -- Fix daemon-reload and conditions when service is starting
Patch11: fix-reload.patch
Patch12: detect-non-running.patch
%description
@ -125,10 +123,9 @@ Plymouth integration for systemd
%patch1 -p1
%patch6 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%build
autoreconf -fiv
@ -151,7 +148,8 @@ install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/lib/systemd/{system.preset,user.preset}
install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert
install -m755 %{S:5} %{buildroot}/lib/systemd/system-generators
# do not install, code has been fixed, might be useful in the future
#install -m755 %{S:5} %{buildroot}/lib/systemd/system-generators
install -m755 %{S:7} %{buildroot}/lib/systemd/
install -m644 %{S:8} %{S:9} %{S:10} %{buildroot}/lib/systemd/system/
ln -s ../bootsplash-startup.service %{buildroot}/lib/systemd/system/basic.target.wants/