Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2019-02-14 15:50:43 +01:00
commit e7f34d1531
Signed by: davidlt
GPG Key ID: 7108702C938B13C1
3 changed files with 27 additions and 56 deletions

View File

@ -1,46 +0,0 @@
From dbe7ff3240dd30240402632dfa9d95a71f425267 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 15 Jan 2019 10:34:10 +0100
Subject: [PATCH] Ignore failure to setup private /dev
This partially reverts 1beab8b0d0.
---
src/core/namespace.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/core/namespace.c b/src/core/namespace.c
index c2ca3e0334..6113b9a5ea 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -58,6 +58,7 @@ typedef struct MountEntry {
bool has_prefix:1; /* Already is prefixed by the root dir? */
bool read_only:1; /* Shall this mount point be read-only? */
bool applied:1; /* Already applied */
+ bool xxx:1;
char *path_malloc; /* Use this instead of 'path_const' if we had to allocate memory */
const char *source_const; /* The source path, for bind mounts */
char *source_malloc;
@@ -1413,7 +1414,10 @@ int setup_namespace(
}
r = apply_mount(root, m);
- if (r < 0)
+ if (m->mode == PRIVATE_DEV && IN_SET(r, -EPERM, -EACCES)) {
+ m->xxx = true;
+ log_warning_errno(r, "Failed to prepare private /dev, ignoring: %m");
+ } else if (r < 0)
goto finish;
m->applied = true;
@@ -1433,6 +1437,8 @@ int setup_namespace(
/* Second round, flip the ro bits if necessary. */
for (m = mounts; m < mounts + n_mounts; ++m) {
+ if (m->xxx)
+ continue;
r = make_read_only(m, blacklist, proc_self_mountinfo);
if (r < 0)
goto finish;
--
2.19.2

View File

@ -1 +1 @@
SHA512 (systemd-f02b547.tar.gz) = a7d774ed00d572eb2d9313ff25a09c707112443020d173d4d350bdb9b269fcef519da8efc2d93b3b72f4ebdd3ff295716e2f640f8c1e679cb24b26e71fca56ee
SHA512 (systemd-241.tar.gz) = a7757574590e8aa37e1291ea0b2c5eb03a8d8062fe9462fa5b0bf50830c933e2b301d106c70d904f94afc0aa8e43a8acfd11926dfa25b1b89174580e491e545e

View File

@ -1,7 +1,7 @@
%global commit f02b5472c6f0c41e5dc8dc2c84590866baf937ff
#global commit f02b5472c6f0c41e5dc8dc2c84590866baf937ff
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
%global stable 1
#global stable 1
# We ship a .pc file but don't want to have a dep on pkg-config. We
# strip the automatically generated dep here and instead co-own the
@ -14,17 +14,19 @@
Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd
Version: 240
Release: 6%{?commit:.git%{shortcommit}}.0.riscv64%{?dist}
Version: 241
Release: 1%{?commit:.git%{shortcommit}}.0.riscv64%{?dist}
# For a breakdown of the licensing, see README
License: LGPLv2+ and MIT and GPLv2+
Summary: System and Service Manager
%global github_version %(c=%{version}; echo ${c}|tr '~' '-')
# download tarballs with "spectool -g systemd.spec"
%if %{defined commit}
Source0: https://github.com/systemd/systemd%{?stable:-stable}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
%else
Source0: https://github.com/systemd/systemd/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: https://github.com/systemd/systemd/archive/v%{github_version}/%{name}-%{github_version}.tar.gz
%endif
# This file must be available before %%prep.
# It is generated during systemd build and can be found in build/src/core/.
@ -51,7 +53,6 @@ GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[
%endif
Patch0002: 0002-Revert-units-set-NoNewPrivileges-for-all-long-runnin.patch
Patch0003: 0003-Ignore-failure-to-setup-private-dev.patch
Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch
@ -276,7 +277,7 @@ License: LGPLv2+
They can be useful to test systemd internals.
%prep
%autosetup %{?commit:-n %{name}%{?stable:-stable}-%{commit}} -p1 -Sgit
%autosetup -n %{?commit:%{name}%{?stable:-stable}-%{commit}}%{!?commit:%{name}%{?stable:-stable}-%{github_version}} -p1 -Sgit
%build
%define ntpvendor %(source /etc/os-release; echo ${ID})
@ -331,7 +332,8 @@ CONFIGURE_OPTS=(
-Dnobody-group=nobody
-Dsplit-usr=false
-Dsplit-bin=true
-Db_lto=false
-Db_lto=true
-Dversion-tag=v%{version}-%{release}
)
%meson "${CONFIGURE_OPTS[@]}"
@ -701,9 +703,24 @@ fi
%files tests -f .file-list-tests
%changelog
* Wed Jan 16 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 240-6.0.riscv64
* Thu Feb 14 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 241-1.0.riscv64
- Disable libseccomp on riscv64 (RISC-V) until it's ported upstream
* Sat Feb 9 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 241~rc2-2
- Turn LTO back on
* Tue Feb 5 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 241~rc2-1
- Update to latest release -rc2
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Jan 27 2019 Yu Watanabe <watanabe.yu@gmail.com> - 241~rc1-2
- Backport a patch for kernel-install
* Sat Jan 26 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 241~rc1-1
- Update to latest release -rc1
* Tue Jan 15 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 240-6.gitf02b547
- Add a work-around for #1663040