Files
udev/source-files/artix-standalone-install.patch
T

476 lines
18 KiB
Diff

From 1b6f23440c6f3e5888cce8874a388bad5a002a7c Mon Sep 17 00:00:00 2001
From: artoo <[email protected]>
Date: Mon, 10 Nov 2025 15:19:15 +0100
Subject: [PATCH 1/1] artix standalone install
---
factory/templates/meson.build | 2 ++
meson.build | 22 +++++++++++++----
rules.d/meson.build | 3 +--
shell-completion/bash/meson.build | 39 ++-----------------------------
shell-completion/zsh/meson.build | 31 ++----------------------
src/core/meson.build | 5 ----
src/hwdb/meson.build | 2 +-
src/libudev/meson.build | 9 ++++++-
src/sysusers/meson.build | 3 ++-
src/tmpfiles/meson.build | 3 ++-
src/udev/meson.build | 8 +++----
src/udev/udevd.c | 2 +-
sysusers.d/meson.build | 4 ++--
test/meson.build | 6 ++---
tmpfiles.d/legacy.conf.in | 3 ---
tmpfiles.d/meson.build | 9 +++----
16 files changed, 51 insertions(+), 100 deletions(-)
diff --git a/factory/templates/meson.build b/factory/templates/meson.build
index 3db9f255b9..e54c0c3f3b 100644
--- a/factory/templates/meson.build
+++ b/factory/templates/meson.build
@@ -7,6 +7,7 @@ custom_target(
output : 'locale.conf',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : true,
+ install_tag : 'etmpfiles',
install_dir : factory_etc_dir)
custom_target(
@@ -14,4 +15,5 @@ custom_target(
output : 'vconsole.conf',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : true,
+ install_tag : 'etmpfiles',
install_dir : factory_etc_dir)
diff --git a/meson.build b/meson.build
index 238b935372..2014e1e8ee 100644
--- a/meson.build
+++ b/meson.build
@@ -132,7 +132,7 @@ includedir = prefixdir / get_option('includedir')
datadir = prefixdir / get_option('datadir')
localstatedir = '/' / get_option('localstatedir')
-libexecdir = prefixdir / 'lib/systemd'
+libexecdir = bindir
libexecdir_to_bin = '../../bin/'
pkglibdir = libdir / 'systemd'
@@ -2769,7 +2769,6 @@ subdir('shell-completion/zsh')
subdir('sysctl.d')
subdir('sysusers.d')
subdir('tmpfiles.d')
-subdir('units')
install_subdir('factory/etc',
install_dir : factorydir)
@@ -2791,6 +2790,21 @@ install_data('LICENSE.GPL2',
install_subdir('LICENSES',
install_dir : docdir)
+install_data('LICENSE.GPL2',
+ 'LICENSE.LGPL2.1',
+ install_tag : 'udev',
+ install_dir : datadir / 'doc/udev')
+
+install_data('LICENSE.GPL2',
+ 'LICENSE.LGPL2.1',
+ install_tag : 'etmpfiles',
+ install_dir : datadir / 'doc/etmpfiles')
+
+install_data('LICENSE.GPL2',
+ 'LICENSE.LGPL2.1',
+ install_tag : 'esysusers',
+ install_dir : datadir / 'doc/esysusers')
+
install_emptydir(systemdstatedir)
#####################################################################
@@ -2946,10 +2960,10 @@ udev_targets = []
foreach bin : udev_binaries
udev_targets += executables_by_name.get(bin, [])
endforeach
-alias_target('udev', buildable_rules, udev_targets, udev_units)
+alias_target('udev', buildable_rules, udev_targets)
if conf.get('ENABLE_HWDB') == 1
- alias_target('hwdb', auto_suspend_rules, executables_by_name.get('systemd-hwdb'), hwdb_units)
+ alias_target('hwdb', auto_suspend_rules, executables_by_name.get('udev-hwdb'))
endif
alt_time_epoch = run_command('date', '-Is', '-u', '-d', '@@0@'.format(time_epoch),
diff --git a/rules.d/meson.build b/rules.d/meson.build
index 933a84859a..8e190a834a 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -2,7 +2,7 @@
install_data(
'README',
- install_dir : udevrulesdir)
+ install_dir : udevrulesdir, install_tag : 'udev')
rules = [
[files('60-autosuspend.rules',
@@ -63,7 +63,6 @@ rules_in = [
['50-udev-default.rules'],
['60-persistent-storage.rules'],
['64-btrfs.rules'],
- ['99-systemd.rules'],
['70-uaccess.rules', conf.get('ENABLE_LOGIND') == 1 and conf.get('HAVE_ACL') == 1],
['71-seat.rules', conf.get('ENABLE_LOGIND') == 1],
diff --git a/shell-completion/bash/meson.build b/shell-completion/bash/meson.build
index 6a547a5e69..67ef541aae 100644
--- a/shell-completion/bash/meson.build
+++ b/shell-completion/bash/meson.build
@@ -17,47 +17,12 @@ custom_target(
install : bashcompletiondir != 'no',
install_dir : bashcompletiondir)
-items = [['busctl', ''],
- ['journalctl', ''],
- ['systemd-analyze', ''],
- ['systemd-cat', ''],
- ['systemd-cgls', ''],
- ['systemd-cgtop', ''],
- ['systemd-creds', ''],
- ['systemd-delta', ''],
- ['systemd-detect-virt', ''],
- ['systemd-id128', ''],
- ['systemd-nspawn', 'ENABLE_NSPAWN'],
- ['systemd-path', ''],
- ['systemd-run', ''],
- ['systemd-vpick', ''],
- ['udevadm', ''],
- ['bootctl', ''],
- ['run0', ''],
- ['coredumpctl', 'ENABLE_COREDUMP'],
- ['homectl', 'ENABLE_HOMED'],
- ['hostnamectl', 'ENABLE_HOSTNAMED'],
- ['importctl', 'ENABLE_IMPORTD'],
- ['kernel-install', 'ENABLE_KERNEL_INSTALL'],
- ['localectl', 'ENABLE_LOCALED'],
- ['loginctl', 'ENABLE_LOGIND'],
- ['machinectl', 'ENABLE_MACHINED'],
- ['networkctl', 'ENABLE_NETWORKD'],
- ['oomctl', 'ENABLE_OOMD'],
- ['portablectl', 'ENABLE_PORTABLED'],
- ['resolvectl', 'ENABLE_RESOLVE'],
- ['systemd-cryptenroll', 'HAVE_LIBCRYPTSETUP'],
- ['systemd-confext', 'ENABLE_SYSEXT'],
- ['systemd-dissect', 'HAVE_BLKID'],
- ['systemd-resolve', 'ENABLE_RESOLVE'],
- ['systemd-sysext', 'ENABLE_SYSEXT'],
- ['systemd-vmspawn', 'ENABLE_VMSPAWN'],
- ['timedatectl', 'ENABLE_TIMEDATED'],
- ['userdbctl', 'ENABLE_USERDB']]
+items = [['udevadm', '']]
foreach item : items
if bashcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
install_data(item[0],
+ install_tag : 'udev',
install_dir : bashcompletiondir)
endif
endforeach
diff --git a/shell-completion/zsh/meson.build b/shell-completion/zsh/meson.build
index 4de28388ce..63ad624af5 100644
--- a/shell-completion/zsh/meson.build
+++ b/shell-completion/zsh/meson.build
@@ -12,39 +12,12 @@ custom_target(
install : zshcompletiondir != 'no',
install_dir : zshcompletiondir)
-items = [['_busctl', ''],
- ['_journalctl', ''],
- ['_systemd-analyze', ''],
- ['_systemd-delta', ''],
- ['_systemd-nspawn', ''],
- ['_systemd', ''],
- ['_systemd-path', ''],
- ['_systemd-run', ''],
- ['_run0', ''],
- ['_udevadm', ''],
- ['_varlinkctl', ''],
- ['_kernel-install', 'ENABLE_KERNEL_INSTALL'],
- ['_sd_bus_address', ''],
- ['_sd_hosts_or_user_at_host', ''],
- ['_sd_outputmodes', ''],
- ['_sd_unit_files', ''],
- ['_sd_machines', ''],
- ['_bootctl', ''],
- ['_coredumpctl', 'ENABLE_COREDUMP'],
- ['_hostnamectl', 'ENABLE_HOSTNAMED'],
- ['_localectl', 'ENABLE_LOCALED'],
- ['_loginctl', 'ENABLE_LOGIND'],
- ['_machinectl', 'ENABLE_MACHINED'],
- ['_networkctl', 'ENABLE_NETWORKD'],
- ['_oomctl', 'ENABLE_OOMD'],
- ['_systemd-inhibit', 'ENABLE_LOGIND'],
- ['_resolvectl', 'ENABLE_RESOLVE'],
- ['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
- ['_timedatectl', 'ENABLE_TIMEDATED']]
+items = [['_udevadm', '']]
foreach item : items
if zshcompletiondir != 'no' and (item[1] == '' or conf.get(item[1]) == 1)
install_data(item[0],
+ install_tag : 'udev',
install_dir : zshcompletiondir)
endif
endforeach
diff --git a/src/core/meson.build b/src/core/meson.build
index 8bb0054c14..7ef92ca00b 100644
--- a/src/core/meson.build
+++ b/src/core/meson.build
@@ -288,11 +288,6 @@ if install_sysconfdir
install_dir : sysconfdir / 'xdg/systemd')
endif
-assert(fs.parent(sbindir) / 'lib/systemd' == libexecdir)
-install_symlink('init',
- pointing_to : '../lib/systemd/systemd',
- install_dir : sbindir)
-
############################################################
core_test_template = test_template + {
diff --git a/src/hwdb/meson.build b/src/hwdb/meson.build
index 57ace3ad44..96c0b185d0 100644
--- a/src/hwdb/meson.build
+++ b/src/hwdb/meson.build
@@ -2,7 +2,7 @@
executables += [
executable_template + {
- 'name' : 'systemd-hwdb',
+ 'name' : 'udev-hwdb',
'public' : true,
'conditions' : ['ENABLE_HWDB'],
'sources' : files('hwdb.c'),
diff --git a/src/libudev/meson.build b/src/libudev/meson.build
index eb9dda79ae..e45d25c71b 100644
--- a/src/libudev/meson.build
+++ b/src/libudev/meson.build
@@ -25,6 +25,13 @@ libudev_sym_path = libudev_dir_path / 'libudev.sym'
install_headers('libudev.h')
libudev_h_path = libudev_dir_path / 'libudev.h'
+if have_standalone_binaries
+ install_data(
+ libudev_h_path,
+ install_dir: includedir,
+ install_tag: 'libudev-devel')
+endif
+
libudev_basic = static_library(
'udev-basic',
libudev_sources,
@@ -42,5 +49,5 @@ libudev_pc = custom_target(
output : 'libudev.pc',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : pkgconfiglibdir != 'no',
- install_tag : 'devel',
+ install_tag : 'libudev-devel',
install_dir : pkgconfiglibdir)
diff --git a/src/sysusers/meson.build b/src/sysusers/meson.build
index e2e82889e7..2c184f8350 100644
--- a/src/sysusers/meson.build
+++ b/src/sysusers/meson.build
@@ -12,10 +12,11 @@ executables += [
'dependencies' : libaudit,
},
executable_template + {
- 'name' : 'systemd-sysusers.standalone',
+ 'name' : 'esysusers',
'public' : true,
'sources' : files('sysusers.c'),
'c_args' : '-DSTANDALONE',
+ 'install_tag' : 'esysusers',
'link_with' : [
libc_wrapper_static,
libbasic_static,
diff --git a/src/tmpfiles/meson.build b/src/tmpfiles/meson.build
index a973d16f5c..195b0f7456 100644
--- a/src/tmpfiles/meson.build
+++ b/src/tmpfiles/meson.build
@@ -20,10 +20,11 @@ executables += [
'dependencies' : libacl,
},
executable_template + {
- 'name' : 'systemd-tmpfiles.standalone',
+ 'name' : 'etmpfiles',
'public' : true,
'sources' : systemd_tmpfiles_sources + systemd_tmpfiles_extract_sources,
'c_args' : '-DSTANDALONE',
+ 'install_tag' : 'etmpfiles',
'link_with' : [
libc_wrapper_static,
libbasic_static,
diff --git a/src/udev/meson.build b/src/udev/meson.build
index 908bec8b1d..d6fa6529d8 100644
--- a/src/udev/meson.build
+++ b/src/udev/meson.build
@@ -257,9 +257,9 @@ executables += [
},
]
-install_symlink('systemd-udevd',
- pointing_to : libexecdir_to_bin + 'udevadm',
- install_dir : libexecdir,
+install_symlink('udevd',
+ pointing_to : bindir / 'udevadm',
+ install_dir : bindir,
install_tag : 'udev')
if install_sysconfdir_samples
@@ -276,7 +276,7 @@ udev_pc = custom_target(
output : 'udev.pc',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : pkgconfigdatadir != 'no',
- install_tag : 'devel',
+ install_tag : 'udev-devel',
install_dir : pkgconfigdatadir)
if install_sysconfdir
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index fd16654127..5cbbd8a8f5 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -55,7 +55,7 @@ int run_udevd(int argc, char *argv[]) {
if (arg_daemonize) {
pid_t pid;
- log_info("Starting systemd-udevd version " GIT_VERSION);
+ log_info("Starting udevd version " GIT_VERSION);
/* connect /dev/null to stdin, stdout, stderr */
if (log_get_max_level() < LOG_DEBUG) {
diff --git a/sysusers.d/meson.build b/sysusers.d/meson.build
index 84fadfe3f7..22dfd09c05 100644
--- a/sysusers.d/meson.build
+++ b/sysusers.d/meson.build
@@ -7,12 +7,11 @@ files = [['README', true],
foreach tuple : files
if enable_sysusers and tuple[1]
- install_data(tuple[0], install_dir : sysusersdir)
+ install_data(tuple[0], install_dir : sysusersdir, install_tag : 'esysusers')
endif
endforeach
in_files = [['basic.conf', true],
- ['systemd-journal.conf', true],
['systemd-network.conf', conf.get('ENABLE_NETWORKD') == 1],
['systemd-resolve.conf', conf.get('ENABLE_RESOLVE') == 1],
['systemd-timesync.conf', conf.get('ENABLE_TIMESYNCD') == 1]]
@@ -24,5 +23,6 @@ foreach tuple : in_files
output: file,
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : enable_sysusers and tuple[1],
+ install_tag : 'esysusers',
install_dir : sysusersdir)
endforeach
diff --git a/test/meson.build b/test/meson.build
index 4cdd2f4303..7af045afb2 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -16,7 +16,7 @@ if conf.get('ENABLE_SYSUSERS') == 1
suite : 'sysusers')
if have_standalone_binaries
- exe = executables_by_name.get('systemd-sysusers.standalone')
+ exe = executables_by_name.get('esysusers')
test('test-sysusers.standalone',
test_sysusers_sh,
# https://github.com/mesonbuild/meson/issues/2681
@@ -38,7 +38,7 @@ endif
############################################################
if want_tests != 'false' and conf.get('ENABLE_HWDB') == 1
- exe = executables_by_name.get('systemd-hwdb')
+ exe = executables_by_name.get('udev-hwdb')
test('hwdb-test',
files('hwdb-test.sh'),
suite : 'dist',
@@ -94,7 +94,7 @@ if want_tests != 'false' and conf.get('ENABLE_TMPFILES') == 1
suite : 'tmpfiles')
if have_standalone_binaries
- exe = executables_by_name.get('systemd-tmpfiles.standalone')
+ exe = executables_by_name.get('etmpfiles')
test('test-systemd-tmpfiles.standalone',
test_systemd_tmpfiles_py,
args : exe.full_path(),
diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
index cdef21fa9b..03798c953e 100644
--- a/tmpfiles.d/legacy.conf.in
+++ b/tmpfiles.d/legacy.conf.in
@@ -13,9 +13,6 @@
d /run/lock 0755 root root -
L /var/lock - - - - ../run/lock
-{% if CREATE_LOG_DIRS %}
-L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
-{% endif %}
{% if HAVE_SYSV_COMPAT %}
# /run/lock/subsys is used for serializing SysV service execution, and
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index 203eb7bb55..0c689008e9 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -6,14 +6,12 @@ endif
files = [['README'],
['home.conf'],
- ['journal-nocow.conf'],
['portables.conf', 'ENABLE_PORTABLED'],
['systemd-network.conf', 'ENABLE_NETWORKD'],
['systemd-nologin.conf', 'HAVE_PAM'],
['systemd-nspawn.conf', 'ENABLE_MACHINED'],
['systemd-pstore.conf', 'ENABLE_PSTORE'],
['systemd-resolve.conf', 'ENABLE_RESOLVE'],
- ['systemd-tmp.conf'],
['tmp.conf'],
['x11.conf'],
['provision.conf'],
@@ -22,7 +20,7 @@ files = [['README'],
foreach f : files
if f.length() == 1 or conf.get(f[1]) == 1
- install_data(f[0], install_dir : tmpfilesdir)
+ install_data(f[0], install_dir : tmpfilesdir, install_tag : 'etmpfiles')
else
message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
.format(f[0], f[1], conf.get(f[1], 0)))
@@ -33,12 +31,10 @@ in_files = [
['20-systemd-shell-extra.conf', 'LINK_SHELL_EXTRA_DROPIN'],
['20-systemd-osc-context.conf', 'LINK_OSC_CONTEXT_DROPIN'],
['20-systemd-ssh-generator.conf', 'ENABLE_SSH_PROXY_CONFIG'],
- ['20-systemd-stub.conf', 'ENABLE_EFI'],
['20-systemd-userdb.conf', 'ENABLE_SSH_USERDB_CONFIG'],
['etc.conf'],
['legacy.conf'],
['static-nodes-permissions.conf'],
- ['systemd.conf'],
['var.conf'],
]
@@ -49,6 +45,7 @@ foreach f : in_files
output: f[0],
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : true,
+ install_tag : 'etmpfiles',
install_dir : tmpfilesdir)
else
message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
@@ -57,5 +54,5 @@ foreach f : in_files
endforeach
if install_sysconfdir
- install_emptydir(sysconfdir / 'tmpfiles.d')
+ install_emptydir(sysconfdir / 'tmpfiles.d', install_tag : 'etmpfiles')
endif
--
2.51.2