]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agobtrfs-util: tighten variable scope used in loop 18325/head
Susant Sahani [Wed, 20 Jan 2021 14:14:30 +0000 (15:14 +0100)] 
btrfs-util: tighten variable scope used in loop

4 years agoanalyze: tighten variable scope used in loop
Susant Sahani [Wed, 20 Jan 2021 13:21:37 +0000 (14:21 +0100)] 
analyze: tighten variable scope used in loop

4 years agosd-event: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 13:13:08 +0000 (14:13 +0100)] 
sd-event: Use hashmap_ensure_put

4 years agosd-event: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 12:58:00 +0000 (13:58 +0100)] 
sd-event: Use hashmap_ensure_put

4 years agosd-device: Use TAKE_PTR
Susant Sahani [Wed, 20 Jan 2021 12:54:59 +0000 (13:54 +0100)] 
sd-device: Use TAKE_PTR

4 years agosd-device: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 12:54:01 +0000 (13:54 +0100)] 
sd-device: Use hashmap_ensure_put

4 years agoudev-rules: use ordered_hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 14:13:02 +0000 (15:13 +0100)] 
udev-rules: use ordered_hashmap_ensure_put

4 years agonetwork: networkd-network use TAKE_PTR
Susant Sahani [Wed, 20 Jan 2021 12:00:15 +0000 (13:00 +0100)] 
network: networkd-network use TAKE_PTR

4 years agonetwork: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 11:59:03 +0000 (12:59 +0100)] 
network: Use hashmap_ensure_put

4 years agonetwork: ndisc - Use ordered_set_ensure_put
Susant Sahani [Wed, 20 Jan 2021 11:56:44 +0000 (12:56 +0100)] 
network: ndisc - Use ordered_set_ensure_put

4 years agomachine: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 11:53:15 +0000 (12:53 +0100)] 
machine: Use hashmap_ensure_put

4 years agologind: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 11:51:08 +0000 (12:51 +0100)] 
logind: Use hashmap_ensure_put

4 years agojournal: Use cleanup_free
Susant Sahani [Wed, 20 Jan 2021 11:46:42 +0000 (12:46 +0100)] 
journal: Use cleanup_free

4 years agoJournal: Use hashmap_ensure_put
Susant Sahani [Wed, 20 Jan 2021 11:29:08 +0000 (12:29 +0100)] 
Journal: Use hashmap_ensure_put

4 years agoudev: use DEFINE_MAIN_FUNCTION in cdrom_id
Dan Streetman [Sun, 17 Jan 2021 22:46:12 +0000 (17:46 -0500)] 
udev: use DEFINE_MAIN_FUNCTION in cdrom_id

This was failing s390x ubuntu ci due to an old version of binutils;
the binutils package in use for ubuntu ci tests has been updated and
the build no longer fails, so this can use the macro again.

Fixes: #18165
4 years agotree-wide: ignore messages with too long control data
Lennart Poettering [Tue, 19 Jan 2021 20:34:20 +0000 (21:34 +0100)] 
tree-wide: ignore messages with too long control data

Apparently SELinux inserts control data into AF_UNIX datagrams where we
don't expect it, thus miscalculating the control data. This looks like
something to fix in SELinux, but we still should handle this gracefully
and just drop the offending datagram and continue.

recvmsg_safe() actually already drops the datagram, it's just a matter
of actually ignoring EXFULL (which it generates if control data is too
large) in the right places.

This does this wherever an AF_UNIX/SOCK_DGRAM socket is used with
recvmsg_safe() that is not just internal communication.

Fixes: #17795
Follow-up for: 3691bcf3c5eebdcca5b4f1c51c745441c57a6cd1

4 years agoRevert "test-functions: make sure we test our own libudev instead of the host libudev"
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jan 2021 17:39:50 +0000 (18:39 +0100)] 
Revert "test-functions: make sure we test our own libudev instead of the host libudev"

