Now all targets are named uniformly in a tab-completion-friendly fashion, with
the exception of systemd-update-po which is generated by the i18n module
automatically:
Very old versions of meson did not include the subdirectory name in the
target name, so we started adding various "top-level" custom targets in
subdirectories. This was nice because the main meson.build file wasn't
as cluttered. But then meson started including the subdir name in the
target name. So let's move the definition to the root so we can have all
targets named uniformly.
Dan Streetman [Wed, 18 Nov 2020 14:39:50 +0000 (09:39 -0500)]
test/TEST-01-BASIC: also install testsuite.target
This test doesn't require the tests to be installed, so it must manually
install required test services and targets itself, including the default
target of testsuite.target
Also use $TEST_UNITS_DIR which is set by test-functions instead of
calculating the path
The script currently parses either 'clean' or 'clean-again' as wanting
to clean both before and after running tests. This fixes that to split
the action up; clean runs before tests, clean-again after; and also
verifies the parameter(s) before passing them to make.
Dan Streetman [Tue, 17 Nov 2020 20:39:37 +0000 (15:39 -0500)]
test: find $BUILD_DIR in test-functions, remove from other scripts
The $BUILD_DIR is only used in test-functions, and doesn't need to
be specified in any other scripts. Additionally, to be able to allow
the integration test suite to be run against locally installed binaries,
instead of built binaries, moving BUILD_DIR logic completely into
test-functions allows later patches to be simpler.
Yu Watanabe [Tue, 26 Jan 2021 12:06:36 +0000 (21:06 +0900)]
test-network: retry several times if expected LLDP info is not obtained
As LLDP thing does not get involved in the link status, `networkctl lldp`
may not provide an expected information even if the link is in
'configured' state.
import-common: when mangling OS trees, propagate ownership/mode from subdir to parent
After all we want to remove the top-level dir, and make it look like the
only subdir, hence propagate the attributes from the subdir to the
top-level dir.
Yu Watanabe [Sun, 17 Jan 2021 04:32:29 +0000 (13:32 +0900)]
udev: stop to use LOG_REALM_UDEV
Before this commit, udevd is built with LOG_REALM=LOG_REALM_UDEV.
However, log level specified by e.g. environment variable or kernel
command line option are also passed to LOG_REALM_SYSTEMD. So, the
maximum log level for the two realms are always equivalent, and it is
not necessary to specify the build option. Hence drop it.
A S Alam [Sun, 24 Jan 2021 16:38:24 +0000 (17:38 +0100)]
Translated using Weblate (Punjabi)
Currently translated at 3.7% (7 of 189 strings)
Co-authored-by: A S Alam <amanpreet.alam@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pa/
Translation: systemd/main
Daan De Meyer [Sat, 23 Jan 2021 15:16:57 +0000 (15:16 +0000)]
sd-bus: Add sd_bus_reply()
While sd-bus already provides sd_bus_call() for calling a method
from a complete bus message object, We don't have an equivalent
function for replying from a method with a complete bus message
object.
Currently, we use sd_bus_send(call->bus, m, NULL) instead. Let's
add a shorthand for this pattern and name it sd_bus_reply().
Daan De Meyer [Sun, 24 Jan 2021 14:13:58 +0000 (14:13 +0000)]
meson: Fix update-man-rules when the build dir is not a subdir of the project dir
Until now, update-man-rules assumed that the build directory was
a subdirectory of the project directory. When using mkosi, this is
not the case. We use find instead of git ls-files because git ls-files
does not seem to support outputting absolute paths.
Also, this makes update-man-rules a bit more user-friendly as new manpages
don't have to be added to the git staging area before they are processed by
update-man-rules.py.
Daan De Meyer [Sun, 24 Jan 2021 14:13:02 +0000 (14:13 +0000)]
mkosi: Pass build script arguments to ninja
mkosi recently gained support to pass arguments to the build script.
Let's take advantage of this in systemd's build script to allow
passing which target to build to ninja in the build script.
Luca Boccassi [Wed, 6 Jan 2021 21:42:28 +0000 (21:42 +0000)]
tests: build the image once and then copy/extend it
Building custom images for each test takes a lot of time.
Build the default one, and if the test needs incompatible changes
just copy it and extend it instead.
Daan De Meyer [Sat, 23 Jan 2021 12:17:36 +0000 (12:17 +0000)]
docs: Add a section to HACKING.md on using mkosi and clangd together
While it's perfectly possible today to completely rely on mkosi for
building and testing systemd, to get code completion and other IDE
niceties to work properly, it's still necessary to build systemd
locally.
Recently, mkosi gained the ability to allow external programs to
communicate with the build script. We can use this feature to run
the clangd language server in the mkosi build image via a custom
build script to provide IDE features in editors without requiring
developers to build systemd on the host or install any of systemd's
build dependencies locally.
This commit adds the necessary information on how to set this up
to HACKING.md.
Anita Zhang [Sun, 24 Jan 2021 09:22:51 +0000 (01:22 -0800)]
oom: fix reclaim activity detection
This should have been checking for any reclaim activity within a larger interval
of time rather than within the past second. On systems with swap this
doesn't seem to have mattered too much as reclaim would always increase when
memory pressure was elevated. But testing in the no swap case having
this larger interval made a difference between oomd killing or not.
This merges the two flags that are passed to the ImportTar/ImportRaw
objects into a single flags parameter, which we then can extend more
easily later on.
Anita Zhang [Tue, 12 Jan 2021 04:04:20 +0000 (20:04 -0800)]
core: update setings on the unit and job as the result of ExecCondition=
Update ExecCondition= to set Unit->condition_result and return JOB_DONE
in the Job results if the check fails so as to match the current behavior
of ConditionXYZ= w.r.t units/jobs dependency checks.
Before 60e4fb4240b24bdd2d4299d8d844f48093df8807,
`hostnamectl --transient set-hostname ""` unsets the transient hostname.
But after the commit, it is refused. This fixes the issue.
Yu Watanabe [Wed, 20 Jan 2021 07:56:21 +0000 (16:56 +0900)]
network: drop many unnecessary link_dirty() calls
Now link state saves mostly link state, DNS and NTP settings, .network
file name. So, it is not necessary to call link_dirty() e.g. when an
address is updated. This drops such unnecessary link_dirty() calls.
dissect: almost port systemd-dissect to table_print_with_pager()
This doesn't actually port systemd-dissect to table_print_with_pager()
but at least rearranges things so that similar behaviour is exposed. The
reason it's not ported over 1:1 is that systemd-dissect actually adjusts
the JSON output of the table with additional info, and doesn't print the
table 1:1 as JSON.