A System and Service Manager
CentOS Sources
2016-11-09 19adb6a60961d0ec01601ebc09c4373510a8c3fb
import systemd-219-30.el7_3.6
1 files added
1 files modified
104 ■■■■■ changed files
SOURCES/0416-virt-add-possibility-to-skip-the-check-for-chroot.patch 55 ●●●●● patch | view | raw | blame | history
SPECS/systemd.spec 49 ●●●● patch | view | raw | blame | history
SOURCES/0416-virt-add-possibility-to-skip-the-check-for-chroot.patch
New file
@@ -0,0 +1,55 @@
From c13f7b8e88f12f1a7e01e2094d7c648aaffc8c6c Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Mon, 17 Oct 2016 08:09:58 +0200
Subject: [PATCH] virt: add possibility to skip the check for chroot
Cherry-picked from: 08a28eeca70eeefb55af61191b63e4c938daca73
Resolves: #1379852
---
 src/shared/env-util.c | 10 ++++++++++
 src/shared/env-util.h |  2 ++
 src/shared/util.c     |  3 +++
 3 files changed, 15 insertions(+)
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index 038246d..e8da4c9 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -449,3 +449,13 @@ char **strv_env_clean_with_callback(char **e, void (*invalid_callback)(const cha
         return e;
 }
+
+int getenv_bool(const char *p) {
+        const char *e;
+
+        e = getenv(p);
+        if (!e)
+                return -ENXIO;
+
+        return parse_boolean(e);
+}
diff --git a/src/shared/env-util.h b/src/shared/env-util.h
index 618441a..252d87b 100644
--- a/src/shared/env-util.h
+++ b/src/shared/env-util.h
@@ -45,3 +45,5 @@ char **strv_env_unset_many(char **l, ...) _sentinel_;
 char *strv_env_get_n(char **l, const char *name, size_t k) _pure_;
 char *strv_env_get(char **x, const char *n) _pure_;
+
+int getenv_bool(const char *p);
diff --git a/src/shared/util.c b/src/shared/util.c
index 357fbfe..eab5ab8 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3776,6 +3776,9 @@ int files_same(const char *filea, const char *fileb) {
 int running_in_chroot(void) {
         int ret;
+        if (getenv_bool("SYSTEMD_IGNORE_CHROOT") > 0)
+                return 0;
+
         ret = files_same("/proc/1/root", "/");
         if (ret < 0)
                 return ret;
SPECS/systemd.spec
@@ -7,7 +7,7 @@
Name:           systemd
Url:            http://www.freedesktop.org/wiki/Software/systemd
Version:        219
Release:        30%{?dist}.3
Release:        30%{?dist}.6
# For a breakdown of the licensing, see README
License:        LGPLv2+ and MIT and GPLv2+
Summary:        A System and Service Manager
@@ -450,6 +450,7 @@
Patch0413: 0413-pid1-more-informative-error-message-for-ignored-noti.patch
Patch0414: 0414-manager-219-needs-u-id-in-log_unit_debug.patch
Patch0415: 0415-mtd_probe-add-include-for-stdint.patch
Patch0416: 0416-virt-add-possibility-to-skip-the-check-for-chroot.patch
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
@@ -706,11 +707,6 @@
%endif
)
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
%configure "${CONFIGURE_OPTS[@]}"
make %{?_smp_mflags} GCC_COLORS="" V=1
@@ -1124,6 +1120,38 @@
%postun resolved
%systemd_postun_with_restart systemd-resolved.service
%triggerin -- systemd < 219-21
. /etc/sysconfig/network-scripts/network-functions
RULES_FILE="/etc/udev/rules.d/90-eno-fix.rules"
DRACUT_CONFIG="/etc/dracut.conf.d/90-eno-fix.conf"
NEED_REBUILD=
WROTE_MSG=
for i in /sys/class/net/eno* ; do
    DEVICE=${i##*/}
    [[ "$DEVICE" =~ eno[0-9]+(d[0-9]+)?$ ]] || continue
    [ "$(echo $DEVICE | sed -e 's/eno\([0-9]\+\).*/\1/')" -lt "16383" ] && continue
    HWADDR=$(get_hwaddr $DEVICE | tr '[:upper:]' '[:lower:]')
    [ -z "$HWADDR" ] && continue
    if [ -z "$WROTE_MSG" ]; then
       echo "# This file was automatically generated on systemd update" > "$RULES_FILE"
       WROTE_MSG=yes
    fi
    echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"$HWADDR\", NAME=\"$DEVICE\"" >> "$RULES_FILE"
    NEED_REBUILD=yes
done
if [ -n "$NEED_REBUILD" ]; then
    echo "install_items+=\" $RULES_FILE \"" > "$DRACUT_CONFIG"
    dracut -f
fi
%files -f %{name}.lang
%doc %{_docdir}/systemd
%{!?_licensedir:%global license %%doc}
@@ -1431,6 +1459,15 @@
%{_mandir}/man8/systemd-resolved.*
%changelog
* Mon Nov 07 2016 Lukáš Nykrýn <lnykryn@redhat.com> - 219-30.6
- better version of vmware trigger
* Fri Nov  4 2016 Michal Sekletar <msekleta@redhat.com> - 219-30.5
- on update from systemd version 219-21 and older generate udev rules that preserve old network interface names on VMware VMs (#1391944)
* Thu Nov 03 2016 Lukas Nykryn <lnykryn@redhat.com> - 219-30.4
- virt: add possibility to skip the check for chroot (#1379852)
* Fri Oct 07 2016 Lukas Nykryn <lnykryn@redhat.com> - 219-30.3
- mtd_probe: add include for stdint (#1381573)