Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:16:40 +0000 (12:16 +0100)]
generate-dns_type-gperf: modernize python syntax
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:03:57 +0000 (12:03 +0100)]
generate-sys-test: modernize Python and C code
Meson itself requires Python 3.6, which has f-strings. So I think it's fine to
use them here too. I wanted to use walrus for 'if m:= re.search(...)', but that'd
require 3.8.
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 10:49:11 +0000 (11:49 +0100)]
Drop obsolete vimrc file
We have another .vimrc in the root of the repo that has a superset of the
content of this file.
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:23:02 +0000 (09:23 +0100)]
meson: rename target to update-hwdb-autosuspend
The script is renamed to match.
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:
$ ninja -C build -t targets | grep update
systemd-update-po: phony
update-syscall-tables: phony
update-syscall-header: phony
update-hwdb: phony
update-hwdb-autosuspend: phony
update-dbus-docs: CUSTOM_COMMAND
update-man-rules: CUSTOM_COMMAND
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:17:26 +0000 (09:17 +0100)]
meson: rename target to update-hwdb
The goal is to have all "update-*" targets named uniformly so that
tab-completion works. The script is renamed to match.
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:10:25 +0000 (09:10 +0100)]
meson: rename target to update-man-rules
Same justification as for update-dbus-docs.
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 07:46:42 +0000 (08:46 +0100)]
meson: rename target to update-dbus-docs
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.
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 07:23:38 +0000 (08:23 +0100)]
Merge pull request #18340 from ddstreet/integration-tests-no-build
allow test/run-integration-tests.sh to work without a local build
Susant Sahani [Wed, 27 Jan 2021 07:19:39 +0000 (08:19 +0100)]
treewide: tighten variable scope in loops (#18372)
Also use _cleanup_free_ in one more place.
Yu Watanabe [Wed, 27 Jan 2021 01:47:36 +0000 (10:47 +0900)]
Merge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp
test-network: add tests for IPv6ProxyNDPAddress=
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
Dan Streetman [Wed, 18 Nov 2020 12:30:11 +0000 (07:30 -0500)]
test/run-integration-tests.sh: adjust arg processing
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:55:47 +0000 (15:55 -0500)]
test: allow run-integration-tests.sh to run without build
Dan Streetman [Tue, 17 Nov 2020 22:20:22 +0000 (17:20 -0500)]
test/test-functions: allow installing systemd files from local system
Add NO_BUILD var to allow testing with no local build, by installing
local systemd files into the image.
This only works for debian-like distros currently, that use the
tools 'apt' and 'dpkg' for package management.
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.
Dan Streetman [Tue, 26 Jan 2021 21:46:10 +0000 (16:46 -0500)]
test/test-functions: add variables for several dir locations
Dan Streetman [Tue, 17 Nov 2020 21:02:14 +0000 (16:02 -0500)]
test/test-functions: move var assignment
This makes no code change, only moves a small block of vars higher in the
file. This makes the next commit a bit easier to read.
Dan Streetman [Tue, 17 Nov 2020 21:10:29 +0000 (16:10 -0500)]
test: remove unused 'basedir' var from integration test makefiles
Luca Boccassi [Tue, 26 Jan 2021 20:23:52 +0000 (20:23 +0000)]
Merge pull request #18384 from poettering/mangle-os-fix
import: two fixes to OS mangling logic
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.
Fixes #17360.
Lennart Poettering [Tue, 26 Jan 2021 16:39:54 +0000 (17:39 +0100)]
Merge pull request #18377 from yuwata/sd-device-cleanups
sd-device: several tiny cleanups
Lennart Poettering [Tue, 26 Jan 2021 16:38:19 +0000 (17:38 +0100)]
Merge pull request #18382 from yuwata/fix-downgrade-to-bool
sd-device,sd-netlink: trivial cleanups
Lennart Poettering [Tue, 26 Jan 2021 14:06:28 +0000 (15:06 +0100)]
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.
Lennart Poettering [Tue, 26 Jan 2021 14:05:25 +0000 (15:05 +0100)]
import-common: fix log message string
The trees do look like directory trees, obviously. But they don't like
OS trees.
Yu Watanabe [Tue, 26 Jan 2021 16:20:50 +0000 (01:20 +0900)]
network: drop unnecessary condition in error path
See neigh_add() in kernel. It does not return EEXIST.
Yu Watanabe [Tue, 26 Jan 2021 16:19:24 +0000 (01:19 +0900)]
network: drop wrong flag for neighbor entry
NLM_F_REQUEST is a nlmsg flag, not a neighbor flag.
Yu Watanabe [Tue, 26 Jan 2021 12:36:25 +0000 (21:36 +0900)]
test-network: add tests for IPv6ProxyNDPAddress=
Yu Watanabe [Tue, 26 Jan 2021 14:57:33 +0000 (23:57 +0900)]
sd-device: do not use downgrade-to-bool feature
Yu Watanabe [Tue, 26 Jan 2021 14:55:37 +0000 (23:55 +0900)]
sd-netlink: fix indentation
Yu Watanabe [Tue, 26 Jan 2021 14:54:32 +0000 (23:54 +0900)]
sd-netlink: do not use downgrade-to-bool feature
Yu Watanabe [Tue, 26 Jan 2021 12:52:12 +0000 (21:52 +0900)]
docs/ENVIRONMENT: move entry for systemd-udevd
`$SYSTEMD_REBOOT_TO_FIRMWARE_SETUP=` or friends are for logind.
Yu Watanabe [Tue, 26 Jan 2021 11:35:53 +0000 (20:35 +0900)]
sd-device: use size_t for index in the loop
Yu Watanabe [Tue, 26 Jan 2021 11:26:33 +0000 (20:26 +0900)]
sd-device: use string_hash_ops_free_free
Yu Watanabe [Tue, 26 Jan 2021 11:07:38 +0000 (20:07 +0900)]
sd-device: add a short comment why we simply return negative errno here on failure
Yu Watanabe [Tue, 26 Jan 2021 10:56:13 +0000 (19:56 +0900)]
sd-device: rename variables and use TAKE_PTR()
Yu Watanabe [Tue, 26 Jan 2021 10:52:56 +0000 (19:52 +0900)]
sd-device: use string_hash_ops_free_free
Franck Bui [Mon, 25 Jan 2021 15:32:44 +0000 (16:32 +0100)]
sysusers: flush nscd's caches whenever /etc/{passwd,group} are modified
Frantisek Sumsal [Mon, 25 Jan 2021 20:50:09 +0000 (21:50 +0100)]
Merge pull request #18374 from mrc0mmand/assorted-ci-tweaks
Assorted CI tweaks
Frantisek Sumsal [Mon, 25 Jan 2021 15:01:56 +0000 (16:01 +0100)]
ci: use the recommended meson syntax
See: docs/HACKING.md
Frantisek Sumsal [Mon, 25 Jan 2021 14:49:27 +0000 (15:49 +0100)]
ci: drop an unnecessary sudo
Frantisek Sumsal [Mon, 25 Jan 2021 14:45:36 +0000 (15:45 +0100)]
ci: make the script names a bit more consistent
Yu Watanabe [Mon, 25 Jan 2021 14:40:14 +0000 (23:40 +0900)]
Merge pull request #18371 from yuwata/use-ansi-normal
tree-wide: use ansi_normal() instead of ANSI_NORMAL
Yu Watanabe [Mon, 25 Jan 2021 14:39:29 +0000 (23:39 +0900)]
Merge pull request #18281 from yuwata/log-drop-log-realm
log: drop LogRealm
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jan 2021 13:05:56 +0000 (14:05 +0100)]
Merge pull request #18365 from DaanDeMeyer/update-man-rules-mkosi
Fix update-man-rules usage with mkosi
Yu Watanabe [Sun, 17 Jan 2021 21:38:13 +0000 (06:38 +0900)]
cgtop: use ansi_normal() or friends instead of ANSI_NORMAL
Yu Watanabe [Sun, 17 Jan 2021 21:37:18 +0000 (06:37 +0900)]
logs-show: simplify code
Yu Watanabe [Sun, 17 Jan 2021 21:36:42 +0000 (06:36 +0900)]
terminal-util: use ansi_normal() or friends instead of ANSI_NORMAL
Yu Watanabe [Sun, 17 Jan 2021 21:36:02 +0000 (06:36 +0900)]
log: use ansi_normal() instead of ANSI_NORMAL
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jan 2021 07:50:27 +0000 (08:50 +0100)]
libsystemd: fix typo in symbol versioning
Yu Watanabe [Sun, 17 Jan 2021 04:59:33 +0000 (13:59 +0900)]
log: drop unused LogRealm
Already no binary is built with LOG_REALM= argument.
Hence, we can safely drop LogRealm now.
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.
Yu Watanabe [Sun, 17 Jan 2021 04:02:54 +0000 (13:02 +0900)]
selinux-util: do not use log_internal_realm() without setting log realm
Yu Watanabe [Sun, 17 Jan 2021 03:57:07 +0000 (12:57 +0900)]
log: drop unused log_full_errno_realm() macro
Zbigniew Jędrzejewski-Szmek [Mon, 25 Jan 2021 08:25:56 +0000 (09:25 +0100)]
Merge pull request #18363 from bluca/test_image_reuse
tests: build the image once and then copy/extend 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().
Stefan Agner [Mon, 28 Dec 2020 20:46:40 +0000 (21:46 +0100)]
Avoid error when bind mount source already exists
Zbigniew Jędrzejewski-Szmek [Sun, 24 Jan 2021 19:12:28 +0000 (20:12 +0100)]
Merge pull request #18361 from anitazha/oomdconfigtime
oom: some improvements and fixes
John Slade [Sun, 24 Jan 2021 14:04:03 +0000 (14:04 +0000)]
hwdb.d/60-keyboard.hwdb: Fixes for Samsung 900X laptops
It is only the Samsung 900X3A which has the alternative function keys.
The 900X3B, 900X4B have the standard Series 9 layout - as defined above.
Note: the 900X4A is not a valid laptop model.
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.
Luca Boccassi [Tue, 5 Jan 2021 14:05:15 +0000 (14:05 +0000)]
test: note where the bionic-* CI tool/integration lives
Luca Boccassi [Sun, 24 Jan 2021 11:35:59 +0000 (11:35 +0000)]
Merge pull request #18358 from jwrdegoede/hwdb-2-accel-quirks
Hwdb 2 accel quirks
Daan De Meyer [Sat, 23 Jan 2021 12:16:18 +0000 (12:16 +0000)]
docs: Update HACKING.md with the mkosi boot/qemu commands + options
Let's use the mkosi commands in HACKING.md and recommend some options
that speed up mkosi builds. Also includes some other small improvements.
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:34:23 +0000 (01:34 -0800)]
oom: update extended test to remove swap gating
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.
Anita Zhang [Sun, 24 Jan 2021 06:10:42 +0000 (22:10 -0800)]
oom: make swap a soft requirement
Anita Zhang [Sun, 24 Jan 2021 08:16:19 +0000 (00:16 -0800)]
oom: make memory pressure duration configurable through oomd.conf
Hans de Goede [Sat, 23 Jan 2021 21:36:58 +0000 (22:36 +0100)]
hwdb: Add accel orientation quirk for the Jumper Ezpad 7 tablet
Add a quirk to fix the accelerometer orientation on
the Jumper Ezpad 7 tablet.
Hans de Goede [Wed, 23 Dec 2020 20:45:18 +0000 (21:45 +0100)]
hwdb: Add accel orientation quirk for the Estar Beauty HD tablet
Add a quirk to fix the accelerometer orientation on the Estar Beauty HD
(marked as model-number MID 7316R on the back) tablet.
Luca Boccassi [Sat, 23 Jan 2021 00:21:48 +0000 (00:21 +0000)]
Merge pull request #18349 from poettering/import-fixlets2
minor importd fixlets
Lennart Poettering [Fri, 22 Jan 2021 19:29:58 +0000 (20:29 +0100)]
repart: improve help text
Finding "partitions" in a "directory" is a bit weird. Let's find
"partition definitions" there, after all the option is called
--definitions=
Lennart Poettering [Fri, 22 Jan 2021 19:39:29 +0000 (20:39 +0100)]
import: downgrade error messages we ignore to LOG_WARNING
Lennart Poettering [Fri, 22 Jan 2021 17:49:44 +0000 (18:49 +0100)]
import: set up btrfs qgroups on correct hierarchy
Also, simplify import_assign_pool_quota_and_warn(), don't do the same
thing twice. Let's just allow the caller call this twice.
Lennart Poettering [Fri, 22 Jan 2021 16:35:47 +0000 (17:35 +0100)]
import: drop redundant {}, as per coding style
Lennart Poettering [Fri, 22 Jan 2021 16:10:50 +0000 (17:10 +0100)]
import: introduce ImportFlags flags field
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.
No change in behaviour.
This is inspired by
133b34f69a72dc90d4e336837d699245390c9f50 which does
the same for PullTar/PullRaw.
Lennart Poettering [Fri, 22 Jan 2021 15:47:22 +0000 (16:47 +0100)]
import: don't apply empty_or_dash_to_null() to stuff we know is NULL anyway
Jiehong [Wed, 20 Jan 2021 14:52:35 +0000 (15:52 +0100)]
feature: display status with a different shape depending on the status (#17728)
Luca Boccassi [Fri, 22 Jan 2021 17:49:11 +0000 (17:49 +0000)]
Merge pull request #18302 from bluca/mount_image_runtime
systemctl/core: add DBUS method to mount images without service restart
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.
Fixes: #18207
Yu Watanabe [Fri, 22 Jan 2021 01:13:01 +0000 (10:13 +0900)]
hostname: accept an empty hostname to unset transient hostname
Follow-up for
60e4fb4240b24bdd2d4299d8d844f48093df8807.
Before
60e4fb4240b24bdd2d4299d8d844f48093df8807,
`hostnamectl --transient set-hostname ""` unsets the transient hostname.
But after the commit, it is refused. This fixes the issue.
Yu Watanabe [Fri, 22 Jan 2021 03:11:29 +0000 (12:11 +0900)]
Merge pull request #16228 from ddstreet/administrative_state
Add ActivationPolicy= [Link] parameter
Luca Boccassi [Thu, 21 Jan 2021 22:41:18 +0000 (22:41 +0000)]
Merge pull request #18338 from poettering/print-table-with-bells-and-whistles
json/table printing unification work
Lennart Poettering [Thu, 21 Jan 2021 14:06:13 +0000 (15:06 +0100)]
portabled: add BindPaths=/run back into "trusted" policy
This partly reverts
fe239c7d7d6227209234100f4e0a36dd952a5587, where I
accidentally dropped only line for /run that was unlike the others.
Oops.
@bluca, thanks for noticing:
https://github.com/systemd/systemd/pull/18329#pullrequestreview-
573343549
Evgeny Vereshchagin [Thu, 21 Jan 2021 19:02:22 +0000 (19:02 +0000)]
ci: point the Fossies badge to main
Another follow-up to https://github.com/systemd/systemd/issues/16834
Luca Boccassi [Thu, 21 Jan 2021 18:37:40 +0000 (18:37 +0000)]
systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the
systemctl bind command.
Luca Boccassi [Thu, 21 Jan 2021 18:36:33 +0000 (18:36 +0000)]
pid1: add DBUS method to mount image inside a running service namespace
Follow the same pattern as the BindMount method.
Luca Boccassi [Thu, 21 Jan 2021 18:35:31 +0000 (18:35 +0000)]
mount-util: add helper to mount image inside live namespace
Luca Boccassi [Thu, 21 Jan 2021 18:32:44 +0000 (18:32 +0000)]
dissect: split verity_dissect_and_mount helper out for reuse
Luca Boccassi [Thu, 21 Jan 2021 18:31:45 +0000 (18:31 +0000)]
core: split read_mount_options helper out for reuse
Frantisek Sumsal [Thu, 21 Jan 2021 17:51:15 +0000 (18:51 +0100)]
ci: change the Semaphore CI badge branch to 'main'
Follow-up to #16834
Lennart Poettering [Thu, 21 Jan 2021 17:21:41 +0000 (18:21 +0100)]
man: share a common explanation for --json=
Lennart Poettering [Thu, 21 Jan 2021 16:59:01 +0000 (17:59 +0100)]
busctl: show --help in pager
We do this for other larger --help texts, do so here too.
Lennart Poettering [Thu, 21 Jan 2021 17:12:23 +0000 (18:12 +0100)]
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.
Lennart Poettering [Thu, 21 Jan 2021 16:57:13 +0000 (17:57 +0100)]
sysext: port to table_print_with_pager()
This adds --no-legend as side-effect.
Lennart Poettering [Thu, 21 Jan 2021 16:40:02 +0000 (17:40 +0100)]
repart: port to table_print_with_pager()
This adds support for showing a pager, turning of the legend, like in
the other tools.
Lennart Poettering [Thu, 21 Jan 2021 16:39:01 +0000 (17:39 +0100)]
busctl/homectl: port the obvious cases to table_print_with_pager()
Lennart Poettering [Thu, 21 Jan 2021 16:36:53 +0000 (17:36 +0100)]
format-table: add new helper table_print_with_pager()
This adds a new function table_print_with_pager() which is a wrapper
around table_print_json()/table_print() but spawns a pager first, if
that's enabled, and optionally turns off the header line of the table.
This addresses the fact that many of our tools actually keep doing very
this very similar stuff, over and over again. Let's unify this in one
place.