Commit Graph
65809 Commits
Author SHA1 Message Date
Yu Watanabe 62eaf8d039 test-network: drop ExecReload= in networkd.service and udevd.service
Follow-up for 0e07cdb0e7 and
f84331539d.
2023-07-06 14:55:58 +09:00
Yu Watanabe 2c5bca1734 network/ndisc: downgrade log level
The failures may be critical for per-link operation, but not critical
for the service.
2023-07-06 14:55:58 +09:00
Yu Watanabe 64de00c49f network: handle captive portal with multiple routers
Before this patch, if a network has multiple routers and one of them
provides a captive portal, then the portal was overwritten or cleared
when another RA from another router is received.

This makes captive portals managed in the similar way as DNS servers or
DNS domains. So now captive portal can safely handled even if a network
has multiple routers.
2023-07-06 14:55:58 +09:00
Yu Watanabe 04eaf63c66 network: update comment 2023-07-06 14:55:58 +09:00
Yu Watanabe 6341ea5467 network: introduce link_get_captive_portal()
Then, downgrade log level of the message about mis-match of captive
portals in different protocols.
2023-07-06 14:55:46 +09:00
Lennart Poettering 6c1d10fe03 update syscall tables for upcoming v254 2023-07-05 23:18:16 +02:00
Lennart Poettering 61905882c9 update hwdb autosuspend data for v254 2023-07-05 23:18:16 +02:00
Lennart Poettering 4560f9821b meson: run forgotten 'update-man-rules' 2023-07-05 23:18:16 +02:00
Luca Boccassi 9d54e578f7 Merge pull request #28258 from poettering/boot-feature-catchup
sd-boot/sd-stub boot feature flag catchup
2023-07-05 21:40:43 +01:00
Luca Boccassi 79be4b7da8 Merge pull request #28255 from yuwata/sd-device-fix-clone
sd-device: fix device_clone_with_db()
2023-07-05 21:38:52 +01:00
Frantisek Sumsal ba4a1cd8a8 test: replace readfp() with read_file()
ConfigParser.readfp() has been deprecated since Python 3.2 and was
dropped completely in Python 3.11.
2023-07-05 21:38:24 +01:00
Lennart Poettering c75f81292d hwdb update for v246-rc1 2023-07-05 22:00:38 +02:00
Lennart Poettering 983d621e11 hostname-setup: don't pass "true" to a flags parameter 2023-07-06 03:10:31 +08:00
Mike Yuan 3121374ca4 Merge pull request #28252 from yuwata/journal-open-machine
journal: introduce journal_open_machine()
2023-07-06 03:08:18 +08:00
Lennart Poettering e987d54baf boot: make LoaderType enum less special
Usually (but not always) we use uppercase type naming, and do a typedef
for enums like this. Do so here too.
2023-07-05 17:54:59 +02:00
Lennart Poettering 3a59c55f67 boot: rename entry_count → n_entries
While we don't strictly follow the rule, most of our userspace names
these fields that count entries in some array n_xyz, hence let's do so
in the EFI boot code too, to make things less special.
2023-07-05 17:54:59 +02:00
Lennart Poettering 92bb46c464 efi: add a bunch of reported EFI loader/stub feature flags
We gained a bunch of new features that deserve reporting to userspace,
hence add matching flags for each.

This allows userspace to determine if installing addons in the ESP even
makes sense.

This is inspired by a similar changes in #28057
2023-07-05 17:54:59 +02:00
Yu Watanabe 7050d928be journal-upload: add missing assertion 2023-07-06 00:06:25 +09:00
Yu Watanabe 5c6673afab journal-upload: replace deprecated sd_journal_open_container() 2023-07-06 00:06:25 +09:00
Yu Watanabe 2ec1fb31e9 journal-util: extract journal_open_machine() from journalctl 2023-07-06 00:06:25 +09:00
Yu Watanabe 4a45a2e0e3 sd-journal: introduce SD_JOURNAL_TAKE_DIRECTORY_FD flag for sd_journal_open_directory_fd()
If it is called with the flag, then the provided file descriptor will be
owned by the sd_journal object, and will be closed in sd_journal_close().
2023-07-06 00:06:20 +09:00
Yu Watanabe beebaeeb3f test: change partition label to test if the outdated devlinks are removed
The change is intended to reproduce the issue #27983, though the
original issue is highly racy, and the test does not reproduce it
reliably. But, anyway, it is better to change the partition label to
test the devlink removal.
2023-07-05 23:46:01 +09:00
Yu Watanabe 35e49f2856 sd-device: do not read uevent file in device_clone_with_db()
Follow-up for 381f6d4ba5.

When the function is called, the device may be already removed, and
another device has the same syspath. Such situation can occur when a
partition removed and another is created. In that case, the sysfs paths
of the removed and newly created partitions can be same, but their
devnums are different, and thus the database files corresponding to the
devices are also different.

