Commit graph

72222 commits

Author SHA1 Message Date
dependabot[bot] 427dbbab8c build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 31af101620fc2996517d87e86da310f7ba553d58 to 4dfdf98ed2877a1e40f37234e0b8fbba0fec3584.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](31af101620...4dfdf98ed2)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 12:38:00 +02:00
Daan De Meyer 42e2ec23f4 mkosi: Use '-' instead of '.' to separate upstream version and debian revision
The debian revision starts after the '-' character, so make sure the
timestamp we append is treated as the revision instead of being a part
of the upstream version.
2024-04-02 12:31:34 +02:00
dependabot[bot] 34b130faaa build(deps): bump pkg/debian from 44fe1d4 to e780b50
Bumps pkg/debian from `44fe1d4` to `e780b50`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 11:37:01 +02:00
Mike Yuan 9c96ffe003
man/tmpfiles.d: drop doubled space 2024-04-02 17:12:55 +08:00
Eisuke Kawashima 86f36e87ff doc(tmpfiles.d): remove deprecated F type
close #32044
2024-04-02 02:46:19 +01:00
Mike Yuan 8959e17d73 core/service: ensure we don't restart on SERVICE_SKIP_CONDITION
service_shall_restart() always returns false if result
is SERVICE_SKIP_CONDITION, so drop unreachable code.
2024-04-01 19:14:15 +08:00
dependabot[bot] 76dddd6323 build(deps): bump redhat-plumbers-in-action/differential-shellcheck
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](b9df2a9417...c15070885a)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:11:52 +02:00
Burak Gerz 911e2d479e sysupdate: print assumed value
The MatchPattern= in Target specification is documented as mandatory,
but if not defined sysupdate will assume the same value as definied
in Source specification and continue execution. Print this
assumptions to the user
2024-03-31 23:41:08 +01:00
Daan De Meyer cde08933a9 Fix assertion in socknameinfo_pretty() 2024-03-31 23:40:38 +01:00
Daan De Meyer 5afea28add mkosi: Update centos to latest
Due to dependabot and pagure not playing nice with each other, we're
going to have to update this one manually for a while.

See https://github.com/systemd/systemd/issues/31773
2024-03-31 23:09:11 +02:00
Daan De Meyer 3799fa803e repart: Add DefaultSubvolume= setting
We already have Subvolumes= to create subvolumes, let's add
DefaultSubvolume= as well to set the default subvolume.
2024-03-30 00:08:12 +00:00
Adrian Vovk e50bfc89ce manager: Freeze/Thaw: Don't fail units w/o cgroup
Previously, it was impossible to freeze or thaw a slice if it is an
ancestor to a unit that had no running cgroup (i.e. a service with
RemainAfterExit=yes). Instead of failing with EBUSY (which would
confusingly get reported as "Unit has pending job") we just silently
no-op.