This reverts commit 73484ecff90f2cc235d827c0e955999bffe64dd0.

3976f372ae91e1cbe5ff9873aadfc2c43400452e moved libudev.so to be built in the
main directory, so this addition to $LD_LIBRARY_PATH is now obsolete.

After that commit, we build the following shared libraries:

build/libnss_myhostname.so.2
build/libnss_mymachines.so.2
build/libnss_resolve.so.2
build/libnss_systemd.so.2
build/libsystemd.so.0.30.0
build/libudev.so.1.7.0
build/pam_systemd.so
build/pam_systemd_home.so
build/src/boot/efi/stub.so
build/src/boot/efi/systemd_boot.so
build/src/shared/libsystemd-shared-247.so

EFI stubs don't matter, and libsystemd-shared-nnn.so is loaded through rpath,
and is doesn't need to and shouldn't be in $LD_LIBRARY_PATH. In effect, we only
ever need to add the main build directory to the search path.

4 years agomarkdown: fix comment
Lennart Poettering [Tue, 19 Jan 2021 21:24:05 +0000 (22:24 +0100)] 
markdown: fix comment

Follow-up for 2d816c9804c1d565797faff85c0fdbfb15f1e9d5

4 years agomarkdown: suggest backticks around uname -a output
Lennart Poettering [Tue, 19 Jan 2021 21:24:05 +0000 (22:24 +0100)] 
markdown: suggest backticks around uname -a output

Fixes: #18238
4 years agoexecute: for processes where creds logic is turned off, don't pass creds path to...
Lennart Poettering [Tue, 19 Jan 2021 16:31:21 +0000 (17:31 +0100)] 
execute: for processes where creds logic is turned off, don't pass creds path to namespace logic

Otherwise, the namespace logic will try to mount a dir that doesn't
actually exist.

Fixes: #18116
4 years agoMerge pull request #18307 from poettering/import-verity-download
Lennart Poettering [Tue, 19 Jan 2021 19:02:34 +0000 (20:02 +0100)] 
Merge pull request #18307 from poettering/import-verity-download

importd: when downloading raw image, also download .roothash.p7s and .verity along with it

4 years agoimport: refactor how we do gpg validation 18307/head
Lennart Poettering [Fri, 15 Jan 2021 23:06:13 +0000 (00:06 +0100)] 
import: refactor how we do gpg validation

Let's split out the actual gpg logic into a helper function, so that we
can add alternative validations later on.

4 years agoimport: optionally pull .verity + .roothash.p7s data when downloading
Lennart Poettering [Fri, 15 Jan 2021 22:18:54 +0000 (23:18 +0100)] 
import: optionally pull .verity + .roothash.p7s data when downloading

We already had support for downlading a .nspawn and a .roothash file,
let's make the set complete, and also download .verity + roothash.p7s if
it exists, as nspawn consumes that.

Since there are now four kinds of additional resources to acquire, let's
introduce a PullFlags flags value for this instead of separate 'bool'
variables, it's just too many to always pass those around on the
function parameter list.

4 years agoimport: ignore non-successful HTTP codes for collecing image metadata
Lennart Poettering [Fri, 15 Jan 2021 21:55:15 +0000 (22:55 +0100)] 
import: ignore non-successful HTTP codes for collecing image metadata

Previously we'd collect the data from redirects too, which wasn't
particularly terrible, since these typically don't carry the data we
were interested in, but it's still incorrect to do so.

4 years agoimport: turn on HTTP logging in debug mode
Lennart Poettering [Fri, 15 Jan 2021 21:54:42 +0000 (22:54 +0100)] 
import: turn on HTTP logging in debug mode

4 years agoimport: small memory management simplification
Lennart Poettering [Fri, 15 Jan 2021 20:23:20 +0000 (21:23 +0100)] 
import: small memory management simplification

4 years agoimport: reset PullJob properly
Lennart Poettering [Fri, 15 Jan 2021 20:22:27 +0000 (21:22 +0100)] 
import: reset PullJob properly

