Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:29:36 +0000 (18:29 +0200)]
hibernate-resume-generator: use DEFINE_MAIN_GENERATOR_FUNCTION()
DEFINE_MAIN_GENERATOR_FUNCTION() always sets dest*, so there should be no
change in behaviour.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 16:07:24 +0000 (18:07 +0200)]
environment-d-generator: use DEFINE_MAIN_FUNCTION()
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 13:02:39 +0000 (15:02 +0200)]
man: fix formatting of "BARRIER=1"
Whitespace inside of the <varname> field was propagated to the displayed form,
causing strange indentation.
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 12:49:42 +0000 (14:49 +0200)]
core: wrap long comments and capitalize sentences
Lennart Poettering [Wed, 13 Jul 2022 21:47:31 +0000 (23:47 +0200)]
base-filesystem: pick more conservative access mode for /root/
Let's not allow anyone to look into /root/ if we create it via the
base-filesystem logic. i.e. change 0755 → 0750 as default access mode
for /root/, in case we create it if it happens to be missing.
Lennart Poettering [Thu, 14 Jul 2022 16:16:07 +0000 (18:16 +0200)]
Merge pull request #24008 from poettering/tmpfiles-is-dir-fix
tmpfiles: fix wrong is_dir_fd() call
undef [Thu, 14 Jul 2022 09:03:28 +0000 (09:03 +0000)]
growfs: Expand FS even if underlying block expansion fails
This allows growfs to expand the filesystem even when the underlying
block device cannot be expanded. This has been useful for example on
LUKS devices that have already been expanded using systemd-repart.
This works around the following error:
```
root@mobian:/home/mobian# /usr/lib/systemd/systemd-growfs /
crypt_resize() of /dev/block/179:2 failed: Operation not permitted
```
Lennart Poettering [Thu, 14 Jul 2022 16:09:18 +0000 (18:09 +0200)]
Merge pull request #24015 from poettering/growfs-fd-tweaks
growfs fd handling tweaks
Lennart Poettering [Thu, 14 Jul 2022 14:14:11 +0000 (16:14 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Wed, 6 Jul 2022 14:50:24 +0000 (16:50 +0200)]
kernel-install: add helper for logging
Lennart Poettering [Wed, 13 Jul 2022 16:02:36 +0000 (18:02 +0200)]
import-ceds: use the right error variables at four places
Lennart Poettering [Thu, 14 Jul 2022 12:45:56 +0000 (14:45 +0200)]
update TODO
Lennart Poettering [Thu, 14 Jul 2022 12:41:43 +0000 (14:41 +0200)]
update TODO
undef [Thu, 14 Jul 2022 05:53:15 +0000 (05:53 +0000)]
growfs: don't actually resize on dry-run
This causes systemd-growfs to exit before resizing the partition when
`--dry-run` is passed. Resizing during a dry run of a change breaks the
users expectations.
Lennart Poettering [Thu, 14 Jul 2022 12:04:36 +0000 (14:04 +0200)]
update TODO
Luca Boccassi [Thu, 14 Jul 2022 10:22:55 +0000 (11:22 +0100)]
Merge pull request #24002 from yuwata/network-hw-addr
network: fix hardware address handling
Lennart Poettering [Thu, 14 Jul 2022 09:34:18 +0000 (11:34 +0200)]
growfs: don't reopen fds unnecessarily
Instead, just open the mount fd once, and then operate on fds only.
Lennart Poettering [Thu, 14 Jul 2022 09:31:50 +0000 (11:31 +0200)]
growfs: ensure that we operate on a block device before issuing a block ioctl
Similar to the previous commit: let's add extra safety so that we don't
issue ioctls on the wrong type of inode.
Lennart Poettering [Thu, 14 Jul 2022 09:30:27 +0000 (11:30 +0200)]
growfs: insist we open a directory when opening fs mount point
This is a simple safety check, since we shouldn't invoke ioctls on fds
without being reasonably sure they are of the right type since ioctls
are overloaded, and we might be tricked hence to execute an operation on
an fd which means something different than what we expect.
Lennart Poettering [Tue, 12 Jul 2022 21:52:47 +0000 (23:52 +0200)]
update TODO
Lennart Poettering [Wed, 13 Jul 2022 21:44:45 +0000 (23:44 +0200)]
tmpfiles: check the directory we were supposed to create, not its parent
This current code checks the wrong directory. This was broken in
4c39d899ff00e90b7290e4985696f321d7f2726f which converted the previous
code incorrectly.
Lennart Poettering [Wed, 13 Jul 2022 21:43:36 +0000 (23:43 +0200)]
stat-util: replace is_dir() + is_dir_fd() by single is_dir_full() call
This new call can execute both of the old operations, but also do
generic fstatat() like behaviour.
Yu Watanabe [Thu, 14 Jul 2022 01:53:54 +0000 (10:53 +0900)]
sd-bus: do not pass NULL when received message with invalid type
Fixes #24003.
Yu Watanabe [Thu, 14 Jul 2022 00:23:09 +0000 (09:23 +0900)]
sd-dhcp6-client: fix off-by-one error in parsing dhcp6 options
This fixes error in parsing message when the rapid commit option is
located at the end of the message.
Fixes an issure reported in #24002.
Yu Watanabe [Thu, 14 Jul 2022 01:13:00 +0000 (10:13 +0900)]
sd-dhcp6-client: allow NULL option value when length is zero
Yu Watanabe [Wed, 13 Jul 2022 23:37:53 +0000 (08:37 +0900)]
sd-dhcp6-client: add more debugging logs on parsing message
Yu Watanabe [Wed, 13 Jul 2022 22:35:23 +0000 (07:35 +0900)]
Merge pull request #23882 from dtardon/logind-set-display-test
Add tests for org.freedesktop.login1.Session SetType and SetDisplay
Yu Watanabe [Wed, 13 Jul 2022 20:23:01 +0000 (05:23 +0900)]
network: do not set invalid MAC address for non-ethernet interface
Yu Watanabe [Wed, 13 Jul 2022 21:50:15 +0000 (06:50 +0900)]
network: NDisc does not require MAC address
This effectively revert
ba4c7184b320bb8698d470530d46a6c94641cc6e.
Fixes #23546.
Yu Watanabe [Wed, 13 Jul 2022 20:05:32 +0000 (05:05 +0900)]
network: dhcp4: disable DHCPv4 client on interfaces with non-supported types
Replaces
f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.
Yu Watanabe [Wed, 13 Jul 2022 19:56:07 +0000 (04:56 +0900)]
Revert "network: configure DHCP clients after MAC address is assigned"
This reverts commit
f42d41cc5f9cd8cac538a1c30fda04d346b5bae2.
DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.
Partially fixes #23546.
Michael Biebl [Wed, 22 Jun 2022 11:11:13 +0000 (13:11 +0200)]
Do not fail EFI build with newer binutils
Newer binutils versions currently trigger the following warnings due to
a bug in gnu-efi
on arm64:
/usr/bin/ld.bfd: warning: src/boot/efi/systemd-bootaa64.elf has a LOAD segment with RWX permissions
on amd64:
/usr/bin/ld.bfd: warning: /usr/lib/crt0-efi-x86_64.o: missing .note.GNU-stack section implies executable stack
This results in a build failure due to --fatal-warnings.
Work around this issue by suppressing those warnings until gnu-efi has
been fixed.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1013341
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 08:19:19 +0000 (10:19 +0200)]
man: lift pam_systemd_homed description to Summary
Also change the title to describe the module more comprehensively.
Follow-up for
90bc309aa2c1430941f4c50f73e681ab3e488bd3. Suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=
2085485#c5.
David Tardon [Fri, 1 Jul 2022 14:43:34 +0000 (16:43 +0200)]
test: add test for org.freedesktop.login1.Session SetDisplay
David Tardon [Mon, 27 Jun 2022 06:37:22 +0000 (08:37 +0200)]
test: add test for org.freedesktop.login1.Session SetType
David Tardon [Wed, 13 Jul 2022 09:29:20 +0000 (11:29 +0200)]
test: ensure cleanup functions return success
Otherwise the return value of the last command is propagated, which may
cause spurious test failures. E.g., pkill returns 1 if no process
matched, which may be a problem in cleanup session:
cleanup_session() {
...
pkill -u "$(id -u logind-test-user)"
sleep 1
pkill -KILL -u "$(id -u logind-test-user)"
}
If there are no remaining processes when the final pkill runs, it will
return 1 and therefore cleanup_session will return 1 as well.
Daan De Meyer [Wed, 13 Jul 2022 10:48:04 +0000 (12:48 +0200)]
Add coredump daemons to bug/RFE template component options
Zbigniew Jędrzejewski-Szmek [Wed, 13 Jul 2022 11:10:40 +0000 (13:10 +0200)]
Merge pull request #23817 from yuwata/sd-device-send-udev-database-version
sd-device: send udev database version
Frantisek Sumsal [Wed, 13 Jul 2022 09:12:36 +0000 (11:12 +0200)]
ci: limit which env variables we pass through `sudo`
to work around #23987.
Yu Watanabe [Wed, 13 Jul 2022 01:24:53 +0000 (10:24 +0900)]
test-network: save and restore timezone
Several DHCP client tests change the system timezone.
Let's save the current timezone at the beginning, and restore it with
the saved value at the end.
Yu Watanabe [Wed, 13 Jul 2022 00:44:50 +0000 (02:44 +0200)]
Merge pull request #23881 from keszybz/kernel-install-strikes-yet-again
kernel-install: fix invocation as installkernel, add tests, tweak documentation
Yu Watanabe [Tue, 12 Jul 2022 21:06:36 +0000 (23:06 +0200)]
test-network: wait for L2TP tunnels being removed
Fixes #23985.
Franck Bui [Thu, 7 Jul 2022 10:02:04 +0000 (12:02 +0200)]
logind: don't delay login for root even if systemd-user-sessions.service is not activated yet
If for any reason something goes wrong during the boot process (most likely due
to a network issue), system admins should be allowed to log in to the system to
debug the problem. However due to the login session barrier enforced by
systemd-user-sessions.service for all users, logins for root will be delayed
until a (dbus) timeout expires. Beside being confusing, it's not a nice user
experience to wait for an indefinite period of time (no message is shown) this
and also suggests that something went wrong in the background.
The reason of this delay is due to the fact that all units involved in the
creation of a user session are ordered after systemd-user-sessions.service,
which is subject to network issues. If root needs to log in at that time,
logind is requested to create a new session (via pam_systemd), which ultimately
ends up waiting for systemd-user-session.service to be activated. This has the
bad side effect to block login for root until the dbus call done by pam_systemd
times out and the PAM stack proceeds anyways.
To solve this problem, this patch orders the session scope units and the user
instances only after systemd-user-sessions.service for unprivileged users only.
Łukasz Stelmach [Wed, 6 Jul 2022 11:09:51 +0000 (13:09 +0200)]
smack: Add DefaultSmackProcessLabel to user.conf and system.conf
DefaultSmackProcessLabel tells systemd what label to assign to its child
process in case SmackProcessLabel is not set in the service file. By
default, when DefaultSmackProcessLabel is not set child processes inherit
label from systemd.
If DefaultSmackProcessLabel is set to "/" (which is an invalid character
for a SMACK label) the DEFAULT_SMACK_PROCESS_LABEL set during compilation
is ignored and systemd act as if the option was unset.
Luca Boccassi [Tue, 12 Jul 2022 21:43:14 +0000 (22:43 +0100)]
Merge pull request #23982 from medhefgo/boot-misc
boot: Misc cleanups
Luca Boccassi [Tue, 12 Jul 2022 21:41:10 +0000 (22:41 +0100)]
Merge pull request #23979 from DaanDeMeyer/nspawn-relative-paths
nspawn: Support relative paths for --bind and --overlay
Daan De Meyer [Mon, 11 Jul 2022 19:45:08 +0000 (21:45 +0200)]
nspawn: Support relative source paths for --bind and --overlay
Jan Janssen [Tue, 12 Jul 2022 08:01:03 +0000 (10:01 +0200)]
bcd: Clean up includes
Also, now that bcd.h does not depend on efi.h anymore we can now
properly include it in the test instead.
Jan Janssen [Tue, 12 Jul 2022 07:52:29 +0000 (09:52 +0200)]
bcd: Use std alignof
Jan Janssen [Tue, 12 Jul 2022 07:48:38 +0000 (09:48 +0200)]
boot: Remove _cleanup_freepool_
Jan Janssen [Tue, 12 Jul 2022 07:46:44 +0000 (09:46 +0200)]
boot: Use int instead of INTN
Jan Janssen [Tue, 12 Jul 2022 07:43:13 +0000 (09:43 +0200)]
boot: Use uintptr_t when converting EFI_PHYSICAL_ADDRESS
uintptr_t is the more appropriate type when casting to/from pointers.
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 12:55:05 +0000 (14:55 +0200)]
kernel-install: suppress bogus shellcheck hint
I don't quite understand this, but '{ ! true; }' is not the same as '( ! true )'.
In interactive mode, it seems to work as expected. But in a script, it doesn't.
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 12:45:07 +0000 (14:45 +0200)]
kernel-install: use set -e
This means that we'll fail hard if something goes wrong, e.g. reading
of a config file. I think this is appropriate. If errors should be ignored,
the caller should do that on their end.
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 12:44:01 +0000 (14:44 +0200)]
kernel-install: return 0 for unknown verbs in plugins
In practice this makes little difference, because kernel-install will
only call the plugins for 'add' or 'remove', and if we were to add a
new verb to kernel-install, we'd just change the plugins at the same
time. But our plugins serve as documentation for external plugins too,
and there it's better to silently ignore unknown verbs so that we can
add new verbs in the future.
(50-depomod.install was already like that.)
Zbigniew Jędrzejewski-Szmek [Sat, 2 Jul 2022 12:41:41 +0000 (14:41 +0200)]
kernel-install: raise fuss if plugins are called without the expected parameters
Zbigniew Jędrzejewski-Szmek [Fri, 1 Jul 2022 11:08:31 +0000 (13:08 +0200)]
test-kernel-install: add a simple test that kernel-install copies the files
I opted to tweaking kernel-install to allow overriding config
(with $KERNEL_INSTALL_CONF_ROOT, $KERNEL_INSTALL_PLUGINS). An alternative
would be to build a test environment in test/. We can still do that,
but I think it's nice to have a simple test that is very quick and easy
to debug.
Invocation as installkernel is for #23681.
Zbigniew Jędrzejewski-Szmek [Fri, 1 Jul 2022 11:04:11 +0000 (13:04 +0200)]
kernel-install: mark the plugins as executable in git
We mark them as executable during installation, but it's also nice to mark
them as such in sources, so they can be executed directly.
Zbigniew Jędrzejewski-Szmek [Fri, 1 Jul 2022 10:55:32 +0000 (12:55 +0200)]
kernel-install: allow overriding the plugin list too
The use of IFS=<newline> is dropped. Let's just iterate over the list, using
any whitespace as separator.
Yu Watanabe [Mon, 11 Jul 2022 23:27:36 +0000 (01:27 +0200)]
Merge pull request #23980 from yuwata/test-network
test-network: tiny output improvements
Yu Watanabe [Mon, 11 Jul 2022 20:44:56 +0000 (22:44 +0200)]
Merge pull request #23972 from yuwata/sd-device
sd-device: do not return -ENOENT by sd_device_get_is_initialized()
Michal Stanke [Mon, 11 Jul 2022 12:11:12 +0000 (14:11 +0200)]
Fix automatic screen rotation for Asus Transformer T100TAM
Yu Watanabe [Mon, 11 Jul 2022 20:43:45 +0000 (22:43 +0200)]
Merge pull request #23974 from yuwata/align-tables
basic: align tables
Yu Watanabe [Mon, 11 Jul 2022 20:32:10 +0000 (22:32 +0200)]
test-network: support to remove routing policy rules with l3mdev flag
Yu Watanabe [Mon, 11 Jul 2022 20:31:12 +0000 (22:31 +0200)]
test-network: merge stdout and stderr of invoked command by call()
Otherwise, the logs may be messed up.
Lennart Poettering [Mon, 11 Jul 2022 13:12:24 +0000 (15:12 +0200)]
man: explain why pam_systemd_home wants to be in all four stacks
Suggested here:
https://bugzilla.redhat.com/show_bug.cgi?id=
2085485#c5
Frantisek Sumsal [Mon, 11 Jul 2022 20:03:04 +0000 (20:03 +0000)]
Merge pull request #23969 from yuwata/test-network
test-network: fixlets and performance improvements
Daan De Meyer [Mon, 11 Jul 2022 19:43:41 +0000 (21:43 +0200)]
nspawn: Rewrap --overlay docs
Daan De Meyer [Mon, 11 Jul 2022 19:38:26 +0000 (21:38 +0200)]
nspawn: Drop unnecessary intermediate variable
Topi Miettinen [Sun, 10 Jul 2022 09:17:32 +0000 (12:17 +0300)]
sd-netlink: add sizes for some IP and Ethernet addresses
Add sizes for some uses of NETLINK_TYPE_IN_ADDR and NETLINK_TYPE_ETHER_ADDR
types.
Yu Watanabe [Sat, 9 Jul 2022 11:05:23 +0000 (20:05 +0900)]
test-network: various cleanups
- introduce several helper functions
- do not list unit files, but remove the runtime unit directory in
tearDown().
- do not list used interfaces, but remove all interfaces previously not
exists in tearDown().
- save routes and routing policy rules before running tests, and flush
unnecessary routes and rules in each tearDown() calls.
- drop many time.sleep() calls.
- call tearDown() after each sub tests.
- shorten code.
- several coding style fixes.
- etc, etc...
Hopefully, this improves performance of the test.
Lennart Poettering [Mon, 11 Jul 2022 15:37:41 +0000 (17:37 +0200)]
update TODO
Yu Watanabe [Sun, 10 Jul 2022 21:54:40 +0000 (23:54 +0200)]
test-network: extend timeout for DHCP lease to be expired
Fixes #23964.
Yu Watanabe [Mon, 11 Jul 2022 10:02:31 +0000 (12:02 +0200)]
sd-device: shorten code a bit
Lennart Poettering [Mon, 11 Jul 2022 13:10:38 +0000 (15:10 +0200)]
tree-wide: trivial tweaks
Lennart Poettering [Fri, 8 Jul 2022 16:05:12 +0000 (18:05 +0200)]
update TODO
Luca Boccassi [Mon, 11 Jul 2022 10:08:14 +0000 (11:08 +0100)]
mkosi: update to latest main
Fix build failure on SUSE Tumbleweed due to config changes
Yu Watanabe [Mon, 11 Jul 2022 12:19:59 +0000 (14:19 +0200)]
unit-def: align string tables
Yu Watanabe [Mon, 11 Jul 2022 12:13:33 +0000 (14:13 +0200)]
virt: align tables
Yu Watanabe [Mon, 11 Jul 2022 10:02:04 +0000 (12:02 +0200)]
sd-device: make sd_device_get_is_initialized() not return -ENOENT
Luca Boccassi [Sun, 10 Jul 2022 21:42:56 +0000 (22:42 +0100)]
Merge pull request #23962 from keszybz/taint-flag-support-ended
Taint flag "support-ended"
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 16:00:33 +0000 (18:00 +0200)]
manager: add taint flag "support-ended"
In the welcome line, use NAME= as the fallback for PRETTY_NAME=.
PRETTY_NAME= doesn't have to be set, but NAME= should.
Example output:
---
Welcome to Fedora Linux 37 (Rawhide Prerelease)!
[ !! ] This OS version (Fedora Linux 37 (Rawhide Prerelease)) is past its end-of-support date (1999-01-01)
Queued start job for default target graphical.target.
[ OK ] Created slice system-getty.slice.
---
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 15:42:07 +0000 (17:42 +0200)]
man: update the description of taint flags
We had a description in README, and an outdated list in the man page.
I think we should keep a reference-style list in the man page. The description
in README is more free-form.
Zbigniew Jędrzejewski-Szmek [Sat, 9 Jul 2022 15:50:36 +0000 (17:50 +0200)]
man: redefine SUPPORT_END= to mean one day earlier
I thought it would be nice to specify the last day of support, because I
thought it'd seem more natural. But in practice this doesn't work well, because
such a truncated timestamp is usually taken to mean midnight that starts the
given date. I.e. 2011-12-13 is a shorthand for 2011-12-13 00:00:00 and not
2011-12-13 23:59:59.
999999999999. Let's instead specify that the given date is
the first unsupported day, which is meaningful for humans, and let the computer
treat it as midnight, which gives consistent interpratation.
Yu Watanabe [Sat, 9 Jul 2022 06:56:50 +0000 (15:56 +0900)]
resolve: introduce FORMAT_DNS_RCODE() macro
Fixes #23958.
Frantisek Sumsal [Sat, 9 Jul 2022 08:21:32 +0000 (08:21 +0000)]
Merge pull request #23959 from yuwata/test-network
test-network: several performance improvements
Yu Watanabe [Sat, 9 Jul 2022 03:20:11 +0000 (12:20 +0900)]
test-network: use wait_operstate() at one more place
Yu Watanabe [Sat, 9 Jul 2022 03:19:52 +0000 (12:19 +0900)]
test-network: suppress periodic output in wait_operstate()
Yu Watanabe [Sat, 9 Jul 2022 02:59:38 +0000 (11:59 +0900)]
test-network: disable debugging logs from networkctl, resolvectl, and so on
Yu Watanabe [Sat, 9 Jul 2022 01:13:33 +0000 (10:13 +0900)]
test-network: merge two DHCPv6 client tests
Yu Watanabe [Sat, 9 Jul 2022 01:07:17 +0000 (10:07 +0900)]
test-network: replace sleep with wait_address() and wait_address_dropped()
Yu Watanabe [Sat, 9 Jul 2022 01:01:51 +0000 (10:01 +0900)]
test-network: merge two more tests with test_dhcp_client_ipv4_only
Yu Watanabe [Sat, 9 Jul 2022 00:49:20 +0000 (09:49 +0900)]
test-network: merge tests for UseDNS=
Yu Watanabe [Fri, 8 Jul 2022 23:58:48 +0000 (08:58 +0900)]
test-network: merge two IPv4LL tests
Yu Watanabe [Fri, 8 Jul 2022 23:10:08 +0000 (08:10 +0900)]
test-network: drop test_dhcp_client_ipv4_ipv6
As the test is covered by test_dhcp_client_reuse_address_as_static.
Yu Watanabe [Fri, 8 Jul 2022 22:52:11 +0000 (07:52 +0900)]
sd-dhcp-client: fix log message
Yu Watanabe [Fri, 8 Jul 2022 22:40:06 +0000 (07:40 +0900)]
test-network: check DHCPv4 address in more detail
Also, this drops redundant address check through networkctl.
Yu Watanabe [Fri, 8 Jul 2022 22:15:37 +0000 (07:15 +0900)]
test-network: drop 25-dhcp-v4-server-veth-peer.network
Yu Watanabe [Fri, 8 Jul 2022 22:03:31 +0000 (07:03 +0900)]
test-network: drop meaningless test
On DHCPv6 lease renew, the kernel do not drop static routes, and hence
we do not try to reassign them. Hence, the test is mostly meaningless.
Yu Watanabe [Fri, 8 Jul 2022 21:34:20 +0000 (06:34 +0900)]
test-network: introduce read_dnsmasq_log_file() helper function
This reduces the number of times that the log file is read.
Also, dropped unnecessary dump of the log file.