- Import commit 885e0b9126bd2cf1e3f6b147c45ec58a5550c75c

41334be59e meson: minor cleanup
  3db0c28462 sysusers: split up systemd.conf
- Drop 0012-resolved-create-etc-resolv.conf-symlink-at-runtime.patch (bsc#1195153)
  Since v241, the patch isn't useful anymore because resolved is no more able to
  create /etc/resolv.conf symlink by itself,it runs as 'systemd-resolve'
  user. The symlink is now handled by a tmpfiles config file which is only
  installed when systemd-resolved is. The tmpfiles config file has currently a
  lower priority than the one shipped by netconfig.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1240
This commit is contained in:
Franck Bui 2022-01-31 14:13:33 +00:00 committed by Git OBS Bridge
parent f948d591e6
commit ed2cb81d96
7 changed files with 27 additions and 60 deletions

View File

@ -1,53 +0,0 @@
From 1aa6cfc7ff05929f013262c86ab7557e5394fb4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 11 Mar 2016 17:06:17 -0500
Subject: [PATCH 11/11] resolved: create /etc/resolv.conf symlink at runtime
If the symlink doesn't exists, and we are being started, let's
create it to provie name resolution.
If it exists, do nothing. In particular, if it is a broken symlink,
we cannot really know if the administator configured it to point to
a location used by some service that hasn't started yet, so we
don't touch it in that case either.
https://bugzilla.redhat.com/show_bug.cgi?id=1313085
---
src/resolve/resolved.c | 6 ++++++
tmpfiles.d/etc.conf.in | 3 ---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c
index aabaa266e9..39277ea487 100644
--- a/src/resolve/resolved.c
+++ b/src/resolve/resolved.c
@@ -53,6 +53,12 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Cannot resolve user name %s: %m", user);
+ /* As we're root, we can create /etc/resolv.conf symlink if it doesn't exist already */
+ r = symlink("../run/systemd/resolve/resolv.conf", "/etc/resolv.conf");
+ if (r < 0 && errno != EEXIST)
+ log_warning_errno(errno,
+ "Could not create /etc/resolv.conf symlink: %m");
+
/* As we're root, we can create the directory where resolv.conf will live */
r = mkdir_safe_label("/run/systemd/resolve", 0755, uid, gid, MKDIR_WARN_MODE);
if (r < 0)
diff --git a/tmpfiles.d/etc.conf.in b/tmpfiles.d/etc.conf.in
index 2323fd8cd8..ebdc699c26 100644
--- a/tmpfiles.d/etc.conf.in
+++ b/tmpfiles.d/etc.conf.in
@@ -12,9 +12,6 @@ L+ /etc/mtab - - - - ../proc/self/mounts
{% if HAVE_SMACK_RUN_LABEL %}
t /etc/mtab - - - - security.SMACK64=_
{% endif %}
-{% if ENABLE_RESOLVE %}
-L! /etc/resolv.conf - - - - ../run/systemd/resolve/stub-resolv.conf
-{% endif %}
C! /etc/nsswitch.conf - - - -
{% if HAVE_PAM %}
C! /etc/pam.d - - - -
--
2.26.2

View File

@ -29,6 +29,7 @@
%{_systemd_util_dir}/network/80-wifi-station.network.example %{_systemd_util_dir}/network/80-wifi-station.network.example
%{_systemd_util_dir}/systemd-networkd %{_systemd_util_dir}/systemd-networkd
%{_systemd_util_dir}/systemd-networkd-wait-online %{_systemd_util_dir}/systemd-networkd-wait-online
%{_sysusersdir}/systemd-network.conf
%{_unitdir}/systemd-networkd-wait-online.service %{_unitdir}/systemd-networkd-wait-online.service
%{_unitdir}/systemd-networkd.service %{_unitdir}/systemd-networkd.service
%{_unitdir}/systemd-networkd.socket %{_unitdir}/systemd-networkd.socket
@ -55,5 +56,7 @@
%{_mandir}/man8/systemd-resolved.service.8.gz %{_mandir}/man8/systemd-resolved.service.8.gz
%{_systemd_util_dir}/resolv.conf %{_systemd_util_dir}/resolv.conf
%{_systemd_util_dir}/systemd-resolved %{_systemd_util_dir}/systemd-resolved
%{_sysusersdir}/systemd-resolve.conf
%{_tmpfilesdir}/systemd-resolve.conf
%{_unitdir}/systemd-resolved.service %{_unitdir}/systemd-resolved.service
%endif %endif

View File

@ -830,7 +830,8 @@
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_systemdgeneratordir}/systemd-veritysetup-generator %{_systemdgeneratordir}/systemd-veritysetup-generator
%endif %endif
%{_sysusersdir}/systemd.conf %{_sysusersdir}/systemd-journal.conf
%{_sysusersdir}/systemd-timesync.conf
%{_tmpfilesdir}/journal-nocow.conf %{_tmpfilesdir}/journal-nocow.conf
%{_tmpfilesdir}/suse.conf %{_tmpfilesdir}/suse.conf
%{_tmpfilesdir}/systemd-nologin.conf %{_tmpfilesdir}/systemd-nologin.conf

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64320468ebe2502773e1365b50c369de2520ec4b614c623a4ca1339e26968ec2
size 7278924

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51c9904085a4c76526e49baf1e103afc39880d72247c971f91730d9cdebe9d99
size 7279976

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Jan 31 11:37:23 UTC 2022 - Franck Bui <fbui@suse.com>
- Import commit 885e0b9126bd2cf1e3f6b147c45ec58a5550c75c
41334be59e meson: minor cleanup
3db0c28462 sysusers: split up systemd.conf
- Drop 0012-resolved-create-etc-resolv.conf-symlink-at-runtime.patch (bsc#1195153)
Since v241, the patch isn't useful anymore because resolved is no more able to
create /etc/resolv.conf symlink by itself,it runs as 'systemd-resolve'
user. The symlink is now handled by a tmpfiles config file which is only
installed when systemd-resolved is. The tmpfiles config file has currently a
lower priority than the one shipped by netconfig.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 31 10:19:23 UTC 2022 - Franck Bui <fbui@suse.com> Mon Jan 31 10:19:23 UTC 2022 - Franck Bui <fbui@suse.com>

View File

@ -32,7 +32,7 @@
%endif %endif
%define min_kernel_version 4.5 %define min_kernel_version 4.5
%define suse_version +suse.75.g3743acbce3 %define suse_version +suse.79.g885e0b9126
%define _testsuitedir /usr/lib/systemd/tests %define _testsuitedir /usr/lib/systemd/tests
%if 0%{?bootstrap} %if 0%{?bootstrap}
@ -207,8 +207,7 @@ Patch8: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch
Patch9: 0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch Patch9: 0009-sysv-add-back-support-for-all-virtual-facility-and-f.patch
Patch10: 0001-conf-parser-introduce-early-drop-ins.patch Patch10: 0001-conf-parser-introduce-early-drop-ins.patch
Patch11: 0011-core-disable-session-keyring-per-system-sevice-entir.patch Patch11: 0011-core-disable-session-keyring-per-system-sevice-entir.patch
Patch12: 0012-resolved-create-etc-resolv.conf-symlink-at-runtime.patch Patch12: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
Patch13: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
# Patches listed below are put in quarantine. Normally all changes # Patches listed below are put in quarantine. Normally all changes
# must go to upstream first and then are cherry-picked in the SUSE git # must go to upstream first and then are cherry-picked in the SUSE git
@ -1314,6 +1313,7 @@ fi
%{_unitdir}/systemd-coredump* %{_unitdir}/systemd-coredump*
%{_unitdir}/sockets.target.wants/systemd-coredump.socket %{_unitdir}/sockets.target.wants/systemd-coredump.socket
%{_sysctldir}/50-coredump.conf %{_sysctldir}/50-coredump.conf
%{_sysusersdir}/systemd-coredump.conf
%config(noreplace) %{_sysconfdir}/systemd/coredump.conf %config(noreplace) %{_sysconfdir}/systemd/coredump.conf
%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/coredump
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}