Properly reset all fields that have to do with the current GET job when
we restart things. Previously we freed/reset only some stuff, leaking
some memory even.

4 years agoimport: rework how verification works
Lennart Poettering [Fri, 15 Jan 2021 15:45:29 +0000 (16:45 +0100)] 
import: rework how verification works

Previously the PullJob object took internal care of rerequested the
SHA256SUMS file, if requesting <image>.sha256 didn't work. This was a
weird a non-abstraction only used when actually getting the checksum
files.

Let's move this out of the PullJob, so that it is generic again, and
does roughly the same stuff for all resources it is used for: let's
define a generic .on_not_found() handler that can be set on a PullJob
object, and is called whenever with see HTTP 404, and may be used to
provide a new URL to try if the first didn't work.

This is also preparation for later work to support PKCS#7 signatures
instead of gpg signatures, where a similar logic is needed, and we thus
should have a generic infrastructure place.

This gets rid of the VerificationStyle field in the PullJob object:
instead of storing this non-generic field we just derive the same
information from the URL itself, which is safe, since we generated it
ourselves earlier.

4 years agoimport: use TAKE_PTR() where available
Lennart Poettering [Fri, 15 Jan 2021 15:42:58 +0000 (16:42 +0100)] 
import: use TAKE_PTR() where available

4 years agoimport: make scope of variable smaller
Lennart Poettering [Fri, 15 Jan 2021 15:42:45 +0000 (16:42 +0100)] 
import: make scope of variable smaller

4 years agoimport: comment indent fix
Lennart Poettering [Fri, 15 Jan 2021 15:47:41 +0000 (16:47 +0100)] 
import: comment indent fix

4 years agofs-util/rm-rf: improve remove+free destructors to take and return NULL
Lennart Poettering [Fri, 15 Jan 2021 21:13:46 +0000 (22:13 +0100)] 
fs-util/rm-rf: improve remove+free destructors to take and return NULL

Let#s make these helpers useful even without _cleanup_ logic, to destory
arbitary fields: make them OK wiht a NULL pointer as input, and always
return one as output.

4 years agonetwork: add support to RoutingPolicyRule lookup table name
Susant Sahani [Tue, 19 Jan 2021 11:58:53 +0000 (12:58 +0100)] 
network: add support to RoutingPolicyRule lookup table name

4 years agoMerge pull request #18181 from poettering/sysext
Lennart Poettering [Tue, 19 Jan 2021 15:02:58 +0000 (16:02 +0100)] 
Merge pull request #18181 from poettering/sysext

systemd-sysext as a method of merging simple OS extensions into /usr and /opt

4 years agoMerge pull request #18129 from keszybz/envvars
Lennart Poettering [Tue, 19 Jan 2021 15:02:27 +0000 (16:02 +0100)] 
Merge pull request #18129 from keszybz/envvars

Allow control characters in environment variable values

4 years agohomed: fix build without p11kit
Florian Westphal [Tue, 19 Jan 2021 08:25:15 +0000 (09:25 +0100)] 
homed: fix build without p11kit

homectl-pkcs11.c: In function 'identity_add_pkcs11_key_data':
homectl-pkcs11.c:155:13: error: implicit declaration of function 'pkcs11_acquire_certificate' [-Werror=implicit-function-declaration]

Restores the P11KIT compile-time test that was removed in 2289a78473282902db1108168df6414ae7d91b2f
("homed: move pkcs11 LUKS glue into shared code").

4 years agosystemctl: warn when importing environment variables with control characters 18129/head
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jan 2021 13:20:16 +0000 (14:20 +0100)] 
systemctl: warn when importing environment variables with control characters

I don't think it is useful to warn about about environemnt variables where the user
explicitly configured some value. If they went through the effort of escaping the cc
to include it in the setting (e.g. Environment="VAR=\efoo"), and we pass this through,
there isn't anything to warn about. This also applies to 'systemctl set-environment',
where the variable name and value are passed as arguments.

