nixpkgs/pkgs/os-specific/linux/systemd/0012-Install-default-configuration-into-out-share-factory.patch
Florian Klink 08096e8ccf systemd: 245.5 -> 245.6
changes:

 - aa0cb635f1 (tag: v245.6) network: L2TP fix crash
 - 9774347b57 Fix typo.
 - 2cac801f0f stat-util: trivial empty_or_null() tweaks
 - b054e69bf9 Check ambient set against bounding set prior to applying ambient set
 - bed695375a udev: when the BSD lock on a block device is taken, don't complain
 - 66fcfdfde7 core: add forgotten return in error path
 - 05dd19fad3 shared/efi-loader: remove check that uses absolute tick value
 - 753a71ad1d gpt: include homed GPT partition type in well-known partition table
 - 3668722049 units: don't set PrivateNetwork= in systemd-homed.service
 - 2bca2d77d3 resolved-dns-query: remove dns_query_candidate_is_routable
 - a3f6020432 sd-network: fix inverted error message
 - a7a9fe3c93 network: allow empty assignment to PreferredLifetime=
 - 8df6fc1241 Update resolvectl zsh completion
 - c1a83277d0 shared: treat generator units as vendor units
 - 1f382d818d tree-wide: fix bad errno checks
 - 667c207683 bus-message: immediately reject messages with invalid type
 - 116a8eadb6 bus-message: fix negative offset with ~empty message
 - 4d5779d886 load-fragment: fix a typo
 - c8b6de003a NEWS: retroactively document Family=
 - cf6b8e6ec5 man: fix dir name in sysctl.d(5)
 - 6d009b7a25 journalctl,elsewhere: make sure --file=foo fails with sane error msg if foo is not readable
 - cf786ef164 makefs: log about OOM condition
 - 0b1839822f blockdev: propagate one more unexpected error
 - d78ce949d0 repart: don't insist on coming up on partition label ourselves
 - 9e1363fcc6 journal: fix dropping first record during upload to remote journal
 - 50cb4e418d meson: initialize time-epoch to reproducible builds compatible value
 - 76abe079b7 limit-util: quieten a very common debug message that is misleading
 - b3e484a3b1 shared: fix integer overflow in calendarspec
 - 0c29eea969 repart: suppress complaints about lack of BLKRRPART when operating on regular file
 - 3db52f5ed8 repart: explain when we exit early and don't do a thing
 - d99cba3aaa mount: introduce mount_is_nofail() helper
 - 7bc4bcea15 mount: default startup dependencies and default network ones are orthogonal
 - 7fe617fa53 mount: introduce mount_add_default_ordering_dependencies()
 - e1c091b6d4 automount: fix handling of default dependencies for automount units
 - ae05a137c9 mount: let pid1 alone handle the default dependencies for mount units
 - f1fb197176 mount: mount unit activated by automount unit should be only ordered against the automount unit
 - c9bcc69703 generator: don't generate device dependencies for extrinsic mounts
 - ebac09ea0a fstab-util: introduce fstab_is_extrinsic()
 - a20e4ea0ed device: drop refuse_after
 - 2799fffac1 man: drop some left-over mentions of StandardOutput=syslog
 - 144aff9c3b sd-netlink: remove unused RTNL_WQUEUE_MAX define
 - 34ca8df8e1 test: Add return 0 to main() function (even it is not strictly necessary)
 - 6e03f328a9 network: 'cur' variable cannot be null, so simplify code
 - 8d0c97f6ca tree-wide: Initialize _cleanup_ variables if needed
 - 4f174e49ae netlink: Fix assert condition on n_containers
 - 3905ce532c journald: Increase stdout buffer size sooner, when almost full
 - 5a37eb7c61 core: don't bind varlink socket if running in test mode
 - 33fff72ce6 pam_systemd: also print debug lines when ending a session
 - ba9af79ccb pam_systemd_home: use correct macro for converting ptr to fd
 - 6199235489 Fix misuse of PAM_PROMPT_ECHO_OFF in systemd-homed
 - c180a2c452 shared/ethtool-util: hush gcc warnings about array bounds
 - 1addba4aac core: fix compilation with gcc -O3
 - 9c46b97161 random-util: use ERRNO_IS_NOT_SUPPORTED() macro
 - d85f9093d2 tmpfiles: clarify that "!" lines are filtered before collisions are checked
 - 2fac966a5c man: mention the exclamation mark and minus sign literally, to make things searchable
 - 4f61be3373 man: clarify that exit status name mappings are unaffected by SuccessExitStatus=
 - b747d74a41 seccomp-util: add new syscalls from kernel 5.6 to syscall filter table
 - c30d8caf8b tree-wide: Replace assert() by assert_se() when there is side effect
 - b6e8e3be7e networkctl: use uint64_t for link speed throughout
 - be66ce6089 tree-wide: use CMSG_SPACE() (and not CMSG_LEN()) to allocate control buffers
 - 1cb197798a man: suffix pam options with "=" where arg is required too
 - a5fe01d3da test: Use assert_se() where variables are only checked by assert
 - 6960efd198 tree-wide: Fix, replace assert() by assert_se() when there is side effect
 - 93c1b03074 tree-wide: Mark as _unused_ variables that are only used in assert()
 - c7679d7a9f tree-wide: Workaround -Wnonnull GCC bug
 - 073b257fd7 man: bring example PAM snippet of pam_systemd and pam_systemd_home back in sync
 - 855291a81c man: highlight relevant lines in pam_systemd_home.so example PAM snippet
 - f89ad7c0fd login: include pam_systemd_home.so in the default PAM snippet we ship for user@.service
 - 9357f9466f test: Skip test-boot-timestamps on permission denied
 - cad4ebe14e sysusers: be extra careful when locking accounts
 - 551e6f233a shared/install: print name of offending file in error
 - c6a2e51232 systemctl: fix --root support in querying presets
 - 6f1eedbfdd systemctl: fix hint when 'systemctl help' is given
 - 925521df7c shared/unit-file: fix resolution of absoulute symlinks with --root
 - 756ba362e8 man: mention that ProtectSystem= also takes care of /efi
 - 4f77cf43b5 man: systemd.service: systemd-analyze exit-codes -> exit-status
 - 7c6ea7a053 man: expand on the star…end/repetition time expressions
 - e06b940792 calendarspec: be more graceful with two kinds of calendar expressions
 - f3dd0b476d calendarspec: minor simplification
 - 3581c16d56 shutdown: fix spacing in shutdown error message
 - 9556255349 nspawn: mount custom paths before writing to /etc
 - 37447b7e78 repart: fix partition maximum size segfault
 - 7f231ba503 link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the implementation slightly
 - e75d2cdb0b main: bump RLIMIT_MEMLOCK by physical RAM size
 - e16b9a1e31 nspawn: be more careful with creating/chowning directories to overmount
 - 765d184a69 homectl: say "home area" in more places
 - c11bff4fa7 userdbctl: make --help fit in 80 columns
 - 0e56c2ef3f shell-completion/zsh: update systemd-analyze completions
 - 2bb580f994 zsh: fix disable/enable completion
 - 607a19a309 cgroup-util: check for SYSFS_MAGIC when detecting cgroup format
 - ddb3c38efc stat-util: no need to open a file to check fs type
 - bd8842304c sysusers,tmpfiles: always mention error when failing to replace specifiers
 - bdea9b65d2 sysusers: add accidentally forgotten 'return'
 - 17b059774d man: document binfmt's new --unregister switch
 - 560380d8ec binfmt: also unregister binfmt entries from unit
 - 80835d9c51 binfmt: modernize code a bit
 - a1745741b8 shutdown: unregister all binfmt_misc entries before entering shutdown loop
 - b637445950 shared: add common helper for unregistering all binfmt entries
 - 0215625e99 home: fix strv NUL termination
 - 038988baa1 networkd: don't do lldp rx nor tx on bond devices
 - 9512d576d9 sd-bus: Fix typo in sd_bus_message_append_array docs
 - 63cef71dd0 shared: add NULL callback check in one more place
 - 6b91ca22a2 core: fix unused variable warning when !HAVE_SECCOMP
 - f7c1c79c57 udev: prepare memory for extra NUL termination for NULSTR
 - 69e0ef0d99 tree-wide: use recvmsg_safe() at various places
 - cd0a84d4e9 socket-util: add recvmsg_safe() wrapper that handles MSG_CTRUNC
 - 2bb48c704b sd-bus: work around ubsan warning
 - c147bba1fb shared: Don't try calling NULL callback in bus_wait_for_units_clear
 - f907491463 run: don't wait for start job to complete when running interactively anyway
 - d3d1550a5d man: Fix typo "multiplied with" -> "multiplied by"
 - ae5a9f27c5 core: make sure we don't get confused when setting TERM for a tty fd
 - a07d3eaf76 man: document that VirtualEthernetExtra= has nothing to do with Bridge=
 - 35fe81078e core: add debug log when a job in the activation queue is not runnable
 - a0cd882be8 core: add log_get_max_level check optimization in log_unit_full
 - 2a6ad1093c util: return the correct correct wd from inotify helpers
 - 9ec244c5c1 core: minor error code handling fixes
 - a799283c91 man: document how to get the boot menu with zero time-out
 - 7263e86c8d resolved: return org.freedesktop.resolve1.DnsError.NXDOMAIN on LLMNR resolution failure
 - 6eab4c2b3e man: use manpages.ubuntu.com for resolvconf(8) link
 - 75ccec5cde man: add a note that resolvconf updates /etc/resolv.conf in specific circumstances
 - 3e3a31743a resolvectl: fix indentation of hexdump'ed packets
 - 6576058fab journald: add configuration option for enabling/disabling audit during journald startup
 - 52c5909f15 man/systemd-service: clarify env variable expansion
 - ac08df59c0 resolved: fix typo in an unused function and add comment
