Hello community, here is the log from the commit of package systemd for openSUSE:Factory checked in at Thu Aug 25 10:07:32 CEST 2011. -------- --- systemd/systemd.changes 2011-08-19 10:39:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/systemd/systemd.changes 2011-08-24 17:35:40.000000000 +0200 @@ -1,0 +2,22 @@ +Wed Aug 24 13:02:12 UTC 2011 - fcrozat@novell.com + +- Add tty1.patch: ensure passphrase are handled before starting + gettty on tty1. +- Add inittab generator, creating default.target at startup based + on /etc/inittab value. +- No longer try to create /etc/systemd/system/default.target at + initial package install (bnc#707418) +- Fix configuration path used for systemd user manager. +- Ensure pam-config output is no display in install script. +- Remove buildrequires on vala, no longer needed. + +------------------------------------------------------------------- +Fri Aug 19 15:29:49 UTC 2011 - fcrozat@suse.com + +- Handle disable_capslock, compose table and kbd_rate +- Add rpm macros.systemd file. +- Do not disable klogd, it has its own service now. +- Handle kexec correctly (bnc#671673). +- Disable preload services, they are conflicting with systemd. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch 0001-initctl-check-for-kexec_loaded-when-reboot-is-reques.patch 0001-path-lookup-monitor-etc-systemd-user-for-user-manage.patch macros.systemd systemd-inittab systemd-sysv-convert tty1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd.spec ++++++ --- /var/tmp/diff_new_pack.XCctEa/_old 2011-08-25 10:04:04.000000000 +0200 +++ /var/tmp/diff_new_pack.XCctEa/_new 2011-08-25 10:04:04.000000000 +0200 @@ -22,7 +22,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 33 -Release: 13 +Release: 15 License: GPLv2+ Group: System/Base Summary: A System and Session Manager @@ -36,7 +36,7 @@ BuildRequires: pam-devel BuildRequires: libcryptsetup-devel BuildRequires: pkg-config -BuildRequires: gtk2-devel libnotify-devel libxslt-devel vala +BuildRequires: gtk2-devel libnotify-devel libxslt-devel BuildRequires: libselinux-devel libsepol-devel BuildRequires: intltool Requires: udev >= 172 @@ -49,7 +49,14 @@ Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 Source1: systemd-rpmlintrc Source2: localfs.service +Source3: systemd-sysv-convert +Source4: macros.systemd +Source5: systemd-inittab Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch +# handle SUSE specific kbd settings +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 # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -63,6 +70,10 @@ Patch4: systemd-cryptsetup-query.patch # PATCH-FIX-UPSTREAM aj@suse.com -- fix crash on systemctl enable Patch5: fix-crash.patch +# PATCH-FIX-UPSTREAM fcrozat@suse.com bnc671673 -- fix kexec support +Patch7: 0001-initctl-check-for-kexec_loaded-when-reboot-is-reques.patch +# PATCH-FIX-UPSTREAM fcrozat@suse.com -- don't look for system manager configuration when running user manager +Patch9: 0001-path-lookup-monitor-etc-systemd-user-for-user-manage.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -127,6 +138,10 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build autoreconf -fiv @@ -139,14 +154,16 @@ --docdir=%{_docdir}/systemd \ --with-rootdir= \ CFLAGS="%{optflags}" -# rebuild due to libnotify 0.7 in factory -touch *.vala */*.vala make %{?_smp_mflags} %install %makeinstall +mkdir -p %{buildroot}%{_sysconfdir}/rpm +install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -exec rm -f {} ';' -mkdir -p %{buildroot}/sbin +mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} +install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert +install -m755 %{S:5} %{buildroot}/lib/systemd/system-generators ln -s ../bin/systemd %{buildroot}/sbin/init ln -s ../bin/systemctl %{buildroot}/sbin/reboot ln -s ../bin/systemctl %{buildroot}/sbin/halt @@ -156,6 +173,7 @@ ln -s ../bin/systemctl %{buildroot}/sbin/runlevel rm -rf %{buildroot}/etc/systemd/system/*.target.wants rm -f %{buildroot}/etc/systemd/system/default.target +rm -f %{buildroot}/lib/systemd/system/default.target %if !%{build_plymouth} rm -f %{buildroot}/lib/systemd/system/plymouth-*.service rm -f %{buildroot}/lib/systemd/system/*.wants/plymouth-*.service @@ -169,7 +187,6 @@ ln -s /dev/null %{buildroot}/lib/systemd/system/crypto-early.service ln -s /dev/null %{buildroot}/lib/systemd/system/earlysyslog.service 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 install -m644 %{S:2} %{buildroot}/lib/systemd/system/localfs.service @@ -177,6 +194,9 @@ 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/swap.service +ln -s /dev/null %{buildroot}/lib/systemd/system/startpreload.service +ln -s /dev/null %{buildroot}/lib/systemd/system/stoppreload.service +ln -s /dev/null %{buildroot}/lib/systemd/system/earlyxdm.service ln -s systemd-sysctl.service %{buildroot}/lib/systemd/system/sysctl.service ln -s systemd-random-seed-load.service %{buildroot}/lib/systemd/system/random.service %if %{build_plymouth} @@ -184,19 +204,14 @@ %endif %post -/usr/sbin/pam-config -a --systemd || : +/usr/sbin/pam-config -a --systemd >/dev/null 2>&1 || : +/sbin/ldconfig /bin/systemd-machine-id-setup >/dev/null 2>&1 || : /bin/systemctl daemon-reexec >/dev/null 2>&1 || : -/sbin/ldconfig # Create default config in /etc at first install. # Later package updates should not overwrite these settings. if [ "$1" -eq 1 ]; then - # Try to read default runlevel from the old inittab if it exists - runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) - if [ -n "$runlevel" ] ; then - /bin/ln -sf /lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target 2>&1 || : - fi # Enable these services by default. /bin/systemctl enable \ getty@.service \ @@ -211,7 +226,7 @@ /bin/systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : fi if [ $1 -eq 0 ]; then - /usr/sbin/pam-config -d --systemd || : + /usr/sbin/pam-config -d --systemd >/dev/null 2>&1 || : fi %preun @@ -240,6 +255,7 @@ /usr/bin/systemd-nspawn /usr/bin/systemd-stdio-bridge /usr/bin/systemd-analyze +%{_sbindir}/systemd-sysv-convert %{_libdir}/libsystemd-daemon.so.* %{_libdir}/libsystemd-login.so.* %{_bindir}/systemd-cgls @@ -313,6 +329,10 @@ %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/bash_completion.d /etc/bash_completion.d/systemctl-bash-completion.sh +/etc/rpm/macros.systemd +%dir /var/lib/systemd +%dir /var/lib/systemd/sysv-convert +%dir /var/lib/systemd/migrated %files gtk %defattr(-,root,root,-) ++++++ 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch ++++++
From e183dbe195058ef921c4bd9760dc3631b425dd92 Mon Sep 17 00:00:00 2001 From: Frederic Crozat
Date: Thu, 18 Aug 2011 18:28:01 +0200 Subject: [PATCH] handle disable_caplock and compose_table and kbd_rate
--- src/vconsole-setup.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 90 insertions(+), 3 deletions(-) diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c index 4347a20..28dc1d9 100644 --- a/src/vconsole-setup.c +++ b/src/vconsole-setup.c @@ -39,6 +39,7 @@ #include "util.h" #include "log.h" #include "macro.h" +#include "strv.h" static bool is_vconsole(int fd) { unsigned char data[1]; @@ -78,8 +79,8 @@ static int disable_utf8(int fd) { return r; } -static int load_keymap(const char *vc, const char *map, const char *map_toggle, bool utf8, pid_t *_pid) { - const char *args[8]; +static int load_keymap(const char *vc, const char *map, const char *map_toggle, bool utf8, bool disable_capslock, const char *compose_table, pid_t *_pid) { + const char *args[1024]; int i = 0; pid_t pid; @@ -98,6 +99,35 @@ static int load_keymap(const char *vc, const char *map, const char *map_toggle, args[i++] = map; if (map_toggle) args[i++] = map_toggle; + if (disable_capslock) + args[i++] = "disable.capslock"; + if (compose_table) { + char **strv_compose_table = NULL; + + strv_compose_table = strv_split(compose_table, WHITESPACE); + if (strv_compose_table) { + bool compose_loaded = false; + bool compose_clear = false; + char **name; + char *arg; + + STRV_FOREACH (name, strv_compose_table) { + if (streq(*name,"-c") || streq(*name,"clear")) { + compose_clear = true; + continue; + } + if (!compose_loaded) { + if (compose_clear) + args[i++] = "-c"; + } + asprintf(&arg, "compose.%s",*name); + compose_loaded = true; + args[i++] = arg; + + } + } + strv_free(strv_compose_table); + } args[i++] = NULL; if ((pid = fork()) < 0) { @@ -149,6 +179,42 @@ static int load_font(const char *vc, const char *font, const char *map, const ch return 0; } +#ifdef TARGET_SUSE +static int set_kbd_rate(const char *vc, const char *kbd_rate, const char *kbd_delay, pid_t *_pid) { + const char *args[7]; + int i = 0; + pid_t pid; + + if (isempty(kbd_rate) && isempty(kbd_delay)) { + *_pid = 0; + return 0; + } + + args[i++] = "/bin/kbdrate"; + if (!isempty(kbd_rate)) { + args[i++] = "-r"; + args[i++] = kbd_rate; + } + if (!isempty(kbd_delay)) { + args[i++] = "-d"; + args[i++] = kbd_delay; + } + args[i++] = "-s"; + args[i++] = NULL; + + if ((pid = fork()) < 0) { + log_error("Failed to fork: %m"); + return -errno; + } else if (pid == 0) { + execv(args[0], (char **) args); + _exit(EXIT_FAILURE); + } + + *_pid = pid; + return 0; +} +#endif + int main(int argc, char **argv) { const char *vc; char *vc_keymap = NULL; @@ -156,14 +222,22 @@ int main(int argc, char **argv) { char *vc_font = NULL; char *vc_font_map = NULL; char *vc_font_unimap = NULL; + char *vc_compose_table = NULL; #ifdef TARGET_GENTOO char *vc_unicode = NULL; #endif #ifdef TARGET_MANDRIVA char *vc_keytable = NULL; #endif +#ifdef TARGET_SUSE + char *vc_kbd_delay = NULL; + char *vc_kbd_rate = NULL; + char *vc_kbd_disable_caps_lock = NULL; + pid_t kbd_rate_pid = 0; +#endif int fd = -1; bool utf8; + bool disable_capslock = false; int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; @@ -268,6 +342,10 @@ int main(int argc, char **argv) { #elif defined(TARGET_SUSE) if ((r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, "KEYTABLE", &vc_keymap, + "KBD_DELAY", &vc_kbd_delay, + "KBD_RATE", &vc_kbd_rate, + "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, + "COMPOSETABLE", &vc_compose_table, NULL)) < 0) { if (r != -ENOENT) @@ -283,6 +361,7 @@ int main(int argc, char **argv) { if (r != -ENOENT) log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); } + disable_capslock = strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; #elif defined(TARGET_ARCH) if ((r = parse_env_file("/etc/rc.conf", NEWLINE, @@ -439,7 +518,10 @@ int main(int argc, char **argv) { if (!utf8) disable_utf8(fd); - if (load_keymap(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 && + if (load_keymap(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, vc_compose_table, &keymap_pid) >= 0 && +#ifdef TARGET_SUSE + set_kbd_rate(vc, vc_kbd_rate, vc_kbd_delay, &kbd_rate_pid) >= 0 && +#endif load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) r = EXIT_SUCCESS; @@ -447,6 +529,11 @@ finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); +#ifdef TARGET_SUSE + if (kbd_rate_pid > 0) + wait_for_terminate_and_warn("/bin/kbdrate", kbd_rate_pid); +#endif + if (font_pid > 0) wait_for_terminate_and_warn(KBD_SETFONT, font_pid); -- 1.7.3.4 ++++++ 0001-initctl-check-for-kexec_loaded-when-reboot-is-reques.patch ++++++
From b1e304bb59e1a80abacfd6f0377ae14c3c1a10cc Mon Sep 17 00:00:00 2001 From: Frederic Crozat
Date: Mon, 22 Aug 2011 14:58:50 +0200 Subject: [PATCH] initctl: check for kexec_loaded when reboot is requested through initctl
--- src/initctl.c | 2 ++ src/systemctl.c | 12 ------------ src/util.c | 12 ++++++++++++ src/util.h | 2 ++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/initctl.c b/src/initctl.c index f36f1cc..eaa717a 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -93,6 +93,8 @@ static const char *translate_runlevel(int runlevel, bool *isolate) { for (i = 0; i < ELEMENTSOF(table); i++) if (table[i].runlevel == runlevel) { *isolate = table[i].isolate; + if (runlevel == '6' && kexec_loaded()) + return SPECIAL_KEXEC_TARGET; return table[i].special; } diff --git a/src/systemctl.c b/src/systemctl.c index bb998d3..0ff9221 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -4403,18 +4403,6 @@ static int parse_time_spec(const char *t, usec_t *_u) { return 0; } -static bool kexec_loaded(void) { - bool loaded = false; - char *s; - - if (read_one_line_file("/sys/kernel/kexec_loaded", &s) >= 0) { - if (s[0] == '1') - loaded = true; - free(s); - } - return loaded; -} - static int shutdown_parse_argv(int argc, char *argv[]) { enum { diff --git a/src/util.c b/src/util.c index 8d54049..247156d 100644 --- a/src/util.c +++ b/src/util.c @@ -5680,3 +5680,15 @@ static const char *const signal_table[] = { }; DEFINE_STRING_TABLE_LOOKUP(signal, int); + +bool kexec_loaded(void) { + bool loaded = false; + char *s; + + if (read_one_line_file("/sys/kernel/kexec_loaded", &s) >= 0) { + if (s[0] == '1') + loaded = true; + free(s); + } + return loaded; +} diff --git a/src/util.h b/src/util.h index 407160d..8b31e5b 100644 --- a/src/util.h +++ b/src/util.h @@ -497,4 +497,6 @@ int signal_from_string_try_harder(const char *s); extern int saved_argc; extern char **saved_argv; +bool kexec_loaded(void); + #endif -- 1.7.3.4 ++++++ 0001-path-lookup-monitor-etc-systemd-user-for-user-manage.patch ++++++
From 1cf32c016f97b2c99d7df06ce5d5b858f86c507a Mon Sep 17 00:00:00 2001 From: Frederic Crozat
Date: Wed, 24 Aug 2011 13:39:06 +0200 Subject: [PATCH] path-lookup: monitor /etc/systemd/user for user manager
---
src/path-lookup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/path-lookup.c b/src/path-lookup.c
index bed9175..5f5ad8c 100644
--- a/src/path-lookup.c
+++ b/src/path-lookup.c
@@ -209,7 +209,7 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as, bool personal
* the arrays in user_dirs() above! */
"/run/systemd/user",
USER_CONFIG_UNIT_PATH,
- "/etc/systemd/system",
+ "/etc/systemd/user",
"/usr/local/lib/systemd/user",
"/usr/local/share/systemd/user",
USER_DATA_UNIT_PATH,
--
1.7.3.4
++++++ macros.systemd ++++++
# RPM macros for packages installing systemd unit files
#
###
#
# When a package install systemd unit files, it should use the following macros:
#
# add %systemd_requires in the specfile
#
# %post
# %service_add demo.service demo1.service
#
# %preun
# %service_del_preun demo.service
#
# %postun
# %service_del_postun demo.service
#
#
# when migrating a package from sysvinit to systemd :
# %triggerun -- package_name < version_where_switch_occured
# %service_migrate_to_systemd [ -l run_level ] service_name.service
# foobar.socket
#
# -l