Lennart Poettering [Wed, 21 Oct 2020 16:07:38 +0000 (18:07 +0200)]
Merge pull request #17356 from yuwata/sd-xxx-stop
network: about sd_xxx_stop()
Lennart Poettering [Wed, 21 Oct 2020 16:07:12 +0000 (18:07 +0200)]
Merge pull request #17400 from yuwata/network-route-counter-17396
network: about route message counter
Chandradeep Dey [Sun, 18 Oct 2020 09:59:40 +0000 (15:29 +0530)]
homed: remove PAM_USER_UNKNOWN test in pam_sm_acct_mgmt
Why this change
---------------
Assumption - PAM's auth stack is properly configured.
Currently account pam_systemd_home.so returns PAM_SUCCESS for non
systemd-homed users, and a variety of return values (including
PAM_SUCCESS) for homed users.
account pam_unix returns PAM_AUTHINFO_UNAVAIL for systemd-homed
users, and a variety of return values (including PAM_AUTHINFO_UNAVAIL)
for normal users.
No possible combination in the pam stack can let us preserve the
various return values of the modules. For example, the configuration
mentioned in the manpage causes account pam_unix to never be reached
since pam_systemd_home just returns a success for ordinary users. Users
with expired passwords are allowed to log in because a check cannot be
made.
More configuration examples and why they don't work are mentioned
in #16906 and the downstream discussion linked there.
After this change
-----------------
account pam_unix will continue to return wrong value for homed users.
But we can skip the module conditionally using the return value from
account pam_systemd_home. We can already do this with the auth and
password modules.
Arian van Putten [Wed, 14 Oct 2020 11:47:17 +0000 (13:47 +0200)]
cgtop: Display cpu time in microseonds with --raw
this makes the CPU time easily parseable; which was the goal
of --raw in the first place.
This only triggers if --raw is combined with --cpu=time
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 09:34:39 +0000 (11:34 +0200)]
Merge pull request #17395 from keszybz/hwdb-drop-quotes
hwdb: drop quotes from XKB_FIXED_*= properties
Lennart Poettering [Wed, 21 Oct 2020 08:41:11 +0000 (10:41 +0200)]
Merge pull request #16444 from oniko/luks-detached-header
Add support for detached LUKS header on kernel cmd line
Lennart Poettering [Tue, 20 Oct 2020 12:51:01 +0000 (14:51 +0200)]
test-mountpoint-util: run test in private mount namespace
This creates a private mount namespace for test-mountpint-util, with all
propagation from the host turned off. This gives us the guarantee that
/proc/self/mountinfo remains fixed and constant while we operate,
removing potential races against other unrelated stuff running on the
system that changes the mount table.
Prompted-by: #17050
(I doubt this actually fixes 17050, this is mostly to make sure that we
aren't possibly affected by such races in our test)
Lennart Poettering [Wed, 21 Oct 2020 07:04:12 +0000 (09:04 +0200)]
Merge pull request #17407 from keszybz/test-ipcrm
Make test-ipcrm not fail cryptically
Lennart Poettering [Tue, 20 Oct 2020 12:47:44 +0000 (14:47 +0200)]
dhcp-server: make parameter const
Michael Biebl [Tue, 20 Oct 2020 21:07:16 +0000 (23:07 +0200)]
Merge pull request #17297 from keszybz/tmpfiles-sysusers-disable-standalone-image
tmpfiles,sysusers: disable --image= support in standalone versions
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 16:02:54 +0000 (18:02 +0200)]
test-ipcrm: modernize, skip test on permission errors
I now get:
$ build/test-ipcrm
Failed to enter shared memory directory /dev/shm/multipath: Permission denied
test-ipcrm: No privileges, skipping tests.
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:57:03 +0000 (17:57 +0200)]
shared/clean-ipc: improve error message a bit
Failed to enter shared memory directory multipath: Permission denied
→
Failed to enter shared memory directory /dev/shm/multipath: Permission denied
When looking at nested directories, we will print only the final two elements
of the path. That is still more useful than just the last component of the
path. To print the full path, we'd have to allocate the string, and since the
error occurs so very rarely, I think the current best-effort approach is
enough.
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:23:40 +0000 (17:23 +0200)]
sd-hwdb: reduce variable scope, use periods
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:12:42 +0000 (17:12 +0200)]
sd-hwdb: allow empty properties
So far we didn't allow empty properties, but it makes sense to do so, for
example to distinguish empty data from lack of data. It also makes it easy to
override properties (back to the empty) value for specific cases.
Дамјан Георгиевски [Tue, 13 Oct 2020 10:25:59 +0000 (12:25 +0200)]
bootctl: add @current/@oneshot/@default targets to set-default/set-oneshot
Using `bootctl set-default @current` will set the default loader entry
to the currently booted entry as read from the `LoaderEntrySelected` EFI
variable.
Also `bootctl set-oneshot @current` will set the oneshot loader entry to
the current booted entry.
Correspondingly `@default` and `@oneshot` can be used to read from the
LoaderEntryDefault and LoaderEntryOneshot EFI variables.
Lennart Poettering [Tue, 20 Oct 2020 13:01:11 +0000 (15:01 +0200)]
Merge pull request #17401 from mrc0mmand/sempahore-fixups
semaphore: try to use different keyservers
Lennart Poettering [Tue, 20 Oct 2020 12:46:55 +0000 (14:46 +0200)]
update TODO
Frantisek Sumsal [Tue, 20 Oct 2020 10:39:25 +0000 (12:39 +0200)]
semaphore: temporarily explicitly use the US image mirror
The UK one contains an incorrectly signed index file, causing the CI to
fail.
Frantisek Sumsal [Tue, 20 Oct 2020 09:22:50 +0000 (11:22 +0200)]
semaphore: try to use different keyservers
Recently the Semaphore CI started to fail pretty much constantly due to
GPG key verification fails. After a quick search this is a pretty common
issue with the Ubuntu keyserver in the last month. To make this,
hopefully, a bit more stable, let's use a few different keyservers in
case some of them fail.
Yu Watanabe [Tue, 15 Sep 2020 11:27:13 +0000 (20:27 +0900)]
udevadm: also support alias .device units to specify devices
Previously, .device units generated by SYSTEMD_ALIAS= udev properties
are not supported to specify devices for e.g. 'udevadm info'.
Before:
```
$ udevadm info sys-subsystem-net-devices-enp0s31f6.device
Unknown device "sys-subsystem-net-devices-enp0s31f6.device": No such device
```
After:
```
$ ./udevadm info sys-subsystem-net-devices-enp0s31f6.device
P: /devices/pci0000:00/0000:00:1f.6/net/enp0s31f6
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1f.6/net/enp0s31f6
E: INTERFACE=enp0s31f6
E: IFINDEX=2
E: SUBSYSTEM=net
E: USEC_INITIALIZED=
25317523
E: ID_NET_NAMING_SCHEME=v245
(snip)
```
Kai-Chuan Hsieh [Thu, 8 Oct 2020 02:27:18 +0000 (10:27 +0800)]
Add ACCEL_LOCATION property for Dell clamshell models
Lennart Poettering [Thu, 15 Oct 2020 15:33:04 +0000 (17:33 +0200)]
util: make size macros unsigned
By making them unsigned comparing them with other sizes is less likely
to trigger compiler warnings regarding signed/unsigned comparisons.
After all sizes (i.e. size_t) are generally assumed to be unsigned, so
these should be too.
Prompted-by: https://github.com/systemd/systemd/pull/17345#issuecomment-709402332
Yu Watanabe [Tue, 20 Oct 2020 06:44:21 +0000 (15:44 +0900)]
network: call netlink in the last of route_configure()
Otherwise, assertion will be hit when route_add() fails.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 16:01:20 +0000 (18:01 +0200)]
hwdb: drop quotes from XKB_FIXED_*= properties
The properties are not unquoted by udev, so the quotes effectively became part
of the value.
Even though those properties were added quite a while ago
(
086c001e29a86287d7b639cb71d1fc6408920c53,
d7d31692bf7cde5dce7f4ed3cae429a5b302a9f0), they never started being used
(because of issues with having multiple layouts), see
https://gitlab.gnome.org/GNOME/mutter/-/issues/906,
https://bugzilla.gnome.org/show_bug.cgi?id=775681.
Let's remove the quotes while we still can.
From https://bugzilla.gnome.org/show_bug.cgi?id=775681#c7:
> Note to self: the values for XKB_FIXED_LAYOUT and XKB_FIXED_VARIANT are
> quoted, meaning that we need to remove the quotes before passing the values
> from udev_device_get_property_value() to xkb_keymap_new_from_names()
> otherwise the compilation of the keymap fails (please don't ask how I found
> out...)
Yu Watanabe [Tue, 20 Oct 2020 06:32:36 +0000 (15:32 +0900)]
network: also compare and hash weight of the gateway
Yu Watanabe [Tue, 20 Oct 2020 06:26:51 +0000 (15:26 +0900)]
network: copy multipath route element earlier
`route_get()` compares input with existing routes, however previously,
the input may did not have information about gateway. So, the
comparison result might be incorrect, and the foregoing set_put() might
return -EEXIST.
Yu Watanabe [Tue, 20 Oct 2020 05:20:19 +0000 (14:20 +0900)]
network: make route_configure() return 0 on success
Previously, route_configure() always returns 1 on success, and never
returns 0. It is not necessary to return positive value.
Yu Watanabe [Tue, 20 Oct 2020 05:01:41 +0000 (14:01 +0900)]
Merge pull request #16939 from Rahix/robust-first-boot-machine-id
Make ConditionFirstBoot safe against power failures
Yu Watanabe [Tue, 20 Oct 2020 04:49:29 +0000 (13:49 +0900)]
Merge pull request #17352 from msekletar/ens-names-fix
udev/net_id: don't generate slot based names if multiple devices might claim the same slot
Felix Riemann [Mon, 19 Oct 2020 16:54:53 +0000 (18:54 +0200)]
update-done: Do not fail with read-only /etc or /var
With the switch from log_debug() to log_debug_errno() in commit
c413bb28df
systemd-update-done would fail without any error message if /etc
or /var were read-only. This restores the previous behaviour to
silently ignore these directories again.
Yu Watanabe [Tue, 20 Oct 2020 04:44:52 +0000 (13:44 +0900)]
Merge pull request #17390 from keszybz/logind-notifications-and-links
Fix sd_notify() usage in various daemons and update some documentation links
Michal Sekletár [Mon, 19 Oct 2020 09:10:31 +0000 (11:10 +0200)]
udev/net_id: don't generate slot based names if multiple devices might claim the same slot
Lennart Poettering [Mon, 19 Oct 2020 15:39:37 +0000 (17:39 +0200)]
Merge pull request #17344 from keszybz/bus-connect-more-logs
Add some debug logs to help diagnose bus connections
Lennart Poettering [Mon, 19 Oct 2020 15:29:22 +0000 (17:29 +0200)]
Merge pull request #17387 from anitazha/systoomd_fixups
oomd fixups
Lennart Poettering [Mon, 19 Oct 2020 15:17:10 +0000 (17:17 +0200)]
Merge pull request #17389 from poettering/bootspec-clarifications
bootspec entry character set clarifications
Harald Seiler [Sun, 6 Sep 2020 20:57:59 +0000 (22:57 +0200)]
man: Document new machine-id and first boot behavior
Harald Seiler [Sun, 6 Sep 2020 19:43:57 +0000 (21:43 +0200)]
units: order systemd-random-seed.service before first-boot-complete.target
Ensure that systemd-random-seed.service has completed before marking
a first boot as completed to guarantee that a saved seed will only be
used after it has been initialized at least once.
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
units: order systemd-firstboot.service before first-boot-complete.target
Make sure systemd-firstboot completes before reaching first-boot-complete.target
and thus marking the first boot as completed. This way, it is
guaranteed that systemd-firstboot has a chance to complete provisioning
at least once, even in cases of the first boot getting aborted early.
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
units: add first-boot-complete.target for first boot ordering
Add a new target for synchronizing units that wish to run once during
the first boot of the system. The machine-id will be committed to disk
only after the target has been reached, thus ensuring that all units
ordered before it had a chance to complete.
Harald Seiler [Sun, 6 Sep 2020 19:35:33 +0000 (21:35 +0200)]
machine-id-setup: sync before committing machine-id
sync() before committing a transient machine-id to disk. This will
ensure that any filesystem changes made by first-boot units will have
been persisted before the first boot is marked as completed.
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
core: keep machine-id transient until first boot completes
Currently, a loss of power after the machine-id was written but before
all units with ConditionFirstBoot=yes ran would lead to the next boot
finding a valid machine-id, thus not being marked first boot and not
re-running these units.
To make the first boot mechanism more robust, instead of writing
/etc/machine-id very early, fill it with a marker value "uninitialized"
and overmount it with a transiently provisioned machine-id. Then, after
the first boots completes (when systemd-machine-id-commit.service runs),
write the real machine-id to disk.
This mechanism is of course only invoked on first boot. If a first boot
is not detected, the machine-id is handled as previously.
Fixes: #4511
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
dissect-image: support "uninitialized" machine-id
If the first boot was aborted, /etc/machine-id might read as
"uninitialized" in some cases. Add a separate case for this
instead of printing a confusing error message.
Harald Seiler [Thu, 15 Oct 2020 19:25:06 +0000 (21:25 +0200)]
repart: correctly handle "uninitialized" machine-id
When systemd-repart runs from initramfs, it reads out /etc/machine-id
from the rootfs as a seed for partition UUIDs. However, the machine-id
could be in an "uninitialized" state from a previous failed first boot.
In this situation the -ENOMEDIUM code-path (no machine-id set) should be
taken.
Harald Seiler [Thu, 15 Oct 2020 19:22:15 +0000 (21:22 +0200)]
nspawn: robustly deal with "uninitialized" machine-id
When nspawn starts an image, this image could be in any state, including
an aborted first boot. For this case, it needs to correctly handle the
situation like there was no machine-id at all.
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
id128: add format which treats "uninitialized" like an empty id
Add a new ID128_PLAIN_OR_UNINIT format which treats the string
"uninitialized" like the file was empty and return -ENOMEDIUM. This
format should be used when reading an /etc/machine-id file from an image
that is not currently running.
Lennart Poettering [Mon, 19 Oct 2020 09:39:20 +0000 (11:39 +0200)]
docs: some coding style updates
Primarily:
1. Mention that we prefer if return parameters carry "ret_" as prefix in
their name
2. Clarify that debug-level logging is always OK, and irrelevant to when
deciding whether a function is logging or non-logging.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 18:49:18 +0000 (20:49 +0200)]
tree-wide: update web link to logind description
https://www.freedesktop.org/wiki/Software/systemd/multiseat/ says that it
is obsoleted by sd-login(3), so it doesn't make much sense to link to the former.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 17:26:58 +0000 (19:26 +0200)]
logind: minor indentation adjustments
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 17:20:05 +0000 (19:20 +0200)]
logind: use notify_start/notify_on_cleanup
Logging about the pid is dropped, pid1 does that better.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 17:22:21 +0000 (19:22 +0200)]
shared/daemon-util: fix notify_on_cleanup()
p itself is never null. Because of this, we would always
call sd_notify() in cleanup, even though the intention was to only
call it if notify_start() was executed.
Lennart Poettering [Mon, 19 Oct 2020 12:20:26 +0000 (14:20 +0200)]
tmpfiles: no need to specify a synthetic error code if we don't propagate it
Lennart Poettering [Mon, 19 Oct 2020 12:20:03 +0000 (14:20 +0200)]
bootspec: tweak error message
Clarify that the name of the entry failed validation, not the entry
itself.
Lennart Poettering [Mon, 19 Oct 2020 12:19:52 +0000 (14:19 +0200)]
doc: document charset to use for bootspec entry names
Prompted-by: https://github.com/systemd/systemd/issues/12572#issuecomment-711074702
Harald Seiler [Sun, 6 Sep 2020 19:23:35 +0000 (21:23 +0200)]
core: treat "uninitialized" in /etc/machine-id as first boot as well
When /etc/machine-id contains the string "uninitialized" instead of
a valid machine-id, treat this like the file was missing and mark this
boot as the first (-> units with ConditionFirstBoot=yes will run).
Harald Seiler [Sun, 6 Sep 2020 19:23:36 +0000 (21:23 +0200)]
preset: don't enable proc-sys-fs-binfmt_misc.mount
The proc-sys-fs-binfmt_misc.mount unit should not be enabled by
preset-all because it should only be used as fallback in case
proc-sys-fs-binfmt_misc.automount cannot be used on a system. In these
cases it should be enabled manually by an administrator.
Michal Sekletár [Mon, 19 Oct 2020 08:56:11 +0000 (10:56 +0200)]
udev/net_id: parse _SUN ACPI index as a signed integer
Negative value means there is no match between a PCI device and any of
the slots. In the following commit we will extend this and value of 0
will indicate that there is a match between some slot and PCI device,
but that device is a PCI bridge.
Anita Zhang [Mon, 19 Oct 2020 09:18:00 +0000 (02:18 -0700)]
units: drop ConditionCapability from systemd-oomd.service
Another suggestion from #15206
Anita Zhang [Mon, 19 Oct 2020 09:17:07 +0000 (02:17 -0700)]
oomd: simplify if/else error check
Anita Zhang [Mon, 19 Oct 2020 08:44:17 +0000 (01:44 -0700)]
core: move where we send unit change updates to oomd
Post-merge suggestion from #15206
Anita Zhang [Mon, 19 Oct 2020 08:39:36 +0000 (01:39 -0700)]
NEWS: fix typo
Anita Zhang [Mon, 19 Oct 2020 08:30:07 +0000 (01:30 -0700)]
core: reindent and align table in load-fragment-gperf.gperf.m4
Anita Zhang [Mon, 19 Oct 2020 08:11:06 +0000 (01:11 -0700)]
core: varlink tweaks
Suggested post-merge in #15206
Zmicer Turok [Fri, 16 Oct 2020 06:30:21 +0000 (08:30 +0200)]
Translated using Weblate (Belarusian)
Currently translated at 100.0% (187 of 187 strings)
Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/be/
Translation: systemd/master
Zbigniew Jędrzejewski-Szmek [Mon, 19 Oct 2020 07:31:02 +0000 (09:31 +0200)]
Merge pull request #17369 from poettering/kill-log
log about processed killed due to "systemctl kill"
Lennart Poettering [Fri, 16 Oct 2020 16:04:59 +0000 (18:04 +0200)]
man: document that for Type=dbus services dropping bus name has consequences
Fixes: #17150
Lennart Poettering [Fri, 16 Oct 2020 16:22:37 +0000 (18:22 +0200)]
man: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers
Fixes: #16941
Zbigniew Jędrzejewski-Szmek [Mon, 19 Oct 2020 07:17:28 +0000 (09:17 +0200)]
Merge pull request #17367 from bluca/fix_test_50_ubuntu
test: fix TEST-50-DISSECT build on Ubuntu CI
Pedro Ruiz [Mon, 19 Oct 2020 00:00:27 +0000 (02:00 +0200)]
hwdb: Add accel orientation for AsusTek TP300LAB
Piotr Drąg [Sun, 18 Oct 2020 11:10:47 +0000 (13:10 +0200)]
po: update Polish translation
Luca Boccassi [Sun, 18 Oct 2020 14:41:34 +0000 (15:41 +0100)]
test: account for non-x86-64 archs in TEST-50-DISSECT
Luca Boccassi [Sat, 17 Oct 2020 21:10:42 +0000 (22:10 +0100)]
test: increase size of verity partition in TEST-50-DISSECT GPT image
On Ubuntu it seems there's some padding added
Ansgar Burchardt [Sat, 17 Oct 2020 12:02:06 +0000 (14:02 +0200)]
NEWS: fix typo: speicify → specify
Luca Boccassi [Fri, 16 Oct 2020 16:51:58 +0000 (17:51 +0100)]
test/README: notes about Ubuntu CI logs and dependencies
Add a note about where to find the full journal, and how to add
packages/dependencies for the Ubuntu CI.
Luca Boccassi [Fri, 16 Oct 2020 12:20:45 +0000 (13:20 +0100)]
test: fix TEST-50-DISSECT build on Ubuntu CI
Ubuntu CI's just got the dependencies require dto run this test added,
and it seems the build is different enough from other platforms
that it fails to create the required directories:
cp: cannot create regular file '/var/tmp/systemd-test.JJMOBY/minimal/usr/lib/os-release': No such file or directory
Luca Boccassi [Sat, 17 Oct 2020 16:58:32 +0000 (17:58 +0100)]
Revert "Block TEST-50-DISSECT on Ubuntu CI temporarily"
This reverts commit
329315b29f63adb05054c26f739f68780fadfa0a.
Luca Boccassi [Fri, 16 Oct 2020 16:58:52 +0000 (17:58 +0100)]
Block TEST-50-DISSECT on Ubuntu CI temporarily
It looks like we need to do some whack-a-mole before it will fully pass,
so disable for now. It was skipped until today anyway due to missing
dependencies.
Anita Zhang [Fri, 16 Oct 2020 23:19:15 +0000 (16:19 -0700)]
oomd: fix unit test when xattrs not supported
Lennart Poettering [Fri, 16 Oct 2020 15:20:20 +0000 (17:20 +0200)]
core: log about "systemctl kill" requests
let's add informational logging about each client requested signal
sending. While we are at, let's beef up error handling/log messages in
this case quite a bit: let's log errors both to syslog and report errors
back to client.
Fixes: #17254
Lennart Poettering [Fri, 16 Oct 2020 15:16:23 +0000 (17:16 +0200)]
core: correct handling of "systemctl kill --kill-who=main-fail"
--kill-who=main-fail never worked correctly, due to a copy and paste
mistake in
ac5e3a505e49c80b56c971a8fc13bacac961640d, where the same item
was listed twice. The mistake was
later noticed, but fixed incorrectly, in
201f0c916d8f65ad2595a651b1371fcd39a4cf55.
Let's list all *-fail types correctly, finally.
And while we are at it, add a nice comment and generate a prettier D-Bus
error about this.
Lennart Poettering [Fri, 16 Oct 2020 15:16:02 +0000 (17:16 +0200)]
core: add comment explaining unit_kill_context() vs. unit_kill_common() a bit
Lennart Poettering [Fri, 16 Oct 2020 13:35:31 +0000 (15:35 +0200)]
Merge pull request #17358 from keszybz/hwdb-add-stars
Add trailing star to all hwdb patterns
Michal Koutný [Thu, 15 Oct 2020 15:56:30 +0000 (17:56 +0200)]
meson: Fix missing libseccomp dependencies
The builds with HAVE_SECCOMP fail on missing include paths:
FAILED: src/basic/libbasic.a.p/parse-util.c.o
cc -Isrc/basic/libbasic.a.p -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -fPIC -pthread -fvisibility=default -MD -MQ src/basic/libbasic.a.p/parse-util.c.o -MF src/basic/libbasic.a.p/parse-util.c.o.d -o src/basic/libbasic.a.p/parse-util.c.o -c ../src/basic/parse-util.c
In file included from ../src/basic/parse-util.c:20:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
4 | #include <seccomp.h>
| ^~~~~~~~~~~
compilation terminated.
FAILED: test-parse-util.p/src_test_test-parse-util.c.o
cc -Itest-parse-util.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -MD -MQ test-parse-util.p/src_test_test-parse-util.c.o -MF test-parse-util.p/src_test_test-parse-util.c.o.d -o test-parse-util.p/src_test_test-parse-util.c.o -c ../src/test/test-parse-util.c
In file included from ../src/test/test-parse-util.c:14:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
4 | #include <seccomp.h>
| ^~~~~~~~~~~
compilation terminated.
Add the respective deps.
Fixes:
005bfaf118 ("exec: Add kill action to system call filters")
Yu Watanabe [Fri, 16 Oct 2020 03:26:28 +0000 (12:26 +0900)]
Merge pull request #17363 from keszybz/oomd-meson-and-news
oomd meson and NEWS adjustments
Yu Watanabe [Fri, 16 Oct 2020 03:24:37 +0000 (12:24 +0900)]
Merge pull request #17361 from keszybz/oomd-introspection-stub
Implement --version,--bus-introspect in oomd, add man page for the dbus api
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 15:58:43 +0000 (17:58 +0200)]
man: describe wildcards and range matches in hwdb syntax
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 11:54:31 +0000 (13:54 +0200)]
parse_hwdb: enforce the ":*" suffix
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 07:23:30 +0000 (09:23 +0200)]
hwdb: add trailing ":*" everywhere
No functional change is intended.
The general pattern of changes:
-usb:v04F3p2B7C*
+usb:v04F3p2B7C:*
This is mostly a clarification, to make the part that makes the usb vXXXXpYYYY
part visually separated. It would only make a difference if we added further
keys with a different number of digits, which is unlikely.
-usb:v0627p0001:*QEMU USB Keyboard*
-usb:v0627p0001:*QEMU USB Mouse*
-usb:v0627p0001:*QEMU USB Tablet*
+usb:v0627p0001:*QEMU USB Keyboard*:*
+usb:v0627p0001:*QEMU USB Mouse*:*
+usb:v0627p0001:*QEMU USB Tablet*:*
Again, only a clarification. We know that ":" will appear somewhere later in
the match key, so anything that matches "…Keyboard*" will also match "…Keyboard*:*".
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
This makes the match narrower. Previously we would match product "N53SV"
and "N53SV2", "N53SV3", and others. Here we are saying that the ':pn' part must
match exactly. Most of the changes in this patch match this pattern. I made a few
judgement calls and used "pn…*:*" when I wasn't sure if the full pn is included:
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*
-evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:
+evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:*
This more like the "QEMU" example above, since all dmi strings end in ":", so
anything which matches the old version will also match the new version.
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:*
I replaced trailing ":pvr*" by ":*". This makes no functional difference because
we expect "pvr" to always appear in the dmi string. This makes patterns shorter.
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*
OTOH, ":pn*" is kept. This is because almost patterns include ":pn*", and if we
skip it, we should make it clear that this is on purpose, that we really want to
match any product name.
The python script to generate autosuspend rules is updated to use ":*" too.
Inspired by https://github.com/systemd/systemd/pull/17281#discussion_r501489750.
Lennart Poettering [Thu, 15 Oct 2020 13:25:56 +0000 (15:25 +0200)]
pid1: ignore whole /run/host hierarchy
Let's mark the whole /run/host hierarchy as something to ignore by PID 1
for generation of .mount units, i.e. consider it as "extrinsic".
By unifying container mgr supplied resources in one dir it's also easy
to exclude the whole lot from PID1's management inside the container.
This is the right thing to do, since from the payload's PoV these mounts
are just API and not manipulatable as they are established, managed and
owned by the container manager, not the payload.
(While we are it, also add the boot ID mount to the existing list, as
nspawn and other container managers overmount that too, typically, and
it is thus owned by the container manager and not the payload
typically.)
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:56:05 +0000 (15:56 +0200)]
NEWS: add blurbs about -Dmode= and oomd/oomctl
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:53:57 +0000 (15:53 +0200)]
meson: enable oomd by default in developer mode
We want to compile the new code in CI without having to explicitly specify
-Doomd=true everywhere. Let's enable it by default, and rely on distros
setting -Dmode=release to not have it enabled by default.
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:08:31 +0000 (15:08 +0200)]
man: add org.freedesktop.oom1(5) stub
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:03:49 +0000 (15:03 +0200)]
oomd: add names to dbus parameters and implement --bus-introspection
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 13:03:07 +0000 (15:03 +0200)]
oomd: check number of arguments, add --version, fix indentation
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 12:16:52 +0000 (14:16 +0200)]
Merge pull request #15206 from anitazha/systoomd-v0
systemd-oomd
Lennart Poettering [Thu, 15 Oct 2020 11:55:57 +0000 (13:55 +0200)]
Merge pull request #17359 from poettering/lesssecuresecure
paranoia: getenv_bool_secure("SYSTEMD_PAGERSECURE")
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 11:35:36 +0000 (13:35 +0200)]
hwdb: add missinging ":*" suffix
I'm keeping this part separate because a function change is intended here.
Those patterns didn't match:
$ systemd-hwdb query 'evdev:atkbd:dmi:bvn_:bvr_:bd_:svnLENOVO:pn_:pvrThinkPadT430s'
KEYBOARD_LED_CAPSLOCK=0
$ systemd-hwdb query 'evdev:atkbd:dmi:bvn_:bvr_:bd_:svnLENOVO:pn_:pvrThinkPadT430s:'
(nil)
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 07:22:35 +0000 (09:22 +0200)]
hwdb: reindent commments and say that "*" should always be trailing
Zbigniew Jędrzejewski-Szmek [Thu, 15 Oct 2020 10:33:12 +0000 (12:33 +0200)]
hwdb: update chromiumos autosuspend rules
Lennart Poettering [Thu, 15 Oct 2020 08:56:01 +0000 (10:56 +0200)]
systemctl: fix tabs indentations
Lennart Poettering [Thu, 15 Oct 2020 08:54:48 +0000 (10:54 +0200)]
pager: lets check SYSTEMD_PAGERSECURE with secure_getenv()
I can't think of any real vulnerability about this, but it still feels
better to check a variable with "secure" in its name with
secure_getenv() rather than plain getenv().
Paranoia FTW!