The only case where the warning *might* be useful is where the user might be
surprised by the value. This occurs when importing variables from the inherited
environment, i.e. in 'systemctl import-environment'. In not convinced that this is
useful, since the user better control their shell environment anyway.

$ systemctl import-environment
Calling import-environment without a list of variable names is deprecated.
Environment variable $LESS_TERMCAP_mb contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_md contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_me contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_se contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_so contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_ue contains control characters, importing anyway.
Environment variable $LESS_TERMCAP_us contains control characters, importing anyway.
Environment variable $ZZZ contains control characters, importing anyway.

4 years agoAllow control characters in environment variable values
Zbigniew Jędrzejewski-Szmek [Sun, 3 Jan 2021 21:26:52 +0000 (22:26 +0100)] 
Allow control characters in environment variable values

So far, we would allow certain control characters (NL since
b4346b9a77bc6129dd3e, TAB since 6294aa76d818e831de45), but not others. Having
other control characters in environment variable *value* is expected and widely
used, for various prompts like $LESS, $LESS_TERMCAP_*, and other similar
variables. The typical environment exported by bash already contains a dozen or
so such variables, so programs need to handle them.

We handle then correctly too, for example in 'systemctl show-environment',
since 804ee07c1370d49aa9a. But we would still disallow setting such variables
by the user, in unit file Environment= and in set-environment/import-environment
operations. This is unexpected and confusing and doesn't help with anything
because such variables are present in the environment through other means.

When printing such variables, 'show-environment' escapes all special
characters, so variables with control characters are plainly visible.
In other uses, e.g. 'cat -v' can be used in similar fashion. This would already
need to be done to suppress color codes starting with \[.

Note that we still forbid invalid utf-8 with this patch. (Control characters
are valid, since they are valid 7-bit ascii.) I'm not sure if we should do
that, but since people haven't been actually asking for invalid utf-8, and only
for control characters, and invalid utf-8 causes other issues, I think it's OK
to leave this unchanged.

Fixes #4446, https://gitlab.gnome.org/GNOME/gnome-session/-/issues/45.

4 years agosystemctl: print a warning when trying to import a nonexistent variable
Zbigniew Jędrzejewski-Szmek [Sun, 3 Jan 2021 20:53:38 +0000 (21:53 +0100)] 
systemctl: print a warning when trying to import a nonexistent variable

I was quite confused what is happening:
$ XXX=xxx
$ systemctl --user import-environment XXX
$ systemctl --user show-environment | grep XXX
(nothing)

Obviously, 'export XXX' was missing. Without any indication why the
export is not happening, this can be hard to figure out.

Another option would be to error out. But so far we didn't, and doing
that could break some script which optimistically tries to export some
variables, if present.

4 years agosysext: install in /usr/lib/systemd/ for now 18181/head
Luca Boccassi [Mon, 18 Jan 2021 16:07:12 +0000 (16:07 +0000)] 
sysext: install in /usr/lib/systemd/ for now

This is a brand new binary, and the CI packaging doesn't pick it up,
causing the upstream testrun to fail (sysext is pulled in by the unit).

4 years agomeson: bindir is the default install_dir, no need to mention it
Lennart Poettering [Mon, 18 Jan 2021 20:17:04 +0000 (21:17 +0100)] 
meson: bindir is the default install_dir, no need to mention it

4 years agotest: improve a log message while building test images
Lennart Poettering [Mon, 18 Jan 2021 20:16:14 +0000 (21:16 +0100)] 
test: improve a log message while building test images

4 years agoupdate TODO
Lennart Poettering [Tue, 12 Jan 2021 15:54:27 +0000 (16:54 +0100)] 
update TODO

4 years agoman: mention SYSEXT_LEVEL in os-release(5)
Luca Boccassi [Tue, 12 Jan 2021 19:30:49 +0000 (19:30 +0000)] 
man: mention SYSEXT_LEVEL in os-release(5)

4 years agosysext: use parse_extension_release and reject extension if not found
Luca Boccassi [Mon, 11 Jan 2021 23:00:58 +0000 (23:00 +0000)] 
sysext: use parse_extension_release and reject extension if not found

4 years agoos-release: add support for /usr/lib/extension-release.d/
Luca Boccassi [Sun, 10 Jan 2021 22:54:15 +0000 (22:54 +0000)] 
os-release: add support for /usr/lib/extension-release.d/

Add helpers to look for extension-release.$NAME files in
/usr/lib/extension-release.d/ following the same pattern as os-release.

4 years agosysext: add verity boilerplate
Luca Boccassi [Sun, 10 Jan 2021 13:34:56 +0000 (13:34 +0000)] 
sysext: add verity boilerplate

4 years agomachine-image: properly support searching for images below some --root= path
Lennart Poettering [Tue, 12 Jan 2021 16:18:53 +0000 (17:18 +0100)] 
machine-image: properly support searching for images below some --root= path

systemd-sysext supports --root= for everything but the image discovery.
Fix that.

4 years agoman: add man page for systemd-sysext
Lennart Poettering [Tue, 12 Jan 2021 13:55:11 +0000 (14:55 +0100)] 
man: add man page for systemd-sysext

4 years agounits: add systemd-sysext.service unit for auto-activating extensions at boot
Lennart Poettering [Sat, 9 Jan 2021 21:24:55 +0000 (22:24 +0100)] 
units: add systemd-sysext.service unit for auto-activating extensions at boot

We'll leave this as opt-in (i.e. a unit that must be enabled
explicitly), since this is supposed to be a debug/developer feature
primarily, and thus no be around in regular production systems.

