From 3135dd09a9ca2961ef7bafccfa8ba79c4566f9cad67ab5b7d3513aea8678cda0 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Tue, 2 Apr 2013 08:35:42 +0000 Subject: [PATCH 1/9] Accepting request 162067 from home:rmilasan:branches:Base:System - udev: ensure that the network interfaces are renamed even if they exist (bnc#809843). add: 1027-udev-always-rename-network.patch - udev: re-add persistent network rules (bnc#809843). add: 1026-re-add-persistent-net.patch - rebase all patches, ensure that they apply properly. - udev: ensure that the network interfaces are renamed even if they exist (bnc#809843). add: 1027-udev-always-rename-network.patch OBS-URL: https://build.opensuse.org/request/show/162067 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=359 --- 1027-udev-always-rename-network.patch | 67 +++++++++++++++++++++++++++ systemd-mini.changes | 14 ++++++ systemd-mini.spec | 8 ++++ systemd.changes | 7 +++ systemd.spec | 3 ++ 5 files changed, 99 insertions(+) create mode 100644 1027-udev-always-rename-network.patch diff --git a/1027-udev-always-rename-network.patch b/1027-udev-always-rename-network.patch new file mode 100644 index 00000000..3ed6e26d --- /dev/null +++ b/1027-udev-always-rename-network.patch @@ -0,0 +1,67 @@ +Index: systemd-195/src/udev/udev-event.c +=================================================================== +--- systemd-195.orig/src/udev/udev-event.c ++++ systemd-195/src/udev/udev-event.c +@@ -750,6 +750,7 @@ static int rename_netif(struct udev_even + struct udev_device *dev = event->dev; + int sk; + struct ifreq ifr; ++ int loop; + int err; + + log_debug("changing net interface name from '%s' to '%s'\n", +@@ -766,12 +767,51 @@ static int rename_netif(struct udev_even + util_strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev)); + util_strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); + err = ioctl(sk, SIOCSIFNAME, &ifr); +- if (err >= 0) { ++ if (err == 0) { + print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); +- } else { ++ goto out; ++ } ++ ++ /* keep trying if the destination interface name already exists */ ++ err = -errno; ++ if (err != -EEXIST) { ++ goto out; ++ } ++ ++ /* free our own name, another process may wait for us */ ++ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev)); ++ err = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (err < 0) { + err = -errno; +- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); ++ goto out; + } ++ ++ /* log temporary name */ ++ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); ++ ++ /* wait a maximum of 90 seconds for our target to become available */ ++ util_strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname); ++ util_strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); ++ loop = 90 * 20; ++ while (loop--) { ++ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 }; ++ ++ log_debug("wait for netif '%s' to become free, loop=%i\n", event->name, (90 * 20) - loop); ++ nanosleep(&duration, NULL); ++ ++ err = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (err == 0) { ++ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); ++ break; ++ } ++ err = -errno; ++ if (err != -EEXIST) ++ break; ++ } ++ ++out: ++ if (err < 0) ++ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); + close(sk); + return err; + } diff --git a/systemd-mini.changes b/systemd-mini.changes index bad5b461..bb9a582c 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com + +- udev: ensure that the network interfaces are renamed even if they + exist (bnc#809843). + add: 1027-udev-always-rename-network.patch + +------------------------------------------------------------------- +Wed Mar 20 10:14:59 UTC 2013 - rmilasan@suse.com + +- udev: re-add persistent network rules (bnc#809843). + add: 1026-re-add-persistent-net.patch +- rebase all patches, ensure that they apply properly. + ------------------------------------------------------------------- Thu Feb 21 14:45:12 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index f8e9e65e..a4426a6b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -334,6 +334,10 @@ Patch1023: 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch Patch1024: 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch # PATCH-FIX-UPSTREAM 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch Patch1025: 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch +# PATCH-FIX-OPENSUSE 1026-re-add-persistent-net.patch +Patch1026: 1026-re-add-persistent-net.patch +# PATCH-FIX-OPENSUSE 1027-udev-always-rename-network.patch +Patch1027: 1027-udev-always-rename-network.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -519,6 +523,8 @@ cp %{SOURCE7} m4/ %patch1023 -p1 %patch1024 -p1 %patch1025 -p1 +%patch1026 -p1 +%patch1027 -p1 #systemd %patch1 -p1 @@ -1127,6 +1133,8 @@ fi %{_prefix}/lib/udev/scsi_id %{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/write_dev_root_rule +%{_prefix}/lib/udev/write_net_rules +%{_prefix}/lib/udev/rule_generator.functions %dir %{_prefix}/lib/udev/keymaps %{_prefix}/lib/udev/keymaps/* %{_prefix}/lib/udev/keyboard-force-release.sh diff --git a/systemd.changes b/systemd.changes index 83663a86..bb9a582c 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com + +- udev: ensure that the network interfaces are renamed even if they + exist (bnc#809843). + add: 1027-udev-always-rename-network.patch + ------------------------------------------------------------------- Wed Mar 20 10:14:59 UTC 2013 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index efa76c0a..1f84175b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -331,6 +331,8 @@ Patch1024: 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch Patch1025: 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch # PATCH-FIX-OPENSUSE 1026-re-add-persistent-net.patch Patch1026: 1026-re-add-persistent-net.patch +# PATCH-FIX-OPENSUSE 1027-udev-always-rename-network.patch +Patch1027: 1027-udev-always-rename-network.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -517,6 +519,7 @@ cp %{SOURCE7} m4/ %patch1024 -p1 %patch1025 -p1 %patch1026 -p1 +%patch1027 -p1 #systemd %patch1 -p1 From 8c41c28b11897d979d433e5e3048380b17868d37c309780a407400b3a83739d6 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Wed, 3 Apr 2013 07:18:50 +0000 Subject: [PATCH 2/9] Accepting request 162277 from home:sbrabec:branches:Base:System - Fixed disabling CapsLock and enabling NumLock (bnc#746595, 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, systemd-numlock-suse.patch). - Explicitly require libgcrypt-devel to fix build failure. OBS-URL: https://build.opensuse.org/request/show/162277 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=360 --- ...aplock-and-compose_table-and-kbd_rat.patch | 22 +++++++++------ systemd-mini.changes | 8 ++++++ systemd-mini.spec | 1 + systemd-numlock-suse.patch | 28 +++++++++---------- systemd.changes | 8 ++++++ systemd.spec | 1 + 6 files changed, 45 insertions(+), 23 deletions(-) diff --git a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch b/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch index d04cb888..561a47f7 100644 --- a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch +++ b/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch @@ -158,12 +158,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; -@@ -273,10 +379,15 @@ int main(int argc, char **argv) { - free(vc_keymap); - vc_keymap = t; - } -+ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; - +@@ -277,6 +383,10 @@ int main(int argc, char **argv) { #elif defined(TARGET_SUSE) r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, "KEYTABLE", &vc_keymap, @@ -174,7 +169,16 @@ Index: systemd-195/src/vconsole/vconsole-setup.c NULL); if (r < 0 && r != -ENOENT) log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); -@@ -435,7 +546,11 @@ int main(int argc, char **argv) { +@@ -289,6 +399,8 @@ int main(int argc, char **argv) { + if (r < 0 && r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); + ++ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; ++ + #elif defined(TARGET_ARCH) + r = parse_env_file("/etc/rc.conf", NEWLINE, + "KEYMAP", &vc_keymap, +@@ -435,7 +547,11 @@ int main(int argc, char **argv) { disable_utf8(fd); @@ -187,7 +191,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) r = EXIT_SUCCESS; -@@ -443,6 +558,14 @@ finish: +@@ -443,6 +559,14 @@ finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); @@ -202,7 +206,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c if (font_pid > 0) wait_for_terminate_and_warn(KBD_SETFONT, font_pid); -@@ -450,6 +573,12 @@ finish: +@@ -450,6 +574,12 @@ finish: free(vc_font); free(vc_font_map); free(vc_font_unimap); diff --git a/systemd-mini.changes b/systemd-mini.changes index bb9a582c..7beeb90a 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz + +- Fixed disabling CapsLock and enabling NumLock (bnc#746595, + 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, + systemd-numlock-suse.patch). +- Explicitly require libgcrypt-devel to fix build failure. + ------------------------------------------------------------------- Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index a4426a6b..506d62e2 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -62,6 +62,7 @@ BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} +BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 %endif diff --git a/systemd-numlock-suse.patch b/systemd-numlock-suse.patch index 1e89d398..104aa171 100644 --- a/systemd-numlock-suse.patch +++ b/systemd-numlock-suse.patch @@ -17,9 +17,17 @@ Index: systemd-195/src/vconsole/vconsole-setup.c int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; -@@ -380,6 +382,37 @@ int main(int argc, char **argv) { - vc_keymap = t; - } +@@ -386,6 +388,7 @@ int main(int argc, char **argv) { + "KBD_DELAY", &vc_kbd_delay, + "KBD_RATE", &vc_kbd_rate, + "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, ++ "KBD_NUMLOCK", &vc_kbd_numlock, + "COMPOSETABLE", &vc_compose_table, + NULL); + if (r < 0 && r != -ENOENT) +@@ -400,6 +403,37 @@ int main(int argc, char **argv) { + log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); + disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; + if (vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "BIOS") == 0) { + int hwinfo_fd[2]; @@ -53,17 +61,9 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + } else + numlock = vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "YES") == 0; - #elif defined(TARGET_SUSE) - r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, -@@ -387,6 +420,7 @@ int main(int argc, char **argv) { - "KBD_DELAY", &vc_kbd_delay, - "KBD_RATE", &vc_kbd_rate, - "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, -+ "KBD_NUMLOCK", &vc_kbd_numlock, - "COMPOSETABLE", &vc_compose_table, - NULL); - if (r < 0 && r != -ENOENT) -@@ -557,6 +591,10 @@ int main(int argc, char **argv) { + #elif defined(TARGET_ARCH) + r = parse_env_file("/etc/rc.conf", NEWLINE, +@@ -558,6 +592,10 @@ int main(int argc, char **argv) { finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); diff --git a/systemd.changes b/systemd.changes index bb9a582c..7beeb90a 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz + +- Fixed disabling CapsLock and enabling NumLock (bnc#746595, + 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch, + systemd-numlock-suse.patch). +- Explicitly require libgcrypt-devel to fix build failure. + ------------------------------------------------------------------- Thu Mar 28 09:24:43 UTC 2013 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 1f84175b..c8c21f9f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -57,6 +57,7 @@ BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} +BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(glib-2.0) >= 2.22.0 BuildRequires: pkgconfig(libcryptsetup) >= 1.4.2 %endif From e46422362e7d62a19018c32ace56e0ae6f71216a113c4f084b3c8ad90a2b01e6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 11 Apr 2013 10:11:09 +0000 Subject: [PATCH 3/9] Accepting request 163593 from home:fcrozat:branches:Base:System - Add improve-readahead-spinning.patch: improve readahead performance on spinning media with ext4. - Add fix-journal-vacuum-logic.patch: fix vacuum logic in journal (bnc#789589). - Add fix-lsb-provides.patch: ensure LSB provides are correctly handled if also referenced as dependencies (bnc#809646). - Add fix-loopback-mount.patch: ensure udevd is started (and therefore static devices are created) before mounting (bnc#809820). - Update systemd-sysv-convert to search services files in new location (bnc#809695). - Add logind-nvidia-acl.diff: set ACL on nvidia devices (bnc#808319). - Add do-no-isolate-on-fsck-failure.patch: do not turn off services if fsck fails (bnc#812874) - Add wait-for-processes-killed.patch: wait for processes killed by SIGTERM before killing them with SIGKILL. - Update systemctl-options.patch to only apply SYSTEMCTL_OPTIONS to systemctl command (bnc#801878). OBS-URL: https://build.opensuse.org/request/show/163593 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=361 --- do-no-isolate-on-fsck-failure.patch | 87 ++++++++++ fix-journal-vacuum-logic.patch | 40 +++++ fix-loopback-mount.patch | 10 ++ fix-lsb-provides.patch | 43 +++++ improve-readahead-spinning.patch | 221 ++++++++++++++++++++++++ logind-nvidia-acl.diff | 14 ++ systemctl-options.patch | 29 ++-- systemd-mini.changes | 23 +++ systemd-mini.spec | 21 +++ systemd-sysv-convert | 12 +- systemd.changes | 23 +++ systemd.spec | 21 +++ wait-for-processes-killed.patch | 249 ++++++++++++++++++++++++++++ 13 files changed, 773 insertions(+), 20 deletions(-) create mode 100644 do-no-isolate-on-fsck-failure.patch create mode 100644 fix-journal-vacuum-logic.patch create mode 100644 fix-loopback-mount.patch create mode 100644 fix-lsb-provides.patch create mode 100644 improve-readahead-spinning.patch create mode 100644 logind-nvidia-acl.diff create mode 100644 wait-for-processes-killed.patch diff --git a/do-no-isolate-on-fsck-failure.patch b/do-no-isolate-on-fsck-failure.patch new file mode 100644 index 00000000..bde866dc --- /dev/null +++ b/do-no-isolate-on-fsck-failure.patch @@ -0,0 +1,87 @@ +From 80cfe9e163b1c92f917e0a5e053b148fca790677 Mon Sep 17 00:00:00 2001 +From: "Dr. Tilmann Bubeck" +Date: Fri, 4 May 2012 10:32:47 +0200 +Subject: [PATCH] Do no isolate in case of emergency or severe problems + +This patch changes local-fs.target and systemd-fsck to not use +"isolate" when going into emergency. +This fixes https://bugzilla.redhat.com/show_bug.cgi?id=810722 + +The motivation is, that when something wents wrong, we should +keep everything as it is, to let the user fix the problem. When +isolating we stop a lot of services and therefore change the +system heavily so that it gets harder for the user to fix. + +An example is a crypted partition. When the fsck in a crypted +partition fails, it previously used "emergency/start/isolate" +which stops cryptsetup. Therefore if the user tries to fsck +e.g. /dev/mapper/luks-356c20ae-c7a2-4f1c-ae1d-1d290a91b691 +as printed by the failing fsck, then it will not find this +device (because it got closed). + +So please apply this patch to let the user see the failing +situation. + +Thanks! + +[zj: removed dead isolate param from start_target().] + +https://bugs.freedesktop.org/show_bug.cgi?id=49463 +https://bugzilla.redhat.com/show_bug.cgi?id=810722 +--- + src/fsck/fsck.c | 13 ++++--------- + units/local-fs.target | 2 +- + 2 files changed, 5 insertions(+), 10 deletions(-) + +Index: systemd-195/src/fsck/fsck.c +=================================================================== +--- systemd-195.orig/src/fsck/fsck.c ++++ systemd-195/src/fsck/fsck.c +@@ -40,10 +40,10 @@ static bool arg_skip = false; + static bool arg_force = false; + static bool arg_show_progress = false; + +-static void start_target(const char *target, bool isolate) { ++static void start_target(const char *target) { + DBusMessage *m = NULL, *reply = NULL; + DBusError error; +- const char *mode, *basic_target = "basic.target"; ++ const char *mode = "replace", *basic_target = "basic.target"; + DBusConnection *bus = NULL; + + assert(target); +@@ -55,11 +55,6 @@ static void start_target(const char *tar + goto finish; + } + +- if (isolate) +- mode = "isolate"; +- else +- mode = "replace"; +- + log_info("Running request %s/start/%s", target, mode); + + if (!(m = dbus_message_new_method_call("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartUnitReplace"))) { +@@ -379,10 +374,10 @@ int main(int argc, char *argv[]) { + + if (status.si_code == CLD_EXITED && (status.si_status & 2) && root_directory) + /* System should be rebooted. */ +- start_target(SPECIAL_REBOOT_TARGET, false); ++ start_target(SPECIAL_REBOOT_TARGET); + else if (status.si_code == CLD_EXITED && (status.si_status & 6)) + /* Some other problem */ +- start_target(SPECIAL_EMERGENCY_TARGET, true); ++ start_target(SPECIAL_EMERGENCY_TARGET); + else { + r = EXIT_SUCCESS; + log_warning("Ignoring error."); +Index: systemd-195/units/local-fs.target +=================================================================== +--- systemd-195.orig/units/local-fs.target ++++ systemd-195/units/local-fs.target +@@ -9,4 +9,4 @@ + Description=Local File Systems + Documentation=man:systemd.special(7) + OnFailure=emergency.target +-OnFailureIsolate=yes ++OnFailureIsolate=no diff --git a/fix-journal-vacuum-logic.patch b/fix-journal-vacuum-logic.patch new file mode 100644 index 00000000..382d6c57 --- /dev/null +++ b/fix-journal-vacuum-logic.patch @@ -0,0 +1,40 @@ +From 6c142648aaced56ab681fcc97a71b06d588122a9 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Wed, 20 Mar 2013 21:32:05 +0100 +Subject: [PATCH] Fix vacuum logic error + +The vacuum code used to stop vacuuming after one deletion, even +when max_use was still exceeded. + +Also make usage a uint64_t, as the code already pretends it is one. + +Signed-off-by: Jan Alexander Steffens (heftig) +--- + src/journal/journal-vacuum.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c +index 731f6c7..4a3a5a9 100644 +--- a/src/journal/journal-vacuum.c ++++ b/src/journal/journal-vacuum.c +@@ -36,7 +36,7 @@ + #include "util.h" + + struct vacuum_info { +- off_t usage; ++ uint64_t usage; + char *filename; + + uint64_t realtime; +@@ -293,7 +293,7 @@ int journal_directory_vacuum( + if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) { + log_debug("Deleted archived journal %s/%s.", directory, list[i].filename); + +- if ((uint64_t) list[i].usage > sum) ++ if (list[i].usage < sum) + sum -= list[i].usage; + else + sum = 0; +-- +1.8.1.4 + diff --git a/fix-loopback-mount.patch b/fix-loopback-mount.patch new file mode 100644 index 00000000..ba79d342 --- /dev/null +++ b/fix-loopback-mount.patch @@ -0,0 +1,10 @@ +Index: systemd-195/units/local-fs-pre.target +=================================================================== +--- systemd-195.orig/units/local-fs-pre.target ++++ systemd-195/units/local-fs-pre.target +@@ -8,4 +8,4 @@ + [Unit] + Description=Local File Systems (Pre) + Documentation=man:systemd.special(7) +-After=md.service lvm.service dmraid.service ++After=md.service lvm.service dmraid.service systemd-udevd.service diff --git a/fix-lsb-provides.patch b/fix-lsb-provides.patch new file mode 100644 index 00000000..35177c88 --- /dev/null +++ b/fix-lsb-provides.patch @@ -0,0 +1,43 @@ +From a99435109b83e7146a30ccf5387037b51c1fe907 Mon Sep 17 00:00:00 2001 +From: Frederic Crozat +Date: Thu, 21 Mar 2013 15:40:45 +0100 +Subject: [PATCH] core: ensure LSB Provides are handled correctly + +Let's say you have two initscripts, A and B: + +A contains in its LSB header: +Required-Start: C + +and B contains in its LSB header: +Provides: C + +When systemd is parsing /etc/rc.d/, depending on the file order, you +can end up with either: +- B is parsed first. An unit "C.service" will be "created" and will be +added as additional name to B.service, with unit_add_name. No bug. +- A is parsed first. An unit "C.service" is created for the +"Required-Start" dependency (it will have no file attached, since +nothing provides this dependency yet). Then B is parsed and when trying +to handle "Provides: C", unit_add_name is called but will fail, because +"C.service" already exists in manager->units. Therefore, a merge should +occur for that case. +--- + src/core/service.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/service.c b/src/core/service.c +index 4451d38..fa8a1cb 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -762,7 +762,7 @@ static int service_load_sysv_path(Service *s, const char *path) { + continue; + + if (unit_name_to_type(m) == UNIT_SERVICE) +- r = unit_add_name(u, m); ++ r = unit_merge_by_name(u, m); + else + /* NB: SysV targets + * which are provided +-- +1.8.1.4 + diff --git a/improve-readahead-spinning.patch b/improve-readahead-spinning.patch new file mode 100644 index 00000000..0040bed9 --- /dev/null +++ b/improve-readahead-spinning.patch @@ -0,0 +1,221 @@ +From 94243ef299425d6c7089a7a05c48c9bb8f6cf3da Mon Sep 17 00:00:00 2001 +From: Auke Kok +Date: Fri, 22 Mar 2013 15:09:45 -0700 +Subject: [PATCH 1/2] readahead: chunk on spinning media + +Readahead has all sorts of bad side effects depending on your +storage media. On rotating disks, it may be degrading startup +performance if enough requests are queued spanning linearly +over all blocks early at boot, and mount, blkid and friends +want to insert reads to the start of these block devices after. + +The end result is that on spinning disks with ext3/4 that udev +and mounts take a very long time, and nothing really happens until +readahead is completely finished. + +This has the net effect that the CPU is almost entirely idle +for the entire period that readahead is working. We could have +finished starting up quite a lot of services in this time if +we were smarter at how we do readahead. + +This patch sorts all requests into 2 second "chunks" and sub-sorts +each chunk by block. This adds a single cross-drive seek per "chunk" +but has the benefit that we will have a lot of the blocks we need +early on in the boot sequence loaded into memory faster. + +For a comparison of how before/after bootcharts look (ext4 on a +mobile 5400rpm 250GB drive) please look at: + + http://foo-projects.org/~sofar/blocked-tests/ + +There are bootcharts in the "before" and "after" folders where you +should be able to see that many low-level services finish 5-7 +seconds earlier with the patch applied (after). +--- + Makefile.am | 2 +- + src/readahead/readahead-collect.c | 28 +++++++++++++++++++++++++--- + 2 files changed, 26 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 37c1cc2..5861976 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \ + systemd_readahead_LDADD = \ + libsystemd-shared.la \ + libsystemd-daemon.la \ +- libudev.la ++ libudev.la -lm + + dist_doc_DATA += \ + src/readahead/sd-readahead.c \ +diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c +index 5d07f47..5d22949 100644 +--- a/src/readahead/readahead-collect.c ++++ b/src/readahead/readahead-collect.c +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_FANOTIFY_INIT + #include +@@ -67,6 +68,7 @@ + */ + + static ReadaheadShared *shared = NULL; ++static struct timespec starttime; + + /* Avoid collisions with the NULL pointer */ + #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1) +@@ -205,6 +207,7 @@ static unsigned long fd_first_block(int fd) { + struct item { + const char *path; + unsigned long block; ++ unsigned long bin; + }; + + static int qsort_compare(const void *a, const void *b) { +@@ -213,6 +216,13 @@ static int qsort_compare(const void *a, const void *b) { + i = a; + j = b; + ++ /* sort by bin first */ ++ if (i->bin < j->bin) ++ return -1; ++ if (i->bin > j->bin) ++ return 1; ++ ++ /* then sort by sector */ + if (i->block < j->block) + return -1; + if (i->block > j->block) +@@ -250,6 +260,8 @@ static int collect(const char *root) { + goto finish; + } + ++ clock_gettime(CLOCK_MONOTONIC, &starttime); ++ + /* If there's no pack file yet we lower the kernel readahead + * so that mincore() is accurate. If there is a pack file + * already we assume it is accurate enough so that kernel +@@ -447,10 +459,21 @@ static int collect(const char *root) { + free(p); + else { + unsigned long ul; ++ struct timespec ts; ++ struct item *entry; ++ ++ entry = new0(struct item, 1); + + ul = fd_first_block(m->fd); + +- if ((k = hashmap_put(files, p, SECTOR_TO_PTR(ul))) < 0) { ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++ ++ entry->block = ul; ++ entry->path = strdup(p); ++ entry->bin = round((ts.tv_sec - starttime.tv_sec + ++ ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0); ++ ++ if ((k = hashmap_put(files, p, entry)) < 0) { + log_warning("set_put() failed: %s", strerror(-k)); + free(p); + } +@@ -518,8 +541,7 @@ done: + + j = ordered; + HASHMAP_FOREACH_KEY(q, p, files, i) { +- j->path = p; +- j->block = PTR_TO_SECTOR(q); ++ memcpy(j, q, sizeof(struct item)); + j++; + } + +-- +1.8.1.4 + + +From b0640287f784a320661f7206c9ade07b99003fd5 Mon Sep 17 00:00:00 2001 +From: Auke Kok +Date: Tue, 26 Mar 2013 11:13:47 -0700 +Subject: [PATCH 2/2] readahead: cleanups + +- check for OOM +- no need to use floats and round() +--- + Makefile.am | 2 +- + src/readahead/readahead-collect.c | 20 ++++++++++++++------ + 2 files changed, 15 insertions(+), 7 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 5861976..37c1cc2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \ + systemd_readahead_LDADD = \ + libsystemd-shared.la \ + libsystemd-daemon.la \ +- libudev.la -lm ++ libudev.la + + dist_doc_DATA += \ + src/readahead/sd-readahead.c \ +diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c +index 5d22949..e2fd8df 100644 +--- a/src/readahead/readahead-collect.c ++++ b/src/readahead/readahead-collect.c +@@ -68,7 +68,7 @@ + */ + + static ReadaheadShared *shared = NULL; +-static struct timespec starttime; ++static usec_t starttime; + + /* Avoid collisions with the NULL pointer */ + #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1) +@@ -260,7 +260,7 @@ static int collect(const char *root) { + goto finish; + } + +- clock_gettime(CLOCK_MONOTONIC, &starttime); ++ starttime = now(CLOCK_MONOTONIC); + + /* If there's no pack file yet we lower the kernel readahead + * so that mincore() is accurate. If there is a pack file +@@ -459,19 +459,27 @@ static int collect(const char *root) { + free(p); + else { + unsigned long ul; +- struct timespec ts; ++ usec_t entrytime; + struct item *entry; + + entry = new0(struct item, 1); ++ if (!entry) { ++ r = log_oom(); ++ goto finish; ++ } + + ul = fd_first_block(m->fd); + +- clock_gettime(CLOCK_MONOTONIC, &ts); ++ entrytime = now(CLOCK_MONOTONIC); + + entry->block = ul; + entry->path = strdup(p); +- entry->bin = round((ts.tv_sec - starttime.tv_sec + +- ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0); ++ if (!entry->path) { ++ free(entry); ++ r = log_oom(); ++ goto finish; ++ } ++ entry->bin = (entrytime - starttime) / 2000000; + + if ((k = hashmap_put(files, p, entry)) < 0) { + log_warning("set_put() failed: %s", strerror(-k)); +-- +1.8.1.4 + diff --git a/logind-nvidia-acl.diff b/logind-nvidia-acl.diff new file mode 100644 index 00000000..109ab60b --- /dev/null +++ b/logind-nvidia-acl.diff @@ -0,0 +1,14 @@ +Index: systemd-195/src/login/logind-acl.c +=================================================================== +--- systemd-195.orig/src/login/logind-acl.c ++++ systemd-195/src/login/logind-acl.c +@@ -240,6 +240,9 @@ int devnode_acl_all(struct udev *udev, + goto finish; + } + ++ devnode_acl("/dev/nvidia0", flush, del, old_uid, add, new_uid); ++ devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid); ++ + finish: + if (e) + udev_enumerate_unref(e); diff --git a/systemctl-options.patch b/systemctl-options.patch index 0b100b2f..165e1bb5 100644 --- a/systemctl-options.patch +++ b/systemctl-options.patch @@ -2,17 +2,14 @@ Index: systemd-195/src/systemctl/systemctl.c =================================================================== --- systemd-195.orig/src/systemctl/systemctl.c +++ systemd-195/src/systemctl/systemctl.c -@@ -5239,6 +5239,7 @@ static int runlevel_main(void) { +@@ -4118,10 +4118,32 @@ static int systemctl_parse_argv(int argc + }; - int main(int argc, char*argv[]) { - int r, retval = EXIT_FAILURE; + int c; + char **to_free = NULL; - DBusConnection *bus = NULL; - DBusError error; -@@ -5247,6 +5248,27 @@ int main(int argc, char*argv[]) { - log_parse_environment(); - log_open(); + assert(argc >= 0); + assert(argv); + if (secure_getenv("SYSTEMCTL_OPTIONS")) { + char **parsed_systemctl_options = strv_split_quoted(getenv("SYSTEMCTL_OPTIONS")); @@ -35,15 +32,15 @@ Index: systemd-195/src/systemctl/systemctl.c + } + } + - r = parse_argv(argc, argv); - if (r < 0) - goto finish; -@@ -5348,6 +5370,8 @@ finish: + while ((c = getopt_long(argc, argv, "ht:p:aqfs:H:Pn:o:", options, NULL)) >= 0) { - strv_free(arg_property); + switch (c) { +@@ -4297,6 +4319,8 @@ static int systemctl_parse_argv(int argc + return -EINVAL; + } + strv_free(to_free); + - pager_close(); - ask_password_agent_close(); - polkit_agent_close(); + return 1; + } + diff --git a/systemd-mini.changes b/systemd-mini.changes index 7beeb90a..4844a41d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon Apr 8 14:51:47 CEST 2013 - fcrozat@suse.com + +- Add improve-readahead-spinning.patch: improve readahead + performance on spinning media with ext4. +- Add fix-journal-vacuum-logic.patch: fix vacuum logic in journal + (bnc#789589). +- Add fix-lsb-provides.patch: ensure LSB provides are correctly + handled if also referenced as dependencies (bnc#809646). +- Add fix-loopback-mount.patch: ensure udevd is started (and + therefore static devices are created) before mounting + (bnc#809820). +- Update systemd-sysv-convert to search services files in new + location (bnc#809695). +- Add logind-nvidia-acl.diff: set ACL on nvidia devices + (bnc#808319). +- Add do-no-isolate-on-fsck-failure.patch: do not turn off services + if fsck fails (bnc#812874) +- Add wait-for-processes-killed.patch: wait for processes killed by + SIGTERM before killing them with SIGKILL. +- Update systemctl-options.patch to only apply SYSTEMCTL_OPTIONS to + systemctl command (bnc#801878). + ------------------------------------------------------------------- Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz diff --git a/systemd-mini.spec b/systemd-mini.spec index 506d62e2..18e0bf50 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -140,6 +140,12 @@ Patch72: handle-root-uses-lang.patch Patch76: multiple-sulogin.patch # PATCH-FIX-OPENSUSE systemctl-options.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable Patch77: systemctl-options.patch +# PATCH-FIX-UPSTREAM fix-loopback-mount.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available +Patch136: fix-loopback-mount.patch +# PATCH-FIX-UPSTREAM fix-lsb-provides.patch bnc#809646 fcrozat@suse.com -- fix LSB provides +Patch137: fix-lsb-provides.patch +# PATCH-FIX-OPENSUSE logind-nvidia-acl.diff bnc#808319 -- set ACL on nvidia devices +Patch140: logind-nvidia-acl.diff # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -283,6 +289,14 @@ Patch133: support-hybrid-suspend.patch Patch134: forward-to-pmutils.patch # PATCH-FIX-UPSTREAM rbind-mount.patch fcrozat@suse.com bnc#804575 -- Handle rbind mount point correctly Patch135: rbind-mount.patch +# PATCH-FIX-UPSTREAM fix-journal-vacuum-logic.patch bnc#789589 -- fix journal vacuum logic +Patch138: fix-journal-vacuum-logic.patch +# PATCH-FIX-UPSTREAM improve-readahead-spinning.patch -- improve readahead on spinning disk +Patch139: improve-readahead-spinning.patch +# PATCH-FIX-UPSTREAM wait-for-processes-killed.patch -- wait for processes killed by SIGTERM before killing them with SIGKILL +Patch141: wait-for-processes-killed.patch +# PATCH-FIX-UPSTREAM do-no-isolate-on-fsck-failure.patch bnc#812874 -- do not isolate if fsck fails +Patch142: do-no-isolate-on-fsck-failure.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -625,6 +639,13 @@ cp %{SOURCE7} m4/ %patch133 -p1 %patch134 -p1 %patch135 -p1 +%patch136 -p1 +%patch137 -p1 +%patch138 -p1 +%patch139 -p1 +%patch140 -p1 +%patch141 -p1 +%patch142 -p1 %build autoreconf -fiv diff --git a/systemd-sysv-convert b/systemd-sysv-convert index 3645f435..ef38cbff 100644 --- a/systemd-sysv-convert +++ b/systemd-sysv-convert @@ -18,7 +18,7 @@ EOF help() { usage cat << EOF -Save and Restore SusV Service Runlevel Information +Save and Restore SysV Service Runlevel Information positional arguments: SERVICE Service names @@ -62,6 +62,7 @@ fi lookup_database() { local services local service +local service_file local runlevel local priority local -i k @@ -147,22 +148,25 @@ case "$1" in shift services=$@ for service in $services; do - if [ ! -f "/lib/systemd/system/$service.service" ]; then + if [ ! -f "/lib/systemd/system/$service.service" -a ! -f "/usr/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 + [ -f "/lib/systemd/system/$service.service" ] && service_file="/lib/systemd/system/$service.service" + [ -f "/usr/lib/systemd/system/$service.service" ] && service_file="/usr/lib/systemd/system/$service.service" + 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 + echo ln -sf $service_file /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 + /bin/ln -sf $service_file /etc/systemd/system/runlevel$runlevel.target.wants/$service.service done done diff --git a/systemd.changes b/systemd.changes index 7beeb90a..4844a41d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Mon Apr 8 14:51:47 CEST 2013 - fcrozat@suse.com + +- Add improve-readahead-spinning.patch: improve readahead + performance on spinning media with ext4. +- Add fix-journal-vacuum-logic.patch: fix vacuum logic in journal + (bnc#789589). +- Add fix-lsb-provides.patch: ensure LSB provides are correctly + handled if also referenced as dependencies (bnc#809646). +- Add fix-loopback-mount.patch: ensure udevd is started (and + therefore static devices are created) before mounting + (bnc#809820). +- Update systemd-sysv-convert to search services files in new + location (bnc#809695). +- Add logind-nvidia-acl.diff: set ACL on nvidia devices + (bnc#808319). +- Add do-no-isolate-on-fsck-failure.patch: do not turn off services + if fsck fails (bnc#812874) +- Add wait-for-processes-killed.patch: wait for processes killed by + SIGTERM before killing them with SIGKILL. +- Update systemctl-options.patch to only apply SYSTEMCTL_OPTIONS to + systemctl command (bnc#801878). + ------------------------------------------------------------------- Tue Apr 2 22:09:42 CEST 2013 - sbrabec@suse.cz diff --git a/systemd.spec b/systemd.spec index c8c21f9f..1a75460b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -135,6 +135,12 @@ Patch72: handle-root-uses-lang.patch Patch76: multiple-sulogin.patch # PATCH-FIX-OPENSUSE systemctl-options.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable Patch77: systemctl-options.patch +# PATCH-FIX-UPSTREAM fix-loopback-mount.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available +Patch136: fix-loopback-mount.patch +# PATCH-FIX-UPSTREAM fix-lsb-provides.patch bnc#809646 fcrozat@suse.com -- fix LSB provides +Patch137: fix-lsb-provides.patch +# PATCH-FIX-OPENSUSE logind-nvidia-acl.diff bnc#808319 -- set ACL on nvidia devices +Patch140: logind-nvidia-acl.diff # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -278,6 +284,14 @@ Patch133: support-hybrid-suspend.patch Patch134: forward-to-pmutils.patch # PATCH-FIX-UPSTREAM rbind-mount.patch fcrozat@suse.com bnc#804575 -- Handle rbind mount point correctly Patch135: rbind-mount.patch +# PATCH-FIX-UPSTREAM fix-journal-vacuum-logic.patch bnc#789589 -- fix journal vacuum logic +Patch138: fix-journal-vacuum-logic.patch +# PATCH-FIX-UPSTREAM improve-readahead-spinning.patch -- improve readahead on spinning disk +Patch139: improve-readahead-spinning.patch +# PATCH-FIX-UPSTREAM wait-for-processes-killed.patch -- wait for processes killed by SIGTERM before killing them with SIGKILL +Patch141: wait-for-processes-killed.patch +# PATCH-FIX-UPSTREAM do-no-isolate-on-fsck-failure.patch bnc#812874 -- do not isolate if fsck fails +Patch142: do-no-isolate-on-fsck-failure.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -620,6 +634,13 @@ cp %{SOURCE7} m4/ %patch133 -p1 %patch134 -p1 %patch135 -p1 +%patch136 -p1 +%patch137 -p1 +%patch138 -p1 +%patch139 -p1 +%patch140 -p1 +%patch141 -p1 +%patch142 -p1 %build autoreconf -fiv diff --git a/wait-for-processes-killed.patch b/wait-for-processes-killed.patch new file mode 100644 index 00000000..a0d07aec --- /dev/null +++ b/wait-for-processes-killed.patch @@ -0,0 +1,249 @@ +From df758e98754016119a9c8d49213a636a80ffab22 Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Thu, 28 Mar 2013 23:00:32 +0100 +Subject: [PATCH] killall: print notice what we forcefully KILL + +--- + src/core/killall.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/core/killall.c b/src/core/killall.c +index 55200ff..1eb3766 100644 +--- a/src/core/killall.c ++++ b/src/core/killall.c +@@ -139,6 +139,13 @@ static int killall(int sig) { + if (ignore_proc(pid)) + continue; + ++ if (sig == SIGKILL) { ++ _cleanup_free_ char *s; ++ ++ get_process_comm(pid, &s); ++ log_notice("Sending SIGKILL to PID %lu (%s)", (unsigned long) pid, strna(s)); ++ } ++ + if (kill(pid, sig) >= 0) + n_processes++; + else if (errno != ENOENT) +-- +1.8.1.4 + +From aaf7eb81be912e7bed939f31e3bc4c631b2552b3 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Mon, 1 Apr 2013 22:48:40 +0200 +Subject: [PATCH] shutdown: correctly wait for processes we killed in the + killall spree + +Previously we simply counted how many processes we killed and expected +as many waitpid() calls to succeed. That however is incorrect to do. + +As we might kill processes that are not our immediate children, and as +there might be left-over processes in the waitpid() queue from earlier +the we might get more ore less waitpid() events that we expect. + +Hence: keep precise track of the processes we kill, remove the ones we +get waitpid() for, and after each time we get SIGCHLD check if all +others still exist. We use getpgid() to check if a PID still exists. + +This should fix issues with journald not setting journal files offline +correctly on shutdown, because we'd too quickly proceed from SIGTERM to +SIGKILL because some left-over process was in our waitpid() queue. +--- + src/core/killall.c | 85 +++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 58 insertions(+), 27 deletions(-) + +diff --git a/src/core/killall.c b/src/core/killall.c +index 1eb3766..7f0dbb9 100644 +--- a/src/core/killall.c ++++ b/src/core/killall.c +@@ -22,12 +22,14 @@ + #include + #include + #include ++#include + + #include "util.h" + #include "def.h" + #include "killall.h" ++#include "set.h" + +-#define TIMEOUT_USEC (5 * USEC_PER_SEC) ++#define TIMEOUT_USEC (10 * USEC_PER_SEC) + + static bool ignore_proc(pid_t pid) { + char buf[PATH_MAX]; +@@ -73,38 +75,68 @@ static bool ignore_proc(pid_t pid) { + return false; + } + +-static void wait_for_children(int n_processes, sigset_t *mask) { ++static void wait_for_children(Set *pids, sigset_t *mask) { + usec_t until; + + assert(mask); + ++ if (set_isempty(pids)) ++ return; ++ + until = now(CLOCK_MONOTONIC) + TIMEOUT_USEC; + for (;;) { + struct timespec ts; + int k; + usec_t n; ++ void *p; ++ Iterator i; + ++ /* First, let the kernel inform us about killed ++ * children. Most processes will probably be our ++ * children, but some are not (might be our ++ * grandchildren instead...). */ + for (;;) { +- pid_t pid = waitpid(-1, NULL, WNOHANG); ++ pid_t pid; + ++ pid = waitpid(-1, NULL, WNOHANG); + if (pid == 0) + break; ++ if (pid < 0) { ++ if (errno == ECHILD) ++ break; + +- if (pid < 0 && errno == ECHILD) ++ log_error("waitpid() failed: %m"); + return; ++ } ++ ++ set_remove(pids, ULONG_TO_PTR(pid)); ++ } + +- if (n_processes > 0) +- if (--n_processes == 0) +- return; ++ /* Now explicitly check who might be remaining, who ++ * might not be our child. */ ++ SET_FOREACH(p, pids, i) { ++ ++ /* We misuse getpgid as a check whether a ++ * process still exists. */ ++ if (getpgid((pid_t) PTR_TO_ULONG(p)) >= 0) ++ continue; ++ ++ if (errno != ESRCH) ++ continue; ++ ++ set_remove(pids, p); + } + ++ if (set_isempty(pids)) ++ return; ++ + n = now(CLOCK_MONOTONIC); + if (n >= until) + return; + + timespec_store(&ts, until - n); +- +- if ((k = sigtimedwait(mask, NULL, &ts)) != SIGCHLD) { ++ k = sigtimedwait(mask, NULL, &ts); ++ if (k != SIGCHLD) { + + if (k < 0 && errno != EAGAIN) { + log_error("sigtimedwait() failed: %m"); +@@ -117,10 +149,9 @@ static void wait_for_children(int n_processes, sigset_t *mask) { + } + } + +-static int killall(int sig) { +- DIR *dir; ++static int killall(int sig, Set *pids) { ++ _cleanup_closedir_ DIR *dir = NULL; + struct dirent *d; +- unsigned int n_processes = 0; + + dir = opendir("/proc"); + if (!dir) +@@ -143,23 +174,25 @@ static int killall(int sig) { + _cleanup_free_ char *s; + + get_process_comm(pid, &s); +- log_notice("Sending SIGKILL to PID %lu (%s)", (unsigned long) pid, strna(s)); ++ log_notice("Sending SIGKILL to PID %lu (%s).", (unsigned long) pid, strna(s)); + } + +- if (kill(pid, sig) >= 0) +- n_processes++; +- else if (errno != ENOENT) ++ if (kill(pid, sig) >= 0) { ++ if (pids) ++ set_put(pids, ULONG_TO_PTR((unsigned long) pid)); ++ } else if (errno != ENOENT) + log_warning("Could not kill %d: %m", pid); + } + +- closedir(dir); +- +- return n_processes; ++ return set_size(pids); + } + + void broadcast_signal(int sig, bool wait_for_exit) { + sigset_t mask, oldmask; +- int n_processes; ++ Set *pids; ++ ++ if (wait_for_exit) ++ pids = set_new(trivial_hash_func, trivial_compare_func); + + assert_se(sigemptyset(&mask) == 0); + assert_se(sigaddset(&mask, SIGCHLD) == 0); +@@ -168,17 +201,15 @@ void broadcast_signal(int sig, bool wait_for_exit) { + if (kill(-1, SIGSTOP) < 0 && errno != ESRCH) + log_warning("kill(-1, SIGSTOP) failed: %m"); + +- n_processes = killall(sig); ++ killall(sig, pids); + + if (kill(-1, SIGCONT) < 0 && errno != ESRCH) + log_warning("kill(-1, SIGCONT) failed: %m"); + +- if (n_processes <= 0) +- goto finish; +- + if (wait_for_exit) +- wait_for_children(n_processes, &mask); ++ wait_for_children(pids, &mask); ++ ++ assert_se(sigprocmask(SIG_SETMASK, &oldmask, NULL) == 0); + +-finish: +- sigprocmask(SIG_SETMASK, &oldmask, NULL); ++ set_free(pids); + } +-- +1.8.1.4 + +From b6e8f1f03dc8b7579f8c6b00372f136d74c45232 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Wed, 3 Apr 2013 15:16:06 +0200 +Subject: [PATCH] core/killall.c: prevent segfault and initialize pids + +--- + src/core/killall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/killall.c b/src/core/killall.c +index 7f0dbb9..e078012 100644 +--- a/src/core/killall.c ++++ b/src/core/killall.c +@@ -189,7 +189,7 @@ static int killall(int sig, Set *pids) { + + void broadcast_signal(int sig, bool wait_for_exit) { + sigset_t mask, oldmask; +- Set *pids; ++ Set *pids = NULL; + + if (wait_for_exit) + pids = set_new(trivial_hash_func, trivial_compare_func); +-- +1.8.1.4 + From f33f3c9208567d015dbf4637cbf00b08e89bf156d4fb6dff87db463426c9f358 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 12 Apr 2013 16:24:46 +0000 Subject: [PATCH 4/9] Accepting request 163780 from home:rjschwei:branches:Base:System - Add chromebook lid switch as a power switch to logind rule to enable suspend on lid close OBS-URL: https://build.opensuse.org/request/show/163780 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=362 --- lid-switch-chromebook.patch | 24 ++++++++++++++++++++++++ systemd.changes | 6 ++++++ systemd.spec | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 lid-switch-chromebook.patch diff --git a/lid-switch-chromebook.patch b/lid-switch-chromebook.patch new file mode 100644 index 00000000..b635e1ce --- /dev/null +++ b/lid-switch-chromebook.patch @@ -0,0 +1,24 @@ +From fced3673ee1001dc905206f9a92ea2062f951d3c Mon Sep 17 00:00:00 2001 +From: Robert Schweikert +Date: Fri, 12 Apr 2013 12:08:16 -0400 +Subject: [PATCH] rules: add lid switch of ARM based Chromebook as a power + switch to logind + +--- + src/login/70-power-switch.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/login/70-power-switch.rules b/src/login/70-power-switch.rules +index 36fb827..d925ab7 100644 +--- a/src/login/70-power-switch.rules ++++ b/src/login/70-power-switch.rules +@@ -9,5 +9,6 @@ ACTION=="remove", GOTO="power_switch_end" + + SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch" + SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" ++SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="gpio-keys.8", TAG+="power-switch" + + LABEL="power_switch_end" +-- +1.8.1.4 + diff --git a/systemd.changes b/systemd.changes index 4844a41d..3fecc999 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 12 16:17:04 UTC 2013 - rschweikert@suse.com + +- Add chromebook lid switch as a power switch to logind rule to + enable suspend on lid close + ------------------------------------------------------------------- Mon Apr 8 14:51:47 CEST 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 1a75460b..7bfd5d20 100644 --- a/systemd.spec +++ b/systemd.spec @@ -292,6 +292,8 @@ Patch139: improve-readahead-spinning.patch Patch141: wait-for-processes-killed.patch # PATCH-FIX-UPSTREAM do-no-isolate-on-fsck-failure.patch bnc#812874 -- do not isolate if fsck fails Patch142: do-no-isolate-on-fsck-failure.patch +# PATCH-FIX-UPSTREAM lid-switch-chromebook.patch +Patch143: lid-switch-chromebook.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -641,6 +643,7 @@ cp %{SOURCE7} m4/ %patch140 -p1 %patch141 -p1 %patch142 -p1 +%patch143 -p1 %build autoreconf -fiv From 4d2be9c235229fe56f12d00de3b884c4893e6b52bfbee319f3ffb8a0f40cb278 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Sat, 13 Apr 2013 11:09:53 +0000 Subject: [PATCH 5/9] Accepting request 163799 from home:fcrozat:branches:Base:System update to v201 OBS-URL: https://build.opensuse.org/request/show/163799 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=363 --- ...ndencies-added-when-parsing-insserv..patch | 115 --- 1001-Reinstate-TIMEOUT-handling.patch | 65 +- ...enable-by_path-links-for-ata-devices.patch | 38 +- ...ate-by-id-scsi-links-for-ATA-devices.patch | 19 +- 1004-udev-netlink-null-rules.patch | 21 +- 1005-udev-fix-sg-autoload-regression.patch | 28 +- 1006-fix-devname-prefix.patch | 13 - 1007-fix-devname-prefix.patch | 22 + 1007-udevd-add-missing-to-getopt_long-e.patch | 24 - ...-udev-path_id-handle-Hyper-V-devices.patch | 72 -- ...-the-list-of-Samsung-Series-9-models.patch | 136 ---- 1010-keymap-Add-Samsung-700T.patch | 22 - ...ev-avoid-leak-during-realloc-failure.patch | 36 - ...-do-not-resolve-attr-device-symlinks.patch | 40 -- ...-udev-argument-to-udev_enumerate_new.patch | 23 - 1014-udev-fix-whitespace.patch | 56 -- ...ndle-symlink-removal-by-change-event.patch | 69 -- ...not-fail-builtin-initialization-if-o.patch | 64 -- 1017-udev-use-usec_t-and-now.patch | 335 --------- 1018-keymap-add-aditional-support.patch | 59 -- ...device-matching-in-the-accelerometer.patch | 51 -- ...s-have-a-very-bogus-or-strage-serial.patch | 63 -- ...fault-links-for-primary-cd_dvd-drive.patch | 19 +- ...names-for-temporary-files-created-in.patch | 57 -- ...ta-track-count-for-bad-virtual-drive.patch | 51 -- ...e-only-size-bytes-of-the-descriptors.patch | 24 - ...new-ISO9660-properties-from-libblkid.patch | 37 - 1026-re-add-persistent-net.patch | 117 ++- 1027-udev-always-rename-network.patch | 30 +- ...splash-handling-for-password-dialogs.patch | 14 +- Ensure-debugshell-has-a-correct-value.patch | 22 + ...es-permissions-to-follow-openSUSE-po.patch | 39 + ...-suspend-hibernate-calls-to-pm-utils.patch | 27 +- Reinstate-TIMEOUT-handling.patch | 129 ++++ ...pport-for-SysV-scripts-for-the-early.patch | 140 ++++ agetty-overrides-term.patch | 44 -- allow-multiple-sulogin-to-be-started.patch | 47 ++ apply-ACL-for-nvidia-device-nodes.patch | 23 + ...alid-address-familily-is-passed-to-g.patch | 38 + baselibs.conf | 1 + ...r-empty-strings-in-strto-conversions.patch | 92 --- ...terpret-escaped-semicolon-as-escaped.patch | 30 - ...-load-fragment-improve-error-message.patch | 207 ------ coredumpctl-fix-crash.patch | 22 - ...fault-links-for-primary-cd_dvd-drive.patch | 24 + ...tor-state-file-name-in-error-message.patch | 31 - crypsetup-handle-nofail.patch | 29 - crypt-loop-file.patch | 90 --- cryptsetup-accept-read-only.patch | 47 -- cryptsetup-handle-plain.patch | 71 -- ...etup-after-md-dmraid-lvm-are-started.patch | 27 +- delta-accept-t-option.patch | 24 - detect-btrfs-ssd.patch | 97 --- ...ble-nss-myhostname-warning-bnc-783841.diff | 21 - ...le-nss-myhostname-warning-bnc-783841.patch | 20 + dm-lvm-after-local-fs-pre-target.patch | 9 - do-no-isolate-on-fsck-failure.patch | 87 --- do-not-make-sockets-dependent-on-lo.patch | 24 - early-sync-shutdown.patch | 209 ------ ...e-started-before-local-fs-pre-target.patch | 19 + ...assword-wall-starts-after-getty-tty1.patch | 22 + ...are-applied-after-modules-are-loaded.patch | 21 + ...s-started-before-local-fs-pre-for-lo.patch | 21 + fastboot-forcefsck.patch | 13 - fix-bad-mem-access.patch | 21 - fix-bad-memory-access.patch | 23 - fix-build-glibc217.patch | 29 - fix-dbus-crash.patch | 29 - fix-debugshell.patch | 13 - fix-devname-prefix.patch | 22 + fix-journal-vacuum-logic.patch | 40 -- fix-logind-pty-seat.patch | 26 - fix-loopback-mount.patch | 10 - fix-lsb-provides.patch | 43 -- fix-owner-of-var-log-btmp.patch | 22 + fix-permissions-btmp.patch | 13 - fix-potential-bad-mem-access.patch | 45 -- ...-boot-prefixed-initscript-bnc-746506.patch | 17 +- fix-swap-behaviour-with-symlinks.patch | 33 - ...t-after-cryptsetup-target-is-reached.patch | 105 +++ ...enerator-error-message-on-duplicates.patch | 47 -- fstab-generator-improve-error-message.patch | 115 --- ...enerator-properly-detect-bind-mounts.patch | 25 - handle-HOSTNAME.patch | 36 - ...STEMCTL_OPTIONS-environment-variable.patch | 38 +- ...plock-and-compose_table-and-kbd_rate.patch | 110 +-- handle-etc-HOSTNAME.patch | 46 ++ ...lock-value-in-etc-sysconfig-keyboard.patch | 245 ++++--- handle-root-uses-lang.patch | 48 -- ...lang-value-in-etc-sysconfig-language.patch | 54 ++ highlight-ordering-cycle-deletions.patch | 32 - hostnamectl-fix-parsing-no-ask-password.patch | 24 - ...tl-fix-set-hostname-with-no-argument.patch | 26 - improve-bash-completion.patch | 173 ----- improve-journal-perf.patch | 304 -------- improve-man-environment.patch | 44 -- improve-overflow-checks.patch | 33 - improve-readahead-spinning.patch | 221 ------ job-avoid-recursion-when-cancelling.patch | 48 -- journal-fix-cutoff-max-date.patch | 34 - ...l-send-always-send-syslog_identifier.patch | 62 -- journalctl-quit-on-io-error.patch | 38 - journalctl-remove-leftover-message.patch | 25 - journalctl-require-argument-for-priority | 24 - localectl-fix-assertion.patch | 24 - ...pport-systems-without-locale-archive.patch | 160 ----- lock-opensuse.patch | 16 - ...d-capability-making-seats-without-fb.patch | 56 -- ...-non-tty-non-x11-session-on-shutdown.patch | 30 - logind-nvidia-acl.diff | 14 - macros.systemd | 18 + ...USE-etc-sysconfig-kernel-module-list.patch | 51 +- mount-efivars.patch | 233 ------ multiple-sulogin.patch | 36 - nss-myhostname-config | 31 + ...lly-warn-if-nss-myhostname-is-called.patch | 109 +++ ...dle-ssh-logins-without-pam-tty-field.patch | 57 -- ...nf-and-adds-dependencies-accordingly.patch | 128 ++++ parse-multiline-env-file.patch | 218 ------ path-util-fix-potential-crash.patch | 27 - rbind-mount.patch | 44 -- re-add-persistent-net.patch | 421 +++++++++++ re-enable-by_path-links-for-ata-devices.patch | 120 ++++ ...script-heuristic-and-add-new-LSB-hea.patch | 37 +- remount-ro-before-unmount.patch | 95 --- ...r-lock-bind-mount-if-they-aren-t-sym.patch | 89 +++ ...749b84cc87c7830280b7895a48bed03c9429.patch | 44 -- reword-rescue-mode-hints.patch | 30 - ...ate-by-id-scsi-links-for-ATA-devices.patch | 24 + ...vice-with-detected-pid-as-RemainAfte.patch | 18 +- ...king-ignore-exit-status-main-process.patch | 45 -- ...dont-force-mnt-force-on-final-umount.patch | 35 - ...re-loop-devices-without-backing-file.patch | 37 - shutdown-improvements.patch | 273 ------- socket-improve-error-message.patch | 23 - socket-verbose-error-message.patch | 29 - storage-after-cryptsetup.patch | 103 --- strv-cleanup-error-path-loops.patch | 238 ------ support-hybrid-suspend.patch | 680 ------------------ support-suse-clock-sysconfig.patch | 28 - support-sysvinit.patch | 21 - switch-root-try-pivot-root.patch | 81 --- sync-on-shutdown.patch | 46 -- sysctl-modules.patch | 12 - sysctl-parse-all-keys.patch | 26 - ...ctl-no-assert-on-reboot-without-dbus.patch | 25 - systemctl-print-wall-on-if-successful.patch | 25 - ...l-verbose-message-on-missing-install.patch | 36 - systemd-195.tar.xz | 3 - systemd-200.tar.xz | 3 + systemd-cgls-fix-piping-output.patch | 34 - systemd-fix-merge-ignore-dependencies.patch | 26 - systemd-mini-rpmlintrc | 1 + systemd-mini.changes | 133 ++++ systemd-mini.spec | 510 ++++--------- systemd-rpmlintrc | 1 + systemd.changes | 133 ++++ systemd.spec | 514 ++++--------- ...or-openSUSE-version-of-etc-sysconfig.patch | 26 + ...ed-donot-close-bogus-dbus-connection.patch | 36 - tmpfiles-X-type.patch | 369 ---------- tty1.patch | 13 - udev-always-rename-network.patch | 77 ++ udev-fix-sg-autoload-regression.patch | 22 + udev-netlink-null-rules.patch | 22 + var-run-lock.patch | 97 --- wait-for-processes-killed.patch | 249 ------- xdm-display-manager.patch | 13 - 168 files changed, 2997 insertions(+), 9008 deletions(-) delete mode 100644 0001-service-Fix-dependencies-added-when-parsing-insserv..patch delete mode 100644 1006-fix-devname-prefix.patch create mode 100644 1007-fix-devname-prefix.patch delete mode 100644 1007-udevd-add-missing-to-getopt_long-e.patch delete mode 100644 1008-udev-path_id-handle-Hyper-V-devices.patch delete mode 100644 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch delete mode 100644 1010-keymap-Add-Samsung-700T.patch delete mode 100644 1011-libudev-avoid-leak-during-realloc-failure.patch delete mode 100644 1012-libudev-do-not-resolve-attr-device-symlinks.patch delete mode 100644 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch delete mode 100644 1014-udev-fix-whitespace.patch delete mode 100644 1015-udev-properly-handle-symlink-removal-by-change-event.patch delete mode 100644 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch delete mode 100644 1017-udev-use-usec_t-and-now.patch delete mode 100644 1018-keymap-add-aditional-support.patch delete mode 100644 1019-udev-Fix-device-matching-in-the-accelerometer.patch delete mode 100644 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch delete mode 100644 1022-udev-use-unique-names-for-temporary-files-created-in.patch delete mode 100644 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch delete mode 100644 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch delete mode 100644 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch rename 0001-Add-bootsplash-handling-for-password-dialogs.patch => Add-bootsplash-handling-for-password-dialogs.patch (82%) create mode 100644 Ensure-debugshell-has-a-correct-value.patch create mode 100644 Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch rename forward-to-pmutils.patch => Forward-suspend-hibernate-calls-to-pm-utils.patch (78%) create mode 100644 Reinstate-TIMEOUT-handling.patch create mode 100644 Revert-service-drop-support-for-SysV-scripts-for-the-early.patch delete mode 100644 agetty-overrides-term.patch create mode 100644 allow-multiple-sulogin-to-be-started.patch create mode 100644 apply-ACL-for-nvidia-device-nodes.patch create mode 100644 avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch delete mode 100644 check-for-empty-strings-in-strto-conversions.patch delete mode 100644 core-interpret-escaped-semicolon-as-escaped.patch delete mode 100644 core-load-fragment-improve-error-message.patch delete mode 100644 coredumpctl-fix-crash.patch create mode 100644 create-default-links-for-primary-cd_dvd-drive.patch delete mode 100644 crypsetup-generator-state-file-name-in-error-message.patch delete mode 100644 crypsetup-handle-nofail.patch delete mode 100644 crypt-loop-file.patch delete mode 100644 cryptsetup-accept-read-only.patch delete mode 100644 cryptsetup-handle-plain.patch rename delay-fsck-cryptsetup-after-md-lvm-dmraid.patch => delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch (50%) delete mode 100644 delta-accept-t-option.patch delete mode 100644 detect-btrfs-ssd.patch delete mode 100644 disable-nss-myhostname-warning-bnc-783841.diff create mode 100644 disable-nss-myhostname-warning-bnc-783841.patch delete mode 100644 dm-lvm-after-local-fs-pre-target.patch delete mode 100644 do-no-isolate-on-fsck-failure.patch delete mode 100644 do-not-make-sockets-dependent-on-lo.patch delete mode 100644 early-sync-shutdown.patch create mode 100644 ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch create mode 100644 ensure-ask-password-wall-starts-after-getty-tty1.patch create mode 100644 ensure-sysctl-are-applied-after-modules-are-loaded.patch create mode 100644 ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch delete mode 100644 fastboot-forcefsck.patch delete mode 100644 fix-bad-mem-access.patch delete mode 100644 fix-bad-memory-access.patch delete mode 100644 fix-build-glibc217.patch delete mode 100644 fix-dbus-crash.patch delete mode 100644 fix-debugshell.patch create mode 100644 fix-devname-prefix.patch delete mode 100644 fix-journal-vacuum-logic.patch delete mode 100644 fix-logind-pty-seat.patch delete mode 100644 fix-loopback-mount.patch delete mode 100644 fix-lsb-provides.patch create mode 100644 fix-owner-of-var-log-btmp.patch delete mode 100644 fix-permissions-btmp.patch delete mode 100644 fix-potential-bad-mem-access.patch rename fix-enable-disable-boot-initscript.patch => fix-support-for-boot-prefixed-initscript-bnc-746506.patch (70%) delete mode 100644 fix-swap-behaviour-with-symlinks.patch create mode 100644 force-lvm-restart-after-cryptsetup-target-is-reached.patch delete mode 100644 fstab-generator-error-message-on-duplicates.patch delete mode 100644 fstab-generator-improve-error-message.patch delete mode 100644 fstab-generator-properly-detect-bind-mounts.patch delete mode 100644 handle-HOSTNAME.patch rename systemctl-options.patch => handle-SYSTEMCTL_OPTIONS-environment-variable.patch (55%) rename 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch => handle-disable_caplock-and-compose_table-and-kbd_rate.patch (69%) create mode 100644 handle-etc-HOSTNAME.patch rename systemd-numlock-suse.patch => handle-numlock-value-in-etc-sysconfig-keyboard.patch (68%) delete mode 100644 handle-root-uses-lang.patch create mode 100644 handle-root_uses_lang-value-in-etc-sysconfig-language.patch delete mode 100644 highlight-ordering-cycle-deletions.patch delete mode 100644 hostnamectl-fix-parsing-no-ask-password.patch delete mode 100644 hostnamectl-fix-set-hostname-with-no-argument.patch delete mode 100644 improve-bash-completion.patch delete mode 100644 improve-journal-perf.patch delete mode 100644 improve-man-environment.patch delete mode 100644 improve-overflow-checks.patch delete mode 100644 improve-readahead-spinning.patch delete mode 100644 job-avoid-recursion-when-cancelling.patch delete mode 100644 journal-fix-cutoff-max-date.patch delete mode 100644 journal-send-always-send-syslog_identifier.patch delete mode 100644 journalctl-quit-on-io-error.patch delete mode 100644 journalctl-remove-leftover-message.patch delete mode 100644 journalctl-require-argument-for-priority delete mode 100644 localectl-fix-assertion.patch delete mode 100644 localectl-support-systems-without-locale-archive.patch delete mode 100644 lock-opensuse.patch delete mode 100644 logind-capability-making-seats-without-fb.patch delete mode 100644 logind-ignore-non-tty-non-x11-session-on-shutdown.patch delete mode 100644 logind-nvidia-acl.diff rename modules_on_boot.patch => module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch (56%) delete mode 100644 mount-efivars.patch delete mode 100644 multiple-sulogin.patch create mode 100644 nss-myhostname-config create mode 100644 optionally-warn-if-nss-myhostname-is-called.patch delete mode 100644 pam-properly-handle-ssh-logins-without-pam-tty-field.patch create mode 100644 parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch delete mode 100644 parse-multiline-env-file.patch delete mode 100644 path-util-fix-potential-crash.patch delete mode 100644 rbind-mount.patch create mode 100644 re-add-persistent-net.patch create mode 100644 re-enable-by_path-links-for-ata-devices.patch rename new-lsb-headers.patch => remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch (74%) delete mode 100644 remount-ro-before-unmount.patch create mode 100644 restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch delete mode 100644 revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch delete mode 100644 reword-rescue-mode-hints.patch create mode 100644 rules-create-by-id-scsi-links-for-ATA-devices.patch rename 0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch => service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch (66%) delete mode 100644 service-forking-ignore-exit-status-main-process.patch delete mode 100644 shutdown-dont-force-mnt-force-on-final-umount.patch delete mode 100644 shutdown-ignore-loop-devices-without-backing-file.patch delete mode 100644 shutdown-improvements.patch delete mode 100644 socket-improve-error-message.patch delete mode 100644 socket-verbose-error-message.patch delete mode 100644 storage-after-cryptsetup.patch delete mode 100644 strv-cleanup-error-path-loops.patch delete mode 100644 support-hybrid-suspend.patch delete mode 100644 support-suse-clock-sysconfig.patch delete mode 100644 support-sysvinit.patch delete mode 100644 switch-root-try-pivot-root.patch delete mode 100644 sync-on-shutdown.patch delete mode 100644 sysctl-modules.patch delete mode 100644 sysctl-parse-all-keys.patch delete mode 100644 systemctl-no-assert-on-reboot-without-dbus.patch delete mode 100644 systemctl-print-wall-on-if-successful.patch delete mode 100644 systemctl-verbose-message-on-missing-install.patch delete mode 100644 systemd-195.tar.xz create mode 100644 systemd-200.tar.xz delete mode 100644 systemd-cgls-fix-piping-output.patch delete mode 100644 systemd-fix-merge-ignore-dependencies.patch create mode 100644 timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch delete mode 100644 timedated-donot-close-bogus-dbus-connection.patch delete mode 100644 tmpfiles-X-type.patch delete mode 100644 tty1.patch create mode 100644 udev-always-rename-network.patch create mode 100644 udev-fix-sg-autoload-regression.patch create mode 100644 udev-netlink-null-rules.patch delete mode 100644 var-run-lock.patch delete mode 100644 wait-for-processes-killed.patch delete mode 100644 xdm-display-manager.patch diff --git a/0001-service-Fix-dependencies-added-when-parsing-insserv..patch b/0001-service-Fix-dependencies-added-when-parsing-insserv..patch deleted file mode 100644 index 17c4a2bd..00000000 --- a/0001-service-Fix-dependencies-added-when-parsing-insserv..patch +++ /dev/null @@ -1,115 +0,0 @@ -Index: systemd-195/src/core/service.c -=================================================================== ---- systemd-195.orig/src/core/service.c -+++ systemd-195/src/core/service.c -@@ -3391,12 +3391,13 @@ static void service_notify_message(Unit - - #ifdef HAVE_SYSV_COMPAT - --#ifdef TARGET_SUSE --static void sysv_facility_in_insserv_conf(Manager *mgr) { -- FILE *f=NULL; -+#if defined(TARGET_SUSE) || defined(TARGET_DEBIAN) -+static void sysv_parse_insserv_conf(Manager *mgr, const char* filename) { -+ FILE *f = NULL; - int r; - -- if (!(f = fopen("/etc/insserv.conf", "re"))) { -+ if (!(f = fopen(filename, "re"))) { -+ log_error("Failed to open file %s", filename); - r = errno == ENOENT ? 0 : -errno; - goto finish; - } -@@ -3410,7 +3411,7 @@ static void sysv_facility_in_insserv_con - break; - - r = -errno; -- log_error("Failed to read configuration file '/etc/insserv.conf': %s", strerror(-r)); -+ log_error("Failed to read configuration file '%s': %s", filename, strerror(-r)); - goto finish; - } - -@@ -3425,23 +3426,30 @@ static void sysv_facility_in_insserv_con - Unit *u; - if (sysv_translate_facility(parsed[0], NULL, &facility) < 0) - continue; -+ if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) { -+ /* insert also a Wants dependency from remote-fs-pre on remote-fs */ -+ u = manager_get_unit(mgr, SPECIAL_REMOTE_FS_TARGET); -+ unit_add_dependency_by_name(u, UNIT_WANTS, SPECIAL_REMOTE_FS_PRE_TARGET, NULL, true); -+ free (facility); -+ facility=strdup(SPECIAL_REMOTE_FS_PRE_TARGET); -+ } - if ((u = manager_get_unit(mgr, facility)) && (u->type == UNIT_TARGET)) { -- UnitDependency e; - 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_two_dependencies_by_name_inverse(u, UNIT_WANTS, UNIT_BEFORE, dep, NULL, true); -+ if (*j[0] != '+') -+ r = unit_add_dependency_by_name(u, UNIT_REQUIRES, dep, NULL, true); - free(dep); - } - } -@@ -3454,6 +3462,35 @@ finish: - fclose(f); - - } -+ -+static void sysv_facility_in_insserv_conf(Manager *mgr) { -+ DIR *d =NULL; -+ struct dirent *de; -+ -+#ifdef TARGET_DEBIAN -+ if (!(d = opendir("/etc/insserv.conf.d/"))) -+ if (errno != ENOENT) { -+ log_warning("opendir() failed on /etc/insserv.conf.d/ %s", strerror(errno)); -+ goto finish; -+ } -+ -+ while ((de = readdir(d))) { -+ char *path = NULL; -+ if (ignore_file(de->d_name)) -+ continue; -+ -+ path = join("/etc/insserv.conf.d/", de->d_name, NULL); -+ sysv_parse_insserv_conf(mgr, path); -+ free(path); -+ } -+finish: -+ if (d) -+ closedir(d); -+#endif -+ -+ sysv_parse_insserv_conf(mgr, "/etc/insserv.conf"); -+} -+ - #endif - - static int service_enumerate(Manager *m) { -@@ -3604,7 +3641,7 @@ static int service_enumerate(Manager *m) - - r = 0; - --#ifdef TARGET_SUSE -+#if defined(TARGET_SUSE) || defined(TARGET_DEBIAN) - sysv_facility_in_insserv_conf (m); - #endif - diff --git a/1001-Reinstate-TIMEOUT-handling.patch b/1001-Reinstate-TIMEOUT-handling.patch index f90c265a..68c0d70c 100644 --- a/1001-Reinstate-TIMEOUT-handling.patch +++ b/1001-Reinstate-TIMEOUT-handling.patch @@ -1,3 +1,7 @@ +From: Robert Milasan +Date: Thu, 11 Apr 2013 15:39:39 +0200 +Subject: Reinstate TIMEOUT handling + Without treating events with timeouts specially some drivers would cause a 30 seconds stall on boot: . @@ -10,29 +14,24 @@ the kernel (3.4?). This reverts 43d5c5f03645c4b842659f9b5bd0ae465e885e92 and 57c6f8ae5f52a6e8ffc66a54966346f733dded39. --- + src/libudev/libudev-device.c | 19 +++++++++++++++++++ + src/libudev/libudev-private.h | 1 + + src/udev/udevd.c | 13 ++++++++++--- + 3 files changed, 30 insertions(+), 3 deletions(-) -Note: this is mostly a FYI, and whether or not it makes sense -to apply this upstream depends on how big problems other report -regarding this issue. - - src/libudev-device.c | 19 +++++++++++++++++++ - src/libudev-private.h | 1 + - src/udevd.c | 13 ++++++++++--- - 4 files changed, 32 insertions(+), 3 deletions(-) - -Index: systemd-195/src/libudev/libudev-device.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-device.c -+++ systemd-195/src/libudev/libudev-device.c -@@ -68,6 +68,7 @@ struct udev_device { +diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c +index 6bb2e41..4fdd242 100644 +--- a/src/libudev/libudev-device.c ++++ b/src/libudev/libudev-device.c +@@ -78,6 +78,7 @@ struct udev_device { struct udev_list tags_list; unsigned long long int seqnum; - unsigned long long int usec_initialized; + usec_t usec_initialized; + int timeout; int devlink_priority; int refcount; dev_t devnum; -@@ -162,6 +163,21 @@ static int udev_device_set_devnum(struct +@@ -172,6 +173,21 @@ static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) return 0; } @@ -54,7 +53,7 @@ Index: systemd-195/src/libudev/libudev-device.c const char *udev_device_get_devpath_old(struct udev_device *udev_device) { return udev_device->devpath_old; -@@ -418,6 +434,8 @@ void udev_device_add_property_from_strin +@@ -462,6 +478,8 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device, udev_device_set_devpath_old(udev_device, &property[12]); } else if (startswith(property, "SEQNUM=")) { udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10)); @@ -63,7 +62,7 @@ Index: systemd-195/src/libudev/libudev-device.c } else if (startswith(property, "IFINDEX=")) { udev_device_set_ifindex(udev_device, strtoull(&property[8], NULL, 10)); } else if (startswith(property, "DEVMODE=")) { -@@ -605,6 +623,7 @@ struct udev_device *udev_device_new(stru +@@ -653,6 +671,7 @@ struct udev_device *udev_device_new(struct udev *udev) udev_list_init(udev, &udev_device->sysattr_value_list, true); udev_list_init(udev, &udev_device->sysattr_list, false); udev_list_init(udev, &udev_device->tags_list, true); @@ -71,23 +70,23 @@ Index: systemd-195/src/libudev/libudev-device.c udev_device->watch_handle = -1; /* copy global properties */ udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev)) -Index: systemd-195/src/libudev/libudev-private.h -=================================================================== ---- systemd-195.orig/src/libudev/libudev-private.h -+++ systemd-195/src/libudev/libudev-private.h -@@ -65,6 +65,7 @@ const char *udev_device_get_id_filename( +diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h +index 54c51ac..d2124ea 100644 +--- a/src/libudev/libudev-private.h ++++ b/src/libudev/libudev-private.h +@@ -77,6 +77,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device); void udev_device_set_is_initialized(struct udev_device *udev_device); int udev_device_add_tag(struct udev_device *udev_device, const char *tag); void udev_device_cleanup_tags_list(struct udev_device *udev_device); +int udev_device_get_timeout(struct udev_device *udev_device); - unsigned long long udev_device_get_usec_initialized(struct udev_device *udev_device); - void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned long long usec_initialized); + usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); + void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized); int udev_device_get_devlink_priority(struct udev_device *udev_device); -Index: systemd-195/src/udev/udevd.c -=================================================================== ---- systemd-195.orig/src/udev/udevd.c -+++ systemd-195/src/udev/udevd.c -@@ -388,7 +388,7 @@ out: +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 2ad7388..5a90b60 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -391,7 +391,7 @@ out: } } @@ -96,7 +95,7 @@ Index: systemd-195/src/udev/udevd.c { struct udev_list_node *loop; -@@ -414,7 +414,7 @@ static void event_run(struct event *even +@@ -417,7 +417,7 @@ static void event_run(struct event *event) return; } @@ -105,7 +104,7 @@ Index: systemd-195/src/udev/udevd.c if (children_max > 1) log_debug("maximum number (%i) of children reached\n", children); return; -@@ -450,6 +450,13 @@ static int event_queue_insert(struct ude +@@ -455,6 +455,13 @@ static int event_queue_insert(struct udev_device *dev) event->state = EVENT_QUEUED; udev_list_node_append(&event->node, &event_list); @@ -119,7 +118,7 @@ Index: systemd-195/src/udev/udevd.c return 0; } -@@ -559,7 +566,7 @@ static void event_queue_start(struct ude +@@ -566,7 +573,7 @@ static void event_queue_start(struct udev *udev) if (is_devpath_busy(event)) continue; diff --git a/1002-re-enable-by_path-links-for-ata-devices.patch b/1002-re-enable-by_path-links-for-ata-devices.patch index 9250624f..64f01c1f 100644 --- a/1002-re-enable-by_path-links-for-ata-devices.patch +++ b/1002-re-enable-by_path-links-for-ata-devices.patch @@ -1,9 +1,18 @@ -Index: systemd-195/src/udev/udev-builtin-path_id.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin-path_id.c -+++ systemd-195/src/udev/udev-builtin-path_id.c -@@ -302,6 +302,85 @@ out: - return hostdev; +From: Robert Milasan +Date: Thu, 12 Jul 2012 15:56:34 +0000 +Subject: re-enable by_path links for ata devices + +Fix by-path links for ATA transport (bnc#770910) +--- + src/udev/udev-builtin-path_id.c | 92 +++++++++++++++++++++++++++++++++++------ + 1 file changed, 80 insertions(+), 12 deletions(-) + +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index da02731..a77d4e8 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -338,6 +338,85 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char * + return parent; } +static struct udev_device *handle_ata(struct udev_device *parent, char **path) @@ -88,17 +97,20 @@ Index: systemd-195/src/udev/udev-builtin-path_id.c static struct udev_device *handle_scsi(struct udev_device *parent, char **path) { const char *devtype; -@@ -338,16 +417,8 @@ static struct udev_device *handle_scsi(s +@@ -374,19 +453,8 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path) goto out; } - /* -- * We do not support the ATA transport class, it creates duplicated link -- * names as the fake SCSI host adapters are all separated, they are all -- * re-based as host == 0. ATA should just stop faking two duplicated -- * hierarchies for a single topology and leave the SCSI stuff alone; -- * until that happens, there are no by-path/ links for ATA devices behind -- * an ATA transport class. +- * We do not support the ATA transport class, it uses global counters +- * to name the ata devices which numbers spread across multiple +- * controllers. +- * +- * The real link numbers are not exported. Also, possible chains of ports +- * behind port multipliers cannot be composed that way. +- * +- * Until all that is solved at the kernel level, there are no by-path/ +- * links for ATA devices. - */ if (strstr(name, "/ata") != NULL) { - parent = NULL; diff --git a/1003-rules-create-by-id-scsi-links-for-ATA-devices.patch b/1003-rules-create-by-id-scsi-links-for-ATA-devices.patch index c7b3b1cd..c2f3186c 100644 --- a/1003-rules-create-by-id-scsi-links-for-ATA-devices.patch +++ b/1003-rules-create-by-id-scsi-links-for-ATA-devices.patch @@ -1,8 +1,17 @@ -Index: systemd-195/rules/60-persistent-storage.rules -=================================================================== ---- systemd-195.orig/rules/60-persistent-storage.rules -+++ systemd-195/rules/60-persistent-storage.rules -@@ -44,6 +44,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", +From: Robert Milasan +Date: Wed, 27 Jun 2012 08:55:59 +0000 +Subject: rules create by id scsi links for ATA devices + +Re-enable creation of by-id scsi links for ATA devices. (bnc#769002) +--- + rules/60-persistent-storage.rules | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules +index a4d009a..f720c7e 100644 +--- a/rules/60-persistent-storage.rules ++++ b/rules/60-persistent-storage.rules +@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" diff --git a/1004-udev-netlink-null-rules.patch b/1004-udev-netlink-null-rules.patch index e5fd1b7e..5a4b457c 100644 --- a/1004-udev-netlink-null-rules.patch +++ b/1004-udev-netlink-null-rules.patch @@ -1,11 +1,20 @@ -Index: systemd-195/src/udev/udevd.c -=================================================================== ---- systemd-195.orig/src/udev/udevd.c -+++ systemd-195/src/udev/udevd.c -@@ -1513,6 +1513,8 @@ int main(int argc, char *argv[]) +From: Robert Milasan +Date: Mon, 6 Aug 2012 13:35:34 +0000 +Subject: udev netlink null rules + +udevd race for netlink events (bnc#774646) +--- + src/udev/udevd.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 5a90b60..2a0bf60 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -1410,6 +1410,8 @@ int main(int argc, char *argv[]) dev = udev_monitor_receive_device(monitor); if (dev != NULL) { - udev_device_set_usec_initialized(dev, now_usec()); + udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); + if (rules == NULL) + rules = udev_rules_new(udev, resolve_names); if (event_queue_insert(dev) < 0) diff --git a/1005-udev-fix-sg-autoload-regression.patch b/1005-udev-fix-sg-autoload-regression.patch index 642f4faf..1e79d84e 100644 --- a/1005-udev-fix-sg-autoload-regression.patch +++ b/1005-udev-fix-sg-autoload-regression.patch @@ -1,12 +1,22 @@ -Index: systemd-190/rules/80-drivers.rules -=================================================================== ---- systemd-190.orig/rules/80-drivers.rules -+++ systemd-190/rules/80-drivers.rules -@@ -7,6 +7,7 @@ SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}== - SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", IMPORT{builtin}="kmod load tifm_ms" - SUBSYSTEM=="memstick", IMPORT{builtin}="kmod load ms_block mspro_block" - SUBSYSTEM=="i2o", IMPORT{builtin}="kmod load i2o_block" +From: Robert Milasan +Date: Tue, 7 Aug 2012 08:34:49 +0000 +Subject: udev fix sg autoload regression + +Fix regression in udev where sg driver is no longer loaded for disc +events. Will need a non-udev solution for 12.3 (bnc#761109). +--- + rules/80-drivers.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules +index 50523e4..b863532 100644 +--- a/rules/80-drivers.rules ++++ b/rules/80-drivers.rules +@@ -7,6 +7,7 @@ SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd" + SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms" + SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block" + SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block" +SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", IMPORT{builtin}="kmod load sg" SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev" + KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl" - LABEL="drivers_end" diff --git a/1006-fix-devname-prefix.patch b/1006-fix-devname-prefix.patch deleted file mode 100644 index 7fbc160a..00000000 --- a/1006-fix-devname-prefix.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-195/src/udev/udevd.c -=================================================================== ---- systemd-195.orig/src/udev/udevd.c -+++ systemd-195/src/udev/udevd.c -@@ -820,7 +820,7 @@ static void static_dev_create_from_modul - FILE *f; - - uname(&kernel); -- util_strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL); -+ util_strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL); - f = fopen(modules, "re"); - if (f == NULL) - return; diff --git a/1007-fix-devname-prefix.patch b/1007-fix-devname-prefix.patch new file mode 100644 index 00000000..8ca10b93 --- /dev/null +++ b/1007-fix-devname-prefix.patch @@ -0,0 +1,22 @@ +From: Frederic Crozat +Date: Wed, 5 Dec 2012 15:13:27 +0000 +Subject: fix devname prefix + +fix modules.devname path, it isn't in /usr. +--- + src/udev/udevd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 2a0bf60..6c2c2c9 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -827,7 +827,7 @@ static void static_dev_create_from_modules(struct udev *udev) + FILE *f; + + uname(&kernel); +- strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL); ++ strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL); + f = fopen(modules, "re"); + if (f == NULL) + return; diff --git a/1007-udevd-add-missing-to-getopt_long-e.patch b/1007-udevd-add-missing-to-getopt_long-e.patch deleted file mode 100644 index 59cba6ae..00000000 --- a/1007-udevd-add-missing-to-getopt_long-e.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5bbbe461fd4d133eac49f41210e2fd4846f577d8 Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Wed, 19 Dec 2012 13:12:26 +0100 -Subject: [PATCH] udevd: add missing ':' to getopt_long 'e' - -Parameter -e is set without additional argument in getopt -and this leads to segfault when calling 'systemd-udevd -e'. ---- - src/udev/udevd.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Index: systemd-195/src/udev/udevd.c -=================================================================== ---- systemd-195.orig/src/udev/udevd.c -+++ systemd-195/src/udev/udevd.c -@@ -1104,7 +1104,7 @@ int main(int argc, char *argv[]) - for (;;) { - int option; - -- option = getopt_long(argc, argv, "c:deDtN:hV", options, NULL); -+ option = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL); - if (option == -1) - break; - diff --git a/1008-udev-path_id-handle-Hyper-V-devices.patch b/1008-udev-path_id-handle-Hyper-V-devices.patch deleted file mode 100644 index b4273dd7..00000000 --- a/1008-udev-path_id-handle-Hyper-V-devices.patch +++ /dev/null @@ -1,72 +0,0 @@ -From a24d03b8ee2ca62cd1273e27cf4e79ddcc0fbb1c Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Fri, 23 Nov 2012 14:12:39 +0100 -Subject: [PATCH] udev: path_id - handle Hyper-V devices - -Hyper-V has an abstract bus, which gets renumbered on guest -startup. So instead of the bus numbers we should be using -the device GUIDs, which can be retrieved from the 'device_id' -sysfs attribute. ---- - src/udev/udev-builtin-path_id.c | 41 +++++++++++++++++++++++++++++++++++++++ - 1 files changed, 41 insertions(+), 0 deletions(-) - -Index: systemd-195/src/udev/udev-builtin-path_id.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin-path_id.c -+++ systemd-195/src/udev/udev-builtin-path_id.c -@@ -381,6 +381,42 @@ out: - return hostdev; - } - -+static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char **path) { -+ struct udev_device *hostdev; -+ struct udev_device *vmbusdev; -+ const char *guid_str; -+ char *lun = NULL; -+ char guid[38]; -+ size_t i, k; -+ -+ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); -+ if (!hostdev) -+ return NULL; -+ -+ vmbusdev = udev_device_get_parent(hostdev); -+ if (!vmbusdev) -+ return NULL; -+ -+ guid_str = udev_device_get_sysattr_value(vmbusdev, "device_id"); -+ if (!guid_str) -+ return NULL; -+ -+ if (strlen(guid_str) < 37 || guid_str[0] != '{' || guid_str[36] != '}') -+ return NULL; -+ -+ for (i = 1, k = 0; i < 36; i++) { -+ if (guid_str[i] == '-') -+ continue; -+ guid[k++] = guid_str[i]; -+ } -+ guid[k] = '\0'; -+ -+ format_lun_number(parent, &lun); -+ path_prepend(path, "vmbus-%s-%s", guid, lun); -+ free(lun); -+ return parent; -+} -+ - static struct udev_device *handle_scsi(struct udev_device *parent, char **path) - { - const char *devtype; -@@ -422,6 +458,11 @@ static struct udev_device *handle_scsi(s - goto out; - } - -+ if (strstr(name, "/vmbus_") != NULL) { -+ parent = handle_scsi_hyperv(parent, path); -+ goto out; -+ } -+ - parent = handle_scsi_default(parent, path); - out: - return parent; diff --git a/1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch b/1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch deleted file mode 100644 index 58bf335c..00000000 --- a/1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 68c77c2f6168dca0ce7b5edb81612cd6be39e63d Mon Sep 17 00:00:00 2001 -From: Alessandro Crismani -Date: Wed, 8 Aug 2012 14:19:32 +0200 -Subject: [PATCH] keymap: Update the list of Samsung Series 9 models - -Currently, keymaps are provided only for the NP90X3A laptop. Samsung -introduced updated models, codenamed 900X3B, 900X3C, 900X4B, 900X4C, -which are currently not matched by udev rules. This patch includes the -newer modules in udev rules and move the samsung-n90x3a file defining -keys to a more generic samsung-series-9 file. - -The patch was tested on a 900X4C laptop, and other people reported -that the rules also work for 900X3B and 900X3C ones. ---- - delete mode 100644 keymaps-force-release/samsung-90x3a - create mode 100644 keymaps-force-release/samsung-series-9 - delete mode 100644 keymaps/samsung-90x3a - create mode 100644 keymaps/samsung-series-9 - -From 68c77c2f6168dca0ce7b5edb81612cd6be39e63d Mon Sep 17 00:00:00 2001 -From: Alessandro Crismani -Date: Wed, 8 Aug 2012 14:19:32 +0200 -Subject: [PATCH] keymap: Update the list of Samsung Series 9 models - -Currently, keymaps are provided only for the NP90X3A laptop. Samsung -introduced updated models, codenamed 900X3B, 900X3C, 900X4B, 900X4C, -which are currently not matched by udev rules. This patch includes the -newer modules in udev rules and move the samsung-n90x3a file defining -keys to a more generic samsung-series-9 file. - -The patch was tested on a 900X4C laptop, and other people reported -that the rules also work for 900X3B and 900X3C ones. ---- - Makefile.am | 4 ++-- - keymaps-force-release/samsung-90x3a | 6 ------ - keymaps-force-release/samsung-series-9 | 6 ++++++ - keymaps/samsung-90x3a | 5 ----- - keymaps/samsung-series-9 | 5 +++++ - src/udev/keymap/95-keyboard-force-release.rules | 2 +- - src/udev/keymap/95-keymap.rules | 2 +- - 7 files changed, 15 insertions(+), 15 deletions(-) - delete mode 100644 keymaps-force-release/samsung-90x3a - create mode 100644 keymaps-force-release/samsung-series-9 - delete mode 100644 keymaps/samsung-90x3a - create mode 100644 keymaps/samsung-series-9 - -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -2272,7 +2272,7 @@ dist_udevkeymap_DATA = \ - keymaps/onkyo \ - keymaps/oqo-model2 \ - keymaps/samsung-other \ -- keymaps/samsung-90x3a \ -+ keymaps/samsung-series-9 \ - keymaps/samsung-sq1us \ - keymaps/samsung-sx20s \ - keymaps/toshiba-satellite_a100 \ -@@ -2286,7 +2286,7 @@ dist_udevkeymapforcerel_DATA = \ - keymaps-force-release/dell-xps \ - keymaps-force-release/hp-other \ - keymaps-force-release/samsung-other \ -- keymaps-force-release/samsung-90x3a \ -+ keymaps-force-release/samsung-series-9 \ - keymaps-force-release/common-volume-keys - - src/udev/keymap/keys.txt: Makefile -Index: systemd-195/keymaps-force-release/samsung-90x3a -=================================================================== ---- systemd-195.orig/keymaps-force-release/samsung-90x3a -+++ /dev/null -@@ -1,6 +0,0 @@ --# list of scancodes (hex or decimal), optional comment --0xCE # Fn+F8 keyboard backlit up --0x8D # Fn+F7 keyboard backlit down --0x97 # Fn+F12 wifi on/off --0x96 # Fn+F1 performance mode (?) --0xD5 # Fn+F6 battery life extender -Index: systemd-195/keymaps-force-release/samsung-series-9 -=================================================================== ---- /dev/null -+++ systemd-195/keymaps-force-release/samsung-series-9 -@@ -0,0 +1,6 @@ -+# list of scancodes (hex or decimal), optional comment -+0xCE # Fn+F8 keyboard backlit up -+0x8D # Fn+F7 keyboard backlit down -+0x97 # Fn+F12 wifi on/off -+0x96 # Fn+F1 performance mode (?) -+0xD5 # Fn+F6 battery life extender -Index: systemd-195/keymaps/samsung-90x3a -=================================================================== ---- systemd-195.orig/keymaps/samsung-90x3a -+++ /dev/null -@@ -1,5 +0,0 @@ --0x96 kbdillumup # Fn+F8 keyboard backlit up --0x97 kbdillumdown # Fn+F7 keyboard backlit down --0xD5 wlan # Fn+F12 wifi on/off --0xCE prog1 # Fn+F1 performance mode --0x8D prog2 # Fn+F6 battery life extender -Index: systemd-195/keymaps/samsung-series-9 -=================================================================== ---- /dev/null -+++ systemd-195/keymaps/samsung-series-9 -@@ -0,0 +1,5 @@ -+0x96 kbdillumup # Fn+F8 keyboard backlit up -+0x97 kbdillumdown # Fn+F7 keyboard backlit down -+0xD5 wlan # Fn+F12 wifi on/off -+0xCE prog1 # Fn+F1 performance mode -+0x8D prog2 # Fn+F6 battery life extender -Index: systemd-195/src/udev/keymap/95-keyboard-force-release.rules -=================================================================== ---- systemd-195.orig/src/udev/keymap/95-keyboard-force-release.rules -+++ systemd-195/src/udev/keymap/95-keyboard-force-release.rules -@@ -19,7 +19,7 @@ DRIVER!="atkbd", GOTO="force_release_end - ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}" - - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keyboard-force-release.sh $devpath samsung-other" --ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*", RUN+="keyboard-force-release.sh $devpath samsung-90x3a" -+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keyboard-force-release.sh $devpath samsung-series-9" - - ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath common-volume-keys" - ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Latitude E*|Latitude *U|Precision M*", RUN+="keyboard-force-release.sh $devpath dell-touchpad" -Index: systemd-195/src/udev/keymap/95-keymap.rules -=================================================================== ---- systemd-195.orig/src/udev/keymap/95-keymap.rules -+++ systemd-195/src/udev/keymap/95-keymap.rules -@@ -147,7 +147,7 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][n - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s" - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us" - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700Z*", RUN+="keymap $name 0xBA ejectcd 0x96 keyboardbrightnessup 0x97 keyboardbrightnessdown" --ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*", RUN+="keymap $name samsung-90x3a" -+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keymap $name samsung-series-9" - - ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100" - ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite A110", RUN+="keymap $name toshiba-satellite_a110" diff --git a/1010-keymap-Add-Samsung-700T.patch b/1010-keymap-Add-Samsung-700T.patch deleted file mode 100644 index 860da9ad..00000000 --- a/1010-keymap-Add-Samsung-700T.patch +++ /dev/null @@ -1,22 +0,0 @@ -From a5dea3d43b3866b48c66d6bef9663cf8372fd96c Mon Sep 17 00:00:00 2001 -From: Martin Pitt -Date: Wed, 28 Nov 2012 21:33:26 +0100 -Subject: [PATCH] keymap: Add Samsung 700T - -https://bugzilla.redhat.com/show_bug.cgi?id=879691 ---- - src/udev/keymap/95-keymap.rules | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -Index: systemd-195/src/udev/keymap/95-keymap.rules -=================================================================== ---- systemd-195.orig/src/udev/keymap/95-keymap.rules -+++ systemd-195/src/udev/keymap/95-keymap.rules -@@ -147,6 +147,7 @@ ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][n - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s" - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us" - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700Z*", RUN+="keymap $name 0xBA ejectcd 0x96 keyboardbrightnessup 0x97 keyboardbrightnessdown" -+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700T*", RUN+="keymap $name 0xAD leftmeta" - ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keymap $name samsung-series-9" - - ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="SATELLITE A100", RUN+="keymap $name toshiba-satellite_a100" diff --git a/1011-libudev-avoid-leak-during-realloc-failure.patch b/1011-libudev-avoid-leak-during-realloc-failure.patch deleted file mode 100644 index 6b5d1907..00000000 --- a/1011-libudev-avoid-leak-during-realloc-failure.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cf2292f5ac87087f57dbd632a25a332c9d194ebf Mon Sep 17 00:00:00 2001 -From: Mauro Dreissig -Date: Sun, 11 Nov 2012 22:07:51 -0200 -Subject: [PATCH] libudev: avoid leak during realloc failure - ---- - src/libudev/libudev-list.c | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) - -Index: systemd-195/src/libudev/libudev-list.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-list.c -+++ systemd-195/src/libudev/libudev-list.c -@@ -177,18 +177,20 @@ struct udev_list_entry *udev_list_entry_ - if (list->unique) { - /* allocate or enlarge sorted array if needed */ - if (list->entries_cur >= list->entries_max) { -+ struct udev_list_entry **entries; - unsigned int add; - - add = list->entries_max; - if (add < 1) - add = 64; -- list->entries = realloc(list->entries, (list->entries_max + add) * sizeof(struct udev_list_entry *)); -- if (list->entries == NULL) { -+ entries = realloc(list->entries, (list->entries_max + add) * sizeof(struct udev_list_entry *)); -+ if (entries == NULL) { - free(entry->name); - free(entry->value); - free(entry); - return NULL; - } -+ list->entries = entries; - list->entries_max += add; - } - diff --git a/1012-libudev-do-not-resolve-attr-device-symlinks.patch b/1012-libudev-do-not-resolve-attr-device-symlinks.patch deleted file mode 100644 index 9e48bc52..00000000 --- a/1012-libudev-do-not-resolve-attr-device-symlinks.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5ae18ddc0d86673520c0dd6b59ccac8afc8aa605 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 20 Nov 2012 18:07:57 +0100 -Subject: [PATCH] libudev: do not resolve $attr{device} symlinks - ---- - src/libudev/libudev-device.c | 19 ++++++++++--------- - 1 files changed, 10 insertions(+), 9 deletions(-) - -Index: systemd-195/src/libudev/libudev-device.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-device.c -+++ systemd-195/src/libudev/libudev-device.c -@@ -1369,16 +1369,17 @@ _public_ const char *udev_device_get_sys - goto out; - } - -- /* resolve link to a device and return its syspath */ -- util_strscpyl(path, sizeof(path), udev_device->syspath, "/", sysattr, NULL); -- dev = udev_device_new_from_syspath(udev_device->udev, path); -- if (dev != NULL) { -- list_entry = udev_list_entry_add(&udev_device->sysattr_value_list, sysattr, -- udev_device_get_syspath(dev)); -- val = udev_list_entry_get_value(list_entry); -- udev_device_unref(dev); -+ /* resolve custom link to a device and return its syspath */ -+ if (!streq(sysattr, "device")) { -+ util_strscpyl(path, sizeof(path), udev_device->syspath, "/", sysattr, NULL); -+ dev = udev_device_new_from_syspath(udev_device->udev, path); -+ if (dev != NULL) { -+ list_entry = udev_list_entry_add(&udev_device->sysattr_value_list, sysattr, -+ udev_device_get_syspath(dev)); -+ val = udev_list_entry_get_value(list_entry); -+ udev_device_unref(dev); -+ } - } -- - goto out; - } - diff --git a/1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch b/1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch deleted file mode 100644 index a93c2272..00000000 --- a/1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch +++ /dev/null @@ -1,23 +0,0 @@ -From e68893075083a7461b1572233d23fdb23541d630 Mon Sep 17 00:00:00 2001 -From: Michael Terry -Date: Fri, 14 Dec 2012 09:02:13 -0500 -Subject: [PATCH] libudev: validate 'udev' argument to udev_enumerate_new() - -https://bugs.freedesktop.org/show_bug.cgi?id=58289 ---- - src/libudev/libudev-enumerate.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -Index: systemd-195/src/libudev/libudev-enumerate.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-enumerate.c -+++ systemd-195/src/libudev/libudev-enumerate.c -@@ -73,6 +73,8 @@ _public_ struct udev_enumerate *udev_enu - { - struct udev_enumerate *udev_enumerate; - -+ if (udev == NULL) -+ return NULL; - udev_enumerate = calloc(1, sizeof(struct udev_enumerate)); - if (udev_enumerate == NULL) - return NULL; diff --git a/1014-udev-fix-whitespace.patch b/1014-udev-fix-whitespace.patch deleted file mode 100644 index fcccc037..00000000 --- a/1014-udev-fix-whitespace.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 3fd0c4c66df45ee457cfb5e4ca8e285914ebc32f Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 20 Nov 2012 18:07:14 +0100 -Subject: [PATCH] udev: fix whitespace - ---- - src/udev/udev-event.c | 36 ++++++++++++++++++------------------ - 1 files changed, 18 insertions(+), 18 deletions(-) - -Index: systemd-195/src/udev/udev-event.c -=================================================================== ---- systemd-195.orig/src/udev/udev-event.c -+++ systemd-195/src/udev/udev-event.c -@@ -90,24 +90,24 @@ size_t udev_event_apply_format(struct ud - const char fmt; - enum subst_type type; - } map[] = { -- { .name = "devnode", .fmt = 'N', .type = SUBST_DEVNODE }, -- { .name = "tempnode", .fmt = 'N', .type = SUBST_DEVNODE }, -- { .name = "attr", .fmt = 's', .type = SUBST_ATTR }, -- { .name = "sysfs", .fmt = 's', .type = SUBST_ATTR }, -- { .name = "env", .fmt = 'E', .type = SUBST_ENV }, -- { .name = "kernel", .fmt = 'k', .type = SUBST_KERNEL }, -- { .name = "number", .fmt = 'n', .type = SUBST_KERNEL_NUMBER }, -- { .name = "driver", .fmt = 'd', .type = SUBST_DRIVER }, -- { .name = "devpath", .fmt = 'p', .type = SUBST_DEVPATH }, -- { .name = "id", .fmt = 'b', .type = SUBST_ID }, -- { .name = "major", .fmt = 'M', .type = SUBST_MAJOR }, -- { .name = "minor", .fmt = 'm', .type = SUBST_MINOR }, -- { .name = "result", .fmt = 'c', .type = SUBST_RESULT }, -- { .name = "parent", .fmt = 'P', .type = SUBST_PARENT }, -- { .name = "name", .fmt = 'D', .type = SUBST_NAME }, -- { .name = "links", .fmt = 'L', .type = SUBST_LINKS }, -- { .name = "root", .fmt = 'r', .type = SUBST_ROOT }, -- { .name = "sys", .fmt = 'S', .type = SUBST_SYS }, -+ { .name = "devnode", .fmt = 'N', .type = SUBST_DEVNODE }, -+ { .name = "tempnode", .fmt = 'N', .type = SUBST_DEVNODE }, -+ { .name = "attr", .fmt = 's', .type = SUBST_ATTR }, -+ { .name = "sysfs", .fmt = 's', .type = SUBST_ATTR }, -+ { .name = "env", .fmt = 'E', .type = SUBST_ENV }, -+ { .name = "kernel", .fmt = 'k', .type = SUBST_KERNEL }, -+ { .name = "number", .fmt = 'n', .type = SUBST_KERNEL_NUMBER }, -+ { .name = "driver", .fmt = 'd', .type = SUBST_DRIVER }, -+ { .name = "devpath", .fmt = 'p', .type = SUBST_DEVPATH }, -+ { .name = "id", .fmt = 'b', .type = SUBST_ID }, -+ { .name = "major", .fmt = 'M', .type = SUBST_MAJOR }, -+ { .name = "minor", .fmt = 'm', .type = SUBST_MINOR }, -+ { .name = "result", .fmt = 'c', .type = SUBST_RESULT }, -+ { .name = "parent", .fmt = 'P', .type = SUBST_PARENT }, -+ { .name = "name", .fmt = 'D', .type = SUBST_NAME }, -+ { .name = "links", .fmt = 'L', .type = SUBST_LINKS }, -+ { .name = "root", .fmt = 'r', .type = SUBST_ROOT }, -+ { .name = "sys", .fmt = 'S', .type = SUBST_SYS }, - }; - const char *from; - char *s; diff --git a/1015-udev-properly-handle-symlink-removal-by-change-event.patch b/1015-udev-properly-handle-symlink-removal-by-change-event.patch deleted file mode 100644 index e579a466..00000000 --- a/1015-udev-properly-handle-symlink-removal-by-change-event.patch +++ /dev/null @@ -1,69 +0,0 @@ -From bf9d233f781f27841be6638ee745e9c80bda5f4d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 13 Nov 2012 02:05:06 +0100 -Subject: [PATCH] udev: properly handle symlink removal by 'change' event - -If a 'change' event is supposed to remove created symlinks, we create -a new device structure from the sysfs device and fill it with the list -of links, to compute the delta of the old and new list of links to apply. -If the device is already 'remove'd by the kernel though, udev fails to -create the device structure, so the links are not removed properly. - -> From: Neil Brown -> Date: Thu, 8 Nov 2012 10:39:06 +0100 -> Subject: [PATCH] If a 'change' event does not get handled by udev until -> after the device has subsequently disappeared, udev mis-handles -> it. This can happen with 'md' devices which emit a change -> event and then a remove event when they are stopped. It is -> normally only noticed if udev is very busy (lots of arrays -> being stopped at once) or the machine is otherwise loaded -> and reponding slowly. -> -> There are two problems. -> -> 1/ udev_device_new_from_syspath() will refuse to create the device -> structure if the device does not exist in /sys, and particularly if -> the uevent file does not exist. -> If a 'db' file does exist, that is sufficient evidence that the device -> is genuine and should be created. Equally if we have just received an -> event from the kernel about the device, it must be real. -> -> This patch just disabled the test for the 'uevent' file, it doesn't -> try imposing any other tests - it isn't clear that they are really -> needed. -> -> 2/ udev_event_execute_rules() calls udev_device_read_db() on a 'device' -> structure that is largely uninitialised and in particular does not -> have the 'subsystem' set. udev_device_read_db() needs the subsystem -> so it tries to read the 'subsystem' symlink out of sysfs. If the -> device is already deleted, this naturally fails. -> udev_event_execute_rules() knows the subsystem (as it was in the -> event message) so this patch simply sets the subsystem for the device -> structure to be loaded to match the subsystem of the device structure -> that is handling the event. -> -> With these two changes, deleted handling of change events will still -> correctly remove any symlinks that are not needed any more. - -Use udev_device_new() instead of allowing udev_device_new_from_syspath() -to proceed without a sysfs device. ---- - src/udev/udev-event.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -Index: systemd-195/src/udev/udev-event.c -=================================================================== ---- systemd-195.orig/src/udev/udev-event.c -+++ systemd-195/src/udev/udev-event.c -@@ -797,8 +797,10 @@ int udev_event_execute_rules(struct udev - if (major(udev_device_get_devnum(dev)) != 0) - udev_node_remove(dev); - } else { -- event->dev_db = udev_device_new_from_syspath(event->udev, udev_device_get_syspath(dev)); -+ event->dev_db = udev_device_new(event->udev); - if (event->dev_db != NULL) { -+ udev_device_set_syspath(event->dev_db, udev_device_get_syspath(dev)); -+ udev_device_set_subsystem(event->dev_db, udev_device_get_subsystem(dev)); - udev_device_read_db(event->dev_db, NULL); - udev_device_set_info_loaded(event->dev_db); - diff --git a/1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch b/1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch deleted file mode 100644 index bf6d799e..00000000 --- a/1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch +++ /dev/null @@ -1,64 +0,0 @@ -Index: systemd-195/src/udev/udev-builtin.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin.c -+++ systemd-195/src/udev/udev-builtin.c -@@ -42,24 +42,18 @@ static const struct udev_builtin *builti - #endif - }; - --int udev_builtin_init(struct udev *udev) -+void udev_builtin_init(struct udev *udev) - { - unsigned int i; -- int err = 0; - - if (initialized) -- return 0; -+ return; - -- for (i = 0; i < ELEMENTSOF(builtins); i++) { -- if (builtins[i]->init) { -- err = builtins[i]->init(udev); -- if (err < 0) -- break; -- } -- } -+ for (i = 0; i < ELEMENTSOF(builtins); i++) -+ if (builtins[i]->init) -+ builtins[i]->init(udev); - - initialized = true; -- return err; - } - - void udev_builtin_exit(struct udev *udev) -@@ -79,13 +73,11 @@ void udev_builtin_exit(struct udev *udev - bool udev_builtin_validate(struct udev *udev) - { - unsigned int i; -- bool change = false; - - for (i = 0; i < ELEMENTSOF(builtins); i++) -- if (builtins[i]->validate) -- if (builtins[i]->validate(udev)) -- change = true; -- return change; -+ if (builtins[i]->validate && builtins[i]->validate(udev)) -+ return true; -+ return false; - } - - void udev_builtin_list(struct udev *udev) -Index: systemd-195/src/udev/udev.h -=================================================================== ---- systemd-195.orig/src/udev/udev.h -+++ systemd-195/src/udev/udev.h -@@ -167,7 +167,7 @@ extern const struct udev_builtin udev_bu - extern const struct udev_builtin udev_builtin_usb_db; - extern const struct udev_builtin udev_builtin_usb_id; - extern const struct udev_builtin udev_builtin_uaccess; --int udev_builtin_init(struct udev *udev); -+void udev_builtin_init(struct udev *udev); - void udev_builtin_exit(struct udev *udev); - enum udev_builtin_cmd udev_builtin_lookup(const char *command); - const char *udev_builtin_name(enum udev_builtin_cmd cmd); diff --git a/1017-udev-use-usec_t-and-now.patch b/1017-udev-use-usec_t-and-now.patch deleted file mode 100644 index ca0b0131..00000000 --- a/1017-udev-use-usec_t-and-now.patch +++ /dev/null @@ -1,335 +0,0 @@ -Index: systemd-195/src/libudev/libudev-device-private.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-device-private.c -+++ systemd-195/src/libudev/libudev-device-private.c -@@ -147,7 +147,7 @@ int udev_device_update_db(struct udev_de - } - - if (udev_device_get_usec_initialized(udev_device) > 0) -- fprintf(f, "I:%llu\n", udev_device_get_usec_initialized(udev_device)); -+ fprintf(f, "I:%llu\n", (unsigned long long)udev_device_get_usec_initialized(udev_device)); - - udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { - if (!udev_list_entry_get_num(list_entry)) -Index: systemd-195/src/libudev/libudev-device.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-device.c -+++ systemd-195/src/libudev/libudev-device.c -@@ -67,7 +67,7 @@ struct udev_device { - struct udev_list sysattr_list; - struct udev_list tags_list; - unsigned long long int seqnum; -- unsigned long long int usec_initialized; -+ usec_t usec_initialized; - int timeout; - int devlink_priority; - int refcount; -@@ -262,7 +262,7 @@ static int udev_device_set_devtype(struc - return 0; - } - --static int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem) -+int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem) - { - free(udev_device->subsystem); - udev_device->subsystem = strdup(subsystem); -@@ -1286,7 +1286,7 @@ _public_ const char *udev_device_get_act - **/ - _public_ unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device) - { -- unsigned long long now_ts; -+ usec_t now_ts; - - if (udev_device == NULL) - return 0; -@@ -1294,23 +1294,23 @@ _public_ unsigned long long int udev_dev - udev_device_read_db(udev_device, NULL); - if (udev_device->usec_initialized == 0) - return 0; -- now_ts = now_usec(); -+ now_ts = now(CLOCK_MONOTONIC); - if (now_ts == 0) - return 0; - return now_ts - udev_device->usec_initialized; - } - --unsigned long long udev_device_get_usec_initialized(struct udev_device *udev_device) -+usec_t udev_device_get_usec_initialized(struct udev_device *udev_device) - { - return udev_device->usec_initialized; - } - --void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned long long usec_initialized) -+void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized) - { - char num[32]; - - udev_device->usec_initialized = usec_initialized; -- snprintf(num, sizeof(num), "%llu", usec_initialized); -+ snprintf(num, sizeof(num), "%llu", (unsigned long long)usec_initialized); - udev_device_add_property(udev_device, "USEC_INITIALIZED", num); - } - -Index: systemd-195/src/libudev/libudev-private.h -=================================================================== ---- systemd-195.orig/src/libudev/libudev-private.h -+++ systemd-195/src/libudev/libudev-private.h -@@ -48,6 +48,7 @@ struct udev_list_entry *udev_get_propert - /* libudev-device.c */ - struct udev_device *udev_device_new(struct udev *udev); - mode_t udev_device_get_devnode_mode(struct udev_device *udev_device); -+int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem); - int udev_device_set_syspath(struct udev_device *udev_device, const char *syspath); - int udev_device_set_devnode(struct udev_device *udev_device, const char *devnode); - int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink); -@@ -66,8 +67,8 @@ void udev_device_set_is_initialized(stru - int udev_device_add_tag(struct udev_device *udev_device, const char *tag); - void udev_device_cleanup_tags_list(struct udev_device *udev_device); - int udev_device_get_timeout(struct udev_device *udev_device); --unsigned long long udev_device_get_usec_initialized(struct udev_device *udev_device); --void udev_device_set_usec_initialized(struct udev_device *udev_device, unsigned long long usec_initialized); -+usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); -+void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized); - int udev_device_get_devlink_priority(struct udev_device *udev_device); - int udev_device_set_devlink_priority(struct udev_device *udev_device, int prio); - int udev_device_get_watch_handle(struct udev_device *udev_device); -@@ -166,7 +167,5 @@ uid_t util_lookup_user(struct udev *udev - gid_t util_lookup_group(struct udev *udev, const char *group); - int util_resolve_subsys_kernel(struct udev *udev, const char *string, - char *result, size_t maxsize, int read_value); --unsigned long long ts_usec(const struct timespec *ts); --unsigned long long now_usec(void); - ssize_t print_kmsg(const char *fmt, ...) __attribute__((format(printf, 1, 2))); - #endif -Index: systemd-195/src/libudev/libudev-util.c -=================================================================== ---- systemd-195.orig/src/libudev/libudev-util.c -+++ systemd-195/src/libudev/libudev-util.c -@@ -691,23 +691,6 @@ uint64_t util_string_bloom64(const char - return bits; - } - --#define USEC_PER_SEC 1000000ULL --#define NSEC_PER_USEC 1000ULL --unsigned long long ts_usec(const struct timespec *ts) --{ -- return (unsigned long long) ts->tv_sec * USEC_PER_SEC + -- (unsigned long long) ts->tv_nsec / NSEC_PER_USEC; --} -- --unsigned long long now_usec(void) --{ -- struct timespec ts; -- -- if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) -- return 0; -- return ts_usec(&ts); --} -- - ssize_t print_kmsg(const char *fmt, ...) - { - int fd; -Index: systemd-195/src/udev/udev-event.c -=================================================================== ---- systemd-195.orig/src/udev/udev-event.c -+++ systemd-195/src/udev/udev-event.c -@@ -48,7 +48,7 @@ struct udev_event *udev_event_new(struct - event->udev = udev; - udev_list_init(udev, &event->run_list, false); - event->fd_signal = -1; -- event->birth_usec = now_usec(); -+ event->birth_usec = now(CLOCK_MONOTONIC); - event->timeout_usec = 30 * 1000 * 1000; - return event; - } -@@ -466,9 +466,9 @@ static void spawn_read(struct udev_event - int i; - - if (event->timeout_usec > 0) { -- unsigned long long age_usec; -+ usec_t age_usec; - -- age_usec = now_usec() - event->birth_usec; -+ age_usec = now(CLOCK_MONOTONIC) - event->birth_usec; - if (age_usec >= event->timeout_usec) { - log_error("timeout '%s'\n", cmd); - goto out; -@@ -554,9 +554,9 @@ static int spawn_wait(struct udev_event - int fdcount; - - if (event->timeout_usec > 0) { -- unsigned long long age_usec; -+ usec_t age_usec; - -- age_usec = now_usec() - event->birth_usec; -+ age_usec = now(CLOCK_MONOTONIC) - event->birth_usec; - if (age_usec >= event->timeout_usec) - timeout = 1000; - else -@@ -862,7 +862,7 @@ int udev_event_execute_rules(struct udev - if (event->dev_db != NULL && udev_device_get_usec_initialized(event->dev_db) > 0) - udev_device_set_usec_initialized(event->dev, udev_device_get_usec_initialized(event->dev_db)); - else if (udev_device_get_usec_initialized(event->dev) == 0) -- udev_device_set_usec_initialized(event->dev, now_usec()); -+ udev_device_set_usec_initialized(event->dev, now(CLOCK_MONOTONIC)); - - /* (re)write database file */ - udev_device_update_db(dev); -Index: systemd-195/src/udev/udev-rules.c -=================================================================== ---- systemd-195.orig/src/udev/udev-rules.c -+++ systemd-195/src/udev/udev-rules.c -@@ -47,7 +47,7 @@ struct uid_gid { - struct udev_rules { - struct udev *udev; - char **dirs; -- unsigned long long *dirs_ts_usec; -+ usec_t *dirs_ts_usec; - int resolve_names; - - /* every key in the rules file becomes a token */ -@@ -1691,7 +1691,7 @@ bool udev_rules_check_timestamp(struct u - if (stat(rules->dirs[i], &stats) < 0) - continue; - -- if (rules->dirs_ts_usec[i] == ts_usec(&stats.st_mtim)) -+ if (rules->dirs_ts_usec[i] == timespec_load(&stats.st_mtim)) - continue; - - /* first check */ -@@ -1701,7 +1701,7 @@ bool udev_rules_check_timestamp(struct u - } - - /* update timestamp */ -- rules->dirs_ts_usec[i] = ts_usec(&stats.st_mtim); -+ rules->dirs_ts_usec[i] = timespec_load(&stats.st_mtim); - } - out: - return changed; -Index: systemd-195/src/udev/udev.h -=================================================================== ---- systemd-195.orig/src/udev/udev.h -+++ systemd-195/src/udev/udev.h -@@ -41,8 +41,8 @@ struct udev_event { - gid_t gid; - struct udev_list run_list; - int exec_delay; -- unsigned long long birth_usec; -- unsigned long long timeout_usec; -+ usec_t birth_usec; -+ usec_t timeout_usec; - int fd_signal; - unsigned int builtin_run; - unsigned int builtin_ret; -Index: systemd-195/src/udev/udevadm-settle.c -=================================================================== ---- systemd-195.orig/src/udev/udevadm-settle.c -+++ systemd-195/src/udev/udevadm-settle.c -@@ -47,9 +47,9 @@ static int adm_settle(struct udev *udev, - { "help", no_argument, NULL, 'h' }, - {} - }; -- unsigned long long start_usec = now_usec(); -- unsigned long long start = 0; -- unsigned long long end = 0; -+ usec_t start_usec = now(CLOCK_MONOTONIC); -+ usec_t start = 0; -+ usec_t end = 0; - int quiet = 0; - const char *exists = NULL; - unsigned int timeout = 120; -@@ -123,7 +123,7 @@ static int adm_settle(struct udev *udev, - start = 0; - end = 0; - } -- log_debug("start=%llu end=%llu current=%llu\n", start, end, kernel_seq); -+ log_debug("start=%llu end=%llu current=%llu\n", (unsigned long long)start, (unsigned long long)end, kernel_seq); - } else { - if (end > 0) { - log_error("seq-end needs seq-start parameter, ignoring\n"); -@@ -199,9 +199,9 @@ static int adm_settle(struct udev *udev, - } - - if (timeout > 0) { -- unsigned long long age_usec; -+ usec_t age_usec; - -- age_usec = now_usec() - start_usec; -+ age_usec = now(CLOCK_MONOTONIC) - start_usec; - if (age_usec / (1000 * 1000) >= timeout) { - struct udev_list_entry *list_entry; - -Index: systemd-195/src/udev/udevd.c -=================================================================== ---- systemd-195.orig/src/udev/udevd.c -+++ systemd-195/src/udev/udevd.c -@@ -122,7 +122,7 @@ struct worker { - struct udev_monitor *monitor; - enum worker_state state; - struct event *event; -- unsigned long long event_start_usec; -+ usec_t event_start_usec; - }; - - /* passed from worker to main process */ -@@ -378,7 +378,7 @@ out: - worker->monitor = worker_monitor; - worker->pid = pid; - worker->state = WORKER_RUNNING; -- worker->event_start_usec = now_usec(); -+ worker->event_start_usec = now(CLOCK_MONOTONIC); - worker->event = event; - event->state = EVENT_RUNNING; - udev_list_node_append(&worker->node, &worker_list); -@@ -409,7 +409,7 @@ static void event_run(struct event *even - worker_ref(worker); - worker->event = event; - worker->state = WORKER_RUNNING; -- worker->event_start_usec = now_usec(); -+ worker->event_start_usec = now(CLOCK_MONOTONIC); - event->state = EVENT_RUNNING; - return; - } -@@ -1381,7 +1381,7 @@ int main(int argc, char *argv[]) - udev_list_node_init(&worker_list); - - for (;;) { -- static unsigned long long last_usec; -+ static usec_t last_usec; - struct epoll_event ev[8]; - int fdcount; - int timeout; -@@ -1452,7 +1452,7 @@ int main(int argc, char *argv[]) - if (worker->state != WORKER_RUNNING) - continue; - -- if ((now_usec() - worker->event_start_usec) > 30 * 1000 * 1000) { -+ if ((now(CLOCK_MONOTONIC) - worker->event_start_usec) > 30 * 1000 * 1000) { - log_error("worker [%u] %s timeout; kill it\n", worker->pid, - worker->event ? worker->event->devpath : ""); - kill(worker->pid, SIGKILL); -@@ -1486,13 +1486,13 @@ int main(int argc, char *argv[]) - } - - /* check for changed config, every 3 seconds at most */ -- if ((now_usec() - last_usec) > 3 * 1000 * 1000) { -+ if ((now(CLOCK_MONOTONIC) - last_usec) > 3 * 1000 * 1000) { - if (udev_rules_check_timestamp(rules)) - reload = true; - if (udev_builtin_validate(udev)) - reload = true; - -- last_usec = now_usec(); -+ last_usec = now(CLOCK_MONOTONIC); - } - - /* reload requested, HUP signal received, rules changed, builtin changed */ -@@ -1512,7 +1512,7 @@ int main(int argc, char *argv[]) - - dev = udev_monitor_receive_device(monitor); - if (dev != NULL) { -- udev_device_set_usec_initialized(dev, now_usec()); -+ udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); - if (rules == NULL) - rules = udev_rules_new(udev, resolve_names); - if (event_queue_insert(dev) < 0) diff --git a/1018-keymap-add-aditional-support.patch b/1018-keymap-add-aditional-support.patch deleted file mode 100644 index f277245b..00000000 --- a/1018-keymap-add-aditional-support.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -2246,6 +2246,8 @@ dist_udevkeymap_DATA = \ - keymaps/hewlett-packard-presario-2100 \ - keymaps/hewlett-packard-tablet \ - keymaps/hewlett-packard-tx2 \ -+ keymaps/hewlett-packard_elitebook-8440p \ -+ keymaps/hewlett-packard-hdx9494nr \ - keymaps/ibm-thinkpad-usb-keyboard-trackpoint \ - keymaps/inventec-symphony_6.0_7.0 \ - keymaps/lenovo-3000 \ -Index: systemd-195/keymaps/hewlett-packard-hdx9494nr -=================================================================== ---- /dev/null -+++ systemd-195/keymaps/hewlett-packard-hdx9494nr -@@ -0,0 +1,3 @@ -+0xB2 www # FnF3 -+0xD8 f23 # touchpad off -+0xD9 f22 # touchpad on -Index: systemd-195/keymaps/hewlett-packard_elitebook-8440p -=================================================================== ---- /dev/null -+++ systemd-195/keymaps/hewlett-packard_elitebook-8440p -@@ -0,0 +1,5 @@ -+0x88 www -+0xA0 mute -+0xAE volumedown -+0xB0 volumeup -+0xEC mail -Index: systemd-195/src/udev/keymap/95-keyboard-force-release.rules -=================================================================== ---- systemd-195.orig/src/udev/keymap/95-keyboard-force-release.rules -+++ systemd-195/src/udev/keymap/95-keyboard-force-release.rules -@@ -42,7 +42,7 @@ ENV{DMI_VENDOR}=="Viooo Corporation", AT - # These are all the HP laptops that setup a touchpad toggle key - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keyboard-force-release.sh $devpath hp-other" - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keyboard-force-release.sh $devpath hp-other" --ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keyboard-force-release.sh $devpath hp-other" -+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC|HDX9494NR", RUN+="keyboard-force-release.sh $devpath hp-other" - - ENV{DMI_VENDOR}=="Zepto", ATTR{[dmi/id]product_name}=="Znote 6615WD", RUN+="keyboard-force-release.sh $devpath common-volume-keys" - -Index: systemd-195/src/udev/keymap/95-keymap.rules -=================================================================== ---- systemd-195.orig/src/udev/keymap/95-keymap.rules -+++ systemd-195/src/udev/keymap/95-keymap.rules -@@ -96,7 +96,9 @@ ENV{DMI_VENDOR}=="Hewlett-Packard*", ATT - ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2" - ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100" - ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www" --ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill" -+ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill 0xB2 www" -+ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8440p", RUN+="keymap $name hewlett-packard_elitebook-8440p" -+ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HDX9494NR", RUN+="keymap $name hewlett-packard-hdx9494nr" - # HP Pavillion dv6315ea has empty DMI_VENDOR - ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play - diff --git a/1019-udev-Fix-device-matching-in-the-accelerometer.patch b/1019-udev-Fix-device-matching-in-the-accelerometer.patch deleted file mode 100644 index 16f930a4..00000000 --- a/1019-udev-Fix-device-matching-in-the-accelerometer.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1d010426c01044350b2b32d8b3af5d064f7dfe27 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 10 Jan 2013 14:23:23 +0100 -Subject: [PATCH] udev: Fix device matching in the accelerometer - -As we were searching by ID_PATH, it would have been possible -for us to find a sibling device instead of the device we were -looking for. - -This fixes device matching on the WeTab with the upstream kernel, -as it was trying to use the "Asus Laptop extra buttons" device -instead of the accelerometer. ---- - src/udev/accelerometer/accelerometer.c | 11 +---------- - 1 files changed, 1 insertions(+), 10 deletions(-) - -diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c -index 21f5193..2fea388 100644 ---- a/src/udev/accelerometer/accelerometer.c -+++ b/src/udev/accelerometer/accelerometer.c -@@ -257,7 +257,6 @@ int main (int argc, char** argv) - - char devpath[PATH_MAX]; - char *devnode; -- const char *id_path; - struct udev_enumerate *enumerate; - struct udev_list_entry *list_entry; - -@@ -303,18 +302,10 @@ int main (int argc, char** argv) - return 1; - } - -- id_path = udev_device_get_property_value(dev, "ID_PATH"); -- if (id_path == NULL) { -- fprintf (stderr, "unable to get property ID_PATH for '%s'", devpath); -- return 0; -- } -- - /* Get the children devices and find the devnode */ -- /* FIXME: use udev_enumerate_add_match_parent() instead */ - devnode = NULL; - enumerate = udev_enumerate_new(udev); -- udev_enumerate_add_match_property(enumerate, "ID_PATH", id_path); -- udev_enumerate_add_match_subsystem(enumerate, "input"); -+ udev_enumerate_add_match_parent(enumerate, dev); - udev_enumerate_scan_devices(enumerate); - udev_list_entry_foreach(list_entry, udev_enumerate_get_list_entry(enumerate)) { - struct udev_device *device; --- -1.7.7 - diff --git a/1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch b/1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch deleted file mode 100644 index ad6d27b2..00000000 --- a/1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 2ffcfb9b45262271019d1751cafc895c3dae8f0e Mon Sep 17 00:00:00 2001 -From: Robert Milasan -Date: Sun, 10 Feb 2013 11:00:20 +0100 -Subject: [PATCH] usb_id: some strange devices have a very bogus or strange serial - numer, making a mess in /dev/disk/by-id. Let's check if the - serial number is a valid, otherwise don't use it. - ---- - src/udev/udev-builtin-usb_id.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -Index: systemd-195/src/udev/udev-builtin-usb_id.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin-usb_id.c -+++ systemd-195/src/udev/udev-builtin-usb_id.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -31,6 +32,26 @@ - - #include "udev.h" - -+static bool valid_string(const char *str) -+{ -+ const char *s; -+ -+ if (!str) -+ return false; -+ -+ for (s = str; *s != '\0'; s++) { -+ if ((*s >= 'a' && *s <= 'z') || -+ (*s >= 'A' && *s <= 'Z') || -+ (*s >= '0' && *s <= '9') || -+ *s == '-' || *s == '_') -+ continue; -+ else -+ return false; -+ } -+ -+ return true; -+} -+ - static void set_usb_iftype(char *to, int if_class_num, size_t len) - { - const char *type = "generic"; -@@ -428,10 +449,10 @@ fallback: - } - - if (serial_str[0] == '\0') { -- const char *usb_serial; -+ const char *usb_serial = NULL; - - usb_serial = udev_device_get_sysattr_value(dev_usb, "serial"); -- if (usb_serial) { -+ if (valid_string(usb_serial)) { - util_replace_whitespace(usb_serial, serial_str, sizeof(serial_str)-1); - util_replace_chars(serial_str, NULL); - } diff --git a/1021-create-default-links-for-primary-cd_dvd-drive.patch b/1021-create-default-links-for-primary-cd_dvd-drive.patch index d44af024..c66a9da0 100644 --- a/1021-create-default-links-for-primary-cd_dvd-drive.patch +++ b/1021-create-default-links-for-primary-cd_dvd-drive.patch @@ -1,8 +1,17 @@ -Index: systemd-195/rules/60-cdrom_id.rules -=================================================================== ---- systemd-195.orig/rules/60-cdrom_id.rules -+++ systemd-195/rules/60-cdrom_id.rules -@@ -15,6 +15,9 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdr +From: Robert Milasan +Date: Tue, 12 Feb 2013 09:16:23 +0000 +Subject: create default links for primary cd_dvd drive + +cdrom_id: created links for the default cd/dvd drive (bnc#783054). +--- + rules/60-cdrom_id.rules | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules +index 6eaf76a..ec0b19a 100644 +--- a/rules/60-cdrom_id.rules ++++ b/rules/60-cdrom_id.rules +@@ -15,6 +15,9 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr # enable the receiving of media eject button events IMPORT{program}="cdrom_id --lock-media $devnode" diff --git a/1022-udev-use-unique-names-for-temporary-files-created-in.patch b/1022-udev-use-unique-names-for-temporary-files-created-in.patch deleted file mode 100644 index a3516edb..00000000 --- a/1022-udev-use-unique-names-for-temporary-files-created-in.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: systemd-195/src/udev/udev-node.c -=================================================================== ---- systemd-195.orig/src/udev/udev-node.c -+++ systemd-195/src/udev/udev-node.c -@@ -31,15 +31,13 @@ - - #include "udev.h" - --#define TMP_FILE_EXT ".udev-tmp" -- --static int node_symlink(struct udev *udev, const char *node, const char *slink) -+static int node_symlink(struct udev_device *dev, const char *node, const char *slink) - { - struct stat stats; - char target[UTIL_PATH_SIZE]; - char *s; - size_t l; -- char slink_tmp[UTIL_PATH_SIZE + sizeof(TMP_FILE_EXT)]; -+ char slink_tmp[UTIL_PATH_SIZE + 32]; - int i = 0; - int tail = 0; - int err = 0; -@@ -101,7 +99,7 @@ static int node_symlink(struct udev *ude - } - - log_debug("atomically replace '%s'\n", slink); -- util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, TMP_FILE_EXT, NULL); -+ util_strscpyl(slink_tmp, sizeof(slink_tmp), slink, ".tmp-", udev_device_get_id_filename(dev), NULL); - unlink(slink_tmp); - do { - err = mkdir_parents_label(slink_tmp, 0755); -@@ -204,7 +202,7 @@ static void link_update(struct udev_devi - util_delete_path(udev, slink); - } else { - log_debug("creating link '%s' to '%s'\n", slink, target); -- node_symlink(udev, target, slink); -+ node_symlink(dev, target, slink); - } - - if (add) { -@@ -304,7 +302,6 @@ out: - - void udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid) - { -- struct udev *udev = udev_device_get_udev(dev); - char filename[UTIL_PATH_SIZE]; - struct udev_list_entry *list_entry; - -@@ -318,7 +315,7 @@ void udev_node_add(struct udev_device *d - snprintf(filename, sizeof(filename), "/dev/%s/%u:%u", - strcmp(udev_device_get_subsystem(dev), "block") == 0 ? "block" : "char", - major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev))); -- node_symlink(udev, udev_device_get_devnode(dev), filename); -+ node_symlink(dev, udev_device_get_devnode(dev), filename); - - /* create/update symlinks, add symlinks to name index */ - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(dev)) diff --git a/1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch b/1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch deleted file mode 100644 index 54036570..00000000 --- a/1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch +++ /dev/null @@ -1,51 +0,0 @@ -From a0ec302b9309bc56f6bed6162e47ad6c27165747 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Tue, 12 Feb 2013 15:19:38 +0100 -Subject: [PATCH] cdrom_id: add data track count for bad virtual drive - implementations -Organization: SUSE Linux - -/# /lib/udev/cdrom_id --debug /dev/sr0 -probing: '/dev/sr0' -INQUIRY: [AMI ][Virtual CDROM ][1.00] -GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h -drive is pre-MMC2 and does not support 46h get configuration command -trying to work around the problem -READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h -no current profile, but disc is present; assuming CD-ROM -READ TOC: len: 12, start track: 1, end track: 1 -last track 1 starts at block 0 -READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h -ID_CDROM=1 -ID_CDROM_MEDIA=1 -ID_CDROM_MEDIA_CD=1 - -What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger -blkid in /lib/udev/rules.d/60-persistent-storage.rules - -KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", - ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", - ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ - IMPORT{builtin}="blkid --noraid" - -Signed-off-by: Robert Milasan ---- - src/udev/cdrom_id/cdrom_id.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c -index 1056536..b659cc3 100644 ---- a/src/udev/cdrom_id/cdrom_id.c -+++ b/src/udev/cdrom_id/cdrom_id.c -@@ -513,6 +513,8 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd) - if (cd_media == 1) { - log_debug("no current profile, but disc is present; assuming CD-ROM\n"); - cd_media_cd_rom = 1; -+ cd_media_track_count = 1; -+ cd_media_track_count_data = 1; - return 0; - } else { - log_debug("no current profile, assuming no media\n"); --- -1.7.7 - diff --git a/1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch b/1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch deleted file mode 100644 index 08ace924..00000000 --- a/1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 7962afbba9016ea03d9f2987fee341443fcde39d Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Sun, 17 Feb 2013 21:16:56 +0100 -Subject: [PATCH] udev: usb_id: parse only 'size' bytes of the 'descriptors' - buffer - -Signed-off-by: Robert Milasan ---- - src/udev/udev-builtin-usb_id.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -Index: systemd-195/src/udev/udev-builtin-usb_id.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin-usb_id.c -+++ systemd-195/src/udev/udev-builtin-usb_id.c -@@ -210,7 +210,7 @@ static int dev_if_packed_info(struct ude - pos = 0; - strpos = 0; - ifs_str[0] = '\0'; -- while (pos < sizeof(buf) && strpos+7 < len-2) { -+ while (pos < size && strpos+7 < len-2) { - struct usb_interface_descriptor *desc; - char if_str[8]; - diff --git a/1025-udev-expose-new-ISO9660-properties-from-libblkid.patch b/1025-udev-expose-new-ISO9660-properties-from-libblkid.patch deleted file mode 100644 index 173b3431..00000000 --- a/1025-udev-expose-new-ISO9660-properties-from-libblkid.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ddb5bee15a6ad71e5b596c035c1ee4dc04d5fd2e Mon Sep 17 00:00:00 2001 -From: "Zeeshan Ali (Khattak)" -Date: Sun, 17 Feb 2013 03:21:27 +0200 -Subject: [PATCH] udev: expose new ISO9660 properties from libblkid - -Signed-off-by: Robert Milasan ---- - src/udev/udev-builtin-blkid.c | 16 ++++++++++++++++ - 1 files changed, 16 insertions(+), 0 deletions(-) - -Index: systemd-195/src/udev/udev-builtin-blkid.c -=================================================================== ---- systemd-195.orig/src/udev/udev-builtin-blkid.c -+++ systemd-195/src/udev/udev-builtin-blkid.c -@@ -78,6 +78,22 @@ static void print_property(struct udev_d - } else if (startswith(name, "PART_ENTRY_")) { - util_strscpyl(s, sizeof(s), "ID_", name, NULL); - udev_builtin_add_property(dev, test, s, value); -+ -+ } else if (streq(name, "SYSTEM_ID")) { -+ blkid_encode_string(value, s, sizeof(s)); -+ udev_builtin_add_property(dev, test, "ID_FS_SYSTEM_ID", s); -+ -+ } else if (streq(name, "PUBLISHER_ID")) { -+ blkid_encode_string(value, s, sizeof(s)); -+ udev_builtin_add_property(dev, test, "ID_FS_PUBLISHER_ID", s); -+ -+ } else if (streq(name, "APPLICATION_ID")) { -+ blkid_encode_string(value, s, sizeof(s)); -+ udev_builtin_add_property(dev, test, "ID_FS_APPLICATION_ID", s); -+ -+ } else if (streq(name, "BOOT_SYSTEM_ID")) { -+ blkid_encode_string(value, s, sizeof(s)); -+ udev_builtin_add_property(dev, test, "ID_FS_BOOT_SYSTEM_ID", s); - } - } - diff --git a/1026-re-add-persistent-net.patch b/1026-re-add-persistent-net.patch index 1b05d5ee..dd82550b 100644 --- a/1026-re-add-persistent-net.patch +++ b/1026-re-add-persistent-net.patch @@ -1,7 +1,51 @@ -Index: systemd-195/src/udev/rule_generator/75-persistent-net-generator.rules -=================================================================== +From: Robert Milasan +Date: Wed, 20 Mar 2013 10:14:59 +0000 +Subject: re-add persistent net + +udev: re-add persistent network rules (bnc#809843). +--- + Makefile.am | 10 +- + .../75-persistent-net-generator.rules | 102 +++++++++++++++ + src/udev/rule_generator/rule_generator.functions | 113 ++++++++++++++++ + src/udev/rule_generator/write_net_rules | 145 +++++++++++++++++++++ + 4 files changed, 369 insertions(+), 1 deletion(-) + create mode 100644 src/udev/rule_generator/75-persistent-net-generator.rules + create mode 100644 src/udev/rule_generator/rule_generator.functions + create mode 100644 src/udev/rule_generator/write_net_rules + +diff --git a/Makefile.am b/Makefile.am +index 10609f3..f5e4159 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2287,6 +2287,14 @@ EXTRA_DIST += \ + src/gudev/seed-example.js + + # ------------------------------------------------------------------------------ ++dist_udevhome_SCRIPTS = \ ++ src/udev/rule_generator/rule_generator.functions \ ++ src/udev/rule_generator/write_net_rules ++ ++dist_udevrules_DATA += \ ++ src/udev/rule_generator/75-persistent-net-generator.rules ++ ++# ------------------------------------------------------------------------------ + if ENABLE_KEYMAP + keymap_SOURCES = \ + src/udev/keymap/keymap.c +@@ -2314,7 +2322,7 @@ dist_udevrules_DATA += \ + src/udev/keymap/95-keymap.rules \ + src/udev/keymap/95-keyboard-force-release.rules + +-dist_udevhome_SCRIPTS = \ ++dist_udevhome_SCRIPTS += \ + src/udev/keymap/findkeyboards \ + src/udev/keymap/keyboard-force-release.sh + +diff --git a/src/udev/rule_generator/75-persistent-net-generator.rules b/src/udev/rule_generator/75-persistent-net-generator.rules +new file mode 100644 +index 0000000..4f80573 --- /dev/null -+++ systemd-195/src/udev/rule_generator/75-persistent-net-generator.rules ++++ b/src/udev/rule_generator/75-persistent-net-generator.rules @@ -0,0 +1,102 @@ +# do not edit this file, it will be overwritten on update + @@ -105,10 +149,11 @@ Index: systemd-195/src/udev/rule_generator/75-persistent-net-generator.rules +ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" + +LABEL="persistent_net_generator_end" -Index: systemd-195/src/udev/rule_generator/rule_generator.functions -=================================================================== +diff --git a/src/udev/rule_generator/rule_generator.functions b/src/udev/rule_generator/rule_generator.functions +new file mode 100644 +index 0000000..087bc34 --- /dev/null -+++ systemd-195/src/udev/rule_generator/rule_generator.functions ++++ b/src/udev/rule_generator/rule_generator.functions @@ -0,0 +1,113 @@ +# functions used by the udev rule generator + @@ -223,63 +268,11 @@ Index: systemd-195/src/udev/rule_generator/rule_generator.functions + $([ -e $RULES_FILE ] && echo $RULES_FILE) \ + 2>/dev/null) +} -Index: systemd-195/Makefile.in -=================================================================== ---- systemd-195.orig/Makefile.in -+++ systemd-195/Makefile.in -@@ -1743,7 +1743,9 @@ am_v4l_id_OBJECTS = src/udev/v4l_id/v4l_ - v4l_id_OBJECTS = $(am_v4l_id_OBJECTS) - v4l_id_DEPENDENCIES = libudev.la - am__dist_udevhome_SCRIPTS_DIST = src/udev/keymap/findkeyboards \ -- src/udev/keymap/keyboard-force-release.sh -+ src/udev/keymap/keyboard-force-release.sh \ -+ src/udev/rule_generator/rule_generator.functions \ -+ src/udev/rule_generator/write_net_rules - SCRIPTS = $(dist_bin_SCRIPTS) $(dist_udevhome_SCRIPTS) - AM_V_P = $(am__v_P_@AM_V@) - am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -@@ -2051,7 +2053,8 @@ am__dist_udevrules_DATA_DIST = rules/99- - src/udev/keymap/95-keymap.rules \ - src/udev/keymap/95-keyboard-force-release.rules \ - rules/75-probe_mtd.rules src/login/70-uaccess.rules \ -- src/login/70-power-switch.rules -+ src/login/70-power-switch.rules \ -+ src/udev/rule_generator/75-persistent-net-generator.rules - DATA = $(dbusinterface_DATA) $(dist_bashcompletion_DATA) \ - $(dist_dbuspolicy_DATA) $(dist_dbussystemservice_DATA) \ - $(dist_doc_DATA) $(dist_gatewayddocumentroot_DATA) \ -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -2179,6 +2179,14 @@ EXTRA_DIST += \ - - - # ------------------------------------------------------------------------------ -+dist_udevhome_SCRIPTS = \ -+ src/udev/rule_generator/rule_generator.functions \ -+ src/udev/rule_generator/write_net_rules -+ -+dist_udevrules_DATA += \ -+ src/udev/rule_generator/75-persistent-net-generator.rules -+ -+# ------------------------------------------------------------------------------ - if ENABLE_KEYMAP - keymap_SOURCES = \ - src/udev/keymap/keymap.c -@@ -2206,7 +2214,7 @@ dist_udevrules_DATA += \ - src/udev/keymap/95-keymap.rules \ - src/udev/keymap/95-keyboard-force-release.rules - --dist_udevhome_SCRIPTS = \ -+dist_udevhome_SCRIPTS += \ - src/udev/keymap/findkeyboards \ - src/udev/keymap/keyboard-force-release.sh - -Index: systemd-195/src/udev/rule_generator/write_net_rules -=================================================================== +diff --git a/src/udev/rule_generator/write_net_rules b/src/udev/rule_generator/write_net_rules +new file mode 100644 +index 0000000..fad1cc5 --- /dev/null -+++ systemd-195/src/udev/rule_generator/write_net_rules ++++ b/src/udev/rule_generator/write_net_rules @@ -0,0 +1,145 @@ +#!/bin/sh -e + diff --git a/1027-udev-always-rename-network.patch b/1027-udev-always-rename-network.patch index 3ed6e26d..d6d56edd 100644 --- a/1027-udev-always-rename-network.patch +++ b/1027-udev-always-rename-network.patch @@ -1,8 +1,18 @@ -Index: systemd-195/src/udev/udev-event.c -=================================================================== ---- systemd-195.orig/src/udev/udev-event.c -+++ systemd-195/src/udev/udev-event.c -@@ -750,6 +750,7 @@ static int rename_netif(struct udev_even +From: Robert Milasan +Date: Thu, 28 Mar 2013 09:24:43 +0000 +Subject: udev always rename network + +udev: ensure that the network interfaces are renamed even if they exist +(bnc#809843). +--- + src/udev/udev-event.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 43 insertions(+), 3 deletions(-) + +diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c +index 3db2cb7..3ee9039 100644 +--- a/src/udev/udev-event.c ++++ b/src/udev/udev-event.c +@@ -750,6 +750,7 @@ static int rename_netif(struct udev_event *event) struct udev_device *dev = event->dev; int sk; struct ifreq ifr; @@ -10,9 +20,9 @@ Index: systemd-195/src/udev/udev-event.c int err; log_debug("changing net interface name from '%s' to '%s'\n", -@@ -766,12 +767,51 @@ static int rename_netif(struct udev_even - util_strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev)); - util_strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); +@@ -766,12 +767,51 @@ static int rename_netif(struct udev_event *event) + strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev)); + strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); err = ioctl(sk, SIOCSIFNAME, &ifr); - if (err >= 0) { + if (err == 0) { @@ -40,8 +50,8 @@ Index: systemd-195/src/udev/udev-event.c + print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); + + /* wait a maximum of 90 seconds for our target to become available */ -+ util_strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname); -+ util_strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); ++ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname); ++ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); + loop = 90 * 20; + while (loop--) { + const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 }; diff --git a/0001-Add-bootsplash-handling-for-password-dialogs.patch b/Add-bootsplash-handling-for-password-dialogs.patch similarity index 82% rename from 0001-Add-bootsplash-handling-for-password-dialogs.patch rename to Add-bootsplash-handling-for-password-dialogs.patch index 957757ae..63fa0a38 100644 --- a/0001-Add-bootsplash-handling-for-password-dialogs.patch +++ b/Add-bootsplash-handling-for-password-dialogs.patch @@ -1,15 +1,17 @@ -From 81eca00461968aac09f9e8535f4327282698b495 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Thu, 16 Dec 2010 11:30:17 +0100 -Subject: [PATCH] Add bootsplash handling for password dialogs +Subject: Add bootsplash handling for password dialogs openSUSE uses bootsplash.org, so add a crude handling for setting the splash screen to verbose when a password is asked... --- -Index: systemd-195/src/shared/ask-password-api.c -=================================================================== ---- systemd-195.orig/src/shared/ask-password-api.c -+++ systemd-195/src/shared/ask-password-api.c + src/shared/ask-password-api.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c +index 8a0fb89..4bece69 100644 +--- a/src/shared/ask-password-api.c ++++ b/src/shared/ask-password-api.c @@ -63,6 +63,9 @@ int ask_password_tty( bool reset_tty = false; bool silent_mode = false; diff --git a/Ensure-debugshell-has-a-correct-value.patch b/Ensure-debugshell-has-a-correct-value.patch new file mode 100644 index 00000000..0babbb0d --- /dev/null +++ b/Ensure-debugshell-has-a-correct-value.patch @@ -0,0 +1,22 @@ +From: Frederic Crozat +Date: Tue, 4 Dec 2012 16:51:32 +0000 +Subject: Ensure debugshell has a correct value + +use /bin/bash if sushell isn't installed (bnc#789052). +--- + units/debug-shell.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/units/debug-shell.service.in b/units/debug-shell.service.in +index a6acad3..64b5e0d 100644 +--- a/units/debug-shell.service.in ++++ b/units/debug-shell.service.in +@@ -13,7 +13,7 @@ IgnoreOnIsolate=yes + + [Service] + Environment=TERM=linux +-ExecStart=@SUSHELL@ ++ExecStart=/bin/bash -c '[ -x @SUSHELL@ ] && exec @SUSHELL@ || exec /bin/bash' + Restart=always + RestartSec=0 + StandardInput=tty diff --git a/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch b/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch new file mode 100644 index 00000000..2cc1bb48 --- /dev/null +++ b/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch @@ -0,0 +1,39 @@ +From: Frederic Crozat +Date: Wed, 7 Dec 2011 15:15:07 +0000 +Subject: Fix /run/lock directories permissions to follow openSUSE policy + +disable /var/lock/{subsys,lockdev} and change default permissions on +/var/lock (bnc#733523). +--- + tmpfiles.d/legacy.conf | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tmpfiles.d/legacy.conf b/tmpfiles.d/legacy.conf +index 3fff347..81d5e47 100644 +--- a/tmpfiles.d/legacy.conf ++++ b/tmpfiles.d/legacy.conf +@@ -10,12 +10,13 @@ + # These files are considered legacy and are unnecessary on legacy-free + # systems. + +-d /run/lock 0755 root root - ++# changed for openSUSE : only /run/lock should be available ++d /run/lock 0775 root lock - + + # /run/lock/subsys is used for serializing SysV service execution, and + # hence without use on SysV-less systems. + +-d /run/lock/subsys 0755 root root - ++#d /run/lock/subsys 0755 root root - + + # /run/lock/lockdev is used to serialize access to tty devices via + # LCK..xxx style lock files, For more information see: +@@ -23,7 +24,7 @@ d /run/lock/subsys 0755 root root - + # On modern systems a BSD file lock is a better choice if + # serialization is needed on those devices. + +-d /run/lock/lockdev 0775 root lock - ++#d /run/lock/lockdev 0775 root lock - + + # /forcefsck, /fastboot and /forcequotecheck are deprecated in favor of the + # kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and diff --git a/forward-to-pmutils.patch b/Forward-suspend-hibernate-calls-to-pm-utils.patch similarity index 78% rename from forward-to-pmutils.patch rename to Forward-suspend-hibernate-calls-to-pm-utils.patch index 2a40213d..d7fd5b91 100644 --- a/forward-to-pmutils.patch +++ b/Forward-suspend-hibernate-calls-to-pm-utils.patch @@ -1,7 +1,16 @@ -Index: systemd-195/src/sleep/sleep.c -=================================================================== ---- systemd-195.orig/src/sleep/sleep.c -+++ systemd-195/src/sleep/sleep.c +From: Frederic Crozat +Date: Tue, 19 Feb 2013 11:20:31 +0100 +Subject: Forward suspend / hibernate calls to pm-utils + +forward suspend/hibernation calls to pm-utils, if installed (bnc#790157) +--- + src/sleep/sleep.c | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) + +diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c +index 0707625..91cbdf9 100644 +--- a/src/sleep/sleep.c ++++ b/src/sleep/sleep.c @@ -22,6 +22,7 @@ #include #include @@ -10,7 +19,7 @@ Index: systemd-195/src/sleep/sleep.c #include "log.h" #include "util.h" -@@ -31,6 +32,9 @@ +@@ -32,6 +33,9 @@ int main(int argc, char *argv[]) { const char *verb; char* arguments[4]; @@ -20,7 +29,7 @@ Index: systemd-195/src/sleep/sleep.c int r; FILE *f; -@@ -44,17 +48,27 @@ int main(int argc, char *argv[]) { +@@ -45,17 +49,27 @@ int main(int argc, char *argv[]) { goto finish; } @@ -50,7 +59,7 @@ Index: systemd-195/src/sleep/sleep.c if (streq(argv[1], "hibernate")) { if (write_one_line_file("/sys/power/disk", "platform") < 0) write_one_line_file("/sys/power/disk", "shutdown"); -@@ -64,13 +78,14 @@ int main(int argc, char *argv[]) { +@@ -65,13 +79,14 @@ int main(int argc, char *argv[]) { write_one_line_file("/sys/power/disk", "shutdown"); } @@ -66,7 +75,7 @@ Index: systemd-195/src/sleep/sleep.c arguments[0] = NULL; arguments[1] = (char*) "pre"; arguments[2] = argv[1]; -@@ -96,11 +111,16 @@ int main(int argc, char *argv[]) { +@@ -97,11 +112,16 @@ int main(int argc, char *argv[]) { "SLEEP=hybrid-sleep", NULL); @@ -83,7 +92,7 @@ Index: systemd-195/src/sleep/sleep.c if (streq(argv[1], "suspend")) log_struct(LOG_INFO, -@@ -118,6 +138,7 @@ int main(int argc, char *argv[]) { +@@ -119,6 +139,7 @@ int main(int argc, char *argv[]) { arguments[1] = (char*) "post"; execute_directory(SYSTEM_SLEEP_PATH, NULL, arguments); diff --git a/Reinstate-TIMEOUT-handling.patch b/Reinstate-TIMEOUT-handling.patch new file mode 100644 index 00000000..68c0d70c --- /dev/null +++ b/Reinstate-TIMEOUT-handling.patch @@ -0,0 +1,129 @@ +From: Robert Milasan +Date: Thu, 11 Apr 2013 15:39:39 +0200 +Subject: Reinstate TIMEOUT handling + +Without treating events with timeouts specially some drivers would +cause a 30 seconds stall on boot: . + +I also received reports of some drivers not working at all, even +after the timeout. + +We will remove this patch when more drivers have been fixed in +the kernel (3.4?). + +This reverts 43d5c5f03645c4b842659f9b5bd0ae465e885e92 and +57c6f8ae5f52a6e8ffc66a54966346f733dded39. +--- + src/libudev/libudev-device.c | 19 +++++++++++++++++++ + src/libudev/libudev-private.h | 1 + + src/udev/udevd.c | 13 ++++++++++--- + 3 files changed, 30 insertions(+), 3 deletions(-) + +diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c +index 6bb2e41..4fdd242 100644 +--- a/src/libudev/libudev-device.c ++++ b/src/libudev/libudev-device.c +@@ -78,6 +78,7 @@ struct udev_device { + struct udev_list tags_list; + unsigned long long int seqnum; + usec_t usec_initialized; ++ int timeout; + int devlink_priority; + int refcount; + dev_t devnum; +@@ -172,6 +173,21 @@ static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) + return 0; + } + ++int udev_device_get_timeout(struct udev_device *udev_device) ++{ ++ return udev_device->timeout; ++} ++ ++static int udev_device_set_timeout(struct udev_device *udev_device, int timeout) ++{ ++ char num[32]; ++ ++ udev_device->timeout = timeout; ++ snprintf(num, sizeof(num), "%u", timeout); ++ udev_device_add_property(udev_device, "TIMEOUT", num); ++ return 0; ++} ++ + const char *udev_device_get_devpath_old(struct udev_device *udev_device) + { + return udev_device->devpath_old; +@@ -462,6 +478,8 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device, + udev_device_set_devpath_old(udev_device, &property[12]); + } else if (startswith(property, "SEQNUM=")) { + udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10)); ++ } else if (startswith(property, "TIMEOUT=")) { ++ udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10)); + } else if (startswith(property, "IFINDEX=")) { + udev_device_set_ifindex(udev_device, strtoull(&property[8], NULL, 10)); + } else if (startswith(property, "DEVMODE=")) { +@@ -653,6 +671,7 @@ struct udev_device *udev_device_new(struct udev *udev) + udev_list_init(udev, &udev_device->sysattr_value_list, true); + udev_list_init(udev, &udev_device->sysattr_list, false); + udev_list_init(udev, &udev_device->tags_list, true); ++ udev_device->timeout = -1; + udev_device->watch_handle = -1; + /* copy global properties */ + udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev)) +diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h +index 54c51ac..d2124ea 100644 +--- a/src/libudev/libudev-private.h ++++ b/src/libudev/libudev-private.h +@@ -77,6 +77,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device); + void udev_device_set_is_initialized(struct udev_device *udev_device); + int udev_device_add_tag(struct udev_device *udev_device, const char *tag); + void udev_device_cleanup_tags_list(struct udev_device *udev_device); ++int udev_device_get_timeout(struct udev_device *udev_device); + usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); + void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized); + int udev_device_get_devlink_priority(struct udev_device *udev_device); +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 2ad7388..5a90b60 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -391,7 +391,7 @@ out: + } + } + +-static void event_run(struct event *event) ++static void event_run(struct event *event, bool force) + { + struct udev_list_node *loop; + +@@ -417,7 +417,7 @@ static void event_run(struct event *event) + return; + } + +- if (children >= children_max) { ++ if (!force && children >= children_max) { + if (children_max > 1) + log_debug("maximum number (%i) of children reached\n", children); + return; +@@ -455,6 +455,13 @@ static int event_queue_insert(struct udev_device *dev) + + event->state = EVENT_QUEUED; + udev_list_node_append(&event->node, &event_list); ++ ++ /* run all events with a timeout set immediately */ ++ if (udev_device_get_timeout(dev) > 0) { ++ event_run(event, true); ++ return 0; ++ } ++ + return 0; + } + +@@ -566,7 +573,7 @@ static void event_queue_start(struct udev *udev) + if (is_devpath_busy(event)) + continue; + +- event_run(event); ++ event_run(event, false); + } + } + diff --git a/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch b/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch new file mode 100644 index 00000000..5d4a06de --- /dev/null +++ b/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch @@ -0,0 +1,140 @@ +From: Frederic Crozat +Date: Fri, 12 Apr 2013 16:56:26 +0200 +Subject: Revert "service: drop support for SysV scripts for the early boot" + +This reverts commit 3cdebc217c42c8529086f2965319b6a48eaaeabe. + +Conflicts: + src/core/service.c +--- + src/core/service.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 46 insertions(+), 5 deletions(-) + +diff --git a/src/core/service.c b/src/core/service.c +index a1b2d93..da22e55 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -51,7 +51,8 @@ + + typedef enum RunlevelType { + RUNLEVEL_UP, +- RUNLEVEL_DOWN ++ RUNLEVEL_DOWN, ++ RUNLEVEL_SYSINIT + } RunlevelType; + + static const struct { +@@ -66,6 +67,16 @@ static const struct { + { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP }, + { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP }, + ++#ifdef TARGET_SUSE ++ /* SUSE style boot.d */ ++ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, ++#endif ++ ++#if defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) ++ /* Debian style rcS.d */ ++ { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, ++#endif ++ + /* Standard SysV runlevels for shutdown */ + { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, + { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } +@@ -74,10 +85,12 @@ static const struct { + directories in this order, and we want to make sure that + sysv_start_priority is known when we first load the + unit. And that value we only know from S links. Hence +- UP must be read before DOWN */ ++ UP/SYSINIT must be read before DOWN */ + }; + + #define RUNLEVELS_UP "12345" ++/* #define RUNLEVELS_DOWN "06" */ ++#define RUNLEVELS_BOOT "bBsS" + #endif + + static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { +@@ -332,6 +345,9 @@ static char *sysv_translate_name(const char *name) { + if (endswith(name, ".sh")) + /* Drop .sh suffix */ + strcpy(stpcpy(r, name) - 3, ".service"); ++ if (startswith(name, "boot.")) ++ /* Drop SuSE-style boot. prefix */ ++ strcpy(stpcpy(r, name + 5), ".service"); + else + /* Normal init script name */ + strcpy(stpcpy(r, name), ".service"); +@@ -934,6 +950,13 @@ static int service_load_sysv_path(Service *s, const char *path) { + + if ((r = sysv_exec_commands(s, supports_reload)) < 0) + goto finish; ++ if (s->sysv_runlevels && ++ chars_intersect(RUNLEVELS_BOOT, s->sysv_runlevels) && ++ chars_intersect(RUNLEVELS_UP, s->sysv_runlevels)) { ++ /* Service has both boot and "up" runlevels ++ configured. Kill the "up" ones. */ ++ delete_chars(s->sysv_runlevels, RUNLEVELS_UP); ++ } + + if (s->sysv_runlevels && !chars_intersect(RUNLEVELS_UP, s->sysv_runlevels)) { + /* If there a runlevels configured for this service +@@ -1015,6 +1038,9 @@ static int service_load_sysv_name(Service *s, const char *name) { + if (endswith(name, ".sh.service")) + return -ENOENT; + ++ if (startswith(name, "boot.")) ++ return -ENOENT; ++ + STRV_FOREACH(p, UNIT(s)->manager->lookup_paths.sysvinit_path) { + char *path; + int r; +@@ -1035,6 +1061,18 @@ static int service_load_sysv_name(Service *s, const char *name) { + } + free(path); + ++ if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) { ++ /* Try SUSE style boot.* init scripts */ ++ ++ path = strjoin(*p, "/boot.", name, NULL); ++ if (!path) ++ return -ENOMEM; ++ ++ /* Drop .service suffix */ ++ path[strlen(path)-8] = 0; ++ r = service_load_sysv_path(s, path); ++ free(path); ++ } + if (r < 0) + return r; + +@@ -3663,7 +3701,7 @@ static int service_enumerate(Manager *m) { + + if (de->d_name[0] == 'S') { + +- if (rcnd_table[i].type == RUNLEVEL_UP) { ++ if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) { + SERVICE(service)->sysv_start_priority_from_rcnd = + MAX(a*10 + b, SERVICE(service)->sysv_start_priority_from_rcnd); + +@@ -3680,7 +3718,8 @@ static int service_enumerate(Manager *m) { + goto finish; + + } else if (de->d_name[0] == 'K' && +- (rcnd_table[i].type == RUNLEVEL_DOWN)) { ++ (rcnd_table[i].type == RUNLEVEL_DOWN || ++ rcnd_table[i].type == RUNLEVEL_SYSINIT)) { + + r = set_ensure_allocated(&shutdown_services, + trivial_hash_func, trivial_compare_func); +@@ -3720,7 +3759,9 @@ static int service_enumerate(Manager *m) { + * runlevels we assume the stop jobs will be implicitly added + * by the core logic. Also, we don't really distinguish here + * between the runlevels 0 and 6 and just add them to the +- * special shutdown target. */ ++ * special shutdown target. On SUSE the boot.d/ runlevel is ++ * also used for shutdown, so we add links for that too to the ++ * shutdown target.*/ + SET_FOREACH(service, shutdown_services, j) { + service = unit_follow_merge(service); + diff --git a/agetty-overrides-term.patch b/agetty-overrides-term.patch deleted file mode 100644 index 84f3ff26..00000000 --- a/agetty-overrides-term.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2161de72c517d34d1ceb9b4c1a300f0b54ce5a9c Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Mon, 29 Oct 2012 21:59:34 +0100 -Subject: [PATCH] units: agetty overrides TERM - -Environment=TERM=... has no effect on agetty who sets it by itself. To -really set TERM to a specified value, it has to be given on the command -line. - -https://bugzilla.redhat.com/show_bug.cgi?id=870622 ---- - units/getty@.service.m4 | 3 +-- - units/serial-getty@.service.m4 | 3 +-- - 2 files changed, 2 insertions(+), 4 deletions(-) - -Index: systemd-195/units/getty@.service.m4 -=================================================================== ---- systemd-195.orig/units/getty@.service.m4 -+++ systemd-195/units/getty@.service.m4 -@@ -41,9 +41,8 @@ IgnoreOnIsolate=yes - ConditionPathExists=/dev/tty0 - - [Service] --Environment=TERM=linux - # the VT is cleared by TTYVTDisallocate --ExecStart=-/sbin/agetty --noclear %I 38400 -+ExecStart=-/sbin/agetty --noclear %I 38400 linux - Type=idle - Restart=always - RestartSec=0 -Index: systemd-195/units/serial-getty@.service.m4 -=================================================================== ---- systemd-195.orig/units/serial-getty@.service.m4 -+++ systemd-195/units/serial-getty@.service.m4 -@@ -37,8 +37,7 @@ Before=getty.target - IgnoreOnIsolate=yes - - [Service] --Environment=TERM=vt102 --ExecStart=-/sbin/agetty -s %I 115200,38400,9600 -+ExecStart=-/sbin/agetty -s %I 115200,38400,9600 vt102 - Type=idle - Restart=always - RestartSec=0 diff --git a/allow-multiple-sulogin-to-be-started.patch b/allow-multiple-sulogin-to-be-started.patch new file mode 100644 index 00000000..297b5792 --- /dev/null +++ b/allow-multiple-sulogin-to-be-started.patch @@ -0,0 +1,47 @@ +From: Frederic Crozat +Date: Thu, 10 Jan 2013 15:43:25 +0000 +Subject: allow multiple sulogin to be started + +allows multiple sulogin instance (bnc#793182). +--- + units/getty@.service.m4 | 1 + + units/rescue.target | 1 + + units/serial-getty@.service.m4 | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 +index 083eb97..243fea5 100644 +--- a/units/getty@.service.m4 ++++ b/units/getty@.service.m4 +@@ -9,6 +9,7 @@ + Description=Getty on %I + Documentation=man:agetty(8) man:systemd-getty-generator(8) + Documentation=http://0pointer.de/blog/projects/serial-console.html ++Conflicts=rescue.service + After=systemd-user-sessions.service plymouth-quit-wait.service + m4_ifdef(`HAVE_SYSV_COMPAT', + After=rc-local.service +diff --git a/units/rescue.target b/units/rescue.target +index 3f59b14..20f6841 100644 +--- a/units/rescue.target ++++ b/units/rescue.target +@@ -10,6 +10,7 @@ Description=Rescue Mode + Documentation=man:systemd.special(7) + Requires=sysinit.target rescue.service + After=sysinit.target rescue.service ++Conflicts=getty.target + AllowIsolate=yes + + [Install] +diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 +index 60d7737..2b18dbf 100644 +--- a/units/serial-getty@.service.m4 ++++ b/units/serial-getty@.service.m4 +@@ -10,6 +10,7 @@ Description=Serial Getty on %I + Documentation=man:agetty(8) man:systemd-getty-generator(8) + Documentation=http://0pointer.de/blog/projects/serial-console.html + BindsTo=dev-%i.device ++Conflicts=rescue.service + After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service + m4_ifdef(`HAVE_SYSV_COMPAT', + After=rc-local.service diff --git a/apply-ACL-for-nvidia-device-nodes.patch b/apply-ACL-for-nvidia-device-nodes.patch new file mode 100644 index 00000000..5d5f7b83 --- /dev/null +++ b/apply-ACL-for-nvidia-device-nodes.patch @@ -0,0 +1,23 @@ +From: Ludwig Nussel +Date: Mon, 8 Apr 2013 14:51:47 +0200 +Subject: apply ACL for nvidia device nodes + +set ACL on nvidia devices (bnc#808319). +--- + src/login/logind-acl.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c +index cb045a9..51093f2 100644 +--- a/src/login/logind-acl.c ++++ b/src/login/logind-acl.c +@@ -240,6 +240,9 @@ int devnode_acl_all(struct udev *udev, + goto finish; + } + ++ devnode_acl("/dev/nvidia0", flush, del, old_uid, add, new_uid); ++ devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid); ++ + finish: + if (e) + udev_enumerate_unref(e); diff --git a/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch b/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch new file mode 100644 index 00000000..5a7b6f3a --- /dev/null +++ b/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch @@ -0,0 +1,38 @@ +From: Ludwig Nussel +Date: Mon, 26 Nov 2012 09:49:42 +0100 +Subject: avoid assertion if invalid address familily is passed to + gethostbyaddr_r (bnc#791101) + +--- + src/nss-myhostname/nss-myhostname.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c +index b0fb832..b3aaca8 100644 +--- a/src/nss-myhostname/nss-myhostname.c ++++ b/src/nss-myhostname/nss-myhostname.c +@@ -384,6 +384,12 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( + struct address *addresses = NULL, *a; + unsigned n_addresses = 0, n; + ++ if (af != AF_INET && af != AF_INET6) { ++ *errnop = EAFNOSUPPORT; ++ *h_errnop = NO_DATA; ++ return NSS_STATUS_UNAVAIL; ++ } ++ + if (len != PROTO_ADDRESS_SIZE(af)) { + *errnop = EINVAL; + *h_errnop = NO_RECOVERY; +@@ -399,11 +405,6 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( + + if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) + goto found; +- +- } else { +- *errnop = EAFNOSUPPORT; +- *h_errnop = NO_DATA; +- return NSS_STATUS_UNAVAIL; + } + + ifconf_acquire_addresses(&addresses, &n_addresses); diff --git a/baselibs.conf b/baselibs.conf index e1e7047d..c06fbf45 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -4,3 +4,4 @@ systemd libudev0 libgudev-1_0-0 libudev1 +nss-myhostname diff --git a/check-for-empty-strings-in-strto-conversions.patch b/check-for-empty-strings-in-strto-conversions.patch deleted file mode 100644 index ce49372e..00000000 --- a/check-for-empty-strings-in-strto-conversions.patch +++ /dev/null @@ -1,92 +0,0 @@ -From f3910003bce32ebdc1dbb71fd9ca2d4b8352b563 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Tue, 30 Oct 2012 10:29:40 +0100 -Subject: [PATCH] shared, libsystemd-daemon: check for empty strings in - strto*l conversions - -strtol() and friends may set EINVAL if no conversion was performed, but -they are not required to do so. In practice they don't. We need to check -for it. - -https://bugzilla.redhat.com/show_bug.cgi?id=870577 ---- - src/libsystemd-daemon/sd-daemon.c | 4 ++-- - src/shared/conf-parser.c | 2 +- - src/shared/util.c | 8 ++++---- - 3 files changed, 7 insertions(+), 7 deletions(-) - -Index: systemd-195/src/libsystemd-daemon/sd-daemon.c -=================================================================== ---- systemd-195.orig/src/libsystemd-daemon/sd-daemon.c -+++ systemd-195/src/libsystemd-daemon/sd-daemon.c -@@ -88,7 +88,7 @@ _sd_export_ int sd_listen_fds(int unset_ - goto finish; - } - -- if (!p || *p || l <= 0) { -+ if (!p || p == e || *p || l <= 0) { - r = -EINVAL; - goto finish; - } -@@ -112,7 +112,7 @@ _sd_export_ int sd_listen_fds(int unset_ - goto finish; - } - -- if (!p || *p) { -+ if (!p || p == e || *p) { - r = -EINVAL; - goto finish; - } -Index: systemd-195/src/shared/conf-parser.c -=================================================================== ---- systemd-195.orig/src/shared/conf-parser.c -+++ systemd-195/src/shared/conf-parser.c -@@ -865,7 +865,7 @@ int config_parse_mode( - - errno = 0; - l = strtol(rvalue, &x, 8); -- if (!x || *x || errno) { -+ if (!x || x == rvalue || *x || errno) { - log_error("[%s:%u] Failed to parse mode value, ignoring: %s", filename, line, rvalue); - return 0; - } -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -388,7 +388,7 @@ int safe_atou(const char *s, unsigned *r - errno = 0; - l = strtoul(s, &x, 0); - -- if (!x || *x || errno) -+ if (!x || x == s || *x || errno) - return errno ? -errno : -EINVAL; - - if ((unsigned long) (unsigned) l != l) -@@ -408,7 +408,7 @@ int safe_atoi(const char *s, int *ret_i) - errno = 0; - l = strtol(s, &x, 0); - -- if (!x || *x || errno) -+ if (!x || x == s || *x || errno) - return errno ? -errno : -EINVAL; - - if ((long) (int) l != l) -@@ -428,7 +428,7 @@ int safe_atollu(const char *s, long long - errno = 0; - l = strtoull(s, &x, 0); - -- if (!x || *x || errno) -+ if (!x || x == s || *x || errno) - return errno ? -errno : -EINVAL; - - *ret_llu = l; -@@ -445,7 +445,7 @@ int safe_atolli(const char *s, long long - errno = 0; - l = strtoll(s, &x, 0); - -- if (!x || *x || errno) -+ if (!x || x == s || *x || errno) - return errno ? -errno : -EINVAL; - - *ret_lli = l; diff --git a/core-interpret-escaped-semicolon-as-escaped.patch b/core-interpret-escaped-semicolon-as-escaped.patch deleted file mode 100644 index 945514a7..00000000 --- a/core-interpret-escaped-semicolon-as-escaped.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7e1a84f55244ca78093b1dabc58683bc0e7f4304 Mon Sep 17 00:00:00 2001 -From: Oleksii Shevchuk -Date: Sat, 3 Nov 2012 21:52:02 +0200 -Subject: [PATCH] core: interpret \; token in ExecStart as escaped ; - -Some commands (like 'find') take a semicolon as separate arg. With -current parser implementation there is no way to pass one. - -Patch adds token \; ---- - src/core/load-fragment.c | 2 ++ - src/test/test-unit-file.c | 10 ++++++++++ - 2 files changed, 12 insertions(+) - -diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c -index 5803044..4dc5c52 100644 ---- a/src/core/load-fragment.c -+++ b/src/core/load-fragment.c -@@ -483,6 +483,8 @@ int config_parse_exec( - FOREACH_WORD_QUOTED(w, l, rvalue, state) { - if (strncmp(w, ";", MAX(l, 1U)) == 0) - break; -+ else if (strncmp(w, "\\;", MAX(l, 1U)) == 0) -+ w ++; - - if (honour_argv0 && w == rvalue) { - assert(!path); --- -1.7.10.4 - diff --git a/core-load-fragment-improve-error-message.patch b/core-load-fragment-improve-error-message.patch deleted file mode 100644 index 850698dd..00000000 --- a/core-load-fragment-improve-error-message.patch +++ /dev/null @@ -1,207 +0,0 @@ -From c040936be2a4c77e9465cffae47d77d5ec14fb49 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 19 Nov 2012 16:02:45 +0100 -Subject: [PATCH] core/load-fragment: be more precise in error messages - -Whenever a message fails, mention the offending word, instead -of just giving the whole line. If one bad word causes just this -word to be rejected, print only the word. If one bad word causes -the whole line to be rejected, print the whole line too. - -https://bugs.freedesktop.org/show_bug.cgi?id=56874 ---- - src/core/load-fragment.c | 69 +++++++++++++++++++++------------------------- - 1 file changed, 31 insertions(+), 38 deletions(-) - -Index: systemd-195/src/core/load-fragment.c -=================================================================== ---- systemd-195.orig/src/core/load-fragment.c -+++ systemd-195/src/core/load-fragment.c -@@ -85,7 +85,7 @@ int config_parse_unit_deps( - assert(rvalue); - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- char *t, *k; -+ char _cleanup_free_ *t = NULL, *k = NULL; - int r; - - t = strndup(w, l); -@@ -93,15 +93,13 @@ int config_parse_unit_deps( - return -ENOMEM; - - k = unit_name_printf(u, t); -- free(t); - if (!k) - return -ENOMEM; - - r = unit_add_dependency_by_name(u, d, k, NULL, true); - if (r < 0) -- log_error("[%s:%u] Failed to add dependency on %s, ignoring: %s", filename, line, k, strerror(-r)); -- -- free(k); -+ log_error("[%s:%u] Failed to add dependency on %s, ignoring: %s", -+ filename, line, k, strerror(-r)); - } - - return 0; -@@ -739,22 +737,25 @@ int config_parse_exec_cpu_affinity( - assert(data); - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- char *t; -+ char _cleanup_free_ *t = NULL; - int r; - unsigned cpu; - -- if (!(t = strndup(w, l))) -+ t = strndup(w, l); -+ if (!t) - return -ENOMEM; - - r = safe_atou(t, &cpu); -- free(t); - -- if (!(c->cpuset)) -- if (!(c->cpuset = cpu_set_malloc(&c->cpuset_ncpus))) -+ if (!c->cpuset) { -+ c->cpuset = cpu_set_malloc(&c->cpuset_ncpus); -+ if (!c->cpuset) - return -ENOMEM; -+ } - - if (r < 0 || cpu >= c->cpuset_ncpus) { -- log_error("[%s:%u] Failed to parse CPU affinity, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse CPU affinity %s, ignoring: %s", -+ filename, line, t, rvalue); - return 0; - } - -@@ -831,7 +832,8 @@ int config_parse_exec_secure_bits( - else if (first_word(w, "noroot-locked")) - c->secure_bits |= SECURE_NOROOT_LOCKED; - else { -- log_error("[%s:%u] Failed to parse secure bits, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse secure bits, ignoring: %s", -+ filename, line, rvalue); - return 0; - } - } -@@ -872,7 +874,7 @@ int config_parse_bounding_set( - * interface. */ - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- char *t; -+ char _cleanup_free_ *t = NULL; - int r; - cap_value_t cap; - -@@ -881,10 +883,9 @@ int config_parse_bounding_set( - return -ENOMEM; - - r = cap_from_name(t, &cap); -- free(t); -- - if (r < 0) { -- log_error("[%s:%u] Failed to parse capability bounding set, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse capability in bounding set, ignoring: %s", -+ filename, line, t); - continue; - } - -@@ -950,7 +951,7 @@ int config_parse_unit_cgroup( - char *state; - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- char *t, *k; -+ char _cleanup_free_ *t = NULL, *k = NULL, *ku = NULL; - int r; - - t = strndup(w, l); -@@ -958,22 +959,17 @@ int config_parse_unit_cgroup( - return -ENOMEM; - - k = unit_full_printf(u, t); -- free(t); -- - if (!k) - return -ENOMEM; - -- t = cunescape(k); -- free(k); -- -- if (!t) -+ ku = cunescape(k); -+ if (!ku) - return -ENOMEM; - -- r = unit_add_cgroup_from_text(u, t); -- free(t); -- -+ r = unit_add_cgroup_from_text(u, ku); - if (r < 0) { -- log_error("[%s:%u] Failed to parse cgroup value, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse cgroup value %s, ignoring: %s", -+ filename, line, k, rvalue); - return 0; - } - } -@@ -1333,33 +1329,30 @@ int config_parse_service_sockets( - assert(data); - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- char *t, *k; -+ char _cleanup_free_ *t = NULL, *k = NULL; - - t = strndup(w, l); - if (!t) - return -ENOMEM; - - k = unit_name_printf(UNIT(s), t); -- free(t); -- - if (!k) - return -ENOMEM; - - if (!endswith(k, ".socket")) { -- log_error("[%s:%u] Unit must be of type socket, ignoring: %s", filename, line, rvalue); -- free(k); -+ log_error("[%s:%u] Unit must be of type socket, ignoring: %s", -+ filename, line, k); - continue; - } - - r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_WANTS, UNIT_AFTER, k, NULL, true); - if (r < 0) -- log_error("[%s:%u] Failed to add dependency on %s, ignoring: %s", filename, line, k, strerror(-r)); -+ log_error("[%s:%u] Failed to add dependency on %s, ignoring: %s", -+ filename, line, k, strerror(-r)); - - r = unit_add_dependency_by_name(UNIT(s), UNIT_TRIGGERED_BY, k, NULL, true); - if (r < 0) - return r; -- -- free(k); - } - - return 0; -@@ -2087,17 +2080,17 @@ int config_parse_syscall_filter( - - FOREACH_WORD_QUOTED(w, l, rvalue, state) { - int id; -- char *t; -+ char _cleanup_free_ *t = NULL; - - t = strndup(w, l); - if (!t) - return -ENOMEM; - - id = syscall_from_name(t); -- free(t); - - if (id < 0) { -- log_error("[%s:%u] Failed to parse syscall, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse syscall, ignoring: %s", -+ filename, line, t); - continue; - } - diff --git a/coredumpctl-fix-crash.patch b/coredumpctl-fix-crash.patch deleted file mode 100644 index 6874e9c1..00000000 --- a/coredumpctl-fix-crash.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 348a25edbb87ee4e67aa79fcb97a2bc1b5c11c7b Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Wed, 19 Dec 2012 14:38:53 +0100 -Subject: [PATCH] coredumpctl: check return of strndup - ---- - src/journal/coredumpctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/journal/coredumpctl.c -=================================================================== ---- systemd-195.orig/src/journal/coredumpctl.c -+++ systemd-195/src/journal/coredumpctl.c -@@ -222,7 +222,7 @@ static int retrieve(sd_journal *j, const - assert(len >= field); - - *var = strndup((const char*)data + field, len - field); -- if (!var) -+ if (!*var) - return log_oom(); - - return 0; diff --git a/create-default-links-for-primary-cd_dvd-drive.patch b/create-default-links-for-primary-cd_dvd-drive.patch new file mode 100644 index 00000000..c66a9da0 --- /dev/null +++ b/create-default-links-for-primary-cd_dvd-drive.patch @@ -0,0 +1,24 @@ +From: Robert Milasan +Date: Tue, 12 Feb 2013 09:16:23 +0000 +Subject: create default links for primary cd_dvd drive + +cdrom_id: created links for the default cd/dvd drive (bnc#783054). +--- + rules/60-cdrom_id.rules | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules +index 6eaf76a..ec0b19a 100644 +--- a/rules/60-cdrom_id.rules ++++ b/rules/60-cdrom_id.rules +@@ -15,6 +15,9 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr + # enable the receiving of media eject button events + IMPORT{program}="cdrom_id --lock-media $devnode" + +-KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" ++KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" ++KERNEL=="sr0", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw", OPTIONS+="link_priority=-100" ++KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100" ++KERNEL=="sr0", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100" + + LABEL="cdrom_end" diff --git a/crypsetup-generator-state-file-name-in-error-message.patch b/crypsetup-generator-state-file-name-in-error-message.patch deleted file mode 100644 index ccb1c895..00000000 --- a/crypsetup-generator-state-file-name-in-error-message.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1cda32b8a29750720872d3525084ac67b88e066f Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 23 Nov 2012 14:16:39 +0100 -Subject: [PATCH] cryptsetup-generator: state file name in error messages - ---- - src/cryptsetup/cryptsetup-generator.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: systemd-195/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-195.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-195/src/cryptsetup/cryptsetup-generator.c -@@ -230,7 +230,7 @@ static int create_disk( - f = fopen(p, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file: %m"); -+ log_error("Failed to create unit file %s: %m", p); - goto fail; - } - -@@ -283,7 +283,7 @@ static int create_disk( - - if (ferror(f)) { - r = -errno; -- log_error("Failed to write file: %m"); -+ log_error("Failed to write file %s: %m", p); - goto fail; - } - diff --git a/crypsetup-handle-nofail.patch b/crypsetup-handle-nofail.patch deleted file mode 100644 index 872c14c1..00000000 --- a/crypsetup-handle-nofail.patch +++ /dev/null @@ -1,29 +0,0 @@ -From adc40dc2f670a6298cce918fb318ba6a4b80c306 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Wed, 21 Nov 2012 12:30:47 +0100 -Subject: [PATCH] cryptsetup: fix nofail support - -This was documented in the man page and supported in the generator, -but systemd-cryptestup itself would fail with this option. - -systemd-cryptsetup should ignore 'nofail', as it does with 'noauto'. ---- - src/cryptsetup/cryptsetup.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c -index 56a3b50..f332843 100644 ---- a/src/cryptsetup/cryptsetup.c -+++ b/src/cryptsetup/cryptsetup.c -@@ -62,7 +62,7 @@ static int parse_one_option(const char *option) { - assert(option); - - /* Handled outside of this tool */ -- if (streq(option, "noauto")) -+ if (streq(option, "noauto") || streq(option, "nofail")) - return 0; - - if (startswith(option, "cipher=")) { --- -1.7.10.4 - diff --git a/crypt-loop-file.patch b/crypt-loop-file.patch deleted file mode 100644 index 81491c67..00000000 --- a/crypt-loop-file.patch +++ /dev/null @@ -1,90 +0,0 @@ -Index: systemd-195/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-195.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-195/src/cryptsetup/cryptsetup-generator.c -@@ -136,7 +136,7 @@ static int create_disk( - const char *password, - const char *options) { - -- char *p = NULL, *n = NULL, *d = NULL, *u = NULL, *from = NULL, *to = NULL, *e = NULL; -+ char *p = NULL, *n = NULL, *d = NULL, *u = NULL, *from = NULL, *to = NULL, *e = NULL, *path_file = NULL; - int r; - FILE *f = NULL; - bool noauto, nofail; -@@ -168,11 +168,63 @@ static int create_disk( - goto fail; - } - -- d = unit_name_from_path(u, ".device"); -- if (!d) { -- r = -ENOMEM; -- log_error("Failed to allocate device name."); -- goto fail; -+ if (!startswith(device,"/dev/")) { -+ char *e; -+ -+ d = strdup(n); -+ if (!d) { -+ r = -ENOMEM; -+ log_error("Failed to allocate path name."); -+ goto fail; -+ } -+ -+ e = endswith(d,".service"); -+ if (!e) { -+ r = -ENOMEM; -+ log_error("Failed to modify path name."); -+ goto fail; -+ } -+ -+ *e = 0; -+ -+ d = strcat(d,".path"); -+ if (asprintf(&path_file, "%s/%s", arg_dest, d) < 0) { -+ r = -ENOMEM; -+ log_error("Failed to allocate unit file name."); -+ goto fail; -+ } -+ -+ f = fopen(path_file, "wxe"); -+ if (!f) { -+ r = -errno; -+ log_error("Failed to create unit file %s: %m", path_file); -+ goto fail; -+ } -+ -+ fprintf(f, -+ "[Unit]\n" -+ "Description=Cryptography Setup for %s\n" -+ "DefaultDependencies=no\n" -+ "[Path]\n" -+ "PathExists=%s\n", -+ device, device); -+ -+ fflush(f); -+ -+ if (ferror(f)) { -+ r = -errno; -+ log_error("Failed to write file: %m"); -+ goto fail; -+ } -+ -+ f = NULL; -+ } else { -+ d = unit_name_from_path(u, ".device"); -+ if (!d) { -+ r = -ENOMEM; -+ log_error("Failed to allocate device name."); -+ goto fail; -+ } - } - - f = fopen(p, "wxe"); -@@ -298,6 +350,7 @@ fail: - free(n); - free(d); - free(e); -+ free(path_file); - - free(from); - free(to); diff --git a/cryptsetup-accept-read-only.patch b/cryptsetup-accept-read-only.patch deleted file mode 100644 index 279b4482..00000000 --- a/cryptsetup-accept-read-only.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 18cf1a1be5ae6985f211ec6f02504506da36b223 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Thu, 31 Jan 2013 11:03:09 +0100 -Subject: [PATCH] cryptsetup: accept both "read-only" and "readonly" spellings - -Mukund Sivaraman pointed out that cryptsetup(5) mentions the "read-only" -option, while the code understands "readonly". - -We could just fix the manpage, but for consistency in naming of -multi-word options it would be prettier to have "read-only". So let's -accept both spellings. - -BZ: https://bugzilla.redhat.com/show_bug.cgi?id=903463 ---- - man/crypttab.xml | 2 +- - src/cryptsetup/cryptsetup.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/man/crypttab.xml b/man/crypttab.xml -index 2379fc0..f976bda 100644 ---- a/man/crypttab.xml -+++ b/man/crypttab.xml -@@ -182,7 +182,7 @@ - - - -- read-only -+ read-onlyreadonly - - Set up the encrypted - block device in read-only -diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c -index f332843..a8cdf10 100644 ---- a/src/cryptsetup/cryptsetup.c -+++ b/src/cryptsetup/cryptsetup.c -@@ -111,7 +111,7 @@ static int parse_one_option(const char *option) { - return 0; - } - -- } else if (streq(option, "readonly")) -+ } else if (streq(option, "readonly") || streq(option, "read-only")) - opt_readonly = true; - else if (streq(option, "verify")) - opt_verify = true; --- -1.7.10.4 - diff --git a/cryptsetup-handle-plain.patch b/cryptsetup-handle-plain.patch deleted file mode 100644 index 002605f3..00000000 --- a/cryptsetup-handle-plain.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 65343c749441322d1e65e8bb5d433b6fee8c28bf Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Tue, 6 Nov 2012 09:49:27 -0500 -Subject: [PATCH] cryptsetup: hash=plain means don't use a hash - -"plain" is a semantic value that cryptsetup(8) uses to describe a plain -dm-crypt volume that does not use a hash. Catch this value earlier and -ensure that a NULL params.hash is passed to crypt_format to avoid -passing an invalid hash type to the libcryptsetup backend. - -FDO bug #56593. ---- - src/cryptsetup/cryptsetup.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c -index 916509a..e8ba3f0 100644 ---- a/src/cryptsetup/cryptsetup.c -+++ b/src/cryptsetup/cryptsetup.c -@@ -342,7 +342,12 @@ int main(int argc, char *argv[]) { - - opt_tries = opt_tries > 0 ? opt_tries : 3; - opt_key_size = (opt_key_size > 0 ? opt_key_size : 256); -- hash = opt_hash ? opt_hash : "ripemd160"; -+ if (opt_hash) { -+ /* plain isn't a real hash type. it just means "use no hash" */ -+ if (!streq(opt_hash, "plain")) -+ hash = opt_hash; -+ } else -+ hash = "ripemd160"; - - if (opt_cipher) { - size_t l; -@@ -463,7 +468,7 @@ int main(int argc, char *argv[]) { - opt_keyfile_size, - ¶ms); - -- pass_volume_key = streq(hash, "plain"); -+ pass_volume_key = !!hash; - } - - if (k < 0) { --- -1.7.10.4 - -From 8db9d8c2a4ef9806c286e258f9932a0972dc2375 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Tue, 6 Nov 2012 10:17:18 -0500 -Subject: [PATCH] cryptsetup: fix inverted comparison in pass_volume_key - ---- - src/cryptsetup/cryptsetup.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c -index e8ba3f0..56a3b50 100644 ---- a/src/cryptsetup/cryptsetup.c -+++ b/src/cryptsetup/cryptsetup.c -@@ -468,7 +468,8 @@ int main(int argc, char *argv[]) { - opt_keyfile_size, - ¶ms); - -- pass_volume_key = !!hash; -+ /* hash == NULL implies the user passed "plain" */ -+ pass_volume_key = (hash == NULL); - } - - if (k < 0) { --- -1.7.10.4 - diff --git a/delay-fsck-cryptsetup-after-md-lvm-dmraid.patch b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch similarity index 50% rename from delay-fsck-cryptsetup-after-md-lvm-dmraid.patch rename to delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch index 58a4f924..a49b0589 100644 --- a/delay-fsck-cryptsetup-after-md-lvm-dmraid.patch +++ b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch @@ -1,18 +1,17 @@ -From c6170719e7afbcecc04e8939e93e9678529e6391 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Wed, 9 Nov 2011 11:10:49 +0100 -Subject: [PATCH] delay fsck / cryptsetup after md / dmraid / lvm are started +Subject: delay fsck / cryptsetup after md / dmraid / lvm are started --- - src/cryptsetup-generator.c | 1 + - units/fsck@.service.in | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + src/cryptsetup/cryptsetup-generator.c | 1 + + units/systemd-fsck@.service.in | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) -Index: systemd-189/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-189.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-189/src/cryptsetup/cryptsetup-generator.c -@@ -192,6 +192,7 @@ static int create_disk( +diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c +index bee8a36..6edc760 100644 +--- a/src/cryptsetup/cryptsetup-generator.c ++++ b/src/cryptsetup/cryptsetup-generator.c +@@ -162,6 +162,7 @@ static int create_disk( "DefaultDependencies=no\n" "BindsTo=%s dev-mapper-%%i.device\n" "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n" @@ -20,10 +19,10 @@ Index: systemd-189/src/cryptsetup/cryptsetup-generator.c "Before=umount.target\n", d, d); -Index: systemd-189/units/systemd-fsck@.service.in -=================================================================== ---- systemd-189.orig/units/systemd-fsck@.service.in -+++ systemd-189/units/systemd-fsck@.service.in +diff --git a/units/systemd-fsck@.service.in b/units/systemd-fsck@.service.in +index b3c71eb..c66a411 100644 +--- a/units/systemd-fsck@.service.in ++++ b/units/systemd-fsck@.service.in @@ -10,7 +10,7 @@ Description=File System Check on %f Documentation=man:systemd-fsck@.service(8) DefaultDependencies=no diff --git a/delta-accept-t-option.patch b/delta-accept-t-option.patch deleted file mode 100644 index 4717c018..00000000 --- a/delta-accept-t-option.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 377ec8bf1907a1a227d195cc3721c4acbad19213 Mon Sep 17 00:00:00 2001 -From: Thomas Hindoe Paaboel Andersen -Date: Wed, 14 Nov 2012 00:18:02 +0100 -Subject: [PATCH] delta.c: fix option '-t' - -Both the help and man page claims that it accepts -t with an argument -so let's do that. ---- - src/delta/delta.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/delta/delta.c -=================================================================== ---- systemd-195.orig/src/delta/delta.c -+++ systemd-195/src/delta/delta.c -@@ -375,7 +375,7 @@ static int parse_argv(int argc, char *ar - assert(argc >= 1); - assert(argv); - -- while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) { -+ while ((c = getopt_long(argc, argv, "ht:", options, NULL)) >= 0) { - - switch (c) { - diff --git a/detect-btrfs-ssd.patch b/detect-btrfs-ssd.patch deleted file mode 100644 index 4bd64690..00000000 --- a/detect-btrfs-ssd.patch +++ /dev/null @@ -1,97 +0,0 @@ -commit d7228cb8529de83115af04bf653b4d204dad8fae -Author: Lennart Poettering -Date: Thu Nov 22 01:51:06 2012 +0100 - - readahead: properly detect btrfs on SSD - -diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c -index 10b0ccc..41aaff0 100644 ---- a/src/readahead/readahead-common.c -+++ b/src/readahead/readahead-common.c -@@ -32,6 +32,7 @@ - #include "log.h" - #include "readahead-common.h" - #include "util.h" -+#include "missing.h" - - int file_verify(int fd, const char *fn, off_t file_size_max, struct stat *st) { - assert(fd >= 0); -@@ -62,14 +63,63 @@ int fs_on_ssd(const char *p) { - struct udev_device *udev_device = NULL, *look_at = NULL; - bool b = false; - const char *devtype, *rotational, *model, *id; -+ int r; - - assert(p); - - if (stat(p, &st) < 0) - return -errno; - -- if (major(st.st_dev) == 0) -+ if (major(st.st_dev) == 0) { -+ _cleanup_fclose_ FILE *f = NULL; -+ int mount_id; -+ struct file_handle *h; -+ -+ /* Might be btrfs, which exposes "ssd" as mount flag if it is on ssd. -+ * -+ * We first determine the mount ID here, if we can, -+ * and then lookup the mount ID in mountinfo to find -+ * the mount options. */ -+ -+ h = alloca(MAX_HANDLE_SZ); -+ h->handle_bytes = MAX_HANDLE_SZ; -+ r = name_to_handle_at(AT_FDCWD, p, h, &mount_id, AT_SYMLINK_FOLLOW); -+ if (r < 0) -+ return false; -+ -+ f = fopen("/proc/self/mountinfo", "re"); -+ if (!f) -+ return false; -+ -+ for (;;) { -+ char line[LINE_MAX], *e; -+ _cleanup_free_ char *opts = NULL; -+ int mid; -+ -+ if (!fgets(line, sizeof(line), f)) -+ return false; -+ -+ truncate_nl(line); -+ -+ if (sscanf(line, "%i", &mid) != 1) -+ continue; -+ -+ if (mid != mount_id) -+ continue; -+ -+ e = strstr(line, " - "); -+ if (!e) -+ continue; -+ -+ if (sscanf(e+3, "%*s %*s %ms", &opts) != 1) -+ continue; -+ -+ if (streq(opts, "ssd") || startswith(opts, "ssd,") || endswith(opts, ",ssd") || strstr(opts, ",ssd,")) -+ return true; -+ } -+ - return false; -+ } - - udev = udev_new(); - if (!udev) -@@ -97,9 +147,10 @@ int fs_on_ssd(const char *p) { - - /* Second, try kernel attribute */ - rotational = udev_device_get_sysattr_value(look_at, "queue/rotational"); -- if (rotational) -- if ((b = streq(rotational, "0"))) -- goto finish; -+ if (rotational) { -+ b = streq(rotational, "0"); -+ goto finish; -+ } - - /* Finally, fallback to heuristics */ - look_at = udev_device_get_parent(look_at); diff --git a/disable-nss-myhostname-warning-bnc-783841.diff b/disable-nss-myhostname-warning-bnc-783841.diff deleted file mode 100644 index 2d085696..00000000 --- a/disable-nss-myhostname-warning-bnc-783841.diff +++ /dev/null @@ -1,21 +0,0 @@ -From 33db05b6bd6151c482f5efe01f2a6118efc82fde Mon Sep 17 00:00:00 2001 -From: Ludwig Nussel -Date: Tue, 12 Feb 2013 17:24:35 +0100 -Subject: [PATCH] disable nss-myhostname warning (bnc#783841) - ---- - src/hostname/hostnamed.c | 1 + - 1 Datei geändert, 1 Zeile hinzugefügt(+) - -Index: systemd-195/src/hostname/hostnamed.c -=================================================================== ---- systemd-195.orig/src/hostname/hostnamed.c -+++ systemd-195/src/hostname/hostnamed.c -@@ -124,6 +124,7 @@ static int read_data(void) { - static bool check_nss(void) { - - void *dl; -+ return true; - - if ((dl = dlopen("libnss_myhostname.so.2", RTLD_LAZY))) { - dlclose(dl); diff --git a/disable-nss-myhostname-warning-bnc-783841.patch b/disable-nss-myhostname-warning-bnc-783841.patch new file mode 100644 index 00000000..69e136f8 --- /dev/null +++ b/disable-nss-myhostname-warning-bnc-783841.patch @@ -0,0 +1,20 @@ +From: Ludwig Nussel +Date: Tue, 12 Feb 2013 17:24:35 +0100 +Subject: disable nss-myhostname warning (bnc#783841) + +--- + src/hostname/hostnamed.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c +index 859b5a0..4aad17b 100644 +--- a/src/hostname/hostnamed.c ++++ b/src/hostname/hostnamed.c +@@ -134,6 +134,7 @@ static int read_data(void) { + + static bool check_nss(void) { + void *dl; ++ return true; + + dl = dlopen("libnss_myhostname.so.2", RTLD_LAZY); + if (dl) { diff --git a/dm-lvm-after-local-fs-pre-target.patch b/dm-lvm-after-local-fs-pre-target.patch deleted file mode 100644 index d3467af1..00000000 --- a/dm-lvm-after-local-fs-pre-target.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: systemd-189/units/local-fs-pre.target -=================================================================== ---- systemd-189.orig/units/local-fs-pre.target -+++ systemd-189/units/local-fs-pre.target -@@ -8,3 +8,4 @@ - [Unit] - Description=Local File Systems (Pre) - Documentation=man:systemd.special(7) -+After=md.service lvm.service dmraid.service diff --git a/do-no-isolate-on-fsck-failure.patch b/do-no-isolate-on-fsck-failure.patch deleted file mode 100644 index bde866dc..00000000 --- a/do-no-isolate-on-fsck-failure.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 80cfe9e163b1c92f917e0a5e053b148fca790677 Mon Sep 17 00:00:00 2001 -From: "Dr. Tilmann Bubeck" -Date: Fri, 4 May 2012 10:32:47 +0200 -Subject: [PATCH] Do no isolate in case of emergency or severe problems - -This patch changes local-fs.target and systemd-fsck to not use -"isolate" when going into emergency. -This fixes https://bugzilla.redhat.com/show_bug.cgi?id=810722 - -The motivation is, that when something wents wrong, we should -keep everything as it is, to let the user fix the problem. When -isolating we stop a lot of services and therefore change the -system heavily so that it gets harder for the user to fix. - -An example is a crypted partition. When the fsck in a crypted -partition fails, it previously used "emergency/start/isolate" -which stops cryptsetup. Therefore if the user tries to fsck -e.g. /dev/mapper/luks-356c20ae-c7a2-4f1c-ae1d-1d290a91b691 -as printed by the failing fsck, then it will not find this -device (because it got closed). - -So please apply this patch to let the user see the failing -situation. - -Thanks! - -[zj: removed dead isolate param from start_target().] - -https://bugs.freedesktop.org/show_bug.cgi?id=49463 -https://bugzilla.redhat.com/show_bug.cgi?id=810722 ---- - src/fsck/fsck.c | 13 ++++--------- - units/local-fs.target | 2 +- - 2 files changed, 5 insertions(+), 10 deletions(-) - -Index: systemd-195/src/fsck/fsck.c -=================================================================== ---- systemd-195.orig/src/fsck/fsck.c -+++ systemd-195/src/fsck/fsck.c -@@ -40,10 +40,10 @@ static bool arg_skip = false; - static bool arg_force = false; - static bool arg_show_progress = false; - --static void start_target(const char *target, bool isolate) { -+static void start_target(const char *target) { - DBusMessage *m = NULL, *reply = NULL; - DBusError error; -- const char *mode, *basic_target = "basic.target"; -+ const char *mode = "replace", *basic_target = "basic.target"; - DBusConnection *bus = NULL; - - assert(target); -@@ -55,11 +55,6 @@ static void start_target(const char *tar - goto finish; - } - -- if (isolate) -- mode = "isolate"; -- else -- mode = "replace"; -- - log_info("Running request %s/start/%s", target, mode); - - if (!(m = dbus_message_new_method_call("org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "StartUnitReplace"))) { -@@ -379,10 +374,10 @@ int main(int argc, char *argv[]) { - - if (status.si_code == CLD_EXITED && (status.si_status & 2) && root_directory) - /* System should be rebooted. */ -- start_target(SPECIAL_REBOOT_TARGET, false); -+ start_target(SPECIAL_REBOOT_TARGET); - else if (status.si_code == CLD_EXITED && (status.si_status & 6)) - /* Some other problem */ -- start_target(SPECIAL_EMERGENCY_TARGET, true); -+ start_target(SPECIAL_EMERGENCY_TARGET); - else { - r = EXIT_SUCCESS; - log_warning("Ignoring error."); -Index: systemd-195/units/local-fs.target -=================================================================== ---- systemd-195.orig/units/local-fs.target -+++ systemd-195/units/local-fs.target -@@ -9,4 +9,4 @@ - Description=Local File Systems - Documentation=man:systemd.special(7) - OnFailure=emergency.target --OnFailureIsolate=yes -+OnFailureIsolate=no diff --git a/do-not-make-sockets-dependent-on-lo.patch b/do-not-make-sockets-dependent-on-lo.patch deleted file mode 100644 index 7c5e78b8..00000000 --- a/do-not-make-sockets-dependent-on-lo.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 7d0c710d72f8a6e5c6909c65700aa088c53aebc6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?= -Date: Sat, 12 Jan 2013 23:05:52 +0100 -Subject: [PATCH] core: do not make sockets dependent on lo - -/sys/subsystem/net/devices/lo is never considered active, so sockets -with BindToDevice=lo would never be activated. ---- - src/core/socket.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/core/socket.c -=================================================================== ---- systemd-195.orig/src/core/socket.c -+++ systemd-195/src/core/socket.c -@@ -293,7 +293,7 @@ static int socket_add_device_link(Socket - - assert(s); - -- if (!s->bind_to_device) -+ if (!s->bind_to_device || streq(s->bind_to_device, "lo")) - return 0; - - if (asprintf(&t, "/sys/subsystem/net/devices/%s", s->bind_to_device) < 0) diff --git a/early-sync-shutdown.patch b/early-sync-shutdown.patch deleted file mode 100644 index 87d4a555..00000000 --- a/early-sync-shutdown.patch +++ /dev/null @@ -1,209 +0,0 @@ -From c65eb8365344eeb72ee2c0b333ab54d925263b3f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 25 Jan 2013 22:33:33 +0100 -Subject: [PATCH] shutdown: issue a sync() as soon as shutdown.target is queued - ---- - Makefile.am | 7 ++++-- - src/core/job.c | 26 ++++++++++++++++++++ - src/core/job.h | 2 ++ - src/core/sync.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++ - src/core/sync.h | 24 +++++++++++++++++++ - src/core/transaction.c | 1 + - 6 files changed, 123 insertions(+), 2 deletions(-) - create mode 100644 src/core/sync.c - create mode 100644 src/core/sync.h - -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -1038,7 +1038,9 @@ libsystemd_core_la_SOURCES = \ - src/core/syscall-list.c \ - src/core/syscall-list.h \ - src/core/audit-fd.c \ -- src/core/audit-fd.h -+ src/core/audit-fd.h \ -+ src/core/sync.c \ -+ src/core/sync.h - - nodist_libsystemd_core_la_SOURCES = \ - src/core/load-fragment-gperf.c \ -@@ -1052,7 +1054,8 @@ libsystemd_core_la_CFLAGS = \ - $(LIBWRAP_CFLAGS) \ - $(PAM_CFLAGS) \ - $(AUDIT_CFLAGS) \ -- $(KMOD_CFLAGS) -+ $(KMOD_CFLAGS) \ -+ -pthread - - libsystemd_core_la_LIBADD = \ - libsystemd-capability.la \ -Index: systemd-195/src/core/job.c -=================================================================== ---- systemd-195.orig/src/core/job.c -+++ systemd-195/src/core/job.c -@@ -34,6 +34,9 @@ - #include "load-dropin.h" - #include "log.h" - #include "dbus-job.h" -+#include "special.h" -+#include "sync.h" -+#include "virt.h" - - JobBusClient* job_bus_client_new(DBusConnection *connection, const char *name) { - JobBusClient *cl; -@@ -1045,6 +1048,29 @@ int job_coldplug(Job *j) { - return 0; - } - -+void job_shutdown_magic(Job *j) { -+ assert(j); -+ -+ /* The shutdown target gets some special treatment here: we -+ * tell the kernel to begin with flushing its disk caches, to -+ * optimize shutdown time a bit. Ideally we wouldn't hardcode -+ * this magic into PID 1. However all other processes aren't -+ * options either since they'd exit much sooner than PID 1 and -+ * asynchronous sync() would cause their exit to be -+ * delayed. */ -+ -+ if (!unit_has_name(j->unit, SPECIAL_SHUTDOWN_TARGET)) -+ return; -+ -+ if (j->type != JOB_START) -+ return; -+ -+ if (detect_container(NULL) > 0) -+ return; -+ -+ asynchronous_sync(); -+} -+ - static const char* const job_state_table[_JOB_STATE_MAX] = { - [JOB_WAITING] = "waiting", - [JOB_RUNNING] = "running" -Index: systemd-195/src/core/job.h -=================================================================== ---- systemd-195.orig/src/core/job.h -+++ systemd-195/src/core/job.h -@@ -217,6 +217,8 @@ int job_finish_and_invalidate(Job *j, Jo - - char *job_dbus_path(Job *j); - -+void job_shutdown_magic(Job *j); -+ - const char* job_type_to_string(JobType t); - JobType job_type_from_string(const char *s); - -Index: systemd-195/src/core/sync.c -=================================================================== ---- /dev/null -+++ systemd-195/src/core/sync.c -@@ -0,0 +1,65 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2013 Lennart Poettering -+ -+ systemd is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+#include -+#include -+ -+#include "sync.h" -+ -+static void *sync_thread(void *p) { -+ sync(); -+ return NULL; -+} -+ -+int asynchronous_sync(void) { -+ pthread_attr_t a; -+ pthread_t t; -+ int r; -+ -+ /* It kinda sucks that we have to resort to threads to -+ * implement an asynchronous sync(), but well, such is -+ * life. -+ * -+ * Note that issuing this command right before exiting a -+ * process will cause the process to wait for the sync() to -+ * complete. This function hence is nicely asynchronous really -+ * only in long running processes. */ -+ -+ r = pthread_attr_init(&a); -+ if (r != 0) -+ return -r; -+ -+ r = pthread_attr_setdetachstate(&a, PTHREAD_CREATE_DETACHED); -+ if (r != 0) { -+ r = -r; -+ goto finish; -+ } -+ -+ r = pthread_create(&t, &a, sync_thread, NULL); -+ if (r != 0) { -+ r = -r; -+ goto finish; -+ } -+ -+finish: -+ pthread_attr_destroy(&a); -+ return r; -+} -Index: systemd-195/src/core/sync.h -=================================================================== ---- /dev/null -+++ systemd-195/src/core/sync.h -@@ -0,0 +1,24 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+#pragma once -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2013 Lennart Poettering -+ -+ systemd is free software; you can redistribute it and/or modify it -+ under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+int asynchronous_sync(void); -Index: systemd-195/src/core/transaction.c -=================================================================== ---- systemd-195.orig/src/core/transaction.c -+++ systemd-195/src/core/transaction.c -@@ -592,6 +592,7 @@ static int transaction_apply(Transaction - job_add_to_run_queue(j); - job_add_to_dbus_queue(j); - job_start_timer(j); -+ job_shutdown_magic(j); - } - - return 0; diff --git a/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch b/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch new file mode 100644 index 00000000..c4e313aa --- /dev/null +++ b/ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch @@ -0,0 +1,19 @@ +From: Frederic Crozat +Date: Thu, 9 Feb 2012 16:19:38 +0000 +Subject: ensure DM and LVM are started before local-fs-pre-target + +ensure md / lvm /dmraid is started before mounting partitions, +if fsck was disabled for them (bnc#733283). +--- + units/local-fs-pre.target | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/local-fs-pre.target b/units/local-fs-pre.target +index 809f2ed..05fcbd4 100644 +--- a/units/local-fs-pre.target ++++ b/units/local-fs-pre.target +@@ -9,3 +9,4 @@ + Description=Local File Systems (Pre) + Documentation=man:systemd.special(7) + RefuseManualStart=yes ++After=md.service lvm.service dmraid.service diff --git a/ensure-ask-password-wall-starts-after-getty-tty1.patch b/ensure-ask-password-wall-starts-after-getty-tty1.patch new file mode 100644 index 00000000..a0c005f8 --- /dev/null +++ b/ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -0,0 +1,22 @@ +From: Frederic Crozat +Date: Wed, 24 Aug 2011 13:02:12 +0000 +Subject: ensure ask-password-wall starts after getty@tty1 + +ensure passphrase is handled before starting getty on tty1. +--- + units/systemd-ask-password-wall.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/units/systemd-ask-password-wall.service.in b/units/systemd-ask-password-wall.service.in +index 0eaa274..ca51e4e 100644 +--- a/units/systemd-ask-password-wall.service.in ++++ b/units/systemd-ask-password-wall.service.in +@@ -8,7 +8,7 @@ + [Unit] + Description=Forward Password Requests to Wall + Documentation=man:systemd-ask-password-console.service(8) +-After=systemd-user-sessions.service ++After=systemd-user-sessions.service getty@tty1.service + + [Service] + ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service diff --git a/ensure-sysctl-are-applied-after-modules-are-loaded.patch b/ensure-sysctl-are-applied-after-modules-are-loaded.patch new file mode 100644 index 00000000..186e09e0 --- /dev/null +++ b/ensure-sysctl-are-applied-after-modules-are-loaded.patch @@ -0,0 +1,21 @@ +From: Frederic Crozat +Date: Mon, 9 Jan 2012 17:01:22 +0000 +Subject: ensure sysctl are applied after modules are loaded + +(bnc#725412) +--- + units/systemd-sysctl.service.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in +index 45e1ceb..caaaa9a 100644 +--- a/units/systemd-sysctl.service.in ++++ b/units/systemd-sysctl.service.in +@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5) + DefaultDependencies=no + Conflicts=shutdown.target + After=systemd-readahead-collect.service systemd-readahead-replay.service ++After=systemd-modules-load.service + Before=sysinit.target shutdown.target + ConditionPathIsReadWrite=/proc/sys/ + ConditionPathExists=|/etc/sysctl.conf diff --git a/ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch b/ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch new file mode 100644 index 00000000..795980bd --- /dev/null +++ b/ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch @@ -0,0 +1,21 @@ +From: Frederic Crozat +Date: Mon, 8 Apr 2013 14:51:47 +0200 +Subject: ensure systemd-udevd is started before local-fs-pre for loopback + mount + +ensure udevd is started (and therefore static devices are created) +before mounting (bnc#809820). +--- + units/local-fs-pre.target | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/units/local-fs-pre.target b/units/local-fs-pre.target +index 05fcbd4..7f13907 100644 +--- a/units/local-fs-pre.target ++++ b/units/local-fs-pre.target +@@ -9,4 +9,4 @@ + Description=Local File Systems (Pre) + Documentation=man:systemd.special(7) + RefuseManualStart=yes +-After=md.service lvm.service dmraid.service ++After=md.service lvm.service dmraid.service systemd-udevd.service diff --git a/fastboot-forcefsck.patch b/fastboot-forcefsck.patch deleted file mode 100644 index f0898e86..00000000 --- a/fastboot-forcefsck.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-189/src/fsck/fsck.c -=================================================================== ---- systemd-189.orig/src/fsck/fsck.c -+++ systemd-189/src/fsck/fsck.c -@@ -128,7 +128,7 @@ static int parse_proc_cmdline(void) { - arg_skip = true; - else if (startswith(w, "fsck")) - log_warning("Invalid fsck parameter. Ignoring."); --#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) -+#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) || defined(TARGET_SUSE) - else if (strneq(w, "fastboot", l)) - arg_skip = true; - else if (strneq(w, "forcefsck", l)) diff --git a/fix-bad-mem-access.patch b/fix-bad-mem-access.patch deleted file mode 100644 index 878ed0a9..00000000 --- a/fix-bad-mem-access.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 86ed7ec58b9b6a0907bbb3b8d07c930e52915de0 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 17 Jan 2013 17:38:00 +0100 -Subject: [PATCH] util: fix bad memory access - ---- - src/shared/util.c | 1 - - 1 file changed, 1 deletion(-) - -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -543,7 +543,6 @@ int get_parent_of_pid(pid_t pid, pid_t * - - if (!fgets(line, sizeof(line), f)) { - r = feof(f) ? -EIO : -errno; -- fclose(f); - return r; - } - diff --git a/fix-bad-memory-access.patch b/fix-bad-memory-access.patch deleted file mode 100644 index 2109977a..00000000 --- a/fix-bad-memory-access.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 7d73c1343be02a59b17de0cd34375deeb815d89c Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 20 Nov 2012 00:19:27 +0100 -Subject: [PATCH] journald: fix bad memory access - -https://bugzilla.redhat.com/show_bug.cgi?id=875653 ---- - src/journal/journald-server.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/journal/journald.c -=================================================================== ---- systemd-195.orig/src/journal/journald.c -+++ systemd-195/src/journal/journald.c -@@ -342,7 +342,7 @@ static void server_rotate(Server *s) { - HASHMAP_FOREACH_KEY(f, k, s->user_journals, i) { - r = journal_file_rotate(&f, s->compress, s->seal); - if (r < 0) -- if (f->path) -+ if (f) - log_error("Failed to rotate %s: %s", f->path, strerror(-r)); - else - log_error("Failed to create user journal: %s", strerror(-r)); diff --git a/fix-build-glibc217.patch b/fix-build-glibc217.patch deleted file mode 100644 index d4a2d8ec..00000000 --- a/fix-build-glibc217.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e17187091d463ad008c0b74eb04de5078b2abb96 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Wed, 14 Nov 2012 14:44:05 +0100 -Subject: [PATCH] configure.ac: fix FTBFS with new glibc - -glibc moved clock_* functions from librt to the core libc. As a result, -clock_gettime is no more a suitable symbol to use when finding librt. -Look for mq_open instead. -Reference: -http://www.sourceware.org/git/gitweb.cgi?p=glibc.git&h=6e6249d0b461b952d0f544792372663feb6d792a - -Fixes a FTBFS in Fedora Rawhide. ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/configure.ac -=================================================================== ---- systemd-195.orig/configure.ac -+++ systemd-195/configure.ac -@@ -172,7 +172,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [L - -Wl,-z,now]) - AC_SUBST([OUR_LDFLAGS], $with_ldflags) - --AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) -+AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])]) - AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) - - save_LIBS="$LIBS" diff --git a/fix-dbus-crash.patch b/fix-dbus-crash.patch deleted file mode 100644 index dcf6c8f1..00000000 --- a/fix-dbus-crash.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 645a9e5a2bbb06464a3fba1a3501e9d79e5bbad8 Mon Sep 17 00:00:00 2001 -From: Eelco Dolstra -Date: Wed, 31 Oct 2012 11:53:56 +0100 -Subject: [PATCH] dbus-manager: fix a fatal dbus abort in - bus_manager_message_handler() - -If ListUnitFiles fails, or an OOM occurs, then dbus_message_unref() -will be called twice on "reply", causing systemd to crash. So remove -the call to dbus_message_unref(); it is unnecessary because of -the cleanup attribute on "reply". - -[zj: modified to leave one dbus_message_unref() alone, per Colin -Walters' comment.] ---- - src/core/dbus-manager.c | 1 - - 1 file changed, 1 deletion(-) - -Index: systemd-195/src/core/dbus-manager.c -=================================================================== ---- systemd-195.orig/src/core/dbus-manager.c -+++ systemd-195/src/core/dbus-manager.c -@@ -1432,7 +1432,6 @@ static DBusHandlerResult bus_manager_mes - r = unit_file_get_list(m->running_as == SYSTEMD_SYSTEM ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, NULL, h); - if (r < 0) { - unit_file_list_free(h); -- dbus_message_unref(reply); - return bus_send_error_reply(connection, message, NULL, r); - } - diff --git a/fix-debugshell.patch b/fix-debugshell.patch deleted file mode 100644 index 5a1e8405..00000000 --- a/fix-debugshell.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-195/units/debug-shell.service.in -=================================================================== ---- systemd-195.orig/units/debug-shell.service.in -+++ systemd-195/units/debug-shell.service.in -@@ -13,7 +13,7 @@ IgnoreOnIsolate=yes - - [Service] - Environment=TERM=linux --ExecStart=@sushell@ -+ExecStart=/bin/bash -c '[ -x @sushell@ ] && exec @sushell@ || exec /bin/bash' - Restart=always - RestartSec=0 - StandardInput=tty diff --git a/fix-devname-prefix.patch b/fix-devname-prefix.patch new file mode 100644 index 00000000..8ca10b93 --- /dev/null +++ b/fix-devname-prefix.patch @@ -0,0 +1,22 @@ +From: Frederic Crozat +Date: Wed, 5 Dec 2012 15:13:27 +0000 +Subject: fix devname prefix + +fix modules.devname path, it isn't in /usr. +--- + src/udev/udevd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 2a0bf60..6c2c2c9 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -827,7 +827,7 @@ static void static_dev_create_from_modules(struct udev *udev) + FILE *f; + + uname(&kernel); +- strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL); ++ strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL); + f = fopen(modules, "re"); + if (f == NULL) + return; diff --git a/fix-journal-vacuum-logic.patch b/fix-journal-vacuum-logic.patch deleted file mode 100644 index 382d6c57..00000000 --- a/fix-journal-vacuum-logic.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 6c142648aaced56ab681fcc97a71b06d588122a9 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Wed, 20 Mar 2013 21:32:05 +0100 -Subject: [PATCH] Fix vacuum logic error - -The vacuum code used to stop vacuuming after one deletion, even -when max_use was still exceeded. - -Also make usage a uint64_t, as the code already pretends it is one. - -Signed-off-by: Jan Alexander Steffens (heftig) ---- - src/journal/journal-vacuum.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c -index 731f6c7..4a3a5a9 100644 ---- a/src/journal/journal-vacuum.c -+++ b/src/journal/journal-vacuum.c -@@ -36,7 +36,7 @@ - #include "util.h" - - struct vacuum_info { -- off_t usage; -+ uint64_t usage; - char *filename; - - uint64_t realtime; -@@ -293,7 +293,7 @@ int journal_directory_vacuum( - if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) { - log_debug("Deleted archived journal %s/%s.", directory, list[i].filename); - -- if ((uint64_t) list[i].usage > sum) -+ if (list[i].usage < sum) - sum -= list[i].usage; - else - sum = 0; --- -1.8.1.4 - diff --git a/fix-logind-pty-seat.patch b/fix-logind-pty-seat.patch deleted file mode 100644 index 079c5baf..00000000 --- a/fix-logind-pty-seat.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 978cf3c75fbd94fd0e046206ada6169b35edd919 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 28 Oct 2012 17:37:16 +0100 -Subject: [PATCH] logind: it's OK if a process on an pty requests a session - for seat0 - -After all, if a sudo/su inside an X terminal should get added to the -same session as the X session itself. ---- - src/login/logind-dbus.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -Index: systemd-195/src/login/logind-dbus.c -=================================================================== ---- systemd-195.orig/src/login/logind-dbus.c -+++ systemd-195/src/login/logind-dbus.c -@@ -409,8 +409,7 @@ static int bus_manager_create_session(Ma - if (vtnr != 0) - return -EINVAL; - -- } else if (!isempty(tty) && s && seat_is_vtconsole(s)) -- return -EINVAL; -+ } - - if (s) { - if (seat_can_multi_session(s)) { diff --git a/fix-loopback-mount.patch b/fix-loopback-mount.patch deleted file mode 100644 index ba79d342..00000000 --- a/fix-loopback-mount.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: systemd-195/units/local-fs-pre.target -=================================================================== ---- systemd-195.orig/units/local-fs-pre.target -+++ systemd-195/units/local-fs-pre.target -@@ -8,4 +8,4 @@ - [Unit] - Description=Local File Systems (Pre) - Documentation=man:systemd.special(7) --After=md.service lvm.service dmraid.service -+After=md.service lvm.service dmraid.service systemd-udevd.service diff --git a/fix-lsb-provides.patch b/fix-lsb-provides.patch deleted file mode 100644 index 35177c88..00000000 --- a/fix-lsb-provides.patch +++ /dev/null @@ -1,43 +0,0 @@ -From a99435109b83e7146a30ccf5387037b51c1fe907 Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Thu, 21 Mar 2013 15:40:45 +0100 -Subject: [PATCH] core: ensure LSB Provides are handled correctly - -Let's say you have two initscripts, A and B: - -A contains in its LSB header: -Required-Start: C - -and B contains in its LSB header: -Provides: C - -When systemd is parsing /etc/rc.d/, depending on the file order, you -can end up with either: -- B is parsed first. An unit "C.service" will be "created" and will be -added as additional name to B.service, with unit_add_name. No bug. -- A is parsed first. An unit "C.service" is created for the -"Required-Start" dependency (it will have no file attached, since -nothing provides this dependency yet). Then B is parsed and when trying -to handle "Provides: C", unit_add_name is called but will fail, because -"C.service" already exists in manager->units. Therefore, a merge should -occur for that case. ---- - src/core/service.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/service.c b/src/core/service.c -index 4451d38..fa8a1cb 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -762,7 +762,7 @@ static int service_load_sysv_path(Service *s, const char *path) { - continue; - - if (unit_name_to_type(m) == UNIT_SERVICE) -- r = unit_add_name(u, m); -+ r = unit_merge_by_name(u, m); - else - /* NB: SysV targets - * which are provided --- -1.8.1.4 - diff --git a/fix-owner-of-var-log-btmp.patch b/fix-owner-of-var-log-btmp.patch new file mode 100644 index 00000000..a28f4937 --- /dev/null +++ b/fix-owner-of-var-log-btmp.patch @@ -0,0 +1,22 @@ +From: Frederic Crozat +Date: Tue, 20 Nov 2012 09:36:43 +0000 +Subject: fix owner of /var/log/btmp + +ensure btmp is owned only by root (bnc#777405). +--- + tmpfiles.d/systemd.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf +index ee86f2e..29d6e97 100644 +--- a/tmpfiles.d/systemd.conf ++++ b/tmpfiles.d/systemd.conf +@@ -11,7 +11,7 @@ d /run/user 0755 root root ~10d + F /run/utmp 0664 root utmp - + + f /var/log/wtmp 0664 root utmp - +-f /var/log/btmp 0600 root utmp - ++f /var/log/btmp 0600 root root - + + d /var/cache/man - - - 30d + diff --git a/fix-permissions-btmp.patch b/fix-permissions-btmp.patch deleted file mode 100644 index 4a7a1122..00000000 --- a/fix-permissions-btmp.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-44/tmpfiles.d/systemd.conf -=================================================================== ---- systemd-44.orig/tmpfiles.d/systemd.conf -+++ systemd-44/tmpfiles.d/systemd.conf -@@ -11,7 +11,7 @@ d /run/user 0755 root root 10d - F /run/utmp 0664 root utmp - - - f /var/log/wtmp 0664 root utmp - --f /var/log/btmp 0600 root utmp - -+f /var/log/btmp 0600 root root - - - d /var/cache/man - - - 30d - diff --git a/fix-potential-bad-mem-access.patch b/fix-potential-bad-mem-access.patch deleted file mode 100644 index 3c3e0c98..00000000 --- a/fix-potential-bad-mem-access.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ac97e2c559f5d386a332aba4a24bf9930cdb1c51 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 19 Nov 2012 16:36:38 +0100 -Subject: [PATCH] core/load-fragment: fix (potential) bad memory access - -strncmp() could be used with size bigger then the size of the string, -because MAX was used instead of MIN. - -If failing, print just the offending mount flag. ---- - src/core/load-fragment.c | 17 ++++++++++++----- - 1 file changed, 12 insertions(+), 5 deletions(-) - -Index: systemd-195/src/core/load-fragment.c -=================================================================== ---- systemd-195.orig/src/core/load-fragment.c -+++ systemd-195/src/core/load-fragment.c -@@ -1083,15 +1083,22 @@ int config_parse_exec_mount_flags( - assert(rvalue); - assert(data); - -- FOREACH_WORD_QUOTED(w, l, rvalue, state) { -- if (strncmp(w, "shared", MAX(l, 6U)) == 0) -+ FOREACH_WORD_SEPARATOR(w, l, rvalue, ", ", state) { -+ char _cleanup_free_ *t; -+ -+ t = strndup(w, l); -+ if (!t) -+ return -ENOMEM; -+ -+ if (streq(t, "shared")) - flags |= MS_SHARED; -- else if (strncmp(w, "slave", MAX(l, 5U)) == 0) -+ else if (streq(t, "slave")) - flags |= MS_SLAVE; -- else if (strncmp(w, "private", MAX(l, 7U)) == 0) -+ else if (streq(w, "private")) - flags |= MS_PRIVATE; - else { -- log_error("[%s:%u] Failed to parse mount flags, ignoring: %s", filename, line, rvalue); -+ log_error("[%s:%u] Failed to parse mount flag %s, ignoring: %s", -+ filename, line, t, rvalue); - return 0; - } - } diff --git a/fix-enable-disable-boot-initscript.patch b/fix-support-for-boot-prefixed-initscript-bnc-746506.patch similarity index 70% rename from fix-enable-disable-boot-initscript.patch rename to fix-support-for-boot-prefixed-initscript-bnc-746506.patch index a89b5955..f1538c40 100644 --- a/fix-enable-disable-boot-initscript.patch +++ b/fix-support-for-boot-prefixed-initscript-bnc-746506.patch @@ -1,21 +1,20 @@ -From f9d333f8d202fd853f2553ee6c3196b041ccfba5 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Thu, 23 Aug 2012 11:08:25 +0200 -Subject: [PATCH] fix support for boot prefixed initscript (bnc#746506) +Subject: fix support for boot prefixed initscript (bnc#746506) --- - src/systemctl.c | 20 ++++++++++++++++++++ + src/systemctl/systemctl.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -3453,7 +3453,27 @@ static int enable_sysv_units(char **args +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index edd136a..36918f2 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -3642,7 +3642,27 @@ static int enable_sysv_units(char **args) { if (!found_sysv) { free(p); -+#if defined(TARGET_SUSE) ++#ifdef HAVE_SYSV_COMPAT + p = NULL; + if (!isempty(arg_root)) + asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/boot.%s", arg_root, name); diff --git a/fix-swap-behaviour-with-symlinks.patch b/fix-swap-behaviour-with-symlinks.patch deleted file mode 100644 index f9ee5fab..00000000 --- a/fix-swap-behaviour-with-symlinks.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b61e88162a6ce0c30da6984b0120959701283daa Mon Sep 17 00:00:00 2001 -From: Olivier Brunel -Date: Sat, 13 Oct 2012 14:24:15 +0200 -Subject: [PATCH] swap: fix swap behaviour with symlinks - -Starting a swap unit pointing to (What) a symlink (e.g. /dev/mapper/swap -or /dev/disk/by-uuid/...) would have said unit marked active, following -the one using the "actual" device (/dev/{dm-1,sda3}), but that new unit -would be seen as inactive. -Since all requests to stop swap units would follow/redirect to it, -and it is seen inactive, nothing would be done (swapoff never called). - -This is because this unit would be treated twice in -swap_process_new_swap, the second call to swap_add_one causing it to -eventually be marked inactive. ---- - src/core/swap.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: systemd-195/src/core/swap.c -=================================================================== ---- systemd-195.orig/src/core/swap.c -+++ systemd-195/src/core/swap.c -@@ -415,7 +415,8 @@ static int swap_process_new_swap(Manager - return -ENOMEM; - - dn = udev_device_get_devnode(d); -- if (dn) -+ /* Skip dn==device, since that case will be handled below */ -+ if (dn && !streq(dn, device)) - r = swap_add_one(m, dn, device, prio, false, false, set_flags); - - /* Add additional units for all symlinks */ diff --git a/force-lvm-restart-after-cryptsetup-target-is-reached.patch b/force-lvm-restart-after-cryptsetup-target-is-reached.patch new file mode 100644 index 00000000..1d1bc65b --- /dev/null +++ b/force-lvm-restart-after-cryptsetup-target-is-reached.patch @@ -0,0 +1,105 @@ +From: Frederic Crozat +Date: Mon, 7 Nov 2011 18:04:20 +0100 +Subject: force lvm restart after cryptsetup target is reached + +--- + src/cryptsetup/cryptsetup-generator.c | 58 ++++++++++++++++++++++++++++++++++- + 1 file changed, 57 insertions(+), 1 deletion(-) + +diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c +index 8959bf5..d386b60 100644 +--- a/src/cryptsetup/cryptsetup-generator.c ++++ b/src/cryptsetup/cryptsetup-generator.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include "log.h" + #include "util.h" +@@ -64,6 +65,55 @@ static bool has_option(const char *haystack, const char *needle) { + return false; + } + ++static int create_storage_after_cryptsetup (void) { ++ int r; ++ char _cleanup_free_ *to = NULL, *p = NULL; ++ FILE _cleanup_fclose_ *f = NULL; ++ ++ if (asprintf(&p, "%s/storage-after-cryptsetup.service", arg_dest) < 0) ++ return log_oom(); ++ ++ if (!(f = fopen(p, "wxe"))) { ++ log_error("Failed to create unit file: %m"); ++ return -errno; ++ } ++ ++ fprintf(f, ++ "[Unit]\n" ++ "Description=Restart storage after cryptsetup\n" ++ "DefaultDependencies=no\n" ++ "After=cryptsetup.target\n" ++ "Wants=cryptsetup.target\n" ++ "Before=local-fs.target\n" ++ "Before=shutdown.target\n"); ++ ++ fprintf(f, ++ "\n[Service]\n" ++ "RemainAfterExit=true\n" ++ "Type=oneshot\n" ++ "TimeoutSec=0\n" ++ "ExecStart=/usr/bin/systemctl restart lvm.service\n"); ++ ++ fflush(f); ++ ++ if (ferror(f)) { ++ log_error("Failed to write file: %m"); ++ return -errno; ++ } ++ ++ if (asprintf(&to, "%s/local-fs.target.wants/storage-after-cryptsetup.service", arg_dest) < 0) ++ return log_oom(); ++ ++ mkdir_parents(to, 0755); ++ ++ if (symlink("../storage-after-cryptsetup.service", to) < 0) { ++ log_error("Failed to create symlink ../storage-after-cryptsetup.service to '%s': %m", to); ++ return -errno; ++ } ++ ++ return 0; ++} ++ + static int create_disk( + const char *name, + const char *device, +@@ -284,6 +334,7 @@ int main(int argc, char *argv[]) { + FILE _cleanup_fclose_ *f = NULL; + unsigned n = 0; + int r = EXIT_SUCCESS; ++ bool no_crypttab = false; + char **i; + char _cleanup_strv_free_ **arg_proc_cmdline_disks_done = NULL; + char _cleanup_strv_free_ **arg_proc_cmdline_disks = NULL; +@@ -312,8 +363,10 @@ int main(int argc, char *argv[]) { + f = fopen("/etc/crypttab", "re"); + + if (!f) { +- if (errno == ENOENT) ++ if (errno == ENOENT) { ++ no_crypttab = true; + r = EXIT_SUCCESS; ++ } + else { + r = EXIT_FAILURE; + log_error("Failed to open /etc/crypttab: %m"); +@@ -397,5 +450,8 @@ int main(int argc, char *argv[]) { + r = EXIT_FAILURE; + } + ++ if ((r == EXIT_SUCCESS && !no_crypttab) && (create_storage_after_cryptsetup () < 0)) ++ r = EXIT_FAILURE; ++ + return r; + } diff --git a/fstab-generator-error-message-on-duplicates.patch b/fstab-generator-error-message-on-duplicates.patch deleted file mode 100644 index 33ec3f26..00000000 --- a/fstab-generator-error-message-on-duplicates.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 67ab5f761f9b854d8ce85f9ee47b298e497f8bd9 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Tue, 27 Nov 2012 01:09:28 +0100 -Subject: [PATCH] fstab-generator: make error more helpful in case of - duplicates in fstab - -Traditional sysvinit systems would not complain about duplicates in -fstab. Rather it (through monut -a) would mount one fs on top of another, -in effect the last entry taking precedent. - -In systemd, the first entry takes precedent, all subsequent ones are -ignored and an error is printed. - -The change of behavior and the source of this error message was causing -some confusion, so give a hint what migt be wrong. ---- - src/fstab-generator/fstab-generator.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -Index: systemd-195/src/fstab-generator/fstab-generator.c -=================================================================== ---- systemd-195.orig/src/fstab-generator/fstab-generator.c -+++ systemd-195/src/fstab-generator/fstab-generator.c -@@ -111,7 +111,10 @@ static int add_swap(const char *what, st - f = fopen(unit, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file %s: %m", unit); -+ if (errno == EEXIST) -+ log_error("Failed to create swap unit file %s, as it already exists. Duplicate entry in /etc/fstab?", unit); -+ else -+ log_error("Failed to create unit file %s: %m", unit); - goto finish; - } - -@@ -262,7 +265,10 @@ static int add_mount(const char *what, c - f = fopen(unit, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file %s: %m", unit); -+ if (errno == EEXIST) -+ log_error("Failed to create mount unit file %s, as it already exists. Duplicate entry in /etc/fstab?", unit); -+ else -+ log_error("Failed to create unit file %s: %m", unit); - goto finish; - } - diff --git a/fstab-generator-improve-error-message.patch b/fstab-generator-improve-error-message.patch deleted file mode 100644 index f1de5734..00000000 --- a/fstab-generator-improve-error-message.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 40b8acd039cf1ea00167017e63d9c0a773002f0e Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 9 Nov 2012 12:00:46 +0100 -Subject: [PATCH] fstab-generator: more specific error messages - ---- - src/fstab-generator/fstab-generator.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c -index 251a346..62053b7 100644 ---- a/src/fstab-generator/fstab-generator.c -+++ b/src/fstab-generator/fstab-generator.c -@@ -111,7 +111,7 @@ static int add_swap(const char *what, struct mntent *me) { - f = fopen(unit, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file: %m"); -+ log_error("Failed to create unit file %s: %m", unit); - goto finish; - } - -@@ -138,7 +138,7 @@ static int add_swap(const char *what, struct mntent *me) { - - fflush(f); - if (ferror(f)) { -- log_error("Failed to write unit file: %m"); -+ log_error("Failed to write unit file %s: %m", unit); - r = -errno; - goto finish; - } -@@ -152,7 +152,7 @@ static int add_swap(const char *what, struct mntent *me) { - - mkdir_parents_label(lnk, 0755); - if (symlink(unit, lnk) < 0) { -- log_error("Failed to create symlink: %m"); -+ log_error("Failed to create symlink %s: %m", lnk); - r = -errno; - goto finish; - } -@@ -171,7 +171,7 @@ static int add_swap(const char *what, struct mntent *me) { - - mkdir_parents_label(lnk, 0755); - if (symlink(unit, lnk) < 0) { -- log_error("Failed to create symlink: %m"); -+ log_error("Failed to create symlink %s: %m", lnk); - r = -errno; - goto finish; - } -@@ -262,7 +262,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - f = fopen(unit, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file: %m"); -+ log_error("Failed to create unit file %s: %m", unit); - goto finish; - } - -@@ -306,7 +306,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - - fflush(f); - if (ferror(f)) { -- log_error("Failed to write unit file: %m"); -+ log_error("Failed to write unit file %s: %m", unit); - r = -errno; - goto finish; - } -@@ -320,7 +320,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - - mkdir_parents_label(lnk, 0755); - if (symlink(unit, lnk) < 0) { -- log_error("Failed to create symlink: %m"); -+ log_error("Failed to create symlink %s: %m", lnk); - r = -errno; - goto finish; - } -@@ -342,7 +342,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - - mkdir_parents_label(lnk, 0755); - if (symlink(unit, lnk) < 0) { -- log_error("Failed to create symlink: %m"); -+ log_error("Failed to create symlink %s: %m", lnk); - r = -errno; - goto finish; - } -@@ -367,7 +367,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - f = fopen(automount_unit, "wxe"); - if (!f) { - r = -errno; -- log_error("Failed to create unit file: %m"); -+ log_error("Failed to create unit file %s: %m", automount_unit); - goto finish; - } - -@@ -386,7 +386,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - - fflush(f); - if (ferror(f)) { -- log_error("Failed to write unit file: %m"); -+ log_error("Failed to write unit file %s: %m", automount_unit); - r = -errno; - goto finish; - } -@@ -400,7 +400,7 @@ static int add_mount(const char *what, const char *where, struct mntent *me) { - - mkdir_parents_label(lnk, 0755); - if (symlink(automount_unit, lnk) < 0) { -- log_error("Failed to create symlink: %m"); -+ log_error("Failed to create symlink %s: %m", lnk); - r = -errno; - goto finish; - } --- -1.7.10.4 - diff --git a/fstab-generator-properly-detect-bind-mounts.patch b/fstab-generator-properly-detect-bind-mounts.patch deleted file mode 100644 index d6461abb..00000000 --- a/fstab-generator-properly-detect-bind-mounts.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f9ea108e7c3544c03822277a1112a48dc62f6ed4 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 24 Dec 2012 13:01:00 +0100 -Subject: [PATCH] fstab-generator: properly detect bind mounts - -This kinda undoes a83cbaccd03c3f28e47e9330f4a22ff65ce4b561 and -1d634e21b453f3c80d7c6c4bd90a6b84e42a3d2a but corrects the original code -to compare the mount type with "bind" rather than the mount options. ---- - src/fstab-generator/fstab-generator.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -Index: systemd-195/src/fstab-generator/fstab-generator.c -=================================================================== ---- systemd-195.orig/src/fstab-generator/fstab-generator.c -+++ systemd-195/src/fstab-generator/fstab-generator.c -@@ -199,7 +199,7 @@ static bool mount_is_bind(struct mntent - - return - hasmntopt(me, "bind") || -- streq(me->mnt_opts, "bind"); -+ streq(me->mnt_type, "bind"); - } - - static bool mount_is_network(struct mntent *me) { diff --git a/handle-HOSTNAME.patch b/handle-HOSTNAME.patch deleted file mode 100644 index 56aa50f3..00000000 --- a/handle-HOSTNAME.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: systemd-195/src/hostname/hostnamed.c -=================================================================== ---- systemd-195.orig/src/hostname/hostnamed.c -+++ systemd-195/src/hostname/hostnamed.c -@@ -118,6 +118,10 @@ static int read_data(void) { - if (r < 0 && r != -ENOENT) - return r; - -+ r = read_one_line_file("/etc/HOSTNAME", &data[PROP_STATIC_HOSTNAME]); -+ if (r < 0 && r != -ENOENT) -+ return r; -+ - return 0; - } - -@@ -204,6 +208,7 @@ static int write_data_hostname(void) { - - static int write_data_static_hostname(void) { - -+ int r; - if (isempty(data[PROP_STATIC_HOSTNAME])) { - - if (unlink("/etc/hostname") < 0) -@@ -212,7 +217,11 @@ static int write_data_static_hostname(vo - return 0; - } - -- return write_one_line_file_atomic("/etc/hostname", data[PROP_STATIC_HOSTNAME]); -+ r = write_one_line_file_atomic("/etc/hostname", data[PROP_STATIC_HOSTNAME]); -+ if (!r) { -+ r = symlink_atomic("/etc/hostname", "/etc/HOSTNAME"); -+ } -+ return r; - } - - static int write_data_other(void) { diff --git a/systemctl-options.patch b/handle-SYSTEMCTL_OPTIONS-environment-variable.patch similarity index 55% rename from systemctl-options.patch rename to handle-SYSTEMCTL_OPTIONS-environment-variable.patch index 165e1bb5..9fba097e 100644 --- a/systemctl-options.patch +++ b/handle-SYSTEMCTL_OPTIONS-environment-variable.patch @@ -1,13 +1,17 @@ -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -4118,10 +4118,32 @@ static int systemctl_parse_argv(int argc - }; - - int c; -+ char **to_free = NULL; - +From: Frederic Crozat +Date: Tue, 22 Jan 2013 17:02:04 +0000 +Subject: handle SYSTEMCTL_OPTIONS environment variable + +(bnc#798620) +--- + src/systemctl/systemctl.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c +index 36918f2..28d6586 100644 +--- a/src/systemctl/systemctl.c ++++ b/src/systemctl/systemctl.c +@@ -4340,6 +4340,26 @@ static int systemctl_parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); @@ -16,7 +20,7 @@ Index: systemd-195/src/systemctl/systemctl.c + + if (*parsed_systemctl_options && **parsed_systemctl_options) { + char **k,**a; -+ char **new_argv = new(char*, strv_length(argv) + strv_length(parsed_systemctl_options) + 1); ++ char _cleanup_strv_free_ **new_argv = new(char*, strv_length(argv) + strv_length(parsed_systemctl_options) + 1); + new_argv[0] = strdup(argv[0]); + for (k = new_argv+1, a = parsed_systemctl_options; *a; k++, a++) { + *k = strdup(*a); @@ -28,19 +32,9 @@ Index: systemd-195/src/systemctl/systemctl.c + argv = new_argv; + argc = strv_length(new_argv); + strv_free (parsed_systemctl_options); -+ to_free = new_argv; + } + } + - while ((c = getopt_long(argc, argv, "ht:p:aqfs:H:Pn:o:", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "ht:p:aqfs:H:Pn:o:i", options, NULL)) >= 0) { switch (c) { -@@ -4297,6 +4319,8 @@ static int systemctl_parse_argv(int argc - return -EINVAL; - } - -+ strv_free(to_free); -+ - return 1; - } - diff --git a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch similarity index 69% rename from 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch rename to handle-disable_caplock-and-compose_table-and-kbd_rate.patch index 561a47f7..b67a80e8 100644 --- a/0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch +++ b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch @@ -1,20 +1,20 @@ -m 5c894bc1e45f7c34bf7fc4ca0d20bf1c3b679bef 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 +Date: Fri, 19 Aug 2011 15:29:49 +0000 +Subject: handle disable_caplock and compose_table and kbd_rate +(bnc#746595) --- - src/vconsole-setup.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 121 insertions(+), 3 deletions(-) + src/vconsole/vconsole-setup.c | 156 +++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 153 insertions(+), 3 deletions(-) -Index: systemd-195/src/vconsole/vconsole-setup.c -=================================================================== ---- systemd-195.orig/src/vconsole/vconsole-setup.c -+++ systemd-195/src/vconsole/vconsole-setup.c +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index c1f662b..5f3354e 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c @@ -40,6 +40,7 @@ - #include "log.h" #include "macro.h" #include "virt.h" + #include "fileio.h" +#include "strv.h" static bool is_vconsole(int fd) { @@ -23,14 +23,14 @@ Index: systemd-195/src/vconsole/vconsole-setup.c return r; } --static int load_keymap(const char *vc, const char *map, const char *map_toggle, bool utf8, pid_t *_pid) { +-static int keymap_load(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, pid_t *_pid) { ++static int keymap_load(const char *vc, const char *map, const char *map_toggle, bool utf8, bool disable_capslock, pid_t *_pid) { + const char *args[9]; int i = 0; pid_t pid; -@@ -119,6 +120,8 @@ static int load_keymap(const char *vc, c +@@ -119,6 +120,8 @@ static int keymap_load(const char *vc, const char *map, const char *map_toggle, args[i++] = map; if (map_toggle) args[i++] = map_toggle; @@ -39,11 +39,11 @@ Index: systemd-195/src/vconsole/vconsole-setup.c args[i++] = NULL; pid = fork(); -@@ -172,6 +175,101 @@ static int load_font(const char *vc, con - return 0; +@@ -217,6 +220,101 @@ static void font_copy_to_all_vcs(int fd) { + } } -+#ifdef TARGET_SUSE ++#ifdef HAVE_SYSV_COMPAT +static int load_compose_table(const char *vc, const char *compose_table, pid_t *_pid) { + const char *args[1024]; + int i = 0, j = 0; @@ -102,6 +102,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + + return 0; +} ++#endif + +static int set_kbd_rate(const char *vc, const char *kbd_rate, const char *kbd_delay, pid_t *_pid) { + const char *args[7]; @@ -136,16 +137,15 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + *_pid = pid; + return 0; +} -+#endif + int main(int argc, char **argv) { const char *vc; char *vc_keymap = NULL; -@@ -185,8 +283,16 @@ int main(int argc, char **argv) { - #if defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) - char *vc_keytable = NULL; - #endif -+#ifdef TARGET_SUSE +@@ -224,8 +322,16 @@ int main(int argc, char **argv) { + char *vc_font = NULL; + char *vc_font_map = NULL; + char *vc_font_unimap = NULL; ++#ifdef HAVE_SYSV_COMPAT + char *vc_kbd_delay = NULL; + char *vc_kbd_rate = NULL; + char *vc_kbd_disable_caps_lock = NULL; @@ -155,47 +155,59 @@ Index: systemd-195/src/vconsole/vconsole-setup.c int fd = -1; bool utf8; + bool disable_capslock = false; - int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; + bool font_copy = false; + int r = EXIT_FAILURE; +@@ -286,13 +392,43 @@ int main(int argc, char **argv) { + log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r)); + } -@@ -277,6 +383,10 @@ int main(int argc, char **argv) { - #elif defined(TARGET_SUSE) - r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, - "KEYTABLE", &vc_keymap, ++ if (r <= 0) { ++#ifdef HAVE_SYSV_COMPAT ++ 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); - if (r < 0 && r != -ENOENT) - log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); -@@ -289,6 +399,8 @@ int main(int argc, char **argv) { - if (r < 0 && r != -ENOENT) - log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); - ++ NULL); ++ if (r < 0 && r != -ENOENT) ++ log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); ++ ++ r = parse_env_file("/etc/sysconfig/console", NEWLINE, ++ "CONSOLE_FONT", &vc_font, ++ "CONSOLE_SCREENMAP", &vc_font_map, ++ "CONSOLE_UNICODEMAP", &vc_font_unimap, ++ NULL); ++ if (r < 0 && r != -ENOENT) ++ log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); ++ + disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; + - #elif defined(TARGET_ARCH) - r = parse_env_file("/etc/rc.conf", NEWLINE, - "KEYMAP", &vc_keymap, -@@ -435,7 +547,11 @@ int main(int argc, char **argv) { ++#endif ++ } ++ + if (utf8) + enable_utf8(fd); + else 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, &keymap_pid) >= 0 && -+#ifdef TARGET_SUSE + r = EXIT_FAILURE; +- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 && ++ ++ if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid) >= 0 && ++#ifdef HAVE_SYSV_COMPAT + load_compose_table(vc, vc_compose_table, &compose_table_pid) >= 0 && + 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) + font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) r = EXIT_SUCCESS; -@@ -443,6 +559,14 @@ finish: +@@ -300,6 +436,14 @@ finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); -+#ifdef TARGET_SUSE ++#ifdef HAVE_SYSV_COMPAT + if (compose_table_pid > 0) + wait_for_terminate_and_warn(KBD_LOADKEYS, compose_table_pid); + @@ -203,14 +215,14 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + wait_for_terminate_and_warn("/bin/kbdrate", kbd_rate_pid); +#endif + - if (font_pid > 0) + if (font_pid > 0) { wait_for_terminate_and_warn(KBD_SETFONT, font_pid); - -@@ -450,6 +574,12 @@ finish: + if (font_copy) +@@ -310,6 +454,12 @@ finish: free(vc_font); free(vc_font_map); free(vc_font_unimap); -+#ifdef TARGET_SUSE ++#ifdef HAVE_SYSV_COMPAT + free(vc_kbd_delay); + free(vc_kbd_rate); + free(vc_kbd_disable_caps_lock); diff --git a/handle-etc-HOSTNAME.patch b/handle-etc-HOSTNAME.patch new file mode 100644 index 00000000..b9fc6037 --- /dev/null +++ b/handle-etc-HOSTNAME.patch @@ -0,0 +1,46 @@ +From: Frederic Crozat +Date: Fri, 15 Feb 2013 16:04:39 +0000 +Subject: handle /etc/HOSTNAME + +(bnc#803653) +--- + src/hostname/hostnamed.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c +index 4aad17b..e7532f6 100644 +--- a/src/hostname/hostnamed.c ++++ b/src/hostname/hostnamed.c +@@ -129,6 +129,10 @@ static int read_data(void) { + if (r < 0 && r != -ENOENT) + return r; + ++ r = read_one_line_file("/etc/HOSTNAME", &data[PROP_STATIC_HOSTNAME]); ++ if (r < 0 && r != -ENOENT) ++ return r; ++ + return 0; + } + +@@ -283,6 +287,7 @@ static int write_data_hostname(void) { + + static int write_data_static_hostname(void) { + ++ int r; + if (isempty(data[PROP_STATIC_HOSTNAME])) { + + if (unlink("/etc/hostname") < 0) +@@ -290,7 +295,12 @@ static int write_data_static_hostname(void) { + + return 0; + } +- return write_one_line_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); ++ ++ r = write_one_line_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); ++ if (!r) { ++ r = symlink_atomic("/etc/hostname", "/etc/HOSTNAME"); ++ } ++ return r; + } + + static int write_data_other(void) { diff --git a/systemd-numlock-suse.patch b/handle-numlock-value-in-etc-sysconfig-keyboard.patch similarity index 68% rename from systemd-numlock-suse.patch rename to handle-numlock-value-in-etc-sysconfig-keyboard.patch index 104aa171..d348aee2 100644 --- a/systemd-numlock-suse.patch +++ b/handle-numlock-value-in-etc-sysconfig-keyboard.patch @@ -1,8 +1,121 @@ -Index: systemd-195/src/vconsole/vconsole-setup.c -=================================================================== ---- systemd-195.orig/src/vconsole/vconsole-setup.c -+++ systemd-195/src/vconsole/vconsole-setup.c -@@ -287,12 +287,14 @@ int main(int argc, char **argv) { +From: Stanislav Brabec +Date: Fri, 20 Apr 2012 17:16:37 +0200 +Subject: handle numlock value in /etc/sysconfig/keyboard + +(bnc#746595) +--- + Makefile.am | 13 +++++++++++ + configure.ac | 5 +++++ + rules/73-seat-numlock.rules | 8 +++++++ + src/login/numlock-on.c | 37 ++++++++++++++++++++++++++++++++ + src/vconsole/vconsole-setup.c | 38 +++++++++++++++++++++++++++++++++ + units/systemd-vconsole-setup.service.in | 2 +- + 6 files changed, 102 insertions(+), 1 deletion(-) + create mode 100644 rules/73-seat-numlock.rules + create mode 100644 src/login/numlock-on.c + +diff --git a/Makefile.am b/Makefile.am +index e44b075..00905d0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2113,6 +2113,19 @@ dist_udevrules_DATA += \ + rules/61-accelerometer.rules + + # ------------------------------------------------------------------------------ ++numlock_on_SOURCES = \ ++ src/login/numlock-on.c ++ ++numlock_on_CFLAGS = \ ++ $(AM_CFLAGS) ++ ++udevlibexec_PROGRAMS += \ ++ numlock-on ++ ++dist_udevrules_DATA += \ ++ rules/73-seat-numlock.rules ++ ++# ------------------------------------------------------------------------------ + if ENABLE_GUDEV + if ENABLE_GTK_DOC + SUBDIRS += \ +diff --git a/configure.ac b/configure.ac +index 5421461..a2d8755 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -787,6 +787,11 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) + + # ------------------------------------------------------------------------------ + ++AC_PATH_PROG([HWINFO], [hwinfo], [/usr/sbin/hwinfo], [/sbin:/usr/sbin:/usr/bin:/bin]) ++AC_DEFINE_UNQUOTED([HWINFO], ["${HWINFO}"], [Path to hwinfo binary. (SUSE)]) ++AC_PATH_PROG([SETLEDS], [setleds], [/bin/setleds], [/sbin:/usr/sbin:/usr/bin:/bin]) ++AC_DEFINE_UNQUOTED([SETLEDS], ["${SETLEDS}"], [Path to setleds binary.]) ++ + # Location of the init scripts as mandated by LSB + SYSTEM_SYSVINIT_PATH=/etc/init.d + SYSTEM_SYSVRCND_PATH=/etc/rc.d +diff --git a/rules/73-seat-numlock.rules b/rules/73-seat-numlock.rules +new file mode 100644 +index 0000000..e0061ed +--- /dev/null ++++ b/rules/73-seat-numlock.rules +@@ -0,0 +1,8 @@ ++# This file is part of systemd. ++# ++# systemd is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++ ++SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}" +diff --git a/src/login/numlock-on.c b/src/login/numlock-on.c +new file mode 100644 +index 0000000..77a8368 +--- /dev/null ++++ b/src/login/numlock-on.c +@@ -0,0 +1,37 @@ ++/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ ++ ++/*** ++ This file is part of systemd. ++ ++ Copyright 2012 Stanislav Brabec ++ ++ systemd is free software; you can redistribute it and/or modify it ++ under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ systemd is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with systemd; If not, see . ++***/ ++ ++#include "config.h" ++#include ++#include ++#include ++ ++int main (int argc, char *argv[]) { ++ static const char *args[] = { SETLEDS, "-D", "+num", NULL }; ++ ++ if (argc != 2) ++ return EX_USAGE; ++ close (STDIN_FILENO); ++ if (open (argv[1], O_RDONLY) != STDIN_FILENO) ++ return EX_IOERR; ++ /* add cast to prevent warning caused by -Wwrite-strings */ ++ return execv(args[0], (char * const*) args); ++} +diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c +index 5f3354e..f5cafc1 100644 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c +@@ -326,12 +326,14 @@ int main(int argc, char **argv) { char *vc_kbd_delay = NULL; char *vc_kbd_rate = NULL; char *vc_kbd_disable_caps_lock = NULL; @@ -14,10 +127,10 @@ Index: systemd-195/src/vconsole/vconsole-setup.c bool utf8; bool disable_capslock = false; + bool numlock = false; - int r = EXIT_FAILURE; pid_t font_pid = 0, keymap_pid = 0; - -@@ -386,6 +388,7 @@ int main(int argc, char **argv) { + bool font_copy = false; + int r = EXIT_FAILURE; +@@ -399,6 +401,7 @@ int main(int argc, char **argv) { "KBD_DELAY", &vc_kbd_delay, "KBD_RATE", &vc_kbd_rate, "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, @@ -25,7 +138,7 @@ Index: systemd-195/src/vconsole/vconsole-setup.c "COMPOSETABLE", &vc_compose_table, NULL); if (r < 0 && r != -ENOENT) -@@ -400,6 +403,37 @@ int main(int argc, char **argv) { +@@ -413,6 +416,37 @@ int main(int argc, char **argv) { log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; @@ -61,9 +174,9 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + } else + numlock = vc_kbd_numlock && strcasecmp(vc_kbd_numlock, "YES") == 0; - #elif defined(TARGET_ARCH) - r = parse_env_file("/etc/rc.conf", NEWLINE, -@@ -558,6 +592,10 @@ int main(int argc, char **argv) { + #endif + } +@@ -435,6 +469,10 @@ int main(int argc, char **argv) { finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); @@ -72,109 +185,13 @@ Index: systemd-195/src/vconsole/vconsole-setup.c + else + unlink("/run/numlock-on"); - #ifdef TARGET_SUSE + #ifdef HAVE_SYSV_COMPAT if (compose_table_pid > 0) -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -2017,6 +2017,19 @@ dist_udevrules_DATA += \ - rules/61-accelerometer.rules - - # ------------------------------------------------------------------------------ -+numlock_on_SOURCES = \ -+ src/login/numlock-on.c -+ -+numlock_on_CFLAGS = \ -+ $(AM_CFLAGS) -+ -+udevlibexec_PROGRAMS += \ -+ numlock-on -+ -+dist_udevrules_DATA += \ -+ rules/73-seat-numlock.rules -+ -+# ------------------------------------------------------------------------------ - if ENABLE_GUDEV - if ENABLE_GTK_DOC - SUBDIRS += \ -Index: systemd-195/configure.ac -=================================================================== ---- systemd-195.orig/configure.ac -+++ systemd-195/configure.ac -@@ -660,6 +660,13 @@ fi - with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' ` - AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution]) - -+if test z"$with_distro" = z"suse" ; then -+ AC_PATH_PROG([HWINFO], [hwinfo], [/usr/sbin/hwinfo], [/sbin:/usr/sbin:/usr/bin:/bin]) -+ AC_DEFINE_UNQUOTED([HWINFO], ["${HWINFO}"], [Path to hwinfo binary. (SUSE)]) -+fi -+AC_PATH_PROG([SETLEDS], [setleds], [/bin/setleds], [/sbin:/usr/sbin:/usr/bin:/bin]) -+AC_DEFINE_UNQUOTED([SETLEDS], ["${SETLEDS}"], [Path to setleds binary.]) -+ - # Location of the init scripts as mandated by LSB - SYSTEM_SYSVINIT_PATH=/etc/init.d - SYSTEM_SYSVRCND_PATH=/etc/rc.d -Index: systemd-195/rules/73-seat-numlock.rules -=================================================================== ---- /dev/null -+++ systemd-195/rules/73-seat-numlock.rules -@@ -0,0 +1,8 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}" -Index: systemd-195/src/login/numlock-on.c -=================================================================== ---- /dev/null -+++ systemd-195/src/login/numlock-on.c -@@ -0,0 +1,36 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2012 Stanislav Brabec -+ -+ systemd is free software; you can redistribute it and/or modify it -+ under the terms of the GNU General Public License as published by -+ the Free Software Foundation; either version 2 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with systemd; If not, see . -+***/ -+ -+#include "config.h" -+#include -+#include -+#include -+ -+int main (int argc, char *argv[]) { -+ static char *args[] = { SETLEDS, "-D", "+num", NULL }; -+ -+ if (argc != 2) -+ return EX_USAGE; -+ close (STDIN_FILENO); -+ if (open (argv[1], O_RDONLY) != STDIN_FILENO) -+ return EX_IOERR; -+ return execv(args[0], args); -+} -Index: systemd-195/units/systemd-vconsole-setup.service.in -=================================================================== ---- systemd-195.orig/units/systemd-vconsole-setup.service.in -+++ systemd-195/units/systemd-vconsole-setup.service.in -@@ -11,7 +11,7 @@ Documentation=man:systemd-vconsole-setup +diff --git a/units/systemd-vconsole-setup.service.in b/units/systemd-vconsole-setup.service.in +index 18faa63..44ebbd0 100644 +--- a/units/systemd-vconsole-setup.service.in ++++ b/units/systemd-vconsole-setup.service.in +@@ -11,7 +11,7 @@ Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) DefaultDependencies=no Conflicts=shutdown.target After=systemd-readahead-collect.service systemd-readahead-replay.service diff --git a/handle-root-uses-lang.patch b/handle-root-uses-lang.patch deleted file mode 100644 index 21af5038..00000000 --- a/handle-root-uses-lang.patch +++ /dev/null @@ -1,48 +0,0 @@ -Index: systemd-195/src/core/locale-setup.c -=================================================================== ---- systemd-195.orig/src/core/locale-setup.c -+++ systemd-195/src/core/locale-setup.c -@@ -69,6 +69,11 @@ static const char * const variable_names - int locale_setup(void) { - char *variables[_VARIABLE_MAX]; - int r = 0, i; -+#if defined(TARGET_SUSE) -+ char *root_uses_lang; -+ -+ zero(root_uses_lang); -+#endif - - zero(variables); - -@@ -134,11 +139,21 @@ int locale_setup(void) { - #elif defined(TARGET_SUSE) - if (r <= 0 && - (r = parse_env_file("/etc/sysconfig/language", NEWLINE, -+ "ROOT_USES_LANG", &root_uses_lang, - "RC_LANG", &variables[VARIABLE_LANG], - NULL)) < 0) { - - if (r != -ENOENT) - log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); -+ } else { -+ if (!root_uses_lang || root_uses_lang && strcasecmp(root_uses_lang,"yes") != 0) { -+ if (root_uses_lang && strcasecmp(root_uses_lang,"ctype") == 0) -+ variables[VARIABLE_LC_CTYPE]=variables[VARIABLE_LANG]; -+ else -+ free(variables[VARIABLE_LANG]); -+ -+ variables[VARIABLE_LANG]=strdup("POSIX"); -+ } - } - - #elif defined(TARGET_DEBIAN) || defined(TARGET_UBUNTU) || defined(TARGET_ANGSTROM) -@@ -247,5 +262,9 @@ finish: - for (i = 0; i < _VARIABLE_MAX; i++) - free(variables[i]); - -+#if defined(TARGET_SUSE) -+ free(root_uses_lang); -+#endif -+ - return r; - } diff --git a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch new file mode 100644 index 00000000..c47995b6 --- /dev/null +++ b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch @@ -0,0 +1,54 @@ +From: Frederic Crozat +Date: Tue, 4 Dec 2012 16:51:32 +0000 +Subject: handle root_uses_lang value in /etc/sysconfig/language + +handle ROOT_USES_LANG=ctype (bnc#792182). +--- + src/core/locale-setup.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c +index eefb256..d6cbea9 100644 +--- a/src/core/locale-setup.c ++++ b/src/core/locale-setup.c +@@ -70,6 +70,11 @@ static const char * const variable_names[_VARIABLE_MAX] = { + int locale_setup(void) { + char *variables[_VARIABLE_MAX]; + int r = 0, i; ++#ifdef HAVE_SYSV_COMPAT ++ char _cleanup_free_ *root_uses_lang; ++ ++ zero(root_uses_lang); ++#endif + + zero(variables); + +@@ -119,6 +124,28 @@ int locale_setup(void) { + log_warning("Failed to read /etc/locale.conf: %s", strerror(-r)); + } + ++#ifdef HAVE_SYSV_COMPAT ++ if (r <= 0 && ++ (r = parse_env_file("/etc/sysconfig/language", NEWLINE, ++ "ROOT_USES_LANG", &root_uses_lang, ++ "RC_LANG", &variables[VARIABLE_LANG], ++ NULL)) < 0) { ++ ++ if (r != -ENOENT) ++ log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); ++ } else { ++ if (!root_uses_lang || (root_uses_lang && !strcaseeq(root_uses_lang,"yes"))) { ++ if (root_uses_lang && strcaseeq(root_uses_lang,"ctype")) ++ variables[VARIABLE_LC_CTYPE]=variables[VARIABLE_LANG]; ++ else ++ free(variables[VARIABLE_LANG]); ++ ++ variables[VARIABLE_LANG]=strdup("POSIX"); ++ } ++ } ++ ++#endif ++ + if (!variables[VARIABLE_LANG]) { + variables[VARIABLE_LANG] = strdup("C"); + if (!variables[VARIABLE_LANG]) { diff --git a/highlight-ordering-cycle-deletions.patch b/highlight-ordering-cycle-deletions.patch deleted file mode 100644 index 296fdc61..00000000 --- a/highlight-ordering-cycle-deletions.patch +++ /dev/null @@ -1,32 +0,0 @@ -From f09a7d25545b5e3a2dd3dfc1ff7ebc8560a3354c Mon Sep 17 00:00:00 2001 -From: Olivier Brunel -Date: Mon, 5 Nov 2012 00:28:45 +0100 -Subject: [PATCH] systemd: highlight ordering cycle deletions - -Having unit(s) removed/not started, even if it solved the issue and allowed -to boot successfully, should still be considered an error, as something -clearly isn't right. - -This patch elevates the log message from warning to error, and adds a status -message to make things more obvious. ---- - src/core/transaction.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/core/transaction.c b/src/core/transaction.c -index 4bce942..ee6992a 100644 ---- a/src/core/transaction.c -+++ b/src/core/transaction.c -@@ -374,7 +374,8 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi - - - if (delete) { -- log_warning("Breaking ordering cycle by deleting job %s/%s", delete->unit->id, job_type_to_string(delete->type)); -+ log_error("Breaking ordering cycle by deleting job %s/%s", delete->unit->id, job_type_to_string(delete->type)); -+ status_printf(ANSI_HIGHLIGHT_RED_ON " SKIP " ANSI_HIGHLIGHT_OFF, true, "Ordering cycle found, skip %s", unit_description(delete->unit)); - transaction_delete_unit(tr, delete->unit); - return -EAGAIN; - } --- -1.7.10.4 - diff --git a/hostnamectl-fix-parsing-no-ask-password.patch b/hostnamectl-fix-parsing-no-ask-password.patch deleted file mode 100644 index ac629848..00000000 --- a/hostnamectl-fix-parsing-no-ask-password.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 59f432ea6d6d441d0af7c76c37e80730c8df473a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 15 Nov 2012 22:47:04 +0100 -Subject: [PATCH] hostnamectl: fix parsing of --no-ask-password - ---- - src/hostname/hostnamectl.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: systemd-195/src/hostname/hostnamectl.c -=================================================================== ---- systemd-195.orig/src/hostname/hostnamectl.c -+++ systemd-195/src/hostname/hostnamectl.c -@@ -402,6 +402,10 @@ static int parse_argv(int argc, char *ar - arg_set_static = true; - break; - -+ case ARG_NO_ASK_PASSWORD: -+ arg_ask_password = false; -+ break; -+ - case '?': - return -EINVAL; - diff --git a/hostnamectl-fix-set-hostname-with-no-argument.patch b/hostnamectl-fix-set-hostname-with-no-argument.patch deleted file mode 100644 index 15181308..00000000 --- a/hostnamectl-fix-set-hostname-with-no-argument.patch +++ /dev/null @@ -1,26 +0,0 @@ -From f36d7992ef9588e24feaae5bb3d103ca63af71bd Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Mon, 29 Oct 2012 20:54:26 +0100 -Subject: [PATCH] hostnamectl: do not choke on set-hostname with no argument - -https://bugzilla.redhat.com/show_bug.cgi?id=871172 ---- - src/hostname/hostnamectl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c -index 1d448bd..e7b2b49 100644 ---- a/src/hostname/hostnamectl.c -+++ b/src/hostname/hostnamectl.c -@@ -430,7 +430,7 @@ static int hostnamectl_main(DBusConnection *bus, int argc, char *argv[], DBusErr - int (* const dispatch)(DBusConnection *bus, char **args, unsigned n); - } verbs[] = { - { "status", LESS, 1, show_status }, -- { "set-hostname", LESS, 2, set_hostname }, -+ { "set-hostname", EQUAL, 2, set_hostname }, - { "set-icon-name", EQUAL, 2, set_icon_name }, - }; - --- -1.7.10.4 - diff --git a/improve-bash-completion.patch b/improve-bash-completion.patch deleted file mode 100644 index b3580f99..00000000 --- a/improve-bash-completion.patch +++ /dev/null @@ -1,173 +0,0 @@ -Index: systemd-195/bash-completion/systemd-bash-completion.sh -=================================================================== ---- systemd-195.orig/bash-completion/systemd-bash-completion.sh -+++ systemd-195/bash-completion/systemd-bash-completion.sh -@@ -114,15 +114,15 @@ _systemctl () { - [SNAPSHOTS]='delete' - [ENVS]='set-environment unset-environment' - [STANDALONE]='daemon-reexec daemon-reload default dot dump -- emergency exit halt kexec list-jobs list-units -- list-unit-files poweroff reboot rescue show-environment' -+ emergency exit halt hybrid-sleep hibernate kexec list-jobs list-units -+ list-unit-files poweroff reboot rescue show-environment suspend' - [NAME]='snapshot load' - [FILE]='link' - ) - - for ((i=0; $i <= $COMP_CWORD; i++)); do - if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && -- ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then -+ ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then - verb=${COMP_WORDS[i]} - break - fi -@@ -245,7 +245,7 @@ _loginctl () { - - for ((i=0; $i <= $COMP_CWORD; i++)); do - if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && -- ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG}]}; then -+ ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then - verb=${COMP_WORDS[i]} - break - fi -@@ -280,10 +280,21 @@ _loginctl () { - } - complete -F _loginctl loginctl - -+__journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC} -+ ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID} -+ _{P,U,G}ID _COMM _EXE _CMDLINE -+ _AUDIT_{SESSION,LOGINUID} -+ _SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID} -+ _SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP -+ _{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT -+ _KERNEL_{DEVICE,SUBSYSTEM} -+ _UDEV_{SYSNAME,DEVNODE,DEVLINK} -+ __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP) -+ - _journalctl() { - local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} - local -A OPTS=( -- [STANDALONE]='-a --all -b --this-boot -f --follow --header -+ [STANDALONE]='-a --all -b --this-boot --disk-usage -f --follow --header - -h --help -l --local --new-id128 -m --merge --no-pager - --no-tail -q --quiet --setup-keys --this-boot --verify - --version' -@@ -291,17 +302,6 @@ _journalctl() { - [ARGUNKNOWN]='-c --cursor --interval -n --lines -p --priority --since --until - --verify-key' - ) -- local journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC} -- ERRNO SYSLOG_{FACILITY,IDENTIFIER,PID} -- _{P,U,G}ID _COMM _EXE _CMDLINE -- _AUDIT_{SESSION,LOGINUID} -- _SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID} -- _SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP -- _{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT -- _KERNEL_{DEVICE,SUBSYSTEM} -- _UDEV_{SYSNAME,DEVNODE,DEVLINK} -- __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP) -- - - if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then - case $prev in -@@ -313,7 +313,7 @@ _journalctl() { - comps='short short-monotonic verbose export json cat' - ;; - --field|-F) -- comps=${journal_fields[*]} -+ comps=${__journal_fields[*]} - ;; - --unit|-u) - comps=$(journalctl -F '_SYSTEMD_UNIT') -@@ -337,7 +337,7 @@ _journalctl() { - COMPREPLY=( $(compgen -W '${field_vals[*]}' -- "$cur") ) - else - compopt -o nospace -- COMPREPLY=( $(compgen -W '${journal_fields[*]}' -S= -- "$cur") ) -+ COMPREPLY=( $(compgen -W '${__journal_fields[*]}' -S= -- "$cur") ) - fi - } - complete -F _journalctl journalctl -@@ -476,3 +476,81 @@ _hostnamectl() { - return 0 - } - complete -F _hostnamectl hostnamectl -+ -+__get_all_sysdevs() { -+ local -a devs=(/sys/bus/*/devices/*/ /sys/class/*/*/) -+ printf '%s\n' "${devs[@]%/}" -+} -+ -+_udevadm() { -+ local i verb comps -+ local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} -+ local OPTS='-h --help --version --debug' -+ -+ local -A VERBS=( -+ [INFO]='info' -+ [TRIGGER]='trigger' -+ [SETTLE]='settle' -+ [CONTROL]='control' -+ [MONITOR]='monitor' -+ [HWDB]='hwdb' -+ [TESTBUILTIN]='test-builtin' -+ [TEST]='test' -+ ) -+ -+ for ((i=0; $i <= $COMP_CWORD; i++)); do -+ if __contains_word "${COMP_WORDS[i]}" ${VERBS[*]} && -+ ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then -+ verb=${COMP_WORDS[i]} -+ break -+ fi -+ done -+ -+ if [[ -z $verb && $cur = -* ]]; then -+ COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) -+ return 0 -+ fi -+ -+ if [[ -z $verb ]]; then -+ comps=${VERBS[*]} -+ -+ elif __contains_word "$verb" ${VERBS[INFO]}; then -+ if [[ $cur = -* ]]; then -+ comps='--help --query= --path= --name= --root --attribute-walk --export-db --cleanup-db' -+ else -+ comps=$( __get_all_sysdevs ) -+ fi -+ -+ elif __contains_word "$verb" ${VERBS[TRIGGER]}; then -+ comps='--help --verbose --dry-run --type= --action= --subsystem-match= -+ --subsystem-nomatch= --attr-match= --attr-nomatch= --property-match= -+ --tag-match= --sysname-match= --parent-match=' -+ -+ elif __contains_word "$verb" ${VERBS[SETTLE]}; then -+ comps='--help --timeout= --seq-start= --seq-end= --exit-if-exists= --quiet' -+ -+ elif __contains_word "$verb" ${VERBS[CONTROL]}; then -+ comps='--help --exit --log-priority= --stop-exec-queue --start-exec-queue -+ --reload --property= --children-max= --timeout=' -+ -+ elif __contains_word "$verb" ${VERBS[MONITOR]}; then -+ comps='--help --kernel --udev --property --subsystem-match= --tag-match=' -+ -+ elif __contains_word "$verb" ${VERBS[HWDB]}; then -+ comps='--help --update --test=' -+ -+ elif __contains_word "$verb" ${VERBS[TEST]}; then -+ if [[ $cur = -* ]]; then -+ comps='--help --action=' -+ else -+ comps=$( __get_all_sysdevs ) -+ fi -+ -+ elif __contains_word "$verb" ${VERBS[TESTBUILTIN]}; then -+ comps='blkid btrfs firmware hwdb input_id kmod net_id path_id usb_id uaccess' -+ fi -+ -+ COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) -+ return 0 -+} -+complete -F _udevadm udevadm diff --git a/improve-journal-perf.patch b/improve-journal-perf.patch deleted file mode 100644 index 8f0eb8f7..00000000 --- a/improve-journal-perf.patch +++ /dev/null @@ -1,304 +0,0 @@ -From a4bcff5ba36115495994e9f9ba66074471de76ab Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 26 Oct 2012 03:24:03 +0200 -Subject: [PATCH] journal: introduce entry array chain cache - -When traversing entry array chains for a bisection or for retrieving an -item by index we previously always started at the beginning of the -chain. Since we tend to look at the same chains repeatedly, let's cache -where we have been the last time, and maybe we can skip ahead with this -the next time. - -This turns most bisections and index lookups from O(log(n)*log(n)) into -O(log(n)). More importantly however, we seek around on disk much less, -which is good to reduce buffer cache and seek times on rotational disks. ---- - .gitignore | 1 + - Makefile.am | 9 ++++ - src/journal/journal-file.c | 109 +++++++++++++++++++++++++++++++++++++--- - src/journal/journal-file.h | 3 ++ - src/journal/test-journal-enum.c | 53 +++++++++++++++++++ - src/shared/hashmap.c | 19 +++++++ - src/shared/hashmap.h | 3 ++ - 7 files changed, 189 insertions(+), 8 deletions(-) - create mode 100644 src/journal/test-journal-enum.c - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index edf8e7d..6c9deac 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -65,6 +65,9 @@ - /* n_data was the first entry we added after the initial file format design */ - #define HEADER_SIZE_MIN ALIGN64(offsetof(Header, n_data)) - -+/* How many entries to keep in the entry array chain cache at max */ -+#define CHAIN_CACHE_MAX 20 -+ - void journal_file_close(JournalFile *f) { - assert(f); - -@@ -97,6 +100,8 @@ void journal_file_close(JournalFile *f) { - if (f->mmap) - mmap_cache_unref(f->mmap); - -+ hashmap_free_free(f->chain_cache); -+ - #ifdef HAVE_XZ - free(f->compress_buffer); - #endif -@@ -1307,37 +1312,89 @@ int journal_file_append_entry(JournalFile *f, const dual_timestamp *ts, const st - return r; - } - -+typedef struct ChainCacheItem { -+ uint64_t first; /* the array at the begin of the chain */ -+ uint64_t array; /* the cached array */ -+ uint64_t begin; /* the first item in the cached array */ -+ uint64_t total; /* the total number of items in all arrays before this one in the chain */ -+} ChainCacheItem; -+ -+static void chain_cache_put( -+ Hashmap *h, -+ ChainCacheItem *ci, -+ uint64_t first, -+ uint64_t array, -+ uint64_t begin, -+ uint64_t total) { -+ -+ if (!ci) { -+ if (hashmap_size(h) >= CHAIN_CACHE_MAX) -+ ci = hashmap_steal_first(h); -+ else { -+ ci = new(ChainCacheItem, 1); -+ if (!ci) -+ return; -+ } -+ -+ ci->first = first; -+ -+ if (hashmap_put(h, &ci->first, ci) < 0) { -+ free(ci); -+ return; -+ } -+ } else -+ assert(ci->first == first); -+ -+ ci->array = array; -+ ci->begin = begin; -+ ci->total = total; -+} -+ - static int generic_array_get(JournalFile *f, - uint64_t first, - uint64_t i, - Object **ret, uint64_t *offset) { - - Object *o; -- uint64_t p = 0, a; -+ uint64_t p = 0, a, t = 0; - int r; -+ ChainCacheItem *ci; - - assert(f); - - a = first; -+ -+ /* Try the chain cache first */ -+ ci = hashmap_get(f->chain_cache, &first); -+ if (ci && i > ci->total) { -+ a = ci->array; -+ i -= ci->total; -+ t = ci->total; -+ } -+ - while (a > 0) { -- uint64_t n; -+ uint64_t k; - - r = journal_file_move_to_object(f, OBJECT_ENTRY_ARRAY, a, &o); - if (r < 0) - return r; - -- n = journal_file_entry_array_n_items(o); -- if (i < n) { -+ k = journal_file_entry_array_n_items(o); -+ if (i < k) { - p = le64toh(o->entry_array.items[i]); -- break; -+ goto found; - } - -- i -= n; -+ i -= k; -+ t += k; - a = le64toh(o->entry_array.next_entry_array_offset); - } - -- if (a <= 0 || p <= 0) -- return 0; -+ return 0; -+ -+found: -+ /* Let's cache this item for the next invocation */ -+ chain_cache_put(f->chain_cache, ci, first, a, o->entry_array.items[0], t); - - r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o); - if (r < 0) -@@ -1401,11 +1458,38 @@ static int generic_array_bisect(JournalFile *f, - bool subtract_one = false; - Object *o, *array = NULL; - int r; -+ ChainCacheItem *ci; - - assert(f); - assert(test_object); - -+ /* Start with the first array in the chain */ - a = first; -+ -+ ci = hashmap_get(f->chain_cache, &first); -+ if (ci && n > ci->total) { -+ /* Ah, we have iterated this bisection array chain -+ * previously! Let's see if we can skip ahead in the -+ * chain, as far as the last time. But we can't jump -+ * backwards in the chain, so let's check that -+ * first. */ -+ -+ r = test_object(f, ci->begin, needle); -+ if (r < 0) -+ return r; -+ -+ if (r == TEST_LEFT) { -+ /* OK, what we are looking for is right of th -+ * begin of this EntryArray, so let's jump -+ * straight to previously cached array in the -+ * chain */ -+ -+ a = ci->array; -+ n -= ci->total; -+ t = ci->total; -+ } -+ } -+ - while (a > 0) { - uint64_t left, right, k, lp; - -@@ -1486,6 +1570,9 @@ found: - if (subtract_one && t == 0 && i == 0) - return 0; - -+ /* Let's cache this item for the next invocation */ -+ chain_cache_put(f->chain_cache, ci, first, a, array->entry_array.items[0], t); -+ - if (subtract_one && i == 0) - p = last_p; - else if (subtract_one) -@@ -2265,6 +2352,12 @@ int journal_file_open( - goto fail; - } - -+ f->chain_cache = hashmap_new(uint64_hash_func, uint64_compare_func); -+ if (!f->chain_cache) { -+ r = -ENOMEM; -+ goto fail; -+ } -+ - f->fd = open(f->path, f->flags|O_CLOEXEC, f->mode); - if (f->fd < 0) { - r = -errno; -diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h -index d87cbe4..cdbc8e4 100644 ---- a/src/journal/journal-file.h -+++ b/src/journal/journal-file.h -@@ -33,6 +33,7 @@ - #include "journal-def.h" - #include "util.h" - #include "mmap-cache.h" -+#include "hashmap.h" - - typedef struct JournalMetrics { - uint64_t max_use; -@@ -64,6 +65,8 @@ typedef struct JournalFile { - JournalMetrics metrics; - MMapCache *mmap; - -+ Hashmap *chain_cache; -+ - #ifdef HAVE_XZ - void *compress_buffer; - uint64_t compress_buffer_size; -diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c -index ef78070..dcfbb67 100644 ---- a/src/shared/hashmap.c -+++ b/src/shared/hashmap.c -@@ -147,6 +147,25 @@ int trivial_compare_func(const void *a, const void *b) { - return a < b ? -1 : (a > b ? 1 : 0); - } - -+unsigned uint64_hash_func(const void *p) { -+ uint64_t u; -+ -+ assert_cc(sizeof(uint64_t) == 2*sizeof(unsigned)); -+ -+ u = *(const uint64_t*) p; -+ -+ return (unsigned) ((u >> 32) ^ u); -+} -+ -+int uint64_compare_func(const void *_a, const void *_b) { -+ uint64_t a, b; -+ -+ a = *(const uint64_t*) _a; -+ b = *(const uint64_t*) _b; -+ -+ return a < b ? -1 : (a > b ? 1 : 0); -+} -+ - Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { - bool b; - Hashmap *h; -diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h -index 55dea0a..6fd71cf 100644 ---- a/src/shared/hashmap.h -+++ b/src/shared/hashmap.h -@@ -44,6 +44,9 @@ int string_compare_func(const void *a, const void *b); - unsigned trivial_hash_func(const void *p); - int trivial_compare_func(const void *a, const void *b); - -+unsigned uint64_hash_func(const void *p); -+int uint64_compare_func(const void *a, const void *b); -+ - Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func); - void hashmap_free(Hashmap *h); - void hashmap_free_free(Hashmap *h); --- -1.8.1.1 - -From 34741aa3e2ee1e67a4cc735b7492aec13f0d822c Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 26 Oct 2012 20:25:36 +0200 -Subject: [PATCH] journal: special case the trivial cache chain cache entry - ---- - src/journal/journal-file.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index 6c9deac..3df099d 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -1328,6 +1328,11 @@ static void chain_cache_put( - uint64_t total) { - - if (!ci) { -+ /* If the chain item to cache for this chain is the -+ * first one it's not worth caching anything */ -+ if (array == first) -+ return; -+ - if (hashmap_size(h) >= CHAIN_CACHE_MAX) - ci = hashmap_steal_first(h); - else { --- -1.8.1.1 - diff --git a/improve-man-environment.patch b/improve-man-environment.patch deleted file mode 100644 index a5fa5967..00000000 --- a/improve-man-environment.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2cfd1ed4d853be4a22cc102037347c9041bf5ced Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Thu, 24 Jan 2013 17:55:42 +0100 -Subject: [PATCH] man: systemd.exec - explicit Environment assignment - -Be more verbose about using space in Environment field and not -using value of other variables - -Fixes https://bugzilla.redhat.com/show_bug.cgi?id=840260 ---- - man/systemd.exec.xml | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -Index: systemd-195/man/systemd.exec.xml -=================================================================== ---- systemd-195.orig/man/systemd.exec.xml -+++ systemd-195/man/systemd.exec.xml -@@ -269,9 +269,24 @@ - in which case all listed variables - will be set. If the same variable is - set twice the later setting will -- override the earlier setting. See -+ override the earlier setting. -+ Variable expansion is not performed -+ inside the strings, and $ has no special -+ meaning. -+ If you need to assign a value containing spaces -+ to a variable, use double quotes (") -+ for the assignment. -+ -+ Example: -+ Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6" -+ gives three variables VAR1, -+ VAR2, VAR3. -+ -+ -+ -+ See - environ7 -- for details. -+ for details about environment variables. - - - EnvironmentFile= diff --git a/improve-overflow-checks.patch b/improve-overflow-checks.patch deleted file mode 100644 index c4952082..00000000 --- a/improve-overflow-checks.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3dd8ee8fa693597663b0338235becbb0b7a9520c Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Thu, 25 Oct 2012 16:16:17 +0200 -Subject: [PATCH] util: fix possible integer overflows - ---- - src/shared/util.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -152,6 +152,9 @@ usec_t timespec_load(const struct timesp - ts->tv_nsec == (long) -1) - return (usec_t) -1; - -+ if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC) -+ return (usec_t) -1; -+ - return - (usec_t) ts->tv_sec * USEC_PER_SEC + - (usec_t) ts->tv_nsec / NSEC_PER_USEC; -@@ -179,6 +182,9 @@ usec_t timeval_load(const struct timeval - tv->tv_usec == (suseconds_t) -1) - return (usec_t) -1; - -+ if ((usec_t) tv->tv_sec > (UINT64_MAX - tv->tv_usec) / USEC_PER_SEC) -+ return (usec_t) -1; -+ - return - (usec_t) tv->tv_sec * USEC_PER_SEC + - (usec_t) tv->tv_usec; diff --git a/improve-readahead-spinning.patch b/improve-readahead-spinning.patch deleted file mode 100644 index 0040bed9..00000000 --- a/improve-readahead-spinning.patch +++ /dev/null @@ -1,221 +0,0 @@ -From 94243ef299425d6c7089a7a05c48c9bb8f6cf3da Mon Sep 17 00:00:00 2001 -From: Auke Kok -Date: Fri, 22 Mar 2013 15:09:45 -0700 -Subject: [PATCH 1/2] readahead: chunk on spinning media - -Readahead has all sorts of bad side effects depending on your -storage media. On rotating disks, it may be degrading startup -performance if enough requests are queued spanning linearly -over all blocks early at boot, and mount, blkid and friends -want to insert reads to the start of these block devices after. - -The end result is that on spinning disks with ext3/4 that udev -and mounts take a very long time, and nothing really happens until -readahead is completely finished. - -This has the net effect that the CPU is almost entirely idle -for the entire period that readahead is working. We could have -finished starting up quite a lot of services in this time if -we were smarter at how we do readahead. - -This patch sorts all requests into 2 second "chunks" and sub-sorts -each chunk by block. This adds a single cross-drive seek per "chunk" -but has the benefit that we will have a lot of the blocks we need -early on in the boot sequence loaded into memory faster. - -For a comparison of how before/after bootcharts look (ext4 on a -mobile 5400rpm 250GB drive) please look at: - - http://foo-projects.org/~sofar/blocked-tests/ - -There are bootcharts in the "before" and "after" folders where you -should be able to see that many low-level services finish 5-7 -seconds earlier with the patch applied (after). ---- - Makefile.am | 2 +- - src/readahead/readahead-collect.c | 28 +++++++++++++++++++++++++--- - 2 files changed, 26 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 37c1cc2..5861976 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \ - systemd_readahead_LDADD = \ - libsystemd-shared.la \ - libsystemd-daemon.la \ -- libudev.la -+ libudev.la -lm - - dist_doc_DATA += \ - src/readahead/sd-readahead.c \ -diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c -index 5d07f47..5d22949 100644 ---- a/src/readahead/readahead-collect.c -+++ b/src/readahead/readahead-collect.c -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - - #ifdef HAVE_FANOTIFY_INIT - #include -@@ -67,6 +68,7 @@ - */ - - static ReadaheadShared *shared = NULL; -+static struct timespec starttime; - - /* Avoid collisions with the NULL pointer */ - #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1) -@@ -205,6 +207,7 @@ static unsigned long fd_first_block(int fd) { - struct item { - const char *path; - unsigned long block; -+ unsigned long bin; - }; - - static int qsort_compare(const void *a, const void *b) { -@@ -213,6 +216,13 @@ static int qsort_compare(const void *a, const void *b) { - i = a; - j = b; - -+ /* sort by bin first */ -+ if (i->bin < j->bin) -+ return -1; -+ if (i->bin > j->bin) -+ return 1; -+ -+ /* then sort by sector */ - if (i->block < j->block) - return -1; - if (i->block > j->block) -@@ -250,6 +260,8 @@ static int collect(const char *root) { - goto finish; - } - -+ clock_gettime(CLOCK_MONOTONIC, &starttime); -+ - /* If there's no pack file yet we lower the kernel readahead - * so that mincore() is accurate. If there is a pack file - * already we assume it is accurate enough so that kernel -@@ -447,10 +459,21 @@ static int collect(const char *root) { - free(p); - else { - unsigned long ul; -+ struct timespec ts; -+ struct item *entry; -+ -+ entry = new0(struct item, 1); - - ul = fd_first_block(m->fd); - -- if ((k = hashmap_put(files, p, SECTOR_TO_PTR(ul))) < 0) { -+ clock_gettime(CLOCK_MONOTONIC, &ts); -+ -+ entry->block = ul; -+ entry->path = strdup(p); -+ entry->bin = round((ts.tv_sec - starttime.tv_sec + -+ ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0); -+ -+ if ((k = hashmap_put(files, p, entry)) < 0) { - log_warning("set_put() failed: %s", strerror(-k)); - free(p); - } -@@ -518,8 +541,7 @@ done: - - j = ordered; - HASHMAP_FOREACH_KEY(q, p, files, i) { -- j->path = p; -- j->block = PTR_TO_SECTOR(q); -+ memcpy(j, q, sizeof(struct item)); - j++; - } - --- -1.8.1.4 - - -From b0640287f784a320661f7206c9ade07b99003fd5 Mon Sep 17 00:00:00 2001 -From: Auke Kok -Date: Tue, 26 Mar 2013 11:13:47 -0700 -Subject: [PATCH 2/2] readahead: cleanups - -- check for OOM -- no need to use floats and round() ---- - Makefile.am | 2 +- - src/readahead/readahead-collect.c | 20 ++++++++++++++------ - 2 files changed, 15 insertions(+), 7 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 5861976..37c1cc2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2956,7 +2956,7 @@ systemd_readahead_SOURCES = \ - systemd_readahead_LDADD = \ - libsystemd-shared.la \ - libsystemd-daemon.la \ -- libudev.la -lm -+ libudev.la - - dist_doc_DATA += \ - src/readahead/sd-readahead.c \ -diff --git a/src/readahead/readahead-collect.c b/src/readahead/readahead-collect.c -index 5d22949..e2fd8df 100644 ---- a/src/readahead/readahead-collect.c -+++ b/src/readahead/readahead-collect.c -@@ -68,7 +68,7 @@ - */ - - static ReadaheadShared *shared = NULL; --static struct timespec starttime; -+static usec_t starttime; - - /* Avoid collisions with the NULL pointer */ - #define SECTOR_TO_PTR(s) ULONG_TO_PTR((s)+1) -@@ -260,7 +260,7 @@ static int collect(const char *root) { - goto finish; - } - -- clock_gettime(CLOCK_MONOTONIC, &starttime); -+ starttime = now(CLOCK_MONOTONIC); - - /* If there's no pack file yet we lower the kernel readahead - * so that mincore() is accurate. If there is a pack file -@@ -459,19 +459,27 @@ static int collect(const char *root) { - free(p); - else { - unsigned long ul; -- struct timespec ts; -+ usec_t entrytime; - struct item *entry; - - entry = new0(struct item, 1); -+ if (!entry) { -+ r = log_oom(); -+ goto finish; -+ } - - ul = fd_first_block(m->fd); - -- clock_gettime(CLOCK_MONOTONIC, &ts); -+ entrytime = now(CLOCK_MONOTONIC); - - entry->block = ul; - entry->path = strdup(p); -- entry->bin = round((ts.tv_sec - starttime.tv_sec + -- ((ts.tv_nsec - starttime.tv_nsec) / 1000000000.0)) / 2.0); -+ if (!entry->path) { -+ free(entry); -+ r = log_oom(); -+ goto finish; -+ } -+ entry->bin = (entrytime - starttime) / 2000000; - - if ((k = hashmap_put(files, p, entry)) < 0) { - log_warning("set_put() failed: %s", strerror(-k)); --- -1.8.1.4 - diff --git a/job-avoid-recursion-when-cancelling.patch b/job-avoid-recursion-when-cancelling.patch deleted file mode 100644 index a87dff39..00000000 --- a/job-avoid-recursion-when-cancelling.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 1abc85b8d026a2d72442b0edaee5213d0ee73c1f Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Thu, 25 Oct 2012 02:31:49 +0200 -Subject: [PATCH] job: avoid recursion into transaction code from job - cancelation - -I hit an "assert(j->installed)" failure in transaction_apply(). Looking -into the backtrace I saw what happened: -1. The system was booting. var.mount/start was an installed job. -2. I pressed Ctrl+Alt+Del. -3. reboot.target was going to be isolated. -4. transaction_apply() proceeded to install a var.mount/stop job. -5. job_install() canceled the conflicting start job. -6. Depending jobs ended recursively with JOB_DEPENDENCY, among them was - local-fs.target/start. -7. Its OnFailure action triggered - emergency.target was now going to be - isolated. -8. We recursed back into transaction_apply() where the half-installed - var.mount/stop job confused us. - -Recursing from job installation back into the transaction code cannot be -a good idea. Avoid the problem by canceling the conflicting job -non-recursively in job_install(). I don't think we'll miss anything by -not recursing here. After all, we are called from transaction_apply(). -We will not be installing just this one job, but all jobs from a -transaction. All requirement dependencies will be included in it and -will be installed separately. Every transaction job will get a chance -to cancel its own conflicting installed job. ---- - src/core/job.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/job.c b/src/core/job.c -index cb5674b..f08b8cb 100644 ---- a/src/core/job.c -+++ b/src/core/job.c -@@ -180,7 +180,7 @@ Job* job_install(Job *j) { - - if (uj) { - if (j->type != JOB_NOP && job_type_is_conflicting(uj->type, j->type)) -- job_finish_and_invalidate(uj, JOB_CANCELED, true); -+ job_finish_and_invalidate(uj, JOB_CANCELED, false); - else { - /* not conflicting, i.e. mergeable */ - --- -1.7.10.4 - diff --git a/journal-fix-cutoff-max-date.patch b/journal-fix-cutoff-max-date.patch deleted file mode 100644 index c939a61e..00000000 --- a/journal-fix-cutoff-max-date.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0f91dd8749c1a1ec308cc645269be92166413e38 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 26 Oct 2012 01:07:41 +0200 -Subject: [PATCH] journal: properly determine cutoff max date - ---- - src/journal/sd-journal.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c -index 09b0eb8..d5d2d78 100644 ---- a/src/journal/sd-journal.c -+++ b/src/journal/sd-journal.c -@@ -2121,7 +2121,7 @@ _public_ int sd_journal_get_cutoff_realtime_usec(sd_journal *j, uint64_t *from, - if (from) - *from = MIN(fr, *from); - if (to) -- *to = MIN(t, *to); -+ *to = MAX(t, *to); - } - } - -@@ -2160,7 +2160,7 @@ _public_ int sd_journal_get_cutoff_monotonic_usec(sd_journal *j, sd_id128_t boot - if (from) - *from = MIN(fr, *from); - if (to) -- *to = MIN(t, *to); -+ *to = MAX(t, *to); - } - } - --- -1.7.10.4 - diff --git a/journal-send-always-send-syslog_identifier.patch b/journal-send-always-send-syslog_identifier.patch deleted file mode 100644 index 37af56fd..00000000 --- a/journal-send-always-send-syslog_identifier.patch +++ /dev/null @@ -1,62 +0,0 @@ -From ee55db41442ad8055f5a84a339b1e0e22bc037c4 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 20 Nov 2012 21:25:26 +0100 -Subject: [PATCH] journal-send: always send SYSLOG_IDENTIFIER, if we have it - -https://bugzilla.redhat.com/show_bug.cgi?id=872193 ---- - src/journal/journal-send.c | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) - -Index: systemd-195/src/journal/journal-send.c -=================================================================== ---- systemd-195.orig/src/journal/journal-send.c -+++ systemd-195/src/journal/journal-send.c -@@ -208,6 +208,7 @@ _public_ int sd_journal_sendv(const stru - * be a tmpfs, and one that is available from early boot on - * and where unprivileged users can create files. */ - char path[] = "/dev/shm/journal.XXXXXX"; -+ bool have_syslog_identifier = false; - - if (_unlikely_(!iov)) - return -EINVAL; -@@ -217,7 +218,7 @@ _public_ int sd_journal_sendv(const stru - - saved_errno = errno; - -- w = alloca(sizeof(struct iovec) * n * 5); -+ w = alloca(sizeof(struct iovec) * n * 5 + 3); - l = alloca(sizeof(uint64_t) * n); - - for (i = 0; i < n; i++) { -@@ -234,6 +235,9 @@ _public_ int sd_journal_sendv(const stru - goto finish; - } - -+ have_syslog_identifier = -+ have_syslog_identifier || (c == iov[i].iov_base + 17 && memcmp(iov[i].iov_base, "SYSLOG_IDENTIFIER", 17) == 0); -+ - nl = memchr(iov[i].iov_base, '\n', iov[i].iov_len); - if (nl) { - if (_unlikely_(nl < c)) { -@@ -269,6 +273,20 @@ _public_ int sd_journal_sendv(const stru - IOVEC_SET_STRING(w[j++], "\n"); - } - -+ if (!have_syslog_identifier && -+ string_is_safe(program_invocation_short_name)) { -+ -+ /* Implicitly add program_invocation_short_name, if it -+ * is not set explicitly. We only do this for -+ * program_invocation_short_name, and nothing else -+ * since everything else is much nicer to retrieve -+ * from the outside. */ -+ -+ IOVEC_SET_STRING(w[j++], "SYSLOG_IDENTIFIER="); -+ IOVEC_SET_STRING(w[j++], program_invocation_short_name); -+ IOVEC_SET_STRING(w[j++], "\n"); -+ } -+ - fd = journal_fd(); - if (_unlikely_(fd < 0)) { - r = fd; diff --git a/journalctl-quit-on-io-error.patch b/journalctl-quit-on-io-error.patch deleted file mode 100644 index 56d2dd18..00000000 --- a/journalctl-quit-on-io-error.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 244692cbfb46df5ff79d07da8fb848a1165bd2fb Mon Sep 17 00:00:00 2001 -From: David Herrmann -Date: Sun, 13 Jan 2013 12:28:38 +0100 -Subject: [PATCH] journalctl: quit on I/O error - -This makes journalctl quit on ferror() conditions on stdout. It fixes an -annoying bug if you pipe its output through 'less' and press 'q'. Without -this fix journalctl will continue reading all journal data until EOF which -can take quite some time. For instance on my machine: - - david-nb ~ # time journalctl | wc -l - 327240 - - real 1m13.039s - user 1m0.217s - sys 0m10.467s - -However, expected behavior is journalctl to quit when its pager closed the -output pipe. - -Signed-off-by: David Herrmann ---- - src/journal/journalctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/journal/journalctl.c -=================================================================== ---- systemd-195.orig/src/journal/journalctl.c -+++ systemd-195/src/journal/journalctl.c -@@ -1035,7 +1035,7 @@ int main(int argc, char *argv[]) { - on_tty() * OUTPUT_COLOR; - - r = output_journal(stdout, j, arg_output, 0, flags); -- if (r < 0) -+ if (r < 0 || ferror(stdout)) - goto finish; - - need_seek = true; diff --git a/journalctl-remove-leftover-message.patch b/journalctl-remove-leftover-message.patch deleted file mode 100644 index 5ba122fa..00000000 --- a/journalctl-remove-leftover-message.patch +++ /dev/null @@ -1,25 +0,0 @@ -From db87a36e74ff26d1046a451ee086c9a2c4113d12 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 24 Oct 2012 01:05:55 +0200 -Subject: [PATCH] journalctl: remove left-over log message - ---- - src/journal/journalctl.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c -index d1338d2..0f20448 100644 ---- a/src/journal/journalctl.c -+++ b/src/journal/journalctl.c -@@ -547,8 +547,6 @@ static int add_priorities(sd_journal *j) { - if (arg_priorities & (1 << i)) { - match[sizeof(match)-2] = '0' + i; - -- log_info("adding match %s", match); -- - r = sd_journal_add_match(j, match, strlen(match)); - if (r < 0) { - log_error("Failed to add match: %s", strerror(-r)); --- -1.7.10.4 - diff --git a/journalctl-require-argument-for-priority b/journalctl-require-argument-for-priority deleted file mode 100644 index 871ac96e..00000000 --- a/journalctl-require-argument-for-priority +++ /dev/null @@ -1,24 +0,0 @@ -From 71c015969233c21ea38b1e63993d02fe171df672 Mon Sep 17 00:00:00 2001 -From: Lekensteyn -Date: Thu, 15 Nov 2012 12:17:03 +0100 -Subject: [PATCH] journalctl: require argument for --priority - -This fixes a segfault due to a missing value for --priority. -p is -unaffected because it is specified in the getopt_long parameter list. ---- - src/journal/journalctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/journal/journalctl.c -=================================================================== ---- systemd-195.orig/src/journal/journalctl.c -+++ systemd-195/src/journal/journalctl.c -@@ -158,7 +158,7 @@ static int parse_argv(int argc, char *ar - { "this-boot", no_argument, NULL, 'b' }, - { "directory", required_argument, NULL, 'D' }, - { "header", no_argument, NULL, ARG_HEADER }, -- { "priority", no_argument, NULL, 'p' }, -+ { "priority", required_argument, NULL, 'p' }, - { "setup-keys", no_argument, NULL, ARG_SETUP_KEYS }, - { "interval", required_argument, NULL, ARG_INTERVAL }, - { "verify", no_argument, NULL, ARG_VERIFY }, diff --git a/localectl-fix-assertion.patch b/localectl-fix-assertion.patch deleted file mode 100644 index 6b1dac55..00000000 --- a/localectl-fix-assertion.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 6b2b6f30e38d67b032d6bdc6b47ae05e143e96c5 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Wed, 12 Dec 2012 22:24:04 +0100 -Subject: [PATCH] localectl: fix dbus call arguments in set_x11_keymap - -Fixes an assertion failure in the dbus lib. -https://bugzilla.redhat.com/show_bug.cgi?id=882212 ---- - src/locale/localectl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/locale/localectl.c -=================================================================== ---- systemd-195.orig/src/locale/localectl.c -+++ systemd-195/src/locale/localectl.c -@@ -535,7 +535,7 @@ static int set_x11_keymap(DBusConnection - layout = args[1]; - model = n > 2 ? args[2] : ""; - variant = n > 3 ? args[3] : ""; -- options = n > 3 ? args[4] : ""; -+ options = n > 4 ? args[4] : ""; - b = arg_convert; - - return bus_method_call_with_reply( diff --git a/localectl-support-systems-without-locale-archive.patch b/localectl-support-systems-without-locale-archive.patch deleted file mode 100644 index fffba30d..00000000 --- a/localectl-support-systems-without-locale-archive.patch +++ /dev/null @@ -1,160 +0,0 @@ -From 17d33cecaa762f7e43200307328af5e9135e2091 Mon Sep 17 00:00:00 2001 -From: Giovanni Campagna -Date: Sat, 5 Jan 2013 01:29:53 +0100 -Subject: [PATCH] localectl: support systems without locale-archive - -Not all systems ships with locales inside /usr/lib/locale-archive, some -prefer to have locale data as individual subdirectories of /usr/lib/locale. -(A notable example of this is OpenEmbeddded, and OSes deriving from it -like gnome-ostree). -Given that glibc supports both ways, localectl should too. ---- - src/locale/localectl.c | 101 ++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 85 insertions(+), 16 deletions(-) - -Index: systemd-195/src/locale/localectl.c -=================================================================== ---- systemd-195.orig/src/locale/localectl.c -+++ systemd-195/src/locale/localectl.c -@@ -265,7 +265,7 @@ finish: - return r; - } - --static int list_locales(DBusConnection *bus, char **args, unsigned n) { -+static int add_locales_from_archive(Set *locales) { - /* Stolen from glibc... */ - - struct locarhead { -@@ -303,21 +303,15 @@ static int list_locales(DBusConnection * - const struct namehashent *e; - const void *p = MAP_FAILED; - _cleanup_close_ int fd = -1; -- _cleanup_strv_free_ char **l = NULL; -- char **j; -- Set *locales; - size_t sz = 0; - struct stat st; - unsigned i; - int r; - -- locales = set_new(string_hash_func, string_compare_func); -- if (!locales) -- return log_oom(); -- - fd = open("/usr/lib/locale/locale-archive", O_RDONLY|O_NOCTTY|O_CLOEXEC); - if (fd < 0) { -- log_error("Failed to open locale archive: %m"); -+ if (errno != ENOENT) -+ log_error("Failed to open locale archive: %m"); - r = -errno; - goto finish; - } -@@ -378,15 +372,93 @@ static int list_locales(DBusConnection * - } - } - -+ r = 0; -+ -+ finish: -+ if (p != MAP_FAILED) -+ munmap((void*) p, sz); -+ -+ return r; -+} -+ -+static int add_locales_from_libdir (Set *locales) { -+ DIR *dir; -+ struct dirent *entry; -+ int r; -+ -+ dir = opendir("/usr/lib/locale"); -+ if (!dir) { -+ log_error("Failed to open locale directory: %m"); -+ r = -errno; -+ goto finish; -+ } -+ -+ errno = 0; -+ while ((entry = readdir(dir))) { -+ char *z; -+ -+ if (entry->d_type != DT_DIR) -+ continue; -+ -+ if (ignore_file(entry->d_name)) -+ continue; -+ -+ z = strdup(entry->d_name); -+ if (!z) { -+ r = log_oom(); -+ goto finish; -+ } -+ -+ r = set_put(locales, z); -+ if (r < 0) { -+ free(z); -+ -+ if (r != -EEXIST) { -+ log_error("Failed to add locale: %s", strerror(-r)); -+ goto finish; -+ } -+ } -+ -+ errno = 0; -+ } -+ -+ if (errno != 0) { -+ log_error("Failed to read locale directory: %m"); -+ r = -errno; -+ goto finish; -+ } -+ -+ r = 0; -+ -+ finish: -+ closedir(dir); -+ return r; -+} -+ -+static int list_locales(DBusConnection *bus, char **args, unsigned n) { -+ Set *locales; -+ _cleanup_strv_free_ char **l = NULL; -+ char **j; -+ int r; -+ -+ locales = set_new(string_hash_func, string_compare_func); -+ if (!locales) -+ return log_oom(); -+ -+ r = add_locales_from_archive(locales); -+ if (r < 0 && r != -ENOENT) -+ goto finish; -+ -+ r = add_locales_from_libdir(locales); -+ if (r < 0) -+ goto finish; -+ - l = set_get_strv(locales); - if (!l) { - r = log_oom(); - goto finish; - } - -- set_free(locales); -- locales = NULL; -- - strv_sort(l); - - pager_open_if_enabled(); -@@ -397,10 +469,7 @@ static int list_locales(DBusConnection * - r = 0; - - finish: -- if (p != MAP_FAILED) -- munmap((void*) p, sz); -- -- set_free_free(locales); -+ set_free(locales); - - return r; - } diff --git a/lock-opensuse.patch b/lock-opensuse.patch deleted file mode 100644 index 0fa59df5..00000000 --- a/lock-opensuse.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: systemd-37/tmpfiles.d/legacy.conf -=================================================================== ---- systemd-37.orig/tmpfiles.d/legacy.conf -+++ systemd-37/tmpfiles.d/legacy.conf -@@ -17,6 +17,8 @@ - # On modern systems a BSD file lock is a better choice if - # serialization is needed on those devices. - --d /run/lock 0755 root root - --d /run/lock/subsys 0755 root root - --d /run/lock/lockdev 0775 root lock - -+# changed for openSUSE : only /run/lock should be available -+ -+d /run/lock 0775 root lock - -+#d /run/lock/subsys 0755 root root - -+#d /run/lock/lockdev 0775 root lock - diff --git a/logind-capability-making-seats-without-fb.patch b/logind-capability-making-seats-without-fb.patch deleted file mode 100644 index a74de2a5..00000000 --- a/logind-capability-making-seats-without-fb.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 955f9bde9ba6d9f0a7364d5cb7c0cee951d5caab Mon Sep 17 00:00:00 2001 -From: Oleg Samarin -Date: Sat, 5 Jan 2013 20:33:37 +0400 -Subject: [PATCH] logind: Capability of making seats without framebuffer - devices - -file logind.c: The seat is now activated by any device with udev tag "seat-master" -file 71-seat.rules.in: All framebuffer devices have this tag ---- - src/login/71-seat.rules.in | 2 +- - src/login/logind.c | 12 ++---------- - 2 files changed, 3 insertions(+), 11 deletions(-) - -Index: systemd-195/src/login/71-seat.rules.in -=================================================================== ---- systemd-195.orig/src/login/71-seat.rules.in -+++ systemd-195/src/login/71-seat.rules.in -@@ -10,7 +10,7 @@ ACTION=="remove", GOTO="seat_end" - TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat" - SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat" - SUBSYSTEM=="input", KERNEL=="input*", TAG+="seat" --SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat" -+SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat", TAG+="seat-master" - SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat" - - # 'Plugable' USB hub, sound, network, graphics adapter -Index: systemd-195/src/login/logind.c -=================================================================== ---- systemd-195.orig/src/login/logind.c -+++ systemd-195/src/login/logind.c -@@ -450,11 +450,7 @@ int manager_enumerate_devices(Manager *m - goto finish; - } - -- r = udev_enumerate_add_match_subsystem(e, "graphics"); -- if (r < 0) -- goto finish; -- -- r = udev_enumerate_add_match_tag(e, "seat"); -+ r = udev_enumerate_add_match_tag(e, "seat-master"); - if (r < 0) - goto finish; - -@@ -1286,11 +1282,7 @@ static int manager_connect_udev(Manager - if (!m->udev_seat_monitor) - return -ENOMEM; - -- r = udev_monitor_filter_add_match_tag(m->udev_seat_monitor, "seat"); -- if (r < 0) -- return r; -- -- r = udev_monitor_filter_add_match_subsystem_devtype(m->udev_seat_monitor, "graphics", NULL); -+ r = udev_monitor_filter_add_match_tag(m->udev_seat_monitor, "seat-master"); - if (r < 0) - return r; - diff --git a/logind-ignore-non-tty-non-x11-session-on-shutdown.patch b/logind-ignore-non-tty-non-x11-session-on-shutdown.patch deleted file mode 100644 index 116d101a..00000000 --- a/logind-ignore-non-tty-non-x11-session-on-shutdown.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1ca04b87979b2add53ebb8a7fdf13c34fb6c2743 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 14 Jan 2013 21:40:38 +0100 -Subject: [PATCH] logind: ignore non-tty/non-x11 session when checking if - there are other sessions before shutting down - -https://bugzilla.redhat.com/show_bug.cgi?id=890827 ---- - src/login/logind-dbus.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -Index: systemd-195/src/login/logind-dbus.c -=================================================================== ---- systemd-195.orig/src/login/logind-dbus.c -+++ systemd-195/src/login/logind-dbus.c -@@ -971,9 +971,12 @@ static int have_multiple_sessions( - - assert(m); - -- /* Check for other users' sessions. Greeter sessions do not count. */ -+ /* Check for other users' sessions. Greeter sessions do not -+ * count, and non-login sessions do not count either. */ - HASHMAP_FOREACH(session, m->sessions, i) -- if (session->class == SESSION_USER && session->user->uid != uid) -+ if (session->class == SESSION_USER && -+ (session->type == SESSION_TTY || session->type == SESSION_X11) && -+ session->user->uid != uid) - return true; - - return false; diff --git a/logind-nvidia-acl.diff b/logind-nvidia-acl.diff deleted file mode 100644 index 109ab60b..00000000 --- a/logind-nvidia-acl.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: systemd-195/src/login/logind-acl.c -=================================================================== ---- systemd-195.orig/src/login/logind-acl.c -+++ systemd-195/src/login/logind-acl.c -@@ -240,6 +240,9 @@ int devnode_acl_all(struct udev *udev, - goto finish; - } - -+ devnode_acl("/dev/nvidia0", flush, del, old_uid, add, new_uid); -+ devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid); -+ - finish: - if (e) - udev_enumerate_unref(e); diff --git a/macros.systemd b/macros.systemd index 68ff8780..dc70ceb7 100644 --- a/macros.systemd +++ b/macros.systemd @@ -1,3 +1,4 @@ +# -*- Mode: makefile; indent-tabs-mode: t -*- */ # RPM macros for packages installing systemd unit files # ### @@ -28,6 +29,12 @@ Requires(preun): systemd \ Requires(postun): systemd \ %_unitdir /usr/lib/systemd/system +%_presetdir /usr/lib/systemd/system-preset +%_udevhwdbdir /usr/lib/udev/hwdb.d +%_udevrulesdir /usr/lib/udev/rules.d +%_journalcatalogdir /usr/lib/systemd/catalog +%_tmpfilesdir /usr/lib/tmpfiles.d +%_sysctldir /usr/lib/sysctl.d %service_add_pre() \ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ @@ -95,3 +102,14 @@ else # package uninstall \ fi \ %{nil} +%udev_hwdb_update() \ +/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : \ +%{nil} + +%udev_rules_update() \ +/usr/bin/udevadm control --reload >/dev/null 2>&1 || : \ +%{nil} + +%journal_catalog_update() \ +/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : \ +%{nil} diff --git a/modules_on_boot.patch b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch similarity index 56% rename from modules_on_boot.patch rename to module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch index 8257954e..5bf2ad62 100644 --- a/modules_on_boot.patch +++ b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch @@ -1,32 +1,32 @@ -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 +Subject: module-load: handle SUSE /etc/sysconfig/kernel module list --- - src/modules-load.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 42 insertions(+), 0 deletions(-) + src/modules-load/modules-load.c | 27 ++++++++++++++++++++++++++- + units/systemd-modules-load.service.in | 1 + + 2 files changed, 27 insertions(+), 1 deletion(-) -Index: systemd-191/src/modules-load/modules-load.c -=================================================================== ---- systemd-191.orig/src/modules-load/modules-load.c -+++ systemd-191/src/modules-load/modules-load.c -@@ -173,6 +173,9 @@ int main(int argc, char *argv[]) { - int r = EXIT_FAILURE, k; - char **files = NULL, **fn, **i; +diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c +index 9ee2603..2b5b571 100644 +--- a/src/modules-load/modules-load.c ++++ b/src/modules-load/modules-load.c +@@ -262,6 +262,9 @@ static int parse_argv(int argc, char *argv[]) { + int main(int argc, char *argv[]) { + int r, k; struct kmod_ctx *ctx; -+#if defined(TARGET_SUSE) -+ char *modules_on_boot = NULL; ++#ifdef HAVE_SYSV_COMPAT ++ _cleanup_free_ char *modules_on_boot = NULL; +#endif - if (argc > 1) { - log_error("This program takes no argument."); -@@ -256,9 +259,34 @@ int main(int argc, char *argv[]) { - - fclose(f); + r = parse_argv(argc, argv); + if (r <= 0) +@@ -318,7 +321,29 @@ int main(int argc, char *argv[]) { + r = k; + } } - -+#if defined(TARGET_SUSE) ++#ifdef HAVE_SYSV_COMPAT + log_debug("apply: /etc/sysconfig/kernel MODULES_LOADED_ON_BOOT"); + if ((r = parse_env_file("/etc/sysconfig/kernel", NEWLINE, + "MODULES_LOADED_ON_BOOT", &modules_on_boot, @@ -50,17 +50,12 @@ Index: systemd-191/src/modules-load/modules-load.c + } +#endif finish: - strv_free(files); -+#if defined(TARGET_SUSE) -+ free(modules_on_boot); -+#endif kmod_unref(ctx); strv_free(arg_proc_cmdline_modules); - -Index: systemd-191/units/systemd-modules-load.service.in -=================================================================== ---- systemd-191.orig/units/systemd-modules-load.service.in -+++ systemd-191/units/systemd-modules-load.service.in +diff --git a/units/systemd-modules-load.service.in b/units/systemd-modules-load.service.in +index 32deb52..2e26d2f 100644 +--- a/units/systemd-modules-load.service.in ++++ b/units/systemd-modules-load.service.in @@ -13,6 +13,7 @@ Conflicts=shutdown.target After=systemd-readahead-collect.service systemd-readahead-replay.service Before=sysinit.target shutdown.target diff --git a/mount-efivars.patch b/mount-efivars.patch deleted file mode 100644 index 23cb3a8c..00000000 --- a/mount-efivars.patch +++ /dev/null @@ -1,233 +0,0 @@ -From f271dd97622b656c1c013d181ea615c671cc2438 Mon Sep 17 00:00:00 2001 -From: "Lee, Chun-Yi" -Date: Sat, 27 Oct 2012 11:23:22 +0800 -Subject: [PATCH] systemd: mount the EFI variable filesystem -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add efivarfs to the mount_table in mount-setup.c, so the EFI variable -filesystem will be mounted when systemd executed. - -The EFI variable filesystem will merge in v3.7 or v3.8 linux kernel. - -Cc: Kay Sievers -Cc: Lennart Poettering -Cc: Mantas Mikulėnas -Cc: Zbigniew Jędrzejewski-Szmek -Cc: Matt Fleming -Cc: Jeremy Kerr -Cc: Matthew Garrett -Signed-off-by: Lee, Chun-Yi ---- - src/core/kmod-setup.c | 7 ++++--- - src/core/mount-setup.c | 1 + - 2 files changed, 5 insertions(+), 3 deletions(-) - -Index: systemd-195/src/core/kmod-setup.c -=================================================================== ---- systemd-195.orig/src/core/kmod-setup.c -+++ systemd-195/src/core/kmod-setup.c -@@ -30,10 +30,16 @@ - - #include "kmod-setup.h" - --static const char * const kmod_table[] = { -- "autofs4", "/sys/class/misc/autofs", -- "ipv6", "/sys/module/ipv6", -- "unix", "/proc/net/unix" -+typedef struct Kmodule { -+ const char *name; -+ const char *directory; -+ bool (*condition_fn)(void); -+} KModule; -+ -+static const KModule kmod_table[] = { -+ { "autofs4", "/sys/class/misc/autofs", NULL } , -+ { "ipv6", "/sys/module/ipv6", NULL }, -+ { "unix", "/proc/net/unix", NULL } , - }; - - #pragma GCC diagnostic push -@@ -41,7 +47,8 @@ static const char * const kmod_table[] = - static void systemd_kmod_log(void *data, int priority, const char *file, int line, - const char *fn, const char *format, va_list args) - { -- log_metav(priority, file, line, fn, format, args); -+ /* library logging is enabled at debug only */ -+ log_metav(LOG_DEBUG, file, line, fn, format, args); - } - #pragma GCC diagnostic pop - -@@ -52,13 +59,15 @@ int kmod_setup(void) { - int err; - - for (i = 0; i < ELEMENTSOF(kmod_table); i += 2) { -+ if (kmod_table[i].condition_fn && !kmod_table[i].condition_fn()) -+ continue; - -- if (access(kmod_table[i+1], F_OK) >= 0) -+ if (access(kmod_table[i].directory, F_OK) >= 0) - continue; - - log_debug("Your kernel apparently lacks built-in %s support. Might be a good idea to compile it in. " - "We'll now try to work around this by loading the module...", -- kmod_table[i]); -+ kmod_table[i].name); - - if (!ctx) { - ctx = kmod_new(NULL, NULL); -@@ -68,13 +77,12 @@ int kmod_setup(void) { - } - - kmod_set_log_fn(ctx, systemd_kmod_log, NULL); -- - kmod_load_resources(ctx); - } - -- err = kmod_module_new_from_name(ctx, kmod_table[i], &mod); -+ err = kmod_module_new_from_name(ctx, kmod_table[i].name, &mod); - if (err < 0) { -- log_error("Failed to load module '%s'", kmod_table[i]); -+ log_error("Failed to lookup module '%s'", kmod_table[i].name); - continue; - } - -@@ -84,7 +92,7 @@ int kmod_setup(void) { - else if (err == KMOD_PROBE_APPLY_BLACKLIST) - log_info("Module '%s' is blacklisted", kmod_module_get_name(mod)); - else -- log_error("Failed to insert '%s'", kmod_module_get_name(mod)); -+ log_error("Failed to insert module '%s'", kmod_module_get_name(mod)); - - kmod_module_unref(mod); - } -Index: systemd-195/src/core/mount-setup.c -=================================================================== ---- systemd-195.orig/src/core/mount-setup.c -+++ systemd-195/src/core/mount-setup.c -@@ -46,14 +46,20 @@ - #define TTY_GID 5 - #endif - -+typedef enum MountMode { -+ MNT_NONE = 0, -+ MNT_FATAL = 1 << 0, -+ MNT_IN_CONTAINER = 1 << 1, -+} MountMode; -+ - typedef struct MountPoint { - const char *what; - const char *where; - const char *type; - const char *options; - unsigned long flags; -- bool fatal; -- bool in_container; -+ bool (*condition_fn)(void); -+ MountMode mode; - } MountPoint; - - /* The first three entries we might need before SELinux is up. The -@@ -62,15 +68,26 @@ typedef struct MountPoint { - #define N_EARLY_MOUNT 4 - - static const MountPoint mount_table[] = { -- { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true, true }, -- { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true, true }, -- { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true, true }, -- { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, false, false }, -- { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true }, -- { "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false, true }, -- { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true, true }, -- { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, false, true }, -- { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, false, true }, -+ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ NULL, MNT_FATAL|MNT_IN_CONTAINER }, -+ { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ NULL, MNT_FATAL|MNT_IN_CONTAINER }, -+ { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, -+ NULL, MNT_FATAL|MNT_IN_CONTAINER }, -+ { "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ NULL, MNT_NONE }, -+ { "efivarfs", "/sys/firmware/efi/efivars", "efivarfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ is_efiboot, MNT_NONE }, -+ { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, -+ NULL, MNT_FATAL|MNT_IN_CONTAINER }, -+ { "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, -+ NULL, MNT_IN_CONTAINER }, -+ { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, -+ NULL, MNT_FATAL|MNT_IN_CONTAINER }, -+ { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, -+ NULL, MNT_IN_CONTAINER }, -+ { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ NULL, MNT_IN_CONTAINER }, - }; - - /* These are API file systems that might be mounted by other software, -@@ -118,6 +135,9 @@ static int mount_one(const MountPoint *p - - assert(p); - -+ if (p->condition_fn && !p->condition_fn()) -+ return 0; -+ - /* Relabel first, just in case */ - if (relabel) - label_fix(p->where, true, true); -@@ -130,7 +150,7 @@ static int mount_one(const MountPoint *p - return 0; - - /* Skip securityfs in a container */ -- if (!p->in_container && detect_container(NULL) > 0) -+ if (!(p->mode & MNT_IN_CONTAINER) && detect_container(NULL) > 0) - return 0; - - /* The access mode here doesn't really matter too much, since -@@ -148,8 +168,8 @@ static int mount_one(const MountPoint *p - p->type, - p->flags, - p->options) < 0) { -- log_full(p->fatal ? LOG_ERR : LOG_DEBUG, "Failed to mount %s: %s", p->where, strerror(errno)); -- return p->fatal ? -errno : 0; -+ log_full((p->mode & MNT_FATAL) ? LOG_ERR : LOG_DEBUG, "Failed to mount %s: %s", p->where, strerror(errno)); -+ return (p->mode & MNT_FATAL) ? -errno : 0; - } - - /* Relabel again, since we now mounted something fresh here */ -@@ -288,7 +308,6 @@ int mount_cgroup_controllers(char ***joi - p.type = "cgroup"; - p.options = options; - p.flags = MS_NOSUID|MS_NOEXEC|MS_NODEV; -- p.fatal = false; - - r = mount_one(&p, true); - free(controller); -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -75,6 +75,10 @@ char **saved_argv = NULL; - static volatile unsigned cached_columns = 0; - static volatile unsigned cached_lines = 0; - -+bool is_efiboot(void) { -+ return access("/sys/firmware/efi", F_OK) >= 0; -+} -+ - size_t page_size(void) { - static __thread size_t pgsz = 0; - long r; -Index: systemd-195/src/shared/util.h -=================================================================== ---- systemd-195.orig/src/shared/util.h -+++ systemd-195/src/shared/util.h -@@ -90,6 +90,8 @@ union dirent_storage { - #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" - #define ANSI_HIGHLIGHT_OFF "\x1B[0m" - -+bool is_efiboot(void); -+ - usec_t now(clockid_t clock); - - dual_timestamp* dual_timestamp_get(dual_timestamp *ts); diff --git a/multiple-sulogin.patch b/multiple-sulogin.patch deleted file mode 100644 index 96619d43..00000000 --- a/multiple-sulogin.patch +++ /dev/null @@ -1,36 +0,0 @@ -Index: systemd-195/units/getty@.service.m4 -=================================================================== ---- systemd-195.orig/units/getty@.service.m4 -+++ systemd-195/units/getty@.service.m4 -@@ -8,6 +8,7 @@ - [Unit] - Description=Getty on %I - Documentation=man:agetty(8) -+Conflicts=rescue.service - After=systemd-user-sessions.service plymouth-quit-wait.service - m4_ifdef(`TARGET_FEDORA', - After=rc-local.service -Index: systemd-195/units/rescue.target -=================================================================== ---- systemd-195.orig/units/rescue.target -+++ systemd-195/units/rescue.target -@@ -10,6 +10,7 @@ Description=Rescue Mode - Documentation=man:systemd.special(7) - Requires=sysinit.target rescue.service - After=sysinit.target rescue.service -+Conflicts=getty.target - AllowIsolate=yes - - [Install] -Index: systemd-195/units/serial-getty@.service.m4 -=================================================================== ---- systemd-195.orig/units/serial-getty@.service.m4 -+++ systemd-195/units/serial-getty@.service.m4 -@@ -9,6 +9,7 @@ - Description=Serial Getty on %I - Documentation=man:agetty(8) man:systemd-getty-generator(8) - BindsTo=dev-%i.device -+Conflicts=rescue.service - After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service - m4_ifdef(`TARGET_FEDORA', - After=rc-local.service diff --git a/nss-myhostname-config b/nss-myhostname-config new file mode 100644 index 00000000..110db7a2 --- /dev/null +++ b/nss-myhostname-config @@ -0,0 +1,31 @@ +#!/bin/bash +# sed calls copied from fedora package +set -e + +case "$1" in + --help) + echo "$0 [--enable|--disable]" + exit 0 + ;; + --enable) + sed -i.bak -e ' + /^hosts:/ !b + /\/ b + s/[[:blank:]]*$/ myhostname/ + ' /etc/nsswitch.conf + ;; + --disable) + sed -i.bak -e ' + /^hosts:/ !b + s/[[:blank:]]\+myhostname\>// + ' /etc/nsswitch.conf + ;; + "") + if grep -q "^hosts:.*\" /etc/nsswitch.conf; then + echo "enabled" + else + echo "disabled" + fi + ;; + *) echo "invalid argument $1"; exit 1 ;; +esac diff --git a/optionally-warn-if-nss-myhostname-is-called.patch b/optionally-warn-if-nss-myhostname-is-called.patch new file mode 100644 index 00000000..08038648 --- /dev/null +++ b/optionally-warn-if-nss-myhostname-is-called.patch @@ -0,0 +1,109 @@ +From: Ludwig Nussel +Date: Fri, 20 May 2011 15:38:46 +0200 +Subject: optionally warn if nss-myhostname is called + +--- + configure.ac | 11 +++++++++++ + src/nss-myhostname/nss-myhostname.c | 35 +++++++++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 5e35613..5421461 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -712,6 +712,17 @@ if test "x$enable_myhostname" != "xno"; then + fi + AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) + ++if test "x$have_myhostname" != "xno"; then ++ AC_MSG_CHECKING([log warning messages for nss-myhostname]) ++ AC_ARG_WITH(nss-my-hostname-warning, AS_HELP_STRING([--with-nss-my-hostname-warning], [log warning to syslog when nss-myhostname is called (default=no)]),[],[with_nss_my_hostname_warning=no]) ++ AC_MSG_RESULT([$with_nss_my_hostname_warning]) ++ ++ if test x$with_nss_my_hostname_warning != xno; then ++ AC_CHECK_HEADERS([syslog.h]) ++ AC_DEFINE([LOG_NSS_MY_HOSTNAME_WARNING],[1],[whether to log warning message for nss-myhostname]) ++ fi ++fi ++ + # ------------------------------------------------------------------------------ + AC_ARG_WITH(firmware-path, + AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], +diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c +index b3aaca8..043f279 100644 +--- a/src/nss-myhostname/nss-myhostname.c ++++ b/src/nss-myhostname/nss-myhostname.c +@@ -30,6 +30,9 @@ + #include + #include + #include ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++#include ++#endif + + #include "ifconf.h" + +@@ -44,6 +47,10 @@ + + #define ALIGN(a) (((a+sizeof(void*)-1)/sizeof(void*))*sizeof(void*)) + ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++static void warn(const char* hn); ++#endif ++ + enum nss_status _nss_myhostname_gethostbyname4_r( + const char *name, + struct gaih_addrtuple **pat, +@@ -116,6 +123,10 @@ enum nss_status _nss_myhostname_gethostbyname4_r( + return NSS_STATUS_NOTFOUND; + } + ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++ warn(hn); ++#endif ++ + /* If this fails, n_addresses is 0. Which is fine */ + ifconf_acquire_addresses(&addresses, &n_addresses); + +@@ -336,6 +347,10 @@ enum nss_status _nss_myhostname_gethostbyname3_r( + return NSS_STATUS_NOTFOUND; + } + ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++ warn(hn); ++#endif ++ + return fill_in_hostent(hn, af, host, buffer, buflen, errnop, h_errnop, ttlp, canonp); + } + +@@ -434,6 +449,10 @@ found: + return NSS_STATUS_UNAVAIL; + } + ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++ warn(hn); ++#endif ++ + return fill_in_hostent(hn, af, host, buffer, buflen, errnop, h_errnop, ttlp, NULL); + + } +@@ -453,3 +472,19 @@ enum nss_status _nss_myhostname_gethostbyaddr_r( + errnop, h_errnop, + NULL); + } ++ ++#ifdef LOG_NSS_MY_HOSTNAME_WARNING ++static void warn(const char* hn) { ++ if (strstr(program_invocation_short_name, "nscd")) { ++ syslog(LOG_WARNING, ++ "Some application tried to resolve hostname \"%s\" which is not in DNS. Stop nscd to find out which one.\n", ++ hn); ++ } else { ++ syslog(LOG_WARNING, ++ "%s(%u) tried to resolve hostname \"%s\" which is not in DNS. This might be the reason for the delays you experience.\n", ++ program_invocation_short_name, ++ getpid(), ++ hn); ++ } ++} ++#endif diff --git a/pam-properly-handle-ssh-logins-without-pam-tty-field.patch b/pam-properly-handle-ssh-logins-without-pam-tty-field.patch deleted file mode 100644 index 87595784..00000000 --- a/pam-properly-handle-ssh-logins-without-pam-tty-field.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 0ad1271f564b9c956685938167f7ea8c301e835e Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 23 Dec 2012 22:31:17 +0100 -Subject: [PATCH] pam: properly handle SSH logins lacking the PAM tty field - ---- - src/login/pam-module.c | 19 ++++++++++++++----- - 1 file changed, 14 insertions(+), 5 deletions(-) - -diff --git a/src/login/pam-module.c b/src/login/pam-module.c -index 08a9328..e6764a1 100644 ---- a/src/login/pam-module.c -+++ b/src/login/pam-module.c -@@ -322,7 +322,7 @@ _public_ PAM_EXTERN int pam_sm_open_session( - - struct passwd *pw; - bool kill_processes = false, debug = false; -- const char *username, *id, *object_path, *runtime_path, *service = NULL, *tty = NULL, *display = NULL, *remote_user = NULL, *remote_host = NULL, *seat = NULL, *type, *class, *cvtnr = NULL; -+ const char *username, *id, *object_path, *runtime_path, *service = NULL, *tty = NULL, *display = NULL, *remote_user = NULL, *remote_host = NULL, *seat = NULL, *type = NULL, *class, *cvtnr = NULL; - char **controllers = NULL, **reset_controllers = NULL, **kill_only_users = NULL, **kill_exclude_users = NULL; - DBusError error; - uint32_t uid, pid; -@@ -453,9 +453,17 @@ _public_ PAM_EXTERN int pam_sm_open_session( - display = tty; - tty = ""; - } else if (streq(tty, "cron")) { -- /* cron has been setting PAM_TTY to "cron" for a very long time -- * and it cannot stop doing that for compatibility reasons. */ -+ /* cron has been setting PAM_TTY to "cron" for a very -+ * long time and it probably shouldn't stop doing that -+ * for compatibility reasons. */ - tty = ""; -+ type = "unspecified"; -+ } else if (streq(tty, "ssh")) { -+ /* ssh has been setting PAM_TTY to "ssh" for a very -+ * long time and probably shouldn't stop doing that -+ * for compatibility reasons. */ -+ tty = ""; -+ type ="tty"; - } - - /* If this fails vtnr will be 0, that's intended */ -@@ -469,8 +477,9 @@ _public_ PAM_EXTERN int pam_sm_open_session( - get_seat_from_display(display, NULL, &vtnr); - } - -- type = !isempty(display) ? "x11" : -- !isempty(tty) ? "tty" : "unspecified"; -+ if (!type) -+ type = !isempty(display) ? "x11" : -+ !isempty(tty) ? "tty" : "unspecified"; - - class = pam_getenv(handle, "XDG_SESSION_CLASS"); - if (isempty(class)) --- -1.7.10.4 - diff --git a/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch b/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch new file mode 100644 index 00000000..2db04d0f --- /dev/null +++ b/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch @@ -0,0 +1,128 @@ +From: Frederic Crozat +Date: Fri, 30 Sep 2011 13:55:31 +0000 +Subject: parse /etc/insserv.conf and adds dependencies accordingly + +(bnc#721428) +--- + src/core/service.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 101 insertions(+) + +diff --git a/src/core/service.c b/src/core/service.c +index 98266a5..8707cb5 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -3440,6 +3440,105 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { + } + + #ifdef HAVE_SYSV_COMPAT ++static void sysv_parse_insserv_conf(Manager *mgr, const char* filename) { ++ FILE *f = NULL; ++ int r; ++ ++ if (!(f = fopen(filename, "re"))) { ++ log_debug("Failed to open file %s", filename); ++ 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 '%s': %s", filename, 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 (streq(facility, SPECIAL_REMOTE_FS_TARGET)) { ++ /* insert also a Wants dependency from remote-fs-pre on remote-fs */ ++ u = manager_get_unit(mgr, SPECIAL_REMOTE_FS_TARGET); ++ unit_add_dependency_by_name(u, UNIT_WANTS, SPECIAL_REMOTE_FS_PRE_TARGET, NULL, true); ++ free (facility); ++ facility=strdup(SPECIAL_REMOTE_FS_PRE_TARGET); ++ } ++ if ((u = manager_get_unit(mgr, facility)) && (u->type == UNIT_TARGET)) { ++ char *dep = NULL, *name, **j; ++ ++ STRV_FOREACH (j, parsed+1) { ++ if (*j[0] == '+') ++ name = *j+1; ++ else ++ name = *j; ++ if (streq(name, "boot.localfs") || ++ streq(name, "boot.crypto")) ++ continue; ++ if ((sysv_translate_facility(name, NULL, &dep) < 0) || !dep) ++ continue; ++ ++ r = unit_add_two_dependencies_by_name_inverse(u, UNIT_WANTS, UNIT_BEFORE, dep, NULL, true); ++ if (*j[0] != '+') ++ r = unit_add_dependency_by_name(u, UNIT_REQUIRES, dep, NULL, true); ++ free(dep); ++ } ++ } ++ free(facility); ++ } ++ strv_free(parsed); ++ } ++finish: ++ if (f) ++ fclose(f); ++ ++} ++ ++static void sysv_facility_in_insserv_conf(Manager *mgr) { ++ DIR *d =NULL; ++ struct dirent *de; ++ ++#ifdef TARGET_DEBIAN ++ if (!(d = opendir("/etc/insserv.conf.d/"))) ++ if (errno != ENOENT) { ++ log_warning("opendir() failed on /etc/insserv.conf.d/ %s", strerror(errno)); ++ goto finish; ++ } ++ ++ while ((de = readdir(d))) { ++ char *path = NULL; ++ if (ignore_file(de->d_name)) ++ continue; ++ ++ path = join("/etc/insserv.conf.d/", de->d_name, NULL); ++ sysv_parse_insserv_conf(mgr, path); ++ free(path); ++ } ++finish: ++ if (d) ++ closedir(d); ++#endif ++ ++ sysv_parse_insserv_conf(mgr, "/etc/insserv.conf"); ++} ++ + + static int service_enumerate(Manager *m) { + char **p; +@@ -3602,6 +3701,8 @@ static int service_enumerate(Manager *m) { + + r = 0; + ++ sysv_facility_in_insserv_conf (m); ++ + finish: + + for (i = 0; i < ELEMENTSOF(rcnd_table); i++) diff --git a/parse-multiline-env-file.patch b/parse-multiline-env-file.patch deleted file mode 100644 index 7772ba8b..00000000 --- a/parse-multiline-env-file.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 565d91fdf198b88f7c2d72c67cfc6c30341a3596 Mon Sep 17 00:00:00 2001 -From: Michal Vyskocil -Date: Fri, 18 Jan 2013 10:05:10 +0100 -Subject: [PATCH] util: continuation support for load_env_file - -Variable definitions can be written on more than one line - if each ends -with a backslash, then is concatenated with a previous one. Only -backslash and unix end of line (\n) are treated as a continuation. - -Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58083 - -[zj: squashed two patches together; cleaned up grammar; removed - comment about ignoring trailing backslash -- it is not ignored.] - -Document continuation support in systemd.exec ---- - man/systemd.exec.xml | 8 +++++--- - src/shared/util.c | 43 ++++++++++++++++++++++++++++++++++++++----- - 2 files changed, 43 insertions(+), 8 deletions(-) - -Index: systemd-195/man/systemd.exec.xml -=================================================================== ---- systemd-195.orig/man/systemd.exec.xml -+++ systemd-195/man/systemd.exec.xml -@@ -282,9 +282,11 @@ - contain new-line separated variable - assignments. Empty lines and lines - starting with ; or # will be ignored, -- which may be used for commenting. The -- parser strips leading and -- trailing whitespace from the values -+ which may be used for commenting. A line -+ ending with a backslash will be concatenated -+ with the following one, allowing multiline variable -+ definitions. The parser strips leading -+ and trailing whitespace from the values - of assignments, unless you use - double quotes ("). - The -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -876,69 +876,88 @@ fail: - return r; - } - --int load_env_file( -- const char *fname, -- char ***rl) { -- -- FILE *f; -- char **m = NULL; -- int r; -+int load_env_file(const char *fname, char ***rl) { -+ -+ _cleanup_fclose_ FILE *f; -+ _cleanup_strv_free_ char **m = NULL; -+ _cleanup_free_ char *c = NULL; - - assert(fname); - assert(rl); - -- if (!(f = fopen(fname, "re"))) -+ /* This reads an environment file, but will not complain about -+ * any invalid assignments, that needs to be done by the -+ * caller */ -+ -+ f = fopen(fname, "re"); -+ if (!f) - return -errno; - - while (!feof(f)) { -- char l[LINE_MAX], *p, *u; -- char **t; -+ char l[LINE_MAX], *p, *cs, *b; - - if (!fgets(l, sizeof(l), f)) { -- if (feof(f)) -- break; -+ if (ferror(f)) -+ return -errno; -+ -+ /* The previous line was a continuation line? -+ * Let's process it now, before we leave the -+ * loop */ -+ if (c) -+ goto process; - -- r = -errno; -- goto finish; -+ break; - } - -- p = strstrip(l); -+ /* Is this a continuation line? If so, just append -+ * this to c, and go to next line right-away */ -+ cs = endswith(l, "\\\n"); -+ if (cs) { -+ *cs = '\0'; -+ b = strappend(c, l); -+ if (!b) -+ return -ENOMEM; - -- if (!*p) -+ free(c); -+ c = b; - continue; -+ } - -- if (strchr(COMMENTS, *p)) -- continue; -+ /* If the previous line was a continuation line, -+ * append the current line to it */ -+ if (c) { -+ b = strappend(c, l); -+ if (!b) -+ return -ENOMEM; - -- if (!(u = normalize_env_assignment(p))) { -- r = log_oom(); -- goto finish; -+ free(c); -+ c = b; - } - -- t = strv_append(m, u); -- free(u); -+ process: -+ p = strstrip(c ? c : l); - -- if (!t) { -- r = log_oom(); -- goto finish; -+ if (*p && !strchr(COMMENTS, *p)) { -+ _cleanup_free_ char *u; -+ int k; -+ -+ u = normalize_env_assignment(p); -+ if (!u) -+ return -ENOMEM; -+ -+ k = strv_extend(&m, u); -+ if (k < 0) -+ return -ENOMEM; - } - -- strv_free(m); -- m = t; -+ free(c); -+ c = NULL; - } - -- r = 0; -- - *rl = m; - m = NULL; - --finish: -- if (f) -- fclose(f); -- -- strv_free(m); -- -- return r; -+ return 0; - } - - int write_env_file(const char *fname, char **l) { -Index: systemd-195/src/shared/strv.c -=================================================================== ---- systemd-195.orig/src/shared/strv.c -+++ systemd-195/src/shared/strv.c -@@ -370,6 +370,32 @@ fail: - return NULL; - } - -+int strv_extend(char ***l, const char *value) { -+ char **c; -+ char *v; -+ unsigned n; -+ -+ if (!value) -+ return 0; -+ -+ v = strdup(value); -+ if (!v) -+ return -ENOMEM; -+ -+ n = strv_length(*l); -+ c = realloc(*l, sizeof(char*) * (n + 2)); -+ if (!c) { -+ free(v); -+ return -ENOMEM; -+ } -+ -+ c[n] = v; -+ c[n+1] = NULL; -+ -+ *l = c; -+ return 0; -+} -+ - char **strv_uniq(char **l) { - char **i; - -Index: systemd-195/src/shared/strv.h -=================================================================== ---- systemd-195.orig/src/shared/strv.h -+++ systemd-195/src/shared/strv.h -@@ -37,6 +37,7 @@ unsigned strv_length(char **l); - char **strv_merge(char **a, char **b); - char **strv_merge_concat(char **a, char **b, const char *suffix); - char **strv_append(char **l, const char *s); -+int strv_extend(char ***l, const char *value); - - char **strv_remove(char **l, const char *s); - char **strv_remove_prefix(char **l, const char *s); diff --git a/path-util-fix-potential-crash.patch b/path-util-fix-potential-crash.patch deleted file mode 100644 index 9399e947..00000000 --- a/path-util-fix-potential-crash.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c9c7aef24f9750bbd51d2c13beff66473d96bf3c Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Thu, 13 Dec 2012 14:59:39 +0100 -Subject: [PATCH] path-util: set pointer to null after calling free() - -In cases where path_strv_canonicalize() returns NULL, strv_free() is -called afterwards and it will call free() on pointers which were freed -already in path_strv_canonicalize() ---- - src/shared/path-util.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/shared/path-util.c b/src/shared/path-util.c -index 70c8a8a..dd12d3d 100644 ---- a/src/shared/path-util.c -+++ b/src/shared/path-util.c -@@ -181,6 +181,7 @@ char **path_strv_canonicalize(char **l) { - - t = path_make_absolute_cwd(*s); - free(*s); -+ *s = NULL; - - if (!t) { - enomem = true; --- -1.7.10.4 - diff --git a/rbind-mount.patch b/rbind-mount.patch deleted file mode 100644 index 8d8bb148..00000000 --- a/rbind-mount.patch +++ /dev/null @@ -1,44 +0,0 @@ -From df77b11852d6b3495848c4123e7cbd9f099910f9 Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Thu, 21 Feb 2013 15:40:52 +0100 -Subject: [PATCH] detect rbind as bind mount - -Correctly detect rbind mount option as bind mount. -Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575. ---- - src/core/mount.c | 6 ++++++ - src/fstab-generator/fstab-generator.c | 4 +++- - 2 files changed, 9 insertions(+), 1 deletion(-) - -Index: systemd-195/src/core/mount.c -=================================================================== ---- systemd-195.orig/src/core/mount.c -+++ systemd-195/src/core/mount.c -@@ -320,6 +320,12 @@ static bool mount_is_bind(MountParameter - if (p->fstype && streq(p->fstype, "bind")) - return true; - -+ if (mount_test_option(p->options, "rbind")) -+ return true; -+ -+ if (p->fstype && streq(p->fstype, "rbind")) -+ return true; -+ - return false; - } - -Index: systemd-195/src/fstab-generator/fstab-generator.c -=================================================================== ---- systemd-195.orig/src/fstab-generator/fstab-generator.c -+++ systemd-195/src/fstab-generator/fstab-generator.c -@@ -199,7 +199,9 @@ static bool mount_is_bind(struct mntent - - return - hasmntopt(me, "bind") || -- streq(me->mnt_type, "bind"); -+ streq(me->mnt_type, "bind") || -+ hasmntopt(me, "rbind") || -+ streq(me->mnt_type, "rbind"); - } - - static bool mount_is_network(struct mntent *me) { diff --git a/re-add-persistent-net.patch b/re-add-persistent-net.patch new file mode 100644 index 00000000..dd82550b --- /dev/null +++ b/re-add-persistent-net.patch @@ -0,0 +1,421 @@ +From: Robert Milasan +Date: Wed, 20 Mar 2013 10:14:59 +0000 +Subject: re-add persistent net + +udev: re-add persistent network rules (bnc#809843). +--- + Makefile.am | 10 +- + .../75-persistent-net-generator.rules | 102 +++++++++++++++ + src/udev/rule_generator/rule_generator.functions | 113 ++++++++++++++++ + src/udev/rule_generator/write_net_rules | 145 +++++++++++++++++++++ + 4 files changed, 369 insertions(+), 1 deletion(-) + create mode 100644 src/udev/rule_generator/75-persistent-net-generator.rules + create mode 100644 src/udev/rule_generator/rule_generator.functions + create mode 100644 src/udev/rule_generator/write_net_rules + +diff --git a/Makefile.am b/Makefile.am +index 10609f3..f5e4159 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2287,6 +2287,14 @@ EXTRA_DIST += \ + src/gudev/seed-example.js + + # ------------------------------------------------------------------------------ ++dist_udevhome_SCRIPTS = \ ++ src/udev/rule_generator/rule_generator.functions \ ++ src/udev/rule_generator/write_net_rules ++ ++dist_udevrules_DATA += \ ++ src/udev/rule_generator/75-persistent-net-generator.rules ++ ++# ------------------------------------------------------------------------------ + if ENABLE_KEYMAP + keymap_SOURCES = \ + src/udev/keymap/keymap.c +@@ -2314,7 +2322,7 @@ dist_udevrules_DATA += \ + src/udev/keymap/95-keymap.rules \ + src/udev/keymap/95-keyboard-force-release.rules + +-dist_udevhome_SCRIPTS = \ ++dist_udevhome_SCRIPTS += \ + src/udev/keymap/findkeyboards \ + src/udev/keymap/keyboard-force-release.sh + +diff --git a/src/udev/rule_generator/75-persistent-net-generator.rules b/src/udev/rule_generator/75-persistent-net-generator.rules +new file mode 100644 +index 0000000..4f80573 +--- /dev/null ++++ b/src/udev/rule_generator/75-persistent-net-generator.rules +@@ -0,0 +1,102 @@ ++# do not edit this file, it will be overwritten on update ++ ++# these rules generate rules for persistent network device naming ++# ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++ACTION!="add", GOTO="persistent_net_generator_end" ++SUBSYSTEM!="net", GOTO="persistent_net_generator_end" ++ ++# ignore the interface if a name has already been set ++NAME=="?*", GOTO="persistent_net_generator_end" ++ ++# device name whitelist ++KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" ++ ++# ignore Xen virtual interfaces ++SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" ++ ++# read MAC address ++ENV{MATCHADDR}="$attr{address}" ++ ++# match interface type ++ENV{MATCHIFTYPE}="$attr{type}" ++ ++# ignore KVM virtual interfaces ++ENV{MATCHADDR}=="52:54:00:*", GOTO="persistent_net_generator_end" ++# ignore VMWare virtual interfaces ++ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" ++# ignore Hyper-V virtual interfaces ++ENV{MATCHADDR}=="00:15:5d:*", GOTO="persistent_net_generator_end" ++ ++# These vendors are known to violate the local MAC address assignment scheme ++# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom ++ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" ++# 3Com ++ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist" ++# 3Com IBM PC; Imagen; Valid; Cisco; Apple ++ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist" ++# Intel ++ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist" ++# Olivetti ++ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist" ++# CMC Masscomp; Silicon Graphics; Prime EXL ++ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist" ++# Prominet Corporation Gigabit Ethernet Switch ++ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist" ++# BTI (Bus-Tech, Inc.) IBM Mainframes ++ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist" ++# Realtek ++ENV{MATCHADDR}=="52:54:00:*", GOTO="globally_administered_whitelist" ++# Novell 2000 ++ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist" ++# Realtec ++ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist" ++# Kingston Technologies ++ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist" ++# Xensource ++ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" ++ ++# match interface dev_id ++ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" ++ ++# do not use "locally administered" MAC address ++ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" ++ ++# do not use empty address ++ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" ++ ++LABEL="globally_administered_whitelist" ++ ++# build comment line for generated rule: ++SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" ++SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" ++SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" ++SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" ++ ++# ibmveth likes to use "locally administered" MAC addresses ++DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}", ENV{COMMENT}="ibmveth ($id)" ++ ++# S/390 uses id matches only, do not use MAC address match ++SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" ++ ++# see if we got enough data to create a rule ++ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", GOTO="persistent_net_generator_end" ++ ++# default comment ++ENV{COMMENT}=="", ENV{COMMENT}="net device ($attr{driver})" ++ ++# write rule ++DRIVERS=="?*", IMPORT{program}="write_net_rules" ++ ++# rename interface if needed ++ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" ++ ++LABEL="persistent_net_generator_end" +diff --git a/src/udev/rule_generator/rule_generator.functions b/src/udev/rule_generator/rule_generator.functions +new file mode 100644 +index 0000000..087bc34 +--- /dev/null ++++ b/src/udev/rule_generator/rule_generator.functions +@@ -0,0 +1,113 @@ ++# functions used by the udev rule generator ++ ++# Copyright (C) 2006 Marco d'Itri ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 2 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++PATH='/usr/bin:/bin:/usr/sbin:/sbin' ++ ++# Read a single line from file $1 in the $DEVPATH directory. ++# The function must not return an error even if the file does not exist. ++sysread() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ local value ++ read value < "/sys$DEVPATH/$file" || return 0 ++ echo "$value" ++} ++ ++sysreadlink() { ++ local file="$1" ++ [ -e "/sys$DEVPATH/$file" ] || return 0 ++ readlink -f /sys$DEVPATH/$file 2> /dev/null || true ++} ++ ++# Return true if a directory is writeable. ++writeable() { ++ if ln -s test-link $1/.is-writeable 2> /dev/null; then ++ rm -f $1/.is-writeable ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++# Create a lock file for the current rules file. ++lock_rules_file() { ++ RUNDIR="/run/udev" ++ [ -e "$RUNDIR" ] || return 0 ++ ++ RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}" ++ ++ retry=30 ++ while ! mkdir $RULES_LOCK 2> /dev/null; do ++ if [ $retry -eq 0 ]; then ++ echo "Cannot lock $RULES_FILE!" >&2 ++ exit 2 ++ fi ++ sleep 1 ++ retry=$(($retry - 1)) ++ done ++} ++ ++unlock_rules_file() { ++ [ "$RULES_LOCK" ] || return 0 ++ rmdir $RULES_LOCK || true ++} ++ ++# Choose the real rules file if it is writeable or a temporary file if not. ++# Both files should be checked later when looking for existing rules. ++choose_rules_file() { ++ RUNDIR="/run/udev" ++ local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}" ++ [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 ++ ++ if writeable ${RULES_FILE%/*}; then ++ RO_RULES_FILE='/dev/null' ++ else ++ RO_RULES_FILE=$RULES_FILE ++ RULES_FILE=$tmp_rules_file ++ fi ++} ++ ++# Return the name of the first free device. ++raw_find_next_available() { ++ local links="$1" ++ ++ local basename=${links%%[ 0-9]*} ++ local max=-1 ++ for name in $links; do ++ local num=${name#$basename} ++ [ "$num" ] || num=0 ++ [ $num -gt $max ] && max=$num ++ done ++ ++ local max=$(($max + 1)) ++ # "name0" actually is just "name" ++ [ $max -eq 0 ] && return ++ echo "$max" ++} ++ ++# Find all rules matching a key (with action) and a pattern. ++find_all_rules() { ++ local key="$1" ++ local linkre="$2" ++ local match="$3" ++ ++ local search='.*[[:space:],]'"$key"'"('"$linkre"')".*' ++ echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \ ++ $RO_RULES_FILE \ ++ $([ -e $RULES_FILE ] && echo $RULES_FILE) \ ++ 2>/dev/null) ++} +diff --git a/src/udev/rule_generator/write_net_rules b/src/udev/rule_generator/write_net_rules +new file mode 100644 +index 0000000..fad1cc5 +--- /dev/null ++++ b/src/udev/rule_generator/write_net_rules +@@ -0,0 +1,145 @@ ++#!/bin/sh -e ++ ++# This script is run to create persistent network device naming rules ++# based on properties of the device. ++# If the interface needs to be renamed, INTERFACE_NEW= will be printed ++# on stdout to allow udev to IMPORT it. ++ ++# variables used to communicate: ++# MATCHADDR MAC address used for the match ++# MATCHID bus_id used for the match ++# MATCHDEVID dev_id used for the match ++# MATCHDRV driver name used for the match ++# MATCHIFTYPE interface type match ++# COMMENT comment to add to the generated rule ++# INTERFACE_NAME requested name supplied by external tool ++# INTERFACE_NEW new interface name returned by rule writer ++ ++# Copyright (C) 2006 Marco d'Itri ++# Copyright (C) 2007 Kay Sievers ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++# debug, if UDEV_LOG= ++if [ -n "$UDEV_LOG" ]; then ++ if [ "$UDEV_LOG" -ge 7 ]; then ++ set -x ++ fi ++fi ++ ++RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' ++ ++if [ -e /usr/lib/udev/rule_generator.functions ]; then ++ . /usr/lib/udev/rule_generator.functions ++else ++ . /lib/udev/rule_generator.functions ++fi ++ ++interface_name_taken() { ++ local value="$(find_all_rules 'NAME=' $INTERFACE)" ++ if [ "$value" ]; then ++ return 0 ++ else ++ return 1 ++ fi ++} ++ ++find_next_available() { ++ raw_find_next_available "$(find_all_rules 'NAME=' "$1")" ++} ++ ++write_rule() { ++ local match="$1" ++ local name="$2" ++ local comment="$3" ++ ++ { ++ if [ "$PRINT_HEADER" ]; then ++ PRINT_HEADER= ++ echo "# This file was automatically generated by the $0" ++ echo "# program, run by the persistent-net-generator.rules rules file." ++ echo "#" ++ echo "# You can modify it, as long as you keep each rule on a single" ++ echo "# line, and change only the value of the NAME= key." ++ fi ++ ++ echo "" ++ [ "$comment" ] && echo "# $comment" ++ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" ++ } >> $RULES_FILE ++} ++ ++if [ -z "$INTERFACE" ]; then ++ echo "missing \$INTERFACE" >&2 ++ exit 1 ++fi ++ ++# Prevent concurrent processes from modifying the file at the same time. ++lock_rules_file ++ ++# Check if the rules file is writeable. ++choose_rules_file ++ ++# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces ++if [ "$MATCHADDR" ]; then ++ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" ++fi ++ ++if [ "$MATCHDRV" ]; then ++ match="$match, DRIVERS==\"$MATCHDRV\"" ++fi ++ ++if [ "$MATCHDEVID" ]; then ++ match="$match, ATTR{dev_id}==\"$MATCHDEVID\"" ++fi ++ ++if [ "$MATCHID" ]; then ++ match="$match, KERNELS==\"$MATCHID\"" ++fi ++ ++if [ "$MATCHIFTYPE" ]; then ++ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" ++fi ++ ++if [ -z "$match" ]; then ++ echo "missing valid match" >&2 ++ unlock_rules_file ++ exit 1 ++fi ++ ++basename=${INTERFACE%%[0-9]*} ++match="$match, KERNEL==\"$basename*\"" ++ ++if [ "$INTERFACE_NAME" ]; then ++ # external tools may request a custom name ++ COMMENT="$COMMENT (custom name provided by external tool)" ++ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then ++ INTERFACE=$INTERFACE_NAME; ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++else ++ # if a rule using the current name already exists, find a new name ++ if interface_name_taken; then ++ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" ++ # prevent INTERFACE from being "eth" instead of "eth0" ++ [ "$INTERFACE" = "${INTERFACE%%[ \[\]0-9]*}" ] && INTERFACE=${INTERFACE}0 ++ echo "INTERFACE_NEW=$INTERFACE" ++ fi ++fi ++ ++write_rule "$match" "$INTERFACE" "$COMMENT" ++ ++unlock_rules_file ++ ++exit 0 diff --git a/re-enable-by_path-links-for-ata-devices.patch b/re-enable-by_path-links-for-ata-devices.patch new file mode 100644 index 00000000..64f01c1f --- /dev/null +++ b/re-enable-by_path-links-for-ata-devices.patch @@ -0,0 +1,120 @@ +From: Robert Milasan +Date: Thu, 12 Jul 2012 15:56:34 +0000 +Subject: re-enable by_path links for ata devices + +Fix by-path links for ATA transport (bnc#770910) +--- + src/udev/udev-builtin-path_id.c | 92 +++++++++++++++++++++++++++++++++++------ + 1 file changed, 80 insertions(+), 12 deletions(-) + +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index da02731..a77d4e8 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -338,6 +338,85 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char * + return parent; + } + ++static struct udev_device *handle_ata(struct udev_device *parent, char **path) ++{ ++ struct udev_device *hostdev; ++ int host, bus, target, lun; ++ const char *name; ++ char *base; ++ char *pos; ++ DIR *dir; ++ struct dirent *dent; ++ int basenum, len; ++ ++ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); ++ if (hostdev == NULL) ++ return NULL; ++ ++ name = udev_device_get_sysname(parent); ++ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) ++ return NULL; ++ ++ /* rebase ata offset to get the local relative number */ ++ basenum = -1; ++ base = strdup(udev_device_get_syspath(hostdev)); ++ if (base == NULL) ++ return NULL; ++ pos = strrchr(base, '/'); ++ if (pos == NULL) { ++ parent = NULL; ++ goto out; ++ } ++ pos[0] = '\0'; ++ len = strlen(base) - 5; ++ if (len <= 0) { ++ parent = NULL; ++ goto out; ++ } ++ base[len] = '\0'; ++ dir = opendir(base); ++ if (dir == NULL) { ++ parent = NULL; ++ goto out; ++ } ++ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { ++ char *rest; ++ int i; ++ ++ if (dent->d_name[0] == '.') ++ continue; ++ if (dent->d_type != DT_DIR && dent->d_type != DT_LNK) ++ continue; ++ if (strncmp(dent->d_name, "ata", 3) != 0) ++ continue; ++ i = strtoul(&dent->d_name[3], &rest, 10); ++ ++ /* ata devices start with 1, so decrease by 1 if i is bigger then 0 */ ++ if (i > 0) ++ i--; ++ if (rest[0] != '\0') ++ continue; ++ /* ++ * find the smallest number; the host really needs to export its ++ * own instance number per parent device; relying on the global host ++ * enumeration and plainly rebasing the numbers sounds unreliable ++ */ ++ if (basenum == -1 || i < basenum) ++ basenum = i; ++ } ++ closedir(dir); ++ if (basenum == -1) { ++ parent = NULL; ++ goto out; ++ } ++ host -= basenum; ++ ++ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun); ++out: ++ free(base); ++ return hostdev; ++} ++ + static struct udev_device *handle_scsi(struct udev_device *parent, char **path) + { + const char *devtype; +@@ -374,19 +453,8 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path) + goto out; + } + +- /* +- * We do not support the ATA transport class, it uses global counters +- * to name the ata devices which numbers spread across multiple +- * controllers. +- * +- * The real link numbers are not exported. Also, possible chains of ports +- * behind port multipliers cannot be composed that way. +- * +- * Until all that is solved at the kernel level, there are no by-path/ +- * links for ATA devices. +- */ + if (strstr(name, "/ata") != NULL) { +- parent = NULL; ++ parent = handle_ata(parent, path); + goto out; + } + diff --git a/new-lsb-headers.patch b/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch similarity index 74% rename from new-lsb-headers.patch rename to remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch index e48728fb..9345fe41 100644 --- a/new-lsb-headers.patch +++ b/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch @@ -1,8 +1,21 @@ -Index: systemd-195/src/core/service.c -=================================================================== ---- systemd-195.orig/src/core/service.c -+++ systemd-195/src/core/service.c -@@ -146,6 +146,7 @@ static void service_init(Unit *u) { +From: Frederic Crozat +Date: Wed, 7 Dec 2011 15:15:07 +0000 +Subject: remain_after_exit initscript heuristic and add new LSB headers + +Add remain_after_exit heuristic for initscripts and add LSB headers +PIDFile: and X-Systemd-RemainAfterExit to control it. + +(bnc#721426) (bnc#727771) +--- + src/core/service.c | 34 ++++++++++++++++++++++++++++++++-- + src/core/service.h | 1 + + 2 files changed, 33 insertions(+), 2 deletions(-) + +diff --git a/src/core/service.c b/src/core/service.c +index e34bcf1..a1b2d93 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -135,6 +135,7 @@ static void service_init(Unit *u) { #ifdef HAVE_SYSV_COMPAT s->sysv_start_priority = -1; s->sysv_start_priority_from_rcnd = -1; @@ -10,7 +23,7 @@ Index: systemd-195/src/core/service.c #endif s->socket_fd = -1; s->guess_main_pid = true; -@@ -906,6 +907,34 @@ static int service_load_sysv_path(Servic +@@ -875,6 +876,34 @@ static int service_load_sysv_path(Service *s, const char *path) { free(short_description); short_description = d; @@ -45,7 +58,7 @@ Index: systemd-195/src/core/service.c } else if (state == LSB_DESCRIPTION) { if (startswith(l, "#\t") || startswith(l, "# ")) { -@@ -963,7 +992,8 @@ static int service_load_sysv_path(Servic +@@ -925,7 +954,8 @@ static int service_load_sysv_path(Service *s, const char *path) { /* Special setting for all SysV services */ s->type = SERVICE_FORKING; @@ -55,7 +68,7 @@ Index: systemd-195/src/core/service.c s->guess_main_pid = false; s->restart = SERVICE_RESTART_NO; s->exec_context.ignore_sigpipe = false; -@@ -2138,7 +2168,7 @@ static void service_enter_running(Servic +@@ -2074,7 +2104,7 @@ static void service_enter_running(Service *s, ServiceResult f) { if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) && (s->bus_name_good || s->type != SERVICE_DBUS)) { #ifdef HAVE_SYSV_COMPAT @@ -64,10 +77,10 @@ Index: systemd-195/src/core/service.c s->remain_after_exit = false; #endif service_set_state(s, SERVICE_RUNNING); -Index: systemd-195/src/core/service.h -=================================================================== ---- systemd-195.orig/src/core/service.h -+++ systemd-195/src/core/service.h +diff --git a/src/core/service.h b/src/core/service.h +index d1e53bf..4cd1a79 100644 +--- a/src/core/service.h ++++ b/src/core/service.h @@ -176,6 +176,7 @@ struct Service { bool is_sysv:1; bool sysv_has_lsb:1; diff --git a/remount-ro-before-unmount.patch b/remount-ro-before-unmount.patch deleted file mode 100644 index d634afff..00000000 --- a/remount-ro-before-unmount.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 93bd157722c76b47d80742f290373c1ce2865070 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 16 Nov 2012 18:36:28 +0100 -Subject: [PATCH] umount: always remount read-only before unmounting in final - shutdown loop - ---- - src/core/umount.c | 57 +++++++++++++++++++++++++---------------------------- - 1 file changed, 27 insertions(+), 30 deletions(-) - -diff --git a/src/core/umount.c b/src/core/umount.c -index 83c9de3..e794057 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -407,6 +407,33 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e - assert(head); - - LIST_FOREACH_SAFE(mount_point, m, n, *head) { -+ -+ /* If we are in a container, don't attempt to -+ read-only mount anything as that brings no real -+ benefits, but might confuse the host, as we remount -+ the superblock here, not the bind mound. */ -+ if (detect_container(NULL) <= 0) { -+ /* We always try to remount directories -+ * read-only first, before we go on and umount -+ * them. -+ * -+ * Mount points can be stacked. If a mount -+ * point is stacked below / or /usr, we -+ * cannnot umount or remount it directly, -+ * since there is no way to refer to the -+ * underlying mount. There's nothing we can do -+ * about it for the general case, but we can -+ * do something about it if it is aliased -+ * somehwere else via a bind mount. If we -+ * explicitly remount the super block of that -+ * alias read-only we hence should be -+ * relatively safe regarding keeping the fs we -+ * can otherwise not see dirty. */ -+ mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL); -+ } -+ -+ /* Skip / and /usr since we cannot unmount that -+ * anyway, since we are running from it */ - if (path_equal(m->path, "/") - #ifndef HAVE_SPLIT_USR - || path_equal(m->path, "/usr") -@@ -432,29 +459,6 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e - return n_failed; - } - --static int mount_points_list_remount_read_only(MountPoint **head, bool *changed) { -- MountPoint *m, *n; -- int n_failed = 0; -- -- assert(head); -- -- LIST_FOREACH_SAFE(mount_point, m, n, *head) { -- -- /* Trying to remount read-only */ -- if (mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL) == 0) { -- if (changed) -- *changed = true; -- -- mount_point_free(head, m); -- } else { -- log_warning("Could not remount as read-only %s: %m", m->path); -- n_failed++; -- } -- } -- -- return n_failed; --} -- - static int swap_points_list_off(MountPoint **head, bool *changed) { - MountPoint *m, *n; - int n_failed = 0; -@@ -571,13 +575,6 @@ int umount_all(bool *changed) { - if (r <= 0) - goto end; - -- /* If we are in a container, don't attempt to read-only mount -- anything as that brings no real benefits, but might confuse -- the host, as we remount the superblock here, not the bind -- mound. */ -- if (detect_container(NULL) <= 0) -- r = mount_points_list_remount_read_only(&mp_list_head, changed); -- - end: - mount_points_list_free(&mp_list_head); - --- -1.7.10.4 - diff --git a/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch b/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch new file mode 100644 index 00000000..2a2165bf --- /dev/null +++ b/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch @@ -0,0 +1,89 @@ +From: Frederic Crozat +Date: Mon, 29 Oct 2012 13:01:20 +0000 +Subject: restore /var/run and /var/lock bind mount if they aren't symlink + +--- + Makefile.am | 9 +++++++++ + units/var-lock.mount | 19 +++++++++++++++++++ + units/var-run.mount | 19 +++++++++++++++++++ + 3 files changed, 47 insertions(+) + create mode 100644 units/var-lock.mount + create mode 100644 units/var-run.mount + +diff --git a/Makefile.am b/Makefile.am +index 00905d0..10609f3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -398,6 +398,12 @@ dist_systemunit_DATA = \ + units/system-update.target \ + units/initrd-switch-root.target + ++if HAVE_SYSV_COMPAT ++dist_systemunit_DATA += \ ++ units/var-run.mount \ ++ units/var-lock.mount ++endif ++ + nodist_systemunit_DATA = \ + units/getty@.service \ + units/serial-getty@.service \ +@@ -3913,6 +3919,9 @@ RUNLEVEL4_TARGET_WANTS += \ + systemd-update-utmp-runlevel.service + RUNLEVEL5_TARGET_WANTS += \ + systemd-update-utmp-runlevel.service ++LOCAL_FS_TARGET_WANTS += \ ++ var-run.mount \ ++ var-lock.mount + endif + SHUTDOWN_TARGET_WANTS += \ + systemd-update-utmp-shutdown.service +diff --git a/units/var-lock.mount b/units/var-lock.mount +new file mode 100644 +index 0000000..07277ad +--- /dev/null ++++ b/units/var-lock.mount +@@ -0,0 +1,19 @@ ++# This file is part of systemd. ++# ++# systemd is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++ ++[Unit] ++Description=Lock Directory ++Before=local-fs.target ++# skip mounting if the directory does not exist or is a symlink ++ConditionPathIsDirectory=/var/lock ++ConditionPathIsSymbolicLink=!/var/lock ++ ++[Mount] ++What=/run/lock ++Where=/var/lock ++Type=bind ++Options=bind +diff --git a/units/var-run.mount b/units/var-run.mount +new file mode 100644 +index 0000000..ab4da42 +--- /dev/null ++++ b/units/var-run.mount +@@ -0,0 +1,19 @@ ++# This file is part of systemd. ++# ++# systemd is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++ ++[Unit] ++Description=Runtime Directory ++Before=local-fs.target ++# skip mounting if the directory does not exist or is a symlink ++ConditionPathIsDirectory=/var/run ++ConditionPathIsSymbolicLink=!/var/run ++ ++[Mount] ++What=/run ++Where=/var/run ++Type=bind ++Options=bind diff --git a/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch b/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch deleted file mode 100644 index 8d9d574c..00000000 --- a/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 140883405e429d9f8d3480a2701d8904f97e4a98 -Author: Tom Gundersen -Date: Wed Nov 28 18:08:54 2012 +0100 - - shutdown: don't consider umounting of / and /usr failed - - In the words of Homer: If you don't try, you can't fail. - - This is a revert of 9279749b84cc87c7830280b7895a48bed03c9429. - - It used to be necessary to consider the umounting failed to make sure / - and /usr were remounted read-only, but that is no longer necessary as - everything is now remounted read-only anyway. - - Moreover, this avoids a warning at shutdown saying a filesystem was not - unmounted. As the umounting of / is never attempted there was no - corresponding warning message saying which fs that failed. This caused some - spurious bug-reports from concerned users. - - Cc: Michael Biebl - -diff --git a/src/core/umount.c b/src/core/umount.c -index e794057..5989a4c 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -433,15 +433,14 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e - } - - /* Skip / and /usr since we cannot unmount that -- * anyway, since we are running from it */ -+ * anyway, since we are running from it. They have already been -+ * remounte ro. */ - if (path_equal(m->path, "/") - #ifndef HAVE_SPLIT_USR - || path_equal(m->path, "/usr") - #endif -- ) { -- n_failed++; -+ ) - continue; -- } - - /* Trying to umount. Forcing to umount if busy (only for NFS mounts) */ - if (umount2(m->path, MNT_FORCE) == 0) { diff --git a/reword-rescue-mode-hints.patch b/reword-rescue-mode-hints.patch deleted file mode 100644 index e6e7db87..00000000 --- a/reword-rescue-mode-hints.patch +++ /dev/null @@ -1,30 +0,0 @@ -From aa6eba407be2c23882bf41a1beafbbd1352f7ab3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 23 Oct 2012 16:32:12 +0200 -Subject: [PATCH] units: reword rescue mode hints - -Do not suggest to the user that commands can be issued before -logging in. - -sulogin prints it own message, which mentions ^D, so there's no need -to repeat it here. ---- - units/emergency.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/units/emergency.service.in b/units/emergency.service.in -index 1815f9d..129a831 100644 ---- a/units/emergency.service.in -+++ b/units/emergency.service.in -@@ -16,7 +16,7 @@ Before=shutdown.target - Environment=HOME=/root - WorkingDirectory=/root - ExecStartPre=-/bin/plymouth quit --ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -b" to view system logs. Type "systemctl reboot" to reboot.' -+ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -b" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.' - ExecStart=-/sbin/sulogin - ExecStopPost=@SYSTEMCTL@ --fail --no-block default - Type=idle --- -1.7.10.4 - diff --git a/rules-create-by-id-scsi-links-for-ATA-devices.patch b/rules-create-by-id-scsi-links-for-ATA-devices.patch new file mode 100644 index 00000000..c2f3186c --- /dev/null +++ b/rules-create-by-id-scsi-links-for-ATA-devices.patch @@ -0,0 +1,24 @@ +From: Robert Milasan +Date: Wed, 27 Jun 2012 08:55:59 +0000 +Subject: rules create by id scsi links for ATA devices + +Re-enable creation of by-id scsi links for ATA devices. (bnc#769002) +--- + rules/60-persistent-storage.rules | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules +index a4d009a..f720c7e 100644 +--- a/rules/60-persistent-storage.rules ++++ b/rules/60-persistent-storage.rules +@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s + KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" + ++# scsi compat links for ATA devices ++KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" ++KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" ++ + # firewire + KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" + KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" diff --git a/0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch b/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch similarity index 66% rename from 0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch rename to service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch index 0f665022..0c8dd048 100644 --- a/0001-service-flags-sysv-service-with-detected-pid-as-Rema.patch +++ b/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch @@ -1,7 +1,7 @@ -From 700b1261115a67392014ff2c887a9cffc28108ab Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 30 Sep 2011 12:58:17 +0200 -Subject: [PATCH] service: flags sysv service with detected pid as RemainAfterExit=false +Subject: 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 @@ -9,14 +9,14 @@ 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(-) + src/core/service.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -Index: systemd-195/src/core/service.c -=================================================================== ---- systemd-195.orig/src/core/service.c -+++ systemd-195/src/core/service.c -@@ -2136,8 +2136,13 @@ static void service_enter_running(Servic +diff --git a/src/core/service.c b/src/core/service.c +index 8707cb5..e34bcf1 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -2072,8 +2072,13 @@ static void service_enter_running(Service *s, ServiceResult f) { cgroup_ok = cgroup_good(s); if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) && diff --git a/service-forking-ignore-exit-status-main-process.patch b/service-forking-ignore-exit-status-main-process.patch deleted file mode 100644 index b9681f3f..00000000 --- a/service-forking-ignore-exit-status-main-process.patch +++ /dev/null @@ -1,45 +0,0 @@ -From fbeefb45ac1a257a0c5af975ad26d68ed6c39fda Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 14 Jan 2013 21:05:17 +0100 -Subject: [PATCH] service: for Type=forking services, ignore exit status of - main process depending on ExecStart's ignore setting - -https://bugzilla.redhat.com/show_bug.cgi?id=860464 ---- - src/core/service.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -Index: systemd-195/src/core/service.c -=================================================================== ---- systemd-195.orig/src/core/service.c -+++ systemd-195/src/core/service.c -@@ -2978,15 +2978,25 @@ static void service_sigchld_event(Unit * - s->main_pid = 0; - exec_status_exit(&s->main_exec_status, &s->exec_context, pid, code, status); - -- /* If this is not a forking service than the main -- * process got started and hence we copy the exit -- * status so that it is recorded both as main and as -- * control process exit status */ - if (s->main_command) { -+ /* If this is not a forking service than the -+ * main process got started and hence we copy -+ * the exit status so that it is recorded both -+ * as main and as control process exit -+ * status */ -+ - s->main_command->exec_status = s->main_exec_status; - - if (s->main_command->ignore) - f = SERVICE_SUCCESS; -+ } else if (s->exec_command[SERVICE_EXEC_START]) { -+ -+ /* If this is a forked process, then we should -+ * ignore the return value if this was -+ * configured for the starter process */ -+ -+ if (s->exec_command[SERVICE_EXEC_START]->ignore) -+ f = SERVICE_SUCCESS; - } - - log_struct(f == SERVICE_SUCCESS ? LOG_DEBUG : LOG_NOTICE, diff --git a/shutdown-dont-force-mnt-force-on-final-umount.patch b/shutdown-dont-force-mnt-force-on-final-umount.patch deleted file mode 100644 index cd95df86..00000000 --- a/shutdown-dont-force-mnt-force-on-final-umount.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0c08f5cde749bd2818475e487109cd0d413452df Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 16 Jan 2013 03:51:56 +0100 -Subject: [PATCH] shutdown: in the final umount loop don't use MNT_FORCE - -MNT_FORCE is honoured by NFS and FUSE and allows unmounting of the FS -even if consumers still use it. For our brute-force loop we rely on -EBUSY being reported as long as a file system is still used by a -loopback device or suchlike. Hence, drop MNT_FORCE to make EBUSY -reliable. ---- - src/core/umount.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/core/umount.c b/src/core/umount.c -index 96232d3..c7b6cee 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -442,9 +442,11 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e - ) - continue; - -- /* Trying to umount. Forcing to umount if busy (only for NFS mounts) */ -+ /* Trying to umount. We don't force here since we rely -+ * on busy NFS and FUSE file systems to return EBUSY -+ * until we closed everything on top of them. */ - log_info("Unmounting %s.", m->path); -- if (umount2(m->path, MNT_FORCE) == 0) { -+ if (umount2(m->path, 0) == 0) { - if (changed) - *changed = true; - --- -1.7.10.4 - diff --git a/shutdown-ignore-loop-devices-without-backing-file.patch b/shutdown-ignore-loop-devices-without-backing-file.patch deleted file mode 100644 index 44992a7f..00000000 --- a/shutdown-ignore-loop-devices-without-backing-file.patch +++ /dev/null @@ -1,37 +0,0 @@ -From bdffb521d01a2e2bc342154d74cb519755c52c25 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Wed, 16 Jan 2013 04:35:54 +0100 -Subject: [PATCH] shutdown: ignore loop devices without a backing file - ---- - src/core/umount.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/core/umount.c b/src/core/umount.c -index c7b6cee..f0f2711 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -233,6 +233,7 @@ static int loopback_list_get(MountPoint **head) { - udev_list_entry_foreach(item, first) { - MountPoint *lb; - struct udev_device *d; -+ const char *backing; - char *loop; - const char *dn; - -@@ -241,6 +242,12 @@ static int loopback_list_get(MountPoint **head) { - goto finish; - } - -+ backing = udev_device_get_sysattr_value(d, "loop/backing_file"); -+ if (!backing) { -+ udev_device_unref(d); -+ continue; -+ } -+ - if (!(dn = udev_device_get_devnode(d))) { - udev_device_unref(d); - continue; --- -1.7.10.4 - diff --git a/shutdown-improvements.patch b/shutdown-improvements.patch deleted file mode 100644 index 8d09881e..00000000 --- a/shutdown-improvements.patch +++ /dev/null @@ -1,273 +0,0 @@ -From 2569a5ce16638d99f1ebaaa7774d183496d8b8e8 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 7 Dec 2012 17:28:30 +0100 -Subject: [PATCH] shutdown: downgrade a warning - -All messages of the kind "not all done, %d left" are log_info, except -the one for DM devices. Make it info too. ---- - src/core/shutdown.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/shutdown.c b/src/core/shutdown.c -index 4bb4b4d..192746a 100644 ---- a/src/core/shutdown.c -+++ b/src/core/shutdown.c -@@ -233,7 +233,7 @@ int main(int argc, char *argv[]) { - if (r == 0) - need_dm_detach = false; - else if (r > 0) -- log_warning("Not all DM devices detached, %d left.", r); -+ log_info("Not all DM devices detached, %d left.", r); - else - log_error("Failed to detach DM devices: %s", strerror(-r)); - } --- -1.7.10.4 - -From c678406681d32d56730b9e9c002d5500d7aa7f8b Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 7 Dec 2012 17:34:21 +0100 -Subject: [PATCH] umount: fix check for DM changed - -delete_dm() returns 0 on success. The check for "r > 0" was likely -a copy&paste error from the loopback code where "r > 0" makes sense. ---- - src/core/umount.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/umount.c b/src/core/umount.c -index f6c520e..8776807 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -536,7 +536,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) { - - if ((r = delete_dm(m->devnum)) >= 0) { - -- if (r > 0 && changed) -+ if (changed) - *changed = true; - - mount_point_free(head, m); --- -1.7.10.4 - -From bce93b7ac7642426039863493694d8c12812e2a7 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 7 Dec 2012 17:44:50 +0100 -Subject: [PATCH] shutdown, umount: logging improvements - -In bugreports about hangs during the late shutdown we are often missing -important information - what were we trying to unmount/detach when it hung. - -Instead of printing what we successfully unmounted, print what we are -going to unmount/detach. And add messages to mark the completion of -categories (mount/swap/loop/DM). ---- - src/core/shutdown.c | 20 ++++++++++++-------- - src/core/umount.c | 15 +++++++++------ - 2 files changed, 21 insertions(+), 14 deletions(-) - -diff --git a/src/core/shutdown.c b/src/core/shutdown.c -index 192746a..6783008 100644 ---- a/src/core/shutdown.c -+++ b/src/core/shutdown.c -@@ -197,9 +197,10 @@ int main(int argc, char *argv[]) { - if (need_umount) { - log_info("Unmounting file systems."); - r = umount_all(&changed); -- if (r == 0) -+ if (r == 0) { - need_umount = false; -- else if (r > 0) -+ log_info("All filesystems unmounted."); -+ } else if (r > 0) - log_info("Not all file systems unmounted, %d left.", r); - else - log_error("Failed to unmount file systems: %s", strerror(-r)); -@@ -208,9 +209,10 @@ int main(int argc, char *argv[]) { - if (need_swapoff) { - log_info("Disabling swaps."); - r = swapoff_all(&changed); -- if (r == 0) -+ if (r == 0) { - need_swapoff = false; -- else if (r > 0) -+ log_info("All swaps disabled."); -+ } else if (r > 0) - log_info("Not all swaps are turned off, %d left.", r); - else - log_error("Failed to turn off swaps: %s", strerror(-r)); -@@ -219,9 +221,10 @@ int main(int argc, char *argv[]) { - if (need_loop_detach) { - log_info("Detaching loop devices."); - r = loopback_detach_all(&changed); -- if (r == 0) -+ if (r == 0) { - need_loop_detach = false; -- else if (r > 0) -+ log_info("All loop devices detached."); -+ } else if (r > 0) - log_info("Not all loop devices detached, %d left.", r); - else - log_error("Failed to detach loop devices: %s", strerror(-r)); -@@ -230,9 +233,10 @@ int main(int argc, char *argv[]) { - if (need_dm_detach) { - log_info("Detaching DM devices."); - r = dm_detach_all(&changed); -- if (r == 0) -+ if (r == 0) { - need_dm_detach = false; -- else if (r > 0) -+ log_info("All DM devices detached."); -+ } else if (r > 0) - log_info("Not all DM devices detached, %d left.", r); - else - log_error("Failed to detach DM devices: %s", strerror(-r)); -diff --git a/src/core/umount.c b/src/core/umount.c -index 8776807..fd90d9f 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -443,8 +443,8 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e - continue; - - /* Trying to umount. Forcing to umount if busy (only for NFS mounts) */ -+ log_info("Unmounting %s.", m->path); - if (umount2(m->path, MNT_FORCE) == 0) { -- log_info("Unmounted %s.", m->path); - if (changed) - *changed = true; - -@@ -465,6 +465,7 @@ static int swap_points_list_off(MountPoint **head, bool *changed) { - assert(head); - - LIST_FOREACH_SAFE(mount_point, m, n, *head) { -+ log_info("Disabling swap %s.", m->path); - if (swapoff(m->path) == 0) { - if (changed) - *changed = true; -@@ -500,8 +501,9 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) { - continue; - } - -- if ((r = delete_loopback(m->path)) >= 0) { -- -+ log_info("Deleting loopback %s.", m->path); -+ r = delete_loopback(m->path); -+ if (r >= 0) { - if (r > 0 && changed) - *changed = true; - -@@ -534,14 +536,15 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) { - continue; - } - -- if ((r = delete_dm(m->devnum)) >= 0) { -- -+ log_info("Deleting DM %u:%u.", major(m->devnum), minor(m->devnum)); -+ r = delete_dm(m->devnum); -+ if (r >= 0) { - if (changed) - *changed = true; - - mount_point_free(head, m); - } else { -- log_warning("Could not delete dm %s: %m", m->path); -+ log_warning("Could not delete DM %s: %m", m->path); - n_failed++; - } - } --- -1.7.10.4 - -From 735e0712710a1dc26da0febafb91b242b2687f3f Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 7 Dec 2012 18:02:43 +0100 -Subject: [PATCH] shutdown, umount: use verbs consistently - -Mounts are "unmounted". -Swaps are "deactivated", not "turned off" nor "disabled". -Loop and DM devices are "detached", not "deleted". - -Especially the deleting sounded a bit scary. ---- - src/core/shutdown.c | 8 ++++---- - src/core/umount.c | 10 +++++----- - 2 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/core/shutdown.c b/src/core/shutdown.c -index 6783008..0b0e0c3 100644 ---- a/src/core/shutdown.c -+++ b/src/core/shutdown.c -@@ -207,15 +207,15 @@ int main(int argc, char *argv[]) { - } - - if (need_swapoff) { -- log_info("Disabling swaps."); -+ log_info("Deactivating swaps."); - r = swapoff_all(&changed); - if (r == 0) { - need_swapoff = false; -- log_info("All swaps disabled."); -+ log_info("All swaps deactivated."); - } else if (r > 0) -- log_info("Not all swaps are turned off, %d left.", r); -+ log_info("Not all swaps deactivated, %d left.", r); - else -- log_error("Failed to turn off swaps: %s", strerror(-r)); -+ log_error("Failed to deactivate swaps: %s", strerror(-r)); - } - - if (need_loop_detach) { -diff --git a/src/core/umount.c b/src/core/umount.c -index fd90d9f..96232d3 100644 ---- a/src/core/umount.c -+++ b/src/core/umount.c -@@ -465,7 +465,7 @@ static int swap_points_list_off(MountPoint **head, bool *changed) { - assert(head); - - LIST_FOREACH_SAFE(mount_point, m, n, *head) { -- log_info("Disabling swap %s.", m->path); -+ log_info("Deactivating swap %s.", m->path); - if (swapoff(m->path) == 0) { - if (changed) - *changed = true; -@@ -501,7 +501,7 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) { - continue; - } - -- log_info("Deleting loopback %s.", m->path); -+ log_info("Detaching loopback %s.", m->path); - r = delete_loopback(m->path); - if (r >= 0) { - if (r > 0 && changed) -@@ -509,7 +509,7 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) { - - mount_point_free(head, m); - } else { -- log_warning("Could not delete loopback %s: %m", m->path); -+ log_warning("Could not detach loopback %s: %m", m->path); - n_failed++; - } - } -@@ -536,7 +536,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) { - continue; - } - -- log_info("Deleting DM %u:%u.", major(m->devnum), minor(m->devnum)); -+ log_info("Detaching DM %u:%u.", major(m->devnum), minor(m->devnum)); - r = delete_dm(m->devnum); - if (r >= 0) { - if (changed) -@@ -544,7 +544,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) { - - mount_point_free(head, m); - } else { -- log_warning("Could not delete DM %s: %m", m->path); -+ log_warning("Could not detach DM %s: %m", m->path); - n_failed++; - } - } --- -1.7.10.4 - diff --git a/socket-improve-error-message.patch b/socket-improve-error-message.patch deleted file mode 100644 index 506c4dcd..00000000 --- a/socket-improve-error-message.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 10f70492aea211981e4bdbe58dd7ea110e05cd16 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 20 Nov 2012 00:19:00 +0100 -Subject: [PATCH] socket: improve error message when we cannot spawn the - socket's service unit - ---- - src/core/socket.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/core/socket.c -=================================================================== ---- systemd-195.orig/src/core/socket.c -+++ systemd-195/src/core/socket.c -@@ -1510,7 +1510,7 @@ static void socket_enter_running(Socket - return; - - fail: -- log_warning("%s failed to queue socket startup job: %s", UNIT(s)->id, bus_error(&error, r)); -+ log_warning("%s failed to queue service startup job (Maybe the service file is missing or not a %s unit?): %s", UNIT(s)->id, cfd >= 0 ? "template" : "non-template", bus_error(&error, r)); - socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES); - - if (cfd >= 0) diff --git a/socket-verbose-error-message.patch b/socket-verbose-error-message.patch deleted file mode 100644 index 6a36c5ef..00000000 --- a/socket-verbose-error-message.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 80cba3795da3a43b27cbb219d7daf7d6f049b079 Mon Sep 17 00:00:00 2001 -From: Dimitrios Apostolou -Date: Wed, 19 Dec 2012 22:32:52 +0100 -Subject: [PATCH] socket: Too many incoming connections - -Hello list, - -some socket activated service gave me the error message you can see on -the subject, maybe systemd should be more verbose in that case. - -Thanks, -Dimitris ---- - src/core/socket.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/core/socket.c -=================================================================== ---- systemd-195.orig/src/core/socket.c -+++ systemd-195/src/core/socket.c -@@ -1441,7 +1441,7 @@ static void socket_enter_running(Socket - Service *service; - - if (s->n_connections >= s->max_connections) { -- log_warning("Too many incoming connections (%u)", s->n_connections); -+ log_warning("%s: Too many incoming connections (%u)", UNIT(s)->id, s->n_connections); - close_nointr_nofail(cfd); - return; - } diff --git a/storage-after-cryptsetup.patch b/storage-after-cryptsetup.patch deleted file mode 100644 index 3f92ecbf..00000000 --- a/storage-after-cryptsetup.patch +++ /dev/null @@ -1,103 +0,0 @@ -From b9841589cf16950af7d123ecd128b84464d15a1d Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Mon, 7 Nov 2011 18:04:20 +0100 -Subject: [PATCH] force lvm restart after cryptsetup target is reached - ---- - src/cryptsetup-generator.c | 80 ++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 80 insertions(+), 0 deletions(-) - -Index: systemd-194/src/cryptsetup/cryptsetup-generator.c -=================================================================== ---- systemd-194.orig/src/cryptsetup/cryptsetup-generator.c -+++ systemd-194/src/cryptsetup/cryptsetup-generator.c -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #include "log.h" - #include "util.h" -@@ -64,6 +65,71 @@ static bool has_option(const char *hayst - return false; - } - -+static int create_storage_after_cryptsetup (void) { -+ int r; -+ char *to = NULL, *p = NULL; -+ FILE *f = NULL; -+ -+ if (asprintf(&p, "%s/storage-after-cryptsetup.service", arg_dest) < 0) { -+ r = -ENOMEM; -+ log_error("Failed to allocate unit file name."); -+ goto fail; -+ } -+ -+ if (!(f = fopen(p, "wxe"))) { -+ r = -errno; -+ log_error("Failed to create unit file: %m"); -+ goto fail; -+ } -+ -+ fprintf(f, -+ "[Unit]\n" -+ "Description=Restart storage after cryptsetup\n" -+ "DefaultDependencies=no\n" -+ "After=cryptsetup.target\n" -+ "Wants=cryptsetup.target\n" -+ "Before=local-fs.target\n" -+ "Before=shutdown.target\n"); -+ -+ fprintf(f, -+ "\n[Service]\n" -+ "RemainAfterExit=true\n" -+ "Type=oneshot\n" -+ "TimeoutSec=0\n" -+ "ExecStart=/usr/bin/systemctl restart lvm.service\n"); -+ -+ fflush(f); -+ -+ if (ferror(f)) { -+ r = -errno; -+ log_error("Failed to write file: %m"); -+ goto fail; -+ } -+ -+ if (asprintf(&to, "%s/local-fs.target.wants/storage-after-cryptsetup.service", arg_dest) < 0) { -+ r = -ENOMEM; -+ goto fail; -+ } -+ -+ mkdir_parents(to, 0755); -+ -+ if (symlink("../storage-after-cryptsetup.service", to) < 0) { -+ log_error("Failed to create symlink ../storage-after-cryptsetup.service to '%s': %m", to); -+ r = -errno; -+ goto fail; -+ } -+ -+ r=0; -+fail: -+ free(p); -+ free(to); -+ -+ if (f) -+ fclose(f); -+ -+ return r; -+} -+ - static int create_disk( - const char *name, - const char *device, -@@ -439,6 +505,9 @@ int main(int argc, char *argv[]) { - free(options); - } - -+ if ((r == EXIT_SUCCESS) && (create_storage_after_cryptsetup () < 0)) -+ r = EXIT_FAILURE; -+ - finish: - if (f) - fclose(f); diff --git a/strv-cleanup-error-path-loops.patch b/strv-cleanup-error-path-loops.patch deleted file mode 100644 index 8a8c728d..00000000 --- a/strv-cleanup-error-path-loops.patch +++ /dev/null @@ -1,238 +0,0 @@ -From 1fd8d04e384ae2066c02129b033c6be509edfd67 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 30 Oct 2012 18:29:45 +0100 -Subject: [PATCH] strv: cleanup error path loops - -https://bugzilla.redhat.com/show_bug.cgi?id=858799 ---- - src/shared/strv.c | 100 ++++++++++++++++++++++++++--------------------------- - 1 file changed, 49 insertions(+), 51 deletions(-) - -diff --git a/src/shared/strv.c b/src/shared/strv.c -index 1b8e27b..6b76d0e 100644 ---- a/src/shared/strv.c -+++ b/src/shared/strv.c -@@ -75,25 +75,21 @@ void strv_freep(char ***l) { - char **strv_copy(char **l) { - char **r, **k; - -- k = r = new(char*, strv_length(l)+1); -- if (!k) -+ k = r = new(char*, strv_length(l) + 1); -+ if (!r) - return NULL; - - if (l) -- for (; *l; k++, l++) -- if (!(*k = strdup(*l))) -- goto fail; -+ for (; *l; k++, l++) { -+ *k = strdup(*l); -+ if (!*k) { -+ strv_free(r); -+ return NULL; -+ } -+ } - - *k = NULL; - return r; -- --fail: -- for (k--; k >= r; k--) -- free(*k); -- -- free(r); -- -- return NULL; - } - - unsigned strv_length(char **l) { -@@ -163,13 +159,7 @@ char **strv_new_ap(const char *x, va_list ap) { - return a; - - fail: -- -- for (; i > 0; i--) -- if (a[i-1]) -- free(a[i-1]); -- -- free(a); -- -+ strv_free(a); - return NULL; - } - -@@ -265,16 +255,21 @@ char **strv_split(const char *s, const char *separator) { - FOREACH_WORD_SEPARATOR(w, l, s, separator, state) - n++; - -- if (!(r = new(char*, n+1))) -+ r = new(char*, n+1); -+ if (!r) - return NULL; - - i = 0; -- FOREACH_WORD_SEPARATOR(w, l, s, separator, state) -- if (!(r[i++] = strndup(w, l))) { -+ FOREACH_WORD_SEPARATOR(w, l, s, separator, state) { -+ r[i] = strndup(w, l); -+ if (!r[i]) { - strv_free(r); - return NULL; - } - -+ i++; -+ } -+ - r[i] = NULL; - return r; - } -@@ -292,15 +287,19 @@ char **strv_split_quoted(const char *s) { - FOREACH_WORD_QUOTED(w, l, s, state) - n++; - -- if (!(r = new(char*, n+1))) -+ r = new(char*, n+1); -+ if (!r) - return NULL; - - i = 0; -- FOREACH_WORD_QUOTED(w, l, s, state) -- if (!(r[i++] = cunescape_length(w, l))) { -+ FOREACH_WORD_QUOTED(w, l, s, state) { -+ r[i] = cunescape_length(w, l); -+ if (!r[i]) { - strv_free(r); - return NULL; - } -+ i++; -+ } - - r[i] = NULL; - return r; -@@ -323,7 +322,8 @@ char *strv_join(char **l, const char *separator) { - n += strlen(*s); - } - -- if (!(r = new(char, n+1))) -+ r = new(char, n+1); -+ if (!r) - return NULL; - - e = r; -@@ -352,22 +352,21 @@ char **strv_append(char **l, const char *s) { - if (!r) - return NULL; - -- for (k = r; *l; k++, l++) -- if (!(*k = strdup(*l))) -+ for (k = r; *l; k++, l++) { -+ *k = strdup(*l); -+ if (!*k) - goto fail; -+ } - -- if (!(*(k++) = strdup(s))) -+ k[0] = strdup(s); -+ if (!k[0]) - goto fail; - -- *k = NULL; -+ k[1] = NULL; - return r; - - fail: -- for (k--; k >= r; k--) -- free(*k); -- -- free(r); -- -+ strv_free(r); - return NULL; - } - -@@ -462,7 +461,8 @@ static int env_append(char **r, char ***k, char **a) { - else - free(*j); - -- if (!(*j = strdup(*a))) -+ *j = strdup(*a); -+ if (!*j) - return -ENOMEM; - } - -@@ -484,7 +484,8 @@ char **strv_env_merge(unsigned n_lists, ...) { - } - va_end(ap); - -- if (!(r = new(char*, n+1))) -+ r = new(char*, n+1); -+ if (!r) - return NULL; - - k = r; -@@ -503,11 +504,7 @@ char **strv_env_merge(unsigned n_lists, ...) { - - fail: - va_end(ap); -- -- for (k--; k >= r; k--) -- free(*k); -- -- free(r); -+ strv_free(r); - - return NULL; - } -@@ -619,7 +616,8 @@ char **strv_env_set(char **x, const char *p) { - - /* Overrides the env var setting of p, returns a new copy */ - -- if (!(r = new(char*, strv_length(x)+2))) -+ r = new(char*, strv_length(x)+2); -+ if (!r) - return NULL; - - k = r; -@@ -634,11 +632,7 @@ char **strv_env_set(char **x, const char *p) { - return r; - - fail: -- for (k--; k >= r; k--) -- free(*k); -- -- free(r); -- -+ strv_free(r); - return NULL; - - } -@@ -698,7 +692,8 @@ char **strv_parse_nulstr(const char *s, size_t l) { - if (s[l-1] != 0) - c++; - -- if (!(v = new0(char*, c+1))) -+ v = new0(char*, c+1); -+ if (!v) - return NULL; - - p = s; -@@ -707,11 +702,14 @@ char **strv_parse_nulstr(const char *s, size_t l) { - - e = memchr(p, 0, s + l - p); - -- if (!(v[i++] = strndup(p, e ? e - p : s + l - p))) { -+ v[i] = strndup(p, e ? e - p : s + l - p); -+ if (!v[i]) { - strv_free(v); - return NULL; - } - -+ i++; -+ - if (!e) - break; - --- -1.7.10.4 - diff --git a/support-hybrid-suspend.patch b/support-hybrid-suspend.patch deleted file mode 100644 index ad6b2bda..00000000 --- a/support-hybrid-suspend.patch +++ /dev/null @@ -1,680 +0,0 @@ -From 6524990fdc98370ecba5d9f73e67161e8798c010 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 28 Oct 2012 00:49:04 +0200 -Subject: [PATCH] logind: support for hybrid sleep (i.e. suspend+hibernate at - the same time) - ---- - .gitignore | 1 + - Makefile.am | 17 ++++++++- - man/logind.conf.xml | 5 ++- - man/systemctl.xml | 5 +++ - man/systemd-suspend.service.xml | 42 +++++++++++++-------- - man/systemd.special.xml | 15 ++++++-- - src/core/special.h | 1 + - src/login/logind-button.c | 21 ++++++----- - src/login/logind-button.h | 1 + - src/login/logind-dbus.c | 69 +++++++++++++++++++++++++++++++---- - src/shared/util.c | 24 ++++++++++++ - src/shared/util.h | 1 + - src/sleep/sleep.c | 20 +++++++++- - src/systemctl/systemctl.c | 17 +++++++-- - src/test/test-sleep.c | 39 ++++++++++++++++++++ - units/.gitignore | 1 + - units/hybrid-sleep.target | 13 +++++++ - units/systemd-hybrid-sleep.service.in | 17 +++++++++ - 18 files changed, 264 insertions(+), 45 deletions(-) - create mode 100644 src/test/test-sleep.c - create mode 100644 units/hybrid-sleep.target - create mode 100644 units/systemd-hybrid-sleep.service.in - -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -272,6 +272,7 @@ dist_systemunit_DATA = \ - units/nss-user-lookup.target \ - units/mail-transfer-agent.target \ - units/hibernate.target \ -+ units/hybrid-sleep.target \ - units/http-daemon.target \ - units/poweroff.target \ - units/reboot.target \ -@@ -334,6 +335,7 @@ nodist_systemunit_DATA = \ - units/rescue.service \ - units/user@.service \ - units/systemd-hibernate.service \ -+ units/systemd-hybrid-sleep.service \ - units/systemd-suspend.service \ - units/systemd-halt.service \ - units/systemd-poweroff.service \ -@@ -384,6 +386,7 @@ EXTRA_DIST += \ - units/systemd-udev-settle.service \ - units/debug-shell.service.in \ - units/systemd-hibernate.service.in \ -+ units/systemd-hybrid-sleep.service.in \ - units/systemd-suspend.service.in \ - units/quotaon.service.in \ - introspect.awk \ -@@ -539,6 +542,7 @@ MANPAGES_ALIAS = \ - man/systemd-shutdownd.socket.8 \ - man/systemd-shutdownd.8 \ - man/systemd-hibernate.service.8 \ -+ man/systemd-hybrid-sleep.service.8 \ - man/systemd-sleep.8 \ - man/systemd-shutdown.8 \ - man/systemd-poweroff.service.8 \ -@@ -612,6 +616,7 @@ man/systemd-initctl.8: man/systemd-initc - man/systemd-shutdownd.socket.8: man/systemd-shutdownd.service.8 - man/systemd-shutdownd.8: man/systemd-shutdownd.service.8 - man/systemd-hibernate.service.8: man/systemd-suspend.service.8 -+man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8 - man/systemd-sleep.8: man/systemd-suspend.service.8 - man/systemd-shutdown.8: man/systemd-halt.service.8 - man/systemd-poweroff.service.8: man/systemd-halt.service.8 -Index: systemd-195/man/logind.conf.xml -=================================================================== ---- systemd-195.orig/man/logind.conf.xml -+++ systemd-195/man/logind.conf.xml -@@ -211,8 +211,10 @@ - poweroff, - reboot, - halt, -- kexec and -- hibernate. If -+ kexec, -+ suspend, -+ hibernate, and -+ hybrid-sleep. If - ignore logind will - never handle these keys. Otherwise the - specified action will be taken in the -Index: systemd-195/man/systemctl.xml -=================================================================== ---- systemd-195.orig/man/systemctl.xml -+++ systemd-195/man/systemctl.xml -@@ -1181,6 +1181,11 @@ - Hibernate the system. - - -+ hybrid-sleep -+ -+ Hibernate and suspend the system. -+ -+ - switch-root [ROOT] [INIT] - - Switches to a -Index: systemd-195/man/systemd-suspend.service.xml -=================================================================== ---- systemd-195.orig/man/systemd-suspend.service.xml -+++ systemd-195/man/systemd-suspend.service.xml -@@ -45,6 +45,7 @@ - - systemd-suspend.service - systemd-hibernate.service -+ systemd-hybrid-sleep.service - systemd-sleep - System sleep state logic - -@@ -52,6 +53,7 @@ - - systemd-suspend.service - systemd-hibernate.service -+ systemd-hybrid-sleep.service - /usr/lib/systemd/systemd-sleep - - -@@ -63,20 +65,26 @@ - suspend.target and is responsible - for the actual system suspend. Similar, - systemd-hibernate.service is -- pulled in by hibernate.target to -- executed the actual hibernation. -- -- Immediately before entering system suspend and -- hibernation -- systemd-suspend.service will run -- all executables in -+ pulled in by hibernate.target to -+ execute the actual hibernation. Finally, -+ systemd-hybrid-sleep.service is -+ pulled in by hybrid-sleep.target -+ to execute hybrid hibernation with system -+ suspend. -+ -+ Immediately before entering system suspend -+ and/or hibernation -+ systemd-suspend.service (and the -+ other mentioned units, respectively) will run all -+ executables in - /usr/lib/systemd/system-sleep/ - and pass two arguments to them. The first argument - will be "pre", the second either -- "suspend" or -- "hibernate", depending on the -+ "suspend", -+ "hibernate", or -+ "hybrid-sleep" depending on the - chosen action. Immediately after leaving system -- suspend and hibernation the same executables are run, -+ suspend and/or hibernation the same executables are run, - but the first argument is now - "post". All executables in this - directory are executed in parallel, and execution of -@@ -87,15 +95,17 @@ - /usr/lib/systemd/system-sleep/ - are intended for local use only and should be - considered hacks. If applications want to be notified -- of system suspend and resume there are much nicer -- interfaces available. -+ of system suspend/hibernation and resume there are -+ much nicer interfaces available. - - Note that -- systemd-suspend.service and -- systemd-hibernate.service should -- never be executed directly. Instead, trigger system -- sleep states with a command such as "systemctl -- suspend" or suchlike. -+ systemd-suspend.service, -+ systemd-hibernate.service and -+ systemd-hybrid-sleep.service -+ should never be executed directly. Instead, trigger -+ system sleep states with a command such as -+ "systemctl suspend" or -+ similar. - - - -Index: systemd-195/man/systemd.special.xml -=================================================================== ---- systemd-195.orig/man/systemd.special.xml -+++ systemd-195/man/systemd.special.xml -@@ -63,6 +63,7 @@ - graphical.target, - hibernate.target, - http-daemon.target, -+ hybrid-sleep.target, - halt.target, - kbrequest.target, - kexec.target, -@@ -303,6 +304,15 @@ - - - -+ hybrid-sleep.target -+ -+ A special target unit -+ for hibernating and suspending the -+ system at the same time. This pulls in -+ sleep.target. -+ -+ -+ - halt.target - - A special target unit -@@ -652,9 +662,8 @@ - - A special target unit - that is pulled in by -- suspend.target -- and -- hibernate.target -+ suspend.target, -+ hibernate.target and hybrid-sleep.target - and may be used to hook units - into the sleep state - logic. -Index: systemd-195/src/core/special.h -=================================================================== ---- systemd-195.orig/src/core/special.h -+++ systemd-195/src/core/special.h -@@ -37,6 +37,7 @@ - #define SPECIAL_EXIT_TARGET "exit.target" - #define SPECIAL_SUSPEND_TARGET "suspend.target" - #define SPECIAL_HIBERNATE_TARGET "hibernate.target" -+#define SPECIAL_HYBRID_SLEEP_TARGET "hybrid-sleep.target" - - /* Special boot targets */ - #define SPECIAL_RESCUE_TARGET "rescue.target" -Index: systemd-195/src/login/logind-button.c -=================================================================== ---- systemd-195.orig/src/login/logind-button.c -+++ systemd-195/src/login/logind-button.c -@@ -163,16 +163,18 @@ static int button_handle( - [HANDLE_HALT] = "Halting...", - [HANDLE_KEXEC] = "Rebooting via kexec...", - [HANDLE_SUSPEND] = "Suspending...", -- [HANDLE_HIBERNATE] = "Hibernating..." -+ [HANDLE_HIBERNATE] = "Hibernating...", -+ [HANDLE_HYBRID_SLEEP] = "Hibernating and suspend...", - }; - - static const char * const target_table[_HANDLE_BUTTON_MAX] = { -- [HANDLE_POWEROFF] = "poweroff.target", -- [HANDLE_REBOOT] = "reboot.target", -- [HANDLE_HALT] = "halt.target", -- [HANDLE_KEXEC] = "kexec.target", -- [HANDLE_SUSPEND] = "suspend.target", -- [HANDLE_HIBERNATE] = "hibernate.target" -+ [HANDLE_POWEROFF] = SPECIAL_POWEROFF_TARGET, -+ [HANDLE_REBOOT] = SPECIAL_REBOOT_TARGET, -+ [HANDLE_HALT] = SPECIAL_HALT_TARGET, -+ [HANDLE_KEXEC] = SPECIAL_KEXEC_TARGET, -+ [HANDLE_SUSPEND] = SPECIAL_SUSPEND_TARGET, -+ [HANDLE_HIBERNATE] = SPECIAL_HIBERNATE_TARGET, -+ [HANDLE_HYBRID_SLEEP] = SPECIAL_HYBRID_SLEEP_TARGET - }; - - DBusError error; -@@ -193,7 +195,7 @@ static int button_handle( - return 0; - } - -- inhibit_operation = handle == HANDLE_SUSPEND || handle == HANDLE_HIBERNATE ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN; -+ inhibit_operation = handle == HANDLE_SUSPEND || handle == HANDLE_HIBERNATE || handle == HANDLE_HYBRID_SLEEP ? INHIBIT_SLEEP : INHIBIT_SHUTDOWN; - - /* If the actual operation is inhibited, warn and fail */ - if (!ignore_inhibited && -@@ -305,7 +307,8 @@ static const char* const handle_button_t - [HANDLE_HALT] = "halt", - [HANDLE_KEXEC] = "kexec", - [HANDLE_SUSPEND] = "suspend", -- [HANDLE_HIBERNATE] = "hibernate" -+ [HANDLE_HIBERNATE] = "hibernate", -+ [HANDLE_HYBRID_SLEEP] = "hybrid-sleep", - }; - DEFINE_STRING_TABLE_LOOKUP(handle_button, HandleButton); - DEFINE_CONFIG_PARSE_ENUM(config_parse_handle_button, handle_button, HandleButton, "Failed to parse handle button setting"); -Index: systemd-195/src/login/logind-button.h -=================================================================== ---- systemd-195.orig/src/login/logind-button.h -+++ systemd-195/src/login/logind-button.h -@@ -32,6 +32,7 @@ typedef enum HandleButton { - HANDLE_KEXEC, - HANDLE_SUSPEND, - HANDLE_HIBERNATE, -+ HANDLE_HYBRID_SLEEP, - _HANDLE_BUTTON_MAX, - _HANDLE_BUTTON_INVALID = -1 - } HandleButton; -Index: systemd-195/src/login/logind-dbus.c -=================================================================== ---- systemd-195.orig/src/login/logind-dbus.c -+++ systemd-195/src/login/logind-dbus.c -@@ -145,6 +145,9 @@ - " \n" \ - " \n" \ - " \n" \ -+ " \n" \ -+ " \n" \ -+ " \n" \ - " \n" \ - " \n" \ - " \n" \ -@@ -157,6 +160,9 @@ - " \n" \ - " \n" \ - " \n" \ -+ " \n" \ -+ " \n" \ -+ " \n" \ - " \n" \ - " \n" \ - " \n" \ -@@ -1056,6 +1062,7 @@ static int bus_manager_can_shutdown_or_s - const char *action_multiple_sessions, - const char *action_ignore_inhibit, - const char *sleep_type, -+ const char *sleep_disk_type, - DBusError *error, - DBusMessage **_reply) { - -@@ -1087,6 +1094,17 @@ static int bus_manager_can_shutdown_or_s - } - } - -+ if (sleep_disk_type) { -+ r = can_sleep_disk(sleep_disk_type); -+ if (r < 0) -+ return r; -+ -+ if (r == 0) { -+ result = "na"; -+ goto finish; -+ } -+ } -+ - ul = dbus_bus_get_unix_user(connection, dbus_message_get_sender(message), error); - if (ul == (unsigned long) -1) - return -EIO; -@@ -1236,6 +1254,7 @@ static int bus_manager_do_shutdown_or_sl - const char *action_multiple_sessions, - const char *action_ignore_inhibit, - const char *sleep_type, -+ const char *sleep_disk_type, - DBusError *error, - DBusMessage **_reply) { - -@@ -1273,6 +1292,15 @@ static int bus_manager_do_shutdown_or_sl - return -ENOTSUP; - } - -+ if (sleep_disk_type) { -+ r = can_sleep_disk(sleep_disk_type); -+ if (r < 0) -+ return r; -+ -+ if (r == 0) -+ return -ENOTSUP; -+ } -+ - ul = dbus_bus_get_unix_user(connection, dbus_message_get_sender(message), error); - if (ul == (unsigned long) -1) - return -EIO; -@@ -2067,7 +2095,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.power-off", - "org.freedesktop.login1.power-off-multiple-sessions", - "org.freedesktop.login1.power-off-ignore-inhibit", -- NULL, -+ NULL, NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2079,7 +2107,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.reboot", - "org.freedesktop.login1.reboot-multiple-sessions", - "org.freedesktop.login1.reboot-ignore-inhibit", -- NULL, -+ NULL, NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2092,7 +2120,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.suspend", - "org.freedesktop.login1.suspend-multiple-sessions", - "org.freedesktop.login1.suspend-ignore-inhibit", -- "mem", -+ "mem", NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2104,7 +2132,20 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.hibernate", - "org.freedesktop.login1.hibernate-multiple-sessions", - "org.freedesktop.login1.hibernate-ignore-inhibit", -- "disk", -+ "disk", NULL, -+ &error, &reply); -+ if (r < 0) -+ return bus_send_error_reply(connection, message, &error, r); -+ -+ } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "HybridSleep")) { -+ r = bus_manager_do_shutdown_or_sleep( -+ m, connection, message, -+ SPECIAL_HYBRID_SLEEP_TARGET, -+ INHIBIT_SLEEP, -+ "org.freedesktop.login1.hibernate", -+ "org.freedesktop.login1.hibernate-multiple-sessions", -+ "org.freedesktop.login1.hibernate-ignore-inhibit", -+ "disk", "suspend", - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2117,7 +2158,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.power-off", - "org.freedesktop.login1.power-off-multiple-sessions", - "org.freedesktop.login1.power-off-ignore-inhibit", -- NULL, -+ NULL, NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2128,7 +2169,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.reboot", - "org.freedesktop.login1.reboot-multiple-sessions", - "org.freedesktop.login1.reboot-ignore-inhibit", -- NULL, -+ NULL, NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2140,7 +2181,7 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.suspend", - "org.freedesktop.login1.suspend-multiple-sessions", - "org.freedesktop.login1.suspend-ignore-inhibit", -- "mem", -+ "mem", NULL, - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -@@ -2152,7 +2193,19 @@ static DBusHandlerResult manager_message - "org.freedesktop.login1.hibernate", - "org.freedesktop.login1.hibernate-multiple-sessions", - "org.freedesktop.login1.hibernate-ignore-inhibit", -- "disk", -+ "disk", NULL, -+ &error, &reply); -+ if (r < 0) -+ return bus_send_error_reply(connection, message, &error, r); -+ -+ } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CanHybridSleep")) { -+ r = bus_manager_can_shutdown_or_sleep( -+ m, connection, message, -+ INHIBIT_SLEEP, -+ "org.freedesktop.login1.hibernate", -+ "org.freedesktop.login1.hibernate-multiple-sessions", -+ "org.freedesktop.login1.hibernate-ignore-inhibit", -+ "disk", "suspend", - &error, &reply); - if (r < 0) - return bus_send_error_reply(connection, message, &error, r); -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -5726,6 +5726,30 @@ int can_sleep(const char *type) { - return false; - } - -+int can_sleep_disk(const char *type) { -+ char *w, *state; -+ size_t l, k; -+ int r; -+ _cleanup_free_ char *p = NULL; -+ -+ assert(type); -+ -+ r = read_one_line_file("/sys/power/disk", &p); -+ if (r < 0) -+ return r == -ENOENT ? 0 : r; -+ -+ k = strlen(type); -+ FOREACH_WORD_SEPARATOR(w, l, p, WHITESPACE, state) { -+ if (l == k && memcmp(w, type, l) == 0) -+ return true; -+ -+ if (l == k + 2 && w[0] == '[' && memcmp(w + 1, type, l - 2) == 0 && w[l-1] == ']') -+ return true; -+ } -+ -+ return false; -+} -+ - bool is_valid_documentation_url(const char *url) { - assert(url); - -Index: systemd-195/src/shared/util.h -=================================================================== ---- systemd-195.orig/src/shared/util.h -+++ systemd-195/src/shared/util.h -@@ -531,6 +531,7 @@ int setrlimit_closest(int resource, cons - int getenv_for_pid(pid_t pid, const char *field, char **_value); - - int can_sleep(const char *type); -+int can_sleep_disk(const char *type); - - bool is_valid_documentation_url(const char *url); - -Index: systemd-195/src/sleep/sleep.c -=================================================================== ---- systemd-195.orig/src/sleep/sleep.c -+++ systemd-195/src/sleep/sleep.c -@@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { - - if (streq(argv[1], "suspend")) - verb = "mem"; -- else if (streq(argv[1], "hibernate")) -+ else if (streq(argv[1], "hibernate") || streq(argv[1], "hybrid-sleep")) - verb = "disk"; - else { - log_error("Unknown action '%s'.", argv[1]); -@@ -54,6 +54,16 @@ int main(int argc, char *argv[]) { - goto finish; - } - -+ /* Configure the hibernation mode */ -+ if (streq(argv[1], "hibernate")) { -+ if (write_one_line_file("/sys/power/disk", "platform") < 0) -+ write_one_line_file("/sys/power/disk", "shutdown"); -+ } else if (streq(argv[1], "hybrid-sleep")) { -+ if (write_one_line_file("/sys/power/disk", "suspend") < 0) -+ if (write_one_line_file("/sys/power/disk", "platform") < 0) -+ write_one_line_file("/sys/power/disk", "shutdown"); -+ } -+ - f = fopen("/sys/power/state", "we"); - if (!f) { - log_error("Failed to open /sys/power/state: %m"); -@@ -73,12 +83,18 @@ int main(int argc, char *argv[]) { - "MESSAGE=Suspending system...", - "SLEEP=suspend", - NULL); -- else -+ else if (streq(argv[1], "hibernate")) - log_struct(LOG_INFO, - MESSAGE_ID(SD_MESSAGE_SLEEP_START), - "MESSAGE=Hibernating system...", - "SLEEP=hibernate", - NULL); -+ else -+ log_struct(LOG_INFO, -+ MESSAGE_ID(SD_MESSAGE_SLEEP_START), -+ "MESSAGE=Hibernating and suspending system...", -+ "SLEEP=hybrid-sleep", -+ NULL); - - fputs(verb, f); - fputc('\n', f); -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -99,6 +99,7 @@ static enum action { - ACTION_EXIT, - ACTION_SUSPEND, - ACTION_HIBERNATE, -+ ACTION_HYBRID_SLEEP, - ACTION_RUNLEVEL2, - ACTION_RUNLEVEL3, - ACTION_RUNLEVEL4, -@@ -1608,6 +1609,8 @@ static enum action verb_to_action(const - return ACTION_SUSPEND; - else if (streq(verb, "hibernate")) - return ACTION_HIBERNATE; -+ else if (streq(verb, "hybrid-sleep")) -+ return ACTION_HYBRID_SLEEP; - else - return ACTION_INVALID; - } -@@ -1628,7 +1631,8 @@ static int start_unit(DBusConnection *bu - [ACTION_DEFAULT] = SPECIAL_DEFAULT_TARGET, - [ACTION_EXIT] = SPECIAL_EXIT_TARGET, - [ACTION_SUSPEND] = SPECIAL_SUSPEND_TARGET, -- [ACTION_HIBERNATE] = SPECIAL_HIBERNATE_TARGET -+ [ACTION_HIBERNATE] = SPECIAL_HIBERNATE_TARGET, -+ [ACTION_HYBRID_SLEEP] = SPECIAL_HYBRID_SLEEP_TARGET - }; - - int r, ret = 0; -@@ -1767,6 +1771,10 @@ static int reboot_with_logind(DBusConnec - method = "Hibernate"; - break; - -+ case ACTION_HYBRID_SLEEP: -+ method = "HybridSleep"; -+ break; -+ - default: - return -EINVAL; - } -@@ -1818,7 +1826,8 @@ static int start_special(DBusConnection - (a == ACTION_POWEROFF || - a == ACTION_REBOOT || - a == ACTION_SUSPEND || -- a == ACTION_HIBERNATE)) { -+ a == ACTION_HIBERNATE || -+ a == ACTION_HYBRID_SLEEP)) { - r = reboot_with_logind(bus, a); - if (r >= 0) - return r; -@@ -3999,7 +4008,8 @@ static int systemctl_help(void) { - " exit Request user instance exit\n" - " switch-root [ROOT] [INIT] Change to a different root file system\n" - " suspend Suspend the system\n" -- " hibernate Hibernate the system\n", -+ " hibernate Hibernate the system\n" -+ " hybrid-sleep Hibernate and suspend the system\n", - program_invocation_short_name); - - return 0; -@@ -4931,6 +4941,7 @@ static int systemctl_main(DBusConnection - { "kexec", EQUAL, 1, start_special }, - { "suspend", EQUAL, 1, start_special }, - { "hibernate", EQUAL, 1, start_special }, -+ { "hybrid-sleep", EQUAL, 1, start_special }, - { "default", EQUAL, 1, start_special }, - { "rescue", EQUAL, 1, start_special }, - { "emergency", EQUAL, 1, start_special }, -Index: systemd-195/units/hybrid-sleep.target -=================================================================== ---- /dev/null -+++ systemd-195/units/hybrid-sleep.target -@@ -0,0 +1,13 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Hybrid Suspend+Hibernate -+Documentation=man:systemd.special(7) -+DefaultDependencies=no -+BindsTo=systemd-hybrid-sleep.service -+After=systemd-hybrid-sleep.service -Index: systemd-195/units/systemd-hybrid-sleep.service.in -=================================================================== ---- /dev/null -+++ systemd-195/units/systemd-hybrid-sleep.service.in -@@ -0,0 +1,17 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Hybrid Suspend+Hibernate -+Documentation=man:systemd-suspend.service(8) -+DefaultDependencies=no -+Requires=sleep.target -+After=sleep.target -+ -+[Service] -+Type=oneshot -+ExecStart=@rootlibexecdir@/systemd-sleep hybrid-sleep diff --git a/support-suse-clock-sysconfig.patch b/support-suse-clock-sysconfig.patch deleted file mode 100644 index 0df12081..00000000 --- a/support-suse-clock-sysconfig.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 64ddc0bfa995041196fd0b9c61756d64578f925c Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Tue, 14 Aug 2012 14:26:16 +0200 -Subject: [PATCH] timedate: add support for openSUSE version of - /etc/sysconfig/clock - ---- - src/timedate/timedated.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -Index: systemd-190/src/timedate/timedated.c -=================================================================== ---- systemd-190.orig/src/timedate/timedated.c -+++ systemd-190/src/timedate/timedated.c -@@ -175,6 +175,13 @@ static int read_data(void) { - goto have_timezone; - } - } -+#ifdef TARGET_SUSE -+ r = parse_env_file("/etc/sysconfig/clock", NEWLINE, -+ "TIMEZONE", &tz.zone, -+ NULL); -+ if (r < 0 && r != -ENOENT) -+ log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r)); -+#endif - - #ifdef HAVE_DEBIAN - r = read_one_line_file("/etc/timezone", &tz.zone); diff --git a/support-sysvinit.patch b/support-sysvinit.patch deleted file mode 100644 index 2057a634..00000000 --- a/support-sysvinit.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -4678,10 +4678,13 @@ static int parse_argv(int argc, char *ar - /* Hmm, so some other init system is - * running, we need to forward this - * request to it. For now we simply -- * guess that it is Upstart. */ -- -- execv("/lib/upstart/telinit", argv); -+ * guess that it is Sysvinit or Upstart. */ - -+ if (!access("/lib/sysvinit/telinit", X_OK)) { -+ execv("/lib/sysvinit/telinit", argv); -+ } else { -+ execv("/lib/upstart/telinit", argv); -+ } - log_error("Couldn't find an alternative telinit implementation to spawn."); - return -EIO; - } diff --git a/switch-root-try-pivot-root.patch b/switch-root-try-pivot-root.patch deleted file mode 100644 index d2347eda..00000000 --- a/switch-root-try-pivot-root.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 891a4918ef75fa81e22691156c050d061bd53dd3 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 16 Nov 2012 18:15:30 +0100 -Subject: [PATCH] switch-root: try pivot_root() before overmounting / - -We should always try to umount the old root dir if possible, instead of -overmounting it -- if that's possible. - -The initial ("first") kernel rootfs can never be umounted, hence -for the usual nitrd case we never bothered using pivot_root() and -hence with fully unmounting it. However, fedup now tranisitions twice -during boot, and in that case it is highly desirable that the "second" -root dir is entirely unmounted when we switch to the "third". This patch -makes that possible. - -The pivot_root() needs a directory in the "third" root dir, to move the -"second" root dir to. We use /mnt for that, under the assumption that -this directory is likely to exist, and is not itself a mount point. ---- - src/core/switch-root.c | 27 ++++++++++++++++++++++++++- - 1 file changed, 26 insertions(+), 1 deletion(-) - -diff --git a/src/core/switch-root.c b/src/core/switch-root.c -index 150332a..ce0e41d 100644 ---- a/src/core/switch-root.c -+++ b/src/core/switch-root.c -@@ -30,6 +30,7 @@ - #include "util.h" - #include "path-util.h" - #include "switch-root.h" -+#include "missing.h" - - int switch_root(const char *new_root) { - -@@ -44,10 +45,21 @@ int switch_root(const char *new_root) { - struct stat new_root_stat; - bool old_root_remove; - const char *i; -+ _cleanup_free_ char *temporary_old_root = NULL; - - if (path_equal(new_root, "/")) - return 0; - -+ /* When using pivot_root() we assume that /mnt exists as place -+ * we can temporarily move the old root to. As we immediately -+ * unmount it from there it doesn't matter much which -+ * directory we choose for this, but it should be more likely -+ * than not that /mnt exists and is suitable as mount point -+ * and is on the same fs as the old root dir */ -+ temporary_old_root = strappend(new_root, "/mnt"); -+ if (!temporary_old_root) -+ return -ENOMEM; -+ - old_root_remove = in_initrd(); - - if (stat(new_root, &new_root_stat) < 0) { -@@ -103,7 +115,20 @@ int switch_root(const char *new_root) { - log_warning("Failed to open root directory: %m"); - } - -- if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) { -+ /* We first try a pivot_root() so that we can umount the old -+ * root dir. In many cases (i.e. where rootfs is /), that's -+ * not possible however, and hence we simply overmount root */ -+ if (pivot_root(new_root, temporary_old_root) >= 0) { -+ -+ /* Immediately get rid of the old root. Since we are -+ * running off it we need to do this lazily. */ -+ if (umount2(temporary_old_root, MNT_DETACH) < 0) { -+ r = -errno; -+ log_error("Failed to umount old root dir %s: %m", temporary_old_root); -+ goto fail; -+ } -+ -+ } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) { - r = -errno; - log_error("Failed to mount moving %s to /: %m", new_root); - goto fail; --- -1.7.10.4 - diff --git a/sync-on-shutdown.patch b/sync-on-shutdown.patch deleted file mode 100644 index 6443fb48..00000000 --- a/sync-on-shutdown.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0049f05a8bb82c3e084bacc5945596761d706c55 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 16 Nov 2012 01:30:29 +0100 -Subject: [PATCH] shutdown: readd explicit sync() when shutting down - -As it turns out reboot() doesn't actually imply a file system sync, but -only a disk sync. Accordingly, readd explicit sync() invocations -immediately before we invoke reboot(). - -This is much less dramatic than it might sounds as we umount all -disks/read-only remount them anyway before going down. ---- - src/core/service.c | 1 + - src/core/shutdown.c | 7 +++++++ - 2 files changed, 8 insertions(+) - -Index: systemd-195/src/core/service.c -=================================================================== ---- systemd-195.orig/src/core/service.c -+++ systemd-195/src/core/service.c -@@ -2526,6 +2526,7 @@ static int service_start_limit_test(Serv - - case SERVICE_START_LIMIT_REBOOT_IMMEDIATE: - log_warning("%s start request repeated too quickly, rebooting immediately.", UNIT(s)->id); -+ sync(); - reboot(RB_AUTOBOOT); - break; - -Index: systemd-195/src/core/shutdown.c -=================================================================== ---- systemd-195.orig/src/core/shutdown.c -+++ systemd-195/src/core/shutdown.c -@@ -273,6 +273,13 @@ int main(int argc, char *argv[]) { - } - } - -+ /* The kernel will automaticall flush ATA disks and suchlike -+ * on reboot(), but the file systems need to be synce'd -+ * explicitly in advance. So let's do this here, but not -+ * needlessly slow down containers. */ -+ if (!in_container) -+ sync(); -+ - if (cmd == LINUX_REBOOT_CMD_KEXEC) { - - if (!in_container) { diff --git a/sysctl-modules.patch b/sysctl-modules.patch deleted file mode 100644 index c6d4058d..00000000 --- a/sysctl-modules.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: systemd-189/units/systemd-sysctl.service.in -=================================================================== ---- systemd-189.orig/units/systemd-sysctl.service.in -+++ systemd-189/units/systemd-sysctl.service.in -@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service - DefaultDependencies=no - Conflicts=shutdown.target - After=systemd-readahead-collect.service systemd-readahead-replay.service -+After=systemd-modules-load.service - Before=sysinit.target shutdown.target - ConditionPathIsReadWrite=/proc/sys/ - ConditionPathExists=|/etc/sysctl.conf diff --git a/sysctl-parse-all-keys.patch b/sysctl-parse-all-keys.patch deleted file mode 100644 index 4a8110ca..00000000 --- a/sysctl-parse-all-keys.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 91b32fa987a4a50faf3d8561b28b6c9d5150adef Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Thu, 25 Oct 2012 16:16:19 +0200 -Subject: [PATCH] sysctl: parse all keys in a config file - -https://bugzilla.redhat.com/show_bug.cgi?id=869779 ---- - src/sysctl/sysctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c -index a68d67f..035e0ec 100644 ---- a/src/sysctl/sysctl.c -+++ b/src/sysctl/sysctl.c -@@ -178,7 +178,7 @@ static int parse_file(const char *path, bool ignore_enoent) { - - free(property); - free(new_value); -- if (r != -EEXIST) -+ if (r != 0) - goto finish; - } - } --- -1.7.10.4 - diff --git a/systemctl-no-assert-on-reboot-without-dbus.patch b/systemctl-no-assert-on-reboot-without-dbus.patch deleted file mode 100644 index c2f9afe6..00000000 --- a/systemctl-no-assert-on-reboot-without-dbus.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d255133d8edc84662d2370a77414505a800d1922 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sat, 12 Jan 2013 00:00:22 +0100 -Subject: [PATCH] systemctl: don't hit an assert if we try to reboot and dbus - is dead - -https://bugzilla.redhat.com/show_bug.cgi?id=889624 ---- - src/systemctl/systemctl.c | 3 +++ - 1 file changed, 3 insertions(+) - -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -1744,6 +1744,9 @@ static int reboot_with_logind(DBusConnec - const char *method; - dbus_bool_t interactive = true; - -+ if (!bus) -+ return -EIO; -+ - polkit_agent_open_if_enabled(); - - switch (a) { diff --git a/systemctl-print-wall-on-if-successful.patch b/systemctl-print-wall-on-if-successful.patch deleted file mode 100644 index f056ef87..00000000 --- a/systemctl-print-wall-on-if-successful.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f6bb13ab8db51aaedc825fec2f0458b60309b27a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 14 Feb 2013 14:08:09 -0500 -Subject: [PATCH] systemctl: print wall message only if successful - -systemctl would write to the wall even if unsuccessful. - -https://bugs.freedesktop.org/show_bug.cgi?id=60393 ---- - src/systemctl/systemctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -1825,7 +1825,7 @@ static int start_special(DBusConnection - } - - r = start_unit(bus, args); -- if (r >= 0) -+ if (r == EXIT_SUCCESS) - warn_wall(a); - - return r; diff --git a/systemctl-verbose-message-on-missing-install.patch b/systemctl-verbose-message-on-missing-install.patch deleted file mode 100644 index 93383820..00000000 --- a/systemctl-verbose-message-on-missing-install.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4b9d3dc9748ec3f52a71b06f851f4398462a1c60 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Thu, 6 Dec 2012 16:20:10 +0100 -Subject: [PATCH] systemctl: verbose message on missing [Install] - -People still don't understand what the message implies. -We have to be more verbose (or more intelligent and detect some of the -cases automatically, but that's not so easy). - -https://bugzilla.redhat.com/show_bug.cgi?id=884438 ---- - src/systemctl/systemctl.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -Index: systemd-195/src/systemctl/systemctl.c -=================================================================== ---- systemd-195.orig/src/systemctl/systemctl.c -+++ systemd-195/src/systemctl/systemctl.c -@@ -3783,7 +3783,16 @@ static int enable_unit(DBusConnection *b - } - - if (carries_install_info == 0) -- log_warning("The unit files have no [Install] section. They are not meant to be enabled using systemctl."); -+ log_warning( -+"The unit files have no [Install] section. They are not meant to be enabled\n" -+"using systemctl.\n" -+"Possible reasons for having this kind of units are:\n" -+"1) A unit may be statically enabled by being symlinked from another unit's\n" -+" .wants/ or .requires/ directory.\n" -+"2) A unit's purpose may be to act as a helper for some other unit which has\n" -+" a requirement dependency on it.\n" -+"3) A unit may be started when needed via activation (socket, path, timer,\n" -+" D-Bus, udev, scripted systemctl call, ...).\n"); - - finish: - if (m) diff --git a/systemd-195.tar.xz b/systemd-195.tar.xz deleted file mode 100644 index c1ce2202..00000000 --- a/systemd-195.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9041a8b84ed971d08df2b96f1b7dbb1d49b788e275c7cc39912f656bd826303 -size 1441308 diff --git a/systemd-200.tar.xz b/systemd-200.tar.xz new file mode 100644 index 00000000..e0049a36 --- /dev/null +++ b/systemd-200.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a08baa8fa5c48f0aab683b2f771e4be75c3c852afc45e5cb4df06428ac8c217 +size 2109864 diff --git a/systemd-cgls-fix-piping-output.patch b/systemd-cgls-fix-piping-output.patch deleted file mode 100644 index b7871980..00000000 --- a/systemd-cgls-fix-piping-output.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 7009eec20823add711e0aa452bdf9dfdd677fa4f Mon Sep 17 00:00:00 2001 -From: Anders Olofsson -Date: Mon, 19 Nov 2012 15:25:36 +0100 -Subject: [PATCH] shared/utils: systemd-cgls shows 'n/a' when piping output - --1 was used to signal failure, but the type was unsigned. - -https://bugs.freedesktop.org/show_bug.cgi?id=56644 ---- - src/shared/util.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: systemd-195/src/shared/util.c -=================================================================== ---- systemd-195.orig/src/shared/util.c -+++ systemd-195/src/shared/util.c -@@ -3806,7 +3806,7 @@ int fd_columns(int fd) { - - unsigned columns(void) { - const char *e; -- unsigned c; -+ int c; - - if (_likely_(cached_columns > 0)) - return cached_columns; -@@ -3814,7 +3814,7 @@ unsigned columns(void) { - c = 0; - e = getenv("COLUMNS"); - if (e) -- safe_atou(e, &c); -+ safe_atoi(e, &c); - - if (c <= 0) - c = fd_columns(STDOUT_FILENO); diff --git a/systemd-fix-merge-ignore-dependencies.patch b/systemd-fix-merge-ignore-dependencies.patch deleted file mode 100644 index 3e9f9454..00000000 --- a/systemd-fix-merge-ignore-dependencies.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e45460d666512db4f908f86e8722d7932dcf0f82 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Fri, 25 Jan 2013 19:54:21 +0100 -Subject: [PATCH] job: fix merging with --ignore-dependencies - -This fixes a bug where a job with --ignore-dependencies would wait for -other jobs because it merged into a previously queued job. ---- - src/core/job.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/core/job.c b/src/core/job.c -index e381ea2..6a03d17 100644 ---- a/src/core/job.c -+++ b/src/core/job.c -@@ -166,6 +166,7 @@ static void job_merge_into_installed(Job *j, Job *other) { - assert(other->type == JOB_NOP); - - j->override = j->override || other->override; -+ j->ignore_order = j->ignore_order || other->ignore_order; - } - - Job* job_install(Job *j) { --- -1.7.10.4 - diff --git a/systemd-mini-rpmlintrc b/systemd-mini-rpmlintrc index a9db8b52..219445d9 100644 --- a/systemd-mini-rpmlintrc +++ b/systemd-mini-rpmlintrc @@ -15,3 +15,4 @@ addFilter(".*devel-file-in-non-devel-package.*udev.pc.*") addFilter(".*libgudev-.*shlib-fixed-dependency.*") addFilter(".*suse-filelist-forbidden-systemd-userdirs.*") addFilter("libudev-mini.*shlib-policy-name-error.*") +addFilter("nss-myhostname.*shlib-policy-name-error.*") diff --git a/systemd-mini.changes b/systemd-mini.changes index 4844a41d..984f5e88 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,136 @@ +------------------------------------------------------------------- +Fri Apr 12 16:58:31 UTC 2013 - fcrozat@suse.com + +- Update to release 201: + + udev now supports different nameng policies for network + interface for predictable names. + + udev gained support for loading additional device properties + from an indexed database. %udev_hwdb_update macro should be + used by packages adding entries to this database. + + Journal gained support for "Message Catalog", indexed database + to link up additional information with journal entries. + %journal_catalog_update macro should be used by packages adding + %entries to this database. + + "age" field for tmpfiles entries can be set to 0, forcing + removal of files matching this entry. + + coredumpctl gained "gdb" verb to invoke gdb on selected + coredump. + + New rpm macros has been added: %udev_rules_update(), + %_udevhwdbdir, %_udevrulesdir, %_journalcatalogdir, + %_tmpfilesdir, %_sysctldir. + + In service files, %U can be used for configured user name of + the service. + + nspawn can be invoked without a controlling TTY. + + systemd and nspawn can accept socket file descriptors when + started for socket activation. This allow socket activated + nspawn containers. + + logind can now automatically suspend/hibernate/shutdown system + on idle. + + ConditionACPower can be used in unit file to detect if AC power + source is connected or if system is on battery power. + + EnvironmentFile= in unit files supports file globbing. + + Behaviour of PrivateTmp=, ReadWriteDirectories=, + ReadOnlyDirectories= and InaccessibleDirectories= has + changed. The private /tmp and /var/tmp directories are now + shared by all processes of a service (which means + ExecStartPre= may now leave data in /tmp that ExecStart= of + the same service can still access). When a service is + stopped its temporary directories are immediately deleted + (normal clean-up with tmpfiles is still done in addition to + this though). + + Resource limits (as exposed by cgroup controlers) can be + controlled dynamically at runtime for all units, using + "systemctl set-cgroup-attr foobar.server cgroup.attribute + value". Those settings are stored persistenly on disk. + + systemd-vconsole-setup will now copy all fonts settings to all + allocated VTs. + + timedated now exposes CanNTP property to indicate if a local + NTP service is available. + + pstore file system is mounted by default, if available. + + SMACK policies are loaded at early boot, if available. + + Timer units now support calendar time events. + + systemd-detect-virt detect xen PVs. + + Some distributions specific LSB targets has been dropped: + $x-display-manager, $mail-transfer-agent, + $mail-transport-agent, $mail-transfer-agent, $smtp, $null. As + well mail-transfer-agent.target and syslog.target has been + removed. + + systemd-journal-gatewayd gained SSL support and now runs as + unprivileged user/group + "systemd-journal-gateway:systemd-journal-gateway" + + systemd-analyze will read, when available, boot time + performance from EFI variable from boot loader supporting it. + + A new generator for automatically mounting EFI System Partition + (ESP) to /boot (if empty and no other file system has been + configured in fstab for it). + + logind will now send out PrepareForSleep(false) out + unconditionally, after coming back from suspend. + + tmpfiles gained a new "X" line type, that allows + configuration of files and directories (with wildcards) that + shall be excluded from automatic cleanup ("aging"). + + udev default rules set the device node permissions now only + at "add" events, and do not change them any longer with a + later "change" event. + + A new bootctl tool has been added that is an interface for + certain EFI boot loader operations. + + A new tool kernel-install has been added to install kernel + images according to Boot Loader Specification. + + A new tool systemd-activate can be used to test socket + activation. + + A new group "systemd-journal" is now owning journal files, + replacing "adm" group. + + journalctl gained "--reverse" to show output in reverse order, + "--pager-end" to jump at the end of the journal in the + pager (only less is supported) and "--user-unit" to filter for + user units. + + New unit files has been addedto ease for systemd usage in + initrd. + + "systemctl start" now supports "--irreversible" to queue + operations which can be reserved. It is now used to make + shutdown requests more robust. + + Auke Kok's bootchart has been merged and relicensed to + LGPLv2.1+. + + nss-myhostname has been merged in systemd codebase. + + some defaults sysctl values are now set by default: the safe + sysrq options are turned on, IP route verification is turned + on, and source routing disabled. The recently added hardlink + and softlink protection of the kernel is turned on. + + Add support for predictable network naming logic. It can be + turned off with kernel command line switch: net.ifnames=0 + + journald will now explicitly flush journal files to disk at the + latest 5 min after each write and will mark file offline until + next read. This should increase reliability in case of crash. + + remote-fs-setup.target target has been added to pull in + specific services when at least one remote file system is to be + mounted. + + timers.target and paths.target have been added as canonical + targets to pull user timer and path units, similar to + sockets.targets. + + udev daemon now sets default number of worker processes in + parallel based on number of CPUs instead of RAM. + + Most unit file settings which takes likst of items can now be +reset by assigning empty string to them, using drop-in. + + Add support for drop-in configuration file for units. + + Most unit file settings which takes likst of items can now be + reset by assigning empty string to them, using drop-in. + + improve systemg-cgtop output. + + improve 'systemctl status' output for socket, drop-in for units. + + 'hostnamectl set-hostname' allows setting FQDN hostnames. + + fractional time intervals are now parsed properly. + + localectl can list available X11 keymaps. + + systemd-analyze dot can filter for specific units and has been + rewritten in C. + + systemctl gained "list-dependencies" command. + + Inhibitors are now honored no only in GNOME. +- Many patches has been dropped, being merged upstream. +- Many patches has been renamed and regenerated with git, to have + consistent naming, authorship and comments embedded. +- Add + Revert-service-drop-support-for-SysV-scripts-for-the-early.patch: + re-add support for boot.* initscripts until they are all migrated + to systemd unit files. +- Merge patches for nss-myhostname package to this package. + ------------------------------------------------------------------- Mon Apr 8 14:51:47 CEST 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 18e0bf50..d0d49789 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -25,7 +25,7 @@ Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 195 +Version: 200 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -95,6 +95,8 @@ Requires(post): findutils %endif Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 +Obsoletes: systemd-analyze < 201 +Provides: systemd-analyze = %{version}-%{release} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz Source1: systemd-rpmlintrc Source2: localfs.service @@ -104,199 +106,62 @@ Source5: systemd-insserv_conf Source6: baselibs.conf Source7: libgcrypt.m4 Source8: systemd-journald.init +Source9: nss-myhostname-config Source1060: boot.udev Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink +# Patches auto-generated by git-buildpackage: -Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch +# PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r +Patch0: avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch +# PATCH-FIX-UPSTREAM ptionally-warn-if-nss-myhostname-is-called.patch lnussel@suse.com -- optionally warn if nss-myhostname is called +Patch1: optionally-warn-if-nss-myhostname-is-called.patch +Patch2: Add-bootsplash-handling-for-password-dialogs.patch # handle SUSE specific kbd settings -Patch6: 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch -Patch7: systemd-numlock-suse.patch -# don't start getty on tty1 until all password request are done -Patch8: tty1.patch -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 -Patch22: new-lsb-headers.patch -Patch23: storage-after-cryptsetup.patch -Patch24: delay-fsck-cryptsetup-after-md-lvm-dmraid.patch -Patch31: lock-opensuse.patch -Patch33: crypt-loop-file.patch -Patch36: sysctl-modules.patch -Patch38: dm-lvm-after-local-fs-pre-target.patch -Patch53: fastboot-forcefsck.patch -Patch56: support-suse-clock-sysconfig.patch -Patch59: fix-enable-disable-boot-initscript.patch -Patch60: var-run-lock.patch -Patch63: xdm-display-manager.patch -Patch64: fix-permissions-btmp.patch -# PATCH-FIX-UPSTREAM fix-debugshell.patch fcrozat@suse.com bnc#789052 -- use bash if sushell isn't available -Patch71: fix-debugshell.patch -# PATCH-FIX-OPENSUSE handle-root-uses-lang.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype -Patch72: handle-root-uses-lang.patch -# PATCH-FIX-OPENSUSE multiple-sulogin.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin -Patch76: multiple-sulogin.patch -# PATCH-FIX-OPENSUSE systemctl-options.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable -Patch77: systemctl-options.patch -# PATCH-FIX-UPSTREAM fix-loopback-mount.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available -Patch136: fix-loopback-mount.patch -# PATCH-FIX-UPSTREAM fix-lsb-provides.patch bnc#809646 fcrozat@suse.com -- fix LSB provides -Patch137: fix-lsb-provides.patch -# PATCH-FIX-OPENSUSE logind-nvidia-acl.diff bnc#808319 -- set ACL on nvidia devices -Patch140: logind-nvidia-acl.diff +Patch3: handle-disable_caplock-and-compose_table-and-kbd_rate.patch +Patch4: handle-numlock-value-in-etc-sysconfig-keyboard.patch +Patch6: parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch +Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch +Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch +Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch +Patch10: force-lvm-restart-after-cryptsetup-target-is-reached.patch +Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch +Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch +Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch +Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch +Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch +Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch +Patch18: fix-owner-of-var-log-btmp.patch + +# PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done +Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch +# PATCH-FIX-OPENSUSE Ensure-debugshell-has-a-correct-value.patch fcrozat@suse.com bnc#789052 -- use bash if sushell isn't available +Patch19: Ensure-debugshell-has-a-correct-value.patch +# PATCH-FIX-OPENSUSE handle-root_uses_lang-value-in-etc-sysconfig-language.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype +Patch20: handle-root_uses_lang-value-in-etc-sysconfig-language.patch +# PATCH-FIX-OPENSUSE allow-multiple-sulogin-to-be-started.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin +Patch21: allow-multiple-sulogin-to-be-started.patch +# PATCH-FIX-OPENSUSE handle-SYSTEMCTL_OPTIONS-environment-variable.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable +Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch +# PATCH-FIX-UPSTREAM ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available +Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices +Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts +Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.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 fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal -Patch61: fix-logind-pty-seat.patch -# PATCH-FIX-UPSTREAM fix-build-glibc217.patch fcrozat@suse.com -- fix build with latest glibc -Patch62: fix-build-glibc217.patch -# PATCH-FIX-UPSTREAM fix-bad-memory-access.patch fcrozat@suse.com -- fix bad memory access -Patch65: fix-bad-memory-access.patch -# PATCH-FIX-UPSTREAM fix-dbus-crash.patch fcrozat@suse.com -- fix D-Bus caused crash -Patch66: fix-dbus-crash.patch -# PATCH-FIX-UPSTREAM sync-on-shutdown.patch fcrozat@suse.com -- Sync on shutdown -Patch67: sync-on-shutdown.patch -# PATCH-FIX-UPSTREAM mount-efivars.patch fcrozat@suse.com -- mount efivars if booting under UEFI -Patch68: mount-efivars.patch -# PATCH-FIX-UPSTREAM switch-root-try-pivot-root.patch fcrozat@suse.com -- try pivot_root before overmounting / -Patch69: switch-root-try-pivot-root.patch -# PATCH-FIX-UPSTREAM remount-ro-before-unmount.patch fcrozat@suse.com -- remount ro before unmounting in final shutdown loop -Patch70: remount-ro-before-unmount.patch -# PATCH-FIX-UPSTREAM revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch crrodriguez@opensuse.org -- do not consider failure to umount / and /usr an error. -Patch73: revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch -# PATCH-FIX-UPSTREAM detect-btrfs-ssd.patch crrodriguez@opensuse.org -- fix BTRFS detection on systemd-readhead -Patch74: detect-btrfs-ssd.patch -# PATCH-FIX-UPSTREAM timedated-donot-close-bogus-dbus-connection.patch crrodriguez@opensuse.org -- Fix assertion failure when dbus is gone. -Patch75: timedated-donot-close-bogus-dbus-connection.patch -# PATCH-FIX-UPSTREAM journalctl-remove-leftover-message.patch fcrozat@suse.com -- remove debug message in systemctl -Patch78: journalctl-remove-leftover-message.patch -# PATCH-FIX-UPSTREAM job-avoid-recursion-when-cancelling.patch fcrozat@suse.com -- prevent potential recursion when cancelling a service -Patch79: job-avoid-recursion-when-cancelling.patch -# PATCH-FIX-UPSTREAM sysctl-parse-all-keys.patch fcrozat@suse.com -- ensure sysctl file is fully parsed -Patch80: sysctl-parse-all-keys.patch -# PATCH-FIX-UPSTREAM journal-fix-cutoff-max-date.patch fcrozat@suse.com -- fix computation of cutoff max date for journal -Patch81: journal-fix-cutoff-max-date.patch -# PATCH-FIX-UPSTREAM reword-rescue-mode-hints.patch fcrozat@suse.com -- reword rescue prompt -Patch82: reword-rescue-mode-hints.patch -# PATCH-FIX-UPSTREAM improve-overflow-checks.patch fcrozat@suse.com -- improve time overflow checks -Patch83: improve-overflow-checks.patch -# PATCH-FIX-UPSTREAM fix-swap-behaviour-with-symlinks.patch fcrozat@suse.com -- fix swap behaviour with symlinks -Patch84: fix-swap-behaviour-with-symlinks.patch -# PATCH-FIX-UPSTREAM hostnamectl-fix-set-hostname-with-no-argument.patch fcrozat@suse.com -- ensure hostnamectl requires an argument when called with set-hostname option -Patch85: hostnamectl-fix-set-hostname-with-no-argument.patch -# PATCH-FIX-UPSTREAM agetty-overrides-term.patch fcrozat@suse.com -- pass correctly terminal type to agetty -Patch86: agetty-overrides-term.patch -# PATCH-FIX-UPSTREAM check-for-empty-strings-in-strto-conversions.patch fcrozat@suse.com -- better check for empty strings in strto* conversions -Patch87: check-for-empty-strings-in-strto-conversions.patch -# PATCH-FIX-UPSTREAM strv-cleanup-error-path-loops.patch fcrozat@suse.com -- cleanup strv on error path -Patch88: strv-cleanup-error-path-loops.patch -# PATCH-FIX-UPSTREAM cryptsetup-handle-plain.patch fcrozat@suse.com -- correctly handle "plain" option in cryptsetup -Patch89: cryptsetup-handle-plain.patch -# PATCH-FIX-UPSTREAM fstab-generator-improve-error-message.patch fcrozat@suse.com -- improve error message in fstab-generator -Patch90: fstab-generator-improve-error-message.patch -# PATCH-FIX-UPSTREAM delta-accept-t-option.patch fcrozat@suse.com -- accept -t option in systemd-delta -Patch91: delta-accept-t-option.patch -# PATCH-FIX-UPSTREAM highlight-ordering-cycle-deletions.patch fcrozat@suse.com -- highlight ordering cycle deletions in logs -Patch92: highlight-ordering-cycle-deletions.patch -# PATCH-FIX-UPSTREAM core-interpret-escaped-semicolon-as-escaped.patch fcrozat@suse.com -- accept \; in ExecStart -Patch93: core-interpret-escaped-semicolon-as-escaped.patch -# PATCH-FIX-UPSTREAM hostnamectl-fix-parsing-no-ask-password.patch fcrozat@suse.com -- accept no-ask-password in hostnamectl -Patch94: hostnamectl-fix-parsing-no-ask-password.patch -# PATCH-FIX-UPSTREAM systemd-cgls-fix-piping-output.patch fcrozat@suse.com -- fix piping output of systemd-cgls -Patch95: systemd-cgls-fix-piping-output.patch -# PATCH-FIX-UPSTREAM core-load-fragment-improve-error-message.patch fcrozat@suse.com -- improve error message when parsing fragments -Patch96: core-load-fragment-improve-error-message.patch -# PATCH-FIX-UPSTREAM fix-potential-bad-mem-access.patch fcrozat@suse.com -- fix potential bad memory access -Patch97: fix-potential-bad-mem-access.patch -# PATCH-FIX-UPSTREAM socket-improve-error-message.patch fcrozat@suse.com -- improve error message in socket handling -Patch98: socket-improve-error-message.patch -# PATCH-FIX-UPSTREAM journal-send-always-send-syslog_identifier.patch fcrozat@suse.com -- always send syslog_identifier if available for journal -Patch99: journal-send-always-send-syslog_identifier.patch -# PATCH-FIX-UPSTREAM crypsetup-handle-nofail.patch fcrozat@suse.com -- handle nofail in cryptsetup -Patch100: crypsetup-handle-nofail.patch -# PATCH-FIX-UPSTREAM crypsetup-generator-state-file-name-in-error-message.patch fcrozat@suse.com -- add filename in error message from crypsetup-generator -Patch101: crypsetup-generator-state-file-name-in-error-message.patch -# PATCH-FIX-UPSTREAM fstab-generator-error-message-on-duplicates.patch fcrozat@suse.com -- improve error message on duplicate in fstab-generator -Patch102: fstab-generator-error-message-on-duplicates.patch -# PATCH-FIX-UPSTREAM systemctl-verbose-message-on-missing-install.patch fcrozat@suse.com -- reword missing install error message in systemctl -Patch103: systemctl-verbose-message-on-missing-install.patch -# PATCH-FIX-UPSTREAM shutdown-improvements.patch fcrozat@suse.com -- various improvements at shutdown -Patch104: shutdown-improvements.patch -# PATCH-FIX-UPSTREAM localectl-fix-assertion.patch fcrozat@suse.com -- fix assertion in localectl -Patch105: localectl-fix-assertion.patch -# PATCH-FIX-UPSTREAM path-util-fix-potential-crash.patch fcrozat@suse.com -- fix potential crash in path-util -Patch106: path-util-fix-potential-crash.patch -# PATCH-FIX-UPSTREAM coredumpctl-fix-crash.patch fcrozat@suse.com -- fix crash in coredumpctl -Patch107: coredumpctl-fix-crash.patch -# PATCH-FIX-UPSTREAM socket-verbose-error-message.patch fcrozat@suse.com -- add more verbose error message in socket handling -Patch108: socket-verbose-error-message.patch -# PATCH-FIX-UPSTREAM pam-properly-handle-ssh-logins-without-pam-tty-field.patch fcrozat@suse.com -- handle properly ssh-logins without pam tty field -Patch109: pam-properly-handle-ssh-logins-without-pam-tty-field.patch -# PATCH-FIX-UPSTREAM fstab-generator-properly-detect-bind-mounts.patch fcrozat@suse.com -- properly detect bind-mounts in fstab-generator -Patch110: fstab-generator-properly-detect-bind-mounts.patch -# PATCH-FIX-UPSTREAM localectl-support-systems-without-locale-archive.patch fcrozat@suse.com -- localectl now supports systemd without locale-archive file -Patch111: localectl-support-systems-without-locale-archive.patch -# PATCH-FIX-UPSTREAM logind-capability-making-seats-without-fb.patch fcrozat@suse.com -- allows capability of making seats without fb -Patch112: logind-capability-making-seats-without-fb.patch -# PATCH-FIX-UPSTREAM service-forking-ignore-exit-status-main-process.patch fcrozat@suse.com -- ignore exit-statis of main process when forking, if specified in unit file -Patch113: service-forking-ignore-exit-status-main-process.patch -# PATCH-FIX-UPSTREAM systemctl-no-assert-on-reboot-without-dbus.patch fcrozat@suse.com -- don't assert on reboot if dbus isn't there -Patch114: systemctl-no-assert-on-reboot-without-dbus.patch -# PATCH-FIX-UPSTREAM logind-ignore-non-tty-non-x11-session-on-shutdown.patch fcrozat@suse.com -- ignore non tty non-x11 session on shutdown -Patch115: logind-ignore-non-tty-non-x11-session-on-shutdown.patch -# PATCH-FIX-UPSTREAM journalctl-quit-on-io-error.patch fcrozat@suse.com -- fix journalctl quit on io error -Patch116: journalctl-quit-on-io-error.patch -# PATCH-FIX-UPSTREAM do-not-make-sockets-dependent-on-lo.patch fcrozat@suse.com -- do not make sockets dependent on lo interface -Patch117: do-not-make-sockets-dependent-on-lo.patch -# PATCH-FIX-UPSTREAM shutdown-dont-force-mnt-force-on-final-umount.patch fcrozat@suse.com -- don't force MNT_FORCE on final umount at shutdown -Patch118: shutdown-dont-force-mnt-force-on-final-umount.patch -# PATCH-FIX-UPSTREAM shutdown-ignore-loop-devices-without-backing-file.patch fcrozat@suse.com -- ignore loop devices without backing file at shutdown -Patch119: shutdown-ignore-loop-devices-without-backing-file.patch -# PATCH-FIX-UPSTREAM fix-bad-mem-access.patch fcrozat@suse.com -- fix bad memory access -Patch120: fix-bad-mem-access.patch -# PATCH-FIX-UPSTREAM parse-multiline-env-file.patch fcrozat@suse.com bnc#793411 -- correctly parse multiline environment files -Patch121: parse-multiline-env-file.patch -# PATCH-FIX-UPSTREAM improve-man-environment.patch fcrozat@suse.com -- improve Environment section in manpage -Patch122: improve-man-environment.patch -# PATCH-FIX-UPSTREAM tmpfiles-X-type.patch fcrozat@suse.com -- allow to clean directories with removing them -Patch123: tmpfiles-X-type.patch -# PATCH-FIX-UPSTREAM systemd-fix-merge-ignore-dependencies.patch fcrozat@suse.com bnc#800365 -- fix merging with --ignore-dependencies waiting for dependencies -Patch124: systemd-fix-merge-ignore-dependencies.patch -# PATCH-FIX-UPSTREAM journalctl-require-argument-for-priority -Patch125: journalctl-require-argument-for-priority -# PATCH-FIX-UPSTREAM cryptsetup-accept-read-only.patch fcrozat@suse.com -- Accept read-only as well as readonly as parameters for crypttab -Patch126: cryptsetup-accept-read-only.patch # PATCH-FIX-OPENSUSE disable-nss-myhostname-warning-bnc-783841.diff lnussel@suse.de -- disable nss-myhostname warning (bnc#783841) -Patch127: disable-nss-myhostname-warning-bnc-783841.diff -# PATCH-FIX-UPSTREAM early-sync-shutdown.patch fcrozat@suse.com -- Start sync on shutdown early -Patch128: early-sync-shutdown.patch +Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) -Patch129: handle-HOSTNAME.patch -# PATCH-FIX-UPSTREAM systemctl-print-wall-on-if-successful.patch fcrozat@suse.com -- Only print on wall if successful -Patch130: systemctl-print-wall-on-if-successful.patch -# PATCH-FIX-UPSTREAM improve-bash-completion.patch fcrozat@suse.com -- improve bash completion -Patch131: improve-bash-completion.patch -# PATCH-FIX-UPSTREAM improve-journal-perf.patch fcrozat@suse.com -- improve journal performance -Patch132: improve-journal-perf.patch -# PATCH-FIX-UPSTREAM support-hybrid-suspend.patch fcrozat@suse.com -- support hybrid suspend -Patch133: support-hybrid-suspend.patch -# PATCH-FIX-OPENSUSE forward-to-pmutils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils -Patch134: forward-to-pmutils.patch -# PATCH-FIX-UPSTREAM rbind-mount.patch fcrozat@suse.com bnc#804575 -- Handle rbind mount point correctly -Patch135: rbind-mount.patch -# PATCH-FIX-UPSTREAM fix-journal-vacuum-logic.patch bnc#789589 -- fix journal vacuum logic -Patch138: fix-journal-vacuum-logic.patch -# PATCH-FIX-UPSTREAM improve-readahead-spinning.patch -- improve readahead on spinning disk -Patch139: improve-readahead-spinning.patch -# PATCH-FIX-UPSTREAM wait-for-processes-killed.patch -- wait for processes killed by SIGTERM before killing them with SIGKILL -Patch141: wait-for-processes-killed.patch -# PATCH-FIX-UPSTREAM do-no-isolate-on-fsck-failure.patch bnc#812874 -- do not isolate if fsck fails -Patch142: do-no-isolate-on-fsck-failure.patch +Patch24: handle-etc-HOSTNAME.patch +# PATCH-FIX-OPENSUSE Forward-suspend-hibernate-calls-to-pm-utils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils +Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -310,45 +175,9 @@ Patch1004: 1004-udev-netlink-null-rules.patch # PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch Patch1005: 1005-udev-fix-sg-autoload-regression.patch # PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr -Patch1006: 1006-fix-devname-prefix.patch -# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch -Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch -# PATCH-FIX-UPSTREAM 1008-udev-path_id-handle-Hyper-V-devices.patch -Patch1008: 1008-udev-path_id-handle-Hyper-V-devices.patch -# PATCH-FIX-UPSTREAM 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch -Patch1009: 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch -# PATCH-FIX-UPSTREAM 1010-keymap-Add-Samsung-700T.patch -Patch1010: 1010-keymap-Add-Samsung-700T.patch -# PATCH-FIX-UPSTREAM 1011-libudev-avoid-leak-during-realloc-failure.patch -Patch1011: 1011-libudev-avoid-leak-during-realloc-failure.patch -# PATCH-FIX-UPSTREAM 1012-libudev-do-not-resolve-attr-device-symlinks.patch -Patch1012: 1012-libudev-do-not-resolve-attr-device-symlinks.patch -# PATCH-FIX-UPSTREAM 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch -Patch1013: 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch -# PATCH-FIX-UPSTREAM 1014-udev-fix-whitespace.patch -Patch1014: 1014-udev-fix-whitespace.patch -# PATCH-FIX-UPSTREAM 1015-udev-properly-handle-symlink-removal-by-change-event.patch -Patch1015: 1015-udev-properly-handle-symlink-removal-by-change-event.patch -# PATCH-FIX-UPSTREAM 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch -Patch1016: 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch -# PATCH-FIX-UPSTREAM 1017-udev-use-usec_t-and-now.patch -Patch1017: 1017-udev-use-usec_t-and-now.patch -# PATCH-FIX-UPSTREAM 1018-keymap-add-aditional-support.patch -Patch1018: 1018-keymap-add-aditional-support.patch -# PATCH-FIX-UPSTREAM 1019-udev-Fix-device-matching-in-the-accelerometer.patch -Patch1019: 1019-udev-Fix-device-matching-in-the-accelerometer.patch -# PATCH-FIX-OPENSUSE 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch -Patch1020: 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch +Patch1007: 1007-fix-devname-prefix.patch # PATCH-FIX-OPENSUSE 1021-create-default-links-for-primary-cd_dvd-drive.patch Patch1021: 1021-create-default-links-for-primary-cd_dvd-drive.patch -# PATCH-FIX-UPSTREAM 1022-udev-use-unique-names-for-temporary-files-created-in.patch -Patch1022: 1022-udev-use-unique-names-for-temporary-files-created-in.patch -# PATCH-FIX-UPSTREAM 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch -Patch1023: 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch -# PATCH-FIX-UPSTREAM 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch -Patch1024: 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch -# PATCH-FIX-UPSTREAM 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch -Patch1025: 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch # PATCH-FIX-OPENSUSE 1026-re-add-persistent-net.patch Patch1026: 1026-re-add-persistent-net.patch # PATCH-FIX-OPENSUSE 1027-udev-always-rename-network.patch @@ -387,22 +216,6 @@ Provides: sysvinit:/sbin/init %description sysvinit Drop-in replacement of System V init tools. -%package analyze -Summary: Tool for processing systemd profiling information -License: LGPL-2.1+ -Group: System/Base -Requires: %{name} = %{version} -Requires: dbus-1-python -Requires: python-cairo -# for the systemd-analyze split: -Conflicts: systemd < 44-10 - -%description analyze -'systemd-analyze blame' lists which systemd unit needed how much time to finish -initialization at boot. -'systemd-analyze plot' renders an SVG visualizing the parallel start of units -at boot. - %package -n %{udevpkgname} Summary: A rule-based device node and kernel event manager License: GPL-2.0 @@ -502,6 +315,33 @@ Conflicts: otherproviders(syslog) %description logger This package marks the installation to not use syslog but only the journal. +%package -n nss-myhostname +Summary: Plugin for local system host name resolution +License: LGPL-2.1+ +Group: System/Libraries + +%description -n nss-myhostname +nss-myhostname is a plugin for the GNU Name Service Switch (NSS) +functionality of the GNU C Library (glibc) providing host name +resolution for the locally configured system hostname as returned by +gethostname(2). Various software relies on an always resolvable local +host name. When using dynamic hostnames this is usually achieved by +patching /etc/hosts at the same time as changing the host name. This +however is not ideal since it requires a writable /etc file system and +is fragile because the file might be edited by the administrator at +the same time. nss-myhostname simply returns all locally +configured public IP addresses, or -- if none are configured -- +the IPv4 address 127.0.0.2 (wich is on the local loopback) and the +IPv6 address ::1 (which is the local host) for whatever system +hostname is configured locally. Patching /etc/hosts is thus no +longer necessary. + +Note that nss-myhostname only provides a workaround for broken +software. If nss-myhostname is trigged by an application a message +is logged to /var/log/messages. Please check whether that's worth +a bug report then. +This package marks the installation to not use syslog but only the journal. + %endif %prep @@ -518,153 +358,62 @@ cp %{SOURCE7} m4/ %patch1003 -p1 %patch1004 -p1 %patch1005 -p1 -%patch1006 -p1 %patch1007 -p1 -%patch1008 -p1 -%patch1009 -p1 -%patch1010 -p1 -%patch1011 -p1 -%patch1012 -p1 -%patch1013 -p1 -%patch1014 -p1 -%patch1015 -p1 -%patch1016 -p1 -%patch1017 -p1 -%patch1018 -p1 -%patch1019 -p1 -%patch1020 -p1 %patch1021 -p1 -%patch1022 -p1 -%patch1023 -p1 -%patch1024 -p1 -%patch1025 -p1 %patch1026 -p1 %patch1027 -p1 #systemd +%patch0 -p1 %patch1 -p1 -%patch6 -p1 +%patch2 -p1 +%patch3 -p1 # don't apply when bootstrapping to not modify configure.in %if ! 0%{?bootstrap} -%patch7 -p1 +%patch4 -p1 %endif +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 %patch13 -p1 +%patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 -%patch31 -p1 -%patch33 -p1 -%patch36 -p1 -%patch38 -p1 -%patch53 -p1 -%patch56 -p1 -%patch59 -p1 -%patch60 -p1 -%patch61 -p1 -%patch62 -p1 -%patch63 -p1 -%patch64 -p1 -%patch65 -p1 -%patch66 -p1 -%patch67 -p1 -%patch68 -p1 -%patch69 -p1 -%patch70 -p1 -%patch71 -p1 -%patch72 -p1 -%patch73 -p1 -%patch74 -p1 -%patch75 -p1 -%patch76 -p1 -%patch77 -p1 -%patch78 -p1 -%patch79 -p1 -%patch80 -p1 -%patch81 -p1 -%patch82 -p1 -%patch83 -p1 -%patch84 -p1 -%patch85 -p1 -%patch86 -p1 -%patch87 -p1 -%patch88 -p1 -%patch89 -p1 -%patch90 -p1 -%patch91 -p1 -%patch92 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -p1 -%patch96 -p1 -%patch97 -p1 -%patch98 -p1 -%patch99 -p1 -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 -%patch115 -p1 -%patch116 -p1 -%patch117 -p1 -%patch118 -p1 -%patch119 -p1 -%patch120 -p1 -%patch121 -p1 -%patch122 -p1 -%patch123 -p1 -%patch124 -p1 -%patch125 -p1 -%patch126 -p1 -%patch127 -p1 -%patch128 -p1 -%patch129 -p1 -%patch130 -p1 -%patch131 -p1 -%patch132 -p1 -%patch133 -p1 -%patch134 -p1 -%patch135 -p1 -%patch136 -p1 -%patch137 -p1 -%patch138 -p1 -%patch139 -p1 -%patch140 -p1 -%patch141 -p1 -%patch142 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch37 -p1 %build autoreconf -fiv -# to remove after upgrading to systemd 196+ -rm -f man/{systemd.exec.5,logind.conf.5,systemctl.1,systemd-suspend.service.8,systemd.special.7,tmpfiles.d.5} # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; export V=1 # keep split-usr until all packages have moved their systemd rules to /usr %configure \ - --with-distro=suse \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ %if 0%{?bootstrap} --disable-gudev \ + --disable-myhostname \ %else --enable-manpages \ --enable-gtk-doc \ + --with-nss-my-hostname-warning \ %endif --enable-selinux \ --enable-split-usr \ @@ -675,6 +424,11 @@ make %{?_smp_mflags} %install %makeinstall +# move to %{_lib} +%if ! 0%{?bootstrap} +mv $RPM_BUILD_ROOT%{_libdir}/libnss_myhostname.so.2 $RPM_BUILD_ROOT/%{_lib} +%endif + mkdir -p $RPM_BUILD_ROOT/{sbin,lib,bin} ln -sf %{_bindir}/udevadm $RPM_BUILD_ROOT/sbin/udevadm ln -sf %{_bindir}/systemd-ask-password $RPM_BUILD_ROOT/bin/systemd-ask-password @@ -687,6 +441,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware %if ! 0%{?bootstrap} install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald +install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config %endif sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060} @@ -701,8 +456,6 @@ install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants -#workaround for 716939 -chmod 644 %{buildroot}%{_bindir}/systemd-analyze mkdir -p %{buildroot}%{_sysconfdir}/rpm install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete @@ -750,7 +503,7 @@ rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount # kernel.core_pattern setting until systemd-coredump is a part of an actual # systemd release and it's made clear how to get the core dumps out of the # journal. -rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/coredump.conf +rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/50-coredump.conf # remove README file for now rm -f %{buildroot}/etc/init.d/README @@ -770,6 +523,13 @@ ln -s /usr/lib/udev %{buildroot}/lib/udev # Create the /var/log/journal directory to change the volatile journal to a persistent one mkdir -p %{buildroot}/var/log/journal +# Make sure directories in /var exist +mkdir -p %{buildroot}/var/lib/systemd/coredump +mkdir -p %{buildroot}/var/lib/systemd/catalog +#create ghost databases +touch %{buildroot}/var/lib/systemd/catalog/database +touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin + # Make sure the NTP units dir exists mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/ @@ -790,7 +550,9 @@ perl -i -pe 's{^# the VT is cleared.*}{}i;s{(^TTYVTDisallocate=.*)}{}' "$dst" %fdupes -s %{buildroot}%{_mandir} %pre -getent group adm >/dev/null || groupadd -r adm +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d /var/log/journal -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : +getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : exit 0 %post @@ -799,6 +561,7 @@ exit 0 /usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || : /usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : +/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -869,6 +632,7 @@ if test -f /proc/1/exe -a -d /proc/1/root ; then fi %post -n %{udevpkgname} +/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : %{fillup_and_insserv -Y boot.udev} # add KERNEL name match to existing persistent net rules sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ @@ -928,6 +692,15 @@ if [ "$1" -eq 1 ]; then systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : fi +%preun -n nss-myhostname +if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then + %{_sbindir}/nss-myhostname-config --disable +fi + +%post -n nss-myhostname -p /sbin/ldconfig + +%postun -n nss-myhostname -p /sbin/ldconfig + %endif %clean @@ -938,9 +711,12 @@ fi /bin/systemd /bin/systemd-ask-password /bin/systemctl +%{_bindir}/bootctl +%{_bindir}/kernel-install %{_bindir}/hostnamectl %{_bindir}/localectl %{_bindir}/systemctl +%{_bindir}/systemd-analyze %{_bindir}/systemd-coredumpctl %{_bindir}/systemd-delta %{_bindir}/systemd-notify @@ -986,6 +762,9 @@ fi %exclude %{_prefix}/lib/systemd/systemd-udevd %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd +%dir %{_prefix}/lib/systemd/catalog +%{_prefix}/lib/systemd/catalog/systemd.catalog +%dir %{_prefix}/lib/systemd/system-shutdown %dir %{_prefix}/lib/systemd/system-shutdown %dir %{_prefix}/lib/systemd/system-preset %dir %{_prefix}/lib/systemd/user-preset @@ -1000,6 +779,7 @@ fi %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator @@ -1017,6 +797,7 @@ fi %dir %{_sysconfdir}/binfmt.d %dir %{_libexecdir}/sysctl.d +%{_libexecdir}/sysctl.d/50-default.conf %dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/systemd @@ -1024,6 +805,7 @@ fi %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd %dir %{_sysconfdir}/xdg/systemd/user +%config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf %config(noreplace) %{_sysconfdir}/systemd/journald.conf @@ -1064,9 +846,6 @@ fi %exclude %{_mandir}/man8/runlevel.8* %exclude %{_mandir}/man*/*udev*.[0-9]* -# Packaged in analyze subpackage -%exclude %{_mandir}/man1/systemd-analyze.1* - %{_mandir}/man1/*.1* %{_mandir}/man3/*.3* %{_mandir}/man5/*.5* @@ -1084,12 +863,16 @@ fi %if ! 0%{?bootstrap} %{_prefix}/lib/udev/numlock-on %endif -%dir %{_sysconfdir}/bash_completion.d -%{_sysconfdir}/bash_completion.d/systemd-bash-completion.sh +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%ghost /var/lib/systemd/catalog/database +%{_datadir}/bash-completion/completions/* %{_sysconfdir}/rpm/macros.systemd %dir /var/lib/systemd %dir /var/lib/systemd/sysv-convert %dir /var/lib/systemd/migrated +%dir /var/lib/systemd/catalog +%dir /var/lib/systemd/coredump %files devel %defattr(-,root,root,-) @@ -1129,13 +912,6 @@ fi %{_mandir}/man8/runlevel.8* %endif -%files analyze -%defattr(-,root,root) -%attr(0755,root,root) /usr/bin/systemd-analyze -%if ! 0%{?bootstrap} -%{_mandir}/man1/systemd-analyze.1* -%endif - %files -n %{udevpkgname} %defattr(-,root,root) /sbin/udevd @@ -1167,9 +943,12 @@ fi %exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/udev/rules.d/*.rules +%dir %{_prefix}/lib/udev/hwdb.d +%{_prefix}/lib/udev/hwdb.d/* %{_sysconfdir}/init.d/boot.udev %dir %{_sysconfdir}/udev/ %dir %{_sysconfdir}/udev/rules.d/ +%ghost %{_sysconfdir}/udev/hwdb.bin %config(noreplace) %{_sysconfdir}/udev/udev.conf %if ! 0%{?bootstrap} %{_mandir}/man?/*udev*.[0-9]* @@ -1230,6 +1009,11 @@ fi /var/log/README /etc/init.d/systemd-journald +%files -n nss-myhostname +%defattr(-, root, root) +%{_sbindir}/nss-myhostname-config +/%{_lib}/*nss_myhostname* + %endif %changelog diff --git a/systemd-rpmlintrc b/systemd-rpmlintrc index a9db8b52..219445d9 100644 --- a/systemd-rpmlintrc +++ b/systemd-rpmlintrc @@ -15,3 +15,4 @@ addFilter(".*devel-file-in-non-devel-package.*udev.pc.*") addFilter(".*libgudev-.*shlib-fixed-dependency.*") addFilter(".*suse-filelist-forbidden-systemd-userdirs.*") addFilter("libudev-mini.*shlib-policy-name-error.*") +addFilter("nss-myhostname.*shlib-policy-name-error.*") diff --git a/systemd.changes b/systemd.changes index 3fecc999..0c46ae31 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,136 @@ +------------------------------------------------------------------- +Fri Apr 12 16:58:31 UTC 2013 - fcrozat@suse.com + +- Update to release 201: + + udev now supports different nameng policies for network + interface for predictable names. + + udev gained support for loading additional device properties + from an indexed database. %udev_hwdb_update macro should be + used by packages adding entries to this database. + + Journal gained support for "Message Catalog", indexed database + to link up additional information with journal entries. + %journal_catalog_update macro should be used by packages adding + %entries to this database. + + "age" field for tmpfiles entries can be set to 0, forcing + removal of files matching this entry. + + coredumpctl gained "gdb" verb to invoke gdb on selected + coredump. + + New rpm macros has been added: %udev_rules_update(), + %_udevhwdbdir, %_udevrulesdir, %_journalcatalogdir, + %_tmpfilesdir, %_sysctldir. + + In service files, %U can be used for configured user name of + the service. + + nspawn can be invoked without a controlling TTY. + + systemd and nspawn can accept socket file descriptors when + started for socket activation. This allow socket activated + nspawn containers. + + logind can now automatically suspend/hibernate/shutdown system + on idle. + + ConditionACPower can be used in unit file to detect if AC power + source is connected or if system is on battery power. + + EnvironmentFile= in unit files supports file globbing. + + Behaviour of PrivateTmp=, ReadWriteDirectories=, + ReadOnlyDirectories= and InaccessibleDirectories= has + changed. The private /tmp and /var/tmp directories are now + shared by all processes of a service (which means + ExecStartPre= may now leave data in /tmp that ExecStart= of + the same service can still access). When a service is + stopped its temporary directories are immediately deleted + (normal clean-up with tmpfiles is still done in addition to + this though). + + Resource limits (as exposed by cgroup controlers) can be + controlled dynamically at runtime for all units, using + "systemctl set-cgroup-attr foobar.server cgroup.attribute + value". Those settings are stored persistenly on disk. + + systemd-vconsole-setup will now copy all fonts settings to all + allocated VTs. + + timedated now exposes CanNTP property to indicate if a local + NTP service is available. + + pstore file system is mounted by default, if available. + + SMACK policies are loaded at early boot, if available. + + Timer units now support calendar time events. + + systemd-detect-virt detect xen PVs. + + Some distributions specific LSB targets has been dropped: + $x-display-manager, $mail-transfer-agent, + $mail-transport-agent, $mail-transfer-agent, $smtp, $null. As + well mail-transfer-agent.target and syslog.target has been + removed. + + systemd-journal-gatewayd gained SSL support and now runs as + unprivileged user/group + "systemd-journal-gateway:systemd-journal-gateway" + + systemd-analyze will read, when available, boot time + performance from EFI variable from boot loader supporting it. + + A new generator for automatically mounting EFI System Partition + (ESP) to /boot (if empty and no other file system has been + configured in fstab for it). + + logind will now send out PrepareForSleep(false) out + unconditionally, after coming back from suspend. + + tmpfiles gained a new "X" line type, that allows + configuration of files and directories (with wildcards) that + shall be excluded from automatic cleanup ("aging"). + + udev default rules set the device node permissions now only + at "add" events, and do not change them any longer with a + later "change" event. + + A new bootctl tool has been added that is an interface for + certain EFI boot loader operations. + + A new tool kernel-install has been added to install kernel + images according to Boot Loader Specification. + + A new tool systemd-activate can be used to test socket + activation. + + A new group "systemd-journal" is now owning journal files, + replacing "adm" group. + + journalctl gained "--reverse" to show output in reverse order, + "--pager-end" to jump at the end of the journal in the + pager (only less is supported) and "--user-unit" to filter for + user units. + + New unit files has been addedto ease for systemd usage in + initrd. + + "systemctl start" now supports "--irreversible" to queue + operations which can be reserved. It is now used to make + shutdown requests more robust. + + Auke Kok's bootchart has been merged and relicensed to + LGPLv2.1+. + + nss-myhostname has been merged in systemd codebase. + + some defaults sysctl values are now set by default: the safe + sysrq options are turned on, IP route verification is turned + on, and source routing disabled. The recently added hardlink + and softlink protection of the kernel is turned on. + + Add support for predictable network naming logic. It can be + turned off with kernel command line switch: net.ifnames=0 + + journald will now explicitly flush journal files to disk at the + latest 5 min after each write and will mark file offline until + next read. This should increase reliability in case of crash. + + remote-fs-setup.target target has been added to pull in + specific services when at least one remote file system is to be + mounted. + + timers.target and paths.target have been added as canonical + targets to pull user timer and path units, similar to + sockets.targets. + + udev daemon now sets default number of worker processes in + parallel based on number of CPUs instead of RAM. + + Most unit file settings which takes likst of items can now be +reset by assigning empty string to them, using drop-in. + + Add support for drop-in configuration file for units. + + Most unit file settings which takes likst of items can now be + reset by assigning empty string to them, using drop-in. + + improve systemg-cgtop output. + + improve 'systemctl status' output for socket, drop-in for units. + + 'hostnamectl set-hostname' allows setting FQDN hostnames. + + fractional time intervals are now parsed properly. + + localectl can list available X11 keymaps. + + systemd-analyze dot can filter for specific units and has been + rewritten in C. + + systemctl gained "list-dependencies" command. + + Inhibitors are now honored no only in GNOME. +- Many patches has been dropped, being merged upstream. +- Many patches has been renamed and regenerated with git, to have + consistent naming, authorship and comments embedded. +- Add + Revert-service-drop-support-for-SysV-scripts-for-the-early.patch: + re-add support for boot.* initscripts until they are all migrated + to systemd unit files. +- Merge patches for nss-myhostname package to this package. + ------------------------------------------------------------------- Fri Apr 12 16:17:04 UTC 2013 - rschweikert@suse.com diff --git a/systemd.spec b/systemd.spec index 7bfd5d20..4963f5f7 100644 --- a/systemd.spec +++ b/systemd.spec @@ -23,7 +23,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 195 +Version: 200 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -90,6 +90,8 @@ Requires(post): findutils %endif Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 +Obsoletes: systemd-analyze < 201 +Provides: systemd-analyze = %{version}-%{release} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz Source1: systemd-rpmlintrc Source2: localfs.service @@ -99,201 +101,64 @@ Source5: systemd-insserv_conf Source6: baselibs.conf Source7: libgcrypt.m4 Source8: systemd-journald.init +Source9: nss-myhostname-config Source1060: boot.udev Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink +# Patches auto-generated by git-buildpackage: -Patch1: 0001-Add-bootsplash-handling-for-password-dialogs.patch +# PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r +Patch0: avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch +# PATCH-FIX-UPSTREAM ptionally-warn-if-nss-myhostname-is-called.patch lnussel@suse.com -- optionally warn if nss-myhostname is called +Patch1: optionally-warn-if-nss-myhostname-is-called.patch +Patch2: Add-bootsplash-handling-for-password-dialogs.patch # handle SUSE specific kbd settings -Patch6: 0001-handle-disable_caplock-and-compose_table-and-kbd_rat.patch -Patch7: systemd-numlock-suse.patch -# don't start getty on tty1 until all password request are done -Patch8: tty1.patch -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 -Patch22: new-lsb-headers.patch -Patch23: storage-after-cryptsetup.patch -Patch24: delay-fsck-cryptsetup-after-md-lvm-dmraid.patch -Patch31: lock-opensuse.patch -Patch33: crypt-loop-file.patch -Patch36: sysctl-modules.patch -Patch38: dm-lvm-after-local-fs-pre-target.patch -Patch53: fastboot-forcefsck.patch -Patch56: support-suse-clock-sysconfig.patch -Patch59: fix-enable-disable-boot-initscript.patch -Patch60: var-run-lock.patch -Patch63: xdm-display-manager.patch -Patch64: fix-permissions-btmp.patch -# PATCH-FIX-UPSTREAM fix-debugshell.patch fcrozat@suse.com bnc#789052 -- use bash if sushell isn't available -Patch71: fix-debugshell.patch -# PATCH-FIX-OPENSUSE handle-root-uses-lang.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype -Patch72: handle-root-uses-lang.patch -# PATCH-FIX-OPENSUSE multiple-sulogin.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin -Patch76: multiple-sulogin.patch -# PATCH-FIX-OPENSUSE systemctl-options.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable -Patch77: systemctl-options.patch -# PATCH-FIX-UPSTREAM fix-loopback-mount.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available -Patch136: fix-loopback-mount.patch -# PATCH-FIX-UPSTREAM fix-lsb-provides.patch bnc#809646 fcrozat@suse.com -- fix LSB provides -Patch137: fix-lsb-provides.patch -# PATCH-FIX-OPENSUSE logind-nvidia-acl.diff bnc#808319 -- set ACL on nvidia devices -Patch140: logind-nvidia-acl.diff +Patch3: handle-disable_caplock-and-compose_table-and-kbd_rate.patch +Patch4: handle-numlock-value-in-etc-sysconfig-keyboard.patch +Patch6: parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch +Patch7: service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch +Patch8: module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch +Patch9: remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch +Patch10: force-lvm-restart-after-cryptsetup-target-is-reached.patch +Patch11: delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch +Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch +Patch13: ensure-sysctl-are-applied-after-modules-are-loaded.patch +Patch14: ensure-DM-and-LVM-are-started-before-local-fs-pre-target.patch +Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch +Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch +Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch +Patch18: fix-owner-of-var-log-btmp.patch + +# PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done +Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch +# PATCH-FIX-OPENSUSE Ensure-debugshell-has-a-correct-value.patch fcrozat@suse.com bnc#789052 -- use bash if sushell isn't available +Patch19: Ensure-debugshell-has-a-correct-value.patch +# PATCH-FIX-OPENSUSE handle-root_uses_lang-value-in-etc-sysconfig-language.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype +Patch20: handle-root_uses_lang-value-in-etc-sysconfig-language.patch +# PATCH-FIX-OPENSUSE allow-multiple-sulogin-to-be-started.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin +Patch21: allow-multiple-sulogin-to-be-started.patch +# PATCH-FIX-OPENSUSE handle-SYSTEMCTL_OPTIONS-environment-variable.patch bnc#798620 fcrozat@suse.com -- handle SYSTEMCTL_OPTIONS environment variable +Patch22: handle-SYSTEMCTL_OPTIONS-environment-variable.patch +# PATCH-FIX-UPSTREAM ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch bnc#809820 fcrozat@suse.com -- loopback mount should be started after /dev/loop-control is available +Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch +# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices +Patch27: apply-ACL-for-nvidia-device-nodes.patch +# PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts +Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.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 fix-logind-pty-seat.patch fcrozat@suse.com -- fix logind complaining when doing su/sudo in X terminal -Patch61: fix-logind-pty-seat.patch -# PATCH-FIX-UPSTREAM fix-build-glibc217.patch fcrozat@suse.com -- fix build with latest glibc -Patch62: fix-build-glibc217.patch -# PATCH-FIX-UPSTREAM fix-bad-memory-access.patch fcrozat@suse.com -- fix bad memory access -Patch65: fix-bad-memory-access.patch -# PATCH-FIX-UPSTREAM fix-dbus-crash.patch fcrozat@suse.com -- fix D-Bus caused crash -Patch66: fix-dbus-crash.patch -# PATCH-FIX-UPSTREAM sync-on-shutdown.patch fcrozat@suse.com -- Sync on shutdown -Patch67: sync-on-shutdown.patch -# PATCH-FIX-UPSTREAM mount-efivars.patch fcrozat@suse.com -- mount efivars if booting under UEFI -Patch68: mount-efivars.patch -# PATCH-FIX-UPSTREAM switch-root-try-pivot-root.patch fcrozat@suse.com -- try pivot_root before overmounting / -Patch69: switch-root-try-pivot-root.patch -# PATCH-FIX-UPSTREAM remount-ro-before-unmount.patch fcrozat@suse.com -- remount ro before unmounting in final shutdown loop -Patch70: remount-ro-before-unmount.patch -# PATCH-FIX-UPSTREAM revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch crrodriguez@opensuse.org -- do not consider failure to umount / and /usr an error. -Patch73: revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch -# PATCH-FIX-UPSTREAM detect-btrfs-ssd.patch crrodriguez@opensuse.org -- fix BTRFS detection on systemd-readhead -Patch74: detect-btrfs-ssd.patch -# PATCH-FIX-UPSTREAM timedated-donot-close-bogus-dbus-connection.patch crrodriguez@opensuse.org -- Fix assertion failure when dbus is gone. -Patch75: timedated-donot-close-bogus-dbus-connection.patch -# PATCH-FIX-UPSTREAM journalctl-remove-leftover-message.patch fcrozat@suse.com -- remove debug message in systemctl -Patch78: journalctl-remove-leftover-message.patch -# PATCH-FIX-UPSTREAM job-avoid-recursion-when-cancelling.patch fcrozat@suse.com -- prevent potential recursion when cancelling a service -Patch79: job-avoid-recursion-when-cancelling.patch -# PATCH-FIX-UPSTREAM sysctl-parse-all-keys.patch fcrozat@suse.com -- ensure sysctl file is fully parsed -Patch80: sysctl-parse-all-keys.patch -# PATCH-FIX-UPSTREAM journal-fix-cutoff-max-date.patch fcrozat@suse.com -- fix computation of cutoff max date for journal -Patch81: journal-fix-cutoff-max-date.patch -# PATCH-FIX-UPSTREAM reword-rescue-mode-hints.patch fcrozat@suse.com -- reword rescue prompt -Patch82: reword-rescue-mode-hints.patch -# PATCH-FIX-UPSTREAM improve-overflow-checks.patch fcrozat@suse.com -- improve time overflow checks -Patch83: improve-overflow-checks.patch -# PATCH-FIX-UPSTREAM fix-swap-behaviour-with-symlinks.patch fcrozat@suse.com -- fix swap behaviour with symlinks -Patch84: fix-swap-behaviour-with-symlinks.patch -# PATCH-FIX-UPSTREAM hostnamectl-fix-set-hostname-with-no-argument.patch fcrozat@suse.com -- ensure hostnamectl requires an argument when called with set-hostname option -Patch85: hostnamectl-fix-set-hostname-with-no-argument.patch -# PATCH-FIX-UPSTREAM agetty-overrides-term.patch fcrozat@suse.com -- pass correctly terminal type to agetty -Patch86: agetty-overrides-term.patch -# PATCH-FIX-UPSTREAM check-for-empty-strings-in-strto-conversions.patch fcrozat@suse.com -- better check for empty strings in strto* conversions -Patch87: check-for-empty-strings-in-strto-conversions.patch -# PATCH-FIX-UPSTREAM strv-cleanup-error-path-loops.patch fcrozat@suse.com -- cleanup strv on error path -Patch88: strv-cleanup-error-path-loops.patch -# PATCH-FIX-UPSTREAM cryptsetup-handle-plain.patch fcrozat@suse.com -- correctly handle "plain" option in cryptsetup -Patch89: cryptsetup-handle-plain.patch -# PATCH-FIX-UPSTREAM fstab-generator-improve-error-message.patch fcrozat@suse.com -- improve error message in fstab-generator -Patch90: fstab-generator-improve-error-message.patch -# PATCH-FIX-UPSTREAM delta-accept-t-option.patch fcrozat@suse.com -- accept -t option in systemd-delta -Patch91: delta-accept-t-option.patch -# PATCH-FIX-UPSTREAM highlight-ordering-cycle-deletions.patch fcrozat@suse.com -- highlight ordering cycle deletions in logs -Patch92: highlight-ordering-cycle-deletions.patch -# PATCH-FIX-UPSTREAM core-interpret-escaped-semicolon-as-escaped.patch fcrozat@suse.com -- accept \; in ExecStart -Patch93: core-interpret-escaped-semicolon-as-escaped.patch -# PATCH-FIX-UPSTREAM hostnamectl-fix-parsing-no-ask-password.patch fcrozat@suse.com -- accept no-ask-password in hostnamectl -Patch94: hostnamectl-fix-parsing-no-ask-password.patch -# PATCH-FIX-UPSTREAM systemd-cgls-fix-piping-output.patch fcrozat@suse.com -- fix piping output of systemd-cgls -Patch95: systemd-cgls-fix-piping-output.patch -# PATCH-FIX-UPSTREAM core-load-fragment-improve-error-message.patch fcrozat@suse.com -- improve error message when parsing fragments -Patch96: core-load-fragment-improve-error-message.patch -# PATCH-FIX-UPSTREAM fix-potential-bad-mem-access.patch fcrozat@suse.com -- fix potential bad memory access -Patch97: fix-potential-bad-mem-access.patch -# PATCH-FIX-UPSTREAM socket-improve-error-message.patch fcrozat@suse.com -- improve error message in socket handling -Patch98: socket-improve-error-message.patch -# PATCH-FIX-UPSTREAM journal-send-always-send-syslog_identifier.patch fcrozat@suse.com -- always send syslog_identifier if available for journal -Patch99: journal-send-always-send-syslog_identifier.patch -# PATCH-FIX-UPSTREAM crypsetup-handle-nofail.patch fcrozat@suse.com -- handle nofail in cryptsetup -Patch100: crypsetup-handle-nofail.patch -# PATCH-FIX-UPSTREAM crypsetup-generator-state-file-name-in-error-message.patch fcrozat@suse.com -- add filename in error message from crypsetup-generator -Patch101: crypsetup-generator-state-file-name-in-error-message.patch -# PATCH-FIX-UPSTREAM fstab-generator-error-message-on-duplicates.patch fcrozat@suse.com -- improve error message on duplicate in fstab-generator -Patch102: fstab-generator-error-message-on-duplicates.patch -# PATCH-FIX-UPSTREAM systemctl-verbose-message-on-missing-install.patch fcrozat@suse.com -- reword missing install error message in systemctl -Patch103: systemctl-verbose-message-on-missing-install.patch -# PATCH-FIX-UPSTREAM shutdown-improvements.patch fcrozat@suse.com -- various improvements at shutdown -Patch104: shutdown-improvements.patch -# PATCH-FIX-UPSTREAM localectl-fix-assertion.patch fcrozat@suse.com -- fix assertion in localectl -Patch105: localectl-fix-assertion.patch -# PATCH-FIX-UPSTREAM path-util-fix-potential-crash.patch fcrozat@suse.com -- fix potential crash in path-util -Patch106: path-util-fix-potential-crash.patch -# PATCH-FIX-UPSTREAM coredumpctl-fix-crash.patch fcrozat@suse.com -- fix crash in coredumpctl -Patch107: coredumpctl-fix-crash.patch -# PATCH-FIX-UPSTREAM socket-verbose-error-message.patch fcrozat@suse.com -- add more verbose error message in socket handling -Patch108: socket-verbose-error-message.patch -# PATCH-FIX-UPSTREAM pam-properly-handle-ssh-logins-without-pam-tty-field.patch fcrozat@suse.com -- handle properly ssh-logins without pam tty field -Patch109: pam-properly-handle-ssh-logins-without-pam-tty-field.patch -# PATCH-FIX-UPSTREAM fstab-generator-properly-detect-bind-mounts.patch fcrozat@suse.com -- properly detect bind-mounts in fstab-generator -Patch110: fstab-generator-properly-detect-bind-mounts.patch -# PATCH-FIX-UPSTREAM localectl-support-systems-without-locale-archive.patch fcrozat@suse.com -- localectl now supports systemd without locale-archive file -Patch111: localectl-support-systems-without-locale-archive.patch -# PATCH-FIX-UPSTREAM logind-capability-making-seats-without-fb.patch fcrozat@suse.com -- allows capability of making seats without fb -Patch112: logind-capability-making-seats-without-fb.patch -# PATCH-FIX-UPSTREAM service-forking-ignore-exit-status-main-process.patch fcrozat@suse.com -- ignore exit-statis of main process when forking, if specified in unit file -Patch113: service-forking-ignore-exit-status-main-process.patch -# PATCH-FIX-UPSTREAM systemctl-no-assert-on-reboot-without-dbus.patch fcrozat@suse.com -- don't assert on reboot if dbus isn't there -Patch114: systemctl-no-assert-on-reboot-without-dbus.patch -# PATCH-FIX-UPSTREAM logind-ignore-non-tty-non-x11-session-on-shutdown.patch fcrozat@suse.com -- ignore non tty non-x11 session on shutdown -Patch115: logind-ignore-non-tty-non-x11-session-on-shutdown.patch -# PATCH-FIX-UPSTREAM journalctl-quit-on-io-error.patch fcrozat@suse.com -- fix journalctl quit on io error -Patch116: journalctl-quit-on-io-error.patch -# PATCH-FIX-UPSTREAM do-not-make-sockets-dependent-on-lo.patch fcrozat@suse.com -- do not make sockets dependent on lo interface -Patch117: do-not-make-sockets-dependent-on-lo.patch -# PATCH-FIX-UPSTREAM shutdown-dont-force-mnt-force-on-final-umount.patch fcrozat@suse.com -- don't force MNT_FORCE on final umount at shutdown -Patch118: shutdown-dont-force-mnt-force-on-final-umount.patch -# PATCH-FIX-UPSTREAM shutdown-ignore-loop-devices-without-backing-file.patch fcrozat@suse.com -- ignore loop devices without backing file at shutdown -Patch119: shutdown-ignore-loop-devices-without-backing-file.patch -# PATCH-FIX-UPSTREAM fix-bad-mem-access.patch fcrozat@suse.com -- fix bad memory access -Patch120: fix-bad-mem-access.patch -# PATCH-FIX-UPSTREAM parse-multiline-env-file.patch fcrozat@suse.com bnc#793411 -- correctly parse multiline environment files -Patch121: parse-multiline-env-file.patch -# PATCH-FIX-UPSTREAM improve-man-environment.patch fcrozat@suse.com -- improve Environment section in manpage -Patch122: improve-man-environment.patch -# PATCH-FIX-UPSTREAM tmpfiles-X-type.patch fcrozat@suse.com -- allow to clean directories with removing them -Patch123: tmpfiles-X-type.patch -# PATCH-FIX-UPSTREAM systemd-fix-merge-ignore-dependencies.patch fcrozat@suse.com bnc#800365 -- fix merging with --ignore-dependencies waiting for dependencies -Patch124: systemd-fix-merge-ignore-dependencies.patch -# PATCH-FIX-UPSTREAM journalctl-require-argument-for-priority -Patch125: journalctl-require-argument-for-priority -# PATCH-FIX-UPSTREAM cryptsetup-accept-read-only.patch fcrozat@suse.com -- Accept read-only as well as readonly as parameters for crypttab -Patch126: cryptsetup-accept-read-only.patch # PATCH-FIX-OPENSUSE disable-nss-myhostname-warning-bnc-783841.diff lnussel@suse.de -- disable nss-myhostname warning (bnc#783841) -Patch127: disable-nss-myhostname-warning-bnc-783841.diff -# PATCH-FIX-UPSTREAM early-sync-shutdown.patch fcrozat@suse.com -- Start sync on shutdown early -Patch128: early-sync-shutdown.patch +Patch23: disable-nss-myhostname-warning-bnc-783841.patch # PATCH-FIX-OPENSUSE handle-HOSTNAME.patch fcrozat@suse.com -- handle /etc/HOSTNAME (bnc#803653) -Patch129: handle-HOSTNAME.patch -# PATCH-FIX-UPSTREAM systemctl-print-wall-on-if-successful.patch fcrozat@suse.com -- Only print on wall if successful -Patch130: systemctl-print-wall-on-if-successful.patch -# PATCH-FIX-UPSTREAM improve-bash-completion.patch fcrozat@suse.com -- improve bash completion -Patch131: improve-bash-completion.patch -# PATCH-FIX-UPSTREAM improve-journal-perf.patch fcrozat@suse.com -- improve journal performance -Patch132: improve-journal-perf.patch -# PATCH-FIX-UPSTREAM support-hybrid-suspend.patch fcrozat@suse.com -- support hybrid suspend -Patch133: support-hybrid-suspend.patch -# PATCH-FIX-OPENSUSE forward-to-pmutils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils -Patch134: forward-to-pmutils.patch -# PATCH-FIX-UPSTREAM rbind-mount.patch fcrozat@suse.com bnc#804575 -- Handle rbind mount point correctly -Patch135: rbind-mount.patch -# PATCH-FIX-UPSTREAM fix-journal-vacuum-logic.patch bnc#789589 -- fix journal vacuum logic -Patch138: fix-journal-vacuum-logic.patch -# PATCH-FIX-UPSTREAM improve-readahead-spinning.patch -- improve readahead on spinning disk -Patch139: improve-readahead-spinning.patch -# PATCH-FIX-UPSTREAM wait-for-processes-killed.patch -- wait for processes killed by SIGTERM before killing them with SIGKILL -Patch141: wait-for-processes-killed.patch -# PATCH-FIX-UPSTREAM do-no-isolate-on-fsck-failure.patch bnc#812874 -- do not isolate if fsck fails -Patch142: do-no-isolate-on-fsck-failure.patch -# PATCH-FIX-UPSTREAM lid-switch-chromebook.patch -Patch143: lid-switch-chromebook.patch +Patch24: handle-etc-HOSTNAME.patch +# PATCH-FIX-OPENSUSE Forward-suspend-hibernate-calls-to-pm-utils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils +Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch +# PATCH-FIX-UPSTREAM lid-switch-chromebook.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind +Patch38: lid-switch-chromebook.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -307,45 +172,9 @@ Patch1004: 1004-udev-netlink-null-rules.patch # PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch Patch1005: 1005-udev-fix-sg-autoload-regression.patch # PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr -Patch1006: 1006-fix-devname-prefix.patch -# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch -Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch -# PATCH-FIX-UPSTREAM 1008-udev-path_id-handle-Hyper-V-devices.patch -Patch1008: 1008-udev-path_id-handle-Hyper-V-devices.patch -# PATCH-FIX-UPSTREAM 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch -Patch1009: 1009-keymap-Update-the-list-of-Samsung-Series-9-models.patch -# PATCH-FIX-UPSTREAM 1010-keymap-Add-Samsung-700T.patch -Patch1010: 1010-keymap-Add-Samsung-700T.patch -# PATCH-FIX-UPSTREAM 1011-libudev-avoid-leak-during-realloc-failure.patch -Patch1011: 1011-libudev-avoid-leak-during-realloc-failure.patch -# PATCH-FIX-UPSTREAM 1012-libudev-do-not-resolve-attr-device-symlinks.patch -Patch1012: 1012-libudev-do-not-resolve-attr-device-symlinks.patch -# PATCH-FIX-UPSTREAM 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch -Patch1013: 1013-libudev-validate-udev-argument-to-udev_enumerate_new.patch -# PATCH-FIX-UPSTREAM 1014-udev-fix-whitespace.patch -Patch1014: 1014-udev-fix-whitespace.patch -# PATCH-FIX-UPSTREAM 1015-udev-properly-handle-symlink-removal-by-change-event.patch -Patch1015: 1015-udev-properly-handle-symlink-removal-by-change-event.patch -# PATCH-FIX-UPSTREAM 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch -Patch1016: 1016-udev-builtin-do-not-fail-builtin-initialization-if-o.patch -# PATCH-FIX-UPSTREAM 1017-udev-use-usec_t-and-now.patch -Patch1017: 1017-udev-use-usec_t-and-now.patch -# PATCH-FIX-UPSTREAM 1018-keymap-add-aditional-support.patch -Patch1018: 1018-keymap-add-aditional-support.patch -# PATCH-FIX-UPSTREAM 1019-udev-Fix-device-matching-in-the-accelerometer.patch -Patch1019: 1019-udev-Fix-device-matching-in-the-accelerometer.patch -# PATCH-FIX-OPENSUSE 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch -Patch1020: 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch +Patch1007: 1007-fix-devname-prefix.patch # PATCH-FIX-OPENSUSE 1021-create-default-links-for-primary-cd_dvd-drive.patch Patch1021: 1021-create-default-links-for-primary-cd_dvd-drive.patch -# PATCH-FIX-UPSTREAM 1022-udev-use-unique-names-for-temporary-files-created-in.patch -Patch1022: 1022-udev-use-unique-names-for-temporary-files-created-in.patch -# PATCH-FIX-UPSTREAM 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch -Patch1023: 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch -# PATCH-FIX-UPSTREAM 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch -Patch1024: 1024-udev-usb_id-parse-only-size-bytes-of-the-descriptors.patch -# PATCH-FIX-UPSTREAM 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch -Patch1025: 1025-udev-expose-new-ISO9660-properties-from-libblkid.patch # PATCH-FIX-OPENSUSE 1026-re-add-persistent-net.patch Patch1026: 1026-re-add-persistent-net.patch # PATCH-FIX-OPENSUSE 1027-udev-always-rename-network.patch @@ -384,22 +213,6 @@ Provides: sysvinit:/sbin/init %description sysvinit Drop-in replacement of System V init tools. -%package analyze -Summary: Tool for processing systemd profiling information -License: LGPL-2.1+ -Group: System/Base -Requires: %{name} = %{version} -Requires: dbus-1-python -Requires: python-cairo -# for the systemd-analyze split: -Conflicts: systemd < 44-10 - -%description analyze -'systemd-analyze blame' lists which systemd unit needed how much time to finish -initialization at boot. -'systemd-analyze plot' renders an SVG visualizing the parallel start of units -at boot. - %package -n %{udevpkgname} Summary: A rule-based device node and kernel event manager License: GPL-2.0 @@ -499,6 +312,33 @@ Conflicts: otherproviders(syslog) %description logger This package marks the installation to not use syslog but only the journal. +%package -n nss-myhostname +Summary: Plugin for local system host name resolution +License: LGPL-2.1+ +Group: System/Libraries + +%description -n nss-myhostname +nss-myhostname is a plugin for the GNU Name Service Switch (NSS) +functionality of the GNU C Library (glibc) providing host name +resolution for the locally configured system hostname as returned by +gethostname(2). Various software relies on an always resolvable local +host name. When using dynamic hostnames this is usually achieved by +patching /etc/hosts at the same time as changing the host name. This +however is not ideal since it requires a writable /etc file system and +is fragile because the file might be edited by the administrator at +the same time. nss-myhostname simply returns all locally +configured public IP addresses, or -- if none are configured -- +the IPv4 address 127.0.0.2 (wich is on the local loopback) and the +IPv6 address ::1 (which is the local host) for whatever system +hostname is configured locally. Patching /etc/hosts is thus no +longer necessary. + +Note that nss-myhostname only provides a workaround for broken +software. If nss-myhostname is trigged by an application a message +is logged to /var/log/messages. Please check whether that's worth +a bug report then. +This package marks the installation to not use syslog but only the journal. + %endif %prep @@ -515,154 +355,63 @@ cp %{SOURCE7} m4/ %patch1003 -p1 %patch1004 -p1 %patch1005 -p1 -%patch1006 -p1 %patch1007 -p1 -%patch1008 -p1 -%patch1009 -p1 -%patch1010 -p1 -%patch1011 -p1 -%patch1012 -p1 -%patch1013 -p1 -%patch1014 -p1 -%patch1015 -p1 -%patch1016 -p1 -%patch1017 -p1 -%patch1018 -p1 -%patch1019 -p1 -%patch1020 -p1 %patch1021 -p1 -%patch1022 -p1 -%patch1023 -p1 -%patch1024 -p1 -%patch1025 -p1 %patch1026 -p1 %patch1027 -p1 #systemd +%patch0 -p1 %patch1 -p1 -%patch6 -p1 +%patch2 -p1 +%patch3 -p1 # don't apply when bootstrapping to not modify configure.in %if ! 0%{?bootstrap} -%patch7 -p1 +%patch4 -p1 %endif +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch10 -p1 +%patch11 -p1 +%patch12 -p1 %patch13 -p1 +%patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 -%patch31 -p1 -%patch33 -p1 -%patch36 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 +%patch37 -p1 %patch38 -p1 -%patch53 -p1 -%patch56 -p1 -%patch59 -p1 -%patch60 -p1 -%patch61 -p1 -%patch62 -p1 -%patch63 -p1 -%patch64 -p1 -%patch65 -p1 -%patch66 -p1 -%patch67 -p1 -%patch68 -p1 -%patch69 -p1 -%patch70 -p1 -%patch71 -p1 -%patch72 -p1 -%patch73 -p1 -%patch74 -p1 -%patch75 -p1 -%patch76 -p1 -%patch77 -p1 -%patch78 -p1 -%patch79 -p1 -%patch80 -p1 -%patch81 -p1 -%patch82 -p1 -%patch83 -p1 -%patch84 -p1 -%patch85 -p1 -%patch86 -p1 -%patch87 -p1 -%patch88 -p1 -%patch89 -p1 -%patch90 -p1 -%patch91 -p1 -%patch92 -p1 -%patch93 -p1 -%patch94 -p1 -%patch95 -p1 -%patch96 -p1 -%patch97 -p1 -%patch98 -p1 -%patch99 -p1 -%patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch104 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 -%patch111 -p1 -%patch112 -p1 -%patch113 -p1 -%patch114 -p1 -%patch115 -p1 -%patch116 -p1 -%patch117 -p1 -%patch118 -p1 -%patch119 -p1 -%patch120 -p1 -%patch121 -p1 -%patch122 -p1 -%patch123 -p1 -%patch124 -p1 -%patch125 -p1 -%patch126 -p1 -%patch127 -p1 -%patch128 -p1 -%patch129 -p1 -%patch130 -p1 -%patch131 -p1 -%patch132 -p1 -%patch133 -p1 -%patch134 -p1 -%patch135 -p1 -%patch136 -p1 -%patch137 -p1 -%patch138 -p1 -%patch139 -p1 -%patch140 -p1 -%patch141 -p1 -%patch142 -p1 -%patch143 -p1 %build autoreconf -fiv -# to remove after upgrading to systemd 196+ -rm -f man/{systemd.exec.5,logind.conf.5,systemctl.1,systemd-suspend.service.8,systemd.special.7,tmpfiles.d.5} # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; export V=1 # keep split-usr until all packages have moved their systemd rules to /usr %configure \ - --with-distro=suse \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ %if 0%{?bootstrap} --disable-gudev \ + --disable-myhostname \ %else --enable-manpages \ --enable-gtk-doc \ + --with-nss-my-hostname-warning \ %endif --enable-selinux \ --enable-split-usr \ @@ -673,6 +422,11 @@ make %{?_smp_mflags} %install %makeinstall +# move to %{_lib} +%if ! 0%{?bootstrap} +mv $RPM_BUILD_ROOT%{_libdir}/libnss_myhostname.so.2 $RPM_BUILD_ROOT/%{_lib} +%endif + mkdir -p $RPM_BUILD_ROOT/{sbin,lib,bin} ln -sf %{_bindir}/udevadm $RPM_BUILD_ROOT/sbin/udevadm ln -sf %{_bindir}/systemd-ask-password $RPM_BUILD_ROOT/bin/systemd-ask-password @@ -685,6 +439,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware %if ! 0%{?bootstrap} install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald +install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config %endif sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060} @@ -699,8 +454,6 @@ install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/systemd mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../systemd-udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants -#workaround for 716939 -chmod 644 %{buildroot}%{_bindir}/systemd-analyze mkdir -p %{buildroot}%{_sysconfdir}/rpm install -m644 %{S:4} %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete @@ -748,7 +501,7 @@ rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount # kernel.core_pattern setting until systemd-coredump is a part of an actual # systemd release and it's made clear how to get the core dumps out of the # journal. -rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/coredump.conf +rm -f %{buildroot}%{_libdir}/../lib/sysctl.d/50-coredump.conf # remove README file for now rm -f %{buildroot}/etc/init.d/README @@ -768,6 +521,13 @@ ln -s /usr/lib/udev %{buildroot}/lib/udev # Create the /var/log/journal directory to change the volatile journal to a persistent one mkdir -p %{buildroot}/var/log/journal +# Make sure directories in /var exist +mkdir -p %{buildroot}/var/lib/systemd/coredump +mkdir -p %{buildroot}/var/lib/systemd/catalog +#create ghost databases +touch %{buildroot}/var/lib/systemd/catalog/database +touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin + # Make sure the NTP units dir exists mkdir -p %{buildroot}%{_prefix}/lib/systemd/ntp-units.d/ @@ -788,7 +548,9 @@ perl -i -pe 's{^# the VT is cleared.*}{}i;s{(^TTYVTDisallocate=.*)}{}' "$dst" %fdupes -s %{buildroot}%{_mandir} %pre -getent group adm >/dev/null || groupadd -r adm +getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : +getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d /var/log/journal -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : +getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : exit 0 %post @@ -797,6 +559,7 @@ exit 0 /usr/bin/systemd-machine-id-setup >/dev/null 2>&1 || : /usr/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reexec >/dev/null 2>&1 || : +/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then @@ -867,6 +630,7 @@ if test -f /proc/1/exe -a -d /proc/1/root ; then fi %post -n %{udevpkgname} +/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : %{fillup_and_insserv -Y boot.udev} # add KERNEL name match to existing persistent net rules sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ @@ -926,6 +690,15 @@ if [ "$1" -eq 1 ]; then systemctl --no-block restart systemd-journal-flush.service >/dev/null 2>&1 || : fi +%preun -n nss-myhostname +if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then + %{_sbindir}/nss-myhostname-config --disable +fi + +%post -n nss-myhostname -p /sbin/ldconfig + +%postun -n nss-myhostname -p /sbin/ldconfig + %endif %clean @@ -936,9 +709,12 @@ fi /bin/systemd /bin/systemd-ask-password /bin/systemctl +%{_bindir}/bootctl +%{_bindir}/kernel-install %{_bindir}/hostnamectl %{_bindir}/localectl %{_bindir}/systemctl +%{_bindir}/systemd-analyze %{_bindir}/systemd-coredumpctl %{_bindir}/systemd-delta %{_bindir}/systemd-notify @@ -984,6 +760,9 @@ fi %exclude %{_prefix}/lib/systemd/systemd-udevd %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd +%dir %{_prefix}/lib/systemd/catalog +%{_prefix}/lib/systemd/catalog/systemd.catalog +%dir %{_prefix}/lib/systemd/system-shutdown %dir %{_prefix}/lib/systemd/system-shutdown %dir %{_prefix}/lib/systemd/system-preset %dir %{_prefix}/lib/systemd/user-preset @@ -998,6 +777,7 @@ fi %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif +%{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator %{_prefix}/lib/systemd/system-generators/systemd-getty-generator %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator @@ -1015,6 +795,7 @@ fi %dir %{_sysconfdir}/binfmt.d %dir %{_libexecdir}/sysctl.d +%{_libexecdir}/sysctl.d/50-default.conf %dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/systemd @@ -1022,6 +803,7 @@ fi %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd %dir %{_sysconfdir}/xdg/systemd/user +%config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf %config(noreplace) %{_sysconfdir}/systemd/journald.conf @@ -1062,9 +844,6 @@ fi %exclude %{_mandir}/man8/runlevel.8* %exclude %{_mandir}/man*/*udev*.[0-9]* -# Packaged in analyze subpackage -%exclude %{_mandir}/man1/systemd-analyze.1* - %{_mandir}/man1/*.1* %{_mandir}/man3/*.3* %{_mandir}/man5/*.5* @@ -1082,12 +861,16 @@ fi %if ! 0%{?bootstrap} %{_prefix}/lib/udev/numlock-on %endif -%dir %{_sysconfdir}/bash_completion.d -%{_sysconfdir}/bash_completion.d/systemd-bash-completion.sh +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%ghost /var/lib/systemd/catalog/database +%{_datadir}/bash-completion/completions/* %{_sysconfdir}/rpm/macros.systemd %dir /var/lib/systemd %dir /var/lib/systemd/sysv-convert %dir /var/lib/systemd/migrated +%dir /var/lib/systemd/catalog +%dir /var/lib/systemd/coredump %files devel %defattr(-,root,root,-) @@ -1127,13 +910,6 @@ fi %{_mandir}/man8/runlevel.8* %endif -%files analyze -%defattr(-,root,root) -%attr(0755,root,root) /usr/bin/systemd-analyze -%if ! 0%{?bootstrap} -%{_mandir}/man1/systemd-analyze.1* -%endif - %files -n %{udevpkgname} %defattr(-,root,root) /sbin/udevd @@ -1165,9 +941,12 @@ fi %exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/udev/rules.d/*.rules +%dir %{_prefix}/lib/udev/hwdb.d +%{_prefix}/lib/udev/hwdb.d/* %{_sysconfdir}/init.d/boot.udev %dir %{_sysconfdir}/udev/ %dir %{_sysconfdir}/udev/rules.d/ +%ghost %{_sysconfdir}/udev/hwdb.bin %config(noreplace) %{_sysconfdir}/udev/udev.conf %if ! 0%{?bootstrap} %{_mandir}/man?/*udev*.[0-9]* @@ -1228,6 +1007,11 @@ fi /var/log/README /etc/init.d/systemd-journald +%files -n nss-myhostname +%defattr(-, root, root) +%{_sbindir}/nss-myhostname-config +/%{_lib}/*nss_myhostname* + %endif %changelog diff --git a/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch b/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch new file mode 100644 index 00000000..710bc9a1 --- /dev/null +++ b/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch @@ -0,0 +1,26 @@ +From: Frederic Crozat +Date: Tue, 14 Aug 2012 14:26:16 +0200 +Subject: timedate: add support for openSUSE version of /etc/sysconfig/clock + +--- + src/timedate/timedated.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c +index 16fffd0..b1b1859 100644 +--- a/src/timedate/timedated.c ++++ b/src/timedate/timedated.c +@@ -180,6 +180,13 @@ static int read_data(void) { + goto have_timezone; + } + } ++#ifdef HAVE_SYSV_COMPAT ++ r = parse_env_file("/etc/sysconfig/clock", NEWLINE, ++ "TIMEZONE", &tz.zone, ++ NULL); ++ if (r < 0 && r != -ENOENT) ++ log_warning("Failed to read /etc/sysconfig/clock: %s", strerror(-r)); ++#endif + + have_timezone: + if (isempty(tz.zone)) { diff --git a/timedated-donot-close-bogus-dbus-connection.patch b/timedated-donot-close-bogus-dbus-connection.patch deleted file mode 100644 index 7757c346..00000000 --- a/timedated-donot-close-bogus-dbus-connection.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit b779821b8fdcb3f2bdd0c362bceaae3c76ed9678 -Author: Shawn Landden -Date: Mon Dec 3 00:50:55 2012 +0000 - - timedated: do not incorrectly close non-opened dbus connection - - Fix the fallowing error when no system dbus available: - - Failed to get system D-Bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory - process 14920: arguments to dbus_connection_close() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2889. - This is normally a bug in some application using the D-Bus library. - process 14920: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2776. - This is normally a bug in some application using the D-Bus library. - -Index: systemd-195/src/timedate/timedated.c -=================================================================== ---- systemd-195.orig/src/timedate/timedated.c -+++ systemd-195/src/timedate/timedated.c -@@ -943,7 +943,7 @@ static int connect_bus(DBusConnection ** - if (!bus) { - log_error("Failed to get system D-Bus connection: %s", bus_error_message(&error)); - r = -ECONNREFUSED; -- goto fail; -+ goto fail2; - } - - dbus_connection_set_exit_on_disconnect(bus, FALSE); -@@ -975,7 +975,7 @@ static int connect_bus(DBusConnection ** - fail: - dbus_connection_close(bus); - dbus_connection_unref(bus); -- -+fail2: - dbus_error_free(&error); - - return r; diff --git a/tmpfiles-X-type.patch b/tmpfiles-X-type.patch deleted file mode 100644 index 40d9940e..00000000 --- a/tmpfiles-X-type.patch +++ /dev/null @@ -1,369 +0,0 @@ -From 78a92a5a2306709e4587e332728a76901323ade9 Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Fri, 18 Jan 2013 16:13:08 +0100 -Subject: [PATCH] tmpfiles: introduce type X - -Type X will exclude path itself from clean-up. However, if the path is a -directory systemd-tmpfiles will clean-up its content. - -In contrast to type x, where path is ignored completely, type X needs some -Age parameter. In order to determine Age parameter, we will look for config -entries of type d or D and pick the best match. Best match is either -exact match or longest prefix match. ---- - man/tmpfiles.d.xml | 15 ++++ - src/tmpfiles/tmpfiles.c | 192 ++++++++++++++++++++++++++++++----------------- - 2 files changed, 138 insertions(+), 69 deletions(-) - -Index: systemd-195/man/tmpfiles.d.xml -=================================================================== ---- systemd-195.orig/man/tmpfiles.d.xml -+++ systemd-195/man/tmpfiles.d.xml -@@ -166,6 +166,21 @@ L /tmp/foobar - - - - /dev - - - -+ X -+ Ignore a path -+ during cleanup. Use this type -+ to prevent path removal as -+ controlled with the Age parameter. -+ Note that if path is a directory, -+ content of a directory is not -+ excluded from clean-up, only -+ directory itself. Lines of this -+ type accept shell-style globs -+ in place of normal path -+ names. -+ -+ -+ - r - Remove a file - or directory if it -Index: systemd-195/src/tmpfiles/tmpfiles.c -=================================================================== ---- systemd-195.orig/src/tmpfiles/tmpfiles.c -+++ systemd-195/src/tmpfiles/tmpfiles.c -@@ -70,6 +70,7 @@ typedef enum ItemType { - - /* These ones take globs */ - IGNORE_PATH = 'x', -+ IGNORE_DIRECTORY_PATH = 'X', - REMOVE_PATH = 'r', - RECURSIVE_REMOVE_PATH = 'R', - RELABEL_PATH = 'z', -@@ -119,7 +120,7 @@ static const char * const conf_file_dirs - #define MAX_DEPTH 256 - - static bool needs_glob(ItemType t) { -- return t == IGNORE_PATH || t == REMOVE_PATH || t == RECURSIVE_REMOVE_PATH || t == RELABEL_PATH || t == RECURSIVE_RELABEL_PATH; -+ return t == IGNORE_PATH || t == IGNORE_DIRECTORY_PATH || t == REMOVE_PATH || t == RECURSIVE_REMOVE_PATH || t == RELABEL_PATH || t == RECURSIVE_RELABEL_PATH; - } - - static struct Item* find_glob(Hashmap *h, const char *match) { -@@ -218,6 +219,7 @@ static bool unix_socket_alive(const char - } - - static int dir_cleanup( -+ Item *i, - const char *p, - DIR *d, - const struct stat *ds, -@@ -297,7 +299,7 @@ static int dir_cleanup( - continue; - } - -- q = dir_cleanup(sub_path, sub_dir, &s, cutoff, rootdev, false, maxdepth-1, false); -+ q = dir_cleanup(i, sub_path, sub_dir, &s, cutoff, rootdev, false, maxdepth-1, false); - closedir(sub_dir); - - if (q < 0) -@@ -320,12 +322,14 @@ static int dir_cleanup( - if (age >= cutoff) - continue; - -- log_debug("rmdir '%s'\n", sub_path); -+ if (!i->type == IGNORE_DIRECTORY_PATH || !streq(dent->d_name, p)) { -+ log_debug("rmdir '%s'\n", sub_path); - -- if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0) { -- if (errno != ENOENT && errno != ENOTEMPTY) { -- log_error("rmdir(%s): %m", sub_path); -- r = -errno; -+ if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0) { -+ if (errno != ENOENT && errno != ENOTEMPTY) { -+ log_error("rmdir(%s): %m", sub_path); -+ r = -errno; -+ } - } - } - -@@ -395,68 +399,6 @@ finish: - return r; - } - --static int clean_item(Item *i) { -- DIR *d; -- struct stat s, ps; -- bool mountpoint; -- int r; -- usec_t cutoff, n; -- -- assert(i); -- -- if (i->type != CREATE_DIRECTORY && -- i->type != TRUNCATE_DIRECTORY && -- i->type != IGNORE_PATH) -- return 0; -- -- if (!i->age_set || i->age <= 0) -- return 0; -- -- n = now(CLOCK_REALTIME); -- if (n < i->age) -- return 0; -- -- cutoff = n - i->age; -- -- d = opendir(i->path); -- if (!d) { -- if (errno == ENOENT) -- return 0; -- -- log_error("Failed to open directory %s: %m", i->path); -- return -errno; -- } -- -- if (fstat(dirfd(d), &s) < 0) { -- log_error("stat(%s) failed: %m", i->path); -- r = -errno; -- goto finish; -- } -- -- if (!S_ISDIR(s.st_mode)) { -- log_error("%s is not a directory.", i->path); -- r = -ENOTDIR; -- goto finish; -- } -- -- if (fstatat(dirfd(d), "..", &ps, AT_SYMLINK_NOFOLLOW) != 0) { -- log_error("stat(%s/..) failed: %m", i->path); -- r = -errno; -- goto finish; -- } -- -- mountpoint = s.st_dev != ps.st_dev || -- (s.st_dev == ps.st_dev && s.st_ino == ps.st_ino); -- -- r = dir_cleanup(i->path, d, &s, cutoff, s.st_dev, mountpoint, MAX_DEPTH, i->keep_first_level); -- --finish: -- if (d) -- closedir(d); -- -- return r; --} -- - static int item_set_perms(Item *i, const char *path) { - /* not using i->path directly because it may be a glob */ - if (i->mode_set) -@@ -667,6 +609,7 @@ static int create_item(Item *i) { - switch (i->type) { - - case IGNORE_PATH: -+ case IGNORE_DIRECTORY_PATH: - case REMOVE_PATH: - case RECURSIVE_REMOVE_PATH: - return 0; -@@ -850,6 +793,7 @@ static int remove_item_instance(Item *i, - case CREATE_BLOCK_DEVICE: - case CREATE_CHAR_DEVICE: - case IGNORE_PATH: -+ case IGNORE_DIRECTORY_PATH: - case RELABEL_PATH: - case RECURSIVE_RELABEL_PATH: - case WRITE_FILE: -@@ -894,6 +838,7 @@ static int remove_item(Item *i) { - case CREATE_CHAR_DEVICE: - case CREATE_BLOCK_DEVICE: - case IGNORE_PATH: -+ case IGNORE_DIRECTORY_PATH: - case RELABEL_PATH: - case RECURSIVE_RELABEL_PATH: - case WRITE_FILE: -@@ -909,6 +854,84 @@ static int remove_item(Item *i) { - return r; - } - -+static int clean_item_instance(Item *i, const char* instance) { -+ DIR *d; -+ struct stat s, ps; -+ bool mountpoint; -+ int r; -+ usec_t cutoff, n; -+ -+ assert(i); -+ -+ if (!i->age_set) -+ return 0; -+ -+ n = now(CLOCK_REALTIME); -+ if (n < i->age) -+ return 0; -+ -+ cutoff = n - i->age; -+ -+ d = opendir(instance); -+ if (!d) { -+ if (errno == ENOENT || errno == ENOTDIR) -+ return 0; -+ -+ log_error("Failed to open directory %s: %m", i->path); -+ return -errno; -+ } -+ -+ if (fstat(dirfd(d), &s) < 0) { -+ log_error("stat(%s) failed: %m", i->path); -+ r = -errno; -+ goto finish; -+ } -+ -+ if (!S_ISDIR(s.st_mode)) { -+ log_error("%s is not a directory.", i->path); -+ r = -ENOTDIR; -+ goto finish; -+ } -+ -+ if (fstatat(dirfd(d), "..", &ps, AT_SYMLINK_NOFOLLOW) != 0) { -+ log_error("stat(%s/..) failed: %m", i->path); -+ r = -errno; -+ goto finish; -+ } -+ -+ mountpoint = s.st_dev != ps.st_dev || -+ (s.st_dev == ps.st_dev && s.st_ino == ps.st_ino); -+ -+ r = dir_cleanup(i, instance, d, &s, cutoff, s.st_dev, mountpoint, MAX_DEPTH, i->keep_first_level); -+ -+finish: -+ if (d) -+ closedir(d); -+ -+ return r; -+} -+ -+static int clean_item(Item *i) { -+ int r = 0; -+ -+ assert(i); -+ -+ switch (i->type) { -+ case CREATE_DIRECTORY: -+ case TRUNCATE_DIRECTORY: -+ case IGNORE_PATH: -+ clean_item_instance(i, i->path); -+ break; -+ case IGNORE_DIRECTORY_PATH: -+ r = glob_item(i, clean_item_instance); -+ break; -+ default: -+ break; -+ } -+ -+ return r; -+} -+ - static int process_item(Item *i) { - int r, q, p; - -@@ -1028,6 +1051,7 @@ static int parse_line(const char *fname, - case TRUNCATE_DIRECTORY: - case CREATE_FIFO: - case IGNORE_PATH: -+ case IGNORE_DIRECTORY_PATH: - case REMOVE_PATH: - case RECURSIVE_REMOVE_PATH: - case RELABEL_PATH: -@@ -1264,6 +1288,8 @@ static int read_config_file(const char * - FILE *f; - unsigned v = 0; - int r = 0; -+ Iterator iterator; -+ Item *i; - - assert(fn); - -@@ -1296,6 +1322,34 @@ static int read_config_file(const char * - r = k; - } - -+ /* we have to determine age parameter for each entry of type X */ -+ HASHMAP_FOREACH(i, globs, iterator) { -+ Iterator iter; -+ Item *j, *candidate_item = NULL; -+ -+ if (i->type != IGNORE_DIRECTORY_PATH) -+ continue; -+ -+ HASHMAP_FOREACH(j, items, iter) { -+ if (j->type != CREATE_DIRECTORY && j->type != TRUNCATE_DIRECTORY) -+ continue; -+ -+ if (path_equal(j->path, i->path)) { -+ candidate_item = j; -+ break; -+ } -+ -+ if ((!candidate_item && path_startswith(i->path, j->path)) || -+ (candidate_item && path_startswith(j->path, candidate_item->path) && (fnmatch(i->path, j->path, FNM_PATHNAME | FNM_PERIOD) == 0))) -+ candidate_item = j; -+ } -+ -+ if (candidate_item) { -+ i->age = candidate_item->age; -+ i->age_set = true; -+ } -+ } -+ - if (ferror(f)) { - log_error("Failed to read from file %s: %m", fn); - if (r == 0) -Index: systemd-195/tmpfiles.d/tmp.conf -=================================================================== ---- systemd-195.orig/tmpfiles.d/tmp.conf -+++ systemd-195/tmpfiles.d/tmp.conf -@@ -10,3 +10,7 @@ - # Clear tmp directories separately, to make them easier to override - d /tmp 1777 root root 10d - d /var/tmp 1777 root root 30d -+ -+# Exclude namespace mountpoints created with PrivateTmp=yes -+X /tmp/systemd-private-* -+X /var/tmp/systemd-private-* -Index: systemd-195/man/systemd.exec.xml -=================================================================== ---- systemd-195.orig/man/systemd.exec.xml -+++ systemd-195/man/systemd.exec.xml -@@ -1022,15 +1022,17 @@ - Takes a boolean - argument. If true sets up a new file - system namespace for the executed -- processes and mounts a private -- /tmp directory -- inside it, that is not shared by -+ processes and mounts private -+ /tmp and -+ /var/tmp directories -+ inside it, that are not shared by - processes outside of the - namespace. This is useful to secure - access to temporary files of the - process, but makes sharing between - processes via -- /tmp -+ /tmp or -+ /var/tmp - impossible. Defaults to - false. - diff --git a/tty1.patch b/tty1.patch deleted file mode 100644 index 79145db5..00000000 --- a/tty1.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-189/units/systemd-ask-password-wall.service.in -=================================================================== ---- systemd-189.orig/units/systemd-ask-password-wall.service.in -+++ systemd-189/units/systemd-ask-password-wall.service.in -@@ -8,7 +8,7 @@ - [Unit] - Description=Forward Password Requests to Wall - Documentation=man:systemd-ask-password-console.service(8) --After=systemd-user-sessions.service -+After=systemd-user-sessions.service getty@tty1.service - - [Service] - ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service diff --git a/udev-always-rename-network.patch b/udev-always-rename-network.patch new file mode 100644 index 00000000..d6d56edd --- /dev/null +++ b/udev-always-rename-network.patch @@ -0,0 +1,77 @@ +From: Robert Milasan +Date: Thu, 28 Mar 2013 09:24:43 +0000 +Subject: udev always rename network + +udev: ensure that the network interfaces are renamed even if they exist +(bnc#809843). +--- + src/udev/udev-event.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 43 insertions(+), 3 deletions(-) + +diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c +index 3db2cb7..3ee9039 100644 +--- a/src/udev/udev-event.c ++++ b/src/udev/udev-event.c +@@ -750,6 +750,7 @@ static int rename_netif(struct udev_event *event) + struct udev_device *dev = event->dev; + int sk; + struct ifreq ifr; ++ int loop; + int err; + + log_debug("changing net interface name from '%s' to '%s'\n", +@@ -766,12 +767,51 @@ static int rename_netif(struct udev_event *event) + strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev)); + strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); + err = ioctl(sk, SIOCSIFNAME, &ifr); +- if (err >= 0) { ++ if (err == 0) { + print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); +- } else { ++ goto out; ++ } ++ ++ /* keep trying if the destination interface name already exists */ ++ err = -errno; ++ if (err != -EEXIST) { ++ goto out; ++ } ++ ++ /* free our own name, another process may wait for us */ ++ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev)); ++ err = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (err < 0) { + err = -errno; +- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); ++ goto out; + } ++ ++ /* log temporary name */ ++ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); ++ ++ /* wait a maximum of 90 seconds for our target to become available */ ++ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname); ++ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); ++ loop = 90 * 20; ++ while (loop--) { ++ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 }; ++ ++ log_debug("wait for netif '%s' to become free, loop=%i\n", event->name, (90 * 20) - loop); ++ nanosleep(&duration, NULL); ++ ++ err = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (err == 0) { ++ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); ++ break; ++ } ++ err = -errno; ++ if (err != -EEXIST) ++ break; ++ } ++ ++out: ++ if (err < 0) ++ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); + close(sk); + return err; + } diff --git a/udev-fix-sg-autoload-regression.patch b/udev-fix-sg-autoload-regression.patch new file mode 100644 index 00000000..1e79d84e --- /dev/null +++ b/udev-fix-sg-autoload-regression.patch @@ -0,0 +1,22 @@ +From: Robert Milasan +Date: Tue, 7 Aug 2012 08:34:49 +0000 +Subject: udev fix sg autoload regression + +Fix regression in udev where sg driver is no longer loaded for disc +events. Will need a non-udev solution for 12.3 (bnc#761109). +--- + rules/80-drivers.rules | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules +index 50523e4..b863532 100644 +--- a/rules/80-drivers.rules ++++ b/rules/80-drivers.rules +@@ -7,6 +7,7 @@ SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd" + SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms" + SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block" + SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block" ++SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", IMPORT{builtin}="kmod load sg" + SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev" + KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl" + diff --git a/udev-netlink-null-rules.patch b/udev-netlink-null-rules.patch new file mode 100644 index 00000000..5a4b457c --- /dev/null +++ b/udev-netlink-null-rules.patch @@ -0,0 +1,22 @@ +From: Robert Milasan +Date: Mon, 6 Aug 2012 13:35:34 +0000 +Subject: udev netlink null rules + +udevd race for netlink events (bnc#774646) +--- + src/udev/udevd.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 5a90b60..2a0bf60 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -1410,6 +1410,8 @@ int main(int argc, char *argv[]) + dev = udev_monitor_receive_device(monitor); + if (dev != NULL) { + udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); ++ if (rules == NULL) ++ rules = udev_rules_new(udev, resolve_names); + if (event_queue_insert(dev) < 0) + udev_device_unref(dev); + } diff --git a/var-run-lock.patch b/var-run-lock.patch deleted file mode 100644 index 3f87b078..00000000 --- a/var-run-lock.patch +++ /dev/null @@ -1,97 +0,0 @@ -Index: systemd-195/Makefile.am -=================================================================== ---- systemd-195.orig/Makefile.am -+++ systemd-195/Makefile.am -@@ -294,6 +294,7 @@ dist_systemunit_DATA = \ - units/sys-kernel-config.mount \ - units/sys-kernel-debug.mount \ - units/sys-fs-fuse-connections.mount \ -+ units/var-run.mount \ - units/tmp.mount \ - units/printer.target \ - units/sound.target \ -@@ -308,6 +309,11 @@ dist_systemunit_DATA = \ - units/systemd-udevd-kernel.socket \ - units/system-update.target - -+if HAVE_SYSV_COMPAT -+dist_systemunit_DATA += \ -+ units/var-lock.mount -+endif -+ - nodist_systemunit_DATA = \ - units/getty@.service \ - units/serial-getty@.service \ -@@ -3874,9 +3880,11 @@ systemd-install-data-hook: - ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \ - rm -f systemd-remount-fs.service \ - systemd-fsck-root.service \ -+ var-run.mount \ - tmp.mount && \ - $(LN_S) ../systemd-remount-fs.service systemd-remount-fs.service && \ - $(LN_S) ../systemd-fsck-root.service systemd-fsck-root.service && \ -+ $(LN_S) ../var-run.mount var-run.mount && \ - $(LN_S) ../tmp.mount tmp.mount ) - ( cd $(DESTDIR)$(userunitdir) && \ - rm -f shutdown.target sockets.target bluetooth.target printer.target sound.target && \ -@@ -3964,6 +3972,12 @@ if TARGET_MAGEIA - rm -f display-manager.service ) - endif - -+if HAVE_SYSV_COMPAT -+ ( cd $(DESTDIR)$(systemunitdir)/local-fs.target.wants && \ -+ rm -f var-lock.mount && \ -+ $(LN_S) ../var-lock.mount var-lock.mount ) -+endif -+ - install-exec-hook: $(INSTALL_EXEC_HOOKS) - - uninstall-hook: $(UNINSTALL_EXEC_HOOKS) -Index: systemd-195/units/var-lock.mount -=================================================================== ---- /dev/null -+++ systemd-195/units/var-lock.mount -@@ -0,0 +1,19 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Lock Directory -+Before=local-fs.target -+# skip mounting if the directory does not exist or is a symlink -+ConditionPathIsDirectory=/var/lock -+ConditionPathIsSymbolicLink=!/var/lock -+ -+[Mount] -+What=/run/lock -+Where=/var/lock -+Type=bind -+Options=bind -Index: systemd-195/units/var-run.mount -=================================================================== ---- /dev/null -+++ systemd-195/units/var-run.mount -@@ -0,0 +1,19 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Runtime Directory -+Before=local-fs.target -+# skip mounting if the directory does not exist or is a symlink -+ConditionPathIsDirectory=/var/run -+ConditionPathIsSymbolicLink=!/var/run -+ -+[Mount] -+What=/run -+Where=/var/run -+Type=bind -+Options=bind diff --git a/wait-for-processes-killed.patch b/wait-for-processes-killed.patch deleted file mode 100644 index a0d07aec..00000000 --- a/wait-for-processes-killed.patch +++ /dev/null @@ -1,249 +0,0 @@ -From df758e98754016119a9c8d49213a636a80ffab22 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Thu, 28 Mar 2013 23:00:32 +0100 -Subject: [PATCH] killall: print notice what we forcefully KILL - ---- - src/core/killall.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/core/killall.c b/src/core/killall.c -index 55200ff..1eb3766 100644 ---- a/src/core/killall.c -+++ b/src/core/killall.c -@@ -139,6 +139,13 @@ static int killall(int sig) { - if (ignore_proc(pid)) - continue; - -+ if (sig == SIGKILL) { -+ _cleanup_free_ char *s; -+ -+ get_process_comm(pid, &s); -+ log_notice("Sending SIGKILL to PID %lu (%s)", (unsigned long) pid, strna(s)); -+ } -+ - if (kill(pid, sig) >= 0) - n_processes++; - else if (errno != ENOENT) --- -1.8.1.4 - -From aaf7eb81be912e7bed939f31e3bc4c631b2552b3 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 1 Apr 2013 22:48:40 +0200 -Subject: [PATCH] shutdown: correctly wait for processes we killed in the - killall spree - -Previously we simply counted how many processes we killed and expected -as many waitpid() calls to succeed. That however is incorrect to do. - -As we might kill processes that are not our immediate children, and as -there might be left-over processes in the waitpid() queue from earlier -the we might get more ore less waitpid() events that we expect. - -Hence: keep precise track of the processes we kill, remove the ones we -get waitpid() for, and after each time we get SIGCHLD check if all -others still exist. We use getpgid() to check if a PID still exists. - -This should fix issues with journald not setting journal files offline -correctly on shutdown, because we'd too quickly proceed from SIGTERM to -SIGKILL because some left-over process was in our waitpid() queue. ---- - src/core/killall.c | 85 +++++++++++++++++++++++++++++++++++++----------------- - 1 file changed, 58 insertions(+), 27 deletions(-) - -diff --git a/src/core/killall.c b/src/core/killall.c -index 1eb3766..7f0dbb9 100644 ---- a/src/core/killall.c -+++ b/src/core/killall.c -@@ -22,12 +22,14 @@ - #include - #include - #include -+#include - - #include "util.h" - #include "def.h" - #include "killall.h" -+#include "set.h" - --#define TIMEOUT_USEC (5 * USEC_PER_SEC) -+#define TIMEOUT_USEC (10 * USEC_PER_SEC) - - static bool ignore_proc(pid_t pid) { - char buf[PATH_MAX]; -@@ -73,38 +75,68 @@ static bool ignore_proc(pid_t pid) { - return false; - } - --static void wait_for_children(int n_processes, sigset_t *mask) { -+static void wait_for_children(Set *pids, sigset_t *mask) { - usec_t until; - - assert(mask); - -+ if (set_isempty(pids)) -+ return; -+ - until = now(CLOCK_MONOTONIC) + TIMEOUT_USEC; - for (;;) { - struct timespec ts; - int k; - usec_t n; -+ void *p; -+ Iterator i; - -+ /* First, let the kernel inform us about killed -+ * children. Most processes will probably be our -+ * children, but some are not (might be our -+ * grandchildren instead...). */ - for (;;) { -- pid_t pid = waitpid(-1, NULL, WNOHANG); -+ pid_t pid; - -+ pid = waitpid(-1, NULL, WNOHANG); - if (pid == 0) - break; -+ if (pid < 0) { -+ if (errno == ECHILD) -+ break; - -- if (pid < 0 && errno == ECHILD) -+ log_error("waitpid() failed: %m"); - return; -+ } -+ -+ set_remove(pids, ULONG_TO_PTR(pid)); -+ } - -- if (n_processes > 0) -- if (--n_processes == 0) -- return; -+ /* Now explicitly check who might be remaining, who -+ * might not be our child. */ -+ SET_FOREACH(p, pids, i) { -+ -+ /* We misuse getpgid as a check whether a -+ * process still exists. */ -+ if (getpgid((pid_t) PTR_TO_ULONG(p)) >= 0) -+ continue; -+ -+ if (errno != ESRCH) -+ continue; -+ -+ set_remove(pids, p); - } - -+ if (set_isempty(pids)) -+ return; -+ - n = now(CLOCK_MONOTONIC); - if (n >= until) - return; - - timespec_store(&ts, until - n); -- -- if ((k = sigtimedwait(mask, NULL, &ts)) != SIGCHLD) { -+ k = sigtimedwait(mask, NULL, &ts); -+ if (k != SIGCHLD) { - - if (k < 0 && errno != EAGAIN) { - log_error("sigtimedwait() failed: %m"); -@@ -117,10 +149,9 @@ static void wait_for_children(int n_processes, sigset_t *mask) { - } - } - --static int killall(int sig) { -- DIR *dir; -+static int killall(int sig, Set *pids) { -+ _cleanup_closedir_ DIR *dir = NULL; - struct dirent *d; -- unsigned int n_processes = 0; - - dir = opendir("/proc"); - if (!dir) -@@ -143,23 +174,25 @@ static int killall(int sig) { - _cleanup_free_ char *s; - - get_process_comm(pid, &s); -- log_notice("Sending SIGKILL to PID %lu (%s)", (unsigned long) pid, strna(s)); -+ log_notice("Sending SIGKILL to PID %lu (%s).", (unsigned long) pid, strna(s)); - } - -- if (kill(pid, sig) >= 0) -- n_processes++; -- else if (errno != ENOENT) -+ if (kill(pid, sig) >= 0) { -+ if (pids) -+ set_put(pids, ULONG_TO_PTR((unsigned long) pid)); -+ } else if (errno != ENOENT) - log_warning("Could not kill %d: %m", pid); - } - -- closedir(dir); -- -- return n_processes; -+ return set_size(pids); - } - - void broadcast_signal(int sig, bool wait_for_exit) { - sigset_t mask, oldmask; -- int n_processes; -+ Set *pids; -+ -+ if (wait_for_exit) -+ pids = set_new(trivial_hash_func, trivial_compare_func); - - assert_se(sigemptyset(&mask) == 0); - assert_se(sigaddset(&mask, SIGCHLD) == 0); -@@ -168,17 +201,15 @@ void broadcast_signal(int sig, bool wait_for_exit) { - if (kill(-1, SIGSTOP) < 0 && errno != ESRCH) - log_warning("kill(-1, SIGSTOP) failed: %m"); - -- n_processes = killall(sig); -+ killall(sig, pids); - - if (kill(-1, SIGCONT) < 0 && errno != ESRCH) - log_warning("kill(-1, SIGCONT) failed: %m"); - -- if (n_processes <= 0) -- goto finish; -- - if (wait_for_exit) -- wait_for_children(n_processes, &mask); -+ wait_for_children(pids, &mask); -+ -+ assert_se(sigprocmask(SIG_SETMASK, &oldmask, NULL) == 0); - --finish: -- sigprocmask(SIG_SETMASK, &oldmask, NULL); -+ set_free(pids); - } --- -1.8.1.4 - -From b6e8f1f03dc8b7579f8c6b00372f136d74c45232 Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Wed, 3 Apr 2013 15:16:06 +0200 -Subject: [PATCH] core/killall.c: prevent segfault and initialize pids - ---- - src/core/killall.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/killall.c b/src/core/killall.c -index 7f0dbb9..e078012 100644 ---- a/src/core/killall.c -+++ b/src/core/killall.c -@@ -189,7 +189,7 @@ static int killall(int sig, Set *pids) { - - void broadcast_signal(int sig, bool wait_for_exit) { - sigset_t mask, oldmask; -- Set *pids; -+ Set *pids = NULL; - - if (wait_for_exit) - pids = set_new(trivial_hash_func, trivial_compare_func); --- -1.8.1.4 - diff --git a/xdm-display-manager.patch b/xdm-display-manager.patch deleted file mode 100644 index e7e1c191..00000000 --- a/xdm-display-manager.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-195/units/graphical.target -=================================================================== ---- systemd-195.orig/units/graphical.target -+++ systemd-195/units/graphical.target -@@ -11,7 +11,7 @@ Documentation=man:systemd.special(7) - Requires=multi-user.target - After=multi-user.target - Conflicts=rescue.target --Wants=display-manager.service -+Wants=xdm.service - AllowIsolate=yes - - [Install] From 9bc096a963c6e018145cc6df59dfc7ff62e730dab90cd6e84802c442965eaa2f Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 19 Apr 2013 14:00:28 +0000 Subject: [PATCH 6/9] Accepting request 172500 from home:rmax:branches:Base:System - Fix regression in the default for tmp auto-deletion (systemd-tmp-safe-defaults.patch, FATE#314974). OBS-URL: https://build.opensuse.org/request/show/172500 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=364 --- systemd-tmp-safe-defaults.patch | 17 +++++++++++++++++ systemd.changes | 6 ++++++ systemd.spec | 3 +++ 3 files changed, 26 insertions(+) create mode 100644 systemd-tmp-safe-defaults.patch diff --git a/systemd-tmp-safe-defaults.patch b/systemd-tmp-safe-defaults.patch new file mode 100644 index 00000000..7fca32cd --- /dev/null +++ b/systemd-tmp-safe-defaults.patch @@ -0,0 +1,17 @@ +max@suse.de FATE#314974 + +Index: systemd-200/tmpfiles.d/tmp.conf +=================================================================== +--- systemd-200.orig/tmpfiles.d/tmp.conf 2013-03-20 22:58:40.159281473 +0100 ++++ systemd-200/tmpfiles.d/tmp.conf 2013-04-19 14:37:47.500403658 +0200 +@@ -8,8 +8,8 @@ + # See tmpfiles.d(5) for details + + # Clear tmp directories separately, to make them easier to override +-d /tmp 1777 root root 10d +-d /var/tmp 1777 root root 30d ++d /tmp 1777 root root ++d /var/tmp 1777 root root + + # Exclude namespace mountpoints created with PrivateTmp=yes + x /tmp/systemd-private-* diff --git a/systemd.changes b/systemd.changes index 0c46ae31..6ba66c80 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 19 12:47:13 UTC 2013 - max@suse.com + +- Fix regression in the default for tmp auto-deletion + (systemd-tmp-safe-defaults.patch, FATE#314974). + ------------------------------------------------------------------- Fri Apr 12 16:58:31 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 4963f5f7..76b5c95a 100644 --- a/systemd.spec +++ b/systemd.spec @@ -146,6 +146,8 @@ Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch Patch27: apply-ACL-for-nvidia-device-nodes.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch +# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch -- FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. +Patch39: systemd-tmp-safe-defaults.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -394,6 +396,7 @@ cp %{SOURCE7} m4/ %patch27 -p1 %patch37 -p1 %patch38 -p1 +%patch39 -p1 %build autoreconf -fiv From a6c42807cc3a87d3ecf451b0edb0d881fde9bee9abf6ca48a29728196e7c52ba Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 19 Apr 2013 20:31:17 +0000 Subject: [PATCH 7/9] Accepting request 172582 from home:fcrozat:branches:Base:System MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update to release 202: + 'systemctl list-jobs' got some polishing. '--type=' argument may now be passed more than once. 'systemctl list-sockets' has been added. + systemd gained a new unit 'systemd-static-nodes.service'     that generates static device nodes earlier during boot, and     can run in conjunction with udev. + systemd-nspawn now places all containers in the new /machine     top-level cgroup directory in the name=systemd hierarchy. + bootchart can now store its data in the journal. + journactl can now take multiple --unit= and --user-unit=     switches. + The cryptsetup logic now understands the "luks.key=" kernel     command line switch. If a configured key file is missing, it will fallback to prompting the user. - Rebase some patches - Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to properly handle SYSTEMCTL_OPTIONS - Fix regression in the default for tmp auto-deletion (systemd-tmp-safe-defaults.patch, FATE#314974). - Add chromebook lid switch as a power switch to logind rule to enable suspend on lid close - Update to release 202: + 'systemctl list-jobs' got some polishing. '--type=' argument may now be passed more than once. 'systemctl list-sockets' has been added. + systemd gained a new unit 'systemd-static-nodes.service' OBS-URL: https://build.opensuse.org/request/show/172582 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=365 --- 1001-Reinstate-TIMEOUT-handling.patch | 2 +- 1004-udev-netlink-null-rules.patch | 4 +- 1007-fix-devname-prefix.patch | 8 +- ...splash-handling-for-password-dialogs.patch | 4 +- ...-suspend-hibernate-calls-to-pm-utils.patch | 8 +- Reinstate-TIMEOUT-handling.patch | 129 ------ ...pport-for-SysV-scripts-for-the-early.patch | 8 +- ...alid-address-familily-is-passed-to-g.patch | 8 +- ...fault-links-for-primary-cd_dvd-drive.patch | 24 - ...etup-after-md-dmraid-lvm-are-started.patch | 12 +- ...le-nss-myhostname-warning-bnc-783841.patch | 2 +- fix-devname-prefix.patch | 22 - ...-boot-prefixed-initscript-bnc-746506.patch | 22 +- ...t-after-cryptsetup-target-is-reached.patch | 25 +- ...STEMCTL_OPTIONS-environment-variable.patch | 24 +- ...plock-and-compose_table-and-kbd_rate.patch | 14 +- handle-etc-HOSTNAME.patch | 6 +- ...lock-value-in-etc-sysconfig-keyboard.patch | 18 +- ...lang-value-in-etc-sysconfig-language.patch | 10 +- ...USE-etc-sysconfig-kernel-module-list.patch | 2 +- ...lly-warn-if-nss-myhostname-is-called.patch | 20 +- ...nf-and-adds-dependencies-accordingly.patch | 4 +- re-add-persistent-net.patch | 421 ------------------ re-enable-by_path-links-for-ata-devices.patch | 120 ----- ...script-heuristic-and-add-new-LSB-hea.patch | 2 +- ...r-lock-bind-mount-if-they-aren-t-sym.patch | 6 +- ...f-ARM-based-Chromebook-as-a-power-sw.patch | 8 +- ...ate-by-id-scsi-links-for-ATA-devices.patch | 24 - ...vice-with-detected-pid-as-RemainAfte.patch | 2 +- systemd-200.tar.xz | 3 - systemd-202.tar.xz | 3 + systemd-mini.changes | 34 ++ systemd-mini.spec | 8 +- systemd-tmp-safe-defaults.patch | 25 +- systemd.changes | 22 + systemd.spec | 6 +- ...or-openSUSE-version-of-etc-sysconfig.patch | 4 +- udev-always-rename-network.patch | 77 ---- udev-fix-sg-autoload-regression.patch | 22 - udev-netlink-null-rules.patch | 22 - 40 files changed, 197 insertions(+), 988 deletions(-) delete mode 100644 Reinstate-TIMEOUT-handling.patch delete mode 100644 create-default-links-for-primary-cd_dvd-drive.patch delete mode 100644 fix-devname-prefix.patch delete mode 100644 re-add-persistent-net.patch delete mode 100644 re-enable-by_path-links-for-ata-devices.patch rename lid-switch-chromebook.patch => rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch (79%) delete mode 100644 rules-create-by-id-scsi-links-for-ATA-devices.patch delete mode 100644 systemd-200.tar.xz create mode 100644 systemd-202.tar.xz delete mode 100644 udev-always-rename-network.patch delete mode 100644 udev-fix-sg-autoload-regression.patch delete mode 100644 udev-netlink-null-rules.patch diff --git a/1001-Reinstate-TIMEOUT-handling.patch b/1001-Reinstate-TIMEOUT-handling.patch index 68c0d70c..775c0a07 100644 --- a/1001-Reinstate-TIMEOUT-handling.patch +++ b/1001-Reinstate-TIMEOUT-handling.patch @@ -83,7 +83,7 @@ index 54c51ac..d2124ea 100644 void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized); int udev_device_get_devlink_priority(struct udev_device *udev_device); diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 2ad7388..5a90b60 100644 +index 7d13b4f..9be1931 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -391,7 +391,7 @@ out: diff --git a/1004-udev-netlink-null-rules.patch b/1004-udev-netlink-null-rules.patch index 5a4b457c..8634d39d 100644 --- a/1004-udev-netlink-null-rules.patch +++ b/1004-udev-netlink-null-rules.patch @@ -8,10 +8,10 @@ udevd race for netlink events (bnc#774646) 1 file changed, 2 insertions(+) diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 5a90b60..2a0bf60 100644 +index 9be1931..d0c4c72 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c -@@ -1410,6 +1410,8 @@ int main(int argc, char *argv[]) +@@ -1414,6 +1414,8 @@ int main(int argc, char *argv[]) dev = udev_monitor_receive_device(monitor); if (dev != NULL) { udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); diff --git a/1007-fix-devname-prefix.patch b/1007-fix-devname-prefix.patch index 8ca10b93..55fb3d90 100644 --- a/1007-fix-devname-prefix.patch +++ b/1007-fix-devname-prefix.patch @@ -8,13 +8,13 @@ fix modules.devname path, it isn't in /usr. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 2a0bf60..6c2c2c9 100644 +index d0c4c72..599cd3b 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c -@@ -827,7 +827,7 @@ static void static_dev_create_from_modules(struct udev *udev) - FILE *f; +@@ -831,7 +831,7 @@ static void static_dev_create_from_modules(struct udev *udev) + return; + } - uname(&kernel); - strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL); + strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL); f = fopen(modules, "re"); diff --git a/Add-bootsplash-handling-for-password-dialogs.patch b/Add-bootsplash-handling-for-password-dialogs.patch index 63fa0a38..bf97901b 100644 --- a/Add-bootsplash-handling-for-password-dialogs.patch +++ b/Add-bootsplash-handling-for-password-dialogs.patch @@ -9,7 +9,7 @@ splash screen to verbose when a password is asked... 1 file changed, 22 insertions(+) diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c -index 8a0fb89..4bece69 100644 +index 4557155..3750f64 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -63,6 +63,9 @@ int ask_password_tty( @@ -42,7 +42,7 @@ index 8a0fb89..4bece69 100644 } zero(pollfd); -@@ -240,6 +256,12 @@ finish: +@@ -239,6 +255,12 @@ finish: close_nointr_nofail(ttyfd); } diff --git a/Forward-suspend-hibernate-calls-to-pm-utils.patch b/Forward-suspend-hibernate-calls-to-pm-utils.patch index d7fd5b91..8abce1db 100644 --- a/Forward-suspend-hibernate-calls-to-pm-utils.patch +++ b/Forward-suspend-hibernate-calls-to-pm-utils.patch @@ -8,7 +8,7 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157) 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c -index 0707625..91cbdf9 100644 +index f5e78c1..8d91117 100644 --- a/src/sleep/sleep.c +++ b/src/sleep/sleep.c @@ -22,6 +22,7 @@ @@ -57,10 +57,10 @@ index 0707625..91cbdf9 100644 /* Configure the hibernation mode */ + if (!delegate_to_pmutils) { if (streq(argv[1], "hibernate")) { - if (write_one_line_file("/sys/power/disk", "platform") < 0) - write_one_line_file("/sys/power/disk", "shutdown"); + if (write_string_file("/sys/power/disk", "platform") < 0) + write_string_file("/sys/power/disk", "shutdown"); @@ -65,13 +79,14 @@ int main(int argc, char *argv[]) { - write_one_line_file("/sys/power/disk", "shutdown"); + write_string_file("/sys/power/disk", "shutdown"); } + diff --git a/Reinstate-TIMEOUT-handling.patch b/Reinstate-TIMEOUT-handling.patch deleted file mode 100644 index 68c0d70c..00000000 --- a/Reinstate-TIMEOUT-handling.patch +++ /dev/null @@ -1,129 +0,0 @@ -From: Robert Milasan -Date: Thu, 11 Apr 2013 15:39:39 +0200 -Subject: Reinstate TIMEOUT handling - -Without treating events with timeouts specially some drivers would -cause a 30 seconds stall on boot: . - -I also received reports of some drivers not working at all, even -after the timeout. - -We will remove this patch when more drivers have been fixed in -the kernel (3.4?). - -This reverts 43d5c5f03645c4b842659f9b5bd0ae465e885e92 and -57c6f8ae5f52a6e8ffc66a54966346f733dded39. ---- - src/libudev/libudev-device.c | 19 +++++++++++++++++++ - src/libudev/libudev-private.h | 1 + - src/udev/udevd.c | 13 ++++++++++--- - 3 files changed, 30 insertions(+), 3 deletions(-) - -diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c -index 6bb2e41..4fdd242 100644 ---- a/src/libudev/libudev-device.c -+++ b/src/libudev/libudev-device.c -@@ -78,6 +78,7 @@ struct udev_device { - struct udev_list tags_list; - unsigned long long int seqnum; - usec_t usec_initialized; -+ int timeout; - int devlink_priority; - int refcount; - dev_t devnum; -@@ -172,6 +173,21 @@ static int udev_device_set_devnum(struct udev_device *udev_device, dev_t devnum) - return 0; - } - -+int udev_device_get_timeout(struct udev_device *udev_device) -+{ -+ return udev_device->timeout; -+} -+ -+static int udev_device_set_timeout(struct udev_device *udev_device, int timeout) -+{ -+ char num[32]; -+ -+ udev_device->timeout = timeout; -+ snprintf(num, sizeof(num), "%u", timeout); -+ udev_device_add_property(udev_device, "TIMEOUT", num); -+ return 0; -+} -+ - const char *udev_device_get_devpath_old(struct udev_device *udev_device) - { - return udev_device->devpath_old; -@@ -462,6 +478,8 @@ void udev_device_add_property_from_string_parse(struct udev_device *udev_device, - udev_device_set_devpath_old(udev_device, &property[12]); - } else if (startswith(property, "SEQNUM=")) { - udev_device_set_seqnum(udev_device, strtoull(&property[7], NULL, 10)); -+ } else if (startswith(property, "TIMEOUT=")) { -+ udev_device_set_timeout(udev_device, strtoull(&property[8], NULL, 10)); - } else if (startswith(property, "IFINDEX=")) { - udev_device_set_ifindex(udev_device, strtoull(&property[8], NULL, 10)); - } else if (startswith(property, "DEVMODE=")) { -@@ -653,6 +671,7 @@ struct udev_device *udev_device_new(struct udev *udev) - udev_list_init(udev, &udev_device->sysattr_value_list, true); - udev_list_init(udev, &udev_device->sysattr_list, false); - udev_list_init(udev, &udev_device->tags_list, true); -+ udev_device->timeout = -1; - udev_device->watch_handle = -1; - /* copy global properties */ - udev_list_entry_foreach(list_entry, udev_get_properties_list_entry(udev)) -diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h -index 54c51ac..d2124ea 100644 ---- a/src/libudev/libudev-private.h -+++ b/src/libudev/libudev-private.h -@@ -77,6 +77,7 @@ const char *udev_device_get_id_filename(struct udev_device *udev_device); - void udev_device_set_is_initialized(struct udev_device *udev_device); - int udev_device_add_tag(struct udev_device *udev_device, const char *tag); - void udev_device_cleanup_tags_list(struct udev_device *udev_device); -+int udev_device_get_timeout(struct udev_device *udev_device); - usec_t udev_device_get_usec_initialized(struct udev_device *udev_device); - void udev_device_set_usec_initialized(struct udev_device *udev_device, usec_t usec_initialized); - int udev_device_get_devlink_priority(struct udev_device *udev_device); -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 2ad7388..5a90b60 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -391,7 +391,7 @@ out: - } - } - --static void event_run(struct event *event) -+static void event_run(struct event *event, bool force) - { - struct udev_list_node *loop; - -@@ -417,7 +417,7 @@ static void event_run(struct event *event) - return; - } - -- if (children >= children_max) { -+ if (!force && children >= children_max) { - if (children_max > 1) - log_debug("maximum number (%i) of children reached\n", children); - return; -@@ -455,6 +455,13 @@ static int event_queue_insert(struct udev_device *dev) - - event->state = EVENT_QUEUED; - udev_list_node_append(&event->node, &event_list); -+ -+ /* run all events with a timeout set immediately */ -+ if (udev_device_get_timeout(dev) > 0) { -+ event_run(event, true); -+ return 0; -+ } -+ - return 0; - } - -@@ -566,7 +573,7 @@ static void event_queue_start(struct udev *udev) - if (is_devpath_busy(event)) - continue; - -- event_run(event); -+ event_run(event, false); - } - } - diff --git a/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch b/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch index 5d4a06de..2432288a 100644 --- a/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch +++ b/Revert-service-drop-support-for-SysV-scripts-for-the-early.patch @@ -11,7 +11,7 @@ Conflicts: 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/src/core/service.c b/src/core/service.c -index a1b2d93..da22e55 100644 +index c13ff35..0b39ec6 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -51,7 +51,8 @@ @@ -108,7 +108,7 @@ index a1b2d93..da22e55 100644 if (r < 0) return r; -@@ -3663,7 +3701,7 @@ static int service_enumerate(Manager *m) { +@@ -3661,7 +3699,7 @@ static int service_enumerate(Manager *m) { if (de->d_name[0] == 'S') { @@ -117,7 +117,7 @@ index a1b2d93..da22e55 100644 SERVICE(service)->sysv_start_priority_from_rcnd = MAX(a*10 + b, SERVICE(service)->sysv_start_priority_from_rcnd); -@@ -3680,7 +3718,8 @@ static int service_enumerate(Manager *m) { +@@ -3678,7 +3716,8 @@ static int service_enumerate(Manager *m) { goto finish; } else if (de->d_name[0] == 'K' && @@ -127,7 +127,7 @@ index a1b2d93..da22e55 100644 r = set_ensure_allocated(&shutdown_services, trivial_hash_func, trivial_compare_func); -@@ -3720,7 +3759,9 @@ static int service_enumerate(Manager *m) { +@@ -3718,7 +3757,9 @@ static int service_enumerate(Manager *m) { * runlevels we assume the stop jobs will be implicitly added * by the core logic. Also, we don't really distinguish here * between the runlevels 0 and 6 and just add them to the diff --git a/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch b/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch index 5a7b6f3a..b184dde6 100644 --- a/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch +++ b/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch @@ -8,11 +8,11 @@ Subject: avoid assertion if invalid address familily is passed to 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c -index b0fb832..b3aaca8 100644 +index 16ccb3e..884eb99 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c -@@ -384,6 +384,12 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( - struct address *addresses = NULL, *a; +@@ -383,6 +383,12 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( + struct address *a; unsigned n_addresses = 0, n; + if (af != AF_INET && af != AF_INET6) { @@ -24,7 +24,7 @@ index b0fb832..b3aaca8 100644 if (len != PROTO_ADDRESS_SIZE(af)) { *errnop = EINVAL; *h_errnop = NO_RECOVERY; -@@ -399,11 +405,6 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( +@@ -398,11 +404,6 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r( if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0) goto found; diff --git a/create-default-links-for-primary-cd_dvd-drive.patch b/create-default-links-for-primary-cd_dvd-drive.patch deleted file mode 100644 index c66a9da0..00000000 --- a/create-default-links-for-primary-cd_dvd-drive.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Milasan -Date: Tue, 12 Feb 2013 09:16:23 +0000 -Subject: create default links for primary cd_dvd drive - -cdrom_id: created links for the default cd/dvd drive (bnc#783054). ---- - rules/60-cdrom_id.rules | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules -index 6eaf76a..ec0b19a 100644 ---- a/rules/60-cdrom_id.rules -+++ b/rules/60-cdrom_id.rules -@@ -15,6 +15,9 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr - # enable the receiving of media eject button events - IMPORT{program}="cdrom_id --lock-media $devnode" - --KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100" - - LABEL="cdrom_end" diff --git a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch index a49b0589..4cf66998 100644 --- a/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch +++ b/delay-fsck-cryptsetup-after-md-dmraid-lvm-are-started.patch @@ -8,16 +8,16 @@ Subject: delay fsck / cryptsetup after md / dmraid / lvm are started 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index bee8a36..6edc760 100644 +index 9b8e229..0949287 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c -@@ -162,6 +162,7 @@ static int create_disk( +@@ -160,6 +160,7 @@ static int create_disk( + "Conflicts=umount.target\n" "DefaultDependencies=no\n" - "BindsTo=%s dev-mapper-%%i.device\n" - "After=systemd-readahead-collect.service systemd-readahead-replay.service %s\n" + "BindsTo=dev-mapper-%i.device\n" + "After=md.service dmraid.service lvm.service\n" - "Before=umount.target\n", - d, d); + "After=systemd-readahead-collect.service systemd-readahead-replay.service\n", + f); diff --git a/units/systemd-fsck@.service.in b/units/systemd-fsck@.service.in index b3c71eb..c66a411 100644 diff --git a/disable-nss-myhostname-warning-bnc-783841.patch b/disable-nss-myhostname-warning-bnc-783841.patch index 69e136f8..c0365d7c 100644 --- a/disable-nss-myhostname-warning-bnc-783841.patch +++ b/disable-nss-myhostname-warning-bnc-783841.patch @@ -7,7 +7,7 @@ Subject: disable nss-myhostname warning (bnc#783841) 1 file changed, 1 insertion(+) diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c -index 859b5a0..4aad17b 100644 +index 0437e33..c7f454c 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -134,6 +134,7 @@ static int read_data(void) { diff --git a/fix-devname-prefix.patch b/fix-devname-prefix.patch deleted file mode 100644 index 8ca10b93..00000000 --- a/fix-devname-prefix.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Frederic Crozat -Date: Wed, 5 Dec 2012 15:13:27 +0000 -Subject: fix devname prefix - -fix modules.devname path, it isn't in /usr. ---- - src/udev/udevd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 2a0bf60..6c2c2c9 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -827,7 +827,7 @@ static void static_dev_create_from_modules(struct udev *udev) - FILE *f; - - uname(&kernel); -- strscpyl(modules, sizeof(modules), ROOTPREFIX "/lib/modules/", kernel.release, "/modules.devname", NULL); -+ strscpyl(modules, sizeof(modules), "/lib/modules/", kernel.release, "/modules.devname", NULL); - f = fopen(modules, "re"); - if (f == NULL) - return; diff --git a/fix-support-for-boot-prefixed-initscript-bnc-746506.patch b/fix-support-for-boot-prefixed-initscript-bnc-746506.patch index f1538c40..189576cc 100644 --- a/fix-support-for-boot-prefixed-initscript-bnc-746506.patch +++ b/fix-support-for-boot-prefixed-initscript-bnc-746506.patch @@ -3,38 +3,40 @@ Date: Thu, 23 Aug 2012 11:08:25 +0200 Subject: fix support for boot prefixed initscript (bnc#746506) --- - src/systemctl/systemctl.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + src/systemctl/systemctl.c | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index edd136a..36918f2 100644 +index c2b1749..84ce87c 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c -@@ -3642,7 +3642,27 @@ static int enable_sysv_units(char **args) { +@@ -4060,8 +4060,28 @@ static int enable_sysv_units(char **args) { + p[strlen(p) - sizeof(".service") + 1] = 0; + found_sysv = access(p, F_OK) >= 0; - if (!found_sysv) { - free(p); +- if (!found_sysv) ++ if (!found_sysv) { +#ifdef HAVE_SYSV_COMPAT ++ free(p); + p = NULL; + if (!isempty(arg_root)) + asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/boot.%s", arg_root, name); + else + asprintf(&p, SYSTEM_SYSVINIT_PATH "/boot.%s", name); + if (!p) { -+ log_error("No memory"); -+ r = -ENOMEM; ++ r = log_oom(); + goto finish; + } + p[strlen(p) - sizeof(".service") + 1] = 0; + found_sysv = access(p, F_OK) >= 0; + + if (!found_sysv) { -+ free(p); + continue; + } +#else continue; +#endif - } ++ } /* Mark this entry, so that we don't try enabling it as native unit */ + args[f] = (char*) ""; diff --git a/force-lvm-restart-after-cryptsetup-target-is-reached.patch b/force-lvm-restart-after-cryptsetup-target-is-reached.patch index 1d1bc65b..ccfaf3f0 100644 --- a/force-lvm-restart-after-cryptsetup-target-is-reached.patch +++ b/force-lvm-restart-after-cryptsetup-target-is-reached.patch @@ -3,11 +3,11 @@ Date: Mon, 7 Nov 2011 18:04:20 +0100 Subject: force lvm restart after cryptsetup target is reached --- - src/cryptsetup/cryptsetup-generator.c | 58 ++++++++++++++++++++++++++++++++++- - 1 file changed, 57 insertions(+), 1 deletion(-) + src/cryptsetup/cryptsetup-generator.c | 57 ++++++++++++++++++++++++++++++++++- + 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c -index 8959bf5..d386b60 100644 +index ac0ed58..9b8e229 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -22,6 +22,7 @@ @@ -18,14 +18,13 @@ index 8959bf5..d386b60 100644 #include "log.h" #include "util.h" -@@ -64,6 +65,55 @@ static bool has_option(const char *haystack, const char *needle) { +@@ -64,6 +65,54 @@ static bool has_option(const char *haystack, const char *needle) { return false; } +static int create_storage_after_cryptsetup (void) { -+ int r; -+ char _cleanup_free_ *to = NULL, *p = NULL; -+ FILE _cleanup_fclose_ *f = NULL; ++ _cleanup_free_ char *to = NULL, *p = NULL; ++ _cleanup_fclose_ FILE *f = NULL; + + if (asprintf(&p, "%s/storage-after-cryptsetup.service", arg_dest) < 0) + return log_oom(); @@ -74,15 +73,15 @@ index 8959bf5..d386b60 100644 static int create_disk( const char *name, const char *device, -@@ -284,6 +334,7 @@ int main(int argc, char *argv[]) { - FILE _cleanup_fclose_ *f = NULL; +@@ -331,6 +380,7 @@ int main(int argc, char *argv[]) { + _cleanup_fclose_ FILE *f = NULL; unsigned n = 0; int r = EXIT_SUCCESS; + bool no_crypttab = false; char **i; - char _cleanup_strv_free_ **arg_proc_cmdline_disks_done = NULL; - char _cleanup_strv_free_ **arg_proc_cmdline_disks = NULL; -@@ -312,8 +363,10 @@ int main(int argc, char *argv[]) { + _cleanup_strv_free_ char **arg_proc_cmdline_disks_done = NULL; + _cleanup_strv_free_ char **arg_proc_cmdline_disks = NULL; +@@ -360,8 +410,10 @@ int main(int argc, char *argv[]) { f = fopen("/etc/crypttab", "re"); if (!f) { @@ -94,7 +93,7 @@ index 8959bf5..d386b60 100644 else { r = EXIT_FAILURE; log_error("Failed to open /etc/crypttab: %m"); -@@ -397,5 +450,8 @@ int main(int argc, char *argv[]) { +@@ -445,5 +497,8 @@ int main(int argc, char *argv[]) { r = EXIT_FAILURE; } diff --git a/handle-SYSTEMCTL_OPTIONS-environment-variable.patch b/handle-SYSTEMCTL_OPTIONS-environment-variable.patch index 9fba097e..1ed955b9 100644 --- a/handle-SYSTEMCTL_OPTIONS-environment-variable.patch +++ b/handle-SYSTEMCTL_OPTIONS-environment-variable.patch @@ -4,23 +4,25 @@ Subject: handle SYSTEMCTL_OPTIONS environment variable (bnc#798620) --- - src/systemctl/systemctl.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + src/systemctl/systemctl.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 36918f2..28d6586 100644 +index 84ce87c..cceafc9 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c -@@ -4340,6 +4340,26 @@ static int systemctl_parse_argv(int argc, char *argv[]) { - assert(argc >= 0); - assert(argv); +@@ -5926,6 +5926,28 @@ int main(int argc, char*argv[]) { + log_parse_environment(); + log_open(); -+ if (secure_getenv("SYSTEMCTL_OPTIONS")) { ++ if (secure_getenv("SYSTEMCTL_OPTIONS") && ++ (!program_invocation_short_name || ++ (program_invocation_short_name && strstr(program_invocation_short_name, "systemctl")))) { + char **parsed_systemctl_options = strv_split_quoted(getenv("SYSTEMCTL_OPTIONS")); + + if (*parsed_systemctl_options && **parsed_systemctl_options) { + char **k,**a; -+ char _cleanup_strv_free_ **new_argv = new(char*, strv_length(argv) + strv_length(parsed_systemctl_options) + 1); ++ _cleanup_strv_free_ char **new_argv = new(char*, strv_length(argv) + strv_length(parsed_systemctl_options) + 1); + new_argv[0] = strdup(argv[0]); + for (k = new_argv+1, a = parsed_systemctl_options; *a; k++, a++) { + *k = strdup(*a); @@ -35,6 +37,6 @@ index 36918f2..28d6586 100644 + } + } + - while ((c = getopt_long(argc, argv, "ht:p:aqfs:H:Pn:o:i", options, NULL)) >= 0) { - - switch (c) { + r = parse_argv(argc, argv); + if (r < 0) + goto finish; diff --git a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch index b67a80e8..050f9216 100644 --- a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch +++ b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch @@ -8,7 +8,7 @@ Subject: handle disable_caplock and compose_table and kbd_rate 1 file changed, 153 insertions(+), 3 deletions(-) diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index c1f662b..5f3354e 100644 +index 1bbf737..384f936 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -40,6 +40,7 @@ @@ -39,7 +39,7 @@ index c1f662b..5f3354e 100644 args[i++] = NULL; pid = fork(); -@@ -217,6 +220,101 @@ static void font_copy_to_all_vcs(int fd) { +@@ -212,6 +215,101 @@ static void font_copy_to_all_vcs(int fd) { } } @@ -141,7 +141,7 @@ index c1f662b..5f3354e 100644 int main(int argc, char **argv) { const char *vc; char *vc_keymap = NULL; -@@ -224,8 +322,16 @@ int main(int argc, char **argv) { +@@ -219,8 +317,16 @@ int main(int argc, char **argv) { char *vc_font = NULL; char *vc_font_map = NULL; char *vc_font_unimap = NULL; @@ -158,8 +158,8 @@ index c1f662b..5f3354e 100644 pid_t font_pid = 0, keymap_pid = 0; bool font_copy = false; int r = EXIT_FAILURE; -@@ -286,13 +392,43 @@ int main(int argc, char **argv) { - log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r)); +@@ -276,13 +382,43 @@ int main(int argc, char **argv) { + log_warning("Failed to read /proc/cmdline: %s", strerror(-r)); } + if (r <= 0) { @@ -203,7 +203,7 @@ index c1f662b..5f3354e 100644 font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) r = EXIT_SUCCESS; -@@ -300,6 +436,14 @@ finish: +@@ -290,6 +426,14 @@ finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); @@ -218,7 +218,7 @@ index c1f662b..5f3354e 100644 if (font_pid > 0) { wait_for_terminate_and_warn(KBD_SETFONT, font_pid); if (font_copy) -@@ -310,6 +454,12 @@ finish: +@@ -300,6 +444,12 @@ finish: free(vc_font); free(vc_font_map); free(vc_font_unimap); diff --git a/handle-etc-HOSTNAME.patch b/handle-etc-HOSTNAME.patch index b9fc6037..2688e851 100644 --- a/handle-etc-HOSTNAME.patch +++ b/handle-etc-HOSTNAME.patch @@ -8,7 +8,7 @@ Subject: handle /etc/HOSTNAME 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c -index 4aad17b..e7532f6 100644 +index c7f454c..cfbd706 100644 --- a/src/hostname/hostnamed.c +++ b/src/hostname/hostnamed.c @@ -129,6 +129,10 @@ static int read_data(void) { @@ -34,9 +34,9 @@ index 4aad17b..e7532f6 100644 return 0; } -- return write_one_line_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); +- return write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); + -+ r = write_one_line_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); ++ r = write_string_file_atomic_label("/etc/hostname", data[PROP_STATIC_HOSTNAME]); + if (!r) { + r = symlink_atomic("/etc/hostname", "/etc/HOSTNAME"); + } diff --git a/handle-numlock-value-in-etc-sysconfig-keyboard.patch b/handle-numlock-value-in-etc-sysconfig-keyboard.patch index d348aee2..00c10673 100644 --- a/handle-numlock-value-in-etc-sysconfig-keyboard.patch +++ b/handle-numlock-value-in-etc-sysconfig-keyboard.patch @@ -15,10 +15,10 @@ Subject: handle numlock value in /etc/sysconfig/keyboard create mode 100644 src/login/numlock-on.c diff --git a/Makefile.am b/Makefile.am -index e44b075..00905d0 100644 +index d594a3d..e82d092 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -2113,6 +2113,19 @@ dist_udevrules_DATA += \ +@@ -2205,6 +2205,19 @@ dist_udevrules_DATA += \ rules/61-accelerometer.rules # ------------------------------------------------------------------------------ @@ -39,10 +39,10 @@ index e44b075..00905d0 100644 if ENABLE_GTK_DOC SUBDIRS += \ diff --git a/configure.ac b/configure.ac -index 5421461..a2d8755 100644 +index e58d694..222ed22 100644 --- a/configure.ac +++ b/configure.ac -@@ -787,6 +787,11 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) +@@ -789,6 +789,11 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # ------------------------------------------------------------------------------ @@ -112,10 +112,10 @@ index 0000000..77a8368 + return execv(args[0], (char * const*) args); +} diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index 5f3354e..f5cafc1 100644 +index 384f936..e1f8868 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c -@@ -326,12 +326,14 @@ int main(int argc, char **argv) { +@@ -321,12 +321,14 @@ int main(int argc, char **argv) { char *vc_kbd_delay = NULL; char *vc_kbd_rate = NULL; char *vc_kbd_disable_caps_lock = NULL; @@ -130,7 +130,7 @@ index 5f3354e..f5cafc1 100644 pid_t font_pid = 0, keymap_pid = 0; bool font_copy = false; int r = EXIT_FAILURE; -@@ -399,6 +401,7 @@ int main(int argc, char **argv) { +@@ -389,6 +391,7 @@ int main(int argc, char **argv) { "KBD_DELAY", &vc_kbd_delay, "KBD_RATE", &vc_kbd_rate, "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, @@ -138,7 +138,7 @@ index 5f3354e..f5cafc1 100644 "COMPOSETABLE", &vc_compose_table, NULL); if (r < 0 && r != -ENOENT) -@@ -413,6 +416,37 @@ int main(int argc, char **argv) { +@@ -403,6 +406,37 @@ int main(int argc, char **argv) { log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; @@ -176,7 +176,7 @@ index 5f3354e..f5cafc1 100644 #endif } -@@ -435,6 +469,10 @@ int main(int argc, char **argv) { +@@ -425,6 +459,10 @@ int main(int argc, char **argv) { finish: if (keymap_pid > 0) wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); diff --git a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch index c47995b6..e2ac6c77 100644 --- a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch +++ b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch @@ -8,12 +8,12 @@ handle ROOT_USES_LANG=ctype (bnc#792182). 1 file changed, 27 insertions(+) diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c -index eefb256..d6cbea9 100644 +index d7113b9..b3fb603 100644 --- a/src/core/locale-setup.c +++ b/src/core/locale-setup.c @@ -70,6 +70,11 @@ static const char * const variable_names[_VARIABLE_MAX] = { int locale_setup(void) { - char *variables[_VARIABLE_MAX]; + char *variables[_VARIABLE_MAX] = {}; int r = 0, i; +#ifdef HAVE_SYSV_COMPAT + char _cleanup_free_ *root_uses_lang; @@ -21,9 +21,9 @@ index eefb256..d6cbea9 100644 + zero(root_uses_lang); +#endif - zero(variables); - -@@ -119,6 +124,28 @@ int locale_setup(void) { + if (detect_container(NULL) <= 0) { + r = parse_env_file("/proc/cmdline", WHITESPACE, +@@ -117,6 +122,28 @@ int locale_setup(void) { log_warning("Failed to read /etc/locale.conf: %s", strerror(-r)); } diff --git a/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch index 5bf2ad62..238d23be 100644 --- a/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch +++ b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch @@ -8,7 +8,7 @@ Subject: module-load: handle SUSE /etc/sysconfig/kernel module list 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c -index 9ee2603..2b5b571 100644 +index 7b19ee0..36b1a68 100644 --- a/src/modules-load/modules-load.c +++ b/src/modules-load/modules-load.c @@ -262,6 +262,9 @@ static int parse_argv(int argc, char *argv[]) { diff --git a/optionally-warn-if-nss-myhostname-is-called.patch b/optionally-warn-if-nss-myhostname-is-called.patch index 08038648..7a75fad5 100644 --- a/optionally-warn-if-nss-myhostname-is-called.patch +++ b/optionally-warn-if-nss-myhostname-is-called.patch @@ -8,10 +8,10 @@ Subject: optionally warn if nss-myhostname is called 2 files changed, 46 insertions(+) diff --git a/configure.ac b/configure.ac -index 5e35613..5421461 100644 +index 5173783..e58d694 100644 --- a/configure.ac +++ b/configure.ac -@@ -712,6 +712,17 @@ if test "x$enable_myhostname" != "xno"; then +@@ -714,6 +714,17 @@ if test "x$enable_myhostname" != "xno"; then fi AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) @@ -30,7 +30,7 @@ index 5e35613..5421461 100644 AC_ARG_WITH(firmware-path, AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c -index b3aaca8..043f279 100644 +index 884eb99..dbd9a2d 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -30,6 +30,9 @@ @@ -42,10 +42,10 @@ index b3aaca8..043f279 100644 +#endif #include "ifconf.h" - + #include "macro.h" @@ -44,6 +47,10 @@ - - #define ALIGN(a) (((a+sizeof(void*)-1)/sizeof(void*))*sizeof(void*)) + #define LOCALADDRESS_IPV6 &in6addr_loopback + #define LOOPBACK_INTERFACE "lo" +#ifdef LOG_NSS_MY_HOSTNAME_WARNING +static void warn(const char* hn); @@ -54,7 +54,7 @@ index b3aaca8..043f279 100644 enum nss_status _nss_myhostname_gethostbyname4_r( const char *name, struct gaih_addrtuple **pat, -@@ -116,6 +123,10 @@ enum nss_status _nss_myhostname_gethostbyname4_r( +@@ -115,6 +122,10 @@ enum nss_status _nss_myhostname_gethostbyname4_r( return NSS_STATUS_NOTFOUND; } @@ -65,7 +65,7 @@ index b3aaca8..043f279 100644 /* If this fails, n_addresses is 0. Which is fine */ ifconf_acquire_addresses(&addresses, &n_addresses); -@@ -336,6 +347,10 @@ enum nss_status _nss_myhostname_gethostbyname3_r( +@@ -334,6 +345,10 @@ enum nss_status _nss_myhostname_gethostbyname3_r( return NSS_STATUS_NOTFOUND; } @@ -76,7 +76,7 @@ index b3aaca8..043f279 100644 return fill_in_hostent(hn, af, host, buffer, buflen, errnop, h_errnop, ttlp, canonp); } -@@ -434,6 +449,10 @@ found: +@@ -429,6 +444,10 @@ found: return NSS_STATUS_UNAVAIL; } @@ -87,7 +87,7 @@ index b3aaca8..043f279 100644 return fill_in_hostent(hn, af, host, buffer, buflen, errnop, h_errnop, ttlp, NULL); } -@@ -453,3 +472,19 @@ enum nss_status _nss_myhostname_gethostbyaddr_r( +@@ -448,3 +467,19 @@ enum nss_status _nss_myhostname_gethostbyaddr_r( errnop, h_errnop, NULL); } diff --git a/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch b/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch index 2db04d0f..f3e12f27 100644 --- a/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch +++ b/parse-etc-insserv.conf-and-adds-dependencies-accordingly.patch @@ -8,7 +8,7 @@ Subject: parse /etc/insserv.conf and adds dependencies accordingly 1 file changed, 101 insertions(+) diff --git a/src/core/service.c b/src/core/service.c -index 98266a5..8707cb5 100644 +index cf0bbe0..08fc97c 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3440,6 +3440,105 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) { @@ -117,7 +117,7 @@ index 98266a5..8707cb5 100644 static int service_enumerate(Manager *m) { char **p; -@@ -3602,6 +3701,8 @@ static int service_enumerate(Manager *m) { +@@ -3600,6 +3699,8 @@ static int service_enumerate(Manager *m) { r = 0; diff --git a/re-add-persistent-net.patch b/re-add-persistent-net.patch deleted file mode 100644 index dd82550b..00000000 --- a/re-add-persistent-net.patch +++ /dev/null @@ -1,421 +0,0 @@ -From: Robert Milasan -Date: Wed, 20 Mar 2013 10:14:59 +0000 -Subject: re-add persistent net - -udev: re-add persistent network rules (bnc#809843). ---- - Makefile.am | 10 +- - .../75-persistent-net-generator.rules | 102 +++++++++++++++ - src/udev/rule_generator/rule_generator.functions | 113 ++++++++++++++++ - src/udev/rule_generator/write_net_rules | 145 +++++++++++++++++++++ - 4 files changed, 369 insertions(+), 1 deletion(-) - create mode 100644 src/udev/rule_generator/75-persistent-net-generator.rules - create mode 100644 src/udev/rule_generator/rule_generator.functions - create mode 100644 src/udev/rule_generator/write_net_rules - -diff --git a/Makefile.am b/Makefile.am -index 10609f3..f5e4159 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2287,6 +2287,14 @@ EXTRA_DIST += \ - src/gudev/seed-example.js - - # ------------------------------------------------------------------------------ -+dist_udevhome_SCRIPTS = \ -+ src/udev/rule_generator/rule_generator.functions \ -+ src/udev/rule_generator/write_net_rules -+ -+dist_udevrules_DATA += \ -+ src/udev/rule_generator/75-persistent-net-generator.rules -+ -+# ------------------------------------------------------------------------------ - if ENABLE_KEYMAP - keymap_SOURCES = \ - src/udev/keymap/keymap.c -@@ -2314,7 +2322,7 @@ dist_udevrules_DATA += \ - src/udev/keymap/95-keymap.rules \ - src/udev/keymap/95-keyboard-force-release.rules - --dist_udevhome_SCRIPTS = \ -+dist_udevhome_SCRIPTS += \ - src/udev/keymap/findkeyboards \ - src/udev/keymap/keyboard-force-release.sh - -diff --git a/src/udev/rule_generator/75-persistent-net-generator.rules b/src/udev/rule_generator/75-persistent-net-generator.rules -new file mode 100644 -index 0000000..4f80573 ---- /dev/null -+++ b/src/udev/rule_generator/75-persistent-net-generator.rules -@@ -0,0 +1,102 @@ -+# do not edit this file, it will be overwritten on update -+ -+# these rules generate rules for persistent network device naming -+# -+# variables used to communicate: -+# MATCHADDR MAC address used for the match -+# MATCHID bus_id used for the match -+# MATCHDRV driver name used for the match -+# MATCHIFTYPE interface type match -+# COMMENT comment to add to the generated rule -+# INTERFACE_NAME requested name supplied by external tool -+# INTERFACE_NEW new interface name returned by rule writer -+ -+ACTION!="add", GOTO="persistent_net_generator_end" -+SUBSYSTEM!="net", GOTO="persistent_net_generator_end" -+ -+# ignore the interface if a name has already been set -+NAME=="?*", GOTO="persistent_net_generator_end" -+ -+# device name whitelist -+KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" -+ -+# ignore Xen virtual interfaces -+SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" -+ -+# read MAC address -+ENV{MATCHADDR}="$attr{address}" -+ -+# match interface type -+ENV{MATCHIFTYPE}="$attr{type}" -+ -+# ignore KVM virtual interfaces -+ENV{MATCHADDR}=="52:54:00:*", GOTO="persistent_net_generator_end" -+# ignore VMWare virtual interfaces -+ENV{MATCHADDR}=="00:0c:29:*|00:50:56:*", GOTO="persistent_net_generator_end" -+# ignore Hyper-V virtual interfaces -+ENV{MATCHADDR}=="00:15:5d:*", GOTO="persistent_net_generator_end" -+ -+# These vendors are known to violate the local MAC address assignment scheme -+# Interlan, DEC (UNIBUS or QBUS), Apollo, Cisco, Racal-Datacom -+ENV{MATCHADDR}=="02:07:01:*", GOTO="globally_administered_whitelist" -+# 3Com -+ENV{MATCHADDR}=="02:60:60:*", GOTO="globally_administered_whitelist" -+# 3Com IBM PC; Imagen; Valid; Cisco; Apple -+ENV{MATCHADDR}=="02:60:8c:*", GOTO="globally_administered_whitelist" -+# Intel -+ENV{MATCHADDR}=="02:a0:c9:*", GOTO="globally_administered_whitelist" -+# Olivetti -+ENV{MATCHADDR}=="02:aa:3c:*", GOTO="globally_administered_whitelist" -+# CMC Masscomp; Silicon Graphics; Prime EXL -+ENV{MATCHADDR}=="02:cf:1f:*", GOTO="globally_administered_whitelist" -+# Prominet Corporation Gigabit Ethernet Switch -+ENV{MATCHADDR}=="02:e0:3b:*", GOTO="globally_administered_whitelist" -+# BTI (Bus-Tech, Inc.) IBM Mainframes -+ENV{MATCHADDR}=="02:e6:d3:*", GOTO="globally_administered_whitelist" -+# Realtek -+ENV{MATCHADDR}=="52:54:00:*", GOTO="globally_administered_whitelist" -+# Novell 2000 -+ENV{MATCHADDR}=="52:54:4c:*", GOTO="globally_administered_whitelist" -+# Realtec -+ENV{MATCHADDR}=="52:54:ab:*", GOTO="globally_administered_whitelist" -+# Kingston Technologies -+ENV{MATCHADDR}=="e2:0c:0f:*", GOTO="globally_administered_whitelist" -+# Xensource -+ENV{MATCHADDR}=="00:16:3e:*", GOTO="globally_administered_whitelist" -+ -+# match interface dev_id -+ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}" -+ -+# do not use "locally administered" MAC address -+ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}="" -+ -+# do not use empty address -+ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}="" -+ -+LABEL="globally_administered_whitelist" -+ -+# build comment line for generated rule: -+SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" -+SUBSYSTEMS=="usb", ATTRS{idVendor}=="?*", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" -+SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" -+SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" -+ -+# ibmveth likes to use "locally administered" MAC addresses -+DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}", ENV{COMMENT}="ibmveth ($id)" -+ -+# S/390 uses id matches only, do not use MAC address match -+SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}="" -+ -+# see if we got enough data to create a rule -+ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", GOTO="persistent_net_generator_end" -+ -+# default comment -+ENV{COMMENT}=="", ENV{COMMENT}="net device ($attr{driver})" -+ -+# write rule -+DRIVERS=="?*", IMPORT{program}="write_net_rules" -+ -+# rename interface if needed -+ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" -+ -+LABEL="persistent_net_generator_end" -diff --git a/src/udev/rule_generator/rule_generator.functions b/src/udev/rule_generator/rule_generator.functions -new file mode 100644 -index 0000000..087bc34 ---- /dev/null -+++ b/src/udev/rule_generator/rule_generator.functions -@@ -0,0 +1,113 @@ -+# functions used by the udev rule generator -+ -+# Copyright (C) 2006 Marco d'Itri -+ -+# This program is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 2 of the License, or -+# (at your option) any later version. -+ -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+ -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+PATH='/usr/bin:/bin:/usr/sbin:/sbin' -+ -+# Read a single line from file $1 in the $DEVPATH directory. -+# The function must not return an error even if the file does not exist. -+sysread() { -+ local file="$1" -+ [ -e "/sys$DEVPATH/$file" ] || return 0 -+ local value -+ read value < "/sys$DEVPATH/$file" || return 0 -+ echo "$value" -+} -+ -+sysreadlink() { -+ local file="$1" -+ [ -e "/sys$DEVPATH/$file" ] || return 0 -+ readlink -f /sys$DEVPATH/$file 2> /dev/null || true -+} -+ -+# Return true if a directory is writeable. -+writeable() { -+ if ln -s test-link $1/.is-writeable 2> /dev/null; then -+ rm -f $1/.is-writeable -+ return 0 -+ else -+ return 1 -+ fi -+} -+ -+# Create a lock file for the current rules file. -+lock_rules_file() { -+ RUNDIR="/run/udev" -+ [ -e "$RUNDIR" ] || return 0 -+ -+ RULES_LOCK="$RUNDIR/.lock-${RULES_FILE##*/}" -+ -+ retry=30 -+ while ! mkdir $RULES_LOCK 2> /dev/null; do -+ if [ $retry -eq 0 ]; then -+ echo "Cannot lock $RULES_FILE!" >&2 -+ exit 2 -+ fi -+ sleep 1 -+ retry=$(($retry - 1)) -+ done -+} -+ -+unlock_rules_file() { -+ [ "$RULES_LOCK" ] || return 0 -+ rmdir $RULES_LOCK || true -+} -+ -+# Choose the real rules file if it is writeable or a temporary file if not. -+# Both files should be checked later when looking for existing rules. -+choose_rules_file() { -+ RUNDIR="/run/udev" -+ local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}" -+ [ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1 -+ -+ if writeable ${RULES_FILE%/*}; then -+ RO_RULES_FILE='/dev/null' -+ else -+ RO_RULES_FILE=$RULES_FILE -+ RULES_FILE=$tmp_rules_file -+ fi -+} -+ -+# Return the name of the first free device. -+raw_find_next_available() { -+ local links="$1" -+ -+ local basename=${links%%[ 0-9]*} -+ local max=-1 -+ for name in $links; do -+ local num=${name#$basename} -+ [ "$num" ] || num=0 -+ [ $num -gt $max ] && max=$num -+ done -+ -+ local max=$(($max + 1)) -+ # "name0" actually is just "name" -+ [ $max -eq 0 ] && return -+ echo "$max" -+} -+ -+# Find all rules matching a key (with action) and a pattern. -+find_all_rules() { -+ local key="$1" -+ local linkre="$2" -+ local match="$3" -+ -+ local search='.*[[:space:],]'"$key"'"('"$linkre"')".*' -+ echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \ -+ $RO_RULES_FILE \ -+ $([ -e $RULES_FILE ] && echo $RULES_FILE) \ -+ 2>/dev/null) -+} -diff --git a/src/udev/rule_generator/write_net_rules b/src/udev/rule_generator/write_net_rules -new file mode 100644 -index 0000000..fad1cc5 ---- /dev/null -+++ b/src/udev/rule_generator/write_net_rules -@@ -0,0 +1,145 @@ -+#!/bin/sh -e -+ -+# This script is run to create persistent network device naming rules -+# based on properties of the device. -+# If the interface needs to be renamed, INTERFACE_NEW= will be printed -+# on stdout to allow udev to IMPORT it. -+ -+# variables used to communicate: -+# MATCHADDR MAC address used for the match -+# MATCHID bus_id used for the match -+# MATCHDEVID dev_id used for the match -+# MATCHDRV driver name used for the match -+# MATCHIFTYPE interface type match -+# COMMENT comment to add to the generated rule -+# INTERFACE_NAME requested name supplied by external tool -+# INTERFACE_NEW new interface name returned by rule writer -+ -+# Copyright (C) 2006 Marco d'Itri -+# Copyright (C) 2007 Kay Sievers -+# -+# This program is free software: you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program. If not, see . -+ -+# debug, if UDEV_LOG= -+if [ -n "$UDEV_LOG" ]; then -+ if [ "$UDEV_LOG" -ge 7 ]; then -+ set -x -+ fi -+fi -+ -+RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' -+ -+if [ -e /usr/lib/udev/rule_generator.functions ]; then -+ . /usr/lib/udev/rule_generator.functions -+else -+ . /lib/udev/rule_generator.functions -+fi -+ -+interface_name_taken() { -+ local value="$(find_all_rules 'NAME=' $INTERFACE)" -+ if [ "$value" ]; then -+ return 0 -+ else -+ return 1 -+ fi -+} -+ -+find_next_available() { -+ raw_find_next_available "$(find_all_rules 'NAME=' "$1")" -+} -+ -+write_rule() { -+ local match="$1" -+ local name="$2" -+ local comment="$3" -+ -+ { -+ if [ "$PRINT_HEADER" ]; then -+ PRINT_HEADER= -+ echo "# This file was automatically generated by the $0" -+ echo "# program, run by the persistent-net-generator.rules rules file." -+ echo "#" -+ echo "# You can modify it, as long as you keep each rule on a single" -+ echo "# line, and change only the value of the NAME= key." -+ fi -+ -+ echo "" -+ [ "$comment" ] && echo "# $comment" -+ echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\"" -+ } >> $RULES_FILE -+} -+ -+if [ -z "$INTERFACE" ]; then -+ echo "missing \$INTERFACE" >&2 -+ exit 1 -+fi -+ -+# Prevent concurrent processes from modifying the file at the same time. -+lock_rules_file -+ -+# Check if the rules file is writeable. -+choose_rules_file -+ -+# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces -+if [ "$MATCHADDR" ]; then -+ match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\"" -+fi -+ -+if [ "$MATCHDRV" ]; then -+ match="$match, DRIVERS==\"$MATCHDRV\"" -+fi -+ -+if [ "$MATCHDEVID" ]; then -+ match="$match, ATTR{dev_id}==\"$MATCHDEVID\"" -+fi -+ -+if [ "$MATCHID" ]; then -+ match="$match, KERNELS==\"$MATCHID\"" -+fi -+ -+if [ "$MATCHIFTYPE" ]; then -+ match="$match, ATTR{type}==\"$MATCHIFTYPE\"" -+fi -+ -+if [ -z "$match" ]; then -+ echo "missing valid match" >&2 -+ unlock_rules_file -+ exit 1 -+fi -+ -+basename=${INTERFACE%%[0-9]*} -+match="$match, KERNEL==\"$basename*\"" -+ -+if [ "$INTERFACE_NAME" ]; then -+ # external tools may request a custom name -+ COMMENT="$COMMENT (custom name provided by external tool)" -+ if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then -+ INTERFACE=$INTERFACE_NAME; -+ echo "INTERFACE_NEW=$INTERFACE" -+ fi -+else -+ # if a rule using the current name already exists, find a new name -+ if interface_name_taken; then -+ INTERFACE="$basename$(find_next_available "$basename[0-9]*")" -+ # prevent INTERFACE from being "eth" instead of "eth0" -+ [ "$INTERFACE" = "${INTERFACE%%[ \[\]0-9]*}" ] && INTERFACE=${INTERFACE}0 -+ echo "INTERFACE_NEW=$INTERFACE" -+ fi -+fi -+ -+write_rule "$match" "$INTERFACE" "$COMMENT" -+ -+unlock_rules_file -+ -+exit 0 diff --git a/re-enable-by_path-links-for-ata-devices.patch b/re-enable-by_path-links-for-ata-devices.patch deleted file mode 100644 index 64f01c1f..00000000 --- a/re-enable-by_path-links-for-ata-devices.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: Robert Milasan -Date: Thu, 12 Jul 2012 15:56:34 +0000 -Subject: re-enable by_path links for ata devices - -Fix by-path links for ATA transport (bnc#770910) ---- - src/udev/udev-builtin-path_id.c | 92 +++++++++++++++++++++++++++++++++++------ - 1 file changed, 80 insertions(+), 12 deletions(-) - -diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c -index da02731..a77d4e8 100644 ---- a/src/udev/udev-builtin-path_id.c -+++ b/src/udev/udev-builtin-path_id.c -@@ -338,6 +338,85 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char * - return parent; - } - -+static struct udev_device *handle_ata(struct udev_device *parent, char **path) -+{ -+ struct udev_device *hostdev; -+ int host, bus, target, lun; -+ const char *name; -+ char *base; -+ char *pos; -+ DIR *dir; -+ struct dirent *dent; -+ int basenum, len; -+ -+ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); -+ if (hostdev == NULL) -+ return NULL; -+ -+ name = udev_device_get_sysname(parent); -+ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) -+ return NULL; -+ -+ /* rebase ata offset to get the local relative number */ -+ basenum = -1; -+ base = strdup(udev_device_get_syspath(hostdev)); -+ if (base == NULL) -+ return NULL; -+ pos = strrchr(base, '/'); -+ if (pos == NULL) { -+ parent = NULL; -+ goto out; -+ } -+ pos[0] = '\0'; -+ len = strlen(base) - 5; -+ if (len <= 0) { -+ parent = NULL; -+ goto out; -+ } -+ base[len] = '\0'; -+ dir = opendir(base); -+ if (dir == NULL) { -+ parent = NULL; -+ goto out; -+ } -+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { -+ char *rest; -+ int i; -+ -+ if (dent->d_name[0] == '.') -+ continue; -+ if (dent->d_type != DT_DIR && dent->d_type != DT_LNK) -+ continue; -+ if (strncmp(dent->d_name, "ata", 3) != 0) -+ continue; -+ i = strtoul(&dent->d_name[3], &rest, 10); -+ -+ /* ata devices start with 1, so decrease by 1 if i is bigger then 0 */ -+ if (i > 0) -+ i--; -+ if (rest[0] != '\0') -+ continue; -+ /* -+ * find the smallest number; the host really needs to export its -+ * own instance number per parent device; relying on the global host -+ * enumeration and plainly rebasing the numbers sounds unreliable -+ */ -+ if (basenum == -1 || i < basenum) -+ basenum = i; -+ } -+ closedir(dir); -+ if (basenum == -1) { -+ parent = NULL; -+ goto out; -+ } -+ host -= basenum; -+ -+ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun); -+out: -+ free(base); -+ return hostdev; -+} -+ - static struct udev_device *handle_scsi(struct udev_device *parent, char **path) - { - const char *devtype; -@@ -374,19 +453,8 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path) - goto out; - } - -- /* -- * We do not support the ATA transport class, it uses global counters -- * to name the ata devices which numbers spread across multiple -- * controllers. -- * -- * The real link numbers are not exported. Also, possible chains of ports -- * behind port multipliers cannot be composed that way. -- * -- * Until all that is solved at the kernel level, there are no by-path/ -- * links for ATA devices. -- */ - if (strstr(name, "/ata") != NULL) { -- parent = NULL; -+ parent = handle_ata(parent, path); - goto out; - } - diff --git a/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch b/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch index 9345fe41..3efed705 100644 --- a/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch +++ b/remain_after_exit-initscript-heuristic-and-add-new-LSB-hea.patch @@ -12,7 +12,7 @@ PIDFile: and X-Systemd-RemainAfterExit to control it. 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/core/service.c b/src/core/service.c -index e34bcf1..a1b2d93 100644 +index 5118b06..c13ff35 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -135,6 +135,7 @@ static void service_init(Unit *u) { diff --git a/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch b/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch index 2a2165bf..f57a2748 100644 --- a/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch +++ b/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch @@ -11,10 +11,10 @@ Subject: restore /var/run and /var/lock bind mount if they aren't symlink create mode 100644 units/var-run.mount diff --git a/Makefile.am b/Makefile.am -index 00905d0..10609f3 100644 +index e82d092..38309a9 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -398,6 +398,12 @@ dist_systemunit_DATA = \ +@@ -406,6 +406,12 @@ dist_systemunit_DATA = \ units/system-update.target \ units/initrd-switch-root.target @@ -27,7 +27,7 @@ index 00905d0..10609f3 100644 nodist_systemunit_DATA = \ units/getty@.service \ units/serial-getty@.service \ -@@ -3913,6 +3919,9 @@ RUNLEVEL4_TARGET_WANTS += \ +@@ -4018,6 +4024,9 @@ RUNLEVEL4_TARGET_WANTS += \ systemd-update-utmp-runlevel.service RUNLEVEL5_TARGET_WANTS += \ systemd-update-utmp-runlevel.service diff --git a/lid-switch-chromebook.patch b/rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch similarity index 79% rename from lid-switch-chromebook.patch rename to rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch index b635e1ce..52fe82ea 100644 --- a/lid-switch-chromebook.patch +++ b/rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch @@ -1,8 +1,7 @@ -From fced3673ee1001dc905206f9a92ea2062f951d3c Mon Sep 17 00:00:00 2001 From: Robert Schweikert Date: Fri, 12 Apr 2013 12:08:16 -0400 -Subject: [PATCH] rules: add lid switch of ARM based Chromebook as a power - switch to logind +Subject: rules: add lid switch of ARM based Chromebook as a power switch to + logind --- src/login/70-power-switch.rules | 1 + @@ -19,6 +18,3 @@ index 36fb827..d925ab7 100644 +SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="gpio-keys.8", TAG+="power-switch" LABEL="power_switch_end" --- -1.8.1.4 - diff --git a/rules-create-by-id-scsi-links-for-ATA-devices.patch b/rules-create-by-id-scsi-links-for-ATA-devices.patch deleted file mode 100644 index c2f3186c..00000000 --- a/rules-create-by-id-scsi-links-for-ATA-devices.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Milasan -Date: Wed, 27 Jun 2012 08:55:59 +0000 -Subject: rules create by id scsi links for ATA devices - -Re-enable creation of by-id scsi links for ATA devices. (bnc#769002) ---- - rules/60-persistent-storage.rules | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules -index a4d009a..f720c7e 100644 ---- a/rules/60-persistent-storage.rules -+++ b/rules/60-persistent-storage.rules -@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="s - KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" - -+# scsi compat links for ATA devices -+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" -+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" -+ - # firewire - KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" - KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" diff --git a/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch b/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch index 0c8dd048..91cd2eab 100644 --- a/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch +++ b/service-flags-sysv-service-with-detected-pid-as-RemainAfte.patch @@ -13,7 +13,7 @@ Fixes https://bugzilla.novell.com/show_bug.cgi?id=721426 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c -index 8707cb5..e34bcf1 100644 +index 08fc97c..5118b06 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2072,8 +2072,13 @@ static void service_enter_running(Service *s, ServiceResult f) { diff --git a/systemd-200.tar.xz b/systemd-200.tar.xz deleted file mode 100644 index e0049a36..00000000 --- a/systemd-200.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a08baa8fa5c48f0aab683b2f771e4be75c3c852afc45e5cb4df06428ac8c217 -size 2109864 diff --git a/systemd-202.tar.xz b/systemd-202.tar.xz new file mode 100644 index 00000000..a2ff6a2e --- /dev/null +++ b/systemd-202.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c43073252a52eb9f9ab9bd698be0192bcb2175ba5daba6057250083dd64e059 +size 2149860 diff --git a/systemd-mini.changes b/systemd-mini.changes index 984f5e88..1216a5e5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Fri Apr 19 16:40:17 UTC 2013 - fcrozat@suse.com + +- Update to release 202: + + 'systemctl list-jobs' got some polishing. '--type=' argument + may now be passed more than once. 'systemctl list-sockets' has + been added. + + systemd gained a new unit 'systemd-static-nodes.service' +    that generates static device nodes earlier during boot, and +    can run in conjunction with udev. + + systemd-nspawn now places all containers in the new /machine +    top-level cgroup directory in the name=systemd hierarchy. + + bootchart can now store its data in the journal. + + journactl can now take multiple --unit= and --user-unit= +    switches. + + The cryptsetup logic now understands the "luks.key=" kernel +    command line switch. If a configured key file is missing, it + will fallback to prompting the user. +- Rebase some patches +- Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to + properly handle SYSTEMCTL_OPTIONS + +------------------------------------------------------------------- +Fri Apr 19 12:47:13 UTC 2013 - max@suse.com + +- Fix regression in the default for tmp auto-deletion + (systemd-tmp-safe-defaults.patch, FATE#314974). + ------------------------------------------------------------------- Fri Apr 12 16:58:31 UTC 2013 - fcrozat@suse.com @@ -131,6 +159,12 @@ reset by assigning empty string to them, using drop-in. to systemd unit files. - Merge patches for nss-myhostname package to this package. +------------------------------------------------------------------- +Fri Apr 12 16:17:04 UTC 2013 - rschweikert@suse.com + +- Add chromebook lid switch as a power switch to logind rule to + enable suspend on lid close + ------------------------------------------------------------------- Mon Apr 8 14:51:47 CEST 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index d0d49789..4779c7b1 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -25,7 +25,7 @@ Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 200 +Version: 202 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -151,6 +151,8 @@ Patch26: ensure-systemd-udevd-is-started-before-local-fs-pre-for-lo.patch Patch27: apply-ACL-for-nvidia-device-nodes.patch # PATCH-FIX-OPENSUSE Revert-service-drop-support-for-SysV-scripts-for-the-early.patch fcrozat@suse.com -- handle boot.* initscripts Patch37: Revert-service-drop-support-for-SysV-scripts-for-the-early.patch +# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch -- FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. +Patch39: systemd-tmp-safe-defaults.patch # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -162,6 +164,8 @@ Patch23: disable-nss-myhostname-warning-bnc-783841.patch Patch24: handle-etc-HOSTNAME.patch # PATCH-FIX-OPENSUSE Forward-suspend-hibernate-calls-to-pm-utils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch +# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind +Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch @@ -396,6 +400,8 @@ cp %{SOURCE7} m4/ %patch26 -p1 %patch27 -p1 %patch37 -p1 +%patch38 -p1 +%patch39 -p1 %build autoreconf -fiv diff --git a/systemd-tmp-safe-defaults.patch b/systemd-tmp-safe-defaults.patch index 7fca32cd..4c957df7 100644 --- a/systemd-tmp-safe-defaults.patch +++ b/systemd-tmp-safe-defaults.patch @@ -1,17 +1,26 @@ -max@suse.de FATE#314974 +From: Reinhard Max +Date: Fri, 19 Apr 2013 16:12:28 +0200 +Subject: systemd tmp safe defaults -Index: systemd-200/tmpfiles.d/tmp.conf -=================================================================== ---- systemd-200.orig/tmpfiles.d/tmp.conf 2013-03-20 22:58:40.159281473 +0100 -+++ systemd-200/tmpfiles.d/tmp.conf 2013-04-19 14:37:47.500403658 +0200 -@@ -8,8 +8,8 @@ +Fix regression in the default for tmp auto-deletion (FATE#314974). +SUSE policy is to not clean /tmp by default. +--- + tmpfiles.d/tmp.conf | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf +index 3b534a1..99eb6f2 100644 +--- a/tmpfiles.d/tmp.conf ++++ b/tmpfiles.d/tmp.conf +@@ -8,8 +8,9 @@ # See tmpfiles.d(5) for details # Clear tmp directories separately, to make them easier to override -d /tmp 1777 root root 10d -d /var/tmp 1777 root root 30d -+d /tmp 1777 root root -+d /var/tmp 1777 root root ++# SUSE policy: we don't clean those directories ++d /tmp 1777 root root - ++d /var/tmp 1777 root root - # Exclude namespace mountpoints created with PrivateTmp=yes x /tmp/systemd-private-* diff --git a/systemd.changes b/systemd.changes index 6ba66c80..1216a5e5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Apr 19 16:40:17 UTC 2013 - fcrozat@suse.com + +- Update to release 202: + + 'systemctl list-jobs' got some polishing. '--type=' argument + may now be passed more than once. 'systemctl list-sockets' has + been added. + + systemd gained a new unit 'systemd-static-nodes.service' +    that generates static device nodes earlier during boot, and +    can run in conjunction with udev. + + systemd-nspawn now places all containers in the new /machine +    top-level cgroup directory in the name=systemd hierarchy. + + bootchart can now store its data in the journal. + + journactl can now take multiple --unit= and --user-unit= +    switches. + + The cryptsetup logic now understands the "luks.key=" kernel +    command line switch. If a configured key file is missing, it + will fallback to prompting the user. +- Rebase some patches +- Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to + properly handle SYSTEMCTL_OPTIONS + ------------------------------------------------------------------- Fri Apr 19 12:47:13 UTC 2013 - max@suse.com diff --git a/systemd.spec b/systemd.spec index 76b5c95a..dfb95a86 100644 --- a/systemd.spec +++ b/systemd.spec @@ -23,7 +23,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 200 +Version: 202 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -159,8 +159,8 @@ Patch23: disable-nss-myhostname-warning-bnc-783841.patch Patch24: handle-etc-HOSTNAME.patch # PATCH-FIX-OPENSUSE Forward-suspend-hibernate-calls-to-pm-utils.patch fcrozat@suse.com bnc#790157 -- forward to pm-utils Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch -# PATCH-FIX-UPSTREAM lid-switch-chromebook.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind -Patch38: lid-switch-chromebook.patch +# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind +Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # udev patches # PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch diff --git a/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch b/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch index 710bc9a1..8a67df99 100644 --- a/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch +++ b/timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch @@ -7,10 +7,10 @@ Subject: timedate: add support for openSUSE version of /etc/sysconfig/clock 1 file changed, 7 insertions(+) diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c -index 16fffd0..b1b1859 100644 +index cdb6e5b..7246452 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c -@@ -180,6 +180,13 @@ static int read_data(void) { +@@ -182,6 +182,13 @@ static int read_data(void) { goto have_timezone; } } diff --git a/udev-always-rename-network.patch b/udev-always-rename-network.patch deleted file mode 100644 index d6d56edd..00000000 --- a/udev-always-rename-network.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Robert Milasan -Date: Thu, 28 Mar 2013 09:24:43 +0000 -Subject: udev always rename network - -udev: ensure that the network interfaces are renamed even if they exist -(bnc#809843). ---- - src/udev/udev-event.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 43 insertions(+), 3 deletions(-) - -diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c -index 3db2cb7..3ee9039 100644 ---- a/src/udev/udev-event.c -+++ b/src/udev/udev-event.c -@@ -750,6 +750,7 @@ static int rename_netif(struct udev_event *event) - struct udev_device *dev = event->dev; - int sk; - struct ifreq ifr; -+ int loop; - int err; - - log_debug("changing net interface name from '%s' to '%s'\n", -@@ -766,12 +767,51 @@ static int rename_netif(struct udev_event *event) - strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev)); - strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); - err = ioctl(sk, SIOCSIFNAME, &ifr); -- if (err >= 0) { -+ if (err == 0) { - print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); -- } else { -+ goto out; -+ } -+ -+ /* keep trying if the destination interface name already exists */ -+ err = -errno; -+ if (err != -EEXIST) { -+ goto out; -+ } -+ -+ /* free our own name, another process may wait for us */ -+ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev)); -+ err = ioctl(sk, SIOCSIFNAME, &ifr); -+ if (err < 0) { - err = -errno; -- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); -+ goto out; - } -+ -+ /* log temporary name */ -+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); -+ -+ /* wait a maximum of 90 seconds for our target to become available */ -+ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname); -+ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name); -+ loop = 90 * 20; -+ while (loop--) { -+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 }; -+ -+ log_debug("wait for netif '%s' to become free, loop=%i\n", event->name, (90 * 20) - loop); -+ nanosleep(&duration, NULL); -+ -+ err = ioctl(sk, SIOCSIFNAME, &ifr); -+ if (err == 0) { -+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname); -+ break; -+ } -+ err = -errno; -+ if (err != -EEXIST) -+ break; -+ } -+ -+out: -+ if (err < 0) -+ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname); - close(sk); - return err; - } diff --git a/udev-fix-sg-autoload-regression.patch b/udev-fix-sg-autoload-regression.patch deleted file mode 100644 index 1e79d84e..00000000 --- a/udev-fix-sg-autoload-regression.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Robert Milasan -Date: Tue, 7 Aug 2012 08:34:49 +0000 -Subject: udev fix sg autoload regression - -Fix regression in udev where sg driver is no longer loaded for disc -events. Will need a non-udev solution for 12.3 (bnc#761109). ---- - rules/80-drivers.rules | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules -index 50523e4..b863532 100644 ---- a/rules/80-drivers.rules -+++ b/rules/80-drivers.rules -@@ -7,6 +7,7 @@ SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd" - SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms" - SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block" - SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block" -+SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", IMPORT{builtin}="kmod load sg" - SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev" - KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl" - diff --git a/udev-netlink-null-rules.patch b/udev-netlink-null-rules.patch deleted file mode 100644 index 5a4b457c..00000000 --- a/udev-netlink-null-rules.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Robert Milasan -Date: Mon, 6 Aug 2012 13:35:34 +0000 -Subject: udev netlink null rules - -udevd race for netlink events (bnc#774646) ---- - src/udev/udevd.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/udev/udevd.c b/src/udev/udevd.c -index 5a90b60..2a0bf60 100644 ---- a/src/udev/udevd.c -+++ b/src/udev/udevd.c -@@ -1410,6 +1410,8 @@ int main(int argc, char *argv[]) - dev = udev_monitor_receive_device(monitor); - if (dev != NULL) { - udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); -+ if (rules == NULL) -+ rules = udev_rules_new(udev, resolve_names); - if (event_queue_insert(dev) < 0) - udev_device_unref(dev); - } From 7834b1c6910776a4d7b1610684242b2ac4ceff32b8a8bea4a4e27e12e4835f52 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Mon, 22 Apr 2013 09:09:27 +0000 Subject: [PATCH 8/9] Accepting request 172719 from home:elvigia:branches:Base:System - Fix packaging error, there is no syslog.target anymore do not pretend there is one. - Fix packaging error, there is no syslog.target anymore do not pretend there is one. OBS-URL: https://build.opensuse.org/request/show/172719 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=366 --- systemd-mini.changes | 6 ++++++ systemd-mini.spec | 2 -- systemd.changes | 6 ++++++ systemd.spec | 2 -- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 1216a5e5..7ea00d05 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Apr 21 22:24:15 UTC 2013 - crrodriguez@opensuse.org + +- Fix packaging error, there is no syslog.target anymore + do not pretend there is one. + ------------------------------------------------------------------- Fri Apr 19 16:40:17 UTC 2013 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 4779c7b1..2f71fddd 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -546,7 +546,6 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ # Make sure these directories are properly owned mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants -mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants src="%buildroot/%_libexecdir/systemd/system/getty@.service" dst="${src/@/@tty1}" @@ -781,7 +780,6 @@ fi %dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants -%dir %{_prefix}/lib/systemd/system/syslog.target.wants %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif diff --git a/systemd.changes b/systemd.changes index 1216a5e5..7ea00d05 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Apr 21 22:24:15 UTC 2013 - crrodriguez@opensuse.org + +- Fix packaging error, there is no syslog.target anymore + do not pretend there is one. + ------------------------------------------------------------------- Fri Apr 19 16:40:17 UTC 2013 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index dfb95a86..c72ba937 100644 --- a/systemd.spec +++ b/systemd.spec @@ -541,7 +541,6 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ # Make sure these directories are properly owned mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants -mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/syslog.target.wants src="%buildroot/%_libexecdir/systemd/system/getty@.service" dst="${src/@/@tty1}" @@ -776,7 +775,6 @@ fi %dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants -%dir %{_prefix}/lib/systemd/system/syslog.target.wants %if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %endif From 4a46ed333b4596fa6a658ce7b490f3a185211bc6bd214e279aef7a548398f816 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 22 Apr 2013 14:35:32 +0000 Subject: [PATCH 9/9] Accepting request 172848 from home:fcrozat:branches:Base:System - Do not provide %{release} for systemd-analyze - Add more conflicts to -mini packages - Disable Predictable Network interface names until it has been reviewed by network team, with /usr/lib/tmpfiles.d/network.conf. - Don't package /usr/lib/firmware/update (not used) OBS-URL: https://build.opensuse.org/request/show/172848 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=367 --- systemd-mini.changes | 9 +++++++++ systemd-mini.spec | 11 +++++++++-- systemd.changes | 9 +++++++++ systemd.spec | 11 +++++++++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 7ea00d05..6de94b11 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 22 09:48:22 UTC 2013 - fcrozat@suse.com + +- Do not provide %{release} for systemd-analyze +- Add more conflicts to -mini packages +- Disable Predictable Network interface names until it has been + reviewed by network team, with /usr/lib/tmpfiles.d/network.conf. +- Don't package /usr/lib/firmware/update (not used) + ------------------------------------------------------------------- Sun Apr 21 22:24:15 UTC 2013 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index 2f71fddd..30827d23 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -80,6 +80,7 @@ BuildRequires: pkgconfig(libsepol) BuildRequires: pkgconfig(usbutils) >= 0.82 %if 0%{?bootstrap} Requires: this-is-only-for-build-envs +Conflicts: systemd %else # the buildignore is important for bootstrapping #!BuildIgnore: udev @@ -96,7 +97,7 @@ Requires(post): findutils Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 -Provides: systemd-analyze = %{version}-%{release} +Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz Source1: systemd-rpmlintrc Source2: localfs.service @@ -237,6 +238,7 @@ Requires: filesystem %if 0%{?bootstrap} Provides: udev = %{version} Conflicts: libudev%{udev_major} = %{version} +Conflicts: udev %endif %description -n %{udevpkgname} @@ -269,6 +271,7 @@ Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release} %if 0%{?bootstrap} Provides: libudev-devel = %{version} Conflicts: libudev%{udev_major} = %{version} +Conflicts: libudev-devel %endif %description -n lib%{udevpkgname}-devel @@ -443,7 +446,6 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd $RPM_BUILD_ROOT/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/udevd.8 %endif -mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware %if ! 0%{?bootstrap} install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald @@ -554,6 +556,11 @@ perl -i -pe 's{^# the VT is cleared.*}{}i;s{(^TTYVTDisallocate=.*)}{}' "$dst" %fdupes -s %{buildroot}%{_mandir} +# disable predictable network interface naming until it has been reviewed by network team +cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/network.conf +F /run/udev/rules.d/80-net-name-slot.rules 0644 - - - "#disable predictable network interface naming for now" +EOF + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d /var/log/journal -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || : diff --git a/systemd.changes b/systemd.changes index 7ea00d05..6de94b11 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 22 09:48:22 UTC 2013 - fcrozat@suse.com + +- Do not provide %{release} for systemd-analyze +- Add more conflicts to -mini packages +- Disable Predictable Network interface names until it has been + reviewed by network team, with /usr/lib/tmpfiles.d/network.conf. +- Don't package /usr/lib/firmware/update (not used) + ------------------------------------------------------------------- Sun Apr 21 22:24:15 UTC 2013 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index c72ba937..298a3c97 100644 --- a/systemd.spec +++ b/systemd.spec @@ -75,6 +75,7 @@ BuildRequires: pkgconfig(libsepol) BuildRequires: pkgconfig(usbutils) >= 0.82 %if 0%{?bootstrap} Requires: this-is-only-for-build-envs +Conflicts: systemd %else # the buildignore is important for bootstrapping #!BuildIgnore: udev @@ -91,7 +92,7 @@ Requires(post): findutils Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Obsoletes: systemd-analyze < 201 -Provides: systemd-analyze = %{version}-%{release} +Provides: systemd-analyze = %{version} Source0: http://www.freedesktop.org/software/systemd/systemd-%{version}.tar.xz Source1: systemd-rpmlintrc Source2: localfs.service @@ -232,6 +233,7 @@ Requires: filesystem %if 0%{?bootstrap} Provides: udev = %{version} Conflicts: libudev%{udev_major} = %{version} +Conflicts: udev %endif %description -n %{udevpkgname} @@ -264,6 +266,7 @@ Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release} %if 0%{?bootstrap} Provides: libudev-devel = %{version} Conflicts: libudev%{udev_major} = %{version} +Conflicts: libudev-devel %endif %description -n lib%{udevpkgname}-devel @@ -438,7 +441,6 @@ ln -sf %{_prefix}/lib/systemd/systemd-udevd $RPM_BUILD_ROOT/sbin/udevd %if ! 0%{?bootstrap} ln -sf systemd-udevd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/udevd.8 %endif -mkdir -p $RPM_BUILD_ROOT/%{_prefix}/usr/lib/firmware/updates ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware %if ! 0%{?bootstrap} install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald @@ -549,6 +551,11 @@ perl -i -pe 's{^# the VT is cleared.*}{}i;s{(^TTYVTDisallocate=.*)}{}' "$dst" %fdupes -s %{buildroot}%{_mandir} +# disable predictable network interface naming until it has been reviewed by network team +cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/network.conf +F /run/udev/rules.d/80-net-name-slot.rules 0644 - - - "#disable predictable network interface naming for now" +EOF + %pre getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d /var/log/journal -s /usr/sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || :