Yu Watanabe [Wed, 28 Sep 2022 09:00:17 +0000 (18:00 +0900)]
udev-builtin-net_id: use sd_device_get_sysnum() to get index of netdevsim
Yu Watanabe [Tue, 27 Sep 2022 07:55:09 +0000 (16:55 +0900)]
udev-builtin-net_id: make names_netdevsim() self-contained
It is not necessary to store its partial result into NetNames.
No functional changes, just refactoring.
Yu Watanabe [Thu, 29 Sep 2022 08:26:42 +0000 (17:26 +0900)]
udev-builtin-net_id: do not assume the current ifname is ethX
Otherwise, `udevadm test-builtin` may not work.
Yu Watanabe [Tue, 27 Sep 2022 07:44:29 +0000 (16:44 +0900)]
udev-builtin-net_id: make names_platform() self-contained
It is not necessary to store its partial result into NetNames.
No functional changes, just refactoring.
Yu Watanabe [Wed, 28 Sep 2022 09:40:41 +0000 (18:40 +0900)]
udev-builtin-net_id: do not assume the current interface name is ethX
Otherwise, `udevadm test-builtin` does not work as expected.
Yu Watanabe [Tue, 27 Sep 2022 07:32:22 +0000 (16:32 +0900)]
udev-builtin-net_id: make names_vio() self-contained
It is not necessary to store its partial result in NetNames.
No functional changes, just refactoring.
Yu Watanabe [Tue, 27 Sep 2022 07:13:51 +0000 (16:13 +0900)]
udev-builtin-net_id: make names_ccw() self-contained
It is not necessary to store its partial result in NetNames.
No functional changes, just refactoring.
Yu Watanabe [Tue, 27 Sep 2022 07:05:34 +0000 (16:05 +0900)]
udev-builtin-net_id: make dev_devicetree_onboard() self-contained
and rename it to names_devicetree().
No functional changes, just refactoring.
Yu Watanabe [Tue, 27 Sep 2022 06:41:20 +0000 (15:41 +0900)]
udev-builtin-net_id: make names_mac() self-contained
The MAC address is only used by names_mac() and ieee_oui(). Let's parse
it in names_mac() and drop it from LinkInfo.
No functional changes, just refactoring.
Yu Watanabe [Tue, 27 Sep 2022 06:51:25 +0000 (15:51 +0900)]
udev-builtin-net_id: split out get_ifname_prefix()
No functional changes, just refactoring.
Yu Watanabe [Fri, 7 Jul 2023 03:55:40 +0000 (12:55 +0900)]
udev-builtin-net_id: swap arguments for streq() and friends
Yu Watanabe [Wed, 28 Sep 2022 05:57:46 +0000 (14:57 +0900)]
udev-builtin-net_id: drop unused value from NetNameType
Yu Watanabe [Sat, 29 Jul 2023 12:41:27 +0000 (21:41 +0900)]
Merge pull request #28562 from yuwata/ukify-option-length
ukify: check option length
Yu Watanabe [Sat, 29 Jul 2023 12:40:58 +0000 (21:40 +0900)]
Merge pull request #28563 from keszybz/configure-meson
configure: update meson invocation
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jul 2023 12:11:14 +0000 (14:11 +0200)]
labeller: add build-system label
Zbigniew Jędrzejewski-Szmek [Sat, 29 Jul 2023 12:07:07 +0000 (14:07 +0200)]
configure: update meson invocation
New meson says:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
Inspired by https://github.com/systemd/systemd/issues/28482.
Luca Boccassi [Sat, 29 Jul 2023 11:39:06 +0000 (12:39 +0100)]
Merge pull request #28557 from bluca/utils
utils: add serialize_bool_elide() and send/receive helpers for FD array
Luca Boccassi [Sat, 29 Jul 2023 11:15:38 +0000 (12:15 +0100)]
Merge pull request #28508 from yuwata/network-next-dhcp4
network: several cleanups and fixes for DHCPv4 client
Yu Watanabe [Sat, 29 Jul 2023 10:20:39 +0000 (19:20 +0900)]
test-ukify: add tests for an empty argument
Yu Watanabe [Sat, 29 Jul 2023 10:55:57 +0000 (19:55 +0900)]
Merge pull request #28409 from yuwata/network-dhcp4-drop-duid-only
network,dhcp4: drop "duid-only" option support in ClientIdentifier=
Luca Boccassi [Mon, 26 Jun 2023 15:13:49 +0000 (16:13 +0100)]
serialize: add serialize_bool_elide() helper
In many case we serialize into objects that have been zero-initialized.
To save some time and resources when there are a lot of booleans, add a
helper that serializes only when the boolean is true.
Luca Boccassi [Fri, 7 Jul 2023 23:18:01 +0000 (00:18 +0100)]
socket-util: add send/receive helpers for FD array
Sven Joachim [Sat, 29 Jul 2023 08:05:23 +0000 (10:05 +0200)]
mkosi: set CONFIG_AUTOFS_FS rather than CONFIG_AUTOFS4_FS
Since Linux 4.18 CONFIG_AUTOFS4_FS just enables CONFIG_AUTOFS_FS, its
description in fs/autofs/Kconfig reads:
This name exists for people to just automatically pick up the
new name of the autofs Kconfig option. All it does is select
the new option name.
It will go away in a release or two as people have
transitioned to just plain AUTOFS_FS.
Yu Watanabe [Sat, 15 Jul 2023 05:42:32 +0000 (14:42 +0900)]
NEWS: mention about the removal of duid-only option
Yu Watanabe [Sat, 15 Jul 2023 05:35:28 +0000 (14:35 +0900)]
network,dhcp: drop support of ClientIdentifier=duid-only
The setting has not been never worked, not tested, and should not been
used. As the option is RFC incompliant. Let's drop it.
Closes #25562.
Yu Watanabe [Sat, 29 Jul 2023 09:47:48 +0000 (18:47 +0900)]
ukify: check option length
Follow-up for
df4a46733a609f1673de0bebb38e89fffd70c16c.
Yu Watanabe [Sat, 29 Jul 2023 09:36:14 +0000 (18:36 +0900)]
Merge pull request #28558 from bluca/docs
Update docs/RELEASE.md and NEWS
Luca Boccassi [Fri, 28 Jul 2023 22:42:46 +0000 (23:42 +0100)]
NEWS: open for v255 business
Luca Boccassi [Fri, 28 Jul 2023 22:42:20 +0000 (23:42 +0100)]
docs: note that Github Pages configuration has to be updated after a release
Luca Boccassi [Fri, 28 Jul 2023 20:59:04 +0000 (21:59 +0100)]
Merge pull request #28391 from ssahani/rp-filter
networkd: allow setting rp_filter for an interface
Luca Boccassi [Fri, 28 Jul 2023 19:48:41 +0000 (20:48 +0100)]
Merge pull request #28552 from bluca/test_execute
test-execute: measure, count and log test runs
Luca Boccassi [Fri, 28 Jul 2023 18:02:26 +0000 (19:02 +0100)]
test-execute: count and log the number of individual tests actually executed
Luca Boccassi [Mon, 12 Jun 2023 01:15:19 +0000 (02:15 +0100)]
Drop split-usr and unmerged-usr support
As previously announced, execute order 66:
https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html
The meson options split-usr, rootlibdir and rootprefix become no-ops
that print a warning if they are set to anything other than the
default values. We can remove them in a future release.
Luca Boccassi [Tue, 25 Jul 2023 11:16:05 +0000 (12:16 +0100)]
test-execute: measure and log time elapsed while running tests
In order to get a good approximation of latencies when starting
services, timestamp before/after running the test cases and print
the difference. This allows to measure while ignoring the setup/shutdown
time for the test harness.
Luca Boccassi [Fri, 28 Jul 2023 12:57:01 +0000 (13:57 +0100)]
Merge pull request #28551 from mrc0mmand/unit-cleanup-set
core: free the strings in the set as well during unit cleanup
Daan De Meyer [Fri, 28 Jul 2023 12:28:35 +0000 (14:28 +0200)]
Merge pull request #28359 from keszybz/ret-gather
Add RET_GATHER macro to make continue-but-remember-first-error functions easier
Frantisek Sumsal [Fri, 28 Jul 2023 10:24:32 +0000 (12:24 +0200)]
core: free the strings in the set as well during unit cleanup
Spotted while fuzzing #27890.
=================================================================
==908098==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x7f4efe6d81f5 in __interceptor_realloc.part.0 (/lib64/libasan.so.8+0xd81f5) (BuildId:
dc689b05ca2577037af24700212bb5cce1f91c8a)
#1 0x7f4efb8e3ace in greedy_realloc ../src/basic/alloc-util.c:70
#2 0x7f4efb93b713 in extract_first_word ../src/basic/extract-word.c:62
#3 0x7f4efb970d50 in set_put_strsplit ../src/basic/hashmap.c:1902
#4 0x7f4efd76c27e in exec_context_deserialize ../src/core/execute-serialize.c:3341
#5 0x7f4efd778dcb in exec_deserialize ../src/core/execute-serialize.c:4122
#6 0x4032c0 in LLVMFuzzerTestOneInput ../src/core/fuzz-execute-serialize.c:60
#7 0x403c58 in main ../src/fuzz/fuzz-main.c:50
#8 0x7f4efecccb49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId:
245240a31888ad5c11bbc55b18e02d87388f59a9)
#9 0x7f4efecccc0a in __libc_start_main_alias_2 (/lib64/libc.so.6+0x27c0a) (BuildId:
245240a31888ad5c11bbc55b18e02d87388f59a9)
#10 0x402344 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-san/fuzz-execute-serialize+0x402344) (BuildId:
195f382cf1e39b9ba48d6dcf5a90f786d72837a8)
SUMMARY: AddressSanitizer: 64 byte(s) leaked in 1 allocation(s).
Aborted (core dumped)
==911550==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 17 byte(s) in 1 object(s) allocated from:
#0 0x4df281 in strdup (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x4df281) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#1 0x7fe4ae2b38fc in _set_put_strndup_full /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/basic/hashmap.c:1868:21
#2 0x7fe4b0bad897 in exec_context_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:3914:29
#3 0x7fe4b0b80592 in exec_deserialize /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/execute-serialize.c:4109:13
#4 0x531d0f in LLVMFuzzerTestOneInput /home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/../src/core/fuzz-execute-serialize.c:59:16
#5 0x440594 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440594) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#6 0x43f9b9 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x43f9b9) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#7 0x440fd5 in fuzzer::Fuzzer::MutateAndTestOne() (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x440fd5) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#8 0x441955 in fuzzer::Fuzzer::Loop(std::vector<fuzzer::SizedFile, std::allocator<fuzzer::SizedFile>>&) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x441955) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#9 0x42e151 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x42e151) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#10 0x45a916 in main (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x45a916) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
#11 0x7fe4ac449b49 in __libc_start_call_main (/lib64/libc.so.6+0x27b49) (BuildId:
245240a31888ad5c11bbc55b18e02d87388f59a9)
#12 0x7fe4ac449c0a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x27c0a) (BuildId:
245240a31888ad5c11bbc55b18e02d87388f59a9)
#13 0x422b74 in _start (/home/mrc0mmand/repos/@systemd/systemd/build-libfuzz/fuzz-execute-serialize+0x422b74) (BuildId:
4e58706e607b8be7972d83c421bc0b625d509ec6)
SUMMARY: AddressSanitizer: 17 byte(s) leaked in 1 allocation(s).
Susant Sahani [Mon, 17 Jul 2023 10:00:43 +0000 (15:30 +0530)]
CI: network - Add test for rp_filter
Susant Sahani [Thu, 13 Jul 2023 16:10:48 +0000 (21:40 +0530)]
networkd: allow setting rp_filter for an interface
Luca Boccassi [Fri, 28 Jul 2023 08:57:19 +0000 (09:57 +0100)]
Merge pull request #28335 from ssahani/dhcp4-route-option
network: DHCP4 allow to set InitialCongestionWindow and InitialAdvert…
Luca Boccassi [Fri, 28 Jul 2023 08:57:04 +0000 (09:57 +0100)]
Merge pull request #28360 from keszybz/pointingstick-accel-drop
hwdb: drop POINTINGSTICK_CONST_ACCEL
Luca Boccassi [Fri, 28 Jul 2023 08:56:41 +0000 (09:56 +0100)]
Merge pull request #28527 from medhefgo/boot-stack-guard
boot: Fall back to using image load address for stack guard
Luca Boccassi [Fri, 28 Jul 2023 08:56:28 +0000 (09:56 +0100)]
Merge pull request #28430 from keszybz/cleanups
Various small cleanups
Luca Boccassi [Fri, 28 Jul 2023 08:56:08 +0000 (09:56 +0100)]
Merge pull request #28417 from bluca/coverity
Some coverity fixes
Luca Boccassi [Fri, 28 Jul 2023 08:55:03 +0000 (09:55 +0100)]
Merge pull request #27621 from esposem/ukify_read
ukify: add an option to read the PE sections
Luca Boccassi [Fri, 28 Jul 2023 08:26:29 +0000 (09:26 +0100)]
NEWS: finalize for v254
A release is never late, nor is it early, it arrives precisely when it
means to.
Luca Boccassi [Fri, 28 Jul 2023 08:25:25 +0000 (09:25 +0100)]
NEWS: mention that fsck will be ran for systemd.mount-extra=
Luca Boccassi [Fri, 28 Jul 2023 08:23:32 +0000 (09:23 +0100)]
NEWS: update contributors list
Luca Boccassi [Fri, 28 Jul 2023 08:16:12 +0000 (09:16 +0100)]
Merge pull request #28543 from bluca/hwdb
hwdb and NEWS updates
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jul 2023 06:49:40 +0000 (08:49 +0200)]
Merge pull request #28544 from yuwata/fstab-generator-fsck
fstab-generator: enable fsck for block device mounts specified in sys…
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jul 2023 06:46:27 +0000 (08:46 +0200)]
Merge pull request #28548 from yuwata/meson-confext
meson: do not create dead systemd-confext symlink if sysext is disabled
Yu Watanabe [Fri, 28 Jul 2023 03:15:47 +0000 (12:15 +0900)]
meson: do not create dead systemd-confext symlink if sysext is disabled
Yu Watanabe [Thu, 27 Jul 2023 21:07:17 +0000 (06:07 +0900)]
fstab-generator: enable fsck for block device mounts specified in systemd.mount-extra=
Like we do for root= or so.
Another possible option is adding support of fifth (sixth?) field in
systemd.mount-extra=. But that may be overkill, hence let's do that
later if someone request that.
Fixes fsck part of issue #28541.
Luca Boccassi [Thu, 27 Jul 2023 23:39:59 +0000 (00:39 +0100)]
NEWS: mention agetty/login credentials
Luca Boccassi [Thu, 27 Jul 2023 23:30:53 +0000 (00:30 +0100)]
hwdb: run update-hwdb
git diff hwdb.d/*.hwdb looks sensible
Yu Watanabe [Thu, 27 Jul 2023 20:55:42 +0000 (05:55 +0900)]
test: fix typo
Yu Watanabe [Mon, 24 Jul 2023 10:51:21 +0000 (19:51 +0900)]
network/dhcp4: drop unused logic of finding default gateway
Yu Watanabe [Mon, 24 Jul 2023 14:34:18 +0000 (23:34 +0900)]
network/dhcp4: always honor specified gateway address
Follow-up for
77451f654a89d822cd288883edfac315949d1cb6.
Now, gateway for routes to DNS or NTP servers should be correctly picked,
hence it is not necessary to adjust the gateway address in
dhcp4_request_route_auto() again.
Also, similar for classless static routes, let's always honor
gateway address specified in (non-classless) static routes.
Yu Watanabe [Mon, 24 Jul 2023 11:40:04 +0000 (20:40 +0900)]
network/dhcp4: always find suitable gateway for destination address
And if not found, refuse to configure the route.
If a DHCP server provides classless static or static routes, then we
should use the gateway for accessing a node in the range specified in
the route. E.g. if a DHCP server provides the default gateway is
192.168.0.1, and classless static route for 8.0.0.0/8 with gateway
192.168.0.2, then we should access 8.8.8.8 through 192.168.0.2 rather
than 192.168.0.1, but should use 192.168.0.1 for 9.9.9.9.
Fixes #28358.
Yu Watanabe [Mon, 24 Jul 2023 18:12:17 +0000 (03:12 +0900)]
network/dhcp4: introduce dhcp4_prefix_covers() helper function
No functional change, just refactoring.
Yu Watanabe [Mon, 24 Jul 2023 10:47:06 +0000 (19:47 +0900)]
network/dhcp4: introduce dhcp4_get_router() helper function
Previously, we use the first router address, and if it is null, we
ignore the address. Now, we use the first non-null address. That is, if
the first router address is null, but the second is not, then we use the
second one.
That should not cause functional change in most cases, except for the case
when a DHCP server provides such spurious reply.
This is mostly for refactoring and preparation for later commits.
Yu Watanabe [Mon, 24 Jul 2023 10:45:58 +0000 (19:45 +0900)]
network/dhcp4: introduce dhcp4_get_classless_static_or_static_routes() helper
No functional changes, just refactoring and preparation for later
commits.
Yu Watanabe [Mon, 24 Jul 2023 11:12:54 +0000 (20:12 +0900)]
network/dhcp4: drop unnecessary assignment
It will be set in dhcp4_request_route_auto().
Yu Watanabe [Mon, 24 Jul 2023 11:09:25 +0000 (20:09 +0900)]
network/dhcp4: use FOREACH_ARRAY() macro
Yu Watanabe [Mon, 24 Jul 2023 18:26:31 +0000 (03:26 +0900)]
network/dhcp4: honor received broadcast address
Yu Watanabe [Mon, 24 Jul 2023 17:52:07 +0000 (02:52 +0900)]
network/dhcp4: use sd_dhcp_lease_get_prefix()
Yu Watanabe [Mon, 24 Jul 2023 16:57:10 +0000 (01:57 +0900)]
sd-dhcp: introduce sd_dhcp_lease_get_prefix()
Yu Watanabe [Mon, 24 Jul 2023 17:36:25 +0000 (02:36 +0900)]
in-addr-util: introduce in_addr_prefix_covers_full() and friends
Luca Boccassi [Thu, 27 Jul 2023 20:12:14 +0000 (21:12 +0100)]
Merge pull request #28540 from DaanDeMeyer/getty-credentials
units: Load agetty credentials in all getty units
Luca Boccassi [Thu, 27 Jul 2023 17:47:41 +0000 (18:47 +0100)]
Merge pull request #28518 from yuwata/fstab-generator-fixes
fstab-generator: fixes for systemd.mount-extra=
Daan De Meyer [Thu, 27 Jul 2023 14:50:58 +0000 (16:50 +0200)]
units: Load agetty credentials in all getty units
In it's latest release, agetty will support reading the agetty.autologin
and login.noauth credentials, so let's make sure we import those in our
getty units so they're available to agetty to read.
Frantisek Sumsal [Thu, 27 Jul 2023 11:20:17 +0000 (13:20 +0200)]
ci: explicitly install python3-lldb-$COMPILER_VERSION
To avoid apt complaining:
+ apt-get -y install clang-15 lldb-15 lld-15 clangd-15
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-lldb-14 : Conflicts: python3-lldb-x.y
python3-lldb-15 : Conflicts: python3-lldb-x.y
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Franck Bui [Wed, 26 Jul 2023 15:04:10 +0000 (17:04 +0200)]
sleep: don't init /sys/power/resume if 'resume=' option is missing and EFI is disabled
Otherwise in such case a first `systemctl hibernate` would fail but would still
initialize /sys/power/resume fooling a second `systemctl hibernate` into
believing that 'resume=' is correctly set and can be used by the resume process
to find the swap device to resume from.
Follow-up for #27330.
Frantisek Sumsal [Thu, 27 Jul 2023 09:21:36 +0000 (11:21 +0200)]
network: don't log non-negative errno
Otherwise bad things happen:
systemd-networkd[3140]: wlan0: Saved new link: ifindex=5, iftype=ETHER(1), kind=n/a
systemd-networkd[3140]: Assertion '(_error) != 0' failed at src/network/networkd-wifi.c:119, function manager_genl_process_nl80211_config(). Aborting.
Resolves: #28534
Erik Sjölund [Wed, 21 Jun 2023 06:35:03 +0000 (08:35 +0200)]
man: fix typos
Luca Boccassi [Wed, 26 Jul 2023 20:18:07 +0000 (21:18 +0100)]
mkosi: install sd-boot on opensuse in base image
Workaround for CI issue, the sd-stub we build is overwritten in the final
image as the package gets pulled there, install it in the base to
work around it for now
Yu Watanabe [Wed, 26 Jul 2023 16:14:14 +0000 (01:14 +0900)]
missing: include linux/types.h for __s64 and __u64
Fixes #28529.
Luca Boccassi [Wed, 26 Jul 2023 10:29:57 +0000 (11:29 +0100)]
efi: link with -z nopack-relative-relocs
elf2efi.py cannot handle DT_RELR relocations, so disable it
if we can
Fixes https://github.com/systemd/systemd/issues/28520
Yu Watanabe [Tue, 25 Jul 2023 22:37:29 +0000 (07:37 +0900)]
test-fstab-generator: add more tests for systemd.mount-extra= and friends
Yu Watanabe [Tue, 25 Jul 2023 22:04:48 +0000 (07:04 +0900)]
test-fstab-generator: also test with SYSTEMD_IN_INITRD=no
Yu Watanabe [Tue, 25 Jul 2023 21:30:37 +0000 (06:30 +0900)]
test-fstab-generator: extract core part as a function
No functional change, preparation for later commits.
Yu Watanabe [Wed, 26 Jul 2023 00:39:23 +0000 (09:39 +0900)]
fstab-generator: add a flag to accept entry for "/" in initrd
When both prefix_sysroot and accept_root is true, the entry for "/" will
be accepted and converted to "/sysroot/".
Why? If the entry is read from the main system's fstab, then we already
mounted /sysroot/, hence it is not and should not re-add the .mount unit
for /sysroot/. However, if we want to specify the root mount through the
kernel command line or credential, without this change, we need to
specify the same entry in the two options. E.g.
===
systemd.mount-extra=/dev/sda1:/:auto:defaults
rd.systemd.mount-extra=/dev/sda1:/sysroot:auto:defaults
===
That's inconvenient. Of course, we can dedup that by using traditional
options, but cannot when defined in credential.
Yu Watanabe [Tue, 25 Jul 2023 19:25:57 +0000 (04:25 +0900)]
fstab-generator: read both credentials in initrd
This makes the behavior consistent with the way we already do for
fstab and command line options.
In initrd, entries read from fstab.extra are mounted under /sysroot.
Yu Watanabe [Tue, 25 Jul 2023 19:17:27 +0000 (04:17 +0900)]
fstab-generator: add rd.systemd.mount-extra= and friends
Previously, mounts specified in systemd.mount-extra= are equally handled
both in initrd and the main system. So, the mounts for the main system
are also mounted in initrd.
This introduces rd.systemd.mount-extra=, which specifies mounts in initrd.
Then, mounts specified in systemd.mount-extra= are still mounted both in
initrd and the main system, but prefixed with /sysroot/ when running in
initrd.
Fixes #28516.
Yu Watanabe [Wed, 26 Jul 2023 00:31:54 +0000 (09:31 +0900)]
fstab-generator: fix target of /sysroot/usr
If /usr mount is picked from the main system's fstab file (prefix_sysroot
is true, and the path is prefixed as /sysroot/usr), then previously it
was installed in the wrong target unit.
Jan Janssen [Wed, 26 Jul 2023 13:08:53 +0000 (15:08 +0200)]
boot: Fall back to using image load address for stack guard
If we cannot get random data from the RNG protocol we can still use our
load address to make the stack guard a little less static.
Luca Boccassi [Wed, 26 Jul 2023 11:36:40 +0000 (12:36 +0100)]
mkosi: add drop-in to make emergency.service shut down the system
When the mkosi CI fails to boot, it just sits there waiting at the emergency
console until the job times out. Add a drop-in for emergency.service in the
CI configuration so that instead it exists immediately.
Zbigniew Jędrzejewski-Szmek [Wed, 26 Jul 2023 12:34:08 +0000 (14:34 +0200)]
Merge pull request #28511 from YHNdnzj/gpt-auto-no-duplicate
gpt-auto: skip mounting ESP if fstab for /boot/ uses the same device as discovered one
Mike Yuan [Wed, 26 Jul 2023 04:10:43 +0000 (12:10 +0800)]
gpt-auto: skip mounting ESP if fstab for /boot/ uses the same device as discovered one
Follow-up for
6a488fa7cce8124fa885adf8a2f31363fe62f636
Currently, if an fstab entry for /boot/ exists, we'll skip to try /efi/
instead. However, if it's already using the same device as the discovered
one, we should not duplicate the mount.
Mike Yuan [Wed, 26 Jul 2023 04:04:07 +0000 (12:04 +0800)]
fstab-util: add fstab_is_mount_point_full which takes a source path to compare
Luca Boccassi [Tue, 25 Jul 2023 18:47:29 +0000 (19:47 +0100)]
pam: lower warning about closing sd-bus after fork
There is some issue in our code that triggers this warning constantly,
but it's nothing users can solve, so downgrade to debug level until
we can figure out the original issue (which is a permission denied
error on ReleaseSession D-Bus method call).
Related to https://github.com/systemd/systemd/issues/28514
Yu Watanabe [Tue, 25 Jul 2023 18:17:01 +0000 (03:17 +0900)]
fstab-generator: rename 'initrd' flag to 'prefix_sysroot'
The name 'initrd' is confusing with 'in_initrd()'.
Yu Watanabe [Mon, 24 Jul 2023 20:18:53 +0000 (05:18 +0900)]
udev: set ID_PATH properties for all pci, usb, and platform devices
Before
c43ff248f94266cfc93e300a2d3d163ed805e55b, the following line in
60-drm.rules also sets ID_PATH for all pci, usb, and platform devices:
===
ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
===
Unfortunately, some existing rules rely on the unexpected behavior.
To keep the backward compatibility, let's set ID_PATH for them.
Fixes #28411.
Yu Watanabe [Tue, 25 Jul 2023 06:50:29 +0000 (15:50 +0900)]
NEWS: fix typo
Luca Boccassi [Mon, 24 Jul 2023 17:06:30 +0000 (18:06 +0100)]
ukify: fix armv7 architecture mapping
$ uname -m
armv7l
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 223, in <module>
main()
File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 219, in main
call_ukify(opts)
File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/src/kernel-install/60-ukify.install", line 205, in call_ukify
ukify['finalize_options'](opts2)
File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/ukify", line 1423, in finalize_options
opts.efi_arch = guess_efi_arch()
^^^^^^^^^^^^^^^^
File "/<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/ukify", line 78, in guess_efi_arch
raise ValueError(f'Unsupported architecture {arch}')
ValueError: Unsupported architecture armv7l
Frantisek Sumsal [Mon, 24 Jul 2023 18:21:17 +0000 (20:21 +0200)]
shell-completion: include units in 'verify' completions
Resolves: #28500
Luca Boccassi [Mon, 24 Jul 2023 17:02:32 +0000 (18:02 +0100)]
Merge pull request #28505 from bluca/vconsole_debian
vconsole-setup: don't fail with an empty keymap
Luca Boccassi [Mon, 24 Jul 2023 14:35:47 +0000 (15:35 +0100)]
mkosi: set default-keymap='' on Debian/Ubuntu
Luca Boccassi [Mon, 24 Jul 2023 14:31:02 +0000 (15:31 +0100)]
vconsole-setup: don't fail with an empty keymap
The new meson option 'default-keymap' means that by default there's always
a keymap to configure, so vconsole-setup fails. Allow to set
-Ddefault-keymap="" to disable it and skip gracefully again.
Follow-up for
f129d0e77c4c9a0e12ae38cd241cd49846844a80
Luca Boccassi [Mon, 24 Jul 2023 11:03:20 +0000 (12:03 +0100)]
NEWS: update for rc3