4 years agosysext: new tool for managing "system extensions" for /usr/ + /opt/
Lennart Poettering [Fri, 8 Jan 2021 15:57:27 +0000 (16:57 +0100)] 
sysext: new tool for managing "system extensions" for /usr/ + /opt/

4 years agoMerge pull request #18294 from ssahani/net-2
Yu Watanabe [Tue, 19 Jan 2021 07:46:41 +0000 (16:46 +0900)] 
Merge pull request #18294 from ssahani/net-2

tree wide use ensure_put

4 years agoMerge pull request #18300 from yuwata/analyze-verify-18252
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jan 2021 07:41:15 +0000 (08:41 +0100)] 
Merge pull request #18300 from yuwata/analyze-verify-18252

analyze: resolve executable path if it is relative

4 years agoudev: Use TAKE_PTR 18294/head
Susant Sahani [Mon, 18 Jan 2021 20:28:16 +0000 (21:28 +0100)] 
udev: Use TAKE_PTR

4 years agoudev-rules: Use ordered_hashmap_ensure_put
Susant Sahani [Mon, 18 Jan 2021 20:27:25 +0000 (21:27 +0100)] 
udev-rules: Use ordered_hashmap_ensure_put

4 years agosysusers: use ordered_hashmap_ensure_put
Susant Sahani [Tue, 19 Jan 2021 04:56:25 +0000 (05:56 +0100)] 
sysusers: use ordered_hashmap_ensure_put

4 years agoMerge pull request #18303 from yuwata/verity-cleanup
Yu Watanabe [Tue, 19 Jan 2021 03:22:55 +0000 (12:22 +0900)] 
Merge pull request #18303 from yuwata/verity-cleanup

veritysetup-generator: drop unused struct and variable

4 years agoMerge pull request #18038 from yuwata/meson-split
Yu Watanabe [Tue, 19 Jan 2021 03:22:34 +0000 (12:22 +0900)] 
Merge pull request #18038 from yuwata/meson-split

meson: various cleanups

4 years agoMerge pull request #18267 from lucaswerkmeister/truncate
Yu Watanabe [Mon, 18 Jan 2021 23:47:39 +0000 (08:47 +0900)] 
Merge pull request #18267 from lucaswerkmeister/truncate