I noticed this because we now have user-runtime-dir@.service, which
would make it impossible to freeze/thaw user.slice or user-<UID>.slice
2024-03-30 02:58:53 +08:00
Luca Boccassi a7f2019055
Merge pull request #32010 from bluca/reexec_rate_limit
core: serialize reload rate limit and apply ReloadLimit to reexec too
2024-03-29 17:16:36 +00:00
Daan De Meyer e5cd051724 mkosi: Switch to linux-virtual on Ubuntu
This now finally has support for credentials and erofs so let's switch
to this much smaller kernel package that doesn't pull in linux-firmware.
2024-03-29 15:58:13 +01:00
Yu Watanabe 03b6879f4d udevadm-test: prettify test results 2024-03-29 12:44:11 +00:00
Luca Boccassi 8312b17a29 core: apply ReloadLimit to reexec too
Same reason as the reload, reexec is disruptive and it requires the
same privileges, so if somebody wants to limit reloads, they'll also
want to limit reexecs, so use the same setting.
2024-03-29 12:03:32 +00:00
Luca Boccassi 9b1db2dbc4 core: serialize reload rate limit
Otherwise the rate limit is lost on reexec, and the privileges to call it
are the same as reloads
2024-03-29 12:03:32 +00:00
Daan De Meyer f2c946f872
Merge pull request #32013 from yuwata/align-table
core: align table
2024-03-29 08:30:59 +01:00
Yu Watanabe 0966933b3d unit-def: append trailing comma for the last entry 2024-03-29 13:53:01 +09:00
Yu Watanabe 17f6b64038 core: align table 2024-03-29 13:51:15 +09:00
Yu Watanabe fee6510667
Merge pull request #31998 from yuwata/udev-event-mode
udev: make udevadm test and test-builtin not destructive
2024-03-29 11:31:58 +09:00
Luca Boccassi 55c1a411c6 portable: the 'flags' parameter is now used in DetachImageWithExtensions() and ReattachImageWithExtensions() 2024-03-29 09:35:45 +09:00
Yu Watanabe 089bef6631 udev: make udevadm test and test-builtin not destructive
Previously, 'udevadm test' performs not only processing udev rules,
but made several destructive change on the system; updating udev
database, device node permission, devlinks, network interface
properties, and so on.

Similary, 'udevadm test-builtin' may perform something destructive,
especially by 'keyboard', 'kmod', and 'net_setup_link' builtins.

Let's make these commands and test executables not change device
configurations.
2024-03-29 09:33:07 +09:00
Yu Watanabe adfc608578
Merge pull request #31986 from YHNdnzj/suspend-mem-mode
sleep: add SleepMemMode= setting for configuring /sys/power/mem_sleep
2024-03-29 09:30:54 +09:00
Ronan Pigott 64761f38cc network: save the real rdnss address
... instead of the router that informed us

Fixes: 86a66e9b95 ("network: also save NTP servers and friends obtained by other protocols")
2024-03-29 09:30:42 +09:00
Frantisek Sumsal 607be850b9 test: make coverage runs happy with capsule@.service
capsule@.service uses DynamicUser=yes, so let's use the same tweak we
use for other such units.
2024-03-28 23:29:46 +00:00
Daan De Meyer 838235be87 login: Fix fallback error handling 2024-03-28 21:24:54 +01:00
Yu Watanabe e4c7dc9418 test: disable IPv6AcceptRA= for test network interfaces with static address
This hopefully improves test performance.
2024-03-28 12:37:45 +00:00
Luca Boccassi 166cb4c3ee
Merge pull request #31994 from yuwata/network-dhcp-server-follow-ups
network: several fixlets for PersistLeases=
2024-03-28 12:35:13 +00:00
Yu Watanabe ff944339f3 ndisc-option: allow to set valid time of options
When an option is delegated from an upstream server, its lifetime
may be limited by a time. Such functionality will be used later by
sd-radv.

This also remove 'offset' argument from the option setter
ndisc_option_set_xyz(), and make it update existing option.
See comments in ndisc_option_add_link_layer_address() for more details.
2024-03-28 12:34:09 +00:00
Yu Watanabe af41f9f8ad journalctl-filter: use add_match_boot_id() instead of add_match_this_boot()
The function add_match_this_boot() calls sd_journal_add_conjunction(),
hence, we cannot specify multiple devices in the extra match arguments,
e.g., "journalctl /dev/sda /dev/sdb" shows no entry.
2024-03-28 12:28:17 +00:00
Mike Yuan a2124b35e9
sleep: add SleepMemMode= setting for configuring /sys/power/mem_sleep
The setting is used when /sys/power/state is set to 'mem'
(common for suspend) or /sys/power/disk is set to 'suspend'
(hybrid-sleep). We default to kernel choice here, i.e.
respect what's set through 'mem_sleep_default=' kernel
cmdline option.
2024-03-28 17:19:35 +08:00
Mike Yuan b786128322
sleep: make write_mode take a path
Similar to the previous commit, preparation
for adding support for /sys/power/mem_sleep.
2024-03-28 17:16:25 +08:00
Mike Yuan b0e3b85a7c
sleep-config: make sleep_mode_supported take a path
Preparation for later commits.
2024-03-28 17:16:25 +08:00
Mike Yuan f8c700791e
string-util: modernize string_contains_word_strv a bit
Also correct the comment on flags.
2024-03-28 17:16:25 +08:00
Mike Yuan a6fe020ab8
sleep-config: fix potential memory leak
Follow-up for 77bd39385e
2024-03-28 17:16:24 +08:00
Mike Yuan 0a3fd5ce43
man/systemd-sleep: reorder options 2024-03-28 17:16:24 +08:00
Mike Yuan 792dd6f46c
sleep-config: make sleep_operation_is_hibernation uppercase 2024-03-28 17:16:21 +08:00
Yu Watanabe a7541703b9 udev-event: split out update_clone()
No functional change, preparation for later commits.
2024-03-28 14:49:34 +09:00
Adrian Vovk 1eba24dac4 homed: Release(): fix assertion failure
This fixes a race condition crash in homed that would happen in the
following sequence of events:

