2020-09-10 13:12:51 +00:00
|
|
|
From 7dbe84b7c43669dccd90db8ac33c38a70e6b6914 Mon Sep 17 00:00:00 2001
|
2020-01-26 13:56:41 +00:00
|
|
|
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
|
|
|
Date: Mon, 26 Feb 2018 14:25:57 +0000
|
2020-04-29 23:03:18 +00:00
|
|
|
Subject: [PATCH 12/18] Install default configuration into $out/share/factory
|
2020-01-26 13:56:41 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
---
|
2020-04-29 23:03:18 +00:00
|
|
|
hwdb.d/meson.build | 2 +-
|
2020-01-26 13:56:41 +00:00
|
|
|
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 +-
|
2020-04-29 23:03:18 +00:00
|
|
|
units/meson.build | 2 +-
|
|
|
|
17 files changed, 29 insertions(+), 26 deletions(-)
|
2020-01-26 13:56:41 +00:00
|
|
|
|
2020-03-07 22:47:22 +00:00
|
|
|
diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
index 5c77387a26..6404bc01ba 100644
|
2020-03-07 22:47:22 +00:00
|
|
|
--- a/hwdb.d/meson.build
|
|
|
|
+++ b/hwdb.d/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -43,7 +43,7 @@ if conf.get('ENABLE_HWDB') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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')))
|
2020-01-26 15:15:19 +00:00
|
|
|
|
|
|
|
meson.add_install_script('sh', '-c',
|
|
|
|
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
|
2020-01-26 13:56:41 +00:00
|
|
|
diff --git a/meson.build b/meson.build
|
2020-09-10 13:12:51 +00:00
|
|
|
index 2ef9d4d770..ae7acbd769 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/meson.build
|
|
|
|
+++ b/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -163,6 +163,9 @@ udevhwdbdir = join_paths(udevlibexecdir, 'hwdb.d')
|
2020-01-26 13:56:41 +00:00
|
|
|
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')
|
2020-09-10 13:12:51 +00:00
|
|
|
@@ -2653,7 +2656,7 @@ if conf.get('ENABLE_BINFMT') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
|
|
|
|
2020-04-29 23:03:18 +00:00
|
|
|
if conf.get('ENABLE_REPART') == 1
|
2020-09-10 13:12:51 +00:00
|
|
|
@@ -2769,7 +2772,7 @@ executable(
|
2020-07-31 16:02:33 +00:00
|
|
|
install_dir : rootlibexecdir)
|
2020-01-26 13:56:41 +00:00
|
|
|
|
|
|
|
install_data('src/sleep/sleep.conf',
|
|
|
|
- install_dir : pkgsysconfdir)
|
|
|
|
+ install_dir : factorypkgconfdir)
|
|
|
|
|
2020-07-31 16:02:33 +00:00
|
|
|
public_programs += executable(
|
|
|
|
'systemd-sysctl',
|
2020-09-10 13:12:51 +00:00
|
|
|
@@ -3103,7 +3106,7 @@ if conf.get('HAVE_KMOD') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
|
|
|
|
2020-07-31 16:02:33 +00:00
|
|
|
public_programs += executable(
|
2020-09-10 13:12:51 +00:00
|
|
|
@@ -3354,7 +3357,7 @@ install_subdir('factory/etc',
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index 99a650eac3..8105a4e48d 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/network/meson.build
|
|
|
|
+++ b/network/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -11,7 +11,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index fa95108523..60ee0e31c1 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/core/meson.build
|
|
|
|
+++ b/src/core/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -183,8 +183,8 @@ libcore = static_library(
|
2020-01-26 13:56:41 +00:00
|
|
|
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', '']]
|
|
|
|
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -216,6 +216,6 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index 9ae342dfba..65df666337 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/kernel-install/meson.build
|
|
|
|
+++ b/src/kernel-install/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -14,5 +14,5 @@ if want_kernel_install
|
|
|
|
install_dir : kernelinstalldir)
|
2020-01-26 13:56:41 +00:00
|
|
|
|
2020-07-31 16:02:33 +00:00
|
|
|
meson.add_install_script('sh', '-c',
|
|
|
|
- mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
|
|
|
|
+ mkdir_p.format(join_paths(factoryconfdir, 'kernel/install.d')))
|
|
|
|
endif
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index b3a88d9910..be56d1e9d7 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/network/meson.build
|
|
|
|
+++ b/src/network/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -229,7 +229,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index 92b67b6333..ac5b9a0b0a 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/resolve/meson.build
|
|
|
|
+++ b/src/resolve/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -168,7 +168,7 @@ if conf.get('ENABLE_RESOLVE') == 1
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index aa23b07090..ad004d803a 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/udev/meson.build
|
|
|
|
+++ b/src/udev/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -186,7 +186,7 @@ foreach prog : [['ata_id/ata_id.c'],
|
2020-01-26 13:56:41 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
install_data('udev.conf',
|
|
|
|
- install_dir : join_paths(sysconfdir, 'udev'))
|
|
|
|
+ install_dir : join_paths(factoryconfdir, 'udev'))
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
input : 'udev.pc.in',
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -195,7 +195,7 @@ configure_file(
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-07-31 16:02:33 +00:00
|
|
|
index 0a9582d8b9..3c56ca7d83 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/tmpfiles.d/meson.build
|
|
|
|
+++ b/tmpfiles.d/meson.build
|
2020-07-31 16:02:33 +00:00
|
|
|
@@ -58,5 +58,5 @@ endforeach
|
2020-01-26 13:56:41 +00:00
|
|
|
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
|
2020-09-10 13:12:51 +00:00
|
|
|
index 275daad3f4..491abd8eef 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/units/meson.build
|
|
|
|
+++ b/units/meson.build
|
2020-09-10 13:12:51 +00:00
|
|
|
@@ -324,7 +324,7 @@ install_data('user-.slice.d/10-defaults.conf',
|
2020-01-26 13:56:41 +00:00
|
|
|
|
|
|
|
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'))
|
|
|
|
--
|
2020-09-10 13:12:51 +00:00
|
|
|
2.28.0
|
2020-01-26 13:56:41 +00:00
|
|
|
|