Fixes #27981.
2023-07-05 23:45:57 +09:00
Lennart Poettering 529ba8a1a3 Merge pull request #26844 from YHNdnzj/propagate-stop-fixup
core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=
2023-07-05 15:56:21 +02:00
Luca Boccassi 11d797d3b9 Merge pull request #28207 from poettering/initrd-creds
various credential improvements (including initrd creds, creds in generators, fstab + getty creds)
2023-07-05 10:29:33 +01:00
Lennart Poettering 7b8e55772c Merge pull request #28253 from yuwata/hwdb-follow-up
hwdb: several cleanups
2023-07-05 10:40:44 +02:00
Yu Watanabe 051c0f8926 Merge pull request #28228 from yuwata/repart-free-area
repart: fix free area calculation
2023-07-05 16:36:16 +09:00
Yu Watanabe 6750c1af24 unit: also condition out systemd-backlight in initrd
Follow-up for 9173d31dfea5c2b05ff08480972c499cb7aac940.

The systemd-backlight@.service also save/restore state but the data
is in /var/.
2023-07-05 09:01:27 +02:00
Lennart Poettering 49c55abcbe units: condition out a few services in the initrd
Let's make our units more robust to being added to an initrd:

1. systemd-boot-update only makes sense if sd-boot is available in /usr/
   to copy into the ESP. This is generally not the case in initrds, and
   even if it was, we shouldn't update the ESP from the initrd, but from
   the host instead.

2. The rfkill services save/restore rfkill state, but that information
   is only available once /var/ is mounted, which generally happens
   after the initrd transition.

3. utmp management is partly in /var/, and legacy anyway, hence don't
   bother with it in the initrd.
2023-07-05 10:58:47 +09:00
Yu Watanabe 937625c7c7 test: update test for free area calculation in repart 2023-07-05 10:40:56 +09:00
Yu Watanabe d2eb1f8145 repart: fix free area calculation
Like fdisk_get_last_lba(), fdisk_partition_get_end() return the last
sector in the partition.

Fixes #28225.
2023-07-05 10:40:56 +09:00
Yu Watanabe beba8f2e1e test: add reproducer for issue #28225 2023-07-05 10:40:53 +09:00
Yu Watanabe 495f387c27 hwdb: make matching modalias for Archos 101 Cesium Educ more strict
Follow-up for 41f34dcf3b.
2023-07-05 10:38:00 +09:00
Yu Watanabe 65d7d832a9 hwdb: merge multiple keyboard entries with same setting
Follow-up for 123c0e24dd.

Note, the entry was originally added for IdeaPad Flex 5 in
21b589a155.
Then, a bug introduced by 19db450f3a.
But, when it was fixed by 738a195bd5,
the glob becomes too stricter, and another variant was added by
123c0e24dd.
2023-07-05 10:34:04 +09:00
Yu Watanabe f94b944bf5 hwdb: drop trailing white space
Follow-up for 4687f001e6.
2023-07-05 10:22:13 +09:00
Yu Watanabe 12fff85d55 journal-upload: make --namespace=* work
Follow-up for 9f6e0bd417.

Note that sd_journal_open() is a simple wrapper of sd_journal_open_namespace(),
hence we can merge the two branch.
2023-07-05 09:21:24 +09:00
Mike Yuan 5db456d065 test: add test cases for issue #26839 in TEST-03-JOBS 2023-07-05 08:15:35 +08:00
Mike Yuan 48cb073db8 core: introduce UNIT_ATOM_PROPAGATE_STOP_GRACEFUL for PropagatesStopTo=
Follow-up for 017a7ba4f4

Before this commit, when a unit that is restarting propagates stop
to other units, it can also depend on them, which results in
job type conflict and thus failure to pull in the dependencies.

So, let's introduce a new dependency atom UNIT_ATOM_PROPAGATE_STOP_GRACEFUL,
and use it for PropagatesStopTo=. It will enqueue a restart job if
there's already a start job, which meets the ultimate goal and avoids
job type conflict.

Fixes #26839
2023-07-05 08:15:35 +08:00
Mike Yuan 87d17581af core/transaction: return early when appropriate to reduce nesting 2023-07-05 08:15:34 +08:00
Mike Yuan e9bd185316 man/systemctl: document --job-mode=restart-dependencies
Follow-up for 09d04ad325
2023-07-05 08:15:34 +08:00
Lennart Poettering aafd429ca7 update TODO 2023-07-04 23:20:33 +02:00
Lennart Poettering de70ecb328 import-creds: add support for binary credentials specified on the kernel cmdline 2023-07-04 23:19:48 +02:00
Lennart Poettering 49850c1ee3 man: document where PID 1 imports credentials from 2023-07-04 23:18:59 +02:00
Lennart Poettering 771c76294a man: document how credentials are passed into generators 2023-07-04 23:18:11 +02:00
Lennart Poettering df5f51c3fe doc: document inird credentials + and how to consume credentials in generators
(as well as various other fixes)
2023-07-04 23:17:17 +02:00
Lennart Poettering 3ed075cf61 generator: run various generators only run on the host, not in initrd
These 5 generators only make sense on the host,not in the initrd, hence
if they end up in the initrd anyway, make them exit quickly.
2023-07-04 23:15:36 +02:00
Lennart Poettering 53888c3393 test: verify that the getty generator with creds works 2023-07-04 23:14:21 +02:00
Lennart Poettering fd2de366e1 getty-generator: minor modernizations 2023-07-04 23:12:38 +02:00
Lennart Poettering cdd133b3dd getty-generator: allow configuring additional gettys via credentials 2023-07-04 23:11:03 +02:00
Lennart Poettering 51235f2fe6 test: add simple fstab credential test 2023-07-04 23:09:39 +02:00