summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile28
l---------src/basic/Makefile1
-rw-r--r--src/basic/errno-to-name.awk9
-rwxr-xr-xsrc/basic/generate-errno-list.sh4
-rwxr-xr-xsrc/basic/generate-gperfs.py16
-rw-r--r--src/basic/meson.build424
l---------src/cgroups-agent/Makefile1
l---------src/core/Makefile1
-rw-r--r--src/core/meson.build248
l---------src/libelogind/Makefile1
-rw-r--r--src/libelogind/meson.build144
l---------src/libelogind/sd-bus/Makefile1
l---------src/libelogind/sd-daemon/Makefile1
l---------src/libelogind/sd-event/Makefile1
l---------src/libelogind/sd-id128/Makefile1
l---------src/libelogind/sd-login/Makefile1
l---------src/login/Makefile1
-rw-r--r--src/login/meson.build181
l---------src/shared/Makefile1
-rw-r--r--src/shared/meson.build198
l---------src/sleep/Makefile1
-rw-r--r--src/sleep/meson.build4
l---------src/systemd/Makefile1
-rw-r--r--src/systemd/meson.build75
l---------src/test/Makefile1
-rwxr-xr-xsrc/test/generate-sym-test.py23
-rw-r--r--src/test/meson.build975
-rw-r--r--src/test/test-hashmap-ordered.awk11
l---------src/update-utmp/Makefile1
-rw-r--r--src/update-utmp/meson.build4
30 files changed, 2316 insertions, 43 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 9d0750519..000000000
--- a/src/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# This file is part of systemd.
-#
-# Copyright 2010 Lennart Poettering
-#
-# 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/>.
-
-# This file is a dirty trick to simplify compilation from within
-# emacs. This file is not intended to be distributed. So, don't touch
-# it, even better ignore it!
-
-all:
- $(MAKE) -C ..
-
-clean:
- $(MAKE) -C .. clean
-
-.PHONY: all clean
diff --git a/src/basic/Makefile b/src/basic/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/basic/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/basic/errno-to-name.awk b/src/basic/errno-to-name.awk
new file mode 100644
index 000000000..0878abacb
--- /dev/null
+++ b/src/basic/errno-to-name.awk
@@ -0,0 +1,9 @@
+BEGIN{
+ print "static const char* const errno_names[] = { "
+}
+!/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ {
+ printf " [%s] = \"%s\",\n", $1, $1
+}
+END{
+ print "};"
+}
diff --git a/src/basic/generate-errno-list.sh b/src/basic/generate-errno-list.sh
new file mode 100755
index 000000000..e2bab8b32
--- /dev/null
+++ b/src/basic/generate-errno-list.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -eu
+
+$1 -dM -include errno.h - </dev/null | \
+ awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
diff --git a/src/basic/generate-gperfs.py b/src/basic/generate-gperfs.py
new file mode 100755
index 000000000..d4cc9aa45
--- /dev/null
+++ b/src/basic/generate-gperfs.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env 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))
diff --git a/src/basic/meson.build b/src/basic/meson.build
new file mode 100644
index 000000000..4ba97edd1
--- /dev/null
+++ b/src/basic/meson.build
@@ -0,0 +1,424 @@
+#if 0 /// elogind has a shorter list
+# 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())
+#else
+basic_sources_plain = files('''
+ alloc-util.c
+ alloc-util.h
+ audit-util.c
+ audit-util.h
+ build.h
+ bus-label.c
+ bus-label.h
+ capability-util.c
+ capability-util.h
+ cgroup-util.c
+ cgroup-util.h
+ conf-files.c
+ conf-files.h
+ copy.c
+ copy.h
+ def.h
+ dirent-util.c
+ dirent-util.h
+ env-util.c
+ env-util.h
+ errno-list.c
+ errno-list.h
+ escape.c
+ escape.h
+ exec-util.c
+ exec-util.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
+ gunicode.c
+ gunicode.h
+ hash-funcs.c
+ hash-funcs.h
+ hashmap.c
+ hashmap.h
+ hexdecoct.c
+ hexdecoct.h
+ hostname-util.c
+ hostname-util.h
+ io-util.c
+ io-util.h
+ khash.c
+ khash.h
+ label.c
+ label.h
+ list.h
+ locale-util.c
+ locale-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
+ parse-printf-format.c
+ parse-printf-format.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
+ refcnt.h
+ rm-rf.c
+ rm-rf.h
+ selinux-util.c
+ selinux-util.h
+ set.h
+ signal-util.c
+ signal-util.h
+ siphash24.c
+ siphash24.h
+ smack-util.c
+ smack-util.h
+ socket-util.c
+ socket-util.h
+ sparse-endian.h
+ stat-util.c
+ stat-util.h
+ stdio-util.h
+ string-table.c
+ string-table.h
+ string-util.c
+ string-util.h
+ strv.c
+ strv.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
+ xattr-util.c
+ xattr-util.h
+'''.split())
+#endif // 0
+
+missing_h = files('missing.h')
+
+generate_gperfs = find_program('generate-gperfs.py')
+
+#if 0 /// elogind has only the errno list.
+# 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)
+#endif // 0
+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 = []
+#if 0 /// elogind has only the errno list.
+# foreach item : [['af', af_list_txt, 'af', ''],
+# ['arphrd', arphrd_list_txt, 'arphrd', 'ARPHRD_'],
+# ['cap', cap_list_txt, 'capability', ''],
+# ['errno', errno_list_txt, 'errno', '']]
+#else
+foreach item : [['errno', errno_list_txt, 'errno', '']]
+#endif // 0
+
+ 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,
+#if 0 /// no blkid in elogind
+# libblkid,
+#endif // 0
+ libselinux,
+ ],
+ install : false)
diff --git a/src/cgroups-agent/Makefile b/src/cgroups-agent/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/cgroups-agent/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/core/Makefile b/src/core/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/core/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/core/meson.build b/src/core/meson.build
new file mode 100644
index 000000000..d539ba0ee
--- /dev/null
+++ b/src/core/meson.build
@@ -0,0 +1,248 @@
+#if 0 /// elogind has only two of the parts here in it...
+# 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()
+#else
+libcore_la_sources = files('''
+ cgroup.c
+ cgroup.h
+ mount-setup.c
+ mount-setup.h
+'''.split())
+#endif // 0
+
+#if 0 /// The rest is not needed by elogind, we use the sources directly in login
+# 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,
+# libseccomp,
+# 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)
+#endif // 0
+
+# 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)
+
+#if 0 /// totally UNNEEDED in elogind
+# 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')))
+#endif // 0
diff --git a/src/libelogind/Makefile b/src/libelogind/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/libelogind/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/libelogind/meson.build b/src/libelogind/meson.build
new file mode 100644
index 000000000..5d012ea6e
--- /dev/null
+++ b/src/libelogind/meson.build
@@ -0,0 +1,144 @@
+sd_login_c = files('sd-login/sd-login.c')
+
+#if 0 /// elogind has a shorter list, of course...
+# 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/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
+#else
+libelogind_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-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/sd-bus.c
+ sd-daemon/sd-daemon.c
+ sd-event/sd-event.c
+ sd-id128/id128-util.c
+ sd-id128/id128-util.h
+ sd-id128/sd-id128.c
+'''.split()) + sd_login_c
+#endif // 0
+
+libelogind_internal = static_library(
+ 'elogind',
+ libelogind_internal_sources,
+ install : false,
+ include_directories : includes,
+ link_with : libbasic,
+ dependencies : [threads,
+ librt])
+
+libelogind_sym = 'src/libelogind/libelogind.sym'
+
+libelogind_pc = configure_file(
+ input : 'libelogind.pc.in',
+ output : 'libelogind.pc',
+ configuration : substs)
+install_data(libelogind_pc,
+ install_dir : pkgconfiglibdir)
diff --git a/src/libelogind/sd-bus/Makefile b/src/libelogind/sd-bus/Makefile
deleted file mode 120000
index 94aaae2c4..000000000
--- a/src/libelogind/sd-bus/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libelogind/sd-daemon/Makefile b/src/libelogind/sd-daemon/Makefile
deleted file mode 120000
index 94aaae2c4..000000000
--- a/src/libelogind/sd-daemon/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libelogind/sd-event/Makefile b/src/libelogind/sd-event/Makefile
deleted file mode 120000
index 94aaae2c4..000000000
--- a/src/libelogind/sd-event/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libelogind/sd-id128/Makefile b/src/libelogind/sd-id128/Makefile
deleted file mode 120000
index 94aaae2c4..000000000
--- a/src/libelogind/sd-id128/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/libelogind/sd-login/Makefile b/src/libelogind/sd-login/Makefile
deleted file mode 120000
index 94aaae2c4..000000000
--- a/src/libelogind/sd-login/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../Makefile \ No newline at end of file
diff --git a/src/login/Makefile b/src/login/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/login/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/login/meson.build b/src/login/meson.build
new file mode 100644
index 000000000..9fd44ddc1
--- /dev/null
+++ b/src/login/meson.build
@@ -0,0 +1,181 @@
+#if 0 /// rename to elogind
+# systemd_logind_sources = files('''
+# logind.c
+# logind.h
+# '''.split())
+#else
+elogind_sources = files('''
+ elogind.c
+ elogind.h
+ logind.c
+ logind.h
+'''.split())
+#endif // 0
+
+logind_gperf_c = custom_target(
+ 'logind_gperf.c',
+ input : 'logind-gperf.gperf',
+ output : 'logind-gperf.c',
+ command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
+
+#if 0 /// rename to elogind
+# systemd_logind_sources += [logind_gperf_c]
+#else
+elogind_sources += [logind_gperf_c]
+#endif // 0
+
+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())
+
+#if 1 /// elogind has some additional files:
+liblogind_core_sources += [files('''
+ elogind-dbus.c
+ elogind-dbus.h
+'''.split()),
+ libcore_la_sources,
+ sleep_files,
+ update_utmp_files]
+#endif // 1
+
+logind_acl_c = files('logind-acl.c')
+if conf.get('HAVE_ACL', false)
+ 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 1 /// elogind has some additional files:
+loginctl_sources += files('''
+ eloginctl.c
+ eloginctl.h
+'''.split())
+#endif // 1
+
+#if 0 /// elogind builds itself unconditionally and with some adaptatins
+# if conf.get('ENABLE_LOGIND', false)
+# 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
+#else
+logind_conf = configure_file(
+ input : 'logind.conf.in',
+ output : 'logind.conf',
+ configuration : substs)
+install_data(logind_conf,
+ install_dir : pkgsysconfdir)
+
+pam_elogind_sym = 'src/login/pam_elogind.sym'
+pam_elogind_c = files('pam_elogind.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(
+ 'elogind-user',
+ input : 'elogind-user.m4',
+ output: 'elogind-user',
+ command : [m4, '-P'] + m4_defines + ['@INPUT@'],
+ capture : true,
+ install : pamconfdir != 'no',
+ install_dir : pamconfdir)
+#endif //0
diff --git a/src/shared/Makefile b/src/shared/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/shared/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/shared/meson.build b/src/shared/meson.build
new file mode 100644
index 000000000..7505d3963
--- /dev/null
+++ b/src/shared/meson.build
@@ -0,0 +1,198 @@
+#if 0 /// elogind has a much shorter list
+# 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
+# firewall-util.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
+# udev-util.c
+# 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()
+#else
+shared_sources = '''
+ bus-util.c
+ bus-util.h
+ clean-ipc.c
+ clean-ipc.h
+ conf-parser.c
+ conf-parser.h
+ musl_missing.c
+ musl_missing.h
+ nsflags.c
+ nsflags.h
+ pager.c
+ pager.h
+ sleep-config.c
+ sleep-config.h
+ spawn-polkit-agent.c
+ spawn-polkit-agent.h
+ udev-util.c
+ udev-util.h
+'''.split()
+#endif // 0
+
+test_tables_h = files('test-tables.h')
+shared_sources += [test_tables_h]
+
+if conf.get('HAVE_ACL', false)
+ shared_sources += ['acl-util.c']
+endif
+
+if conf.get('HAVE_UTMP', false)
+ shared_sources += ['utmp-wtmp.c']
+endif
+
+#if 0 /// UNNEEDED by elogind
+# if conf.get('HAVE_SECCOMP', false)
+# shared_sources += ['seccomp-util.c']
+# endif
+#
+# if conf.get('HAVE_LIBIPTC', false)
+# shared_sources += ['firewall-util.c']
+# endif
+#endif // 0
+
+libshared_name = 'elogind-shared-@0@'.format(meson.project_version())
+
+#if 0 /// elogind doesn't need all this
+# libshared_deps = [threads,
+# librt,
+# libcap,
+# libacl,
+# libcryptsetup,
+# libgcrypt,
+# libiptc,
+# libseccomp,
+# libselinux,
+# libidn,
+# libxz,
+# liblz4,
+# libblkid]
+# #else
+libshared_deps = [threads,
+ libcap,
+ libacl,
+ libselinux,
+ libudev]
+#endif // 0
+
+libshared = shared_library(
+ libshared_name,
+ shared_sources,
+ basic_sources,
+#if 0 /// "Slightly" different in elogind
+# journal_internal_sources,
+# libsystemd_internal_sources,
+# libudev_sources,
+#else
+ libelogind_internal_sources,
+#endif // 0
+ include_directories : includes,
+ link_args : ['-shared'],
+ c_args : ['-fvisibility=default'],
+ dependencies : libshared_deps,
+ install : true,
+ install_dir : rootlibexecdir)
+
+libshared_static = static_library(
+ libshared_name,
+ shared_sources,
+ basic_sources,
+#if 1 /// need elogind internal library sources
+ libelogind_internal_sources,
+#endif // 1
+ include_directories : includes,
+ dependencies : libshared_deps)
diff --git a/src/sleep/Makefile b/src/sleep/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/sleep/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/sleep/meson.build b/src/sleep/meson.build
new file mode 100644
index 000000000..6d76d101f
--- /dev/null
+++ b/src/sleep/meson.build
@@ -0,0 +1,4 @@
+sleep_files = files('''
+ sleep.c
+ sleep.h
+'''.split())
diff --git a/src/systemd/Makefile b/src/systemd/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/systemd/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/systemd/meson.build b/src/systemd/meson.build
new file mode 100644
index 000000000..82159f336
--- /dev/null
+++ b/src/systemd/meson.build
@@ -0,0 +1,75 @@
+#if 0 /// No systemd-journal in elogind ...
+# _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()
+#else
+_systemd_headers = '''
+ sd-bus.h
+ sd-bus-protocol.h
+ sd-bus-vtable.h
+ sd-daemon.h
+ sd-event.h
+ sd-id128.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',
+#if 0 /// elogind needs them somewhere else
+# subdir : 'systemd')
+#else
+ subdir : 'elogind/systemd')
+#endif // 0
+
+
+############################################################
+
+opts = [['c'],
+ ['c', '-ansi'],
+ ['c', '-std=iso9899:1990']]
+
+cxx = find_program('c++', required : false)
+if cxx.found()
+ opts += [['c++']]
+endif
+
+foreach header : _systemd_headers
+ foreach opt : opts
+ name = ''.join([header, ':'] + opt)
+ test('cc-' + name,
+ check_compilation_sh,
+ args : cc.cmd_array() + ['-c', '-x'] + opt +
+ ['-Werror', '-include',
+ join_paths(meson.current_source_dir(), header)])
+ endforeach
+endforeach
diff --git a/src/test/Makefile b/src/test/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/test/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py
new file mode 100755
index 000000000..357cce8e4
--- /dev/null
+++ b/src/test/generate-sym-test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env 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;
+}''')
diff --git a/src/test/meson.build b/src/test/meson.build
new file mode 100644
index 000000000..b7b21227e
--- /dev/null
+++ b/src/test/meson.build
@@ -0,0 +1,975 @@
+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()
+#if 0 /// UNNEEDED in elogind
+# test_env.set('SYSTEMD_KBD_MODEL_MAP', kbd_model_map)
+# test_env.set('SYSTEMD_LANGUAGE_FALLBACK_MAP', language_fallback_map)
+#endif // 0
+test_env.set('PATH', path)
+test_env.prepend('PATH', meson.build_root())
+
+############################################################
+
+generate_sym_test_py = find_program('generate-sym-test.py')
+
+test_libelogind_sym_c = custom_target(
+ 'test-libelogind-sym.c',
+ input : [libelogind_sym_path] + systemd_headers,
+ output : 'test-libelogind-sym.c',
+ command : [generate_sym_test_py, libelogind_sym_path] + systemd_headers,
+ capture : true)
+
+#if 0 /// UNNEEDED in elogind
+# 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')
+#endif // 0
+
+############################################################
+
+tests += [
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-device-nodes.c'],
+# [],
+# []],
+
+# [['src/test/test-engine.c'],
+# [libcore,
+# libudev,
+# libelogind_internal],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-job-type.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-ns.c'],
+# [libcore,
+# libshared],
+# [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],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid],
+# '', 'unsafe'],
+
+# [['src/test/test-dns-domain.c'],
+# [libcore,
+# libelogind_network],
+# []],
+
+# [['src/test/test-boot-timestamps.c'],
+# [],
+# [],
+# 'ENABLE_EFI'],
+
+# [['src/test/test-unit-name.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-unit-file.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-utf8.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-capability.c'],
+# [],
+# [libcap]],
+
+# [['src/test/test-async.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-locale-util.c'],
+ [],
+ []],
+
+ [['src/test/test-copy.c'],
+ [libshared_static],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-sigbus.c'],
+# [],
+# []],
+
+# [['src/test/test-condition.c'],
+# [],
+# []],
+
+# [['src/test/test-fdset.c'],
+# [],
+# []],
+
+# [['src/test/test-fstab-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-random-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-ratelimit.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-mount-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-exec-util.c'],
+ [],
+ []],
+
+ [['src/test/test-hexdecoct.c'],
+ [],
+ []],
+
+ [['src/test/test-alloc-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-xattr-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-io-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-glob-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-fs-util.c'],
+ [],
+ []],
+
+ [['src/test/test-proc-cmdline.c'],
+ [],
+ []],
+
+ [['src/test/test-fd-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-web-util.c'],
+# [],
+# []],
+
+# [['src/test/test-cpu-set-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['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'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-hostname-util.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-process-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['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],
+# [threads,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-verbs.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['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'],
+#endif // 0
+
+ [['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'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-bitmap.c'],
+# [],
+# []],
+
+# [['src/test/test-xml.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-list.c'],
+ [],
+ []],
+
+ [['src/test/test-unaligned.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['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,
+# libelogind_network,
+# libshared],
+# [threads,
+# libseccomp,
+# libmount,
+# libxz,
+# liblz4,
+# libblkid],
+# '', '', [], libudev_core_includes],
+#endif // 0
+
+ [['src/test/test-prioq.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-fileio.c'],
+# [],
+# []],
+
+# [['src/test/test-time.c'],
+# [],
+# []],
+
+# [['src/test/test-clock.c'],
+# [],
+# []],
+
+# [['src/test/test-architecture.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-log.c'],
+ [],
+ []],
+
+ [['src/test/test-ipcrm.c'],
+ [],
+ [],
+ '', 'unsafe'],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-btrfs.c'],
+# [],
+# [],
+# '', 'manual'],
+
+
+# [['src/test/test-firewall-util.c'],
+# [libshared],
+# [],
+# 'HAVE_LIBIPTC'],
+
+# [['src/test/test-netlink-manual.c'],
+# [],
+# [libkmod],
+# 'HAVE_KMOD', 'manual'],
+#endif // 0
+
+ [['src/test/test-ellipsize.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-date.c'],
+# [],
+# []],
+
+# [['src/test/test-sleep.c'],
+# [],
+# []],
+
+# [['src/test/test-replace-var.c'],
+# [],
+# []],
+
+# [['src/test/test-calendarspec.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-strip-tab-ansi.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-daemon.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-cgroup.c'],
+ [],
+ [],
+ '', 'manual'],
+
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-cgroup-mask.c'],
+# [libcore,
+# libshared],
+# [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'],
+# [],
+# []],
+#endif // 0
+
+ [['src/test/test-path-util.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-path.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+
+# [['src/test/test-execute.c'],
+# [libcore,
+# libshared],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-siphash24.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['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],
+# [threads,
+# librt,
+# libseccomp,
+# libselinux,
+# libmount,
+# libblkid]],
+#endif // 0
+
+ [['src/test/test-conf-files.c'],
+ [],
+ []],
+
+ [['src/test/test-conf-parser.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['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],
+# []],
+
+# [['src/test/test-udev.c'],
+# [libudev_core,
+# libudev_internal,
+# libelogind_network,
+# libshared],
+# [threads,
+# librt,
+# libblkid,
+# libkmod,
+# libacl],
+# '', 'manual'],
+#endif // 0
+
+ [['src/test/test-id128.c'],
+ [],
+ []],
+
+ [['src/test/test-hash.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/test/test-nss.c'],
+# [],
+# [libdl],
+# '', 'manual'],
+#endif // 0
+]
+
+############################################################
+
+# define some tests here, because the link_with deps were not defined earlier
+
+#if 0 /// No systemd-journal in elogind, of course
+# 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],
+# [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]],
+# ]
+#endif // 0
+
+############################################################
+
+tests += [
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-marshal.c'],
+# [],
+# [threads,
+# libglib,
+# libgobject,
+# libgio,
+# libdbus]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-signature.c'],
+ [],
+ [threads]],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-chat.c'],
+# [],
+# [threads]],
+
+# [['src/libelogind/sd-bus/test-bus-cleanup.c'],
+# [],
+# [threads,
+# libseccomp]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-error.c'],
+ [libshared_static,
+ libelogind_internal],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-track.c'],
+# [],
+# [libseccomp]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-server.c'],
+ [],
+ [threads]],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-objects.c'],
+# [],
+# [threads]],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-vtable.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-gvariant.c'],
+# [],
+# [libglib,
+# libgobject,
+# libgio]],
+
+# [['src/libelogind/sd-bus/test-bus-creds.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-match.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-bus/test-bus-kernel.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-bus/test-bus-kernel-bloom.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-bus/test-bus-benchmark.c'],
+# [],
+# [threads]],
+
+# [['src/libelogind/sd-bus/test-bus-zero-copy.c'],
+# [],
+# []],
+#endif // 0
+
+ [['src/libelogind/sd-bus/test-bus-introspect.c'],
+ [],
+ []],
+
+ [['src/libelogind/sd-event/test-event.c'],
+ [],
+ []],
+
+#if 0 /// UNNEEDED in elogind
+# [['src/libelogind/sd-netlink/test-netlink.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-netlink/test-local-addresses.c'],
+# [],
+# []],
+
+# [['src/libelogind/sd-resolve/test-resolve.c'],
+# [],
+# [threads]],
+#endif // 0
+ [['src/libelogind/sd-login/test-login.c'],
+ [],
+ []],
+]
+
+#if 0 /// UNNEEDED in elogind
+# if cxx.found()
+# tests += [
+# [['src/libelogind/sd-bus/test-bus-vtable-cc.cc'],
+# [],
+# []]
+# ]
+# endif
+#endif // 0
+
+############################################################
+
+#if 0 /// UNNEEDED in elogind
+# tests += [
+# [['src/libelogind-network/test-dhcp-option.c',
+# 'src/libelogind-network/dhcp-protocol.h',
+# 'src/libelogind-network/dhcp-internal.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-sd-dhcp-lease.c',
+# 'src/libelogind-network/dhcp-lease-internal.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp-client.c',
+# 'src/libelogind-network/dhcp-protocol.h',
+# 'src/libelogind-network/dhcp-internal.h',
+# 'src/systemd/sd-dhcp-client.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp-server.c'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ipv4ll.c',
+# 'src/libelogind-network/arp-util.h',
+# 'src/systemd/sd-ipv4ll.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ipv4ll-manual.c',
+# 'src/systemd/sd-ipv4ll.h'],
+# [libshared,
+# libelogind_network],
+# [],
+# '', 'manual'],
+
+# [['src/libelogind-network/test-acd.c',
+# 'src/systemd/sd-ipv4acd.h'],
+# [libshared,
+# libelogind_network],
+# [],
+# '', 'manual'],
+
+# [['src/libelogind-network/test-ndisc-rs.c',
+# 'src/libelogind-network/dhcp-identifier.h',
+# 'src/libelogind-network/dhcp-identifier.c',
+# 'src/libelogind-network/icmp6-util.h',
+# 'src/systemd/sd-dhcp6-client.h',
+# 'src/systemd/sd-ndisc.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-ndisc-ra.c',
+# 'src/libelogind-network/icmp6-util.h',
+# 'src/systemd/sd-ndisc.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-dhcp6-client.c',
+# 'src/libelogind-network/dhcp-identifier.h',
+# 'src/libelogind-network/dhcp-identifier.c',
+# 'src/libelogind-network/dhcp6-internal.h',
+# 'src/systemd/sd-dhcp6-client.h'],
+# [libshared,
+# libelogind_network],
+# []],
+
+# [['src/libelogind-network/test-lldp.c'],
+# [libshared,
+# libelogind_network],
+# []],
+# ]
+#endif // 0
+
+############################################################
+
+tests += [
+ [['src/login/test-login-shared.c'],
+ [],
+ []],
+
+ [['src/login/test-inhibit.c'],
+ [],
+ [],
+ '', 'manual'],
+
+ [['src/login/test-login-tables.c'],
+ [liblogind_core,
+ libshared],
+ [threads,
+ libaudit,
+ libudev]],
+]
diff --git a/src/test/test-hashmap-ordered.awk b/src/test/test-hashmap-ordered.awk
new file mode 100644
index 000000000..10f4386fa
--- /dev/null
+++ b/src/test/test-hashmap-ordered.awk
@@ -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
+}
diff --git a/src/update-utmp/Makefile b/src/update-utmp/Makefile
deleted file mode 120000
index d0b0e8e00..000000000
--- a/src/update-utmp/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/update-utmp/meson.build b/src/update-utmp/meson.build
new file mode 100644
index 000000000..c2070bb9a
--- /dev/null
+++ b/src/update-utmp/meson.build
@@ -0,0 +1,4 @@
+update_utmp_files = files('''
+ update-utmp.c
+ update-utmp.h
+'''.split())