1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

76061 Commits

Author SHA1 Message Date
Yu Watanabe
48878074d6 test: add test cases for --volatile= with -U
For issue #34254.
2024-09-06 13:24:36 +09:00
Yu Watanabe
025be2361b nspawn: only remount /usr/ with idmap when --volatile=yes
The root directory is already mounted with a picked UID shift, hence
it is not necessary to remount with idmap. However, /usr/ is a bind-mount,
hence it must be remounted with idmap.

With this change, now '-U --volatile=yes' works fine.

Fixes #34254.
2024-09-06 13:24:12 +09:00
Yu Watanabe
2c2511aa73 nspawn: mount /var/ after remount_idmap() when --volatile=state
Previously, remount_idmap() failed as /var/ was already mounted, thus
remounting (strictly speaking, unmounting old root directory) failed
with -EBUSY.

As tmpfs /var/ is mounted with picked UID shift, it should not be
remounted with idmap, but needs to be mounted after the root directory
being remounted.

This makes '-U --volatile=state' work as expected.
2024-09-06 13:22:26 +09:00
Yu Watanabe
21cd84df69 nspawn: use strv_extend() and friends to build directories passed to remount_idmap()
No functional change, just refactoring and preparation for later change.
2024-09-06 13:13:15 +09:00
Yu Watanabe
74fe65480c
Merge pull request #34203 from yuwata/network-conf-parser
network: several cleanups for conf parser
2024-09-06 13:07:39 +09:00
Yu Watanabe
03ec7311f1
Merge pull request #34267 from DaanDeMeyer/script
mkosi: Install util-linux-script on Rawhide
2024-09-06 10:43:04 +09:00
Yu Watanabe
dd1de202d7 network/address: use log_section_warning() 2024-09-06 10:38:57 +09:00
Yu Watanabe
c6f2197fcf network/address: use generic section parser more
This also
- rename variable n -> address,
- use log_syntax_parse_error() where applicable,
- add one more assertion for lvalue in config_parse_address().
2024-09-06 10:38:15 +09:00
Yu Watanabe
6cf41d4603 network/address: introduce generic config parser for [Address] section
Then, use generic conf parsers defined in conf-parser.[ch].
2024-09-06 10:37:23 +09:00
Yu Watanabe
174c5c5f06 firewall-util: several cleanups for config_parse_nft_set()
- use log_syntax_parse_error(),
- return 1 on success,
- drop unnecessary or redundant assertions,
- add missing log_oom().
2024-09-06 10:35:02 +09:00
Yu Watanabe
ff616da459 conf-parser: introduce config_parse_uint32_invert_flag()
It is similar to config_parse_uint32_flag(), but drops the specified flag
when true.
2024-09-06 10:35:02 +09:00
Yu Watanabe
c2e8e1f020 network: align table in network-gperf 2024-09-06 10:35:02 +09:00
Yu Watanabe
e208fad798 network/address-label: use log_section_warning_errno() 2024-09-06 10:35:02 +09:00
Yu Watanabe
934cf1c06b network/address-label: introduce generic conf parser for [IPv6AddressLabel] section
This also
- renames n -> label,
- use log_syntax_parse_error().

No functional change, just refactoring.
2024-09-06 10:34:53 +09:00
Yu Watanabe
152b8a4e71 conf-parser: introduce config section parser wrapper
It will be used later.
2024-09-06 10:33:05 +09:00
Bastien Nocera
5a11437e2e hwdb: Mark Apple Wireless keyboards as not having NumLock LED
Mark those Apple Wireless keyboards as not having a NumLock key:
https://en.wikipedia.org/wiki/Apple_Wireless_Keyboard

You can see that they don't have a NumLock LED because they didn't even
have a NumLock in the first place:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fea6fe7d5ef1b5fa5f78048d4729f85181c04ca
2024-09-06 10:22:43 +09:00
Yu Watanabe
ccd62e6d4d
Merge pull request #34155 from poettering/gmtime-safe
handle gmtime_r() errors more robustly
2024-09-06 09:07:48 +09:00
A. Wilcox
d0e11b9e17 basic: Include <sys/file.h> for LOCK_* constants
This is needed to ensure LOCK_{EX,SH} are defined in certain
environments, including uclibc-ng and musl libc.
2024-09-06 08:37:25 +09:00
Yu Watanabe
a00006861b
Merge pull request #34261 from yuwata/repart-seed-random
repart: initialize seed earlier
2024-09-06 08:30:12 +09:00
A. Wilcox
79f0e94e27 edit-util: EditFileContext: avoid reserved 'stdin'
The identifier 'stdin' is reserved in C.  It can be #defined to any
statement that evaluates to a FILE*.  We do not want that for our field,
so change to a more descriptive name.
2024-09-06 08:29:45 +09:00
Peter Rajnoha
cbe65d38cf udev: allow persistent storage rules for rbd devices
The RADOS Block Device (rbd) can be used as any other block device with
further layers on top of it, hence allow the common persistent storage
rules to apply, including watching for changes.
2024-09-06 08:26:44 +09:00
Daan De Meyer
31e7a37480 mkosi: Remove rpm workaround
rpm 4.19.93 (4.20 rc) is in rawhide so let's drop the workaround.
2024-09-05 18:45:52 +02:00
Daan De Meyer
4eae2be0d7 mkosi: Install util-linux-script on Rawhide
It's now subpackaged so we can build images without pulling in
libutempter but we use script in the testsuite so let's install the
subpackage.
2024-09-05 18:38:33 +02:00
Daan De Meyer
6c8e9ba2f0
Merge pull request #34266 from DaanDeMeyer/fix
mkfs-util: Make sure we pass non option arguments last
2024-09-05 18:36:44 +02:00
Lennart Poettering
6f5cf41570 time-util: rework localtime_or_gmtime() into localtime_or_gmtime_usec()
We typically want to deal in usec_t, hence let's change the prototype
accordingly, and do proper range checks. Also, make sure are not
confused by negative times.

