New upstream release
This commit is contained in:
parent
bff934959d
commit
38a7fb71ae
@ -1,31 +0,0 @@
|
|||||||
From 4bfa638d43c05e8db052cd55818765bb3575a405 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dave Reisner <dreisner@archlinux.org>
|
|
||||||
Date: Fri, 10 Aug 2012 11:02:03 -0400
|
|
||||||
Subject: [PATCH] shutdown: recursively mark root as private before pivot
|
|
||||||
|
|
||||||
Because root is now recursively marked as shared on bootup, we need to
|
|
||||||
recursively mark root as private. This prevents a pivot_root failure on
|
|
||||||
shutdown:
|
|
||||||
|
|
||||||
Cannot finalize remaining file systems and devices, giving up.
|
|
||||||
pivot failed: Invalid argument
|
|
||||||
---
|
|
||||||
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 105a604..0b7cbd8 100644
|
|
||||||
--- a/src/core/shutdown.c
|
|
||||||
+++ b/src/core/shutdown.c
|
|
||||||
@@ -109,7 +109,7 @@ static int pivot_to_new_root(void) {
|
|
||||||
It works for pivot_root, but the ref count for the root device
|
|
||||||
is not decreasing :-/
|
|
||||||
*/
|
|
||||||
- if (mount(NULL, "/", NULL, MS_PRIVATE, NULL) < 0) {
|
|
||||||
+ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) {
|
|
||||||
log_error("Failed to make \"/\" private mount %m");
|
|
||||||
return -errno;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.11.2
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
|||||||
From f47fc35555565c4b161c2e44b357b4dbaf3a997d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lennart Poettering <lennart@poettering.net>
|
|
||||||
Date: Sun, 12 Aug 2012 01:29:41 +0200
|
|
||||||
Subject: [PATCH] switch-root: remount to MS_PRIVATE
|
|
||||||
|
|
||||||
The kernel does not allow switching roots if things are mounted
|
|
||||||
MS_SHARED. As a work-around, remount things MS_PRIVATE before switching
|
|
||||||
roots.
|
|
||||||
|
|
||||||
This should be fixed in the kernel for good.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=847418
|
|
||||||
---
|
|
||||||
src/core/shutdown.c | 17 ++++++++---------
|
|
||||||
src/core/switch-root.c | 9 +++++++++
|
|
||||||
2 files changed, 17 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
|
|
||||||
index 0b7cbd8..c3a4c39 100644
|
|
||||||
--- a/src/core/shutdown.c
|
|
||||||
+++ b/src/core/shutdown.c
|
|
||||||
@@ -104,15 +104,14 @@ static int pivot_to_new_root(void) {
|
|
||||||
return -errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- In case some evil process made "/" MS_SHARED
|
|
||||||
- It works for pivot_root, but the ref count for the root device
|
|
||||||
- is not decreasing :-/
|
|
||||||
- */
|
|
||||||
- if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) {
|
|
||||||
- log_error("Failed to make \"/\" private mount %m");
|
|
||||||
- return -errno;
|
|
||||||
- }
|
|
||||||
+ /* Work-around for a kernel bug: for some reason the kernel
|
|
||||||
+ * refuses switching root if any file systems are mounted
|
|
||||||
+ * MS_SHARED. Hence remount them MS_PRIVATE here as a
|
|
||||||
+ * work-around.
|
|
||||||
+ *
|
|
||||||
+ * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */
|
|
||||||
+ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
|
|
||||||
+ log_warning("Failed to make \"/\" private mount: %m");
|
|
||||||
|
|
||||||
if (pivot_root(".", "oldroot") < 0) {
|
|
||||||
log_error("pivot failed: %m");
|
|
||||||
diff --git a/src/core/switch-root.c b/src/core/switch-root.c
|
|
||||||
index 9832a52..efc7d34 100644
|
|
||||||
--- a/src/core/switch-root.c
|
|
||||||
+++ b/src/core/switch-root.c
|
|
||||||
@@ -56,6 +56,15 @@ int switch_root(const char *new_root) {
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* Work-around for a kernel bug: for some reason the kernel
|
|
||||||
+ * refuses switching root if any file systems are mounted
|
|
||||||
+ * MS_SHARED. Hence remount them MS_PRIVATE here as a
|
|
||||||
+ * work-around.
|
|
||||||
+ *
|
|
||||||
+ * https://bugzilla.redhat.com/show_bug.cgi?id=847418 */
|
|
||||||
+ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0)
|
|
||||||
+ log_warning("Failed to make \"/\" private mount: %m");
|
|
||||||
+
|
|
||||||
NULSTR_FOREACH(i, move_mounts) {
|
|
||||||
char new_mount[PATH_MAX];
|
|
||||||
struct stat sb;
|
|
||||||
--
|
|
||||||
1.7.11.2
|
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
d89b42699695554949d072ef46c0dfc9 systemd-188.tar.xz
|
ac2eb313f5dce79622f60aac56bca66d systemd-189.tar.xz
|
||||||
|
27
systemd.spec
27
systemd.spec
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
Name: systemd
|
Name: systemd
|
||||||
Url: http://www.freedesktop.org/wiki/Software/systemd
|
Url: http://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 188
|
Version: 189
|
||||||
Release: 3%{?gitcommit:.git%{gitcommit}}%{?dist}
|
Release: 1%{?gitcommit:.git%{gitcommit}}%{?dist}
|
||||||
# For a breakdown of the licensing, see README
|
# For a breakdown of the licensing, see README
|
||||||
License: LGPLv2+ and MIT and GPLv2+
|
License: LGPLv2+ and MIT and GPLv2+
|
||||||
Summary: A System and Service Manager
|
Summary: A System and Service Manager
|
||||||
@ -16,20 +16,22 @@ BuildRequires: libselinux-devel
|
|||||||
BuildRequires: audit-libs-devel
|
BuildRequires: audit-libs-devel
|
||||||
BuildRequires: cryptsetup-luks-devel
|
BuildRequires: cryptsetup-luks-devel
|
||||||
BuildRequires: dbus-devel
|
BuildRequires: dbus-devel
|
||||||
BuildRequires: libxslt
|
|
||||||
BuildRequires: docbook-style-xsl
|
|
||||||
BuildRequires: pkgconfig
|
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: pciutils-devel
|
BuildRequires: pciutils-devel
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: hwdata
|
|
||||||
BuildRequires: gobject-introspection-devel >= 0.6.2
|
BuildRequires: gobject-introspection-devel >= 0.6.2
|
||||||
BuildRequires: usbutils >= 0.82
|
|
||||||
BuildRequires: libblkid-devel >= 2.20
|
BuildRequires: libblkid-devel >= 2.20
|
||||||
BuildRequires: intltool >= 0.40.0
|
|
||||||
BuildRequires: gperf
|
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
BuildRequires: kmod-devel >= 5
|
BuildRequires: kmod-devel >= 5
|
||||||
|
BuildRequires: libgcrypt-devel
|
||||||
|
BuildRequires: qrencode-devel
|
||||||
|
BuildRequires: hwdata
|
||||||
|
BuildRequires: libxslt
|
||||||
|
BuildRequires: docbook-style-xsl
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: usbutils >= 0.82
|
||||||
|
BuildRequires: intltool >= 0.40.0
|
||||||
|
BuildRequires: gperf
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
%if %{defined gitcommit}
|
%if %{defined gitcommit}
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -59,8 +61,6 @@ Source2: systemd-sysv-convert
|
|||||||
Source3: udlfb.conf
|
Source3: udlfb.conf
|
||||||
# Stop-gap, just to ensure things work fine with rsyslog without having to change the package right-away
|
# Stop-gap, just to ensure things work fine with rsyslog without having to change the package right-away
|
||||||
Source4: listen.conf
|
Source4: listen.conf
|
||||||
Patch0: 0001-shutdown-recursively-mark-root-as-private-before-piv.patch
|
|
||||||
Patch1: 0001-switch-root-remount-to-MS_PRIVATE.patch
|
|
||||||
|
|
||||||
Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24
|
Obsoletes: SysVinit < 2.86-24, sysvinit < 2.86-24
|
||||||
Provides: SysVinit = 2.86-24, sysvinit = 2.86-24
|
Provides: SysVinit = 2.86-24, sysvinit = 2.86-24
|
||||||
@ -160,8 +160,6 @@ glib-based applications using libudev functionality.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q %{?gitcommit:-n %{name}-git%{gitcommit}}
|
%setup -q %{?gitcommit:-n %{name}-git%{gitcommit}}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{?gitcommit: ./autogen.sh }
|
%{?gitcommit: ./autogen.sh }
|
||||||
@ -533,6 +531,9 @@ fi
|
|||||||
%{_libdir}/pkgconfig/gudev-1.0*
|
%{_libdir}/pkgconfig/gudev-1.0*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 23 2012 Lennart Poettering <lpoetter@redhat.com> - 189-1:.git%{gitcommit}}%{?dist}
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
* Sat Aug 11 2012 Lennart Poettering <lpoetter@redhat.com> - 188-3
|
* Sat Aug 11 2012 Lennart Poettering <lpoetter@redhat.com> - 188-3
|
||||||
- Remount file systems MS_PRIVATE before switching roots
|
- Remount file systems MS_PRIVATE before switching roots
|
||||||
- https://bugzilla.redhat.com/show_bug.cgi?id=847418
|
- https://bugzilla.redhat.com/show_bug.cgi?id=847418
|
||||||
|
Loading…
Reference in New Issue
Block a user