Accepting request 1120043 from Base:System

- Import commit b53f364c264cd598d4210b64285a55d362b47b89
  b53f364c26 test: install af_packet kernel module on openSUSE
  86b7521a3c shared/wall: use logind if build without utmp support
  65aac5858f errno-util: allow ERRNO_IS_* to accept types wider than int
  8f93b89db4 basic/errno-util: add wrappers which only accept negative errno
  1b815b3e76 Introduce RET_GATHER and use it in src/shared/

- Drop 0001-conf-parser-introduce-early-drop-ins.patch
  The usage of drop-ins is now the official way for configuring systemd and its
  various daemons on Factory/ALP.
  See: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/KWRBTAVQ6MGHVAHKDZZ6GIRX4RMHKHQ6/

- Ship the main configuration files in /usr/lib/
  Besides the fact that shipping files in /etc is not recommended anymore, this
  change will hopefully encourage users to customize the defaults via the mean
  of drop-ins hence removing the risk of conflicts with downstream
  customization.
  In contrary, shipping empty directories *.conf.d/ in /etc is not a concern and
  should suggest users to create drop-ins (bsc#1207056).

- systemd.spec: add files.portable and files.journal-remote

- Don't include entries listed in kbd-model-map.xkb-generated (provided by kbd
  package) in kbd-model-map anymore. Yast, the only user of these entries,
  directly parses kbd-model-map.xkb-generated now (bsc#1211104).

- tmpfiles-suse.conf: drop entries for /run/lock and /var/log/wtmp
  /run/lock is now defined by filesystem package and wtmp has been replaced by
  wtmpdb on TW.

OBS-URL: https://build.opensuse.org/request/show/1120043
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=405
This commit is contained in:
Ana Guerrero 2023-10-26 15:12:14 +00:00 committed by Git OBS Bridge
commit 7afefbedc0
14 changed files with 223 additions and 418 deletions

View File

@ -1,329 +0,0 @@
From 503da4e49107f6c20e3fce05506f8b107894a5af 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
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As formerly known as "downstream conf file drop-ins should never override main
user conf file".
Previously all drop-ins, including those shipped by downstream, shipped in
/usr, could override user's main configuration file (located in /etc) because
the main file was always parsed first.
This was problematic for downstreams because their customization should never
override the users one in general. Therefore the only way to make this logic
usable was by teaching users to never use the main conf files and to put all
theirs settings in drop-ins with a higher priority than the one downsteam would
use. However customizing the defaults through the main conf file is something
very well established since a long time hence this is not something
conceivable.
This patch reworks the way we parse configuration files by introducing "early"
conf files (idea from Zbigniew Jędrzejewski-Szmek), which always have a
priority lower than the main config file and hence other conf file drop-ins
too.
Early conf files can be located in any locations where regular conf snippets
can be installed and are sorted between them using the same sorting rules that
apply to other conf files. A conf file is considered as an early one if its
filename is prefixed with "__" (double underscore).
Hence for example, drop-in "/usr/lib/systemd/logind.conf.d/__99-foo.conf" will
always be parsed before:
/etc/systemd/logind.conf
/etc/systemd/logind.conf.d/00-foo.conf
/usr/lib/systemd/logind.conf.d/00-foo.conf
This change isn't backwards-compatible, but the '__' prefix is something that
is unlikely used. Hence the risk should be very low.
Unfortunately upstream is not seing this problem as a serious one and accept
that vendors' configuration files can take precedence over the main
configuration files (placed in /etc). See the following links for the
related discussions:
https://github.com/systemd/systemd/issues/2121 (initial issue report)
https://github.com/systemd/systemd/pull/17161 (first attempt to solve this issue)
https://github.com/systemd/systemd/pull/18347 (introduction of early drop-in)
Since SUSE heavily relies on drop-ins to customize some of the upstream default
settings, there was no other choice than to diverge from upstream in this
regard.
But it should be noted that these early drop-ins are strictly reserved for SUSE
own purpose only. IOW users should never use them and early drop-ins should
never be created in /etc but only in /usr. We reserve the right to change or
drop this feature at any time.
Fixes: #2121
---
src/shared/conf-parser.c | 56 ++++++++++++++--
src/test/test-conf-parser.c | 125 +++++++++++++++++++++++++++++++++++-
2 files changed, 175 insertions(+), 6 deletions(-)
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index ec4b53b2e8..982172dfa0 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -477,6 +477,7 @@ int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
static int config_parse_many_files(
const char* const* conf_files,
+ char **early_files,
char **files,
const char *sections,
ConfigItemLookup lookup,
@@ -495,6 +496,20 @@ static int config_parse_many_files(
return -ENOMEM;
}
+ STRV_FOREACH(fn, early_files) {
+ r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &st);
+ if (r < 0)
+ return r;
+ if (r == 0)
+ continue;
+
+ if (ret_stats_by_path) {
+ r = hashmap_put_stats_by_path(&stats_by_path, *fn, &st);
+ if (r < 0)
+ return r;
+ }
+ }
+
/* First read the first found main config file. */
STRV_FOREACH(fn, conf_files) {
r = config_parse(NULL, *fn, NULL, sections, lookup, table, flags, userdata, &st);
@@ -533,6 +548,27 @@ static int config_parse_many_files(
return 0;
}
+static int config_parse_split_conf_files(char **files, char ***early_files, char ***late_files) {
+
+ assert(files);
+ assert(early_files);
+ assert(late_files);
+
+ STRV_FOREACH(f, files) {
+ char ***s, *p;
+
+ p = strdup(*f);
+ if (!p)
+ return log_oom();
+
+ s = startswith(basename(*f), "__") ? early_files : late_files;
+ if (strv_push(s, p) < 0)
+ return log_oom();
+ }
+
+ return 0;
+}
+
/* Parse one main config file located in /etc/systemd and its drop-ins, which is what all systemd daemons
* do. */
int config_parse_config_file(
@@ -543,7 +579,8 @@ int config_parse_config_file(
ConfigParseFlags flags,
void *userdata) {
- _cleanup_strv_free_ char **dropins = NULL, **dropin_dirs = NULL;
+ _cleanup_strv_free_ char **dropins = NULL, **early_dropins = NULL, **dropin_dirs = NULL;
+ _cleanup_strv_free_ char **files = NULL;
char **conf_paths = CONF_PATHS_STRV("");
int r;
@@ -571,13 +608,17 @@ int config_parse_config_file(
dropin_dirs[i++] = d;
}
- r = conf_files_list_strv(&dropins, ".conf", NULL, 0, (const char**) dropin_dirs);
+ r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) dropin_dirs);
+ if (r < 0)
+ return r;
+
+ r = config_parse_split_conf_files(files, &early_dropins, &dropins);
if (r < 0)
return r;
const char *sysconf_file = strjoina(PKGSYSCONFDIR, "/", conf_file);
- return config_parse_many_files(STRV_MAKE_CONST(sysconf_file), dropins,
+ return config_parse_many_files(STRV_MAKE_CONST(sysconf_file), early_dropins, dropins,
sections, lookup, table, flags, userdata, NULL);
}
@@ -595,6 +636,7 @@ int config_parse_many(
Hashmap **ret_stats_by_path,
char ***ret_dropin_files) {
+ _cleanup_strv_free_ char **early_dropins = NULL, **dropins = NULL;
_cleanup_strv_free_ char **files = NULL;
int r;
@@ -607,12 +649,16 @@ int config_parse_many(
if (r < 0)
return r;
- r = config_parse_many_files(conf_files, files, sections, lookup, table, flags, userdata, ret_stats_by_path);
+ r = config_parse_split_conf_files(files, &early_dropins, &dropins);
if (r < 0)
return r;
+ r = config_parse_many_files(conf_files, early_dropins, dropins,
+ sections, lookup, table, flags, userdata, ret_stats_by_path);
+
+
if (ret_dropin_files)
- *ret_dropin_files = TAKE_PTR(files);
+ *ret_dropin_files = TAKE_PTR(dropins);
return 0;
}
diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c
index 0acb4131b5..88f8ff11be 100644
--- a/src/test/test-conf-parser.c
+++ b/src/test/test-conf-parser.c
@@ -5,7 +5,10 @@
#include "fs-util.h"
#include "log.h"
#include "macro.h"
-#include "string-util.h"
+#include "mkdir.h"
+#include "nulstr-util.h"
+#include "path-util.h"
+#include "rm-rf.h"
#include "strv.h"
#include "tests.h"
#include "tmpfile-util.h"
@@ -390,4 +393,124 @@ TEST(config_parse) {
test_config_parse_one(i, config_file[i]);
}
+static void setup_conf_files(const char *root, char **conf_files, char ***ret_conf_dirs) {
+
+ STRV_FOREACH(path, conf_files) {
+ _cleanup_free_ char *abspath = NULL;
+ _cleanup_fclose_ FILE *f = NULL;
+
+ abspath = path_join(root, *path);
+ assert_se(abspath);
+
+ (void) mkdir_parents(abspath, 0755);
+
+ f = fopen(abspath, "w");
+ assert_se(f);
+ fprintf(f,
+ "[Section]\n"
+ "Field=%s\n",
+ *path);
+
+ if (ret_conf_dirs) {
+ _cleanup_free_ char *d = NULL;
+
+ assert_se(path_extract_directory(abspath, &d) >= 0);
+ assert_se(strv_consume(ret_conf_dirs, TAKE_PTR(d)) == 0);
+ }
+ }
+
+ if (ret_conf_dirs) {
+ strv_uniq(*ret_conf_dirs);
+ strv_sort(*ret_conf_dirs);
+ }
+}
+
+static void test_config_parse_many_one(const char *main, char **dropins, const char *expected) {
+
+ _cleanup_strv_free_ char **conf_dirs = NULL;
+ _cleanup_free_ char *parsed = NULL;
+ char *conf_file;
+ char *tmp_dir;
+ int r;
+
+ const ConfigTableItem items[] = {
+ { "Section", "Field", config_parse_string, 0, &parsed},
+ };
+
+ tmp_dir = strdupa("/tmp/test-conf-parser-XXXXXX");
+ assert_se(mkdtemp(tmp_dir));
+
+ setup_conf_files(tmp_dir, STRV_MAKE(main), NULL);
+ setup_conf_files(tmp_dir, dropins, &conf_dirs);
+
+ conf_file = main ? strjoina(tmp_dir, "/", main) : NULL;
+
+ /* Since commit bdb2d3c6889408c7, 'conf_file_dirs' can't be NULL anymore. */
+
+ r = config_parse_many(STRV_MAKE_CONST(conf_file),
+ (const char * const*)(conf_dirs ?: STRV_MAKE_EMPTY),
+ /* dropin_dirname= */ "",
+ /* root= */ NULL,
+ "Section\0",
+ config_item_table_lookup,
+ items,
+ CONFIG_PARSE_WARN,
+ /* userdata= */ NULL,
+ /* ret_stats_by_path= */ NULL,
+ /* ret_dropin_files= */ NULL);
+
+ assert_se(r == 0);
+
+ assert_se((!!expected == !!parsed));
+ assert_se(!expected || streq(expected, parsed));
+
+ assert_se(rm_rf(tmp_dir, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
+}
+
+TEST(config_parse_many) {
+ log_info("== %s ==", __func__);
+
+ test_config_parse_many_one(/* main= */ NULL,
+ /* dropins */ NULL,
+ /* expected_name= */ NULL);
+
+ test_config_parse_many_one("dir/main.conf", NULL, "dir/main.conf");
+
+ test_config_parse_many_one(NULL,
+ STRV_MAKE("dir1/50-foo.conf"),
+ "dir1/50-foo.conf");
+
+ test_config_parse_many_one(NULL,
+ STRV_MAKE("dir1/__50-foo.conf"),
+ "dir1/__50-foo.conf");
+
+ test_config_parse_many_one(NULL,
+ STRV_MAKE("dir1/10-foo.conf", "dir1/50-bar.conf"),
+ "dir1/50-bar.conf");
+
+ test_config_parse_many_one(NULL,
+ STRV_MAKE("dir1/50-foo.conf", "dir2/10-bar.conf"),
+ "dir1/50-foo.conf");
+
+ test_config_parse_many_one(NULL,
+ STRV_MAKE("dir1/10-foo.conf", "dir2/10-foo.conf"),
+ "dir1/10-foo.conf");
+
+ /* Early conf files should never override the main one whatever their
+ * priority/location. */
+ test_config_parse_many_one("dir/10-main.conf",
+ STRV_MAKE("dir1/__10-foo.conf", "dir2/__99-foo.conf"),
+ "dir/10-main.conf");
+
+ /* Late conf files always take precendence over the early conf files
+ * and the main one. */
+ test_config_parse_many_one("dir/50-main.conf",
+ STRV_MAKE("dir1/10-foo.conf"),
+ "dir1/10-foo.conf");
+
+ test_config_parse_many_one("dir/10-main.conf",
+ STRV_MAKE("dir1/__10-foo.conf", "dir2/__99-foo.conf", "dir2/10-foo.conf"),
+ "dir2/10-foo.conf");
+}
+
DEFINE_TEST_MAIN(LOG_INFO);
--
2.35.3

View File

@ -1,8 +1,8 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/coredump.conf
%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/coredump
%dir %{_sysconfdir}/systemd/coredump.conf.d
%{_bindir}/coredumpctl %{_bindir}/coredumpctl
%if %{without bootstrap} %if %{without bootstrap}
%{_datadir}/bash-completion/completions/coredumpctl %{_datadir}/bash-completion/completions/coredumpctl
@ -15,6 +15,7 @@
%{_mandir}/man8/systemd-coredump@.service.8.gz %{_mandir}/man8/systemd-coredump@.service.8.gz
%endif %endif
%{_sysctldir}/50-coredump.conf %{_sysctldir}/50-coredump.conf
%{_systemd_util_dir}/coredump.conf
%{_systemd_util_dir}/systemd-coredump %{_systemd_util_dir}/systemd-coredump
%{_sysusersdir}/systemd-coredump.conf %{_sysusersdir}/systemd-coredump.conf
%{_unitdir}/sockets.target.wants/systemd-coredump.socket %{_unitdir}/sockets.target.wants/systemd-coredump.socket

View File

@ -1,7 +1,7 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/oomd.conf %dir %{_sysconfdir}/systemd/oomd.conf.d
%if %{with sd_boot} %if %{with sd_boot}
%dir %{_unitdir}/initrd.target.wants %dir %{_unitdir}/initrd.target.wants
%endif %endif
@ -45,6 +45,7 @@
%if %{with sd_boot} %if %{with sd_boot}
%{_prefix}/lib/kernel/install.d/60-ukify.install %{_prefix}/lib/kernel/install.d/60-ukify.install
%endif %endif
%{_systemd_util_dir}/oomd.conf
%{_systemd_util_dir}/system/initrd-root-fs.target.wants/systemd-repart.service %{_systemd_util_dir}/system/initrd-root-fs.target.wants/systemd-repart.service
%{_systemd_util_dir}/system/sysinit.target.wants/systemd-repart.service %{_systemd_util_dir}/system/sysinit.target.wants/systemd-repart.service
%if %{with sd_boot} %if %{with sd_boot}

View File

@ -1,7 +1,6 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/homed.conf
%{_bindir}/homectl %{_bindir}/homectl
%{_datadir}/bash-completion/completions/homectl %{_datadir}/bash-completion/completions/homectl
%{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Home.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.home1.Home.xml
@ -17,6 +16,7 @@
%{_mandir}/man8/systemd-homed.8.gz %{_mandir}/man8/systemd-homed.8.gz
%{_mandir}/man8/systemd-homed.service.8.gz %{_mandir}/man8/systemd-homed.service.8.gz
%{_pam_moduledir}/pam_systemd_home.so %{_pam_moduledir}/pam_systemd_home.so
%{_systemd_util_dir}/homed.conf
%{_systemd_util_dir}/systemd-homed %{_systemd_util_dir}/systemd-homed
%{_systemd_util_dir}/systemd-homework %{_systemd_util_dir}/systemd-homework
%{_unitdir}/systemd-homed-activate.service %{_unitdir}/systemd-homed-activate.service

31
files.journal-remote Normal file
View File

@ -0,0 +1,31 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%dir %{_sysconfdir}/systemd/journal-remote.conf.d
%dir %{_sysconfdir}/systemd/journal-upload.conf.d
%ghost %dir %{_localstatedir}/log/journal/remote
%{_datadir}/systemd/gatewayd
%{_datadir}/systemd/gatewayd/browse.html
%{_mandir}/man5/journal-remote.conf.5.gz
%{_mandir}/man5/journal-remote.conf.d.5.gz
%{_mandir}/man5/journal-upload.conf.5.gz
%{_mandir}/man5/journal-upload.conf.d.5.gz
%{_mandir}/man8/systemd-journal-gatewayd.8.gz
%{_mandir}/man8/systemd-journal-gatewayd.service.8.gz
%{_mandir}/man8/systemd-journal-gatewayd.socket.8.gz
%{_mandir}/man8/systemd-journal-remote.8.gz
%{_mandir}/man8/systemd-journal-remote.service.8.gz
%{_mandir}/man8/systemd-journal-remote.socket.8.gz
%{_mandir}/man8/systemd-journal-upload.8.gz
%{_mandir}/man8/systemd-journal-upload.service.8.gz
%{_systemd_util_dir}/journal-remote.conf
%{_systemd_util_dir}/journal-upload.conf
%{_systemd_util_dir}/systemd-journal-gatewayd
%{_systemd_util_dir}/systemd-journal-remote
%{_systemd_util_dir}/systemd-journal-upload
%{_sysusersdir}/systemd-remote.conf
%{_unitdir}/systemd-journal-gatewayd.service
%{_unitdir}/systemd-journal-gatewayd.socket
%{_unitdir}/systemd-journal-remote.service
%{_unitdir}/systemd-journal-remote.socket
%{_unitdir}/systemd-journal-upload.service

View File

@ -2,8 +2,8 @@
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%if %{with networkd} %if %{with networkd}
%config(noreplace) %{_sysconfdir}/systemd/networkd.conf
%dir %{_sysconfdir}/systemd/network %dir %{_sysconfdir}/systemd/network
%dir %{_sysconfdir}/systemd/networkd.conf.d
%dir %{_systemd_util_dir}/network %dir %{_systemd_util_dir}/network
%{_bindir}/networkctl %{_bindir}/networkctl
%{_datadir}/bash-completion/completions/networkctl %{_datadir}/bash-completion/completions/networkctl
@ -36,6 +36,7 @@
%{_systemd_util_dir}/network/80-wifi-adhoc.network %{_systemd_util_dir}/network/80-wifi-adhoc.network
%{_systemd_util_dir}/network/80-wifi-ap.network.example %{_systemd_util_dir}/network/80-wifi-ap.network.example
%{_systemd_util_dir}/network/80-wifi-station.network.example %{_systemd_util_dir}/network/80-wifi-station.network.example
%{_systemd_util_dir}/networkd.conf
%{_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 %{_sysusersdir}/systemd-network.conf
@ -47,7 +48,7 @@
%endif %endif
%if %{with resolved} %if %{with resolved}
%config(noreplace) %{_sysconfdir}/systemd/resolved.conf %dir %{_sysconfdir}/systemd/resolved.conf.d
%{_bindir}/resolvectl %{_bindir}/resolvectl
%{_bindir}/systemd-resolve %{_bindir}/systemd-resolve
%{_datadir}/bash-completion/completions/resolvectl %{_datadir}/bash-completion/completions/resolvectl
@ -69,6 +70,7 @@
%{_mandir}/man8/systemd-resolved.8.gz %{_mandir}/man8/systemd-resolved.8.gz
%{_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}/resolved.conf
%{_systemd_util_dir}/systemd-resolved %{_systemd_util_dir}/systemd-resolved
%{_sysusersdir}/systemd-resolve.conf %{_sysusersdir}/systemd-resolve.conf
%{_tmpfilesdir}/systemd-resolve.conf %{_tmpfilesdir}/systemd-resolve.conf

15
files.portable Normal file
View File

@ -0,0 +1,15 @@
#
# Please keep the list sorted (with `LC_ALL=C sort`).
#
%{_bindir}/portablectl
%{_datadir}/dbus-1/system-services/org.freedesktop.portable1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.portable1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.portable1.policy
%{_mandir}/man1/portablectl.1.gz
%{_mandir}/man8/systemd-portabled.8.gz
%{_mandir}/man8/systemd-portabled.service.8.gz
%{_systemd_util_dir}/portable
%{_systemd_util_dir}/systemd-portabled
%{_tmpfilesdir}/portables.conf
%{_unitdir}/dbus-org.freedesktop.portable1.service
%{_unitdir}/systemd-portabled.service

View File

@ -1,10 +1,6 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/journald.conf
%config(noreplace) %{_sysconfdir}/systemd/logind.conf
%config(noreplace) %{_sysconfdir}/systemd/system.conf
%config(noreplace) %{_sysconfdir}/systemd/user.conf
%dir %{_binfmtdir} %dir %{_binfmtdir}
%if %{without bootstrap} %if %{without bootstrap}
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
@ -34,8 +30,12 @@
%dir %{_sysconfdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d
%dir %{_sysconfdir}/sysctl.d %dir %{_sysconfdir}/sysctl.d
%dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd
%dir %{_sysconfdir}/systemd/journald.conf.d
%dir %{_sysconfdir}/systemd/logind.conf.d
%dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/system
%dir %{_sysconfdir}/systemd/system.conf.d
%dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/systemd/user
%dir %{_sysconfdir}/systemd/user.confd.d
%dir %{_sysconfdir}/tmpfiles.d %dir %{_sysconfdir}/tmpfiles.d
%dir %{_sysconfdir}/xdg/systemd %dir %{_sysconfdir}/xdg/systemd
%dir %{_sysctldir} %dir %{_sysctldir}
@ -402,8 +402,11 @@
%{_sysconfdir}/xdg/systemd/user %{_sysconfdir}/xdg/systemd/user
%{_sysctldir}/99-sysctl.conf %{_sysctldir}/99-sysctl.conf
%{_systemd_user_env_generator_dir}/30-systemd-environment-d-generator %{_systemd_user_env_generator_dir}/30-systemd-environment-d-generator
%{_systemd_util_dir}/journald.conf
%{_systemd_util_dir}/logind.conf
%{_systemd_util_dir}/rpm/fixlet-systemd-post.sh %{_systemd_util_dir}/rpm/fixlet-systemd-post.sh
%{_systemd_util_dir}/system-preset/99-default.preset %{_systemd_util_dir}/system-preset/99-default.preset
%{_systemd_util_dir}/system.conf
%{_systemd_util_dir}/systemd %{_systemd_util_dir}/systemd
%{_systemd_util_dir}/systemd-binfmt %{_systemd_util_dir}/systemd-binfmt
%{_systemd_util_dir}/systemd-boot-check-no-failures %{_systemd_util_dir}/systemd-boot-check-no-failures
@ -433,6 +436,7 @@
%{_systemd_util_dir}/systemd-xdg-autostart-condition %{_systemd_util_dir}/systemd-xdg-autostart-condition
%{_systemd_util_dir}/user-preset/90-systemd.preset %{_systemd_util_dir}/user-preset/90-systemd.preset
%{_systemd_util_dir}/user-preset/99-default.preset %{_systemd_util_dir}/user-preset/99-default.preset
%{_systemd_util_dir}/user.conf
%{_systemd_util_dir}/user/app.slice %{_systemd_util_dir}/user/app.slice
%{_systemd_util_dir}/user/background.slice %{_systemd_util_dir}/user/background.slice
%{_systemd_util_dir}/user/basic.target %{_systemd_util_dir}/user/basic.target
@ -463,8 +467,8 @@
%{_tmpfilesdir}/credstore.conf %{_tmpfilesdir}/credstore.conf
%{_tmpfilesdir}/journal-nocow.conf %{_tmpfilesdir}/journal-nocow.conf
%{_tmpfilesdir}/provision.conf %{_tmpfilesdir}/provision.conf
%{_tmpfilesdir}/suse.conf
%{_tmpfilesdir}/systemd-nologin.conf %{_tmpfilesdir}/systemd-nologin.conf
%{_tmpfilesdir}/systemd-suse.conf
%{_tmpfilesdir}/systemd-tmp.conf %{_tmpfilesdir}/systemd-tmp.conf
%{_tmpfilesdir}/systemd.conf %{_tmpfilesdir}/systemd.conf
%{_tmpfilesdir}/x11.conf %{_tmpfilesdir}/x11.conf

View File

@ -1,10 +1,6 @@
# #
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/systemd/pstore.conf
%config(noreplace) %{_sysconfdir}/systemd/sleep.conf
%config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf
%config(noreplace) %{_sysconfdir}/udev/iocost.conf
%config(noreplace) %{_sysconfdir}/udev/udev.conf %config(noreplace) %{_sysconfdir}/udev/udev.conf
%if %{without bootstrap} %if %{without bootstrap}
%dir %{_libdir}/cryptsetup %dir %{_libdir}/cryptsetup
@ -17,7 +13,11 @@
%dir %{_sysconfdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d
%endif %endif
%dir %{_sysconfdir}/systemd/network %dir %{_sysconfdir}/systemd/network
%dir %{_sysconfdir}/systemd/pstore.conf.d
%dir %{_sysconfdir}/systemd/sleep.conf.d
%dir %{_sysconfdir}/systemd/timesyncd.conf.d
%dir %{_sysconfdir}/udev %dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/iocost.conf.d
%dir %{_sysconfdir}/udev/rules.d %dir %{_sysconfdir}/udev/rules.d
%dir %{_systemd_util_dir}/network %dir %{_systemd_util_dir}/network
%dir %{_systemd_util_dir}/system-sleep %dir %{_systemd_util_dir}/system-sleep
@ -146,11 +146,14 @@
%endif %endif
%{_prefix}/lib/udev/fido_id %{_prefix}/lib/udev/fido_id
%{_prefix}/lib/udev/iocost %{_prefix}/lib/udev/iocost
%{_prefix}/lib/udev/iocost.conf
%{_prefix}/lib/udev/mtd_probe %{_prefix}/lib/udev/mtd_probe
%{_prefix}/lib/udev/scsi_id %{_prefix}/lib/udev/scsi_id
%{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/v4l_id
%{_systemd_util_dir}/network/99-default.link %{_systemd_util_dir}/network/99-default.link
%{_systemd_util_dir}/ntp-units.d/80-systemd-timesync.list %{_systemd_util_dir}/ntp-units.d/80-systemd-timesync.list
%{_systemd_util_dir}/pstore.conf
%{_systemd_util_dir}/sleep.conf
%{_systemd_util_dir}/systemd-backlight %{_systemd_util_dir}/systemd-backlight
%{_systemd_util_dir}/systemd-battery-check %{_systemd_util_dir}/systemd-battery-check
%if %{without bootstrap} %if %{without bootstrap}
@ -180,6 +183,7 @@
%{_systemd_util_dir}/systemd-veritysetup %{_systemd_util_dir}/systemd-veritysetup
%endif %endif
%{_systemd_util_dir}/systemd-volatile-root %{_systemd_util_dir}/systemd-volatile-root
%{_systemd_util_dir}/timesyncd.conf
%if %{without bootstrap} %if %{without bootstrap}
%{_systemdgeneratordir}/systemd-cryptsetup-generator %{_systemdgeneratordir}/systemd-cryptsetup-generator
%endif %endif

View File

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

View File

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

View File

@ -1,3 +1,57 @@
-------------------------------------------------------------------
Tue Oct 24 14:15:25 UTC 2023 - Franck Bui <fbui@suse.com>
- Import commit b53f364c264cd598d4210b64285a55d362b47b89
b53f364c26 test: install af_packet kernel module on openSUSE
86b7521a3c shared/wall: use logind if build without utmp support
65aac5858f errno-util: allow ERRNO_IS_* to accept types wider than int
8f93b89db4 basic/errno-util: add wrappers which only accept negative errno
1b815b3e76 Introduce RET_GATHER and use it in src/shared/
-------------------------------------------------------------------
Fri Oct 20 08:09:19 UTC 2023 - Franck Bui <fbui@suse.com>
- Drop 0001-conf-parser-introduce-early-drop-ins.patch
The usage of drop-ins is now the official way for configuring systemd and its
various daemons on Factory/ALP.
See: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/KWRBTAVQ6MGHVAHKDZZ6GIRX4RMHKHQ6/
-------------------------------------------------------------------
Thu Oct 19 13:25:01 UTC 2023 - Franck Bui <fbui@suse.com>
- Ship the main configuration files in /usr/lib/
Besides the fact that shipping files in /etc is not recommended anymore, this
change will hopefully encourage users to customize the defaults via the mean
of drop-ins hence removing the risk of conflicts with downstream
customization.
In contrary, shipping empty directories *.conf.d/ in /etc is not a concern and
should suggest users to create drop-ins (bsc#1207056).
-------------------------------------------------------------------
Thu Oct 19 12:13:51 UTC 2023 - Franck Bui <fbui@suse.com>
- systemd.spec: add files.portable and files.journal-remote
-------------------------------------------------------------------
Fri Oct 13 09:38:37 UTC 2023 - Franck Bui <fbui@suse.com>
- Don't include entries listed in kbd-model-map.xkb-generated (provided by kbd
package) in kbd-model-map anymore. Yast, the only user of these entries,
directly parses kbd-model-map.xkb-generated now (bsc#1211104).
-------------------------------------------------------------------
Fri Oct 13 09:28:23 UTC 2023 - Franck Bui <fbui@suse.com>
- tmpfiles-suse.conf: drop entries for /run/lock and /var/log/wtmp
/run/lock is now defined by filesystem package and wtmp has been replaced by
wtmpdb on TW.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 5 15:04:50 UTC 2023 - Franck Bui <fbui@suse.com> Thu Oct 5 15:04:50 UTC 2023 - Franck Bui <fbui@suse.com>
@ -152,11 +206,12 @@ Wed Aug 16 08:48:58 UTC 2023 - Franck Bui <fbui@suse.com>
This includes the following bug fixes: This includes the following bug fixes:
- upstream commit 331aa7aa15ee5dd12b369b276f575d521435eb52 (bsc#1203141) - upstream commit 331aa7aa15ee5dd12b369b276f575d521435eb52 (bsc#1181192 bsc#1184238 bsc#1184254 bsc#1184859 bsc#1185828 bsc#1203141)
- upstream commit 529ba8a1a3968564b67049a077f213e3a0d53070 (bsc#1209340) - upstream commit 529ba8a1a3968564b67049a077f213e3a0d53070 (bsc#1209340)
- upstream commit f1f331a252d22c15f37d03524cce967664358c5c (bsc#1186606) - upstream commit f1f331a252d22c15f37d03524cce967664358c5c (bsc#1186606)
- upstream commit df1dccd25547b430258bd42ec60428fc9aff1370 (bsc#1213185) - upstream commit df1dccd25547b430258bd42ec60428fc9aff1370 (bsc#1213185)
- upstream commit 000680a68dbdb07d77807868df0b4f978180e4cd (bsc#1211725) - upstream commit 000680a68dbdb07d77807868df0b4f978180e4cd (bsc#1211725)
- upstream commit 2067a7ec7f4c8a353b8e2ece15a6a997e50808b0 (bsc#1211576)
* Drop 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch. A fix * Drop 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch. A fix
for https://github.com/systemd/systemd/issues/26839 has been integrated in for https://github.com/systemd/systemd/issues/26839 has been integrated in
@ -816,6 +871,8 @@ Mon Nov 14 11:15:06 UTC 2022 - Franck Bui <fbui@suse.com>
This includes the following bug fixes: This includes the following bug fixes:
- upstream commit 67c3e1f63a5221b47a8fea85ae421671f29f3b7e (bsc#1200723) - upstream commit 67c3e1f63a5221b47a8fea85ae421671f29f3b7e (bsc#1200723)
- upstream commit 9102c625a673a3246d7e73d8737f3494446bad4e (bsc#1204968 CVE-2022-3821)
- upstream commit efbd4b3ca84c0426b6ff98d6352f82f3b7c090b2 (bsc#1213873)
* Rebased 0001-conf-parser-introduce-early-drop-ins.patch * Rebased 0001-conf-parser-introduce-early-drop-ins.patch
1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch
@ -1019,7 +1076,7 @@ Tue Jun 21 14:24:43 UTC 2022 - Franck Bui <fbui@suse.com>
Tue Jun 21 14:09:51 UTC 2022 - Franck Bui <fbui@suse.com> Tue Jun 21 14:09:51 UTC 2022 - Franck Bui <fbui@suse.com>
- pstore is no more considered as an experimental feature: move it to udev - pstore is no more considered as an experimental feature: move it to udev
package (bsc#1197802) package (bsc#1197802 jsc#PED-2663)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 21 13:20:39 UTC 2022 - Franck Bui <fbui@suse.com> Tue Jun 21 13:20:39 UTC 2022 - Franck Bui <fbui@suse.com>
@ -1053,6 +1110,9 @@ Wed Jun 1 07:20:05 UTC 2022 - Franck Bui <fbui@suse.com>
- upstream commit e6b169418369abbc88c8f622e02e1d704a23d4ef (bsc#1137373 bsc#1181658 bsc#1194708 bsc#1195157 bsc#1197570) - upstream commit e6b169418369abbc88c8f622e02e1d704a23d4ef (bsc#1137373 bsc#1181658 bsc#1194708 bsc#1195157 bsc#1197570)
- upstream commit 3a3b022d2cc112803ea7b9beea98bbcad110368a (bsc#1212434 bsc#1213575) - upstream commit 3a3b022d2cc112803ea7b9beea98bbcad110368a (bsc#1212434 bsc#1213575)
- upstream commit e92a3d8fa3c554f807ddbcd7fc00821868fd8a62 (bsc#1195529)
- upstream commit 1d0727e76fd5e9a07cc9991ec9a10ea1d78a99c7 (bsc#1208194)
- upstream commit 55fabe92e2efb1a907d4c3c93dc63b96ff5b6860 (bsc#1191502)
* Rebased 0001-conf-parser-introduce-early-drop-ins.patch * Rebased 0001-conf-parser-introduce-early-drop-ins.patch
@ -1332,6 +1392,11 @@ Thu Feb 17 18:30:12 UTC 2022 - Franck Bui <fbui@suse.com>
And let's finish reducing the support of SysV init scripts to its minimum. And let's finish reducing the support of SysV init scripts to its minimum.
-------------------------------------------------------------------
Thu Feb 17 11:14:10 UTC 2022 - Franck Bui <fbui@suse.com>
- Don't rely on %{_distconfdir}, it's broken on SLE (bsc#1195998)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 14 15:11:04 UTC 2022 - Franck Bui <fbui@suse.com> Mon Feb 14 15:11:04 UTC 2022 - Franck Bui <fbui@suse.com>
@ -3287,7 +3352,7 @@ Tue Sep 3 15:10:10 UTC 2019 - Franck Bui <fbui@suse.com>
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 14 14:25:43 UTC 2019 - Ludwig Nussel <lnussel@suse.de> Wed Aug 14 14:25:43 UTC 2019 - Ludwig Nussel <lnussel@suse.de>
- enable systemd-portabled - Enable systemd-portabled (jsc#SLE-21695)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jul 31 14:38:13 UTC 2019 - Franck Bui <fbui@suse.com> Wed Jul 31 14:38:13 UTC 2019 - Franck Bui <fbui@suse.com>

View File

@ -19,7 +19,7 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define min_kernel_version 4.5 %define min_kernel_version 4.5
%define archive_version +suse.5.g9674bb2562 %define archive_version +suse.10.gb53f364c26
%define _testsuitedir %{_systemd_util_dir}/tests %define _testsuitedir %{_systemd_util_dir}/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit %define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@ -65,6 +65,20 @@
%bcond_without filetriggers %bcond_without filetriggers
%bcond_with split_usr %bcond_with split_usr
# We stopped shipping main config files in /etc but we have to restore any
# config files that might have been backed up by rpm during the migration of the
# main config files from /etc to /usr. This needs to be done in %%posttrans
# because the .rpmsave files are created when the *old* package version is
# removed. This is not needed by ALP and will be dropped from Factory near the
# end of 2024.
%define restore_rpmsave() \
if [ -e %{_sysconfdir}/%{1}.rpmsave ] && [ ! -e %{_sysconfdir}/%{1} ]; then \
echo >&2 "Restoring %{_sysconfdir}/%1. Please consider moving your customizations in a drop-in instead." \
echo >&2 "For more details, visit https://en.opensuse.org/Systemd#Configuration." \
mv -v %{_sysconfdir}/%{1}.rpmsave %{_sysconfdir}/%{1} || : \
fi \
%{nil}
Name: systemd%{?mini} Name: systemd%{?mini}
URL: http://www.freedesktop.org/wiki/Software/systemd URL: http://www.freedesktop.org/wiki/Software/systemd
Version: 254.5 Version: 254.5
@ -76,7 +90,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bpftool BuildRequires: bpftool
BuildRequires: clang BuildRequires: clang
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: kbd
%if %{with apparmor} %if %{with apparmor}
BuildRequires: libapparmor-devel BuildRequires: libapparmor-devel
%endif %endif
@ -184,6 +197,8 @@ Source207: files.experimental
Source208: files.coredump Source208: files.coredump
Source209: files.homed Source209: files.homed
Source210: files.lang Source210: files.lang
Source211: files.journal-remote
Source212: files.portable
# #
# All changes backported from upstream are tracked by the git repository, which # All changes backported from upstream are tracked by the git repository, which
@ -194,7 +209,6 @@ Source210: files.lang
# only relevant for SUSE distros. Special rewards for those who will manage to # only relevant for SUSE distros. Special rewards for those who will manage to
# get rid of one of them ! # get rid of one of them !
# #
Patch2: 0001-conf-parser-introduce-early-drop-ins.patch
Patch3: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch Patch3: 0009-pid1-handle-console-specificities-weirdness-for-s390.patch
%if %{with sysvcompat} %if %{with sysvcompat}
Patch4: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch Patch4: 0002-rc-local-fix-ordering-startup-for-etc-init.d-boot.lo.patch
@ -813,8 +827,18 @@ install -m0755 -D %{SOURCE3} %{buildroot}/%{_systemd_util_dir}/systemd-update-he
install -m0755 -D %{SOURCE4} %{buildroot}/%{_systemd_util_dir}/systemd-sysv-install install -m0755 -D %{SOURCE4} %{buildroot}/%{_systemd_util_dir}/systemd-sysv-install
%endif %endif
mkdir -p % %{buildroot}%{_sysconfdir}/systemd/network # For some reasons, upstream refuses to add a new build option (see pr#29244)
mkdir -p % %{buildroot}%{_sysconfdir}/systemd/nspawn # for customizing the installation path of main config files. However we want to
# store them in /usr/lib so we don't encourage users to modify them while they
# still can serve as templates.
for f in %{buildroot}%{_sysconfdir}/systemd/*.conf; do
mv $f %{buildroot}%{_systemd_util_dir}/
done
for f in %{buildroot}%{_sysconfdir}/udev/*.conf; do
# Drop-ins are currently not supported by udevd.
[ $(basename $f) = "udev.conf" ] && continue
mv $f %{buildroot}%{_prefix}/lib/udev/
done
# Install the fixlets # Install the fixlets
mkdir -p %{buildroot}%{_systemd_util_dir}/rpm mkdir -p %{buildroot}%{_systemd_util_dir}/rpm
@ -885,6 +909,26 @@ rm -f %{buildroot}%{_environmentdir}/99-environment.conf
# directory... oh well. # directory... oh well.
rm -f %{buildroot}%{_sysconfdir}/init.d/README rm -f %{buildroot}%{_sysconfdir}/init.d/README
# Create *.conf.d/ directories to encourage users to create drop-ins when they
# need to customize some setting defaults.
mkdir -p %{buildroot}%{_sysconfdir}/systemd/coredump.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/journald.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/journal-remote.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/journal-upload.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/logind.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/networkd.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/oomd.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/pstore.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/resolved.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/sleep.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/system.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/timesyncd.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/user.confd.d
mkdir -p %{buildroot}%{_sysconfdir}/udev/iocost.conf.d
mkdir -p %{buildroot}%{_sysconfdir}/systemd/network
mkdir -p %{buildroot}%{_sysconfdir}/systemd/nspawn
# This dir must be owned (and thus created) by systemd otherwise the build # This dir must be owned (and thus created) by systemd otherwise the build
# system will complain. This is odd since we simply own a ghost file in it... # system will complain. This is odd since we simply own a ghost file in it...
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
@ -942,26 +986,12 @@ rm -f %{buildroot}%{_presetdir}/*.preset
echo 'disable *' >%{buildroot}%{_presetdir}/99-default.preset echo 'disable *' >%{buildroot}%{_presetdir}/99-default.preset
echo 'disable *' >%{buildroot}%{_userpresetdir}/99-default.preset echo 'disable *' >%{buildroot}%{_userpresetdir}/99-default.preset
# The current situation with tmpfiles snippets dealing with the generic paths is # Most of the entries for the generic paths are defined by filesystem package as
# pretty messy currently because: # the definitions used by SUSE distros diverged from the ones defined by
# # systemd. For lack of a better place some (deprecated) paths are still shipped
# 1. filesystem package wants to define the generic paths and some of them # along with the systemd package.
# conflict with the definition given by systemd in var.conf, see
# bsc#1078466.
#
# 2. /tmp and /var/tmp are not cleaned by default on SUSE distros (fate#314974)
# which conflict with tmp.conf.
#
# 3. There're also legacy.conf which defines various legacy paths which either
# don't match the SUSE defaults or don't look needed at all.
#
# 4. We don't want the part in etc.conf which imports default upstream files in
# empty /etc, see below.
#
# To keep things simple, we remove all these tmpfiles config files but still
# keep the remaining paths that still don't have a better home in suse.conf.
rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf rm -f %{buildroot}%{_tmpfilesdir}/{etc,home,legacy,tmp,var}.conf
install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/suse.conf install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/systemd-suse.conf
# The content of the files shipped by systemd doesn't match the # The content of the files shipped by systemd doesn't match the
# defaults used by SUSE. Don't ship those files but leave the decision # defaults used by SUSE. Don't ship those files but leave the decision
@ -969,18 +999,6 @@ install -m 644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/suse.conf
# consume those configs (like glibc or pam), see bsc#1170146. # consume those configs (like glibc or pam), see bsc#1170146.
rm -fr %{buildroot}%{_datadir}/factory/* rm -fr %{buildroot}%{_datadir}/factory/*
# Add entries for xkeyboard-config converted keymaps; mappings, which already
# exist in original systemd mapping table are being ignored though, i.e. not
# overwritten; needed as long as YaST uses console keymaps internally and calls
# localectl to convert from vconsole to X11 keymaps. Ideally YaST should switch
# to X11 layout names (the mapping table wouldn't be needed since each X11
# keymap has a generated xkbd keymap) and let localectl initialize
# /etc/vconsole.conf and /etc/X11/xorg.conf.d/00-keyboard.conf (FATE#319454).
if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then
cat /usr/share/systemd/kbd-model-map.xkb-generated \
>>%{buildroot}%{_datarootdir}/systemd/kbd-model-map
fi
# kbd-model-map.legacy is used to provide mapping for legacy keymaps, which may # kbd-model-map.legacy is used to provide mapping for legacy keymaps, which may
# still be used by yast. # still be used by yast.
cat %{SOURCE14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map cat %{SOURCE14} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map
@ -1074,6 +1092,12 @@ journalctl --update-catalog || :
%systemd_postun_with_restart systemd-timedated.service %systemd_postun_with_restart systemd-timedated.service
%systemd_postun_with_restart systemd-userdbd.service %systemd_postun_with_restart systemd-userdbd.service
%posttrans
%restore_rpmsave systemd/journald.conf
%restore_rpmsave systemd/logind.conf
%restore_rpmsave systemd/system.conf
%restore_rpmsave systemd/user.conf
%pre -n udev%{?mini} %pre -n udev%{?mini}
# Units listed below can be enabled at installation accoding to their preset # Units listed below can be enabled at installation accoding to their preset
# setting. # setting.
@ -1128,6 +1152,10 @@ fi
%posttrans -n udev%{?mini} %posttrans -n udev%{?mini}
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%restore_rpmsave systemd/pstore.conf
%restore_rpmsave systemd/sleep.conf
%restore_rpmsave systemd/timesyncd.conf
%restore_rpmsave udev/iocost.conf
%ldconfig_scriptlets -n libsystemd0%{?mini} %ldconfig_scriptlets -n libsystemd0%{?mini}
%ldconfig_scriptlets -n libudev%{?mini}1 %ldconfig_scriptlets -n libudev%{?mini}1
@ -1158,6 +1186,9 @@ fi
%post coredump %post coredump
%if %{without filetriggers} %if %{without filetriggers}
%sysusers_create systemd-coredump.conf %sysusers_create systemd-coredump.conf
%posttrans coredump
%restore_rpmsave systemd/coredump.conf
%endif %endif
%endif %endif
@ -1185,6 +1216,10 @@ fi
%systemd_postun_with_restart systemd-journal-gatewayd.service %systemd_postun_with_restart systemd-journal-gatewayd.service
%systemd_postun_with_restart systemd-journal-remote.service %systemd_postun_with_restart systemd-journal-remote.service
%systemd_postun_with_restart systemd-journal-upload.service %systemd_postun_with_restart systemd-journal-upload.service
%posttrans journal-remote
%restore_rpmsave systemd/journal-remote.conf
%restore_rpmsave systemd/journal-upload.conf
%endif %endif
%if %{with networkd} || %{with resolved} %if %{with networkd} || %{with resolved}
@ -1233,6 +1268,10 @@ fi
%ldconfig %ldconfig
%systemd_postun systemd-resolved.service %systemd_postun systemd-resolved.service
%endif %endif
%posttrans network
%restore_rpmsave systemd/networkd.conf
%restore_rpmsave systemd/resolved.conf
%endif %endif
%if %{with homed} %if %{with homed}
@ -1291,6 +1330,9 @@ fi
%postun experimental %postun experimental
%systemd_postun systemd-homed.service %systemd_postun systemd-homed.service
%systemd_postun systemd-oomd.service systemd-oomd.socket %systemd_postun systemd-oomd.service systemd-oomd.socket
%posttrans experimental
%restore_rpmsave systemd/oomd.conf
%endif %endif
# File trigger definitions # File trigger definitions
@ -1363,22 +1405,7 @@ fi
%if %{with journal_remote} %if %{with journal_remote}
%files journal-remote %files journal-remote
%defattr(-, root, root) %defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf %include %{SOURCE211}
%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf
%{_unitdir}/systemd-journal-gatewayd.*
%{_unitdir}/systemd-journal-remote.*
%{_unitdir}/systemd-journal-upload.*
%{_systemd_util_dir}/systemd-journal-gatewayd
%{_systemd_util_dir}/systemd-journal-remote
%{_systemd_util_dir}/systemd-journal-upload
%{_sysusersdir}/systemd-remote.conf
%{_mandir}/man5/journal-remote.conf*
%{_mandir}/man5/journal-upload.conf*
%{_mandir}/man8/systemd-journal-gatewayd.*
%{_mandir}/man8/systemd-journal-remote.*
%{_mandir}/man8/systemd-journal-upload.*
%{_datadir}/systemd/gatewayd
%ghost %dir %{_localstatedir}/log/journal/remote
%endif %endif
%if %{with homed} %if %{with homed}
@ -1390,17 +1417,7 @@ fi
%if %{with portabled} %if %{with portabled}
%files portable %files portable
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/portablectl %include %{SOURCE212}
%{_systemd_util_dir}/systemd-portabled
%{_systemd_util_dir}/portable
%{_unitdir}/systemd-portabled.service
%{_unitdir}/dbus-org.freedesktop.portable1.service
%{_datadir}/dbus-1/system.d/org.freedesktop.portable1.conf
%{_datadir}/dbus-1/system-services/org.freedesktop.portable1.service
%{_datadir}/polkit-1/actions/org.freedesktop.portable1.policy
%{_tmpfilesdir}/portables.conf
%{_mandir}/man*/portablectl*
%{_mandir}/man*/systemd-portabled*
%endif %endif
%if %{with testsuite} %if %{with testsuite}

View File

@ -5,9 +5,3 @@
# Legacy symlink. Maybe should be owned by util-linux ? # Legacy symlink. Maybe should be owned by util-linux ?
L+ /etc/mtab - - - - ../proc/self/mounts L+ /etc/mtab - - - - ../proc/self/mounts
# FIXME: move to filesystem ?
d /run/lock 0775 root root -
# FIXME: Move to shadow ?
f /var/log/wtmp 0664 root utmp -