mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
Merge pull request #5704 from keszybz/meson
meson: build systemd using meson
This commit is contained in:
commit
d5d5e06086
@ -20,4 +20,8 @@
|
||||
(eval . (c-set-offset 'arglist-intro '++))
|
||||
(eval . (c-set-offset 'arglist-close 0))))
|
||||
(nxml-mode . ((nxml-child-indent . 2)
|
||||
(fill-column . 119))))
|
||||
(fill-column . 119)))
|
||||
(meson-mode . ((meson-indent-basic . 8)))
|
||||
(sh-mode . ((sh-basic-offset . 8)
|
||||
(sh-indentation . 8)))
|
||||
(awk-mode . ((c-basic-offset . 8))))
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,7 +28,7 @@
|
||||
/TAGS
|
||||
/ata_id
|
||||
/bootctl
|
||||
/build-aux
|
||||
/build*
|
||||
/busctl
|
||||
/cdrom_id
|
||||
/collect
|
||||
|
22
Makefile.am
22
Makefile.am
@ -3077,8 +3077,8 @@ CLEANFILES += $(stub_objects) $(stub_solib) $(stub)
|
||||
# ------------------------------------------------------------------------------
|
||||
CLEANFILES += test-efi-disk.img
|
||||
|
||||
test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
|
||||
$(AM_V_GEN)test/test-efi-create-disk.sh
|
||||
test-efi-disk.img: $(systemd_boot) $(stub) test/splash.bmp test/test-efi-create-disk.sh
|
||||
$(AM_V_GEN)test/test-efi-create-disk.sh $@ $(systemd_boot) $(stub) test/splash.bmp
|
||||
|
||||
test-efi: test-efi-disk.img
|
||||
$(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img
|
||||
@ -4556,10 +4556,8 @@ libsystemd_journal_internal_la_SOURCES += \
|
||||
libsystemd_journal_internal_la_LIBADD += \
|
||||
$(GCRYPT_LIBS)
|
||||
|
||||
# fsprg.c is a drop-in file using void pointer arithmetic
|
||||
libsystemd_journal_internal_la_CFLAGS += \
|
||||
$(GCRYPT_CFLAGS) \
|
||||
-Wno-pointer-arith
|
||||
$(GCRYPT_CFLAGS)
|
||||
endif
|
||||
|
||||
noinst_LTLIBRARIES += \
|
||||
@ -6607,18 +6605,8 @@ dist-check-includes: $(public_headers)
|
||||
done; exit $$res
|
||||
|
||||
.PHONY: hwdb-update
|
||||
hwdb-update:
|
||||
( cd $(top_srcdir)/hwdb && \
|
||||
wget -O usb.ids 'http://www.linux-usb.org/usb.ids' && \
|
||||
wget -O pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids' && \
|
||||
wget -O ma-large.txt 'http://standards.ieee.org/develop/regauth/oui/oui.txt' && \
|
||||
wget -O ma-medium.txt 'http://standards.ieee.org/develop/regauth/oui28/mam.txt' && \
|
||||
wget -O ma-small.txt 'http://standards.ieee.org/develop/regauth/oui36/oui36.txt' && \
|
||||
wget -O pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export' && \
|
||||
wget -O acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export' && \
|
||||
./ids-update.pl && \
|
||||
./acpi-update.py > 20-acpi-vendor.hwdb.base && \
|
||||
patch -p0 -o- 20-acpi-vendor.hwdb.base < 20-acpi-vendor.hwdb.patch > 20-acpi-vendor.hwdb )
|
||||
hwdb-update: tools/meson-hwdb-update.sh
|
||||
$< $(top_srcdir)/hwdb
|
||||
|
||||
.PHONY: built-sources
|
||||
built-sources: $(BUILT_SOURCES)
|
||||
|
40
README
40
README
@ -156,21 +156,47 @@ REQUIREMENTS:
|
||||
dracut (optional)
|
||||
PolicyKit (optional)
|
||||
|
||||
When building from git, the following tools are needed:
|
||||
Two build systems are supported: meson + ninja-build and autools + make.
|
||||
|
||||
The following tools are needed with both systems:
|
||||
|
||||
pkg-config
|
||||
docbook-xsl
|
||||
xsltproc
|
||||
gperf >= 3.1
|
||||
docbook-xsl (optional, required for documentation)
|
||||
xsltproc (optional, required for documentation)
|
||||
python-lxml (optional, required to build the indices)
|
||||
|
||||
When building with meson, python and ninja-build are required.
|
||||
|
||||
To build in directory build/:
|
||||
meson build/ && ninja -C build
|
||||
|
||||
Any configuration options can be specfied as -Darg=value... arguments
|
||||
to meson. After the build directory is initially configured, meson will
|
||||
refuse to run again, and options must be changed with:
|
||||
mesonconf -Darg=value...
|
||||
mesonconf without any arguments will print out available options and
|
||||
their current values.
|
||||
|
||||
Useful commands:
|
||||
ninja -v some/target
|
||||
ninja test
|
||||
sudo ninja install
|
||||
DESTDIR=... ninja install
|
||||
|
||||
When building with autotools, the following tools are needed:
|
||||
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
intltool
|
||||
gperf >= 3.1
|
||||
python (optional)
|
||||
python-lxml (optional, but required to build the indices)
|
||||
|
||||
The build system is initialized with ./autogen.sh. A tar ball
|
||||
can be created with:
|
||||
The build system is initialized with ./autogen.sh and the usual
|
||||
./configure && make
|
||||
should be used.
|
||||
|
||||
A tar ball can be created with:
|
||||
git archive --format=tar --prefix=systemd-222/ v222 | xz > systemd-222.tar.xz
|
||||
|
||||
When systemd-hostnamed is used, it is strongly recommended to
|
||||
|
28
catalog/meson.build
Normal file
28
catalog/meson.build
Normal file
@ -0,0 +1,28 @@
|
||||
in_files = '''
|
||||
systemd.bg.catalog
|
||||
systemd.be.catalog
|
||||
systemd.be@latin.catalog
|
||||
systemd.fr.catalog
|
||||
systemd.it.catalog
|
||||
systemd.pl.catalog
|
||||
systemd.pt_BR.catalog
|
||||
systemd.ru.catalog
|
||||
systemd.zh_CN.catalog
|
||||
systemd.zh_TW.catalog
|
||||
systemd.catalog
|
||||
'''.split()
|
||||
|
||||
support_url = get_option('support-url')
|
||||
support_sed = 's~%SUPPORT_URL%~@0@~'.format(support_url)
|
||||
build_catalog_dir = meson.current_build_dir()
|
||||
|
||||
foreach file : in_files
|
||||
custom_target(
|
||||
file,
|
||||
input : file + '.in',
|
||||
output: file,
|
||||
command : [sed, support_sed, '@INPUT@'],
|
||||
capture : true,
|
||||
install : true,
|
||||
install_dir : catalogdir)
|
||||
endforeach
|
6
docs/sysvinit/meson.build
Normal file
6
docs/sysvinit/meson.build
Normal file
@ -0,0 +1,6 @@
|
||||
file = configure_file(
|
||||
input : 'README.in',
|
||||
output : 'README',
|
||||
configuration : substs)
|
||||
install_data(file,
|
||||
install_dir : sysvinit_path)
|
6
docs/var-log/meson.build
Normal file
6
docs/var-log/meson.build
Normal file
@ -0,0 +1,6 @@
|
||||
file = configure_file(
|
||||
input : 'README.in',
|
||||
output : 'README',
|
||||
configuration : substs)
|
||||
install_data(file,
|
||||
install_dir : varlogdir)
|
42
hwdb/meson.build
Normal file
42
hwdb/meson.build
Normal file
@ -0,0 +1,42 @@
|
||||
hwdb_files = files('''
|
||||
20-pci-vendor-model.hwdb
|
||||
20-pci-classes.hwdb
|
||||
20-usb-vendor-model.hwdb
|
||||
20-usb-classes.hwdb
|
||||
20-sdio-vendor-model.hwdb
|
||||
20-sdio-classes.hwdb
|
||||
20-bluetooth-vendor-product.hwdb
|
||||
20-acpi-vendor.hwdb
|
||||
20-OUI.hwdb
|
||||
20-net-ifname.hwdb
|
||||
60-evdev.hwdb
|
||||
60-keyboard.hwdb
|
||||
60-sensor.hwdb
|
||||
70-mouse.hwdb
|
||||
70-pointingstick.hwdb
|
||||
70-touchpad.hwdb
|
||||
'''.split())
|
||||
|
||||
if conf.get('ENABLE_HWDB', 0) == 1
|
||||
install_data(hwdb_files,
|
||||
install_dir : udevhwdbdir)
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
'test -n "$DESTDIR" || @0@/systemd-hwdb update'
|
||||
.format(rootbindir))
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
parse_hwdb_py = find_program('parse_hwdb.py')
|
||||
test('parse-hwdb',
|
||||
parse_hwdb_py)
|
||||
|
||||
############################################################
|
||||
|
||||
run_target(
|
||||
'update',
|
||||
command : [hwdb_update_sh, meson.current_source_dir()])
|
7
man/custom-entities.ent.in
Normal file
7
man/custom-entities.ent.in
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!ENTITY MOUNT_PATH @MOUNT_PATH@>
|
||||
<!ENTITY UMOUNT_PATH @UMOUNT_PATH@>
|
||||
<!ENTITY systemgeneratordir @SYSTEM_GENERATOR_PATH@>
|
||||
<!ENTITY usergeneratordir @USER_GENERATOR_PATH@>
|
||||
<!ENTITY systemenvgeneratordir @SYSTEM_ENV_GENERATOR_PATH@>
|
||||
<!ENTITY userenvgeneratordir @USER_ENV_GENERATOR_PATH@>
|
168
man/meson.build
Normal file
168
man/meson.build
Normal file
@ -0,0 +1,168 @@
|
||||
# This is lame, I know, but meson has no other include mechanism
|
||||
subdir('rules')
|
||||
|
||||
want_man = get_option('man')
|
||||
want_html = get_option('html')
|
||||
xsltproc = find_program('xsltproc',
|
||||
required : want_man == 'true' or want_html == 'true')
|
||||
want_man = want_man != 'false' and xsltproc.found()
|
||||
want_html = want_html != 'false' and xsltproc.found()
|
||||
|
||||
xsltproc_flags = [
|
||||
'--nonet',
|
||||
'--xinclude',
|
||||
'--stringparam', 'man.output.quietly', '1',
|
||||
'--stringparam', 'funcsynopsis.style', 'ansi',
|
||||
'--stringparam', 'man.authors.section.enabled', '0',
|
||||
'--stringparam', 'man.copyright.section.enabled', '0',
|
||||
'--stringparam', 'systemd.version', '@0@'.format(meson.project_version()),
|
||||
'--path',
|
||||
'@0@:@1@'.format(meson.current_build_dir(), meson.current_source_dir())]
|
||||
|
||||
custom_man_xsl = files('custom-man.xsl')
|
||||
custom_html_xsl = files('custom-html.xsl')
|
||||
xslt_cmd = [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags
|
||||
|
||||
custom_entities_ent = configure_file(
|
||||
input : 'custom-entities.ent.in',
|
||||
output : 'custom-entities.ent',
|
||||
configuration : conf)
|
||||
|
||||
man_pages = []
|
||||
html_pages = []
|
||||
source_xml_files = []
|
||||
foreach tuple : manpages
|
||||
stem = tuple[0]
|
||||
section = tuple[1]
|
||||
aliases = tuple[2]
|
||||
condition = tuple[3]
|
||||
|
||||
xml = stem + '.xml'
|
||||
html = stem + '.html'
|
||||
man = stem + '.' + section
|
||||
|
||||
manaliases = []
|
||||
htmlaliases = []
|
||||
foreach alias : aliases
|
||||
manaliases += [alias + '.' + section]
|
||||
htmlaliases += [alias + '.html']
|
||||
endforeach
|
||||
|
||||
mandirn = join_paths(get_option('mandir'), 'man' + section)
|
||||
|
||||
if condition == '' or conf.get(condition, 0) == 1
|
||||
p1 = custom_target(
|
||||
man,
|
||||
input : xml,
|
||||
output : [man] + manaliases,
|
||||
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
|
||||
depend_files : custom_entities_ent,
|
||||
install : want_man,
|
||||
install_dir : mandirn)
|
||||
man_pages += [p1]
|
||||
|
||||
p2 = custom_target(
|
||||
html,
|
||||
input : xml,
|
||||
output : [html] + htmlaliases,
|
||||
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
|
||||
depend_files : custom_entities_ent,
|
||||
install : want_html,
|
||||
install_dir : join_paths(docdir, 'html'))
|
||||
html_pages += [p2]
|
||||
|
||||
source_xml_files += files(tuple[0] + '.xml')
|
||||
else
|
||||
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
############################################################
|
||||
|
||||
have_lxml = run_command(xml_helper_py).returncode() == 0
|
||||
if not have_lxml
|
||||
message('python-lxml not available, not making man page indices')
|
||||
endif
|
||||
|
||||
systemd_directives_xml = custom_target(
|
||||
'systemd.directives.xml',
|
||||
input : source_xml_files,
|
||||
output : 'systemd.directives.xml',
|
||||
command : [make_directive_index_py, '@OUTPUT@'] + source_xml_files)
|
||||
|
||||
nonindex_xml_files = source_xml_files + [systemd_directives_xml]
|
||||
systemd_index_xml = custom_target(
|
||||
'systemd.index.xml',
|
||||
input : nonindex_xml_files,
|
||||
output : 'systemd.index.xml',
|
||||
command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
|
||||
|
||||
foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
|
||||
['systemd.index', '7', systemd_index_xml]]
|
||||
stem = tuple[0]
|
||||
section = tuple[1]
|
||||
xml = tuple[2]
|
||||
|
||||
html = stem + '.html'
|
||||
man = stem + '.' + section
|
||||
|
||||
mandirn = join_paths(get_option('mandir'), 'man' + section)
|
||||
|
||||
p1 = custom_target(
|
||||
man,
|
||||
input : xml,
|
||||
output : man,
|
||||
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
|
||||
install : want_man and have_lxml,
|
||||
install_dir : mandirn)
|
||||
man_pages += [p1]
|
||||
|
||||
p2 = custom_target(
|
||||
html,
|
||||
input : xml,
|
||||
output : html,
|
||||
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
|
||||
install : want_html and have_lxml,
|
||||
install_dir : join_paths(docdir, 'html'))
|
||||
html_pages += [p2]
|
||||
endforeach
|
||||
|
||||
# cannot use run_target until https://github.com/mesonbuild/meson/issues/1644 is resolved
|
||||
man = custom_target(
|
||||
'man',
|
||||
output : 'man',
|
||||
depends : man_pages,
|
||||
command : ['echo'])
|
||||
|
||||
html = run_target(
|
||||
'html',
|
||||
depends : html_pages,
|
||||
output : 'html',
|
||||
command : ['echo'])
|
||||
|
||||
run_target(
|
||||
'doc-sync',
|
||||
depends : man_pages + html_pages,
|
||||
command : ['rsync', '-rlv',
|
||||
'--delete-excluded',
|
||||
'--include=man',
|
||||
'--include=*.html',
|
||||
'--exclude=*',
|
||||
'--omit-dir-times',
|
||||
meson.current_build_dir(),
|
||||
get_option('www-target')])
|
||||
|
||||
############################################################
|
||||
|
||||
if git.found()
|
||||
run_target(
|
||||
'update-man-rules',
|
||||
# slightly strange syntax because of
|
||||
# https://github.com/mesonbuild/meson/issues/1643
|
||||
# and https://github.com/mesonbuild/meson/issues/1512
|
||||
command : ['sh', '-c',
|
||||
'cd @0@ && '.format(meson.build_root()) +
|
||||
'python3 @0@/tools/make-man-rules.py --meson `git ls-files ":/man/*.xml"` >t && '.format(meson.source_root()) +
|
||||
'mv t @0@/rules/meson.build'.format(meson.current_source_dir())],
|
||||
depend_files : custom_entities_ent)
|
||||
endif
|
763
man/rules/meson.build
Normal file
763
man/rules/meson.build
Normal file
@ -0,0 +1,763 @@
|
||||
# Do not edit. Generated by make-man-rules.py.
|
||||
manpages = [
|
||||
['binfmt.d', '5', [], 'ENABLE_BINFMT'],
|
||||
['bootctl', '1', [], 'ENABLE_EFI'],
|
||||
['bootup', '7', [], ''],
|
||||
['busctl', '1', [], ''],
|
||||
['coredump.conf', '5', ['coredump.conf.d'], 'ENABLE_COREDUMP'],
|
||||
['coredumpctl', '1', [], 'ENABLE_COREDUMP'],
|
||||
['crypttab', '5', [], 'HAVE_LIBCRYPTSETUP'],
|
||||
['daemon', '7', [], ''],
|
||||
['dnssec-trust-anchors.d',
|
||||
'5',
|
||||
['systemd.negative', 'systemd.positive'],
|
||||
'ENABLE_RESOLVED'],
|
||||
['environment.d', '5', [], ''],
|
||||
['file-hierarchy', '7', [], ''],
|
||||
['halt', '8', ['poweroff', 'reboot'], ''],
|
||||
['hostname', '5', [], ''],
|
||||
['hostnamectl', '1', [], 'ENABLE_HOSTNAMED'],
|
||||
['hwdb', '7', [], 'ENABLE_HWDB'],
|
||||
['journal-remote.conf', '5', ['journal-remote.conf.d'], 'HAVE_MICROHTTPD'],
|
||||
['journal-upload.conf', '5', ['journal-upload.conf.d'], 'HAVE_MICROHTTPD'],
|
||||
['journalctl', '1', [], ''],
|
||||
['journald.conf', '5', ['journald.conf.d'], ''],
|
||||
['kernel-command-line', '7', [], ''],
|
||||
['kernel-install', '8', [], ''],
|
||||
['libudev', '3', [], ''],
|
||||
['locale.conf', '5', [], ''],
|
||||
['localectl', '1', [], 'ENABLE_LOCALED'],
|
||||
['localtime', '5', [], ''],
|
||||
['loginctl', '1', [], 'ENABLE_LOGIND'],
|
||||
['logind.conf', '5', ['logind.conf.d'], 'ENABLE_LOGIND'],
|
||||
['machine-id', '5', [], ''],
|
||||
['machine-info', '5', [], ''],
|
||||
['machinectl', '1', [], 'ENABLE_MACHINED'],
|
||||
['modules-load.d', '5', [], 'HAVE_KMOD'],
|
||||
['networkctl', '1', [], 'ENABLE_NETWORKD'],
|
||||
['networkd.conf', '5', ['networkd.conf.d'], 'ENABLE_NETWORKD'],
|
||||
['nss-myhostname', '8', ['libnss_myhostname.so.2'], 'HAVE_MYHOSTNAME'],
|
||||
['nss-mymachines', '8', ['libnss_mymachines.so.2'], 'ENABLE_MACHINED'],
|
||||
['nss-resolve', '8', ['libnss_resolve.so.2'], 'ENABLE_RESOLVED'],
|
||||
['nss-systemd', '8', ['libnss_systemd.so.2'], ''],
|
||||
['os-release', '5', [], ''],
|
||||
['pam_systemd', '8', [], 'HAVE_PAM'],
|
||||
['resolved.conf', '5', ['resolved.conf.d'], 'ENABLE_RESOLVED'],
|
||||
['runlevel', '8', [], 'HAVE_UTMP'],
|
||||
['sd-bus-errors',
|
||||
'3',
|
||||
['SD_BUS_ERROR_ACCESS_DENIED',
|
||||
'SD_BUS_ERROR_ADDRESS_IN_USE',
|
||||
'SD_BUS_ERROR_AUTH_FAILED',
|
||||
'SD_BUS_ERROR_BAD_ADDRESS',
|
||||
'SD_BUS_ERROR_DISCONNECTED',
|
||||
'SD_BUS_ERROR_FAILED',
|
||||
'SD_BUS_ERROR_FILE_EXISTS',
|
||||
'SD_BUS_ERROR_FILE_NOT_FOUND',
|
||||
'SD_BUS_ERROR_INCONSISTENT_MESSAGE',
|
||||
'SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED',
|
||||
'SD_BUS_ERROR_INVALID_ARGS',
|
||||
'SD_BUS_ERROR_INVALID_SIGNATURE',
|
||||
'SD_BUS_ERROR_IO_ERROR',
|
||||
'SD_BUS_ERROR_LIMITS_EXCEEDED',
|
||||
'SD_BUS_ERROR_MATCH_RULE_INVALID',
|
||||
'SD_BUS_ERROR_MATCH_RULE_NOT_FOUND',
|
||||
'SD_BUS_ERROR_NAME_HAS_NO_OWNER',
|
||||
'SD_BUS_ERROR_NOT_SUPPORTED',
|
||||
'SD_BUS_ERROR_NO_MEMORY',
|
||||
'SD_BUS_ERROR_NO_NETWORK',
|
||||
'SD_BUS_ERROR_NO_REPLY',
|
||||
'SD_BUS_ERROR_NO_SERVER',
|
||||
'SD_BUS_ERROR_PROPERTY_READ_ONLY',
|
||||
'SD_BUS_ERROR_SERVICE_UNKNOWN',
|
||||
'SD_BUS_ERROR_TIMEOUT',
|
||||
'SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN',
|
||||
'SD_BUS_ERROR_UNKNOWN_INTERFACE',
|
||||
'SD_BUS_ERROR_UNKNOWN_METHOD',
|
||||
'SD_BUS_ERROR_UNKNOWN_OBJECT',
|
||||
'SD_BUS_ERROR_UNKNOWN_PROPERTY'],
|
||||
''],
|
||||
['sd-bus', '3', [], ''],
|
||||
['sd-daemon',
|
||||
'3',
|
||||
['SD_ALERT',
|
||||
'SD_CRIT',
|
||||
'SD_DEBUG',
|
||||
'SD_EMERG',
|
||||
'SD_ERR',
|
||||
'SD_INFO',
|
||||
'SD_NOTICE',
|
||||
'SD_WARNING'],
|
||||
''],
|
||||
['sd-event', '3', [], ''],
|
||||
['sd-id128',
|
||||
'3',
|
||||
['SD_ID128_CONST_STR',
|
||||
'SD_ID128_FORMAT_STR',
|
||||
'SD_ID128_FORMAT_VAL',
|
||||
'SD_ID128_MAKE',
|
||||
'SD_ID128_MAKE_STR',
|
||||
'SD_ID128_NULL',
|
||||
'sd_id128_equal',
|
||||
'sd_id128_is_null',
|
||||
'sd_id128_t'],
|
||||
''],
|
||||
['sd-journal', '3', [], ''],
|
||||
['sd-login', '3', [], 'HAVE_PAM'],
|
||||
['sd_booted', '3', [], ''],
|
||||
['sd_bus_add_match', '3', [], ''],
|
||||
['sd_bus_creds_get_pid',
|
||||
'3',
|
||||
['sd_bus_creds_get_audit_login_uid',
|
||||
'sd_bus_creds_get_audit_session_id',
|
||||
'sd_bus_creds_get_cgroup',
|
||||
'sd_bus_creds_get_cmdline',
|
||||
'sd_bus_creds_get_comm',
|
||||
'sd_bus_creds_get_description',
|
||||
'sd_bus_creds_get_egid',
|
||||
'sd_bus_creds_get_euid',
|
||||
'sd_bus_creds_get_exe',
|
||||
'sd_bus_creds_get_fsgid',
|
||||
'sd_bus_creds_get_fsuid',
|
||||
'sd_bus_creds_get_gid',
|
||||
'sd_bus_creds_get_owner_uid',
|
||||
'sd_bus_creds_get_ppid',
|
||||
'sd_bus_creds_get_selinux_context',
|
||||
'sd_bus_creds_get_session',
|
||||
'sd_bus_creds_get_sgid',
|
||||
'sd_bus_creds_get_slice',
|
||||
'sd_bus_creds_get_suid',
|
||||
'sd_bus_creds_get_supplementary_gids',
|
||||
'sd_bus_creds_get_tid',
|
||||
'sd_bus_creds_get_tid_comm',
|
||||
'sd_bus_creds_get_tty',
|
||||
'sd_bus_creds_get_uid',
|
||||
'sd_bus_creds_get_unique_name',
|
||||
'sd_bus_creds_get_unit',
|
||||
'sd_bus_creds_get_user_slice',
|
||||
'sd_bus_creds_get_user_unit',
|
||||
'sd_bus_creds_get_well_known_names',
|
||||
'sd_bus_creds_has_bounding_cap',
|
||||
'sd_bus_creds_has_effective_cap',
|
||||
'sd_bus_creds_has_inheritable_cap',
|
||||
'sd_bus_creds_has_permitted_cap'],
|
||||
''],
|
||||
['sd_bus_creds_new_from_pid',
|
||||
'3',
|
||||
['sd_bus_creds_get_augmented_mask',
|
||||
'sd_bus_creds_get_mask',
|
||||
'sd_bus_creds_ref',
|
||||
'sd_bus_creds_unref',
|
||||
'sd_bus_creds_unrefp'],
|
||||
''],
|
||||
['sd_bus_default',
|
||||
'3',
|
||||
['sd_bus_default_system',
|
||||
'sd_bus_default_user',
|
||||
'sd_bus_open',
|
||||
'sd_bus_open_system',
|
||||
'sd_bus_open_system_machine',
|
||||
'sd_bus_open_system_remote',
|
||||
'sd_bus_open_user'],
|
||||
''],
|
||||
['sd_bus_error',
|
||||
'3',
|
||||
['SD_BUS_ERROR_MAKE_CONST',
|
||||
'SD_BUS_ERROR_NULL',
|
||||
'sd_bus_error_copy',
|
||||
'sd_bus_error_free',
|
||||
'sd_bus_error_get_errno',
|
||||
'sd_bus_error_has_name',
|
||||
'sd_bus_error_is_set',
|
||||
'sd_bus_error_set',
|
||||
'sd_bus_error_set_const',
|
||||
'sd_bus_error_set_errno',
|
||||
'sd_bus_error_set_errnof',
|
||||
'sd_bus_error_set_errnofv',
|
||||
'sd_bus_error_setf'],
|
||||
''],
|
||||
['sd_bus_error_add_map',
|
||||
'3',
|
||||
['SD_BUS_ERROR_END', 'SD_BUS_ERROR_MAP', 'sd_bus_error_map'],
|
||||
''],
|
||||
['sd_bus_get_fd', '3', [], ''],
|
||||
['sd_bus_message_append', '3', [], ''],
|
||||
['sd_bus_message_append_array',
|
||||
'3',
|
||||
['sd_bus_message_append_array_iovec',
|
||||
'sd_bus_message_append_array_memfd',
|
||||
'sd_bus_message_append_array_space'],
|
||||
''],
|
||||
['sd_bus_message_append_basic', '3', [], ''],
|
||||
['sd_bus_message_append_string_memfd',
|
||||
'3',
|
||||
['sd_bus_message_append_string_iovec', 'sd_bus_message_append_string_space'],
|
||||
''],
|
||||
['sd_bus_message_append_strv', '3', [], ''],
|
||||
['sd_bus_message_get_cookie', '3', ['sd_bus_message_get_reply_cookie'], ''],
|
||||
['sd_bus_message_get_monotonic_usec',
|
||||
'3',
|
||||
['sd_bus_message_get_realtime_usec', 'sd_bus_message_get_seqnum'],
|
||||
''],
|
||||
['sd_bus_message_read_basic', '3', [], ''],
|
||||
['sd_bus_negotiate_fds',
|
||||
'3',
|
||||
['sd_bus_negotiate_creds', 'sd_bus_negotiate_timestamp'],
|
||||
''],
|
||||
['sd_bus_new', '3', ['sd_bus_ref', 'sd_bus_unref', 'sd_bus_unrefp'], ''],
|
||||
['sd_bus_path_encode',
|
||||
'3',
|
||||
['sd_bus_path_decode', 'sd_bus_path_decode_many', 'sd_bus_path_encode_many'],
|
||||
''],
|
||||
['sd_bus_process', '3', [], ''],
|
||||
['sd_bus_request_name', '3', ['sd_bus_release_name'], ''],
|
||||
['sd_bus_track_add_name',
|
||||
'3',
|
||||
['sd_bus_track_add_sender',
|
||||
'sd_bus_track_contains',
|
||||
'sd_bus_track_count',
|
||||
'sd_bus_track_count_name',
|
||||
'sd_bus_track_count_sender',
|
||||
'sd_bus_track_first',
|
||||
'sd_bus_track_next',
|
||||
'sd_bus_track_remove_name',
|
||||
'sd_bus_track_remove_sender'],
|
||||
''],
|
||||
['sd_bus_track_new',
|
||||
'3',
|
||||
['sd_bus_track_get_bus',
|
||||
'sd_bus_track_get_recursive',
|
||||
'sd_bus_track_get_userdata',
|
||||
'sd_bus_track_ref',
|
||||
'sd_bus_track_set_recursive',
|
||||
'sd_bus_track_set_userdata',
|
||||
'sd_bus_track_unref',
|
||||
'sd_bus_track_unrefp'],
|
||||
''],
|
||||
['sd_event_add_child',
|
||||
'3',
|
||||
['sd_event_child_handler_t', 'sd_event_source_get_child_pid'],
|
||||
''],
|
||||
['sd_event_add_defer',
|
||||
'3',
|
||||
['sd_event_add_exit', 'sd_event_add_post', 'sd_event_handler_t'],
|
||||
''],
|
||||
['sd_event_add_io',
|
||||
'3',
|
||||
['sd_event_io_handler_t',
|
||||
'sd_event_source',
|
||||
'sd_event_source_get_io_events',
|
||||
'sd_event_source_get_io_fd',
|
||||
'sd_event_source_get_io_revents',
|
||||
'sd_event_source_set_io_events',
|
||||
'sd_event_source_set_io_fd'],
|
||||
''],
|
||||
['sd_event_add_signal',
|
||||
'3',
|
||||
['sd_event_signal_handler_t', 'sd_event_source_get_signal'],
|
||||
''],
|
||||
['sd_event_add_time',
|
||||
'3',
|
||||
['sd_event_source_get_time',
|
||||
'sd_event_source_get_time_accuracy',
|
||||
'sd_event_source_get_time_clock',
|
||||
'sd_event_source_set_time',
|
||||
'sd_event_source_set_time_accuracy',
|
||||
'sd_event_time_handler_t'],
|
||||
''],
|
||||
['sd_event_exit', '3', ['sd_event_get_exit_code'], ''],
|
||||
['sd_event_get_fd', '3', [], ''],
|
||||
['sd_event_new',
|
||||
'3',
|
||||
['sd_event',
|
||||
'sd_event_default',
|
||||
'sd_event_get_tid',
|
||||
'sd_event_ref',
|
||||
'sd_event_unref',
|
||||
'sd_event_unrefp'],
|
||||
''],
|
||||
['sd_event_now', '3', [], ''],
|
||||
['sd_event_run', '3', ['sd_event_loop'], ''],
|
||||
['sd_event_set_watchdog', '3', ['sd_event_get_watchdog'], ''],
|
||||
['sd_event_source_get_event', '3', [], ''],
|
||||
['sd_event_source_get_pending', '3', [], ''],
|
||||
['sd_event_source_set_description',
|
||||
'3',
|
||||
['sd_event_source_get_description'],
|
||||
''],
|
||||
['sd_event_source_set_enabled',
|
||||
'3',
|
||||
['SD_EVENT_OFF',
|
||||
'SD_EVENT_ON',
|
||||
'SD_EVENT_ONESHOT',
|
||||
'sd_event_source_get_enabled'],
|
||||
''],
|
||||
['sd_event_source_set_prepare', '3', [], ''],
|
||||
['sd_event_source_set_priority',
|
||||
'3',
|
||||
['SD_EVENT_PRIORITY_IDLE',
|
||||
'SD_EVENT_PRIORITY_IMPORTANT',
|
||||
'SD_EVENT_PRIORITY_NORMAL',
|
||||
'sd_event_source_get_priority'],
|
||||
''],
|
||||
['sd_event_source_set_userdata', '3', ['sd_event_source_get_userdata'], ''],
|
||||
['sd_event_source_unref',
|
||||
'3',
|
||||
['sd_event_source_ref', 'sd_event_source_unrefp'],
|
||||
''],
|
||||
['sd_event_wait',
|
||||
'3',
|
||||
['SD_EVENT_ARMED',
|
||||
'SD_EVENT_EXITING',
|
||||
'SD_EVENT_FINISHED',
|
||||
'SD_EVENT_INITIAL',
|
||||
'SD_EVENT_PENDING',
|
||||
'SD_EVENT_PREPARING',
|
||||
'SD_EVENT_RUNNING',
|
||||
'sd_event_dispatch',
|
||||
'sd_event_get_iteration',
|
||||
'sd_event_get_state',
|
||||
'sd_event_prepare'],
|
||||
''],
|
||||
['sd_get_seats',
|
||||
'3',
|
||||
['sd_get_machine_names', 'sd_get_sessions', 'sd_get_uids'],
|
||||
'HAVE_PAM'],
|
||||
['sd_id128_get_machine',
|
||||
'3',
|
||||
['sd_id128_get_boot',
|
||||
'sd_id128_get_invocation',
|
||||
'sd_id128_get_machine_app_specific'],
|
||||
''],
|
||||
['sd_id128_randomize', '3', [], ''],
|
||||
['sd_id128_to_string', '3', ['sd_id128_from_string'], ''],
|
||||
['sd_is_fifo',
|
||||
'3',
|
||||
['sd_is_mq',
|
||||
'sd_is_socket',
|
||||
'sd_is_socket_inet',
|
||||
'sd_is_socket_sockaddr',
|
||||
'sd_is_socket_unix',
|
||||
'sd_is_special'],
|
||||
''],
|
||||
['sd_journal_add_match',
|
||||
'3',
|
||||
['sd_journal_add_conjunction',
|
||||
'sd_journal_add_disjunction',
|
||||
'sd_journal_flush_matches'],
|
||||
''],
|
||||
['sd_journal_enumerate_fields',
|
||||
'3',
|
||||
['SD_JOURNAL_FOREACH_FIELD', 'sd_journal_restart_fields'],
|
||||
''],
|
||||
['sd_journal_get_catalog', '3', ['sd_journal_get_catalog_for_message_id'], ''],
|
||||
['sd_journal_get_cursor', '3', ['sd_journal_test_cursor'], ''],
|
||||
['sd_journal_get_cutoff_realtime_usec',
|
||||
'3',
|
||||
['sd_journal_get_cutoff_monotonic_usec'],
|
||||
''],
|
||||
['sd_journal_get_data',
|
||||
'3',
|
||||
['SD_JOURNAL_FOREACH_DATA',
|
||||
'sd_journal_enumerate_data',
|
||||
'sd_journal_get_data_threshold',
|
||||
'sd_journal_restart_data',
|
||||
'sd_journal_set_data_threshold'],
|
||||
''],
|
||||
['sd_journal_get_fd',
|
||||
'3',
|
||||
['SD_JOURNAL_APPEND',
|
||||
'SD_JOURNAL_INVALIDATE',
|
||||
'SD_JOURNAL_NOP',
|
||||
'sd_journal_get_events',
|
||||
'sd_journal_get_timeout',
|
||||
'sd_journal_process',
|
||||
'sd_journal_reliable_fd',
|
||||
'sd_journal_wait'],
|
||||
''],
|
||||
['sd_journal_get_realtime_usec', '3', ['sd_journal_get_monotonic_usec'], ''],
|
||||
['sd_journal_get_usage', '3', [], ''],
|
||||
['sd_journal_has_runtime_files', '3', ['sd_journal_has_persistent_files'], ''],
|
||||
['sd_journal_next',
|
||||
'3',
|
||||
['SD_JOURNAL_FOREACH',
|
||||
'SD_JOURNAL_FOREACH_BACKWARDS',
|
||||
'sd_journal_next_skip',
|
||||
'sd_journal_previous',
|
||||
'sd_journal_previous_skip'],
|
||||
''],
|
||||
['sd_journal_open',
|
||||
'3',
|
||||
['SD_JOURNAL_CURRENT_USER',
|
||||
'SD_JOURNAL_LOCAL_ONLY',
|
||||
'SD_JOURNAL_OS_ROOT',
|
||||
'SD_JOURNAL_RUNTIME_ONLY',
|
||||
'SD_JOURNAL_SYSTEM',
|
||||
'sd_journal',
|
||||
'sd_journal_close',
|
||||
'sd_journal_open_directory',
|
||||
'sd_journal_open_directory_fd',
|
||||
'sd_journal_open_files',
|
||||
'sd_journal_open_files_fd'],
|
||||
''],
|
||||
['sd_journal_print',
|
||||
'3',
|
||||
['SD_JOURNAL_SUPPRESS_LOCATION',
|
||||
'sd_journal_perror',
|
||||
'sd_journal_printv',
|
||||
'sd_journal_send',
|
||||
'sd_journal_sendv'],
|
||||
''],
|
||||
['sd_journal_query_unique',
|
||||
'3',
|
||||
['SD_JOURNAL_FOREACH_UNIQUE',
|
||||
'sd_journal_enumerate_unique',
|
||||
'sd_journal_restart_unique'],
|
||||
''],
|
||||
['sd_journal_seek_head',
|
||||
'3',
|
||||
['sd_journal_seek_cursor',
|
||||
'sd_journal_seek_monotonic_usec',
|
||||
'sd_journal_seek_realtime_usec',
|
||||
'sd_journal_seek_tail'],
|
||||
''],
|
||||
['sd_journal_stream_fd', '3', [], ''],
|
||||
['sd_listen_fds',
|
||||
'3',
|
||||
['SD_LISTEN_FDS_START', 'sd_listen_fds_with_names'],
|
||||
''],
|
||||
['sd_login_monitor_new',
|
||||
'3',
|
||||
['sd_login_monitor',
|
||||
'sd_login_monitor_flush',
|
||||
'sd_login_monitor_get_events',
|
||||
'sd_login_monitor_get_fd',
|
||||
'sd_login_monitor_get_timeout',
|
||||
'sd_login_monitor_unref',
|
||||
'sd_login_monitor_unrefp'],
|
||||
'HAVE_PAM'],
|
||||
['sd_machine_get_class', '3', ['sd_machine_get_ifindices'], ''],
|
||||
['sd_notify',
|
||||
'3',
|
||||
['sd_notifyf', 'sd_pid_notify', 'sd_pid_notify_with_fds', 'sd_pid_notifyf'],
|
||||
''],
|
||||
['sd_pid_get_session',
|
||||
'3',
|
||||
['sd_peer_get_cgroup',
|
||||
'sd_peer_get_machine_name',
|
||||
'sd_peer_get_owner_uid',
|
||||
'sd_peer_get_session',
|
||||
'sd_peer_get_slice',
|
||||
'sd_peer_get_unit',
|
||||
'sd_peer_get_user_slice',
|
||||
'sd_peer_get_user_unit',
|
||||
'sd_pid_get_cgroup',
|
||||
'sd_pid_get_machine_name',
|
||||
'sd_pid_get_owner_uid',
|
||||
'sd_pid_get_slice',
|
||||
'sd_pid_get_unit',
|
||||
'sd_pid_get_user_slice',
|
||||
'sd_pid_get_user_unit'],
|
||||
'HAVE_PAM'],
|
||||
['sd_seat_get_active',
|
||||
'3',
|
||||
['sd_seat_can_graphical',
|
||||
'sd_seat_can_multi_session',
|
||||
'sd_seat_can_tty',
|
||||
'sd_seat_get_sessions'],
|
||||
'HAVE_PAM'],
|
||||
['sd_session_is_active',
|
||||
'3',
|
||||
['sd_session_get_class',
|
||||
'sd_session_get_desktop',
|
||||
'sd_session_get_display',
|
||||
'sd_session_get_remote_host',
|
||||
'sd_session_get_remote_user',
|
||||
'sd_session_get_seat',
|
||||
'sd_session_get_service',
|
||||
'sd_session_get_state',
|
||||
'sd_session_get_tty',
|
||||
'sd_session_get_type',
|
||||
'sd_session_get_uid',
|
||||
'sd_session_get_vt',
|
||||
'sd_session_is_remote'],
|
||||
'HAVE_PAM'],
|
||||
['sd_uid_get_state',
|
||||
'3',
|
||||
['sd_uid_get_display',
|
||||
'sd_uid_get_seats',
|
||||
'sd_uid_get_sessions',
|
||||
'sd_uid_is_on_seat'],
|
||||
'HAVE_PAM'],
|
||||
['sd_watchdog_enabled', '3', [], ''],
|
||||
['shutdown', '8', [], ''],
|
||||
['sysctl.d', '5', [], ''],
|
||||
['systemctl', '1', [], ''],
|
||||
['systemd-analyze', '1', [], ''],
|
||||
['systemd-ask-password-console.service',
|
||||
'8',
|
||||
['systemd-ask-password-console.path',
|
||||
'systemd-ask-password-wall.path',
|
||||
'systemd-ask-password-wall.service'],
|
||||
''],
|
||||
['systemd-ask-password', '1', [], ''],
|
||||
['systemd-backlight@.service', '8', ['systemd-backlight'], 'ENABLE_BACKLIGHT'],
|
||||
['systemd-binfmt.service', '8', ['systemd-binfmt'], 'ENABLE_BINFMT'],
|
||||
['systemd-cat', '1', [], ''],
|
||||
['systemd-cgls', '1', [], ''],
|
||||
['systemd-cgtop', '1', [], ''],
|
||||
['systemd-coredump',
|
||||
'8',
|
||||
['systemd-coredump.socket', 'systemd-coredump@.service'],
|
||||
'ENABLE_COREDUMP'],
|
||||
['systemd-cryptsetup-generator', '8', [], 'HAVE_LIBCRYPTSETUP'],
|
||||
['systemd-cryptsetup@.service',
|
||||
'8',
|
||||
['systemd-cryptsetup'],
|
||||
'HAVE_LIBCRYPTSETUP'],
|
||||
['systemd-debug-generator', '8', [], ''],
|
||||
['systemd-delta', '1', [], ''],
|
||||
['systemd-detect-virt', '1', [], ''],
|
||||
['systemd-environment-d-generator',
|
||||
'8',
|
||||
['30-systemd-environment-d-generator'],
|
||||
''],
|
||||
['systemd-escape', '1', [], ''],
|
||||
['systemd-firstboot', '1', ['systemd-firstboot.service'], 'ENABLE_FIRSTBOOT'],
|
||||
['systemd-fsck@.service',
|
||||
'8',
|
||||
['systemd-fsck', 'systemd-fsck-root.service'],
|
||||
''],
|
||||
['systemd-fstab-generator', '8', [], ''],
|
||||
['systemd-getty-generator', '8', [], ''],
|
||||
['systemd-gpt-auto-generator', '8', [], ''],
|
||||
['systemd-halt.service',
|
||||
'8',
|
||||
['systemd-kexec.service',
|
||||
'systemd-poweroff.service',
|
||||
'systemd-reboot.service',
|
||||
'systemd-shutdown'],
|
||||
''],
|
||||
['systemd-hibernate-resume-generator', '8', [], ''],
|
||||
['systemd-hibernate-resume@.service', '8', ['systemd-hibernate-resume'], ''],
|
||||
['systemd-hostnamed.service', '8', ['systemd-hostnamed'], 'ENABLE_HOSTNAMED'],
|
||||
['systemd-hwdb', '8', [], 'ENABLE_HWDB'],
|
||||
['systemd-importd.service', '8', ['systemd-importd'], 'ENABLE_IMPORTD'],
|
||||
['systemd-inhibit', '1', [], ''],
|
||||
['systemd-initctl.service',
|
||||
'8',
|
||||
['systemd-initctl', 'systemd-initctl.socket'],
|
||||
''],
|
||||
['systemd-journal-gatewayd.service',
|
||||
'8',
|
||||
['systemd-journal-gatewayd', 'systemd-journal-gatewayd.socket'],
|
||||
'HAVE_MICROHTTPD'],
|
||||
['systemd-journal-remote', '8', [], 'HAVE_MICROHTTPD'],
|
||||
['systemd-journal-upload', '8', [], 'HAVE_MICROHTTPD'],
|
||||
['systemd-journald.service',
|
||||
'8',
|
||||
['systemd-journald',
|
||||
'systemd-journald-audit.socket',
|
||||
'systemd-journald-dev-log.socket',
|
||||
'systemd-journald.socket'],
|
||||
''],
|
||||
['systemd-localed.service', '8', ['systemd-localed'], 'ENABLE_LOCALED'],
|
||||
['systemd-logind.service', '8', ['systemd-logind'], 'ENABLE_LOGIND'],
|
||||
['systemd-machine-id-commit.service', '8', [], ''],
|
||||
['systemd-machine-id-setup', '1', [], ''],
|
||||
['systemd-machined.service', '8', ['systemd-machined'], 'ENABLE_MACHINED'],
|
||||
['systemd-modules-load.service', '8', ['systemd-modules-load'], 'HAVE_KMOD'],
|
||||
['systemd-mount', '1', ['systemd-umount'], ''],
|
||||
['systemd-networkd-wait-online.service',
|
||||
'8',
|
||||
['systemd-networkd-wait-online'],
|
||||
'ENABLE_NETWORKD'],
|
||||
['systemd-networkd.service', '8', ['systemd-networkd'], 'ENABLE_NETWORKD'],
|
||||
['systemd-notify', '1', [], ''],
|
||||
['systemd-nspawn', '1', [], ''],
|
||||
['systemd-path', '1', [], ''],
|
||||
['systemd-quotacheck.service',
|
||||
'8',
|
||||
['systemd-quotacheck'],
|
||||
'ENABLE_QUOTACHECK'],
|
||||
['systemd-random-seed.service',
|
||||
'8',
|
||||
['systemd-random-seed'],
|
||||
'ENABLE_RANDOMSEED'],
|
||||
['systemd-remount-fs.service', '8', ['systemd-remount-fs'], ''],
|
||||
['systemd-resolve', '1', [], ''],
|
||||
['systemd-resolved.service', '8', ['systemd-resolved'], 'ENABLE_RESOLVED'],
|
||||
['systemd-rfkill.service',
|
||||
'8',
|
||||
['systemd-rfkill', 'systemd-rfkill.socket'],
|
||||
'ENABLE_RFKILL'],
|
||||
['systemd-run', '1', [], ''],
|
||||
['systemd-sleep.conf', '5', ['sleep.conf.d'], ''],
|
||||
['systemd-socket-activate', '1', [], ''],
|
||||
['systemd-socket-proxyd', '8', [], ''],
|
||||
['systemd-suspend.service',
|
||||
'8',
|
||||
['systemd-hibernate.service',
|
||||
'systemd-hybrid-sleep.service',
|
||||
'systemd-sleep'],
|
||||
''],
|
||||
['systemd-sysctl.service', '8', ['systemd-sysctl'], ''],
|
||||
['systemd-system-update-generator', '8', [], ''],
|
||||
['systemd-system.conf',
|
||||
'5',
|
||||
['system.conf.d', 'systemd-user.conf', 'user.conf.d'],
|
||||
''],
|
||||
['systemd-sysusers', '8', ['systemd-sysusers.service'], ''],
|
||||
['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'],
|
||||
['systemd-timedated.service', '8', ['systemd-timedated'], 'ENABLE_TIMEDATED'],
|
||||
['systemd-timesyncd.service', '8', ['systemd-timesyncd'], 'ENABLE_TIMESYNCD'],
|
||||
['systemd-tmpfiles',
|
||||
'8',
|
||||
['systemd-tmpfiles-clean.service',
|
||||
'systemd-tmpfiles-clean.timer',
|
||||
'systemd-tmpfiles-setup-dev.service',
|
||||
'systemd-tmpfiles-setup.service'],
|
||||
''],
|
||||
['systemd-tty-ask-password-agent', '1', [], ''],
|
||||
['systemd-udevd.service',
|
||||
'8',
|
||||
['systemd-udevd',
|
||||
'systemd-udevd-control.socket',
|
||||
'systemd-udevd-kernel.socket'],
|
||||
''],
|
||||
['systemd-update-done.service', '8', ['systemd-update-done'], ''],
|
||||
['systemd-update-utmp.service',
|
||||
'8',
|
||||
['systemd-update-utmp', 'systemd-update-utmp-runlevel.service'],
|
||||
'HAVE_UTMP'],
|
||||
['systemd-user-sessions.service', '8', ['systemd-user-sessions'], 'HAVE_PAM'],
|
||||
['systemd-vconsole-setup.service',
|
||||
'8',
|
||||
['systemd-vconsole-setup'],
|
||||
'ENABLE_VCONSOLE'],
|
||||
['systemd-veritysetup-generator', '8', [], 'HAVE_LIBCRYPTSETUP'],
|
||||
['systemd-veritysetup@.service',
|
||||
'8',
|
||||
['systemd-veritysetup'],
|
||||
'HAVE_LIBCRYPTSETUP'],
|
||||
['systemd-volatile-root.service', '8', ['systemd-volatile-root'], ''],
|
||||
['systemd', '1', ['init'], ''],
|
||||
['systemd.automount', '5', [], ''],
|
||||
['systemd.device', '5', [], ''],
|
||||
['systemd.environment-generator', '7', [], ''],
|
||||
['systemd.exec', '5', [], ''],
|
||||
['systemd.generator', '7', [], ''],
|
||||
['systemd.journal-fields', '7', [], ''],
|
||||
['systemd.kill', '5', [], ''],
|
||||
['systemd.link', '5', [], ''],
|
||||
['systemd.mount', '5', [], ''],
|
||||
['systemd.netdev', '5', [], 'ENABLE_NETWORKD'],
|
||||
['systemd.network', '5', [], 'ENABLE_NETWORKD'],
|
||||
['systemd.nspawn', '5', [], ''],
|
||||
['systemd.offline-updates', '7', [], ''],
|
||||
['systemd.path', '5', [], ''],
|
||||
['systemd.preset', '5', [], ''],
|
||||
['systemd.resource-control', '5', [], ''],
|
||||
['systemd.scope', '5', [], ''],
|
||||
['systemd.service', '5', [], ''],
|
||||
['systemd.slice', '5', [], ''],
|
||||
['systemd.socket', '5', [], ''],
|
||||
['systemd.special', '7', [], ''],
|
||||
['systemd.swap', '5', [], ''],
|
||||
['systemd.target', '5', [], ''],
|
||||
['systemd.time', '7', [], ''],
|
||||
['systemd.timer', '5', [], ''],
|
||||
['systemd.unit', '5', [], ''],
|
||||
['sysusers.d', '5', [], 'ENABLE_SYSUSERS'],
|
||||
['telinit', '8', [], ''],
|
||||
['timedatectl', '1', [], 'ENABLE_TIMEDATED'],
|
||||
['timesyncd.conf', '5', ['timesyncd.conf.d'], 'ENABLE_TIMESYNCD'],
|
||||
['tmpfiles.d', '5', [], ''],
|
||||
['udev', '7', [], ''],
|
||||
['udev.conf', '5', [], ''],
|
||||
['udev_device_get_syspath',
|
||||
'3',
|
||||
['udev_device_get_action',
|
||||
'udev_device_get_devnode',
|
||||
'udev_device_get_devnum',
|
||||
'udev_device_get_devpath',
|
||||
'udev_device_get_devtype',
|
||||
'udev_device_get_driver',
|
||||
'udev_device_get_is_initialized',
|
||||
'udev_device_get_parent',
|
||||
'udev_device_get_parent_with_subsystem_devtype',
|
||||
'udev_device_get_subsystem',
|
||||
'udev_device_get_sysname',
|
||||
'udev_device_get_sysnum',
|
||||
'udev_device_get_udev'],
|
||||
''],
|
||||
['udev_device_has_tag',
|
||||
'3',
|
||||
['udev_device_get_devlinks_list_entry',
|
||||
'udev_device_get_properties_list_entry',
|
||||
'udev_device_get_property_value',
|
||||
'udev_device_get_sysattr_list_entry',
|
||||
'udev_device_get_sysattr_value',
|
||||
'udev_device_get_tags_list_entry',
|
||||
'udev_device_set_sysattr_value'],
|
||||
''],
|
||||
['udev_device_new_from_syspath',
|
||||
'3',
|
||||
['udev_device_new_from_device_id',
|
||||
'udev_device_new_from_devnum',
|
||||
'udev_device_new_from_environment',
|
||||
'udev_device_new_from_subsystem_sysname',
|
||||
'udev_device_ref',
|
||||
'udev_device_unref'],
|
||||
''],
|
||||
['udev_enumerate_add_match_subsystem',
|
||||
'3',
|
||||
['udev_enumerate_add_match_is_initialized',
|
||||
'udev_enumerate_add_match_parent',
|
||||
'udev_enumerate_add_match_property',
|
||||
'udev_enumerate_add_match_sysattr',
|
||||
'udev_enumerate_add_match_sysname',
|
||||
'udev_enumerate_add_match_tag',
|
||||
'udev_enumerate_add_nomatch_subsystem',
|
||||
'udev_enumerate_add_nomatch_sysattr'],
|
||||
''],
|
||||
['udev_enumerate_new',
|
||||
'3',
|
||||
['udev_enumerate_ref', 'udev_enumerate_unref'],
|
||||
''],
|
||||
['udev_enumerate_scan_devices',
|
||||
'3',
|
||||
['udev_enumerate_add_syspath',
|
||||
'udev_enumerate_get_list_entry',
|
||||
'udev_enumerate_get_udev',
|
||||
'udev_enumerate_scan_subsystems'],
|
||||
''],
|
||||
['udev_list_entry',
|
||||
'3',
|
||||
['udev_list_entry_get_by_name',
|
||||
'udev_list_entry_get_name',
|
||||
'udev_list_entry_get_next',
|
||||
'udev_list_entry_get_value'],
|
||||
''],
|
||||
['udev_monitor_filter_update',
|
||||
'3',
|
||||
['udev_monitor_filter_add_match_subsystem_devtype',
|
||||
'udev_monitor_filter_add_match_tag',
|
||||
'udev_monitor_filter_remove'],
|
||||
''],
|
||||
['udev_monitor_new_from_netlink',
|
||||
'3',
|
||||
['udev_monitor_ref', 'udev_monitor_unref'],
|
||||
''],
|
||||
['udev_monitor_receive_device',
|
||||
'3',
|
||||
['udev_monitor_enable_receiving',
|
||||
'udev_monitor_get_fd',
|
||||
'udev_monitor_get_udev',
|
||||
'udev_monitor_set_receive_buffer_size'],
|
||||
''],
|
||||
['udev_new', '3', ['udev_ref', 'udev_unref'], ''],
|
||||
['udevadm', '8', [], ''],
|
||||
['vconsole.conf', '5', [], 'ENABLE_VCONSOLE']
|
||||
]
|
||||
# Really, do not edit.
|
2354
meson.build
Normal file
2354
meson.build
Normal file
File diff suppressed because it is too large
Load Diff
246
meson_options.txt
Normal file
246
meson_options.txt
Normal file
@ -0,0 +1,246 @@
|
||||
# -*- mode: meson -*-
|
||||
|
||||
option('split-usr', type : 'boolean', value : false,
|
||||
description : '''assume that /bin, /sbin aren't symlinks into /usr''')
|
||||
option('rootlibdir', type : 'string',
|
||||
description : '''[/usr]/lib/x86_64-linux-gnu or such''')
|
||||
option('rootprefix', type : 'string',
|
||||
description : '''override the root prefix''')
|
||||
option('link-udev-shared', type : 'boolean',
|
||||
description : 'link systemd-udev and its helpers to libsystemd-shared.so')
|
||||
|
||||
option('sysvinit-path', type : 'string', value : '/etc/init.d',
|
||||
description : 'the directory where the SysV init scripts are located')
|
||||
option('sysvrcnd-path', type : 'string', value : '/etc/rc.d',
|
||||
description : 'the base directory for SysV rcN.d directories')
|
||||
option('telinit-path', type : 'string', description : 'path to telinit')
|
||||
option('rc-local', type : 'string',
|
||||
value : '/etc/rc.local')
|
||||
option('halt-local', type : 'string',
|
||||
value : '/usr/sbin/halt.local')
|
||||
|
||||
option('quotaon-path', type : 'string', description : 'path to quotaon')
|
||||
option('quotacheck-path', type : 'string', description : 'path to quotacheck')
|
||||
option('kill-path', type : 'string', description : 'path to kill')
|
||||
option('kmod-path', type : 'string', description : 'path to kmod')
|
||||
option('kexec-path', type : 'string', description : 'path to kexec')
|
||||
option('sulogin-path', type : 'string', description : 'path to sulogin')
|
||||
option('mount-path', type : 'string', description : 'path to mount')
|
||||
option('umount-path', type : 'string', description : 'path to umount')
|
||||
option('loadkeys-path', type : 'string', description : 'path to loadkeys')
|
||||
option('setfont-path', type : 'string', description : 'path to setfont')
|
||||
|
||||
option('debug-shell', type : 'string', value : '/bin/sh',
|
||||
description : 'path to debug shell binary')
|
||||
option('debug-tty', type : 'string', value : '/dev/tty9',
|
||||
description : 'specify the tty device for debug shell')
|
||||
|
||||
option('utmp', type : 'boolean',
|
||||
description : 'support for utmp/wtmp log handling')
|
||||
option('hibernate', type : 'boolean',
|
||||
description : 'support for hibernation')
|
||||
option('ldconfig', type : 'boolean',
|
||||
description : 'support for dynamic linker cache creation')
|
||||
option('resolve', type : 'boolean',
|
||||
description : 'systemd-resolved stack')
|
||||
option('efi', type : 'boolean',
|
||||
description : 'enable systemd-boot and bootctl')
|
||||
option('tpm', type : 'boolean', value : false,
|
||||
description : 'TPM should be used to log events and extend the registers')
|
||||
option('environment-d', type : 'boolean',
|
||||
description : 'support for environment.d')
|
||||
option('binfmt', type : 'boolean',
|
||||
description : 'support for custom binary formats')
|
||||
option('coredump', type : 'boolean',
|
||||
description : 'install the coredump handler')
|
||||
option('logind', type : 'boolean',
|
||||
description : 'install the systemd-logind stack')
|
||||
option('hostnamed', type : 'boolean',
|
||||
description : 'install the systemd-hostnamed stack')
|
||||
option('localed', type : 'boolean',
|
||||
description : 'install the systemd-localed stack')
|
||||
option('machined', type : 'boolean',
|
||||
description : 'install the systemd-machined stack')
|
||||
option('networkd', type : 'boolean',
|
||||
description : 'install the systemd-networkd stack')
|
||||
option('timedated', type : 'boolean',
|
||||
description : 'install the systemd-timedated daemon')
|
||||
option('timesyncd', type : 'boolean',
|
||||
description : 'install the systemd-timesyncd daemon')
|
||||
option('remote', type : 'boolean',
|
||||
description : 'support for "journal over the network"')
|
||||
option('myhostname', type : 'boolean',
|
||||
description : 'nss-myhostname support')
|
||||
option('firstboot', type : 'boolean',
|
||||
description : 'support for firstboot mechanism')
|
||||
option('randomseed', type : 'boolean',
|
||||
description : 'support for restoring random seed')
|
||||
option('backlight', type : 'boolean',
|
||||
description : 'support for restoring backlight state')
|
||||
option('vconsole', type : 'boolean',
|
||||
description : 'support for vconsole configuration')
|
||||
option('quotacheck', type : 'boolean',
|
||||
description : 'support for the quotacheck tools')
|
||||
option('sysusers', type : 'boolean',
|
||||
description : 'support for the sysusers configuration')
|
||||
option('tmpfiles', type : 'boolean',
|
||||
description : 'support for tmpfiles.d')
|
||||
option('importd', type : 'boolean',
|
||||
description : 'install the systemd-importd daemon')
|
||||
option('hwdb', type : 'boolean',
|
||||
description : 'support for the hardware database')
|
||||
option('rfkill', type : 'boolean',
|
||||
description : 'support for the rfkill tools')
|
||||
option('man', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'build and install man pages')
|
||||
option('html', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
value : 'false',
|
||||
description : 'build and install html pages')
|
||||
|
||||
option('certificate-root', type : 'string', value : '/etc/ssl',
|
||||
description : 'the prefix for TLS certificates')
|
||||
option('dbuspolicydir', type : 'string',
|
||||
description : 'D-Bus policy directory')
|
||||
option('dbussessionservicedir', type : 'string',
|
||||
description : 'D-Bus session service directory')
|
||||
option('dbussystemservicedir', type : 'string',
|
||||
description : 'D-Bus system service directory')
|
||||
option('pkgconfigdatadir', type : 'string', value : 'share/pkgconfig',
|
||||
description : 'directory for ')
|
||||
option('pkgconfiglibdir', type : 'string', value : '',
|
||||
description : 'directory for ')
|
||||
option('rpmmacrosdir', type : 'string', value : 'lib/rpm/macros.d',
|
||||
description : 'directory for rpm macros ["no" disables]')
|
||||
option('pamlibdir', type : 'string',
|
||||
description : 'directory for PAM modules')
|
||||
option('pamconfdir', type : 'string',
|
||||
description : 'directory for PAM configuration ["no" disables]')
|
||||
|
||||
option('fallback-hostname', type : 'string', value : 'localhost',
|
||||
description : 'the hostname used if none configured')
|
||||
option('default-hierarchy', type : 'combo',
|
||||
choices : ['legacy', 'hybrid', 'unified'], value : 'hybrid',
|
||||
description : 'default cgroup hierarchy')
|
||||
option('time-epoch', type : 'string',
|
||||
description : 'time epoch for time clients')
|
||||
option('system-uid-max', type : 'string',
|
||||
description : 'maximum system UID')
|
||||
option('system-gid-max', type : 'string',
|
||||
description : 'maximum system GID')
|
||||
option('tty-gid', type : 'string',
|
||||
description : 'the numeric GID of the "tty" group',
|
||||
value : '5')
|
||||
option('adm-group', type : 'boolean',
|
||||
description : 'the ACL for adm group should be added')
|
||||
option('wheel-group', type : 'boolean',
|
||||
description : 'the ACL for wheel group should be added')
|
||||
option('nobody-user', type : 'string',
|
||||
description : 'The name of the nobody user (the one with UID 65534)',
|
||||
value : 'nobody')
|
||||
option('nobody-group', type : 'string',
|
||||
description : 'The name of the nobody group (the one with GID 65534)',
|
||||
value : 'nobody')
|
||||
option('dev-kvm-mode', type : 'string', value : '0660',
|
||||
description : '/dev/kvm access mode')
|
||||
option('default-kill-user-processes', type : 'boolean',
|
||||
description : 'the default value for KillUserProcesses= setting')
|
||||
|
||||
option('default-dnssec', type : 'combo',
|
||||
description : 'default DNSSEC mode',
|
||||
choices : ['yes', 'allow-downgrade', 'no'],
|
||||
value : 'allow-downgrade')
|
||||
option('dns-servers', type : 'string',
|
||||
description : 'space-separated list of default DNS servers',
|
||||
value : '8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844')
|
||||
option('ntp-servers', type : 'string',
|
||||
description : 'space-separated list of default NTP servers',
|
||||
value : 'time1.google.com time2.google.com time3.google.com time4.google.com')
|
||||
option('support-url', type : 'string',
|
||||
description : 'the support URL to show in catalog entries included in systemd',
|
||||
value : 'https://lists.freedesktop.org/mailman/listinfo/systemd-devel')
|
||||
option('www-target', type : 'string',
|
||||
description : 'the address and dir to upload docs too',
|
||||
value : 'www.freedesktop.org:/srv/www.freedesktop.org/www/software/systemd')
|
||||
|
||||
option('seccomp', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'SECCOMP support')
|
||||
option('selinux', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'SELinux support')
|
||||
option('apparmor', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'AppArmor support')
|
||||
option('smack', type : 'boolean',
|
||||
description : 'SMACK support')
|
||||
option('smack-run-label', type : 'string',
|
||||
description : 'run systemd --system itself with a specific SMACK label')
|
||||
option('polkit', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'PolicyKit support')
|
||||
option('ima', type : 'boolean',
|
||||
description : 'IMA support')
|
||||
|
||||
option('acl', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libacl support')
|
||||
option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libaudit support')
|
||||
option('blkid', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libblkid support')
|
||||
option('kmod', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'support for loadable modules')
|
||||
option('pam', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'PAM support')
|
||||
option('microhttpd', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libµhttpd support')
|
||||
option('libcryptsetup', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libcryptsetup support')
|
||||
option('libcurl', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libcurl support')
|
||||
option('libidn', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libidn support')
|
||||
option('libiptc', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libiptc support')
|
||||
option('qrencode', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libqrencode support')
|
||||
option('gcrypt', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'gcrypt support')
|
||||
option('gnutls', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'gnutls support')
|
||||
option('elfutils', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'elfutils support')
|
||||
option('zlib', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'zlib compression support')
|
||||
option('bzip2', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'bzip2 compression support')
|
||||
option('xz', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'xz compression support')
|
||||
option('lz4', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'lz4 compression support')
|
||||
option('xkbcommon', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'xkbcommon keymap support')
|
||||
option('glib', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libglib support (for tests only)')
|
||||
option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'libdbus support (for tests only)')
|
||||
|
||||
option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||
description : 'gnu-efi support for sd-boot')
|
||||
option('efi-cc', type : 'string', value : 'gcc',
|
||||
description : 'the compiler to use for EFI modules')
|
||||
option('efi-ld', type : 'string', value : 'ld',
|
||||
description : 'the linker to use for EFI modules')
|
||||
option('efi-libdir', type : 'string',
|
||||
description : 'path to the EFI lib directory')
|
||||
option('efi-ldsdir', type : 'string',
|
||||
description : 'path to the EFI lds directory')
|
||||
option('efi-includedir', type : 'string', value : '/usr/include/efi',
|
||||
description : 'path to the EFI header directory')
|
||||
option('tpm-pcrindex', type : 'string', value : '8',
|
||||
description : 'TPM PCR register number to use')
|
||||
|
||||
option('bashcompletiondir', type : 'string',
|
||||
description : 'directory for bash completion scripts ["no" disables]')
|
||||
option('zshcompletiondir', type : 'string',
|
||||
description : 'directory for zsh completion scripts ["no" disables]')
|
||||
|
||||
option('tests', type : 'combo', choices : ['true', 'unsafe'],
|
||||
description : 'enable extra tests with =unsafe')
|
||||
option('install-tests', type : 'boolean', value : 'false',
|
||||
description : 'install test executables')
|
12
network/meson.build
Normal file
12
network/meson.build
Normal file
@ -0,0 +1,12 @@
|
||||
if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||
install_data('80-container-host0.network',
|
||||
'80-container-ve.network',
|
||||
'80-container-vz.network',
|
||||
install_dir : networkdir)
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
|
||||
endif
|
||||
|
||||
install_data('99-default.link',
|
||||
install_dir : networkdir)
|
12
po/meson.build
Normal file
12
po/meson.build
Normal file
@ -0,0 +1,12 @@
|
||||
i18n = import('i18n')
|
||||
i18n.gettext(meson.project_name())
|
||||
|
||||
#####################################################################
|
||||
|
||||
intltool_merge = find_program('intltool-merge')
|
||||
po_dir = meson.current_source_dir()
|
||||
|
||||
intltool_cache = join_paths(meson.current_build_dir(), 'intltool-merge-cache')
|
||||
intltool_command = [intltool_merge, '-x', '-u',
|
||||
'-c', intltool_cache,
|
||||
po_dir, '@INPUT@', '@OUTPUT@']
|
38
rules/meson.build
Normal file
38
rules/meson.build
Normal file
@ -0,0 +1,38 @@
|
||||
rules = files('''
|
||||
60-block.rules
|
||||
60-cdrom_id.rules
|
||||
60-drm.rules
|
||||
60-evdev.rules
|
||||
60-persistent-alsa.rules
|
||||
60-persistent-input.rules
|
||||
60-persistent-storage.rules
|
||||
60-persistent-storage-tape.rules
|
||||
60-persistent-v4l.rules
|
||||
60-sensor.rules
|
||||
60-serial.rules
|
||||
64-btrfs.rules
|
||||
70-mouse.rules
|
||||
70-touchpad.rules
|
||||
75-net-description.rules
|
||||
75-probe_mtd.rules
|
||||
78-sound-card.rules
|
||||
80-drivers.rules
|
||||
80-net-setup-link.rules
|
||||
'''.split())
|
||||
|
||||
install_data(rules,
|
||||
install_dir : udevrulesdir)
|
||||
|
||||
rules_in = '''
|
||||
50-udev-default.rules
|
||||
99-systemd.rules
|
||||
'''.split()
|
||||
|
||||
foreach file : rules_in
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
install_data(gen,
|
||||
install_dir : udevrulesdir)
|
||||
endforeach
|
50
shell-completion/bash/meson.build
Normal file
50
shell-completion/bash/meson.build
Normal file
@ -0,0 +1,50 @@
|
||||
bashcompletiondir = get_option('bashcompletiondir')
|
||||
if bashcompletiondir == ''
|
||||
bash_completion = dependency('bash-completion', required : false)
|
||||
if bash_completion.found()
|
||||
bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
|
||||
else
|
||||
bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
|
||||
endif
|
||||
|
||||
message('bash completions: @0@'.format(bashcompletiondir))
|
||||
endif
|
||||
|
||||
if bashcompletiondir != 'no'
|
||||
bash_systemctl = configure_file(
|
||||
input : 'systemctl.in',
|
||||
output : 'systemctl',
|
||||
configuration : substs)
|
||||
|
||||
items = [['busctl', ''],
|
||||
['journalctl', ''],
|
||||
['systemd-analyze', ''],
|
||||
['systemd-cat', ''],
|
||||
['systemd-cgls', ''],
|
||||
['systemd-cgtop', ''],
|
||||
['systemd-delta', ''],
|
||||
['systemd-detect-virt', ''],
|
||||
['systemd-nspawn', ''],
|
||||
['systemd-path', ''],
|
||||
['systemd-run', ''],
|
||||
['udevadm', ''],
|
||||
['kernel-install', ''],
|
||||
[bash_systemctl, ''],
|
||||
['bootctl', 'ENABLE_EFI'],
|
||||
['coredumpctl', 'ENABLE_COREDUMP'],
|
||||
['hostnamectl', 'ENABLE_HOSTNAMED'],
|
||||
['localectl', 'ENABLE_LOCALED'],
|
||||
['loginctl', 'ENABLE_LOGIND'],
|
||||
['machinectl', 'ENABLE_MACHINED'],
|
||||
['networkctl', 'ENABLE_NETWORKD'],
|
||||
['systemd-resolve', 'ENABLE_RESOLVED'],
|
||||
['timedatectl', 'ENABLE_TIMEDATED'],
|
||||
]
|
||||
|
||||
foreach item : items
|
||||
if item[1] == '' or conf.get(item[1], 0) == 1
|
||||
install_data(item[0],
|
||||
install_dir : bashcompletiondir)
|
||||
endif
|
||||
endforeach
|
||||
endif
|
47
shell-completion/zsh/meson.build
Normal file
47
shell-completion/zsh/meson.build
Normal file
@ -0,0 +1,47 @@
|
||||
zshcompletiondir = get_option('zshcompletiondir')
|
||||
if zshcompletiondir == ''
|
||||
zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
|
||||
|
||||
message('zsh completions: @0@'.format(zshcompletiondir))
|
||||
endif
|
||||
|
||||
if zshcompletiondir != 'no'
|
||||
zsh_systemctl = configure_file(
|
||||
input : '_systemctl.in',
|
||||
output : '_systemctl',
|
||||
configuration : substs)
|
||||
|
||||
items = [['_busctl', ''],
|
||||
['_journalctl', ''],
|
||||
['_systemd-analyze', ''],
|
||||
['_systemd-delta', ''],
|
||||
['_systemd-nspawn', ''],
|
||||
['_systemd', ''],
|
||||
['_systemd-run', ''],
|
||||
['_udevadm', ''],
|
||||
['_kernel-install', ''],
|
||||
['_sd_hosts_or_user_at_host', ''],
|
||||
['_sd_outputmodes', ''],
|
||||
['_sd_unit_files', ''],
|
||||
['_sd_machines', ''],
|
||||
[zsh_systemctl, ''],
|
||||
['_bootctl', 'ENABLE_EFI'],
|
||||
['_coredumpctl', 'ENABLE_COREDUMP'],
|
||||
['_hostnamectl', 'ENABLE_HOSTNAMED'],
|
||||
['_localectl', 'ENABLE_LOCALED'],
|
||||
['_loginctl', 'ENABLE_LOGIND'],
|
||||
['_machinectl', 'ENABLE_MACHINED'],
|
||||
['_networkctl', 'ENABLE_NETWORKD'],
|
||||
['_systemd-inhibit', 'ENABLE_LOGIND'],
|
||||
['_systemd-resolve', 'ENABLE_RESOLVED'],
|
||||
['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
|
||||
['_timedatectl', 'ENABLE_TIMEDATED'],
|
||||
]
|
||||
|
||||
foreach item : items
|
||||
if item[1] == '' or conf.get(item[1], 0) == 1
|
||||
install_data(item[0],
|
||||
install_dir : zshcompletiondir)
|
||||
endif
|
||||
endforeach
|
||||
endif
|
5
src/analyze/meson.build
Normal file
5
src/analyze/meson.build
Normal file
@ -0,0 +1,5 @@
|
||||
systemd_analyze_sources = files('''
|
||||
analyze.c
|
||||
analyze-verify.c
|
||||
analyze-verify.h
|
||||
'''.split())
|
9
src/basic/af-to-name.awk
Normal file
9
src/basic/af-to-name.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN{
|
||||
print "static const char* const af_names[] = { "
|
||||
}
|
||||
!/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ {
|
||||
printf " [%s] = \"%s\",\n", $1, $1
|
||||
}
|
||||
END{
|
||||
print "};"
|
||||
}
|
9
src/basic/arphrd-to-name.awk
Normal file
9
src/basic/arphrd-to-name.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN{
|
||||
print "static const char* const arphrd_names[] = { "
|
||||
}
|
||||
!/CISCO/ {
|
||||
printf " [ARPHRD_%s] = \"%s\",\n", $1, $1
|
||||
}
|
||||
END{
|
||||
print "};"
|
||||
}
|
9
src/basic/cap-to-name.awk
Normal file
9
src/basic/cap-to-name.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN{
|
||||
print "static const char* const capability_names[] = { "
|
||||
}
|
||||
{
|
||||
printf " [%s] = \"%s\",\n", $1, tolower($1)
|
||||
}
|
||||
END{
|
||||
print "};"
|
||||
}
|
9
src/basic/errno-to-name.awk
Normal file
9
src/basic/errno-to-name.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN{
|
||||
print "static const char* const errno_names[] = { "
|
||||
}
|
||||
!/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ {
|
||||
printf " [%s] = \"%s\",\n", $1, $1
|
||||
}
|
||||
END{
|
||||
print "};"
|
||||
}
|
5
src/basic/generate-af-list.sh
Executable file
5
src/basic/generate-af-list.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -E -dM -include sys/socket.h - </dev/null | \
|
||||
grep -Ev 'AF_UNSPEC|AF_MAX' | \
|
||||
awk '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $2; }'
|
5
src/basic/generate-arphrd-list.sh
Executable file
5
src/basic/generate-arphrd-list.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -dM -include net/if_arp.h - </dev/null | \
|
||||
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
|
||||
sed -e 's/ARPHRD_//'
|
5
src/basic/generate-cap-list.sh
Executable file
5
src/basic/generate-cap-list.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -dM -include linux/capability.h -include "$2" -include "$3" - </dev/null | \
|
||||
awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
|
||||
grep -v CAP_LAST_CAP
|
4
src/basic/generate-errno-list.sh
Executable file
4
src/basic/generate-errno-list.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -dM -include errno.h - </dev/null | \
|
||||
awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
|
16
src/basic/generate-gperfs.py
Normal file
16
src/basic/generate-gperfs.py
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
"""Generate %-from-name.gperf from %-list.txt
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
name, prefix, input = sys.argv[1:]
|
||||
|
||||
print("""\
|
||||
struct {}_name {{ const char* name; int id; }};
|
||||
%null-strings
|
||||
%%""".format(name))
|
||||
|
||||
for line in open(input):
|
||||
print("{0}, {1}{0}".format(line.rstrip(), prefix))
|
281
src/basic/meson.build
Normal file
281
src/basic/meson.build
Normal file
@ -0,0 +1,281 @@
|
||||
basic_sources_plain = files('''
|
||||
af-list.c
|
||||
af-list.h
|
||||
alloc-util.c
|
||||
alloc-util.h
|
||||
architecture.c
|
||||
architecture.h
|
||||
arphrd-list.c
|
||||
arphrd-list.h
|
||||
async.c
|
||||
async.h
|
||||
audit-util.c
|
||||
audit-util.h
|
||||
barrier.c
|
||||
barrier.h
|
||||
bitmap.c
|
||||
bitmap.h
|
||||
blkid-util.h
|
||||
btrfs-ctree.h
|
||||
btrfs-util.c
|
||||
btrfs-util.h
|
||||
build.h
|
||||
bus-label.c
|
||||
bus-label.h
|
||||
calendarspec.c
|
||||
calendarspec.h
|
||||
capability-util.c
|
||||
capability-util.h
|
||||
cap-list.c
|
||||
cap-list.h
|
||||
cgroup-util.c
|
||||
cgroup-util.h
|
||||
chattr-util.c
|
||||
chattr-util.h
|
||||
clock-util.c
|
||||
clock-util.h
|
||||
conf-files.c
|
||||
conf-files.h
|
||||
copy.c
|
||||
copy.h
|
||||
cpu-set-util.c
|
||||
cpu-set-util.h
|
||||
def.h
|
||||
device-nodes.c
|
||||
device-nodes.h
|
||||
dirent-util.c
|
||||
dirent-util.h
|
||||
env-util.c
|
||||
env-util.h
|
||||
errno-list.c
|
||||
errno-list.h
|
||||
escape.c
|
||||
escape.h
|
||||
ether-addr-util.c
|
||||
ether-addr-util.h
|
||||
exec-util.c
|
||||
exec-util.h
|
||||
exit-status.c
|
||||
exit-status.h
|
||||
extract-word.c
|
||||
extract-word.h
|
||||
fd-util.c
|
||||
fd-util.h
|
||||
fileio.c
|
||||
fileio.h
|
||||
fileio-label.c
|
||||
fileio-label.h
|
||||
format-util.h
|
||||
fs-util.c
|
||||
fs-util.h
|
||||
glob-util.c
|
||||
glob-util.h
|
||||
gunicode.c
|
||||
gunicode.h
|
||||
hash-funcs.c
|
||||
hash-funcs.h
|
||||
hashmap.c
|
||||
hashmap.h
|
||||
hexdecoct.c
|
||||
hexdecoct.h
|
||||
hostname-util.c
|
||||
hostname-util.h
|
||||
in-addr-util.c
|
||||
in-addr-util.h
|
||||
ioprio.h
|
||||
io-util.c
|
||||
io-util.h
|
||||
journal-importer.c
|
||||
journal-importer.h
|
||||
khash.c
|
||||
khash.h
|
||||
label.c
|
||||
label.h
|
||||
list.h
|
||||
locale-util.c
|
||||
locale-util.h
|
||||
lockfile-util.c
|
||||
lockfile-util.h
|
||||
log.c
|
||||
log.h
|
||||
login-util.c
|
||||
login-util.h
|
||||
macro.h
|
||||
memfd-util.c
|
||||
memfd-util.h
|
||||
mempool.c
|
||||
mempool.h
|
||||
missing_syscall.h
|
||||
mkdir.c
|
||||
mkdir.h
|
||||
mkdir-label.c
|
||||
mount-util.c
|
||||
mount-util.h
|
||||
MurmurHash2.c
|
||||
MurmurHash2.h
|
||||
nss-util.h
|
||||
ordered-set.c
|
||||
ordered-set.h
|
||||
parse-util.c
|
||||
parse-util.h
|
||||
path-util.c
|
||||
path-util.h
|
||||
prioq.c
|
||||
prioq.h
|
||||
proc-cmdline.c
|
||||
proc-cmdline.h
|
||||
process-util.c
|
||||
process-util.h
|
||||
random-util.c
|
||||
random-util.h
|
||||
ratelimit.c
|
||||
ratelimit.h
|
||||
raw-clone.h
|
||||
refcnt.h
|
||||
replace-var.c
|
||||
replace-var.h
|
||||
rlimit-util.c
|
||||
rlimit-util.h
|
||||
rm-rf.c
|
||||
rm-rf.h
|
||||
securebits.h
|
||||
selinux-util.c
|
||||
selinux-util.h
|
||||
set.h
|
||||
sigbus.c
|
||||
sigbus.h
|
||||
signal-util.c
|
||||
signal-util.h
|
||||
siphash24.c
|
||||
siphash24.h
|
||||
smack-util.c
|
||||
smack-util.h
|
||||
socket-label.c
|
||||
socket-util.c
|
||||
socket-util.h
|
||||
sparse-endian.h
|
||||
special.h
|
||||
stat-util.c
|
||||
stat-util.h
|
||||
stdio-util.h
|
||||
strbuf.c
|
||||
strbuf.h
|
||||
string-table.c
|
||||
string-table.h
|
||||
string-util.c
|
||||
string-util.h
|
||||
strv.c
|
||||
strv.h
|
||||
strxcpyx.c
|
||||
strxcpyx.h
|
||||
syslog-util.c
|
||||
syslog-util.h
|
||||
terminal-util.c
|
||||
terminal-util.h
|
||||
time-util.c
|
||||
time-util.h
|
||||
umask-util.h
|
||||
unaligned.h
|
||||
unit-name.c
|
||||
unit-name.h
|
||||
user-util.c
|
||||
user-util.h
|
||||
utf8.c
|
||||
utf8.h
|
||||
util.c
|
||||
util.h
|
||||
verbs.c
|
||||
verbs.h
|
||||
virt.c
|
||||
virt.h
|
||||
web-util.c
|
||||
web-util.h
|
||||
xattr-util.c
|
||||
xattr-util.h
|
||||
xml.c
|
||||
xml.h
|
||||
'''.split())
|
||||
|
||||
missing_h = files('missing.h')
|
||||
|
||||
generate_gperfs = find_program('generate-gperfs.py')
|
||||
|
||||
generate_af_list = find_program('generate-af-list.sh')
|
||||
af_list_txt = custom_target(
|
||||
'af-list.txt',
|
||||
output : 'af-list.txt',
|
||||
command : [generate_af_list, cpp],
|
||||
capture : true)
|
||||
|
||||
generate_arphrd_list = find_program('generate-arphrd-list.sh')
|
||||
arphrd_list_txt = custom_target(
|
||||
'arphrd-list.txt',
|
||||
output : 'arphrd-list.txt',
|
||||
command : [generate_arphrd_list, cpp],
|
||||
capture : true)
|
||||
|
||||
generate_cap_list = find_program('generate-cap-list.sh')
|
||||
cap_list_txt = custom_target(
|
||||
'cap-list.txt',
|
||||
output : 'cap-list.txt',
|
||||
command : [generate_cap_list, cpp, config_h, missing_h],
|
||||
capture : true)
|
||||
|
||||
generate_errno_list = find_program('generate-errno-list.sh')
|
||||
errno_list_txt = custom_target(
|
||||
'errno-list.txt',
|
||||
output : 'errno-list.txt',
|
||||
command : [generate_errno_list, cpp],
|
||||
capture : true)
|
||||
|
||||
generated_gperf_headers = []
|
||||
foreach item : [['af', af_list_txt, 'af', ''],
|
||||
['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'],
|
||||
['cap', cap_list_txt, 'capability', ''],
|
||||
['errno', errno_list_txt, 'errno', '']]
|
||||
|
||||
fname = '@0@-from-name.gperf'.format(item[0])
|
||||
gperf_file = custom_target(
|
||||
fname,
|
||||
input : item[1],
|
||||
output : fname,
|
||||
command : [generate_gperfs, item[2], item[3], '@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = '@0@-from-name.h'.format(item[0])
|
||||
target1 = custom_target(
|
||||
fname,
|
||||
input : gperf_file,
|
||||
output : fname,
|
||||
command : [gperf,
|
||||
'-L', 'ANSI-C', '-t', '--ignore-case',
|
||||
'-N', 'lookup_@0@'.format(item[2]),
|
||||
'-H', 'hash_@0@_name'.format(item[2]),
|
||||
'-p', '-C',
|
||||
'@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = '@0@-to-name.h'.format(item[0])
|
||||
awkscript = '@0@-to-name.awk'.format(item[0])
|
||||
target2 = custom_target(
|
||||
fname,
|
||||
input : [awkscript, item[1]],
|
||||
output : fname,
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
generated_gperf_headers += [target1, target2]
|
||||
endforeach
|
||||
|
||||
basic_sources = basic_sources_plain + [missing_h] + generated_gperf_headers
|
||||
|
||||
libbasic = static_library(
|
||||
'basic',
|
||||
basic_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [threads,
|
||||
libcap,
|
||||
libblkid,
|
||||
libselinux,
|
||||
],
|
||||
install : false)
|
201
src/boot/efi/meson.build
Normal file
201
src/boot/efi/meson.build
Normal file
@ -0,0 +1,201 @@
|
||||
efi_headers = files('''
|
||||
console.h
|
||||
disk.h
|
||||
graphics.h
|
||||
linux.h
|
||||
measure.h
|
||||
pefile.h
|
||||
splash.h
|
||||
util.h
|
||||
'''.split())
|
||||
|
||||
common_sources = '''
|
||||
disk.c
|
||||
graphics.c
|
||||
measure.c
|
||||
pefile.c
|
||||
util.c
|
||||
'''.split()
|
||||
|
||||
systemd_boot_sources = '''
|
||||
boot.c
|
||||
console.c
|
||||
'''.split()
|
||||
|
||||
stub_sources = '''
|
||||
linux.c
|
||||
splash.c
|
||||
stub.c
|
||||
'''.split()
|
||||
|
||||
if conf.get('ENABLE_EFI', 0) == 1 and get_option('gnu-efi') != 'false'
|
||||
efi_cc = get_option('efi-cc')
|
||||
efi_ld = get_option('efi-ld')
|
||||
|
||||
efi_incdir = get_option('efi-includedir')
|
||||
have_header = (gnu_efi_arch != '' and
|
||||
cc.has_header('@0@/@1@/efibind.h'.format(efi_incdir, gnu_efi_arch)))
|
||||
|
||||
if have_header and EFI_MACHINE_TYPE_NAME == ''
|
||||
error('gnu-efi is available, but EFI_MACHINE_TYPE_NAME is unknown')
|
||||
endif
|
||||
|
||||
efi_libdir = get_option('efi-libdir')
|
||||
if efi_libdir == ''
|
||||
cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
|
||||
ret = run_command('sh', '-c', cmd)
|
||||
if ret.returncode() == 0
|
||||
efi_libdir = ret.stdout().strip()
|
||||
endif
|
||||
endif
|
||||
|
||||
have_gnu_efi = have_header and efi_libdir != ''
|
||||
else
|
||||
have_gnu_efi = false
|
||||
endif
|
||||
|
||||
if get_option('gnu-efi') == 'true' and not have_gnu_efi
|
||||
error('gnu-efi support requested, but headers were not found')
|
||||
endif
|
||||
|
||||
if have_gnu_efi
|
||||
efi_conf = configuration_data()
|
||||
efi_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
|
||||
|
||||
efi_config_h = configure_file(
|
||||
output : 'efi_config.h',
|
||||
configuration : efi_conf)
|
||||
|
||||
objcopy = find_program('objcopy')
|
||||
|
||||
efi_ldsdir = get_option('efi-ldsdir')
|
||||
arch_lds = 'elf_@0@_efi.lds'.format(gnu_efi_arch)
|
||||
if efi_ldsdir == ''
|
||||
efi_ldsdir = join_paths(efi_libdir, 'gnuefi')
|
||||
cmd = run_command('test', '-f', join_paths(efi_ldsdir, arch_lds))
|
||||
if cmd.returncode() != 0
|
||||
efi_ldsdir = efi_libdir
|
||||
cmd = run_command('test', '-f', join_paths(efi_ldsdir, arch_lds))
|
||||
if cmd.returncode() != 0
|
||||
error('Cannot find @0@'.format(arch_lds))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
message('efi-libdir: "@0@"'.format(efi_libdir))
|
||||
message('efi-ldsdir: "@0@"'.format(efi_ldsdir))
|
||||
message('efi-includedir: "@0@"'.format(efi_incdir))
|
||||
|
||||
compile_args = ['-Wall',
|
||||
'-Wextra',
|
||||
'-std=gnu90',
|
||||
'-nostdinc',
|
||||
'-ggdb', '-O0',
|
||||
'-fpic',
|
||||
'-fshort-wchar',
|
||||
'-ffreestanding',
|
||||
'-fno-strict-aliasing',
|
||||
'-fno-stack-protector',
|
||||
'-Wsign-compare',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-isystem', efi_incdir,
|
||||
'-isystem', join_paths(efi_incdir, gnu_efi_arch),
|
||||
'-include', efi_config_h]
|
||||
if efi_arch == 'x86_64'
|
||||
compile_args += ['-mno-red-zone',
|
||||
'-mno-sse',
|
||||
'-mno-mmx',
|
||||
'-DEFI_FUNCTION_WRAPPER',
|
||||
'-DGNU_EFI_USE_MS_ABI']
|
||||
elif efi_arch == 'ia32'
|
||||
compile_args += ['-mno-sse',
|
||||
'-mno-mmx']
|
||||
endif
|
||||
|
||||
efi_ldflags = ['-T',
|
||||
join_paths(efi_ldsdir, arch_lds),
|
||||
'-shared',
|
||||
'-Bsymbolic',
|
||||
'-nostdlib',
|
||||
'-znocombreloc',
|
||||
'-L', efi_libdir,
|
||||
join_paths(efi_ldsdir, 'crt0-efi-@0@.o'.format(gnu_efi_arch))]
|
||||
if efi_arch == 'aarch64' or efi_arch == 'arm'
|
||||
# Aarch64 and ARM32 don't have an EFI capable objcopy. Use 'binary'
|
||||
# instead, and add required symbols manually.
|
||||
efi_ldflags += ['--defsym=EFI_SUBSYSTEM=0xa']
|
||||
efi_format = ['-O', 'binary']
|
||||
else
|
||||
efi_format = ['--target=efi-app-@0@'.format(gnu_efi_arch)]
|
||||
endif
|
||||
|
||||
systemd_boot_objects = []
|
||||
stub_objects = []
|
||||
foreach file : common_sources + systemd_boot_sources + stub_sources
|
||||
o_file = custom_target(file + '.o',
|
||||
input : file,
|
||||
output : file + '.o',
|
||||
command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
|
||||
+ compile_args,
|
||||
depend_files : efi_headers)
|
||||
if (common_sources + systemd_boot_sources).contains(file)
|
||||
systemd_boot_objects += [o_file]
|
||||
endif
|
||||
if (common_sources + stub_sources).contains(file)
|
||||
stub_objects += [o_file]
|
||||
endif
|
||||
endforeach
|
||||
|
||||
libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
|
||||
systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
|
||||
stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
|
||||
no_undefined_symbols = find_program('no-undefined-symbols.sh')
|
||||
|
||||
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects],
|
||||
['stub.so', stub_efi_name, stub_objects]]
|
||||
so = custom_target(
|
||||
tuple[0],
|
||||
input : tuple[2],
|
||||
output : tuple[0],
|
||||
command : [efi_ld, '-o', '@OUTPUT@'] +
|
||||
efi_ldflags + tuple[2] +
|
||||
['-lefi', '-lgnuefi', libgcc_file_name])
|
||||
|
||||
test('no-undefined-symbols-' + tuple[0],
|
||||
no_undefined_symbols,
|
||||
args : [so])
|
||||
|
||||
stub = custom_target(
|
||||
tuple[1],
|
||||
input : so,
|
||||
output : tuple[1],
|
||||
command : [objcopy,
|
||||
'-j', '.text',
|
||||
'-j', '.sdata',
|
||||
'-j', '.data',
|
||||
'-j', '.dynamic',
|
||||
'-j', '.dynsym',
|
||||
'-j', '.rel',
|
||||
'-j', '.rela',
|
||||
'-j', '.reloc']
|
||||
+ efi_format +
|
||||
['@INPUT@', '@OUTPUT@'],
|
||||
install : true,
|
||||
install_dir : bootlibdir)
|
||||
|
||||
set_variable(tuple[0].underscorify(), so)
|
||||
set_variable(tuple[0].underscorify() + '_stub', stub)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
if have_gnu_efi
|
||||
test_efi_disk_img = custom_target(
|
||||
'test-efi-disk.img',
|
||||
input : [systemd_boot_so, stub_so_stub],
|
||||
output : 'test-efi-disk.img',
|
||||
command : [test_efi_create_disk_sh, '@OUTPUT@',
|
||||
'@INPUT0@', '@INPUT1@', splash_bmp])
|
||||
endif
|
6
src/boot/efi/no-undefined-symbols.sh
Executable file
6
src/boot/efi/no-undefined-symbols.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
if nm -D -u "$1" | grep ' U '; then
|
||||
echo "Undefined symbols detected!"
|
||||
exit 1
|
||||
fi
|
14
src/core/load-fragment-gperf-nulstr.awk
Normal file
14
src/core/load-fragment-gperf-nulstr.awk
Normal file
@ -0,0 +1,14 @@
|
||||
BEGIN{
|
||||
keywords=0 ; FS="," ;
|
||||
print "extern const char load_fragment_gperf_nulstr[];" ;
|
||||
print "const char load_fragment_gperf_nulstr[] ="
|
||||
}
|
||||
keyword==1 {
|
||||
print "\"" $$1 "\\0\""
|
||||
}
|
||||
/%%/ {
|
||||
keyword=1
|
||||
}
|
||||
END {
|
||||
print ";"
|
||||
}
|
234
src/core/meson.build
Normal file
234
src/core/meson.build
Normal file
@ -0,0 +1,234 @@
|
||||
libcore_la_sources = '''
|
||||
unit.c
|
||||
unit.h
|
||||
unit-printf.c
|
||||
unit-printf.h
|
||||
job.c
|
||||
job.h
|
||||
manager.c
|
||||
manager.h
|
||||
transaction.c
|
||||
transaction.h
|
||||
load-fragment.c
|
||||
load-fragment.h
|
||||
service.c
|
||||
service.h
|
||||
socket.c
|
||||
socket.h
|
||||
busname.c
|
||||
busname.h
|
||||
bus-policy.c
|
||||
bus-policy.h
|
||||
target.c
|
||||
target.h
|
||||
device.c
|
||||
device.h
|
||||
mount.c
|
||||
mount.h
|
||||
automount.c
|
||||
automount.h
|
||||
swap.c
|
||||
swap.h
|
||||
timer.c
|
||||
timer.h
|
||||
path.c
|
||||
path.h
|
||||
slice.c
|
||||
slice.h
|
||||
scope.c
|
||||
scope.h
|
||||
load-dropin.c
|
||||
load-dropin.h
|
||||
execute.c
|
||||
execute.h
|
||||
dynamic-user.c
|
||||
dynamic-user.h
|
||||
kill.c
|
||||
kill.h
|
||||
dbus.c
|
||||
dbus.h
|
||||
dbus-manager.c
|
||||
dbus-manager.h
|
||||
dbus-unit.c
|
||||
dbus-unit.h
|
||||
dbus-job.c
|
||||
dbus-job.h
|
||||
dbus-service.c
|
||||
dbus-service.h
|
||||
dbus-socket.c
|
||||
dbus-socket.h
|
||||
dbus-busname.c
|
||||
dbus-busname.h
|
||||
dbus-target.c
|
||||
dbus-target.h
|
||||
dbus-device.c
|
||||
dbus-device.h
|
||||
dbus-mount.c
|
||||
dbus-mount.h
|
||||
dbus-automount.c
|
||||
dbus-automount.h
|
||||
dbus-swap.c
|
||||
dbus-swap.h
|
||||
dbus-timer.c
|
||||
dbus-timer.h
|
||||
dbus-path.c
|
||||
dbus-path.h
|
||||
dbus-slice.c
|
||||
dbus-slice.h
|
||||
dbus-scope.c
|
||||
dbus-scope.h
|
||||
dbus-execute.c
|
||||
dbus-execute.h
|
||||
dbus-kill.c
|
||||
dbus-kill.h
|
||||
dbus-cgroup.c
|
||||
dbus-cgroup.h
|
||||
cgroup.c
|
||||
cgroup.h
|
||||
selinux-access.c
|
||||
selinux-access.h
|
||||
selinux-setup.c
|
||||
selinux-setup.h
|
||||
smack-setup.c
|
||||
smack-setup.h
|
||||
ima-setup.c
|
||||
ima-setup.h
|
||||
locale-setup.h
|
||||
locale-setup.c
|
||||
hostname-setup.c
|
||||
hostname-setup.h
|
||||
machine-id-setup.c
|
||||
machine-id-setup.h
|
||||
mount-setup.c
|
||||
mount-setup.h
|
||||
kmod-setup.c
|
||||
kmod-setup.h
|
||||
loopback-setup.h
|
||||
loopback-setup.c
|
||||
namespace.c
|
||||
namespace.h
|
||||
killall.h
|
||||
killall.c
|
||||
audit-fd.c
|
||||
audit-fd.h
|
||||
show-status.c
|
||||
show-status.h
|
||||
emergency-action.c
|
||||
emergency-action.h
|
||||
'''.split()
|
||||
|
||||
load_fragment_gperf_gperf = custom_target(
|
||||
'load-fragment-gperf.gperf',
|
||||
input : 'load-fragment-gperf.gperf.m4',
|
||||
output: 'load-fragment-gperf.gperf',
|
||||
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
load_fragment_gperf_c = custom_target(
|
||||
'load-fragment-gperf.c',
|
||||
input : load_fragment_gperf_gperf,
|
||||
output : 'load-fragment-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
awkscript = 'load-fragment-gperf-nulstr.awk'
|
||||
load_fragment_gperf_nulstr_c = custom_target(
|
||||
'load-fragment-gperf-nulstr.c',
|
||||
input : [awkscript, load_fragment_gperf_gperf],
|
||||
output : 'load-fragment-gperf-nulstr.c',
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
libcore = static_library(
|
||||
'core',
|
||||
libcore_la_sources,
|
||||
load_fragment_gperf_c,
|
||||
load_fragment_gperf_nulstr_c,
|
||||
include_directories : includes,
|
||||
link_with : [libshared_static],
|
||||
dependencies : [threads,
|
||||
libpam,
|
||||
libaudit,
|
||||
libkmod,
|
||||
libapparmor,
|
||||
libmount])
|
||||
|
||||
systemd_sources = files('main.c')
|
||||
|
||||
systemd_shutdown_sources = files('''
|
||||
shutdown.c
|
||||
umount.c
|
||||
umount.h
|
||||
mount-setup.c
|
||||
mount-setup.h
|
||||
killall.c
|
||||
killall.h
|
||||
'''.split())
|
||||
|
||||
in_files = [['macros.systemd', rpmmacrosdir],
|
||||
['triggers.systemd', ''],
|
||||
['systemd.pc', pkgconfigdatadir]]
|
||||
|
||||
foreach item : in_files
|
||||
file = item[0]
|
||||
dir = item[1]
|
||||
|
||||
# If 'no', disable generation completely.
|
||||
# If '', generate, but do not install.
|
||||
if dir != 'no'
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
if dir != ''
|
||||
install_data(gen,
|
||||
install_dir : dir)
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
install_data('org.freedesktop.systemd1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.systemd1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
policy_in = configure_file(
|
||||
input : 'org.freedesktop.systemd1.policy.in.in',
|
||||
output : 'org.freedesktop.systemd1.policy.in',
|
||||
configuration : substs)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.systemd1.policy',
|
||||
input : policy_in,
|
||||
output : 'org.freedesktop.systemd1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
|
||||
# TODO: this might work with meson from git, see
|
||||
# https://github.com/mesonbuild/meson/issues/1441#issuecomment-283585493
|
||||
#
|
||||
# i18n.merge_file(
|
||||
# 'org.freedesktop.systemd1.policy',
|
||||
# po_dir : po_dir,
|
||||
# input : policy_in,
|
||||
# output : 'org.freedesktop.systemd1.policy',
|
||||
# install : install_polkit,
|
||||
# install_dir : polkitpolicydir)
|
||||
|
||||
install_data('system.conf',
|
||||
'user.conf',
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
|
||||
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/multi-user.target.wants')))
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
|
||||
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')))
|
24
src/coredump/meson.build
Normal file
24
src/coredump/meson.build
Normal file
@ -0,0 +1,24 @@
|
||||
systemd_coredump_sources = files('''
|
||||
coredump.c
|
||||
coredump-vacuum.c
|
||||
coredump-vacuum.h
|
||||
'''.split())
|
||||
|
||||
if conf.get('HAVE_ELFUTILS', 0) == 1
|
||||
systemd_coredump_sources += files(['stacktrace.c',
|
||||
'stacktrace.h'])
|
||||
endif
|
||||
|
||||
coredumpctl_sources = files('coredumpctl.c')
|
||||
|
||||
install_data('coredump.conf',
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
tests += [
|
||||
[['src/coredump/test-coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.c',
|
||||
'src/coredump/coredump-vacuum.h'],
|
||||
[],
|
||||
[],
|
||||
'ENABLE_COREDUMP', 'manual'],
|
||||
]
|
14
src/hostname/meson.build
Normal file
14
src/hostname/meson.build
Normal file
@ -0,0 +1,14 @@
|
||||
install_data('org.freedesktop.hostname1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.hostname1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
if conf.get('ENABLE_HOSTNAMED', 0) == 1
|
||||
custom_target(
|
||||
'org.freedesktop.hostname1.policy',
|
||||
input : 'org.freedesktop.hostname1.policy.in',
|
||||
output : 'org.freedesktop.hostname1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
77
src/import/meson.build
Normal file
77
src/import/meson.build
Normal file
@ -0,0 +1,77 @@
|
||||
systemd_importd_sources = files('''
|
||||
importd.c
|
||||
'''.split())
|
||||
|
||||
systemd_pull_sources = files('''
|
||||
pull.c
|
||||
pull-raw.c
|
||||
pull-raw.h
|
||||
pull-tar.c
|
||||
pull-tar.h
|
||||
pull-job.c
|
||||
pull-job.h
|
||||
pull-common.c
|
||||
pull-common.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
curl-util.c
|
||||
curl-util.h
|
||||
qcow2-util.c
|
||||
qcow2-util.h
|
||||
'''.split())
|
||||
|
||||
systemd_import_sources = files('''
|
||||
import.c
|
||||
import-raw.c
|
||||
import-raw.h
|
||||
import-tar.c
|
||||
import-tar.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
qcow2-util.c
|
||||
qcow2-util.h
|
||||
'''.split())
|
||||
|
||||
systemd_export_sources = files('''
|
||||
export.c
|
||||
export-tar.c
|
||||
export-tar.h
|
||||
export-raw.c
|
||||
export-raw.h
|
||||
import-common.c
|
||||
import-common.h
|
||||
import-compress.c
|
||||
import-compress.h
|
||||
'''.split())
|
||||
|
||||
if conf.get('ENABLE_IMPORTD', 0) == 1
|
||||
install_data('org.freedesktop.import1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.import1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.import1.policy',
|
||||
input : 'org.freedesktop.import1.policy.in',
|
||||
output : 'org.freedesktop.import1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
|
||||
install_data('import-pubring.gpg',
|
||||
install_dir : rootlibexecdir)
|
||||
# TODO: shouldn't this be in pkgdatadir?
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/import/test-qcow2.c',
|
||||
'src/import/qcow2-util.c',
|
||||
'src/import/qcow2-util.h'],
|
||||
[libshared],
|
||||
[libz],
|
||||
'HAVE_ZLIB', 'manual'],
|
||||
]
|
49
src/journal-remote/meson.build
Normal file
49
src/journal-remote/meson.build
Normal file
@ -0,0 +1,49 @@
|
||||
systemd_journal_upload_sources = files('''
|
||||
journal-upload.h
|
||||
journal-upload.c
|
||||
journal-upload-journal.c
|
||||
'''.split())
|
||||
|
||||
systemd_journal_remote_sources = files('''
|
||||
journal-remote-parse.h
|
||||
journal-remote-parse.c
|
||||
journal-remote-write.h
|
||||
journal-remote-write.c
|
||||
journal-remote.h
|
||||
journal-remote.c
|
||||
microhttpd-util.h
|
||||
microhttpd-util.c
|
||||
'''.split())
|
||||
|
||||
systemd_journal_gatewayd_sources = files('''
|
||||
journal-gatewayd.c
|
||||
microhttpd-util.h
|
||||
microhttpd-util.c
|
||||
'''.split())
|
||||
|
||||
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_LIBCURL', 0) == 1
|
||||
journal_upload_conf = configure_file(
|
||||
input : 'journal-upload.conf.in',
|
||||
output : 'journal-upload.conf',
|
||||
configuration : substs)
|
||||
install_data(journal_upload_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
endif
|
||||
|
||||
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
|
||||
journal_remote_conf = configure_file(
|
||||
input : 'journal-remote.conf.in',
|
||||
output : 'journal-remote.conf',
|
||||
configuration : substs)
|
||||
install_data(journal_remote_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
endif
|
||||
|
||||
install_data('browse.html',
|
||||
install_dir : join_paths(pkgdatadir, 'gatewayd'))
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format('/var/log/journal/remote'))
|
||||
meson.add_install_script('sh', '-c',
|
||||
'chown 0:0 $DESTDIR/var/log/journal/remote &&
|
||||
chmod 755 $DESTDIR/var/log/journal/remote || :')
|
9
src/journal/audit_type-to-name.awk
Normal file
9
src/journal/audit_type-to-name.awk
Normal file
@ -0,0 +1,9 @@
|
||||
BEGIN{
|
||||
print "const char *audit_type_to_string(int type) {\n\tswitch(type) {"
|
||||
}
|
||||
{
|
||||
printf " case AUDIT_%s: return \"%s\";\n", $1, $1
|
||||
}
|
||||
END{
|
||||
print " default: return NULL;\n\t}\n}\n"
|
||||
}
|
@ -40,6 +40,9 @@
|
||||
#define RND_GEN_Q 0x02
|
||||
#define RND_GEN_X 0x03
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wpointer-arith"
|
||||
/* TODO: remove void* arithmetic and this work-around */
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static void mpi_export(void *buf, size_t buflen, const gcry_mpi_t x) {
|
||||
|
14
src/journal/generate-audit_type-list.sh
Executable file
14
src/journal/generate-audit_type-list.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
cpp="$1"
|
||||
shift
|
||||
|
||||
includes=""
|
||||
for i in "$@"; do
|
||||
includes="$includes -include $i"
|
||||
done
|
||||
|
||||
$cpp -dM $includes - </dev/null | \
|
||||
grep -vE 'AUDIT_.*(FIRST|LAST)_' | \
|
||||
sed -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | \
|
||||
sort -k2
|
122
src/journal/meson.build
Normal file
122
src/journal/meson.build
Normal file
@ -0,0 +1,122 @@
|
||||
journal_internal_sources = files('''
|
||||
audit-type.c
|
||||
audit-type.h
|
||||
catalog.c
|
||||
catalog.h
|
||||
compress.c
|
||||
compress.h
|
||||
journal-def.h
|
||||
journal-file.c
|
||||
journal-file.h
|
||||
journal-send.c
|
||||
journal-vacuum.c
|
||||
journal-vacuum.h
|
||||
journal-verify.c
|
||||
journal-verify.h
|
||||
lookup3.c
|
||||
lookup3.h
|
||||
mmap-cache.c
|
||||
mmap-cache.h
|
||||
sd-journal.c
|
||||
'''.split())
|
||||
|
||||
if conf.get('HAVE_GCRYPT', 0) == 1
|
||||
journal_internal_sources += files('''
|
||||
journal-authenticate.c
|
||||
journal-authenticate.h
|
||||
fsprg.c
|
||||
fsprg.h
|
||||
'''.split())
|
||||
|
||||
journal_internal_sources += gcrypt_util_sources
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
audit_type_includes = [config_h,
|
||||
missing_h,
|
||||
'linux/audit.h']
|
||||
if conf.get('HAVE_AUDIT', 0) == 1
|
||||
audit_type_includes += 'libaudit.h'
|
||||
endif
|
||||
|
||||
generate_audit_type_list = find_program('generate-audit_type-list.sh')
|
||||
audit_type_list_txt = custom_target(
|
||||
'audit_type-list.txt',
|
||||
output : 'audit_type-list.txt',
|
||||
command : [generate_audit_type_list, cpp] + audit_type_includes,
|
||||
capture : true)
|
||||
|
||||
audit_type_to_name = custom_target(
|
||||
'audit_type-to-name.h',
|
||||
input : ['audit_type-to-name.awk', audit_type_list_txt],
|
||||
output : 'audit_type-to-name.h',
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
journal_internal_sources += [audit_type_to_name]
|
||||
|
||||
############################################################
|
||||
|
||||
libjournal_core_sources = files('''
|
||||
journald-kmsg.c
|
||||
journald-kmsg.h
|
||||
journald-syslog.c
|
||||
journald-syslog.h
|
||||
journald-stream.c
|
||||
journald-stream.h
|
||||
journald-server.c
|
||||
journald-server.h
|
||||
journald-console.c
|
||||
journald-console.h
|
||||
journald-wall.c
|
||||
journald-wall.h
|
||||
journald-native.c
|
||||
journald-native.h
|
||||
journald-audit.c
|
||||
journald-audit.h
|
||||
journald-rate-limit.c
|
||||
journald-rate-limit.h
|
||||
journal-internal.h
|
||||
'''.split())
|
||||
|
||||
systemd_journald_sources = files('''
|
||||
journald.c
|
||||
journald-server.h
|
||||
'''.split())
|
||||
|
||||
journald_gperf_c = custom_target(
|
||||
'journald-gperf.c',
|
||||
input : 'journald-gperf.gperf',
|
||||
output : 'journald-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_cat_sources = files('cat.c')
|
||||
|
||||
journalctl_sources = files('journalctl.c')
|
||||
|
||||
if conf.get('HAVE_QRENCODE', 0) == 1
|
||||
journalctl_sources += files('journal-qrcode.c',
|
||||
'journal-qrcode.h')
|
||||
endif
|
||||
|
||||
install_data('journald.conf',
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
mkdir_p.format('/var/log/journal'))
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
'chown 0:0 $DESTDIR/var/log/journal &&
|
||||
chmod 755 $DESTDIR/var/log/journal || :')
|
||||
if get_option('adm-group')
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
|
||||
endif
|
||||
if get_option('wheel-group')
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
|
||||
endif
|
11
src/kernel-install/meson.build
Normal file
11
src/kernel-install/meson.build
Normal file
@ -0,0 +1,11 @@
|
||||
install_data('kernel-install',
|
||||
install_mode : 'rwxr-xr-x',
|
||||
install_dir : bindir)
|
||||
|
||||
install_data('50-depmod.install',
|
||||
'90-loaderentry.install',
|
||||
install_mode : 'rwxr-xr-x',
|
||||
install_dir : kernelinstalldir)
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
|
46
src/libsystemd-network/meson.build
Normal file
46
src/libsystemd-network/meson.build
Normal file
@ -0,0 +1,46 @@
|
||||
sources = files('''
|
||||
sd-dhcp-client.c
|
||||
sd-dhcp-server.c
|
||||
dhcp-network.c
|
||||
dhcp-option.c
|
||||
dhcp-packet.c
|
||||
dhcp-internal.h
|
||||
dhcp-server-internal.h
|
||||
dhcp-protocol.h
|
||||
dhcp-lease-internal.h
|
||||
sd-dhcp-lease.c
|
||||
sd-ipv4ll.c
|
||||
sd-ipv4acd.c
|
||||
arp-util.h
|
||||
arp-util.c
|
||||
network-internal.c
|
||||
sd-ndisc.c
|
||||
ndisc-internal.h
|
||||
ndisc-router.h
|
||||
ndisc-router.c
|
||||
icmp6-util.h
|
||||
icmp6-util.c
|
||||
sd-dhcp6-client.c
|
||||
dhcp6-internal.h
|
||||
dhcp6-protocol.h
|
||||
dhcp6-network.c
|
||||
dhcp6-option.c
|
||||
dhcp6-lease-internal.h
|
||||
sd-dhcp6-lease.c
|
||||
dhcp-identifier.h
|
||||
dhcp-identifier.c
|
||||
lldp-internal.h
|
||||
lldp-network.h
|
||||
lldp-network.c
|
||||
lldp-neighbor.h
|
||||
lldp-neighbor.c
|
||||
sd-lldp.c
|
||||
'''.split())
|
||||
|
||||
network_internal_h = files('network-internal.h')
|
||||
|
||||
libsystemd_network = static_library(
|
||||
'systemd-network',
|
||||
sources,
|
||||
network_internal_h,
|
||||
include_directories : includes)
|
96
src/libsystemd/meson.build
Normal file
96
src/libsystemd/meson.build
Normal file
@ -0,0 +1,96 @@
|
||||
sd_login_c = files('sd-login/sd-login.c')
|
||||
|
||||
libsystemd_internal_sources = files('''
|
||||
sd-bus/bus-bloom.c
|
||||
sd-bus/bus-bloom.h
|
||||
sd-bus/bus-common-errors.c
|
||||
sd-bus/bus-common-errors.h
|
||||
sd-bus/bus-container.c
|
||||
sd-bus/bus-container.h
|
||||
sd-bus/bus-control.c
|
||||
sd-bus/bus-control.h
|
||||
sd-bus/bus-convenience.c
|
||||
sd-bus/bus-creds.c
|
||||
sd-bus/bus-creds.h
|
||||
sd-bus/bus-dump.c
|
||||
sd-bus/bus-dump.h
|
||||
sd-bus/bus-error.c
|
||||
sd-bus/bus-error.h
|
||||
sd-bus/bus-gvariant.c
|
||||
sd-bus/bus-gvariant.h
|
||||
sd-bus/bus-internal.c
|
||||
sd-bus/bus-internal.h
|
||||
sd-bus/bus-introspect.c
|
||||
sd-bus/bus-introspect.h
|
||||
sd-bus/bus-kernel.c
|
||||
sd-bus/bus-kernel.h
|
||||
sd-bus/bus-match.c
|
||||
sd-bus/bus-match.h
|
||||
sd-bus/bus-message.c
|
||||
sd-bus/bus-message.h
|
||||
sd-bus/bus-objects.c
|
||||
sd-bus/bus-objects.h
|
||||
sd-bus/bus-protocol.h
|
||||
sd-bus/bus-signature.c
|
||||
sd-bus/bus-signature.h
|
||||
sd-bus/bus-slot.c
|
||||
sd-bus/bus-slot.h
|
||||
sd-bus/bus-socket.c
|
||||
sd-bus/bus-socket.h
|
||||
sd-bus/bus-track.c
|
||||
sd-bus/bus-track.h
|
||||
sd-bus/bus-type.c
|
||||
sd-bus/bus-type.h
|
||||
sd-bus/kdbus.h
|
||||
sd-bus/sd-bus.c
|
||||
sd-daemon/sd-daemon.c
|
||||
sd-device/device-enumerator-private.h
|
||||
sd-device/device-enumerator.c
|
||||
sd-device/device-internal.h
|
||||
sd-device/device-private.c
|
||||
sd-device/device-private.h
|
||||
sd-device/device-util.h
|
||||
sd-device/sd-device.c
|
||||
sd-event/sd-event.c
|
||||
sd-hwdb/hwdb-internal.h
|
||||
sd-hwdb/hwdb-util.h
|
||||
sd-hwdb/sd-hwdb.c
|
||||
sd-id128/id128-util.c
|
||||
sd-id128/id128-util.h
|
||||
sd-id128/sd-id128.c
|
||||
sd-netlink/local-addresses.c
|
||||
sd-netlink/local-addresses.h
|
||||
sd-netlink/netlink-internal.h
|
||||
sd-netlink/netlink-message.c
|
||||
sd-netlink/netlink-socket.c
|
||||
sd-netlink/netlink-types.c
|
||||
sd-netlink/netlink-types.h
|
||||
sd-netlink/netlink-util.c
|
||||
sd-netlink/netlink-util.h
|
||||
sd-netlink/rtnl-message.c
|
||||
sd-netlink/sd-netlink.c
|
||||
sd-network/network-util.c
|
||||
sd-network/network-util.h
|
||||
sd-network/sd-network.c
|
||||
sd-path/sd-path.c
|
||||
sd-resolve/sd-resolve.c
|
||||
sd-utf8/sd-utf8.c
|
||||
'''.split()) + sd_login_c
|
||||
|
||||
libsystemd_internal = static_library(
|
||||
'systemd',
|
||||
libsystemd_internal_sources,
|
||||
install : false,
|
||||
include_directories : includes,
|
||||
link_with : libbasic,
|
||||
dependencies : [threads,
|
||||
librt])
|
||||
|
||||
libsystemd_sym = 'src/libsystemd/libsystemd.sym'
|
||||
|
||||
libsystemd_pc = configure_file(
|
||||
input : 'libsystemd.pc.in',
|
||||
output : 'libsystemd.pc',
|
||||
configuration : substs)
|
||||
install_data(libsystemd_pc,
|
||||
install_dir : pkgconfiglibdir)
|
41
src/libudev/meson.build
Normal file
41
src/libudev/meson.build
Normal file
@ -0,0 +1,41 @@
|
||||
libudev_sources = files('''
|
||||
libudev-private.h
|
||||
libudev-device-internal.h
|
||||
libudev.c
|
||||
libudev-list.c
|
||||
libudev-util.c
|
||||
libudev-device.c
|
||||
libudev-device-private.c
|
||||
libudev-enumerate.c
|
||||
libudev-monitor.c
|
||||
libudev-queue.c
|
||||
libudev-hwdb.c
|
||||
'''.split())
|
||||
|
||||
############################################################
|
||||
|
||||
libudev_sym = 'libudev.sym'
|
||||
libudev_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libudev_sym)
|
||||
libudev = shared_library(
|
||||
'udev',
|
||||
libudev_sources,
|
||||
version : '1.6.6',
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libudev_sym_path],
|
||||
link_with : [libbasic,
|
||||
libsystemd_internal],
|
||||
dependencies : [threads],
|
||||
link_depends : libudev_sym,
|
||||
install : true,
|
||||
install_dir : rootlibdir)
|
||||
|
||||
install_headers('libudev.h')
|
||||
libudev_h_path = '@0@/libudev.h'.format(meson.current_source_dir())
|
||||
|
||||
libudev_pc = configure_file(
|
||||
input : 'libudev.pc.in',
|
||||
output : 'libudev.pc',
|
||||
configuration : substs)
|
||||
install_data(libudev_pc,
|
||||
install_dir : pkgconfiglibdir)
|
40
src/locale/meson.build
Normal file
40
src/locale/meson.build
Normal file
@ -0,0 +1,40 @@
|
||||
systemd_localed_sources = files('''
|
||||
localed.c
|
||||
keymap-util.c
|
||||
keymap-util.h
|
||||
'''.split())
|
||||
|
||||
localectl_sources = files('localectl.c')
|
||||
|
||||
if conf.get('ENABLE_LOCALED', 0) == 1
|
||||
install_data('org.freedesktop.locale1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.locale1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.locale1.policy',
|
||||
input : 'org.freedesktop.locale1.policy.in',
|
||||
output : 'org.freedesktop.locale1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
||||
|
||||
# If you know a way that allows the same variables to be used
|
||||
# in sources list and concatenated to a string for test_env,
|
||||
# let me know.
|
||||
kbd_model_map = join_paths(meson.current_source_dir(), 'kbd-model-map')
|
||||
language_fallback_map = join_paths(meson.current_source_dir(), 'language-fallback-map')
|
||||
|
||||
install_data('kbd-model-map',
|
||||
'language-fallback-map',
|
||||
install_dir : pkgdatadir)
|
||||
|
||||
tests += [
|
||||
[['src/locale/test-keymap-util.c',
|
||||
'src/locale/keymap-util.c',
|
||||
'src/locale/keymap-util.h'],
|
||||
[libshared],
|
||||
[libdl]],
|
||||
]
|
104
src/login/meson.build
Normal file
104
src/login/meson.build
Normal file
@ -0,0 +1,104 @@
|
||||
systemd_logind_sources = files('''
|
||||
logind.c
|
||||
logind.h
|
||||
'''.split())
|
||||
|
||||
logind_gperf_c = custom_target(
|
||||
'logind_gperf.c',
|
||||
input : 'logind-gperf.gperf',
|
||||
output : 'logind-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_logind_sources += [logind_gperf_c]
|
||||
|
||||
|
||||
liblogind_core_sources = files('''
|
||||
logind-core.c
|
||||
logind-device.c
|
||||
logind-device.h
|
||||
logind-button.c
|
||||
logind-button.h
|
||||
logind-action.c
|
||||
logind-action.h
|
||||
logind-seat.c
|
||||
logind-seat.h
|
||||
logind-session.c
|
||||
logind-session.h
|
||||
logind-session-device.c
|
||||
logind-session-device.h
|
||||
logind-user.c
|
||||
logind-user.h
|
||||
logind-inhibit.c
|
||||
logind-inhibit.h
|
||||
logind-dbus.c
|
||||
logind-session-dbus.c
|
||||
logind-seat-dbus.c
|
||||
logind-user-dbus.c
|
||||
logind-utmp.c
|
||||
logind-acl.h
|
||||
'''.split())
|
||||
|
||||
logind_acl_c = files('logind-acl.c')
|
||||
if conf.get('HAVE_ACL', 0) == 1
|
||||
liblogind_core_sources += logind_acl_c
|
||||
endif
|
||||
|
||||
liblogind_core = static_library(
|
||||
'logind-core',
|
||||
liblogind_core_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [libacl])
|
||||
|
||||
loginctl_sources = files('''
|
||||
loginctl.c
|
||||
sysfs-show.h
|
||||
sysfs-show.c
|
||||
'''.split())
|
||||
|
||||
if conf.get('ENABLE_LOGIND', 0) == 1
|
||||
logind_conf = configure_file(
|
||||
input : 'logind.conf.in',
|
||||
output : 'logind.conf',
|
||||
configuration : substs)
|
||||
install_data(logind_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
|
||||
pam_systemd_sym = 'src/login/pam_systemd.sym'
|
||||
pam_systemd_c = files('pam_systemd.c')
|
||||
|
||||
install_data('org.freedesktop.login1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.login1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.login1.policy',
|
||||
input : 'org.freedesktop.login1.policy.in',
|
||||
output : 'org.freedesktop.login1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
|
||||
install_data('70-power-switch.rules',
|
||||
'70-uaccess.rules',
|
||||
install_dir : udevrulesdir)
|
||||
|
||||
foreach file : ['71-seat.rules',
|
||||
'73-seat-late.rules']
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
install_data(gen,
|
||||
install_dir : udevrulesdir)
|
||||
endforeach
|
||||
|
||||
custom_target(
|
||||
'systemd-user',
|
||||
input : 'systemd-user.m4',
|
||||
output: 'systemd-user',
|
||||
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
|
||||
capture : true,
|
||||
install : pamconfdir != 'no',
|
||||
install_dir : pamconfdir)
|
||||
endif
|
46
src/machine/meson.build
Normal file
46
src/machine/meson.build
Normal file
@ -0,0 +1,46 @@
|
||||
systemd_machined_sources = files('''
|
||||
machined.c
|
||||
machined.h
|
||||
'''.split())
|
||||
|
||||
libmachine_core_sources = files('''
|
||||
machine.c
|
||||
machine.h
|
||||
machined-dbus.c
|
||||
machine-dbus.c
|
||||
machine-dbus.h
|
||||
image-dbus.c
|
||||
image-dbus.h
|
||||
operation.c
|
||||
operation.h
|
||||
'''.split())
|
||||
|
||||
libmachine_core = static_library(
|
||||
'machine-core',
|
||||
libmachine_core_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [threads])
|
||||
|
||||
if conf.get('ENABLE_MACHINED', 0) == 1
|
||||
install_data('org.freedesktop.machine1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.machine1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.machine1.policy',
|
||||
input : 'org.freedesktop.machine1.policy.in',
|
||||
output : 'org.freedesktop.machine1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/machine/test-machine-tables.c'],
|
||||
[libmachine_core,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads],
|
||||
'ENABLE_MACHINED'],
|
||||
]
|
146
src/network/meson.build
Normal file
146
src/network/meson.build
Normal file
@ -0,0 +1,146 @@
|
||||
sources = files('''
|
||||
netdev/bond.c
|
||||
netdev/bond.h
|
||||
netdev/bridge.c
|
||||
netdev/bridge.h
|
||||
netdev/dummy.c
|
||||
netdev/dummy.h
|
||||
netdev/ipvlan.c
|
||||
netdev/ipvlan.h
|
||||
netdev/macvlan.c
|
||||
netdev/macvlan.h
|
||||
netdev/netdev.c
|
||||
netdev/netdev.h
|
||||
netdev/tunnel.c
|
||||
netdev/tunnel.h
|
||||
netdev/tuntap.c
|
||||
netdev/tuntap.h
|
||||
netdev/vcan.c
|
||||
netdev/vcan.h
|
||||
netdev/veth.c
|
||||
netdev/veth.h
|
||||
netdev/vlan.c
|
||||
netdev/vlan.h
|
||||
netdev/vrf.c
|
||||
netdev/vrf.h
|
||||
netdev/vxlan.c
|
||||
netdev/vxlan.h
|
||||
networkd-address-pool.c
|
||||
networkd-address-pool.h
|
||||
networkd-address.c
|
||||
networkd-address.h
|
||||
networkd-brvlan.c
|
||||
networkd-brvlan.h
|
||||
networkd-conf.c
|
||||
networkd-conf.h
|
||||
networkd-dhcp4.c
|
||||
networkd-dhcp6.c
|
||||
networkd-fdb.c
|
||||
networkd-fdb.h
|
||||
networkd-ipv4ll.c
|
||||
networkd-ipv6-proxy-ndp.c
|
||||
networkd-ipv6-proxy-ndp.h
|
||||
networkd-link-bus.c
|
||||
networkd-link.c
|
||||
networkd-link.h
|
||||
networkd-lldp-tx.c
|
||||
networkd-lldp-tx.h
|
||||
networkd-manager-bus.c
|
||||
networkd-manager.c
|
||||
networkd-manager.h
|
||||
networkd-ndisc.c
|
||||
networkd-ndisc.h
|
||||
networkd-network-bus.c
|
||||
networkd-network.c
|
||||
networkd-network.h
|
||||
networkd-route.c
|
||||
networkd-route.h
|
||||
networkd-util.c
|
||||
networkd-util.h
|
||||
'''.split())
|
||||
|
||||
systemd_networkd_sources = files('networkd.c')
|
||||
|
||||
systemd_networkd_wait_online_sources = files('''
|
||||
wait-online/link.c
|
||||
wait-online/link.h
|
||||
wait-online/manager.c
|
||||
wait-online/manager.h
|
||||
wait-online/wait-online.c
|
||||
'''.split()) + network_internal_h
|
||||
|
||||
networkctl_sources = files('networkctl.c')
|
||||
|
||||
network_include_dir = include_directories('.')
|
||||
|
||||
if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||
networkd_gperf_c = custom_target(
|
||||
'networkd-gperf.c',
|
||||
input : 'networkd-gperf.gperf',
|
||||
output : 'networkd-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
networkd_network_gperf_c = custom_target(
|
||||
'networkd-network-gperf.c',
|
||||
input : 'networkd-network-gperf.gperf',
|
||||
output : 'networkd-network-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
netdev_gperf_c = custom_target(
|
||||
'netdev-gperf.c',
|
||||
input : 'netdev/netdev-gperf.gperf',
|
||||
output : 'netdev-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
libnetworkd_core = static_library(
|
||||
'networkd-core',
|
||||
sources,
|
||||
network_internal_h,
|
||||
networkd_gperf_c,
|
||||
networkd_network_gperf_c,
|
||||
netdev_gperf_c,
|
||||
include_directories : includes,
|
||||
link_with : [libshared])
|
||||
|
||||
install_data('org.freedesktop.network1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.network1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
if install_polkit
|
||||
install_data('systemd-networkd.rules',
|
||||
install_dir : polkitrulesdir)
|
||||
endif
|
||||
if install_polkit_pkla
|
||||
install_data('systemd-networkd.pkla',
|
||||
install_dir : polkitpkladir)
|
||||
endif
|
||||
|
||||
tests += [
|
||||
[['src/network/test-networkd-conf.c'],
|
||||
[libnetworkd_core,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/network/test-network.c'],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libsystemd_network,
|
||||
libshared,
|
||||
libfirewall],
|
||||
[libiptc]],
|
||||
|
||||
[['src/network/test-network-tables.c',
|
||||
'src/network/test-network-tables.c',
|
||||
test_tables_h],
|
||||
[libnetworkd_core,
|
||||
libudev_internal,
|
||||
libudev_core,
|
||||
libsystemd_network,
|
||||
libshared,
|
||||
libfirewall],
|
||||
[],
|
||||
'', '', [],
|
||||
[network_include_dir] + libudev_core_includes],
|
||||
]
|
||||
endif
|
40
src/nspawn/meson.build
Normal file
40
src/nspawn/meson.build
Normal file
@ -0,0 +1,40 @@
|
||||
systemd_nspawn_sources = files('''
|
||||
nspawn.c
|
||||
nspawn-settings.c
|
||||
nspawn-settings.h
|
||||
nspawn-mount.c
|
||||
nspawn-mount.h
|
||||
nspawn-network.c
|
||||
nspawn-network.h
|
||||
nspawn-expose-ports.c
|
||||
nspawn-expose-ports.h
|
||||
nspawn-cgroup.c
|
||||
nspawn-cgroup.h
|
||||
nspawn-seccomp.c
|
||||
nspawn-seccomp.h
|
||||
nspawn-register.c
|
||||
nspawn-register.h
|
||||
nspawn-setuid.c
|
||||
nspawn-setuid.h
|
||||
nspawn-stub-pid1.c
|
||||
nspawn-stub-pid1.h
|
||||
nspawn-patch-uid.c
|
||||
nspawn-patch-uid.h
|
||||
'''.split())
|
||||
|
||||
nspawn_gperf_c = custom_target(
|
||||
'nspawn-gperf.c',
|
||||
input : 'nspawn-gperf.gperf',
|
||||
output : 'nspawn-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_nspawn_sources += [nspawn_gperf_c]
|
||||
|
||||
tests += [
|
||||
[['src/nspawn/test-patch-uid.c',
|
||||
'src/nspawn/nspawn-patch-uid.c',
|
||||
'src/nspawn/nspawn-patch-uid.h'],
|
||||
[libshared],
|
||||
[libacl],
|
||||
'', 'manual'],
|
||||
]
|
11
src/resolve/dns_type-to-name.awk
Normal file
11
src/resolve/dns_type-to-name.awk
Normal file
@ -0,0 +1,11 @@
|
||||
BEGIN{
|
||||
print "const char *dns_type_to_string(int type) {\n\tswitch(type) {"
|
||||
}
|
||||
{
|
||||
printf " case DNS_TYPE_%s: return ", $1;
|
||||
sub(/_/, "-");
|
||||
printf "\"%s\";\n", $1
|
||||
}
|
||||
END{
|
||||
print " default: return NULL;\n\t}\n}\n"
|
||||
}
|
18
src/resolve/generate-dns_type-gperf.py
Normal file
18
src/resolve/generate-dns_type-gperf.py
Normal file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
"""Generate %-from-name.gperf from %-list.txt
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
||||
name, prefix, input = sys.argv[1:]
|
||||
|
||||
print("""\
|
||||
struct {}_name {{ const char* name; int id; }};
|
||||
%null-strings
|
||||
%%""".format(name))
|
||||
|
||||
for line in open(input):
|
||||
line = line.rstrip()
|
||||
s = line.replace('_', '-')
|
||||
print("{}, {}{}".format(s, prefix, line))
|
1
src/resolve/generate-dns_type-list.sed
Normal file
1
src/resolve/generate-dns_type-list.sed
Normal file
@ -0,0 +1 @@
|
||||
s/.* DNS_TYPE_(\w+).*/\1/p
|
178
src/resolve/meson.build
Normal file
178
src/resolve/meson.build
Normal file
@ -0,0 +1,178 @@
|
||||
basic_dns_sources = files('''
|
||||
resolved-dns-dnssec.c
|
||||
resolved-dns-dnssec.h
|
||||
resolved-dns-packet.c
|
||||
resolved-dns-packet.h
|
||||
resolved-dns-rr.c
|
||||
resolved-dns-rr.h
|
||||
resolved-dns-answer.c
|
||||
resolved-dns-answer.h
|
||||
resolved-dns-question.c
|
||||
resolved-dns-question.h
|
||||
dns-type.c
|
||||
'''.split())
|
||||
|
||||
dns_type_h = files('dns-type.h')[0]
|
||||
|
||||
systemd_resolved_only_sources = files('''
|
||||
resolved.c
|
||||
resolved-manager.c
|
||||
resolved-manager.h
|
||||
resolved-conf.c
|
||||
resolved-conf.h
|
||||
resolved-resolv-conf.c
|
||||
resolved-resolv-conf.h
|
||||
resolved-bus.c
|
||||
resolved-bus.h
|
||||
resolved-link.h
|
||||
resolved-link.c
|
||||
resolved-link-bus.c
|
||||
resolved-link-bus.h
|
||||
resolved-llmnr.h
|
||||
resolved-llmnr.c
|
||||
resolved-mdns.h
|
||||
resolved-mdns.c
|
||||
resolved-def.h
|
||||
resolved-dns-query.h
|
||||
resolved-dns-query.c
|
||||
resolved-dns-synthesize.h
|
||||
resolved-dns-synthesize.c
|
||||
resolved-dns-transaction.h
|
||||
resolved-dns-transaction.c
|
||||
resolved-dns-scope.h
|
||||
resolved-dns-scope.c
|
||||
resolved-dns-server.h
|
||||
resolved-dns-server.c
|
||||
resolved-dns-search-domain.h
|
||||
resolved-dns-search-domain.c
|
||||
resolved-dns-cache.h
|
||||
resolved-dns-cache.c
|
||||
resolved-dns-zone.h
|
||||
resolved-dns-zone.c
|
||||
resolved-dns-stream.h
|
||||
resolved-dns-stream.c
|
||||
resolved-dns-trust-anchor.h
|
||||
resolved-dns-trust-anchor.c
|
||||
resolved-dns-stub.h
|
||||
resolved-dns-stub.c
|
||||
resolved-etc-hosts.h
|
||||
resolved-etc-hosts.c
|
||||
'''.split())
|
||||
|
||||
systemd_resolve_only_sources = files('resolve-tool.c')
|
||||
|
||||
############################################################
|
||||
|
||||
dns_type_list_txt = custom_target(
|
||||
'dns_type-list.txt',
|
||||
input : ['generate-dns_type-list.sed', dns_type_h],
|
||||
output : 'dns_type-list.txt',
|
||||
command : [sed, '-n', '-r', '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
generate_dns_type_gperf = find_program('generate-dns_type-gperf.py')
|
||||
|
||||
dns_type_headers = [dns_type_h]
|
||||
foreach item : [['dns_type', dns_type_list_txt, 'dns_type', 'DNS_TYPE_']]
|
||||
|
||||
fname = '@0@-from-name.gperf'.format(item[0])
|
||||
gperf_file = custom_target(
|
||||
fname,
|
||||
input : item[1],
|
||||
output : fname,
|
||||
command : [generate_dns_type_gperf, item[2], item[3], '@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = '@0@-from-name.h'.format(item[0])
|
||||
target1 = custom_target(
|
||||
fname,
|
||||
input : gperf_file,
|
||||
output : fname,
|
||||
command : [gperf,
|
||||
'-L', 'ANSI-C', '-t', '--ignore-case',
|
||||
'-N', 'lookup_@0@'.format(item[2]),
|
||||
'-H', 'hash_@0@_name'.format(item[2]),
|
||||
'-p', '-C',
|
||||
'@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = '@0@-to-name.h'.format(item[0])
|
||||
awkscript = '@0@-to-name.awk'.format(item[0])
|
||||
target2 = custom_target(
|
||||
fname,
|
||||
input : [awkscript, item[1]],
|
||||
output : fname,
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
dns_type_headers += [target1, target2]
|
||||
endforeach
|
||||
|
||||
resolved_gperf_c = custom_target(
|
||||
'resolved_gperf.c',
|
||||
input : 'resolved-gperf.gperf',
|
||||
output : 'resolved-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_resolved_sources = (basic_dns_sources +
|
||||
[resolved_gperf_c] +
|
||||
systemd_resolved_only_sources +
|
||||
dns_type_headers)
|
||||
|
||||
systemd_resolve_sources = (basic_dns_sources +
|
||||
systemd_resolve_only_sources +
|
||||
dns_type_headers)
|
||||
|
||||
if conf.get('ENABLE_RESOLVED', 0) == 1
|
||||
install_data('org.freedesktop.resolve1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.resolve1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
resolved_conf = configure_file(
|
||||
input : 'resolved.conf.in',
|
||||
output : 'resolved.conf',
|
||||
configuration : substs)
|
||||
install_data(resolved_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
endif
|
||||
|
||||
install_data('resolv.conf',
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
tests += [
|
||||
[['src/resolve/test-resolve-tables.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers,
|
||||
'src/shared/test-tables.h'],
|
||||
[],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dns-packet.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dnssec.c',
|
||||
basic_dns_sources,
|
||||
dns_type_headers],
|
||||
[],
|
||||
[libgcrypt,
|
||||
libgpg_error,
|
||||
libm],
|
||||
'ENABLE_RESOLVED'],
|
||||
|
||||
[['src/resolve/test-dnssec-complex.c',
|
||||
'src/resolve/dns-type.c',
|
||||
dns_type_headers],
|
||||
[],
|
||||
[],
|
||||
'ENABLE_RESOLVED', 'manual'],
|
||||
]
|
172
src/shared/meson.build
Normal file
172
src/shared/meson.build
Normal file
@ -0,0 +1,172 @@
|
||||
shared_sources = '''
|
||||
acl-util.h
|
||||
acpi-fpdt.c
|
||||
acpi-fpdt.h
|
||||
apparmor-util.c
|
||||
apparmor-util.h
|
||||
ask-password-api.c
|
||||
ask-password-api.h
|
||||
base-filesystem.c
|
||||
base-filesystem.h
|
||||
boot-timestamps.c
|
||||
boot-timestamps.h
|
||||
bus-unit-util.c
|
||||
bus-unit-util.h
|
||||
bus-util.c
|
||||
bus-util.h
|
||||
cgroup-show.c
|
||||
cgroup-show.h
|
||||
clean-ipc.c
|
||||
clean-ipc.h
|
||||
condition.c
|
||||
condition.h
|
||||
conf-parser.c
|
||||
conf-parser.h
|
||||
dev-setup.c
|
||||
dev-setup.h
|
||||
dissect-image.c
|
||||
dissect-image.h
|
||||
dns-domain.c
|
||||
dns-domain.h
|
||||
dropin.c
|
||||
dropin.h
|
||||
efivars.c
|
||||
efivars.h
|
||||
fdset.c
|
||||
fdset.h
|
||||
fstab-util.c
|
||||
fstab-util.h
|
||||
gcrypt-util.c
|
||||
gcrypt-util.h
|
||||
generator.c
|
||||
generator.h
|
||||
gpt.h
|
||||
ima-util.c
|
||||
ima-util.h
|
||||
import-util.c
|
||||
import-util.h
|
||||
initreq.h
|
||||
install.c
|
||||
install.h
|
||||
install-printf.c
|
||||
install-printf.h
|
||||
journal-util.c
|
||||
journal-util.h
|
||||
logs-show.c
|
||||
logs-show.h
|
||||
loop-util.c
|
||||
loop-util.h
|
||||
machine-image.c
|
||||
machine-image.h
|
||||
machine-pool.c
|
||||
machine-pool.h
|
||||
nsflags.c
|
||||
nsflags.h
|
||||
output-mode.c
|
||||
output-mode.h
|
||||
pager.c
|
||||
pager.h
|
||||
path-lookup.c
|
||||
path-lookup.h
|
||||
ptyfwd.c
|
||||
ptyfwd.h
|
||||
resolve-util.c
|
||||
resolve-util.h
|
||||
seccomp-util.h
|
||||
sleep-config.c
|
||||
sleep-config.h
|
||||
spawn-ask-password-agent.c
|
||||
spawn-ask-password-agent.h
|
||||
spawn-polkit-agent.c
|
||||
spawn-polkit-agent.h
|
||||
specifier.c
|
||||
specifier.h
|
||||
switch-root.c
|
||||
switch-root.h
|
||||
sysctl-util.c
|
||||
sysctl-util.h
|
||||
tests.c
|
||||
tests.h
|
||||
udev-util.h
|
||||
uid-range.c
|
||||
uid-range.h
|
||||
utmp-wtmp.h
|
||||
vlan-util.c
|
||||
vlan-util.h
|
||||
volatile-util.c
|
||||
volatile-util.h
|
||||
watchdog.c
|
||||
watchdog.h
|
||||
'''.split()
|
||||
|
||||
test_tables_h = files('test-tables.h')
|
||||
shared_sources += [test_tables_h]
|
||||
|
||||
if conf.get('HAVE_ACL', 0) == 1
|
||||
shared_sources += ['acl-util.c']
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_UTMP', 0) == 1
|
||||
shared_sources += ['utmp-wtmp.c']
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_SECCOMP', 0) == 1
|
||||
shared_sources += ['seccomp-util.c']
|
||||
endif
|
||||
|
||||
libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
|
||||
|
||||
libshared = shared_library(
|
||||
libshared_name,
|
||||
shared_sources,
|
||||
basic_sources,
|
||||
journal_internal_sources,
|
||||
libsystemd_internal_sources,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared'],
|
||||
c_args : ['-fvisibility=default'],
|
||||
link_with : [libudev],
|
||||
dependencies : [threads,
|
||||
librt,
|
||||
libcap,
|
||||
libacl,
|
||||
libcryptsetup,
|
||||
libgcrypt,
|
||||
libiptc,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libidn,
|
||||
libxz,
|
||||
liblz4,
|
||||
libblkid],
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
libshared_static = static_library(
|
||||
libshared_name,
|
||||
shared_sources,
|
||||
basic_sources,
|
||||
include_directories : includes,
|
||||
dependencies : [threads,
|
||||
librt,
|
||||
libcap,
|
||||
libacl,
|
||||
libcryptsetup,
|
||||
libiptc,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libidn,
|
||||
libxz,
|
||||
liblz4,
|
||||
libblkid])
|
||||
|
||||
if conf.get('HAVE_LIBIPTC', 0) == 1
|
||||
libfirewall = static_library(
|
||||
'firewall',
|
||||
'firewall-util.h',
|
||||
'firewall-util.c',
|
||||
include_directories : includes,
|
||||
dependencies : [libiptc])
|
||||
else
|
||||
libfirewall = []
|
||||
endif
|
7
src/sulogin-shell/meson.build
Normal file
7
src/sulogin-shell/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
gen = configure_file(
|
||||
input : 'systemd-sulogin-shell.in',
|
||||
output : 'systemd-sulogin-shell',
|
||||
configuration : substs)
|
||||
|
||||
install_data(gen,
|
||||
install_dir : rootlibexecdir)
|
54
src/systemd/meson.build
Normal file
54
src/systemd/meson.build
Normal file
@ -0,0 +1,54 @@
|
||||
_systemd_headers = '''
|
||||
sd-bus.h
|
||||
sd-bus-protocol.h
|
||||
sd-bus-vtable.h
|
||||
sd-daemon.h
|
||||
sd-event.h
|
||||
sd-id128.h
|
||||
sd-journal.h
|
||||
sd-login.h
|
||||
sd-messages.h
|
||||
'''.split()
|
||||
|
||||
# https://github.com/mesonbuild/meson/issues/1633
|
||||
systemd_headers = files(_systemd_headers)
|
||||
|
||||
# sd-device.h
|
||||
# sd-hwdb.h
|
||||
# sd-dhcp6-client.h
|
||||
# sd-dhcp6-lease.h
|
||||
# sd-dhcp-client.h
|
||||
# sd-dhcp-lease.h
|
||||
# sd-dhcp-server.h
|
||||
# sd-ipv4acd.h
|
||||
# sd-ipv4ll.h
|
||||
# sd-lldp.h
|
||||
# sd-ndisc.h
|
||||
# sd-netlink.h
|
||||
# sd-network.h
|
||||
# sd-path.h
|
||||
# sd-resolve.h
|
||||
# sd-utf8.h
|
||||
|
||||
install_headers(
|
||||
systemd_headers,
|
||||
'_sd-common.h',
|
||||
subdir : 'systemd')
|
||||
|
||||
|
||||
############################################################
|
||||
|
||||
opts = [[],
|
||||
['-ansi'],
|
||||
['-std=iso9899:1990']]
|
||||
|
||||
foreach header : _systemd_headers
|
||||
foreach opt : opts
|
||||
name = ''.join([header] + opt)
|
||||
test('cc-' + name,
|
||||
check_compilation_sh,
|
||||
args : cc.cmd_array() + ['-x', 'c', '-c'] + opt +
|
||||
['-Werror', '-include',
|
||||
join_paths(meson.current_source_dir(), header)])
|
||||
endforeach
|
||||
endforeach
|
23
src/test/generate-sym-test.py
Normal file
23
src/test/generate-sym-test.py
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/python3
|
||||
import sys, re
|
||||
|
||||
print('#include <stdio.h>')
|
||||
for header in sys.argv[2:]:
|
||||
print('#include "{}"'.format(header.split('/')[-1]))
|
||||
|
||||
print('''
|
||||
void* functions[] = {''')
|
||||
|
||||
for line in open(sys.argv[1]):
|
||||
match = re.search('^ +([a-zA-Z0-9_]+);', line)
|
||||
if match:
|
||||
print(' {},'.format(match.group(1)))
|
||||
|
||||
print('''};
|
||||
|
||||
int main(void) {
|
||||
unsigned i;
|
||||
for (i = 0; i < sizeof(functions)/sizeof(void*); i++)
|
||||
printf("%p\\n", functions[i]);
|
||||
return 0;
|
||||
}''')
|
895
src/test/meson.build
Normal file
895
src/test/meson.build
Normal file
@ -0,0 +1,895 @@
|
||||
awkscript = 'test-hashmap-ordered.awk'
|
||||
test_hashmap_ordered_c = custom_target(
|
||||
'test-hashmap-ordered.c',
|
||||
input : [awkscript, 'test-hashmap-plain.c'],
|
||||
output : 'test-hashmap-ordered.c',
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
test_include_dir = include_directories('.')
|
||||
|
||||
path = run_command('sh', ['-c', 'echo "$PATH"']).stdout()
|
||||
test_env = environment()
|
||||
test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
|
||||
test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
|
||||
test_env.set('PATH', path)
|
||||
test_env.prepend('PATH', meson.build_root())
|
||||
|
||||
############################################################
|
||||
|
||||
generate_sym_test_py = find_program('generate-sym-test.py')
|
||||
|
||||
test_libsystemd_sym_c = custom_target(
|
||||
'test-libsystemd-sym.c',
|
||||
input : [libsystemd_sym_path] + systemd_headers,
|
||||
output : 'test-libsystemd-sym.c',
|
||||
command : [generate_sym_test_py, libsystemd_sym_path] + systemd_headers,
|
||||
capture : true)
|
||||
|
||||
test_libudev_sym_c = custom_target(
|
||||
'test-libudev-sym.c',
|
||||
input : [libudev_sym_path, libudev_h_path],
|
||||
output : 'test-libudev-sym.c',
|
||||
command : [generate_sym_test_py, '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
test_dlopen_c = files('test-dlopen.c')
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/test/test-device-nodes.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-engine.c'],
|
||||
[libcore,
|
||||
libudev,
|
||||
libsystemd_internal],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-job-type.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-ns.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-loopback.c'],
|
||||
[libcore,
|
||||
libshared],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-hostname.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-dns-domain.c'],
|
||||
[libcore,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/test/test-boot-timestamps.c'],
|
||||
[],
|
||||
[],
|
||||
'ENABLE_EFI'],
|
||||
|
||||
[['src/test/test-unit-name.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-unit-file.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-utf8.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-capability.c'],
|
||||
[],
|
||||
[libcap]],
|
||||
|
||||
[['src/test/test-async.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-locale-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-copy.c'],
|
||||
[libshared_static],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sigbus.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-condition.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fdset.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fstab-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ratelimit.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-mount-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-exec-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hexdecoct.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-alloc-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-xattr-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-io-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-glob-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fs-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-proc-cmdline.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fd-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-web-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cpu-set-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-stat-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-escape.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-string-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-extract-word.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-parse-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-user-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hostname-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-process-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-terminal-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path-lookup.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-uid-range.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cap-list.c',
|
||||
generated_gperf_headers],
|
||||
[],
|
||||
[libcap]],
|
||||
|
||||
[['src/test/test-socket-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-barrier.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-tmpfiles.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-namespace.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-verbs.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-install-root.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-acl-util.c'],
|
||||
[],
|
||||
[],
|
||||
'HAVE_ACL'],
|
||||
|
||||
[['src/test/test-seccomp.c'],
|
||||
[],
|
||||
[libseccomp],
|
||||
'HAVE_SECCOMP'],
|
||||
|
||||
[['src/test/test-rlimit-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ask-password-api.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-dissect-image.c'],
|
||||
[],
|
||||
[libblkid],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-signal-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-selinux.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sizeof.c'],
|
||||
[libbasic],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hashmap.c',
|
||||
'src/test/test-hashmap-plain.c',
|
||||
test_hashmap_ordered_c],
|
||||
[],
|
||||
[],
|
||||
'', 'timeout=90'],
|
||||
|
||||
[['src/test/test-set.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-bitmap.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-xml.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-list.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-unaligned.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-tables.c',
|
||||
'src/shared/test-tables.h',
|
||||
'src/journal/journald-server.c',
|
||||
'src/journal/journald-server.h'],
|
||||
[libcore,
|
||||
libjournal_core,
|
||||
libudev_core,
|
||||
libudev_internal,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[threads,
|
||||
libseccomp,
|
||||
libmount,
|
||||
libxz,
|
||||
liblz4,
|
||||
libblkid],
|
||||
'', '', [], libudev_core_includes],
|
||||
|
||||
[['src/test/test-prioq.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-fileio.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-time.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-clock.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-architecture.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-log.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-ipcrm.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'unsafe'],
|
||||
|
||||
[['src/test/test-btrfs.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
|
||||
[['src/test/test-firewall-util.c'],
|
||||
[libfirewall,
|
||||
libshared],
|
||||
[],
|
||||
'HAVE_LIBIPTC'],
|
||||
|
||||
[['src/test/test-netlink-manual.c'],
|
||||
[],
|
||||
[libkmod],
|
||||
'HAVE_KMOD', 'manual'],
|
||||
|
||||
[['src/test/test-ellipsize.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-date.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sleep.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-replace-var.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-calendarspec.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strip-tab-ansi.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-daemon.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-cgroup.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
|
||||
[['src/test/test-cgroup-mask.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-cgroup-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-env-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strbuf.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strv.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path-util.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-path.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-execute.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-siphash24.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-strxcpyx.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-install.c'],
|
||||
[libcore,
|
||||
libshared],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-watchdog.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-sched-prio.c'],
|
||||
[libcore,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
librt,
|
||||
libseccomp,
|
||||
libselinux,
|
||||
libmount,
|
||||
libblkid]],
|
||||
|
||||
[['src/test/test-conf-files.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-conf-parser.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-af-list.c',
|
||||
generated_gperf_headers],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-arphrd-list.c',
|
||||
generated_gperf_headers],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-journal-importer.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-libudev.c'],
|
||||
[libshared,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/test/test-udev.c'],
|
||||
[libudev_core,
|
||||
libudev_internal,
|
||||
libsystemd_network,
|
||||
libshared],
|
||||
[threads,
|
||||
librt,
|
||||
libblkid,
|
||||
libkmod,
|
||||
libacl],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/test/test-id128.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-hash.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/test/test-nss.c'],
|
||||
[],
|
||||
[libdl],
|
||||
'', 'manual'],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
# define some tests here, because the link_with deps were not defined earlier
|
||||
|
||||
tests += [
|
||||
[['src/journal/test-journal.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-send.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-syslog.c'],
|
||||
[libjournal_core,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4,
|
||||
libselinux]],
|
||||
|
||||
[['src/journal/test-journal-match.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-enum.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-stream.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-flush.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-init.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-verify.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-journal-interleaving.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-mmap-cache.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4]],
|
||||
|
||||
[['src/journal/test-catalog.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[threads,
|
||||
libxz,
|
||||
liblz4],
|
||||
'', '', '-DCATALOG_DIR="@0@"'.format(build_catalog_dir)],
|
||||
|
||||
[['src/journal/test-compress.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[liblz4,
|
||||
libxz]],
|
||||
|
||||
[['src/journal/test-compress-benchmark.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[liblz4,
|
||||
libxz],
|
||||
'', 'timeout=90'],
|
||||
|
||||
[['src/journal/test-audit-type.c'],
|
||||
[libjournal_core,
|
||||
libshared],
|
||||
[liblz4,
|
||||
libxz]],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd/sd-bus/test-bus-marshal.c'],
|
||||
[],
|
||||
[threads,
|
||||
libglib,
|
||||
libgobject,
|
||||
libgio,
|
||||
libdbus]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-signature.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-chat.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-cleanup.c'],
|
||||
[],
|
||||
[threads,
|
||||
libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-error.c'],
|
||||
[libshared_static,
|
||||
libsystemd_internal],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-track.c'],
|
||||
[],
|
||||
[libseccomp]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-server.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-objects.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-gvariant.c'],
|
||||
[],
|
||||
[libglib,
|
||||
libgobject,
|
||||
libgio]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-creds.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-match.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-kernel.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-kernel-bloom.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-benchmark.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-zero-copy.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-bus/test-bus-introspect.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-event/test-event.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-netlink/test-netlink.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-netlink/test-local-addresses.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd/sd-resolve/test-resolve.c'],
|
||||
[],
|
||||
[threads]],
|
||||
|
||||
[['src/libsystemd/sd-login/test-login.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/libsystemd-network/test-dhcp-option.c',
|
||||
'src/libsystemd-network/dhcp-protocol.h',
|
||||
'src/libsystemd-network/dhcp-internal.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-client.c',
|
||||
'src/libsystemd-network/dhcp-protocol.h',
|
||||
'src/libsystemd-network/dhcp-internal.h',
|
||||
'src/systemd/sd-dhcp-client.h'],
|
||||
[libshared,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp-server.c'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll.c',
|
||||
'src/libsystemd-network/arp-util.h',
|
||||
'src/systemd/sd-ipv4ll.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-ipv4ll-manual.c',
|
||||
'src/systemd/sd-ipv4ll.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-acd.c',
|
||||
'src/systemd/sd-ipv4acd.h'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/libsystemd-network/test-ndisc-rs.c',
|
||||
'src/libsystemd-network/dhcp-identifier.h',
|
||||
'src/libsystemd-network/dhcp-identifier.c',
|
||||
'src/libsystemd-network/icmp6-util.h',
|
||||
'src/systemd/sd-dhcp6-client.h',
|
||||
'src/systemd/sd-ndisc.h'],
|
||||
[libshared,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-dhcp6-client.c',
|
||||
'src/libsystemd-network/dhcp-identifier.h',
|
||||
'src/libsystemd-network/dhcp-identifier.c',
|
||||
'src/libsystemd-network/dhcp6-internal.h',
|
||||
'src/systemd/sd-dhcp6-client.h'],
|
||||
[libshared,
|
||||
libsystemd_network,
|
||||
libudev],
|
||||
[]],
|
||||
|
||||
[['src/libsystemd-network/test-lldp.c'],
|
||||
[libshared,
|
||||
libsystemd_network],
|
||||
[]],
|
||||
]
|
||||
|
||||
############################################################
|
||||
|
||||
tests += [
|
||||
[['src/login/test-login-shared.c'],
|
||||
[],
|
||||
[]],
|
||||
|
||||
[['src/login/test-inhibit.c'],
|
||||
[],
|
||||
[],
|
||||
'', 'manual'],
|
||||
|
||||
[['src/login/test-login-tables.c'],
|
||||
[liblogind_core,
|
||||
libshared,
|
||||
libudev],
|
||||
[threads]],
|
||||
]
|
32
src/test/test-dlopen.c
Normal file
32
src/test/test-dlopen.c
Normal file
@ -0,0 +1,32 @@
|
||||
/***
|
||||
This file is part of systemd.
|
||||
|
||||
Copyright 2016 Zbigniew Jędrzejewski-Szmek
|
||||
|
||||
systemd is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
systemd is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
void *handle;
|
||||
|
||||
assert_se((handle = dlopen(argv[1], RTLD_NOW)));
|
||||
assert_se(dlclose(handle) == 0);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
11
src/test/test-hashmap-ordered.awk
Normal file
11
src/test/test-hashmap-ordered.awk
Normal file
@ -0,0 +1,11 @@
|
||||
BEGIN {
|
||||
print "/* GENERATED FILE */";
|
||||
print "#define ORDERED"
|
||||
}
|
||||
{
|
||||
if (!match($0, "^#include"))
|
||||
gsub(/hashmap/, "ordered_hashmap");
|
||||
gsub(/HASHMAP/, "ORDERED_HASHMAP");
|
||||
gsub(/Hashmap/, "OrderedHashmap");
|
||||
print
|
||||
}
|
@ -71,9 +71,11 @@ static void* open_handle(const char* dir, const char* module, int flags) {
|
||||
const char *path;
|
||||
void *handle;
|
||||
|
||||
if (dir)
|
||||
path = strjoina(dir, "/.libs/libnss_", module, ".so.2");
|
||||
else
|
||||
if (dir) {
|
||||
path = strjoina(dir, "/libnss_", module, ".so.2");
|
||||
if (access(path, F_OK) < 0)
|
||||
path = strjoina(dir, "/.libs/libnss_", module, ".so.2");
|
||||
} else
|
||||
path = strjoina("libnss_", module, ".so.2");
|
||||
|
||||
handle = dlopen(path, flags);
|
||||
|
14
src/timedate/meson.build
Normal file
14
src/timedate/meson.build
Normal file
@ -0,0 +1,14 @@
|
||||
if conf.get('ENABLE_TIMEDATED', 0) == 1
|
||||
install_data('org.freedesktop.timedate1.conf',
|
||||
install_dir : dbuspolicydir)
|
||||
install_data('org.freedesktop.timedate1.service',
|
||||
install_dir : dbussystemservicedir)
|
||||
|
||||
custom_target(
|
||||
'org.freedesktop.timedate1.policy',
|
||||
input : 'org.freedesktop.timedate1.policy.in',
|
||||
output : 'org.freedesktop.timedate1.policy',
|
||||
command : intltool_command,
|
||||
install : install_polkit,
|
||||
install_dir : polkitpolicydir)
|
||||
endif
|
26
src/timesync/meson.build
Normal file
26
src/timesync/meson.build
Normal file
@ -0,0 +1,26 @@
|
||||
systemd_timesyncd_sources = files('''
|
||||
timesyncd.c
|
||||
timesyncd-manager.c
|
||||
timesyncd-manager.h
|
||||
timesyncd-conf.c
|
||||
timesyncd-conf.h
|
||||
timesyncd-server.c
|
||||
timesyncd-server.h
|
||||
'''.split())
|
||||
|
||||
timesyncd_gperf_c = custom_target(
|
||||
'timesyncd-gperf.c',
|
||||
input : 'timesyncd-gperf.gperf',
|
||||
output : 'timesyncd-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
systemd_timesyncd_sources += [timesyncd_gperf_c]
|
||||
|
||||
if conf.get('ENABLE_TIMESYNCD', 0) == 1
|
||||
timesyncd_conf = configure_file(
|
||||
input : 'timesyncd.conf.in',
|
||||
output : 'timesyncd.conf',
|
||||
configuration : substs)
|
||||
install_data(timesyncd_conf,
|
||||
install_dir : pkgsysconfdir)
|
||||
endif
|
4
src/udev/generate-keyboard-keys-list.sh
Executable file
4
src/udev/generate-keyboard-keys-list.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -dM -include linux/input.h - </dev/null | \
|
||||
awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
|
150
src/udev/meson.build
Normal file
150
src/udev/meson.build
Normal file
@ -0,0 +1,150 @@
|
||||
udevadm_sources = files('''
|
||||
udevadm.c
|
||||
udevadm-info.c
|
||||
udevadm-control.c
|
||||
udevadm-monitor.c
|
||||
udevadm-hwdb.c
|
||||
udevadm-settle.c
|
||||
udevadm-trigger.c
|
||||
udevadm-test.c
|
||||
udevadm-test-builtin.c
|
||||
udevadm-util.c
|
||||
udevadm-util.h
|
||||
'''.split())
|
||||
|
||||
systemd_udevd_sources = files('udevd.c')
|
||||
|
||||
libudev_core_sources = '''
|
||||
udev.h
|
||||
udev-event.c
|
||||
udev-watch.c
|
||||
udev-node.c
|
||||
udev-rules.c
|
||||
udev-ctrl.c
|
||||
udev-builtin.c
|
||||
udev-builtin-btrfs.c
|
||||
udev-builtin-hwdb.c
|
||||
udev-builtin-input_id.c
|
||||
udev-builtin-keyboard.c
|
||||
udev-builtin-net_id.c
|
||||
udev-builtin-net_setup_link.c
|
||||
udev-builtin-path_id.c
|
||||
udev-builtin-usb_id.c
|
||||
net/link-config.c
|
||||
net/link-config.h
|
||||
net/ethtool-util.c
|
||||
net/ethtool-util.h
|
||||
'''.split()
|
||||
|
||||
if conf.get('HAVE_KMOD', 0) == 1
|
||||
libudev_core_sources += ['udev-builtin-kmod.c']
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_BLKID', 0) == 1
|
||||
libudev_core_sources += ['udev-builtin-blkid.c']
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_ACL', 0) == 1
|
||||
libudev_core_sources += ['udev-builtin-uaccess.c',
|
||||
logind_acl_c,
|
||||
sd_login_c]
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
generate_keyboard_keys_list = find_program('generate-keyboard-keys-list.sh')
|
||||
keyboard_keys_list_txt = custom_target(
|
||||
'keyboard-keys-list.txt',
|
||||
output : 'keyboard-keys-list.txt',
|
||||
command : [generate_keyboard_keys_list, cpp],
|
||||
capture : true)
|
||||
|
||||
fname = 'keyboard-keys-from-name.gperf'
|
||||
gperf_file = custom_target(
|
||||
fname,
|
||||
input : keyboard_keys_list_txt,
|
||||
output : fname,
|
||||
command : [generate_gperfs, 'key', '', '@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = 'keyboard-keys-from-name.h'
|
||||
keyboard_keys_from_name_h = custom_target(
|
||||
fname,
|
||||
input : gperf_file,
|
||||
output : fname,
|
||||
command : [gperf,
|
||||
'-L', 'ANSI-C', '-t', '--ignore-case',
|
||||
'-N', 'keyboard_lookup_key',
|
||||
'-H', 'hash_key_name',
|
||||
'-p', '-C',
|
||||
'@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
############################################################
|
||||
|
||||
link_config_gperf_c = custom_target(
|
||||
'link-config-gperf.c',
|
||||
input : 'net/link-config-gperf.gperf',
|
||||
output : 'link-config-gperf.c',
|
||||
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
|
||||
|
||||
############################################################
|
||||
|
||||
if get_option('link-udev-shared')
|
||||
udev_link_with = [libshared]
|
||||
udev_rpath = rootlibexecdir
|
||||
else
|
||||
udev_link_with = [libshared_static,
|
||||
libsystemd_internal]
|
||||
udev_rpath = ''
|
||||
endif
|
||||
|
||||
libudev_internal = static_library(
|
||||
'udev',
|
||||
libudev_sources,
|
||||
include_directories : includes,
|
||||
link_with : udev_link_with)
|
||||
|
||||
libudev_core_includes = [includes, include_directories('net')]
|
||||
libudev_core = static_library(
|
||||
'udev-core',
|
||||
libudev_core_sources,
|
||||
link_config_gperf_c,
|
||||
keyboard_keys_from_name_h,
|
||||
include_directories : libudev_core_includes,
|
||||
link_with : udev_link_with,
|
||||
dependencies : [libblkid])
|
||||
|
||||
foreach prog : [['ata_id/ata_id.c'],
|
||||
['cdrom_id/cdrom_id.c'],
|
||||
['collect/collect.c'],
|
||||
['scsi_id/scsi_id.c',
|
||||
'scsi_id/scsi_id.h',
|
||||
'scsi_id/scsi_serial.c',
|
||||
'scsi_id/scsi.h'],
|
||||
['v4l_id/v4l_id.c'],
|
||||
['mtd_probe/mtd_probe.c',
|
||||
'mtd_probe/mtd_probe.h',
|
||||
'mtd_probe/probe_smartmedia.c']]
|
||||
|
||||
executable(prog[0].split('/')[0],
|
||||
prog,
|
||||
include_directories : includes,
|
||||
link_with : [libudev_internal],
|
||||
install_rpath : udev_rpath,
|
||||
install : true,
|
||||
install_dir : udevlibexecdir)
|
||||
endforeach
|
||||
|
||||
install_data('udev.conf',
|
||||
install_dir : join_paths(sysconfdir, 'udev'))
|
||||
|
||||
udev_pc = configure_file(
|
||||
input : 'udev.pc.in',
|
||||
output : 'udev.pc',
|
||||
configuration : substs)
|
||||
install_data(udev_pc,
|
||||
install_dir : pkgconfigdatadir)
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
|
8
src/vconsole/meson.build
Normal file
8
src/vconsole/meson.build
Normal file
@ -0,0 +1,8 @@
|
||||
if conf.get('ENABLE_VCONSOLE', 0) == 1
|
||||
vconsole_rules = configure_file(
|
||||
input : '90-vconsole.rules.in',
|
||||
output : '90-vconsole.rules',
|
||||
configuration : substs)
|
||||
install_data(vconsole_rules,
|
||||
install_dir : udevrulesdir)
|
||||
endif
|
21
sysctl.d/meson.build
Normal file
21
sysctl.d/meson.build
Normal file
@ -0,0 +1,21 @@
|
||||
install_data(
|
||||
'50-default.conf',
|
||||
install_dir : sysctldir)
|
||||
|
||||
in_files = []
|
||||
|
||||
if conf.get('ENABLE_COREDUMP', 0) == 1
|
||||
in_files += ['50-coredump.conf']
|
||||
endif
|
||||
|
||||
foreach file : in_files
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
install_data(gen,
|
||||
install_dir : sysctldir)
|
||||
endforeach
|
||||
|
||||
meson.add_install_script('sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
|
31
sysusers.d/meson.build
Normal file
31
sysusers.d/meson.build
Normal file
@ -0,0 +1,31 @@
|
||||
in_files = ['basic.conf']
|
||||
|
||||
enable_sysusers = conf.get('ENABLE_SYSUSERS', 0) == 1
|
||||
|
||||
foreach file : in_files
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
if enable_sysusers
|
||||
install_data(gen,
|
||||
install_dir : sysusersdir)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
m4_files = ['systemd.conf']
|
||||
|
||||
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
|
||||
m4_files += ['systemd-remote.conf']
|
||||
endif
|
||||
|
||||
foreach file : m4_files
|
||||
custom_target(
|
||||
'sysusers.d/' + file,
|
||||
input : file + '.m4',
|
||||
output: file,
|
||||
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
|
||||
capture : true,
|
||||
install : enable_sysusers,
|
||||
install_dir : sysusersdir)
|
||||
endforeach
|
166
test/meson.build
Normal file
166
test/meson.build
Normal file
@ -0,0 +1,166 @@
|
||||
test_data_files = '''
|
||||
a.service
|
||||
basic.target
|
||||
b.service
|
||||
c.service
|
||||
daughter.service
|
||||
d.service
|
||||
end.service
|
||||
e.service
|
||||
f.service
|
||||
grandchild.service
|
||||
g.service
|
||||
hello-after-sleep.target
|
||||
hello.service
|
||||
h.service
|
||||
parent-deep.slice
|
||||
parent.slice
|
||||
sched_idle_bad.service
|
||||
sched_idle_ok.service
|
||||
sched_rr_bad.service
|
||||
sched_rr_change.service
|
||||
sched_rr_ok.service
|
||||
shutdown.target
|
||||
sleep.service
|
||||
sockets.target
|
||||
son.service
|
||||
sysinit.target
|
||||
testsuite.target
|
||||
timers.target
|
||||
unstoppable.service
|
||||
test-path/paths.target
|
||||
test-path/basic.target
|
||||
test-path/sysinit.target
|
||||
test-path/path-changed.service
|
||||
test-path/path-directorynotempty.service
|
||||
test-path/path-existsglob.service
|
||||
test-path/path-exists.service
|
||||
test-path/path-makedirectory.service
|
||||
test-path/path-modified.service
|
||||
test-path/path-mycustomunit.service
|
||||
test-path/path-service.service
|
||||
test-path/path-changed.path
|
||||
test-path/path-directorynotempty.path
|
||||
test-path/path-existsglob.path
|
||||
test-path/path-exists.path
|
||||
test-path/path-makedirectory.path
|
||||
test-path/path-modified.path
|
||||
test-path/path-unit.path
|
||||
test-execute/exec-environment-empty.service
|
||||
test-execute/exec-environment-multiple.service
|
||||
test-execute/exec-environment.service
|
||||
test-execute/exec-passenvironment-absent.service
|
||||
test-execute/exec-passenvironment-empty.service
|
||||
test-execute/exec-passenvironment-repeated.service
|
||||
test-execute/exec-passenvironment.service
|
||||
test-execute/exec-group.service
|
||||
test-execute/exec-group-nfsnobody.service
|
||||
test-execute/exec-supplementarygroups.service
|
||||
test-execute/exec-supplementarygroups-single-group.service
|
||||
test-execute/exec-supplementarygroups-single-group-user.service
|
||||
test-execute/exec-supplementarygroups-multiple-groups-default-group-user.service
|
||||
test-execute/exec-supplementarygroups-multiple-groups-withgid.service
|
||||
test-execute/exec-supplementarygroups-multiple-groups-withuid.service
|
||||
test-execute/exec-dynamicuser-fixeduser.service
|
||||
test-execute/exec-dynamicuser-fixeduser-one-supplementarygroup.service
|
||||
test-execute/exec-dynamicuser-supplementarygroups.service
|
||||
test-execute/exec-ignoresigpipe-no.service
|
||||
test-execute/exec-ignoresigpipe-yes.service
|
||||
test-execute/exec-personality-x86-64.service
|
||||
test-execute/exec-personality-x86.service
|
||||
test-execute/exec-personality-s390.service
|
||||
test-execute/exec-personality-ppc64.service
|
||||
test-execute/exec-personality-ppc64le.service
|
||||
test-execute/exec-personality-aarch64.service
|
||||
test-execute/exec-privatedevices-no.service
|
||||
test-execute/exec-privatedevices-yes.service
|
||||
test-execute/exec-privatedevices-no-capability-mknod.service
|
||||
test-execute/exec-privatedevices-yes-capability-mknod.service
|
||||
test-execute/exec-protectkernelmodules-no-capabilities.service
|
||||
test-execute/exec-protectkernelmodules-yes-capabilities.service
|
||||
test-execute/exec-protectkernelmodules-yes-mount-propagation.service
|
||||
test-execute/exec-privatetmp-no.service
|
||||
test-execute/exec-privatetmp-yes.service
|
||||
test-execute/exec-readonlypaths.service
|
||||
test-execute/exec-readonlypaths-mount-propagation.service
|
||||
test-execute/exec-readwritepaths-mount-propagation.service
|
||||
test-execute/exec-inaccessiblepaths-mount-propagation.service
|
||||
test-execute/exec-spec-interpolation.service
|
||||
test-execute/exec-systemcallerrornumber.service
|
||||
test-execute/exec-systemcallfilter-failing2.service
|
||||
test-execute/exec-systemcallfilter-failing.service
|
||||
test-execute/exec-systemcallfilter-not-failing2.service
|
||||
test-execute/exec-systemcallfilter-not-failing.service
|
||||
test-execute/exec-systemcallfilter-system-user.service
|
||||
test-execute/exec-systemcallfilter-system-user-nfsnobody.service
|
||||
test-execute/exec-user.service
|
||||
test-execute/exec-user-nfsnobody.service
|
||||
test-execute/exec-workingdirectory.service
|
||||
test-execute/exec-umask-0177.service
|
||||
test-execute/exec-umask-default.service
|
||||
test-execute/exec-privatenetwork-yes.service
|
||||
test-execute/exec-environmentfile.service
|
||||
test-execute/exec-oomscoreadjust-positive.service
|
||||
test-execute/exec-oomscoreadjust-negative.service
|
||||
test-execute/exec-ioschedulingclass-best-effort.service
|
||||
test-execute/exec-ioschedulingclass-idle.service
|
||||
test-execute/exec-ioschedulingclass-none.service
|
||||
test-execute/exec-ioschedulingclass-realtime.service
|
||||
test-execute/exec-capabilityboundingset-invert.service
|
||||
test-execute/exec-capabilityboundingset-merge.service
|
||||
test-execute/exec-capabilityboundingset-reset.service
|
||||
test-execute/exec-capabilityboundingset-simple.service
|
||||
test-execute/exec-capabilityambientset.service
|
||||
test-execute/exec-capabilityambientset-nfsnobody.service
|
||||
test-execute/exec-capabilityambientset-merge.service
|
||||
test-execute/exec-capabilityambientset-merge-nfsnobody.service
|
||||
test-execute/exec-runtimedirectory.service
|
||||
test-execute/exec-runtimedirectory-mode.service
|
||||
test-execute/exec-runtimedirectory-owner.service
|
||||
test-execute/exec-runtimedirectory-owner-nfsnobody.service
|
||||
test-execute/exec-restrict-namespaces-no.service
|
||||
test-execute/exec-restrict-namespaces-yes.service
|
||||
test-execute/exec-restrict-namespaces-mnt.service
|
||||
test-execute/exec-restrict-namespaces-mnt-blacklist.service
|
||||
test-execute/exec-read-only-path-succeed.service
|
||||
test-execute/exec-privatedevices-yes-capability-sys-rawio.service
|
||||
test-execute/exec-privatedevices-no-capability-sys-rawio.service
|
||||
bus-policy/hello.conf
|
||||
bus-policy/methods.conf
|
||||
bus-policy/ownerships.conf
|
||||
bus-policy/signals.conf
|
||||
bus-policy/check-own-rules.conf
|
||||
bus-policy/many-rules.conf
|
||||
bus-policy/test.conf
|
||||
hwdb/10-bad.hwdb
|
||||
journal-data/journal-1.txt
|
||||
journal-data/journal-2.txt
|
||||
'''.split()
|
||||
|
||||
if conf.get('ENABLE_RESOLVED', 0) == 1
|
||||
test_data_files += '''
|
||||
test-resolve/_openpgpkey.fedoraproject.org.pkts
|
||||
test-resolve/fedoraproject.org.pkts
|
||||
test-resolve/gandi.net.pkts
|
||||
test-resolve/google.com.pkts
|
||||
test-resolve/root.pkts
|
||||
test-resolve/sw1a1aa-sw1a2aa-sw1a2ab-sw1a2ac.find.me.uk.pkts
|
||||
test-resolve/teamits.com.pkts
|
||||
test-resolve/zbyszek@fedoraproject.org.pkts
|
||||
test-resolve/_443._tcp.fedoraproject.org.pkts
|
||||
test-resolve/kyhwana.org.pkts
|
||||
test-resolve/fake-caa.pkts
|
||||
'''.split()
|
||||
endif
|
||||
|
||||
if install_tests
|
||||
foreach file : test_data_files
|
||||
subdir = file.split('/')[0]
|
||||
if subdir == file
|
||||
subdir = ''
|
||||
endif
|
||||
|
||||
install_data(file,
|
||||
install_dir : testsdir + '/testdata/' + subdir)
|
||||
endforeach
|
||||
endif
|
@ -1,30 +1,38 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
out="$1"
|
||||
systemd_efi="$2"
|
||||
boot_stub="$3"
|
||||
splash_bmp="$4"
|
||||
if [ -z "$out" -o -z "$systemd_efi" -o -z "$boot_stub" -o -z "$splash_bmp" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# create GPT table with EFI System Partition
|
||||
rm -f test-efi-disk.img
|
||||
dd if=/dev/null of=test-efi-disk.img bs=1M seek=512 count=1
|
||||
parted --script test-efi-disk.img "mklabel gpt" "mkpart ESP fat32 1MiB 511MiB" "set 1 boot on"
|
||||
rm -f "$out"
|
||||
dd if=/dev/null of="$out" bs=1M seek=512 count=1 status=none
|
||||
parted --script "$out" "mklabel gpt" "mkpart ESP fat32 1MiB 511MiB" "set 1 boot on"
|
||||
|
||||
# create FAT32 file system
|
||||
LOOP=$(losetup --show -f -P test-efi-disk.img)
|
||||
LOOP=$(losetup --show -f -P "$out")
|
||||
mkfs.vfat -F32 ${LOOP}p1
|
||||
mkdir -p mnt
|
||||
mount ${LOOP}p1 mnt
|
||||
|
||||
mkdir -p mnt/EFI/{BOOT,systemd}
|
||||
cp systemd-bootx64.efi mnt/EFI/BOOT/BOOTX64.efi
|
||||
cp "$systemd_efi" mnt/EFI/BOOT/BOOTX64.efi
|
||||
|
||||
[ -e /boot/shellx64.efi ] && cp /boot/shellx64.efi mnt/
|
||||
|
||||
mkdir mnt/EFI/Linux
|
||||
echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" > mnt/cmdline.txt
|
||||
echo -n "foo=yes bar=no root=/dev/fakeroot debug rd.break=initqueue" >mnt/cmdline.txt
|
||||
objcopy \
|
||||
--add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
|
||||
--add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
|
||||
--add-section .splash=test/splash.bmp --change-section-vma .splash=0x40000 \
|
||||
--add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
|
||||
--add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
|
||||
linuxx64.efi.stub mnt/EFI/Linux/linux-test.efi
|
||||
--add-section .osrel=/etc/os-release --change-section-vma .osrel=0x20000 \
|
||||
--add-section .cmdline=mnt/cmdline.txt --change-section-vma .cmdline=0x30000 \
|
||||
--add-section .splash="$splash_bmp" --change-section-vma .splash=0x40000 \
|
||||
--add-section .linux=/boot/$(cat /etc/machine-id)/$(uname -r)/linux --change-section-vma .linux=0x2000000 \
|
||||
--add-section .initrd=/boot/$(cat /etc/machine-id)/$(uname -r)/initrd --change-section-vma .initrd=0x3000000 \
|
||||
"$boot_stub" mnt/EFI/Linux/linux-test.efi
|
||||
|
||||
# install entries
|
||||
mkdir -p mnt/loader/entries
|
||||
|
43
tmpfiles.d/meson.build
Normal file
43
tmpfiles.d/meson.build
Normal file
@ -0,0 +1,43 @@
|
||||
enable_tmpfiles = conf.get('ENABLE_TMPFILES', 0) == 1
|
||||
|
||||
tmpfiles = [['home.conf', ''],
|
||||
['journal-nocow.conf', ''],
|
||||
['systemd-nologin.conf', ''],
|
||||
['systemd-nspawn.conf', ''],
|
||||
['systemd-remote.conf', 'ENABLE_REMOTE'],
|
||||
['tmp.conf', ''],
|
||||
['var.conf', ''],
|
||||
['x11.conf', ''],
|
||||
['legacy.conf', 'HAVE_SYSV_COMPAT'],
|
||||
]
|
||||
|
||||
foreach pair : tmpfiles
|
||||
if not enable_tmpfiles
|
||||
# do nothing
|
||||
elif pair[1] == '' or conf.get(pair[1], 0) == 1
|
||||
install_data(pair[0], install_dir : tmpfilesdir)
|
||||
else
|
||||
message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
|
||||
.format(pair[0], pair[1], conf.get(pair[1], 0)))
|
||||
endif
|
||||
endforeach
|
||||
|
||||
m4_files = ['etc.conf',
|
||||
'systemd.conf']
|
||||
|
||||
foreach file : m4_files
|
||||
custom_target(
|
||||
'tmpfiles.d/' + file,
|
||||
input : file + '.m4',
|
||||
output: file,
|
||||
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
|
||||
capture : true,
|
||||
install : enable_tmpfiles,
|
||||
install_dir : tmpfilesdir)
|
||||
endforeach
|
||||
|
||||
if enable_tmpfiles
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
|
||||
endif
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# Copyright 2013 Zbigniew Jędrzejewski-Szmek
|
||||
# Copyright 2013, 2017 Zbigniew Jędrzejewski-Szmek
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
@ -22,6 +22,7 @@ from __future__ import print_function
|
||||
import collections
|
||||
import sys
|
||||
import os.path
|
||||
import pprint
|
||||
from xml_helper import *
|
||||
|
||||
SECTION = '''\
|
||||
@ -66,11 +67,13 @@ EXTRA_DIST += \\
|
||||
{dist_files}
|
||||
'''
|
||||
|
||||
meson = False
|
||||
|
||||
def man(page, number):
|
||||
return 'man/{}.{}'.format(page, number)
|
||||
return ('man/' if not meson else '') + '{}.{}'.format(page, number)
|
||||
|
||||
def xml(file):
|
||||
return 'man/{}'.format(os.path.basename(file))
|
||||
return ('man/' if not meson else '') + os.path.basename(file)
|
||||
|
||||
def add_rules(rules, name):
|
||||
xml = xml_parse(name)
|
||||
@ -122,9 +125,40 @@ def make_makefile(rules, dist_files):
|
||||
for conditional,rulegroup in sorted(rules.items())
|
||||
) + FOOTER.format(dist_files=mjoin(sorted(dist_files)))
|
||||
|
||||
MESON_HEADER = '''\
|
||||
# Do not edit. Generated by make-man-rules.py.
|
||||
manpages = ['''
|
||||
|
||||
MESON_FOOTER = '''\
|
||||
]
|
||||
# Really, do not edit.'''
|
||||
|
||||
def make_mesonfile(rules, dist_files):
|
||||
# reformat rules as
|
||||
# grouped = [ [name, section, [alias...], condition], ...]
|
||||
#
|
||||
# but first create a dictionary like
|
||||
# lists = { (name, condition) => [alias...]
|
||||
grouped = collections.defaultdict(list)
|
||||
for condition, items in rules.items():
|
||||
for alias, name in items.items():
|
||||
group = grouped[(name, condition)]
|
||||
if name != alias:
|
||||
group.append(alias)
|
||||
|
||||
lines = [ [p[0][:-2], p[0][-1], sorted(a[:-2] for a in aliases), p[1]]
|
||||
for p, aliases in sorted(grouped.items()) ]
|
||||
return '\n'.join((MESON_HEADER, pprint.pformat(lines)[1:-1], MESON_FOOTER))
|
||||
|
||||
if __name__ == '__main__':
|
||||
rules = create_rules(sys.argv[1:])
|
||||
dist_files = (xml(file) for file in sys.argv[1:]
|
||||
meson = sys.argv[1] == '--meson'
|
||||
pages = sys.argv[1+meson:]
|
||||
|
||||
rules = create_rules(pages)
|
||||
dist_files = (xml(file) for file in pages
|
||||
if not file.endswith(".directives.xml") and
|
||||
not file.endswith(".index.xml"))
|
||||
print(make_makefile(rules, dist_files), end='')
|
||||
if meson:
|
||||
print(make_mesonfile(rules, dist_files))
|
||||
else:
|
||||
print(make_makefile(rules, dist_files), end='')
|
||||
|
3
tools/meson-check-compilation.sh
Executable file
3
tools/meson-check-compilation.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
"$@" '-' -o/dev/null </dev/null
|
20
tools/meson-check-help.sh
Executable file
20
tools/meson-check-help.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
# output width
|
||||
if "$1" --help | grep -v 'default:' | grep -E -q '.{80}.'; then
|
||||
echo "$(basename "$1") --help output is too wide:"
|
||||
"$1" --help | awk 'length > 80' | grep -E --color=yes '.{80}'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# no --help output to stdout
|
||||
if "$1" --help 2>&1 1>/dev/null | grep .; then
|
||||
echo "$(basename "$1") --help prints to stderr"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# error output to stderr
|
||||
if ! "$1" --no-such-parameter 2>&1 1>/dev/null | grep -q .; then
|
||||
echo "$(basename "$1") with an unknown parameter does not print to stderr"
|
||||
exit 3
|
||||
fi
|
7
tools/meson-git-contrib.sh
Executable file
7
tools/meson-git-contrib.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
git shortlog -s `git describe --abbrev=0`.. | \
|
||||
cut -c8- | \
|
||||
sed 's/ / /g' | \
|
||||
awk '{ print $$0 "," }' | \
|
||||
sort -u
|
15
tools/meson-hwdb-update.sh
Executable file
15
tools/meson-hwdb-update.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
cd "$1"
|
||||
|
||||
curl -L -o usb.ids 'http://www.linux-usb.org/usb.ids'
|
||||
curl -L -o pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids'
|
||||
curl -L -o ma-large.txt 'http://standards-oui.ieee.org/oui/oui.txt'
|
||||
curl -L -o ma-medium.txt 'http://standards-oui.ieee.org/oui28/mam.txt'
|
||||
curl -L -o ma-small.txt 'http://standards-oui.ieee.org/oui36/oui36.txt'
|
||||
curl -L -o pnp_id_registry.html 'http://www.uefi.org/uefi-pnp-export'
|
||||
curl -L -o acpi_id_registry.html 'http://www.uefi.org/uefi-acpi-export'
|
||||
./ids-update.pl
|
||||
./acpi-update.py > 20-acpi-vendor.hwdb.base
|
||||
patch -p0 -o- 20-acpi-vendor.hwdb.base <20-acpi-vendor.hwdb.patch >20-acpi-vendor.hwdb
|
||||
diff -u 20-acpi-vendor.hwdb.base 20-acpi-vendor.hwdb >20-acpi-vendor.hwdb.patch
|
1
tools/meson-link-test.c
Normal file
1
tools/meson-link-test.c
Normal file
@ -0,0 +1 @@
|
||||
int main(void) {return 0;}
|
11
tools/meson-make-symlink.sh
Executable file
11
tools/meson-make-symlink.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
# this is needed mostly because $DESTDIR is provided as a variable,
|
||||
# and we need to create the target directory...
|
||||
|
||||
mkdir -vp "$(dirname "${DESTDIR:-}$2")"
|
||||
if [ "$(dirname $1)" = . ]; then
|
||||
ln -vfs -T "$1" "${DESTDIR:-}$2"
|
||||
else
|
||||
ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
|
||||
fi
|
27
units/meson-add-wants.sh
Executable file
27
units/meson-add-wants.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
unitdir="$1"
|
||||
target="$2"
|
||||
unit="$3"
|
||||
|
||||
case "$target" in
|
||||
*/?*) # a path, but not just a slash at the end
|
||||
dir="${DESTDIR:-}${target}"
|
||||
;;
|
||||
*)
|
||||
dir="${DESTDIR:-}${unitdir}/${target}"
|
||||
;;
|
||||
esac
|
||||
|
||||
unitpath="${DESTDIR:-}${unitdir}/${unit}"
|
||||
|
||||
case "$target" in
|
||||
*/)
|
||||
mkdir -p -m 0755 "$dir"
|
||||
;;
|
||||
*)
|
||||
mkdir -p -m 0755 "$(basename "$dir")"
|
||||
;;
|
||||
esac
|
||||
|
||||
ln -vfs --relative "$unitpath" "$dir"
|
329
units/meson.build
Normal file
329
units/meson.build
Normal file
@ -0,0 +1,329 @@
|
||||
units = [
|
||||
['basic.target', ''],
|
||||
['bluetooth.target', ''],
|
||||
['cryptsetup-pre.target', 'HAVE_LIBCRYPTSETUP'],
|
||||
['cryptsetup.target', 'HAVE_LIBCRYPTSETUP',
|
||||
'sysinit.target.wants/'],
|
||||
['dev-hugepages.mount', '',
|
||||
'sysinit.target.wants/'],
|
||||
['dev-mqueue.mount', '',
|
||||
'sysinit.target.wants/'],
|
||||
['emergency.target', ''],
|
||||
['exit.target', ''],
|
||||
['final.target', ''],
|
||||
['getty.target', '',
|
||||
'multi-user.target.wants/'],
|
||||
['graphical.target', '',
|
||||
'runlevel5.target default.target'],
|
||||
['halt.target', ''],
|
||||
['hibernate.target', 'ENABLE_HIBERNATE'],
|
||||
['hybrid-sleep.target', 'ENABLE_HIBERNATE'],
|
||||
['initrd-fs.target', ''],
|
||||
['initrd-root-device.target', ''],
|
||||
['initrd-root-fs.target', ''],
|
||||
['initrd-switch-root.target', ''],
|
||||
['initrd.target', ''],
|
||||
['kexec.target', ''],
|
||||
['ldconfig.service', 'ENABLE_LDCONFIG',
|
||||
'sysinit.target.wants/'],
|
||||
['local-fs-pre.target', ''],
|
||||
['local-fs.target', ''],
|
||||
['machine.slice', 'ENABLE_MACHINED'],
|
||||
['machines.target', 'ENABLE_MACHINED',
|
||||
join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
|
||||
['multi-user.target', '',
|
||||
'runlevel2.target runlevel3.target runlevel4.target'],
|
||||
['network-online.target', ''],
|
||||
['network-pre.target', ''],
|
||||
['network.target', ''],
|
||||
['nss-lookup.target', ''],
|
||||
['nss-user-lookup.target', ''],
|
||||
['paths.target', ''],
|
||||
['poweroff.target', '',
|
||||
'runlevel0.target'],
|
||||
['printer.target', ''],
|
||||
['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT',
|
||||
'sysinit.target.wants/'],
|
||||
['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'],
|
||||
['reboot.target', '',
|
||||
'runlevel6.target ctrl-alt-del.target'],
|
||||
['remote-fs-pre.target', ''],
|
||||
['remote-fs.target', '',
|
||||
join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
|
||||
['rescue.target', '',
|
||||
'runlevel1.target'],
|
||||
['rpcbind.target', ''],
|
||||
['shutdown.target', ''],
|
||||
['sigpwr.target', ''],
|
||||
['sleep.target', ''],
|
||||
['slices.target', ''],
|
||||
['smartcard.target', ''],
|
||||
['sockets.target', ''],
|
||||
['sound.target', ''],
|
||||
['suspend.target', ''],
|
||||
['swap.target', ''],
|
||||
['sys-fs-fuse-connections.mount', '',
|
||||
'sysinit.target.wants/'],
|
||||
['sys-kernel-config.mount', '',
|
||||
'sysinit.target.wants/'],
|
||||
['sys-kernel-debug.mount', '',
|
||||
'sysinit.target.wants/'],
|
||||
['sysinit.target', ''],
|
||||
['syslog.socket', ''],
|
||||
['system-update.target', ''],
|
||||
['system.slice', ''],
|
||||
['systemd-ask-password-console.path', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-ask-password-wall.path', '',
|
||||
'multi-user.target.wants/'],
|
||||
['systemd-coredump.socket', 'ENABLE_COREDUMP',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-initctl.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-journal-gatewayd.socket', ''],
|
||||
['systemd-journal-remote.socket', ''],
|
||||
['systemd-journald-audit.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-journald-dev-log.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-journald.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-networkd.socket', '',
|
||||
join_paths(pkgsysconfdir, 'system/sockets.target.wants/')],
|
||||
['systemd-rfkill.socket', 'ENABLE_RFKILL'],
|
||||
['systemd-tmpfiles-clean.timer', '',
|
||||
'timers.target.wants/'],
|
||||
['systemd-udevd-control.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['systemd-udevd-kernel.socket', '',
|
||||
'sockets.target.wants/'],
|
||||
['time-sync.target', ''],
|
||||
['timers.target', ''],
|
||||
['umount.target', ''],
|
||||
['user.slice', ''],
|
||||
['var-lib-machines.mount', '',
|
||||
'local-fs.target.wants/'],
|
||||
]
|
||||
|
||||
in_units = [
|
||||
['debug-shell.service', ''],
|
||||
['emergency.service', ''],
|
||||
['halt-local.service', 'HAVE_SYSV_COMPAT'],
|
||||
['initrd-cleanup.service', ''],
|
||||
['initrd-parse-etc.service', ''],
|
||||
['initrd-switch-root.service', ''],
|
||||
['initrd-udevadm-cleanup-db.service', ''],
|
||||
['kmod-static-nodes.service', 'HAVE_KMOD ENABLE_TMPFILES',
|
||||
'sysinit.target.wants/'],
|
||||
['quotaon.service', 'ENABLE_QUOTACHECK'],
|
||||
['rc-local.service', 'HAVE_SYSV_COMPAT'],
|
||||
['rescue.service', ''],
|
||||
['system-update-cleanup.service', ''],
|
||||
['systemd-ask-password-console.service', ''],
|
||||
['systemd-ask-password-wall.service', ''],
|
||||
['systemd-backlight@.service', 'ENABLE_BACKLIGHT'],
|
||||
['systemd-binfmt.service', 'ENABLE_BINFMT',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-coredump@.service', 'ENABLE_COREDUMP'],
|
||||
['systemd-exit.service', ''],
|
||||
['systemd-firstboot.service', 'ENABLE_FIRSTBOOT',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-fsck-root.service', ''],
|
||||
['systemd-fsck@.service', ''],
|
||||
['systemd-halt.service', ''],
|
||||
['systemd-hibernate-resume@.service', 'ENABLE_HIBERNATE'],
|
||||
['systemd-hibernate.service', 'ENABLE_HIBERNATE'],
|
||||
['systemd-hybrid-sleep.service', 'ENABLE_HIBERNATE'],
|
||||
['systemd-hostnamed.service', 'ENABLE_HOSTNAMED',
|
||||
'dbus-org.freedesktop.hostname1.service'],
|
||||
['systemd-hwdb-update.service', 'ENABLE_HWDB',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-importd.service', 'ENABLE_IMPORTD',
|
||||
'dbus-org.freedesktop.import1.service'],
|
||||
['systemd-initctl.service', ''],
|
||||
['systemd-journal-catalog-update.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-journal-flush.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-journal-gatewayd.service', 'ENABLE_REMOTE HAVE_MICROHTTPD'],
|
||||
['systemd-journal-remote.service', 'ENABLE_REMOTE HAVE_MICROHTTPD'],
|
||||
['systemd-journal-upload.service', 'ENABLE_REMOTE HAVE_LIBCURL'],
|
||||
['systemd-journald.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-kexec.service', ''],
|
||||
['systemd-localed.service', 'ENABLE_LOCALED',
|
||||
'dbus-org.freedesktop.locale1.service'],
|
||||
['systemd-logind.service', 'ENABLE_LOGIND',
|
||||
'multi-user.target.wants/ dbus-org.freedesktop.login1.service'],
|
||||
['systemd-machine-id-commit.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-machined.service', 'ENABLE_MACHINED',
|
||||
'dbus-org.freedesktop.machine1.service'],
|
||||
['systemd-modules-load.service', 'HAVE_KMOD',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD',
|
||||
join_paths(pkgsysconfdir, 'system/network-online.target.wants/')],
|
||||
['systemd-nspawn@.service', ''],
|
||||
['systemd-poweroff.service', ''],
|
||||
['systemd-quotacheck.service', 'ENABLE_QUOTACHECK'],
|
||||
['systemd-random-seed.service', 'ENABLE_RANDOMSEED',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-reboot.service', ''],
|
||||
['systemd-remount-fs.service', '',
|
||||
'local-fs.target.wants/'],
|
||||
['systemd-rfkill.service', 'ENABLE_RFKILL'],
|
||||
['systemd-suspend.service', ''],
|
||||
['systemd-sysctl.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-sysusers.service', 'ENABLE_SYSUSERS',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-timedated.service', 'ENABLE_TIMEDATED',
|
||||
'dbus-org.freedesktop.timedate1.service'],
|
||||
['systemd-timesyncd.service', 'ENABLE_TIMESYNCD',
|
||||
join_paths(pkgsysconfdir, 'system/sysinit.target.wants/')],
|
||||
['systemd-tmpfiles-clean.service', 'ENABLE_TMPFILES'],
|
||||
['systemd-tmpfiles-setup-dev.service', 'ENABLE_TMPFILES',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-tmpfiles-setup.service', 'ENABLE_TMPFILES',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-udev-settle.service', ''],
|
||||
['systemd-udev-trigger.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-udevd.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-update-done.service', '',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-update-utmp-runlevel.service', 'HAVE_UTMP HAVE_SYSV_COMPAT',
|
||||
'multi-user.target.wants/ graphical.target.wants/ rescue.target.wants/'],
|
||||
['systemd-update-utmp.service', 'HAVE_UTMP',
|
||||
'sysinit.target.wants/'],
|
||||
['systemd-user-sessions.service', '',
|
||||
'multi-user.target.wants/'],
|
||||
['systemd-vconsole-setup.service', 'ENABLE_VCONSOLE'],
|
||||
['systemd-volatile-root.service', ''],
|
||||
]
|
||||
|
||||
m4_units = [
|
||||
['getty@.service', '',
|
||||
'autovt@.service ' +
|
||||
join_paths(pkgsysconfdir, 'system/getty.target.wants/getty@tty1.service')],
|
||||
['serial-getty@.service', ''],
|
||||
['tmp.mount', '',
|
||||
'local-fs.target.wants/'],
|
||||
]
|
||||
|
||||
m4_in_units = [
|
||||
['console-getty.service', ''],
|
||||
['container-getty@.service', ''],
|
||||
['systemd-networkd.service', 'ENABLE_NETWORKD',
|
||||
join_paths(pkgsysconfdir, 'system/dbus-org.freedesktop.network1.service') + ' ' +
|
||||
join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
|
||||
['systemd-resolved.service', 'ENABLE_RESOLVED',
|
||||
join_paths(pkgsysconfdir, 'system/dbus-org.freedesktop.resolve1.service') + ' ' +
|
||||
join_paths(pkgsysconfdir, 'system/multi-user.target.wants/')],
|
||||
['user@.service', ''],
|
||||
]
|
||||
|
||||
foreach tuple : m4_in_units
|
||||
file = tuple[0]
|
||||
|
||||
gen = configure_file(
|
||||
input : file + '.m4.in',
|
||||
output : file + '.m4',
|
||||
configuration : substs)
|
||||
|
||||
m4_units += [[file, tuple.get(1, ''), tuple.get(2, ''), gen]]
|
||||
endforeach
|
||||
|
||||
foreach tuple : in_units
|
||||
file = tuple[0]
|
||||
|
||||
# we do this here because install_data does not accept custom_target output
|
||||
conds = tuple[1].split(' ')
|
||||
install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
|
||||
(conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
|
||||
|
||||
gen1 = configure_file(
|
||||
input : file + '.in',
|
||||
output : file + '.tmp',
|
||||
configuration : substs)
|
||||
gen2 = custom_target(
|
||||
file,
|
||||
input : gen1,
|
||||
output : file,
|
||||
command : [sed, '/^## /d', '@INPUT@'],
|
||||
capture : true,
|
||||
install : install,
|
||||
install_dir : systemunitdir)
|
||||
|
||||
if install and tuple.length() > 2
|
||||
foreach target : tuple[2].split()
|
||||
meson.add_install_script('meson-add-wants.sh', systemunitdir, target, file)
|
||||
endforeach
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach tuple : m4_units
|
||||
file = tuple[0]
|
||||
input = tuple.get(3, file + '.m4')
|
||||
|
||||
# we do this here because install_data does not accept custom_target output
|
||||
conds = tuple[1].split(' ')
|
||||
install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
|
||||
(conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
|
||||
|
||||
custom_target(
|
||||
file,
|
||||
input : input,
|
||||
output: file,
|
||||
command : [m4, '-P'] + m4_defines + ['@INPUT@'],
|
||||
capture : true,
|
||||
install : install,
|
||||
install_dir : systemunitdir)
|
||||
|
||||
if tuple.length() > 2 and install
|
||||
foreach target : tuple[2].split()
|
||||
meson.add_install_script('meson-add-wants.sh', systemunitdir, target, file)
|
||||
endforeach
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach tuple : units
|
||||
file = tuple[0]
|
||||
input = tuple.get(3, file)
|
||||
|
||||
conds = tuple[1].split(' ')
|
||||
install = ((conds.get(0, '') == '' or conf.get(conds[0], 0) == 1) and
|
||||
(conds.get(1, '') == '' or conf.get(conds[1], 0) == 1))
|
||||
|
||||
if install
|
||||
install_data(input,
|
||||
install_dir : systemunitdir)
|
||||
|
||||
if tuple.length() > 2
|
||||
foreach target : tuple[2].split()
|
||||
meson.add_install_script(
|
||||
'meson-add-wants.sh', systemunitdir, target, file)
|
||||
endforeach
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
############################################################
|
||||
|
||||
meson.add_install_script(meson_make_symlink,
|
||||
join_paths(pkgsysconfdir, 'user'),
|
||||
join_paths(sysconfdir, 'xdg/systemd/user'))
|
||||
meson.add_install_script(meson_make_symlink,
|
||||
join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
|
||||
join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
|
||||
if conf.get('HAVE_SYSV_COMPAT', 0) == 1
|
||||
foreach i : [1, 2, 3, 4, 5]
|
||||
meson.add_install_script(
|
||||
'sh', '-c',
|
||||
mkdir_p
|
||||
.format(join_paths(systemunitdir, 'runlevel@0@.target.wants'.format(i))))
|
||||
endforeach
|
||||
endif
|
||||
|
||||
subdir('user')
|
33
units/user/meson.build
Normal file
33
units/user/meson.build
Normal file
@ -0,0 +1,33 @@
|
||||
units = [
|
||||
'basic.target',
|
||||
'bluetooth.target',
|
||||
'default.target',
|
||||
'exit.target',
|
||||
'graphical-session-pre.target',
|
||||
'graphical-session.target',
|
||||
'paths.target',
|
||||
'printer.target',
|
||||
'shutdown.target',
|
||||
'smartcard.target',
|
||||
'sockets.target',
|
||||
'sound.target',
|
||||
'timers.target',
|
||||
]
|
||||
|
||||
foreach file : units
|
||||
install_data(file,
|
||||
install_dir : userunitdir)
|
||||
endforeach
|
||||
|
||||
in_units = [
|
||||
'systemd-exit.service',
|
||||
]
|
||||
|
||||
foreach file : in_units
|
||||
gen = configure_file(
|
||||
input : file + '.in',
|
||||
output : file,
|
||||
configuration : substs)
|
||||
install_data(gen,
|
||||
install_dir : userunitdir)
|
||||
endforeach
|
Loading…
Reference in New Issue
Block a user