Commit graph

72537 commits

Author SHA1 Message Date
Luca Boccassi 383917ac67 man: add self-contained example of notify protocol
We are saying in public that the protocl is stable and can be easily
reimplemented, so provide an example doing so in the documentation,
license as MIT-0 so that it can be copied and pasted at will.
2024-04-02 14:53:31 +01:00
Luca Boccassi 5aa8180392 man: document that using sd_journal APIs might cause dlopen to happen 2024-04-02 14:53:31 +01:00
Luca Boccassi bcb353bc79
Merge pull request #32042 from YHNdnzj/implicit-mounts-for
units: remove one implicit RequiresMountsFor=
2024-04-02 13:24:56 +01:00
Daan De Meyer 4c10a89ec1 debug-generator: Drop unnecessary include 2024-04-02 12:55:59 +02:00
Daan De Meyer 36e8ba9bcf debug-generator: Use arg_dest instead of argument 2024-04-02 12:55:59 +02:00
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 e3783068c6
core/mount: if mount is gone eventually, consider it success
Currently, if unmount initiated by us fails, we record
that in result. Later, if we tried again and succeeded,
or someone else successfully unmounted it, the unit
state is still considered failed. Let's be more tolerant
instead, and forget about previous failure.

Alternative to #32002
2024-04-02 17:16:04 +08:00
Mike Yuan 9c7c3d9cdb
core/mount: if unmount retries exceeded max, record as failure 2024-04-02 17:15:22 +08: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 4f156b1078
units: remove implicit RequiresMountsFor= 2024-04-01 19:44:51 +08:00
Mike Yuan 5e7022033f
core/unit: use FOREACH_ARRAY at one more place 2024-04-01 19:42:02 +08: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
Luca Boccassi 373a1e47b2 portable: fix 'portablectl list' to show the actual state for extensions
When listing images they are inspected one by one, so in case of a
portable with extensions they always resulted as not found.
Allow a partial match when listing, so that we can find the appropriate
unit that an image belongs to, and list the correct state as attached.
2024-03-28 14:20:20 +00:00
Luca Boccassi 1cbb792763 Ensure that a portable is not detached when another portable that shares the same base is detached
The matches line includes all images, but the logic returned
immediately with a successful match if the first element matches.
2024-03-28 14:20:20 +00:00
Luca Boccassi 37543971af os-util: allow matching versioned image with extension-release file
Currently app_1.0.raw is refused if it contains extension-release.d/extension-release.app,
which stops one from using versioned images without using the force flag to disable
the check. Relax it so that only the actual name, and not the version, is compared, like
it already happens in other places.
2024-03-28 14:20:20 +00: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