Do something similar for mktime_or_timegm().

This is a more comprehensive alternative to #34065

Replaces: #34065
2024-09-05 17:40:25 +02:00
Lennart Poettering
9640db13f0 hwclock-util: the struct tm parameter is not a pure return parameter, it's also an input parameter 2024-09-05 17:19:14 +02:00
Lennart Poettering
41902bacc3
Merge pull request #34256 from YHNdnzj/pid1-followup
core: follow-ups for recent PRs
2024-09-05 17:01:10 +02:00
Daan De Meyer
9b18dcf8c2 mkfs-util: Make sure we pass non option arguments last
POSIX specifies that getopt() stops parsing options when it encounters
a non-option argument, so let's make sure we pass non-option arguments
last.
2024-09-05 16:37:34 +02:00
Daan De Meyer
362efc3804 mkfs-util: Fix error handling 2024-09-05 16:12:36 +02:00
Lennart Poettering
e3cd748e7c update TODO 2024-09-05 15:56:28 +02:00
Yu Watanabe
fe6049d021 test: fix indentation 2024-09-05 18:01:42 +09:00
Yu Watanabe
56d6ebd404 test: add test case for systemd-repart --seed=random
For issue #34257.
2024-09-05 18:01:42 +09:00
Lennart Poettering
548b744b7b
Merge pull request #34235 from yuwata/firstboot-systemctl-trivial-cleanups
firstboot,systemctl: trivial cleanups
2024-09-05 09:22:54 +02:00
Yu Watanabe
b8a8000aba repart: initialize seed earlier
As the seed is used by context_load_partition_table() -> derive_uuid().

Fixes #34257.
2024-09-05 15:49:24 +09:00
Yu Watanabe
8d78191a46 man: ARP=no also disables IPv6 Neighbor Discovery Protocol
Addresses https://github.com/systemd/systemd/issues/18063#issuecomment-2323410288.
2024-09-05 10:20:18 +09:00
Yu Watanabe
3ce22ee7f8
Merge pull request #34090 from DaanDeMeyer/cow-fix
Rework COW <=> NOCOW copying behavior
2024-09-05 10:19:49 +09:00
Michael Ferrari
87e0eafe03 firstboot: reduce log level of timezone validation
An error message is already printed directly after, so the user already
knows that the validation failed. This also isn't done for the other
validation functions.
2024-09-05 10:08:42 +09:00
Michael Ferrari
3f084827ff firstboot: reduce empty input log level
The user knows they pressed `Enter`, no need to inform them again about
that they skipped the prompt.
2024-09-05 10:08:42 +09:00
Michael Ferrari
b7c0d924bd firstboot: add newline before key wait
When sd-firstboot is ran during first boot of a new system this missing
newline leads to a bootup message being appended on the same line as the
message instructing to press a key.
2024-09-05 10:08:38 +09:00
Yu Watanabe
c47f2a26b0 test: add test cases of "systemctl cat" for nonexistent units 2024-09-05 10:08:03 +09:00
Ivan Shapovalov
b498f250b2 systemctl: cat: do not exit(1) on missing units if --force
We are eating the error message if `--force` is set, so do not return
a non-zero exit code either.
2024-09-05 10:08:03 +09:00
Yu Watanabe
1306567a40
Merge pull request #34212 from YHNdnzj/recvmsg-safe-trunc
tree-wide: handle MSG_TRUNC with recvmsg_safe()
2024-09-05 07:22:28 +09:00
Mike Yuan
7a9f0125bb
core: rename BindJournalSockets= to BindLogSockets=
Addresses https://github.com/systemd/systemd/pull/32487#issuecomment-2328465309
2024-09-04 21:44:25 +02:00
Mike Yuan
cc4f736ae3
core/namespace: add comment to explain the non-obvious assumption on /run/systemd/journal/
Follow-up for 119820f8ab

Addresses https://github.com/systemd/systemd/pull/32487#discussion_r1743493196
2024-09-04 21:44:25 +02:00
Mike Yuan
95f9e85aaa
core/namespace: make bind mounted journal sockets nosuid + noexec + nodev
Addresses https://github.com/systemd/systemd/pull/32487#discussion_r1743464797
2024-09-04 21:44:24 +02:00
Mike Yuan
7583859ba8
core/exec-invoke: use bind_mount_add() where appropriate 2024-09-04 21:44:24 +02:00
Mike Yuan
432aab24b0
core/namespace: use GREEDY_REALLOC at one more place 2024-09-04 21:44:24 +02:00
Mike Yuan
7f2a7ccf7d
core/unit: introduce unit_set_debug_invocation()
Given that debug_invocation is a Unit thing, make
service_set_debug_invocation() generic. Plus, don't
say "Service failed", as it would be spurious when
Restart=always.
2024-09-04 21:37:20 +02:00
Mike Yuan
40233f70cc
core: add missing serialization for Unit.debug_invocation
Follow-up for 7d8bbfbe08
2024-09-04 21:37:20 +02:00
Mike Yuan
7e6ef4340b
core/service: modernize service_load_pid_file() a bit 2024-09-04 21:37:20 +02:00