2020-06-14 14:26:39 +02:00

314 lines
13 KiB
Diff

From 9262f52b0e30cf8c39d9f7684a8c0e8fd4887cd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Mon, 26 Feb 2018 14:25:57 +0000
Subject: [PATCH 12/18] Install default configuration into $out/share/factory
By default systemd should read all its configuration from /etc. Therefor
we rely on -Dsysconfdir=/etc in meson as default value. Unfortunately
this would also lead to installation of systemd's own configuration
files to `/etc` whereas we are limited to /nix/store. To counter that
this commit introduces two new configuration variables `factoryconfdir`
and `factorypkgconfdir` to install systemd's own configuration into nix
store again, while having executables looking up files in /etc.
---
hwdb.d/meson.build | 2 +-
meson.build | 11 +++++++----
network/meson.build | 2 +-
src/core/meson.build | 10 +++++-----
src/coredump/meson.build | 2 +-
src/journal-remote/meson.build | 4 ++--
src/journal/meson.build | 2 +-
src/kernel-install/meson.build | 2 +-
src/login/meson.build | 2 +-
src/network/meson.build | 2 +-
src/pstore/meson.build | 2 +-
src/resolve/meson.build | 2 +-
src/timesync/meson.build | 2 +-
src/udev/meson.build | 4 ++--
sysctl.d/meson.build | 2 +-
tmpfiles.d/meson.build | 2 +-
units/meson.build | 2 +-
17 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
index 4df6dabf89..02d8d69095 100644
--- a/hwdb.d/meson.build
+++ b/hwdb.d/meson.build
@@ -27,7 +27,7 @@ if conf.get('ENABLE_HWDB') == 1
install_dir : udevhwdbdir)
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'udev/hwdb.d')))
meson.add_install_script('sh', '-c',
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
diff --git a/meson.build b/meson.build
index 62eba4186c..b0b2edbb5a 100644
--- a/meson.build
+++ b/meson.build
@@ -154,6 +154,9 @@ udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d')
catalogdir = join_paths(prefixdir, 'lib/systemd/catalog')
kernelinstalldir = join_paths(prefixdir, 'lib/kernel/install.d')
factorydir = join_paths(datadir, 'factory')
+factoryconfdir = join_paths(datadir, 'factory/etc')
+factorypkgconfdir = join_paths(datadir, 'factory/etc/systemd')
+factoryxinitrcdir = join_paths(datadir, 'factory/etc/X11/xinit/xinitrc.d')
bootlibdir = join_paths(prefixdir, 'lib/systemd/boot/efi')
testsdir = join_paths(prefixdir, 'lib/systemd/tests')
systemdstatedir = join_paths(localstatedir, 'lib/systemd')
@@ -2511,7 +2514,7 @@ if conf.get('ENABLE_BINFMT') == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(binfmtdir))
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'binfmt.d')))
endif
if conf.get('ENABLE_REPART') == 1
@@ -2612,7 +2615,7 @@ executable('systemd-sleep',
install_dir : rootlibexecdir)
install_data('src/sleep/sleep.conf',
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
exe = executable('systemd-sysctl',
'src/sysctl/sysctl.c',
@@ -2924,7 +2927,7 @@ if conf.get('HAVE_KMOD') == 1
meson.add_install_script('sh', '-c',
mkdir_p.format(modulesloaddir))
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'modules-load.d')))
endif
exe = executable('systemd-nspawn',
@@ -3167,7 +3170,7 @@ install_subdir('factory/etc',
install_dir : factorydir)
install_data('xorg/50-systemd-user.sh',
- install_dir : xinitrcdir)
+ install_dir : factoryxinitrcdir)
install_data('modprobe.d/systemd.conf',
install_dir : modprobedir)
install_data('LICENSE.GPL2',
diff --git a/network/meson.build b/network/meson.build
index 544dcf4387..1828c50863 100644
--- a/network/meson.build
+++ b/network/meson.build
@@ -10,7 +10,7 @@ if conf.get('ENABLE_NETWORKD') == 1
install_dir : networkdir)
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
+ mkdir_p.format(join_paths(factoryconfdir, 'systemd/network')))
endif
install_data('99-default.link',
diff --git a/src/core/meson.build b/src/core/meson.build
index 3586838f59..02ddf1a123 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -179,8 +179,8 @@ libcore = static_library(
systemd_sources = files('main.c')
in_files = [['macros.systemd', rpmmacrosdir],
- ['system.conf', pkgsysconfdir],
- ['user.conf', pkgsysconfdir],
+ ['system.conf', factorypkgconfdir],
+ ['user.conf', factorypkgconfdir],
['systemd.pc', pkgconfigdatadir],
['triggers.systemd', '']]
@@ -212,6 +212,6 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'system')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'user')))
+meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(factorypkgconfdir, 'xdg/systemd')))
diff --git a/src/coredump/meson.build b/src/coredump/meson.build
index 7fa5942697..34c865dfa0 100644
--- a/src/coredump/meson.build
+++ b/src/coredump/meson.build
@@ -15,7 +15,7 @@ coredumpctl_sources = files('coredumpctl.c')
if conf.get('ENABLE_COREDUMP') == 1
install_data('coredump.conf',
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
endif
tests += [
diff --git a/src/journal-remote/meson.build b/src/journal-remote/meson.build
index 87b8ba6495..daff8ec967 100644
--- a/src/journal-remote/meson.build
+++ b/src/journal-remote/meson.build
@@ -49,7 +49,7 @@ if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
output : 'journal-upload.conf',
configuration : substs)
install_data(journal_upload_conf,
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
endif
if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
@@ -58,7 +58,7 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
output : 'journal-remote.conf',
configuration : substs)
install_data(journal_remote_conf,
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
install_data('browse.html',
install_dir : join_paths(pkgdatadir, 'gatewayd'))
diff --git a/src/journal/meson.build b/src/journal/meson.build
index 5796f77cac..75d975c260 100644
--- a/src/journal/meson.build
+++ b/src/journal/meson.build
@@ -109,7 +109,7 @@ if conf.get('HAVE_QRENCODE') == 1
endif
install_data('journald.conf',
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
if get_option('create-log-dirs')
meson.add_install_script(
diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build
index 261c3aaae4..dbc5e23513 100644
--- a/src/kernel-install/meson.build
+++ b/src/kernel-install/meson.build
@@ -11,4 +11,4 @@ install_data('00-entry-directory.install',
install_dir : kernelinstalldir)
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'kernel/install.d')))
diff --git a/src/login/meson.build b/src/login/meson.build
index 0a7d3d5440..ff90149c1c 100644
--- a/src/login/meson.build
+++ b/src/login/meson.build
@@ -75,7 +75,7 @@ if conf.get('ENABLE_LOGIND') == 1
output : 'logind.conf',
configuration : substs)
install_data(logind_conf,
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
install_data('org.freedesktop.login1.conf',
install_dir : dbuspolicydir)
diff --git a/src/network/meson.build b/src/network/meson.build
index c1c02cfda1..1bfa79a03b 100644
--- a/src/network/meson.build
+++ b/src/network/meson.build
@@ -201,7 +201,7 @@ if conf.get('ENABLE_NETWORKD') == 1
endif
install_data('networkd.conf',
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
fuzzers += [
[['src/network/fuzz-netdev-parser.c',
diff --git a/src/pstore/meson.build b/src/pstore/meson.build
index adbac24b54..e9dc88dfa2 100644
--- a/src/pstore/meson.build
+++ b/src/pstore/meson.build
@@ -6,5 +6,5 @@ systemd_pstore_sources = files('''
if conf.get('ENABLE_PSTORE') == 1
install_data('pstore.conf',
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
endif
diff --git a/src/resolve/meson.build b/src/resolve/meson.build
index c4d8d4e5d9..f550c289a5 100644
--- a/src/resolve/meson.build
+++ b/src/resolve/meson.build
@@ -170,7 +170,7 @@ if conf.get('ENABLE_RESOLVE') == 1
output : 'resolved.conf',
configuration : substs)
install_data(resolved_conf,
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
install_data('resolv.conf',
install_dir : rootlibexecdir)
diff --git a/src/timesync/meson.build b/src/timesync/meson.build
index e5c118c8db..19235df9ca 100644
--- a/src/timesync/meson.build
+++ b/src/timesync/meson.build
@@ -27,7 +27,7 @@ if conf.get('ENABLE_TIMESYNCD') == 1
output : 'timesyncd.conf',
configuration : substs)
install_data(timesyncd_conf,
- install_dir : pkgsysconfdir)
+ install_dir : factorypkgconfdir)
install_data('org.freedesktop.timesync1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.timesync1.service',
diff --git a/src/udev/meson.build b/src/udev/meson.build
index 173b10be50..82638cf5a9 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -187,7 +187,7 @@ foreach prog : [['ata_id/ata_id.c'],
endforeach
install_data('udev.conf',
- install_dir : join_paths(sysconfdir, 'udev'))
+ install_dir : join_paths(factoryconfdir, 'udev'))
configure_file(
input : 'udev.pc.in',
@@ -196,7 +196,7 @@ configure_file(
install_dir : pkgconfigdatadir == 'no' ? '' : pkgconfigdatadir)
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'udev/rules.d')))
fuzzers += [
[['src/udev/net/fuzz-link-parser.c',
diff --git a/sysctl.d/meson.build b/sysctl.d/meson.build
index 3f072e3db7..bd9f843eba 100644
--- a/sysctl.d/meson.build
+++ b/sysctl.d/meson.build
@@ -27,4 +27,4 @@ foreach file : in_files
endforeach
meson.add_install_script('sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'sysctl.d')))
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index e77f46d06b..04d2ef621d 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -57,5 +57,5 @@ endforeach
if enable_tmpfiles
meson.add_install_script(
'sh', '-c',
- mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
+ mkdir_p.format(join_paths(factoryconfdir, 'tmpfiles.d')))
endif
diff --git a/units/meson.build b/units/meson.build
index ea91f0cc9e..8622054ca5 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -323,7 +323,7 @@ install_data('user-.slice.d/10-defaults.conf',
meson.add_install_script(meson_make_symlink,
join_paths(pkgsysconfdir, 'user'),
- join_paths(sysconfdir, 'xdg/systemd/user'))
+ join_paths(factorypkgconfdir, 'xdg/systemd/user'))
meson.add_install_script(meson_make_symlink,
join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
--
2.26.2