Commit Graph

65791 Commits

Author SHA1 Message Date
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
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
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