From 37d7d3c91971d018e6049d04354e451ca4a897ca14fd2ef3dc67d5a121c4062c Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Wed, 5 Dec 2012 18:07:07 +0000 Subject: [PATCH 1/2] Accepting request 144331 from home:fcrozat:branches:Base:System - Add fix-devname-prefix.patch: fix modules.devname path, it isn't in /usr. - Move post script to fix symlinks in /etc/systemd/system to a trigger to run it after old systemd is uninstalled. - Add fix-debugshell.patch: use /bin/bash if sushell isn't installed (bnc#789052). - Add handle-root-uses-lang.patch: handle ROOT_USES_LANG=ctype (bnc#792182). - Ensure libudev1 and libudev-mini1 conflicts. OBS-URL: https://build.opensuse.org/request/show/144331 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=317 --- fix-debugshell.patch | 13 ++++++++++ fix-devname-prefix.patch | 13 ++++++++++ handle-root-uses-lang.patch | 48 +++++++++++++++++++++++++++++++++++++ systemd-mini.changes | 17 +++++++++++++ systemd-mini.spec | 18 +++++++++++--- systemd.changes | 17 +++++++++++++ systemd.spec | 18 +++++++++++--- 7 files changed, 138 insertions(+), 6 deletions(-) create mode 100644 fix-debugshell.patch create mode 100644 fix-devname-prefix.patch create mode 100644 handle-root-uses-lang.patch diff --git a/fix-debugshell.patch b/fix-debugshell.patch new file mode 100644 index 00000000..5a1e8405 --- /dev/null +++ b/fix-debugshell.patch @@ -0,0 +1,13 @@ +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..7fbc160a --- /dev/null +++ b/fix-devname-prefix.patch @@ -0,0 +1,13 @@ +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/handle-root-uses-lang.patch b/handle-root-uses-lang.patch new file mode 100644 index 00000000..21af5038 --- /dev/null +++ b/handle-root-uses-lang.patch @@ -0,0 +1,48 @@ +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/systemd-mini.changes b/systemd-mini.changes index 48743ca7..8195eb1d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Dec 5 15:13:27 UTC 2012 - fcrozat@suse.com + +- Add fix-devname-prefix.patch: fix modules.devname path, it isn't + in /usr. +- Move post script to fix symlinks in /etc/systemd/system to a + trigger to run it after old systemd is uninstalled. + +------------------------------------------------------------------- +Tue Dec 4 16:51:32 UTC 2012 - fcrozat@suse.com + +- Add fix-debugshell.patch: use /bin/bash if sushell isn't + installed (bnc#789052). +- Add handle-root-uses-lang.patch: handle ROOT_USES_LANG=ctype + (bnc#792182). +- Ensure libudev1 and libudev-mini1 conflicts. + ------------------------------------------------------------------- Thu Nov 22 14:22:00 UTC 2012 - rmilasan@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 6a408acd..dcd47d06 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -131,6 +131,10 @@ 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 # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -165,6 +169,8 @@ Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch Patch1026: 0026-udev-netlink-null-rules.patch # PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch Patch1027: 0027-udev-fix-sg-autoload-regression.patch +# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr +Patch1028: fix-devname-prefix.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -247,6 +253,9 @@ Summary: Dynamic library to access udev device information License: LGPL-2.1+ Group: System/Libraries Requires: %{udevpkgname} >= %{version}-%{release} +%if 0%{?bootstrap} +Conflicts: libudev%{udev_major} +%endif %description -n lib%{udevpkgname}%{udev_major} This package contains the dynamic library libudev, which provides @@ -325,6 +334,7 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1026 -p1 %patch1027 -p1 +%patch1028 -p1 #systemd %patch1 -p1 @@ -359,6 +369,8 @@ cp %{SOURCE7} m4/ %patch68 -p1 %patch69 -p1 %patch70 -p1 +%patch71 -p1 +%patch72 -p1 %build autoreconf -fiv @@ -518,15 +530,15 @@ if [ "$1" -eq 1 ]; then systemd-readahead-collect.service \ systemd-readahead-replay.service \ remote-fs.target >/dev/null 2>&1 || : -else +fi + +%triggerpostun -- systemd < 194 # migrate any symlink which may refer to the old path for f in $(find /etc/systemd/system -type l -xtype l); do new_target="/usr$(readlink $f)" [ -f "$new_target" ] && ln -s -f $new_target $f || : done -fi - %postun /sbin/ldconfig if [ $1 -ge 1 ]; then diff --git a/systemd.changes b/systemd.changes index 48743ca7..8195eb1d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Dec 5 15:13:27 UTC 2012 - fcrozat@suse.com + +- Add fix-devname-prefix.patch: fix modules.devname path, it isn't + in /usr. +- Move post script to fix symlinks in /etc/systemd/system to a + trigger to run it after old systemd is uninstalled. + +------------------------------------------------------------------- +Tue Dec 4 16:51:32 UTC 2012 - fcrozat@suse.com + +- Add fix-debugshell.patch: use /bin/bash if sushell isn't + installed (bnc#789052). +- Add handle-root-uses-lang.patch: handle ROOT_USES_LANG=ctype + (bnc#792182). +- Ensure libudev1 and libudev-mini1 conflicts. + ------------------------------------------------------------------- Thu Nov 22 14:22:00 UTC 2012 - rmilasan@suse.com diff --git a/systemd.spec b/systemd.spec index 6a6325bb..ebed694b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -126,6 +126,10 @@ 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 # Upstream First - Policy: # Never add any patches to this package without the upstream commit id @@ -160,6 +164,8 @@ Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch Patch1026: 0026-udev-netlink-null-rules.patch # PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch Patch1027: 0027-udev-fix-sg-autoload-regression.patch +# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr +Patch1028: fix-devname-prefix.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -242,6 +248,9 @@ Summary: Dynamic library to access udev device information License: LGPL-2.1+ Group: System/Libraries Requires: %{udevpkgname} >= %{version}-%{release} +%if 0%{?bootstrap} +Conflicts: libudev%{udev_major} +%endif %description -n lib%{udevpkgname}%{udev_major} This package contains the dynamic library libudev, which provides @@ -320,6 +329,7 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1026 -p1 %patch1027 -p1 +%patch1028 -p1 #systemd %patch1 -p1 @@ -354,6 +364,8 @@ cp %{SOURCE7} m4/ %patch68 -p1 %patch69 -p1 %patch70 -p1 +%patch71 -p1 +%patch72 -p1 %build autoreconf -fiv @@ -513,15 +525,15 @@ if [ "$1" -eq 1 ]; then systemd-readahead-collect.service \ systemd-readahead-replay.service \ remote-fs.target >/dev/null 2>&1 || : -else +fi + +%triggerpostun -- systemd < 194 # migrate any symlink which may refer to the old path for f in $(find /etc/systemd/system -type l -xtype l); do new_target="/usr$(readlink $f)" [ -f "$new_target" ] && ln -s -f $new_target $f || : done -fi - %postun /sbin/ldconfig if [ $1 -ge 1 ]; then From 8507bb811de61c0700fe436ddbde01fe0179eb3591798c2496357d7375e1ec62 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Fri, 7 Dec 2012 08:12:17 +0000 Subject: [PATCH 2/2] Accepting request 144458 from home:elvigia:branches:Base:System OBS-URL: https://build.opensuse.org/request/show/144458 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=318 --- ...749b84cc87c7830280b7895a48bed03c9429.patch | 44 +++++++++++++++++++ systemd-mini.changes | 6 +++ systemd-mini.spec | 3 ++ systemd.changes | 6 +++ systemd.spec | 3 ++ 5 files changed, 62 insertions(+) create mode 100644 revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch diff --git a/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch b/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch new file mode 100644 index 00000000..8d9d574c --- /dev/null +++ b/revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch @@ -0,0 +1,44 @@ +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/systemd-mini.changes b/systemd-mini.changes index 8195eb1d..1b6d3a2c 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 6 22:47:09 UTC 2012 - crrodriguez@opensuse.org + +- revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch: + do not consider failure to umount / and /usr an error. + ------------------------------------------------------------------- Wed Dec 5 15:13:27 UTC 2012 - fcrozat@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index dcd47d06..c4033294 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -156,6 +156,8 @@ Patch68: mount-efivars.patch 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 # udev patches # PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch @@ -371,6 +373,7 @@ cp %{SOURCE7} m4/ %patch70 -p1 %patch71 -p1 %patch72 -p1 +%patch73 -p1 %build autoreconf -fiv diff --git a/systemd.changes b/systemd.changes index 8195eb1d..1b6d3a2c 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 6 22:47:09 UTC 2012 - crrodriguez@opensuse.org + +- revert-of-9279749b84cc87c7830280b7895a48bed03c9429.patch: + do not consider failure to umount / and /usr an error. + ------------------------------------------------------------------- Wed Dec 5 15:13:27 UTC 2012 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index ebed694b..8cf0b455 100644 --- a/systemd.spec +++ b/systemd.spec @@ -151,6 +151,8 @@ Patch68: mount-efivars.patch 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 # udev patches # PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch @@ -366,6 +368,7 @@ cp %{SOURCE7} m4/ %patch70 -p1 %patch71 -p1 %patch72 -p1 +%patch73 -p1 %build autoreconf -fiv