Two StandardOutput=truncate:file improvements

4 years agoMerge pull request #18299 from ssahani/ensure-put
Yu Watanabe [Mon, 18 Jan 2021 23:42:26 +0000 (08:42 +0900)] 
Merge pull request #18299 from ssahani/ensure-put

More use of hashmap_ensure_put and ordered_hashmap_ensure_put

4 years agoTODO: fix typo 18303/head
Yu Watanabe [Mon, 18 Jan 2021 22:22:48 +0000 (07:22 +0900)] 
TODO: fix typo

4 years agoveritysetup-generator: drop unused struct and variable
Yu Watanabe [Mon, 18 Jan 2021 22:18:45 +0000 (07:18 +0900)] 
veritysetup-generator: drop unused struct and variable

Follow-ups for 08b04ec7e72b7327b4803809732b1b8fce8dd069.

This also drops unnecessary inclusion.

Fixes CID#1443889.

4 years agomeson: move several definitions related libsystemd to src/libsystemd/meson.build 18038/head
Yu Watanabe [Tue, 5 Jan 2021 06:03:39 +0000 (15:03 +0900)] 
meson: move several definitions related libsystemd to src/libsystemd/meson.build

4 years agomeson: use static_libsystemd_pic
Yu Watanabe [Tue, 5 Jan 2021 05:51:17 +0000 (14:51 +0900)] 
meson: use static_libsystemd_pic

4 years agomeson: add missing license header
Yu Watanabe [Tue, 5 Jan 2021 03:55:10 +0000 (12:55 +0900)] 
meson: add missing license header

4 years agomeson: move test or fuzzer definitions to relevant meson.build in subdirectories
Yu Watanabe [Mon, 4 Jan 2021 15:08:42 +0000 (00:08 +0900)] 
meson: move test or fuzzer definitions to relevant meson.build in subdirectories

4 years agomeson: drop unused variable
Yu Watanabe [Mon, 4 Jan 2021 14:57:52 +0000 (23:57 +0900)] 
meson: drop unused variable

4 years agomeson: drop unnecessary files from test definitions
Yu Watanabe [Mon, 4 Jan 2021 14:54:46 +0000 (23:54 +0900)] 
meson: drop unnecessary files from test definitions

4 years agomeson: drop unnecessary libraries from journal related tests
Yu Watanabe [Mon, 4 Jan 2021 14:48:10 +0000 (23:48 +0900)] 
meson: drop unnecessary libraries from journal related tests

4 years agomeson: slightly disentangle code dependencies
Yu Watanabe [Mon, 4 Jan 2021 14:36:00 +0000 (23:36 +0900)] 
meson: slightly disentangle code dependencies

But, still sd-id128 is used in src/basic.

4 years agomeson: sort inclusion of meson.build files in subdirectories
Yu Watanabe [Mon, 4 Jan 2021 12:27:00 +0000 (21:27 +0900)] 
meson: sort inclusion of meson.build files in subdirectories

4 years agomeson: move libjournal_core definition to src/journal/meson.build
Yu Watanabe [Mon, 4 Jan 2021 12:16:15 +0000 (21:16 +0900)] 
meson: move libjournal_core definition to src/journal/meson.build

4 years agomeson: move libudev related definitions to src/libudev/meson.build
Yu Watanabe [Mon, 4 Jan 2021 12:13:30 +0000 (21:13 +0900)] 
meson: move libudev related definitions to src/libudev/meson.build

Also, this makes libudev.so built in build directory.

4 years agomeson: move and gather find_program()
Yu Watanabe [Mon, 4 Jan 2021 11:47:00 +0000 (20:47 +0900)] 
meson: move and gather find_program()

4 years agomeson: drop redundant source files in executable()
Yu Watanabe [Mon, 4 Jan 2021 11:43:44 +0000 (20:43 +0900)] 
meson: drop redundant source files in executable()