1. Client 1 takes a ref on the home area
2. Client 1 calls some method via dbus
3. Client 2 calls Release()

In homed, the Release() would check if a ref is still held (in this
case: yes it is) and returns an error. Except that is done through a
code-path that asserts that no operations are ongoing. In this case,
it's valid to have an ongoing operation, and so the assertion fails
causing homed to crash.
2024-03-28 13:35:37 +09:00
Luca Boccassi ed35851693 run: fix generated unit name clash after soft-reboot
When sd-run connects to D-Bus rather than the private socket, it will
generate the transient unit name using the bus ID assigned by the D-Bus
broker/daemon. The issue is that this ID is only unique per D-Bus run,
if the broker/daemon restarts it starts again from 1, and it's a simple
incremental counter for each client.
So if a transient unit run-u6.service starts and fails, and it is not
collected (default on failure), and the system soft-reboots, any new
transient unit might conflict as the counter will restart:

Failed to start transient service unit: Unit run-u6.service was already loaded or has a fragment file.

Get the soft-reboot counter, and if it's greater than zero, append it
to the autogenerated unit name to avoid clashes.
2024-03-28 11:19:46 +09:00
Yu Watanabe 2a4fb037cb
Merge pull request #31989 from mrc0mmand/test-loop-dev-check
test: check for /dev/loop-control when checking lodev availability
2024-03-28 11:19:32 +09:00
Yu Watanabe 74158eec0e
Merge pull request #31963 from yuwata/journalctl-authenticate-cleanups
journalctl-authenticate: several cleanups
2024-03-28 11:19:21 +09:00
Yu Watanabe bc91875ae5 test-network: add test cases for PersistLeases=no 2024-03-28 11:16:17 +09:00
Yu Watanabe 38b4ecf789 network: make [DHCPServer] in networkd.conf work
Follow-up for a3ed665a29.

Fixes https://github.com/systemd/systemd/pull/31977#discussion_r1542196572.
2024-03-28 11:15:53 +09:00
Yu Watanabe 1fadd9a357 network: fix typo
Follow-up for a3ed665a29.
2024-03-28 10:38:04 +09:00
Yu Watanabe 5e4aad5e96
Merge pull request #31985 from DaanDeMeyer/mkosi
mkosi: Copy built packages to output directory
2024-03-28 10:21:34 +09:00
Yu Watanabe a128119a1d timedate: fix typo
Follow-up for 3a51e31be9.
2024-03-28 09:55:11 +09:00
Yu Watanabe 66a0fdcaa5 journalctl-authenticate: return earlier if we are not on a TTY
No functional change, just refactoring.
2024-03-28 09:40:34 +09:00
Yu Watanabe ef277c961f journalctl-authenticate: use open_tmpfile_linkable() and link_tmpfile()
This also
- use path_join(),
- rename variables to more descriptive names.
2024-03-28 09:38:10 +09:00