Accepting request 879358 from Base:System

- Import commit 9753d1c17545a5d46530696cb14254f5f12024f1 (merge of v246.11)
  For a complete list of changes, visit:
  134cf1c8bc...9753d1c175
- Rebase 0001-conf-parser-introduce-early-drop-ins.patch

- Import commit 13bc08870147b35f87cefb074aec22e767b7ac04
  846d61e0a1 boot: Move console declarations to missing_efi.h
  171a37228b boot: Add startswith() and endswith() functions with no_case variants
  0fad9f309a boot: Drop unnecessary braces
  c38bbb0874 boot: Fix void pointer arithmetic warning
  438210924b boot: Replace raw efivar gets with typed variants
  e46cb3e4a0 boot: Add  efivar_get/set_uint64_le() functions
  e16bee35c8 boot: Rename efivar_get/set_int() to efivar_get/set_uint_string()
  2808d0e9a3 boot: Tighten scope of variables used in loops
  d3f3d57743 boot: Add efivar_get_boolean_u8()
  0551ecce71 boot: Make all efivar util functions take the guid as an argument
  8376ba3b9f boot: Turn all guid constants into C99 compound initializers
  166fc2dad2 boot: Enable C99
  c87d66e261 boot: Move Secure Boot logic to new file
  da7bba9438 udev: fix memleak
  e06139117c nspawn: make rootfs relative to oci bundle path (bsc#1182598)
  8ba587d46c PATCH] Always free deserialized_subscribed on reload (bsc#1180020)

- Make sure the udev socket units are reloaded during udev package updates

- fix-machines-btrfs-subvol.sh is only shipped when machined is built

OBS-URL: https://build.opensuse.org/request/show/879358
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=327
This commit is contained in:
Dominique Leuenberger 2021-03-17 19:14:01 +00:00 committed by Git OBS Bridge
parent 6c52ec6e42
commit 4678053d4f
7 changed files with 135 additions and 54 deletions

View File

@ -1,4 +1,4 @@
From 3709cf5ba88e1cb9c737e524168b83a0964ef5db Mon Sep 17 00:00:00 2001
From 569f94a86a608fa7a47fef583f3f504ec8223967 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Fri, 22 Jan 2021 14:57:08 +0100
Subject: [PATCH 1/1] conf-parser: introduce 'early' drop-ins
@ -61,15 +61,15 @@ drop this feature at any time.
Fixes: #2121
---
src/shared/conf-parser.c | 57 ++++++++++++--
src/test/test-conf-parser.c | 149 ++++++++++++++++++++++++++++++++++++
2 files changed, 198 insertions(+), 8 deletions(-)
src/shared/conf-parser.c | 47 ++++++++++-
src/test/test-conf-parser.c | 151 ++++++++++++++++++++++++++++++++++++
2 files changed, 194 insertions(+), 4 deletions(-)
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 0fec79f3d7..daf55d2358 100644
index 7499b3b882..799026626c 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -423,6 +423,7 @@ int config_parse(const char *unit,
@@ -426,6 +426,7 @@ int config_parse(const char *unit,
static int config_parse_many_files(
const char *conf_file,
@ -77,39 +77,20 @@ index 0fec79f3d7..daf55d2358 100644
char **files,
const char *sections,
ConfigItemLookup lookup,
@@ -431,19 +432,27 @@ static int config_parse_many_files(
void *userdata,
usec_t *ret_mtime) {
- usec_t mtime = 0;
+ usec_t t, mtime = 0;
@@ -438,6 +439,12 @@ static int config_parse_many_files(
char **fn;
int r;
+ STRV_FOREACH(fn, early_files) {
+ r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &t);
+ r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &mtime);
+ if (r < 0)
+ return r;
+ if (t > mtime) /* Find the newest */
+ mtime = t;
+ }
+
if (conf_file) {
- r = config_parse(NULL, conf_file, NULL, sections, lookup, table, flags, userdata, &mtime);
+ r = config_parse(NULL, conf_file, NULL, sections, lookup, table, flags, userdata, &t);
r = config_parse(NULL, conf_file, NULL, sections, lookup, table, flags, userdata, &mtime);
if (r < 0)
return r;
+ if (t > mtime) /* Find the newest */
+ mtime = t;
}
STRV_FOREACH(fn, files) {
- usec_t t;
-
r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &t);
if (r < 0)
return r;
@@ -457,6 +466,28 @@ static int config_parse_many_files(
@@ -456,6 +463,28 @@ static int config_parse_many_files(
return 0;
}
@ -138,7 +119,7 @@ index 0fec79f3d7..daf55d2358 100644
/* Parse each config file in the directories specified as nulstr. */
int config_parse_many_nulstr(
const char *conf_file,
@@ -468,14 +499,19 @@ int config_parse_many_nulstr(
@@ -467,14 +496,19 @@ int config_parse_many_nulstr(
void *userdata,
usec_t *ret_mtime) {
@ -160,7 +141,7 @@ index 0fec79f3d7..daf55d2358 100644
}
/* Parse each config file in the directories specified as strv. */
@@ -490,8 +526,8 @@ int config_parse_many(
@@ -489,8 +523,8 @@ int config_parse_many(
void *userdata,
usec_t *ret_mtime) {
@ -170,7 +151,7 @@ index 0fec79f3d7..daf55d2358 100644
const char *suffix;
int r;
@@ -504,7 +540,12 @@ int config_parse_many(
@@ -503,7 +537,12 @@ int config_parse_many(
if (r < 0)
return r;
@ -185,7 +166,7 @@ index 0fec79f3d7..daf55d2358 100644
#define DEFINE_PARSER(type, vartype, conv_func) \
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
index 07edc17f92..bb82923319 100644
index 07edc17f92..2df4b073c5 100644
--- a/src/test/test-conf-parser.c
+++ b/src/test/test-conf-parser.c
@@ -5,6 +5,9 @@
@ -198,7 +179,7 @@ index 07edc17f92..bb82923319 100644
#include "string-util.h"
#include "strv.h"
#include "tmpfile-util.h"
@@ -385,6 +388,149 @@ static void test_config_parse(unsigned i, const char *s) {
@@ -385,6 +388,151 @@ static void test_config_parse(unsigned i, const char *s) {
}
}
@ -299,6 +280,8 @@ index 07edc17f92..bb82923319 100644
+}
+
+static void test_config_parse_many(bool nulstr) {
+ log_info("== %s%s ==", __func__, nulstr ? "_nulstr" : "");
+
+ test_config_parse_many_one(nulstr, NULL, NULL, NULL, NULL, NULL);
+
+ test_config_parse_many_one(nulstr,
@ -348,7 +331,7 @@ index 07edc17f92..bb82923319 100644
int main(int argc, char **argv) {
unsigned i;
@@ -407,5 +553,8 @@ int main(int argc, char **argv) {
@@ -407,5 +555,8 @@ int main(int argc, char **argv) {
for (i = 0; i < ELEMENTSOF(config_file); i++)
test_config_parse(i, config_file[i]);

View File

@ -1,3 +1,45 @@
-------------------------------------------------------------------
Mon Mar 15 15:56:45 UTC 2021 - Franck Bui <fbui@suse.com>
- Import commit 9753d1c17545a5d46530696cb14254f5f12024f1 (merge of v246.11)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/134cf1c8bc3e361a2641161aa11ac2b5b990480b...9753d1c17545a5d46530696cb14254f5f12024f1
- Rebase 0001-conf-parser-introduce-early-drop-ins.patch
-------------------------------------------------------------------
Mon Mar 15 11:06:54 UTC 2021 - Franck Bui <fbui@suse.com>
- Import commit 13bc08870147b35f87cefb074aec22e767b7ac04
846d61e0a1 boot: Move console declarations to missing_efi.h
171a37228b boot: Add startswith() and endswith() functions with no_case variants
0fad9f309a boot: Drop unnecessary braces
c38bbb0874 boot: Fix void pointer arithmetic warning
438210924b boot: Replace raw efivar gets with typed variants
e46cb3e4a0 boot: Add efivar_get/set_uint64_le() functions
e16bee35c8 boot: Rename efivar_get/set_int() to efivar_get/set_uint_string()
2808d0e9a3 boot: Tighten scope of variables used in loops
d3f3d57743 boot: Add efivar_get_boolean_u8()
0551ecce71 boot: Make all efivar util functions take the guid as an argument
8376ba3b9f boot: Turn all guid constants into C99 compound initializers
166fc2dad2 boot: Enable C99
c87d66e261 boot: Move Secure Boot logic to new file
da7bba9438 udev: fix memleak
e06139117c nspawn: make rootfs relative to oci bundle path (bsc#1182598)
8ba587d46c PATCH] Always free deserialized_subscribed on reload (bsc#1180020)
-------------------------------------------------------------------
Thu Mar 11 09:51:53 UTC 2021 - Franck Bui <fbui@suse.com>
- Make sure the udev socket units are reloaded during udev package updates
-------------------------------------------------------------------
Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com>
- fix-machines-btrfs-subvol.sh is only shipped when machined is built
-------------------------------------------------------------------
Mon Feb 22 20:20:43 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -26,7 +26,7 @@
##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! #####
%define mini -mini
%define min_kernel_version 4.5
%define suse_version +suse.83.g134cf1c8bc
%define suse_version +suse.102.g9753d1c175
%bcond_with gnuefi
%if 0%{?bootstrap}
@ -55,7 +55,7 @@
Name: systemd-mini
URL: http://www.freedesktop.org/wiki/Software/systemd
Version: 246.10
Version: 246.11
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1-or-later
@ -903,12 +903,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%postun -n udev%{?mini}
%regenerate_initrd_post
# Restarting udevd sockets means also stopping the daemon. But we
# don't want the sockets and the daemon to be inactive at the same
# time because we might loose new events sent by the kernel during the
# package update otherwise. Hence we accept the fact that the socket
# properties might not be updated. They are unlikely changed anyway.
%systemd_postun_with_restart systemd-udevd.service
systemctl daemon-reload || :
# On package update, restarting the socket units will probably fail as
# udevd is most likely running. Therefore systemctl will refuse to
# start them again once stopped. It's not an issue since we are mostly
# interested to make PID1 use the updated unit files once the socket
# units wil be started again. And that will happen when systemd-udevd
# itself will be restarted.
if [ $1 -ge 1 ]; then
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
systemctl try-restart systemd-udevd.service || :
fi
%posttrans -n udev%{?mini}
%regenerate_initrd_posttrans
@ -921,6 +926,7 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%post container
%tmpfiles_create systemd-nspawn.conf
%if %{with machined}
if [ $1 -gt 1 ]; then
# Convert /var/lib/machines subvolume to make it suitable for
# rollbacks, if needed. See bsc#992573. The installer has been fixed
@ -939,6 +945,7 @@ if [ $1 -gt 1 ]; then
# shouldn't be any issues.
%{_prefix}/lib/systemd/scripts/fix-machines-btrfs-subvol.sh || :
fi
%endif
%if ! 0%{?bootstrap}
%post logger

View File

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

View File

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

View File

@ -1,3 +1,45 @@
-------------------------------------------------------------------
Mon Mar 15 15:56:45 UTC 2021 - Franck Bui <fbui@suse.com>
- Import commit 9753d1c17545a5d46530696cb14254f5f12024f1 (merge of v246.11)
For a complete list of changes, visit:
https://github.com/openSUSE/systemd/compare/134cf1c8bc3e361a2641161aa11ac2b5b990480b...9753d1c17545a5d46530696cb14254f5f12024f1
- Rebase 0001-conf-parser-introduce-early-drop-ins.patch
-------------------------------------------------------------------
Mon Mar 15 11:06:54 UTC 2021 - Franck Bui <fbui@suse.com>
- Import commit 13bc08870147b35f87cefb074aec22e767b7ac04
846d61e0a1 boot: Move console declarations to missing_efi.h
171a37228b boot: Add startswith() and endswith() functions with no_case variants
0fad9f309a boot: Drop unnecessary braces
c38bbb0874 boot: Fix void pointer arithmetic warning
438210924b boot: Replace raw efivar gets with typed variants
e46cb3e4a0 boot: Add efivar_get/set_uint64_le() functions
e16bee35c8 boot: Rename efivar_get/set_int() to efivar_get/set_uint_string()
2808d0e9a3 boot: Tighten scope of variables used in loops
d3f3d57743 boot: Add efivar_get_boolean_u8()
0551ecce71 boot: Make all efivar util functions take the guid as an argument
8376ba3b9f boot: Turn all guid constants into C99 compound initializers
166fc2dad2 boot: Enable C99
c87d66e261 boot: Move Secure Boot logic to new file
da7bba9438 udev: fix memleak
e06139117c nspawn: make rootfs relative to oci bundle path (bsc#1182598)
8ba587d46c PATCH] Always free deserialized_subscribed on reload (bsc#1180020)
-------------------------------------------------------------------
Thu Mar 11 09:51:53 UTC 2021 - Franck Bui <fbui@suse.com>
- Make sure the udev socket units are reloaded during udev package updates
-------------------------------------------------------------------
Wed Mar 10 09:10:03 UTC 2021 - Franck Bui <fbui@suse.com>
- fix-machines-btrfs-subvol.sh is only shipped when machined is built
-------------------------------------------------------------------
Mon Feb 22 20:20:43 UTC 2021 - Franck Bui <fbui@suse.com>

View File

@ -24,7 +24,7 @@
%define bootstrap 0
%define mini %nil
%define min_kernel_version 4.5
%define suse_version +suse.83.g134cf1c8bc
%define suse_version +suse.102.g9753d1c175
%bcond_with gnuefi
%if 0%{?bootstrap}
@ -53,7 +53,7 @@
Name: systemd
URL: http://www.freedesktop.org/wiki/Software/systemd
Version: 246.10
Version: 246.11
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1-or-later
@ -901,12 +901,17 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%postun -n udev%{?mini}
%regenerate_initrd_post
# Restarting udevd sockets means also stopping the daemon. But we
# don't want the sockets and the daemon to be inactive at the same
# time because we might loose new events sent by the kernel during the
# package update otherwise. Hence we accept the fact that the socket
# properties might not be updated. They are unlikely changed anyway.
%systemd_postun_with_restart systemd-udevd.service
systemctl daemon-reload || :
# On package update, restarting the socket units will probably fail as
# udevd is most likely running. Therefore systemctl will refuse to
# start them again once stopped. It's not an issue since we are mostly
# interested to make PID1 use the updated unit files once the socket
# units wil be started again. And that will happen when systemd-udevd
# itself will be restarted.
if [ $1 -ge 1 ]; then
systemctl try-restart systemd-udevd-{control,kernel}.socket 2>/dev/null || :
systemctl try-restart systemd-udevd.service || :
fi
%posttrans -n udev%{?mini}
%regenerate_initrd_posttrans
@ -919,6 +924,7 @@ rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules
%post container
%tmpfiles_create systemd-nspawn.conf
%if %{with machined}
if [ $1 -gt 1 ]; then
# Convert /var/lib/machines subvolume to make it suitable for
# rollbacks, if needed. See bsc#992573. The installer has been fixed
@ -937,6 +943,7 @@ if [ $1 -gt 1 ]; then
# shouldn't be any issues.
%{_prefix}/lib/systemd/scripts/fix-machines-btrfs-subvol.sh || :
fi
%endif
%if ! 0%{?bootstrap}
%post logger