4 years agomeson: move source file list for systemd-xdg-autostart-generator and its tests
Yu Watanabe [Mon, 4 Jan 2021 11:41:37 +0000 (20:41 +0900)] 
meson: move source file list for systemd-xdg-autostart-generator and its tests

4 years agomeson: move source file list for busctl
Yu Watanabe [Mon, 4 Jan 2021 11:35:33 +0000 (20:35 +0900)] 
meson: move source file list for busctl

4 years agomeson: move source file list for systemd-cryptenroll
Yu Watanabe [Mon, 4 Jan 2021 11:29:01 +0000 (20:29 +0900)] 
meson: move source file list for systemd-cryptenroll

4 years agomeson: move source file list for systemd-cryptsetup
Yu Watanabe [Mon, 4 Jan 2021 11:26:20 +0000 (20:26 +0900)] 
meson: move source file list for systemd-cryptsetup

4 years agomeson: show standalone-binaries setting in the summary
Yu Watanabe [Mon, 4 Jan 2021 11:21:48 +0000 (20:21 +0900)] 
meson: show standalone-binaries setting in the summary

4 years agomeson: use condition argument in test definition
Yu Watanabe [Mon, 4 Jan 2021 11:20:03 +0000 (20:20 +0900)] 
meson: use condition argument in test definition

4 years agomeson: drop redundant directory specification in additional source files
Yu Watanabe [Mon, 4 Jan 2021 11:17:22 +0000 (20:17 +0900)] 
meson: drop redundant directory specification in additional source files

4 years agomeson: move definition of systemctl source files
Yu Watanabe [Mon, 4 Jan 2021 11:12:28 +0000 (20:12 +0900)] 
meson: move definition of systemctl source files

4 years agomeson: introduce libtimesyncd_core library
Yu Watanabe [Mon, 4 Jan 2021 11:09:06 +0000 (20:09 +0900)] 
meson: introduce libtimesyncd_core library

4 years agomeson: enable several tests even if the relevant features are disabled
Yu Watanabe [Mon, 4 Jan 2021 11:00:10 +0000 (20:00 +0900)] 
meson: enable several tests even if the relevant features are disabled

4 years agomeson: fix indentation
Yu Watanabe [Mon, 4 Jan 2021 08:34:01 +0000 (17:34 +0900)] 
meson: fix indentation

4 years agomeson: drop unnecessary variable declarations
Yu Watanabe [Mon, 4 Jan 2021 08:33:47 +0000 (17:33 +0900)] 
meson: drop unnecessary variable declarations

4 years agomeson: drop unnecessary loop
Yu Watanabe [Mon, 4 Jan 2021 08:30:12 +0000 (17:30 +0900)] 
meson: drop unnecessary loop

4 years agotest: drop bus-util.h from sd-bus
Yu Watanabe [Thu, 31 Dec 2020 23:57:37 +0000 (08:57 +0900)] 
test: drop bus-util.h from sd-bus

To drop src/shared from include directories to build libsystemd.so later.

4 years agoefi: create symbolic link to efi/loader-feature.h
Yu Watanabe [Thu, 31 Dec 2020 23:55:21 +0000 (08:55 +0900)] 
efi: create symbolic link to efi/loader-feature.h

To drop src/boot/efi from include directories for binaries later.

4 years agoutil: move several DNS related definitions to src/basic/dns-def.h
Yu Watanabe [Thu, 31 Dec 2020 23:52:52 +0000 (08:52 +0900)] 
util: move several DNS related definitions to src/basic/dns-def.h

DNS_HOSTNAME_MAX is used by sd-resolve, but it was defined in
src/shared/dns-domain.h. The library libsystemd should be independent
of source files under src/shared.

4 years agoutil: move unit-file.[ch] to src/basic
Yu Watanabe [Thu, 31 Dec 2020 23:48:52 +0000 (08:48 +0900)] 
util: move unit-file.[ch] to src/basic

As basic/path-lookup.[ch] depend on them.

4 years agoutil: move parse_syscall_and_errno() to seccomp-util.c
Yu Watanabe [Thu, 31 Dec 2020 23:46:06 +0000 (08:46 +0900)] 
util: move parse_syscall_and_errno() to seccomp-util.c

This makes parse-util.c independent of seccomp-util.c, which is located
in src/shared.

4 years agofuzzers: move several fuzzers
Yu Watanabe [Thu, 31 Dec 2020 22:28:58 +0000 (07:28 +0900)] 
fuzzers: move several fuzzers

4 years agomeson: fix indentation
Yu Watanabe [Thu, 31 Dec 2020 21:46:05 +0000 (06:46 +0900)] 
meson: fix indentation

4 years agomeson: make the second and third elements of tests or fuzzers optional
Yu Watanabe [Thu, 31 Dec 2020 21:29:03 +0000 (06:29 +0900)] 
meson: make the second and third elements of tests or fuzzers optional

Then, we can shorten many test definitions.

4 years agotest: move test-umount.c to src/shutdown
Yu Watanabe [Thu, 31 Dec 2020 20:39:55 +0000 (05:39 +0900)] 
test: move test-umount.c to src/shutdown

Then, we can drop src/shutdown from include directories later.

4 years agocore: move several source files to src/shared
Yu Watanabe [Thu, 31 Dec 2020 20:38:06 +0000 (05:38 +0900)] 
core: move several source files to src/shared

As, the files are used by many executables, fstab-generator, remount-fs,
machine-id-setup, and etc.
With this change, the total size of the relevant executables and
libshared slightly decreases.

Before:
```
$ ll systemd-fstab-generator systemd-remount-fs systemd-machine-id-setup systemd-shutdown systemd-nspawn systemd src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 watanabe watanabe 7577800 Jan  5 13:35 src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 watanabe watanabe 4608360 Jan  5 13:35 systemd
-rwxrwxr-x 1 watanabe watanabe  117240 Jan  5 13:35 systemd-fstab-generator
-rwxrwxr-x 1 watanabe watanabe   61576 Jan  5 13:35 systemd-machine-id-setup
-rwxrwxr-x 1 watanabe watanabe  853080 Jan  5 13:35 systemd-nspawn
-rwxrwxr-x 1 watanabe watanabe   70600 Jan  5 13:35 systemd-remount-fs
-rwxrwxr-x 1 watanabe watanabe  172624 Jan  5 13:35 systemd-shutdown
```
Total: 13461280

After:
```
$ ll systemd-fstab-generator systemd-remount-fs systemd-machine-id-setup systemd-shutdown systemd-nspawn systemd src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 watanabe watanabe 7658336 Jan  5 13:32 src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 watanabe watanabe 4523560 Jan  5 13:32 systemd
-rwxrwxr-x 1 watanabe watanabe   78288 Jan  5 13:32 systemd-fstab-generator
-rwxrwxr-x 1 watanabe watanabe   30984 Jan  5 13:32 systemd-machine-id-setup
-rwxrwxr-x 1 watanabe watanabe  840384 Jan  5 13:32 systemd-nspawn
-rwxrwxr-x 1 watanabe watanabe   39104 Jan  5 13:32 systemd-remount-fs
-rwxrwxr-x 1 watanabe watanabe  117160 Jan  5 13:32 systemd-shutdown
```
Total: 13287816

4 years agotest: rewrite test-sd-device-thread.c to depend only on libsystemd
Yu Watanabe [Thu, 31 Dec 2020 20:22:23 +0000 (05:22 +0900)] 
test: rewrite test-sd-device-thread.c to depend only on libsystemd

Similarly, this makes test-udev-device-thread.c depend only on libudev.

4 years agotest: move tests for libudev into src/libudev
Yu Watanabe [Thu, 31 Dec 2020 20:17:49 +0000 (05:17 +0900)] 
test: move tests for libudev into src/libudev