]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
15 months agosd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout() 34139/head
Yu Watanabe [Mon, 26 Aug 2024 21:23:43 +0000 (06:23 +0900)] 
sd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout()

Follow-up for bab889c51e888c1b288fed253c349e979a6cf31a (#33032).

Currently, they unconditionally returns EPOLLIN and USEC_INFINITY, respectively.
Just for consistency with sd-bus, sd-journal, sd-varlink, and so on. All
they have _get_fd(), _get_events(), and _get_timeout().

Closes #34094.

15 months agotest: use more suitable assertions
Yu Watanabe [Mon, 26 Aug 2024 21:22:19 +0000 (06:22 +0900)] 
test: use more suitable assertions

15 months agosd-varlink: make the argument type consistent with header
Yu Watanabe [Mon, 26 Aug 2024 21:29:15 +0000 (06:29 +0900)] 
sd-varlink: make the argument type consistent with header

15 months agostub: restore random seed update logic
Vitaly Kuznetsov [Tue, 27 Aug 2024 10:51:45 +0000 (12:51 +0200)] 
stub: restore random seed update logic

Commit 201e0d53bdd43 ("stub: split out random seed part out of run()")
looks like refactoring but apparently it changed the logic when random
seed is refreshed in the ESP completely. Previously, process_random_seed()
was called when either:
- sd-stub was not present (LoaderFeatures var is unset) OR
- sd-stub was present but EFI_LOADER_FEATURE_RANDOM_SEED flag was unset.
Post-change, refresh_random_seed() bails under the exact same conditions (no
sd-stub or EFI_LOADER_FEATURE_RANDOM_SEED is unset) and thus
process_random_seed() is NOT called.

Restore the original logic. efivar_get_uint64_le()'s return value doesn't
require checking: loader_features is initialized to 0 and in case of failure it
stays untouched.

15 months agovmspawn: fix duplicate logging on oom
Lennart Poettering [Tue, 27 Aug 2024 10:37:56 +0000 (12:37 +0200)] 
vmspawn: fix duplicate logging on oom

15 months agoMerge pull request #33570 from AdrianVovk/sysupdate-incomplete
Adrian Vovk [Tue, 27 Aug 2024 17:04:02 +0000 (13:04 -0400)] 
Merge pull request #33570 from AdrianVovk/sysupdate-incomplete

sysupdate: Handle incomplete versions

15 months agoexec-invoke: remove redundant empty lines
Lennart Poettering [Tue, 27 Aug 2024 10:37:13 +0000 (12:37 +0200)] 
exec-invoke: remove redundant empty lines

15 months agoservice: add 'debug' option to RestartMode=
Luca Boccassi [Fri, 26 Jul 2024 18:07:23 +0000 (19:07 +0100)] 
service: add 'debug' option to RestartMode=

One of the major pait points of managing fleets of headless nodes is
that when something fails at startup, unless debug level was already
enabled (which usually isn't, as it's a firehose), one needs to manually
enable it and pray the issue can be reproduced, which often is really
hard and time consuming, just to get extra info. Usually the extra log
messages are enough to triage an issue.

This new option makes it so that when a service fails and is restarted
due to Restart=, log level for that unit is set to debug, so that all
setup code in pid1 and sd-executor logs at debug level, and also a new
DEBUG_INVOCATION=1 env var is passed to the service itself, so that it
knows it should start with a higher log level. Once the unit succeeds
or reaches the rate limit the original level is restored.

15 months agoMerge pull request #34114 from yuwata/resolvconf-p
Luca Boccassi [Tue, 27 Aug 2024 10:18:34 +0000 (11:18 +0100)] 
Merge pull request #34114 from yuwata/resolvconf-p

resolve: support 'resolvconf -p'

15 months agocore-varlink: add missing runtime scope check for manager_varlink_managed_oom_connect()
Mike Yuan [Mon, 26 Aug 2024 14:44:00 +0000 (16:44 +0200)] 
core-varlink: add missing runtime scope check for manager_varlink_managed_oom_connect()

Follow-up for 2250c996cfc41afb30cd086adeed18fd41a683ba

15 months agoMerge pull request #34124 from YHNdnzj/socket-accept-name
Yu Watanabe [Tue, 27 Aug 2024 03:11:20 +0000 (12:11 +0900)] 
Merge pull request #34124 from YHNdnzj/socket-accept-name

core: honor FileDescriptorName= too for Accept=yes sockets, plus several other cleanups

15 months agoNEWS: mention "resolvconf -p" 34114/head
Yu Watanabe [Mon, 26 Aug 2024 20:42:34 +0000 (05:42 +0900)] 
NEWS: mention "resolvconf -p"

15 months agotest: add more test cases for resolvconf
Yu Watanabe [Sat, 24 Aug 2024 21:54:00 +0000 (06:54 +0900)] 
test: add more test cases for resolvconf

15 months agoresolvconf: disable default route when -p is specified
Yu Watanabe [Sat, 24 Aug 2024 01:37:30 +0000 (10:37 +0900)] 
resolvconf: disable default route when -p is specified

Internally, the switch triggers 'resolvectl default-route INTERFACE no'.

Closes #34112.

15 months agoresolvconf: clear domains if nothing specified
Yu Watanabe [Mon, 26 Aug 2024 20:21:41 +0000 (05:21 +0900)] 
resolvconf: clear domains if nothing specified

15 months agoresolvectl: make enum name consistent with the option name
Yu Watanabe [Sat, 24 Aug 2024 01:01:10 +0000 (10:01 +0900)] 
resolvectl: make enum name consistent with the option name

15 months agopo: Translated using Weblate (Slovenian)
Martin Srebotnjak [Mon, 26 Aug 2024 19:38:32 +0000 (21:38 +0200)] 
po: Translated using Weblate (Slovenian)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main

15 months agoresolved: clear the AD bit for bypass packets
Ronan Pigott [Mon, 26 Aug 2024 08:39:20 +0000 (01:39 -0700)] 
resolved: clear the AD bit for bypass packets

When the bypass logic is invoked, such as for queries to the stub with
the DO bit set, be certain to clear the AD bit in the reply before
forwarding it if the answer is not known to be authentic.

15 months agorepart: Use streq_ptr() in one more place
Daan De Meyer [Mon, 26 Aug 2024 10:18:37 +0000 (12:18 +0200)] 
repart: Use streq_ptr() in one more place

15 months agoman: document "web" session type
Allison Karlitskaya [Mon, 26 Aug 2024 08:32:47 +0000 (10:32 +0200)] 
man: document "web" session type

This has been supported since e9e74f28d783 but never got documented.
Add it to the man pages (plus one comment in a header).

Closes #34127.

15 months agocrash-handler: Add back notice log message
Daan De Meyer [Mon, 26 Aug 2024 10:02:30 +0000 (12:02 +0200)] 
crash-handler: Add back notice log message

Fixes https://github.com/systemd/systemd/pull/33959#discussion_r1730987738

15 months agoupdate TODO
Lennart Poettering [Tue, 20 Aug 2024 08:28:38 +0000 (10:28 +0200)] 
update TODO

15 months agounits: don't set LISTEN_FDNAMES for varlink services explicitly 34124/head
Lennart Poettering [Thu, 22 Aug 2024 09:49:25 +0000 (11:49 +0200)] 
units: don't set LISTEN_FDNAMES for varlink services explicitly

Now that FileDescriptorName= is properly honored by Accept=yes sockets,
this explicit override is pointless.

15 months agocore: honor FileDescriptorName= too for Accept=yes sockets
Mike Yuan [Sun, 25 Aug 2024 21:21:47 +0000 (23:21 +0200)] 
core: honor FileDescriptorName= too for Accept=yes sockets

So far we manually hardcoded $LISTEN_FDNAMES to "varlink" in various
varlink service units we ship, even though FileDescriptorName=varlink
is specified in associated socket units already, because
FileDescriptorName= is currently silently ignored when combined with
Accept=yes. Let's step away from this, which seems saner.

Note that this is technically a compat break, but a mostly negligible
one as there shall be few users setting FileDescriptorName= but
still expecting LISTEN_FDNAMES=connection in the actual executable.

Preparation for #34080

15 months agomkosi: Stop using git commit timestamps for package releases
Daan De Meyer [Mon, 26 Aug 2024 11:08:25 +0000 (13:08 +0200)] 
mkosi: Stop using git commit timestamps for package releases

This prevents bisecting to figure out which commit broke something
as when going backwards the git commit timestamp will be older meaning
package managers will refuse to upgrade to the "older" version. Let's
make sure the release is always newer by using the current date unless
$SOURCE_DATE_EPOCH is set.

15 months agocore: move check for combination of PAMName= + KillMode= to unit_verify_contexts()
Mike Yuan [Sun, 25 Aug 2024 21:42:07 +0000 (23:42 +0200)] 
core: move check for combination of PAMName= + KillMode= to unit_verify_contexts()

While at it, allow "mixed" for all unit types too, i.e.
also apply ebc2259da1d1579347b86fc2ebca9f96334b6f22 to
socket/mount/swap units.

15 months agocore/socket: refuse MaxConnection=0 for Accept=no sockets too
Mike Yuan [Sun, 25 Aug 2024 21:30:47 +0000 (23:30 +0200)] 
core/socket: refuse MaxConnection=0 for Accept=no sockets too

This makes no sense at all, and we already refuse such setting
for Accept=yes sockets. I see no reason not to extend this to
Accept=no ones.

15 months agocore/socket: use UNIT_ISSET rather than _DEREF where suitable
Mike Yuan [Sun, 25 Aug 2024 21:29:26 +0000 (23:29 +0200)] 
core/socket: use UNIT_ISSET rather than _DEREF where suitable

15 months agoMerge pull request #34117 from yuwata/network-routing-policy-rule
Luca Boccassi [Mon, 26 Aug 2024 11:08:26 +0000 (12:08 +0100)] 
Merge pull request #34117 from yuwata/network-routing-policy-rule

network: introduce generic conf parser for [RoutingPolicyRule] section

15 months agoman: reword about default route for DNS traffic
Yu Watanabe [Tue, 20 Aug 2024 18:24:06 +0000 (03:24 +0900)] 
man: reword about default route for DNS traffic

DefaultRoute is a D-Bus property, not a valid setting name in .network
files nor resolved.conf.
Whether a link is the default route or not is configured with
DNSDefaultRoute= setting in .network files.

15 months agoMerge pull request #34120 from weblate/weblate-systemd-main
Yu Watanabe [Sun, 25 Aug 2024 12:28:53 +0000 (21:28 +0900)] 
Merge pull request #34120 from weblate/weblate-systemd-main

Translations update from Fedora Weblate

15 months agopo: Translated using Weblate (Turkish) 34120/head
Oğuz Ersen [Sun, 25 Aug 2024 11:38:32 +0000 (13:38 +0200)] 
po: Translated using Weblate (Turkish)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main

15 months agopo: Translated using Weblate (Russian)
Sergey A [Sun, 25 Aug 2024 11:38:32 +0000 (13:38 +0200)] 
po: Translated using Weblate (Russian)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main

15 months agopo: Translated using Weblate (French)
Léane GRASSER [Sun, 25 Aug 2024 11:38:32 +0000 (13:38 +0200)] 
po: Translated using Weblate (French)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main

15 months agopo: Translated using Weblate (French)
Weblate Translation Memory [Sun, 25 Aug 2024 11:38:31 +0000 (13:38 +0200)] 
po: Translated using Weblate (French)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main

15 months agonetwork/routing-policy-rule: use config_parse_routing_policy_rule() more 34117/head
Yu Watanabe [Sat, 24 Aug 2024 20:53:41 +0000 (05:53 +0900)] 
network/routing-policy-rule: use config_parse_routing_policy_rule() more

Then, we can drop allocation of RoutingPolicyRule object in each conf
parsers.

No functional change, just refactoring.

15 months agonetwork/routing-policy-rule: introduce a generic conf-parser for [RoutingPolicyRule...
Yu Watanabe [Sat, 24 Aug 2024 20:50:27 +0000 (05:50 +0900)] 
network/routing-policy-rule: introduce a generic conf-parser for [RoutingPolicyRule] sectin

This introduce config_parse_routing_policy_rule(), which wraps existing
conf parsers. With this, we can drop many custom conf parsers for
[RoutingPolicyRule], and can reuse generic conf parsers in conf-parser.[ch].

15 months agoconf-parser: move config_parse_ip_protocol() from network/netdev/fou-tunnel.c
Yu Watanabe [Sat, 24 Aug 2024 19:58:14 +0000 (04:58 +0900)] 
conf-parser: move config_parse_ip_protocol() from network/netdev/fou-tunnel.c

The function is generic enough. Currently it is used at only one place.
But it will be used at another place.

15 months agoconf-parser: introduce config_parse_uint32_flag()
Yu Watanabe [Sat, 24 Aug 2024 19:56:43 +0000 (04:56 +0900)] 
conf-parser: introduce config_parse_uint32_flag()

This is not used currently, but will be used later.

15 months agoconf-parser: return 1 on success
Yu Watanabe [Sat, 24 Aug 2024 19:53:10 +0000 (04:53 +0900)] 
conf-parser: return 1 on success

Typically, conf parsers will ignore most errors during parsing strings
and return 0. Let's return 1 on success. Otherwise it is hard to reused
these function in another conf parser.

15 months agoparse-util: drop unused parse_ip_prefix_length()
Yu Watanabe [Sat, 24 Aug 2024 20:32:00 +0000 (05:32 +0900)] 
parse-util: drop unused parse_ip_prefix_length()

15 months agonetwork/routing-policy-rule: merge two conf parsers
Yu Watanabe [Sat, 24 Aug 2024 20:31:03 +0000 (05:31 +0900)] 
network/routing-policy-rule: merge two conf parsers

Both conf parsers takes an integer. Only difference is the maximum
value. Let's merge them, and pass the maximum value through ltype.

15 months agonetwork/routing-policy-rule: trivial cleanups for conf-parsers
Yu Watanabe [Sat, 24 Aug 2024 20:09:55 +0000 (05:09 +0900)] 
network/routing-policy-rule: trivial cleanups for conf-parsers

No functional change, just refactoring.

15 months agonetwork/routing-policy-rule: rename n -> rule
Yu Watanabe [Sat, 24 Aug 2024 20:03:26 +0000 (05:03 +0900)] 
network/routing-policy-rule: rename n -> rule

15 months agomeson: search for 'bpf-unknown-none' too
Sam James [Sat, 24 Aug 2024 12:09:47 +0000 (13:09 +0100)] 
meson: search for 'bpf-unknown-none' too

We currently search for 'bpf-gcc' and 'bpf-none-gcc'. Gentoo's
sys-devel/bpf-toolchain package uses 'bpf-unknown-none-gcc', as does Fedora's
cross-binutils. Search for this name too.

15 months agoMerge pull request #34115 from weblate/weblate-systemd-main
Yu Watanabe [Sat, 24 Aug 2024 17:14:37 +0000 (02:14 +0900)] 
Merge pull request #34115 from weblate/weblate-systemd-main

Translations update from Fedora Weblate

15 months agopo: Translated using Weblate (Georgian) 34115/head
Temuri Doghonadze [Sat, 24 Aug 2024 10:36:53 +0000 (12:36 +0200)] 
po: Translated using Weblate (Georgian)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main

15 months agopo: Translated using Weblate (Ukrainian)
Yuri Chornoivan [Sat, 24 Aug 2024 10:36:53 +0000 (12:36 +0200)] 
po: Translated using Weblate (Ukrainian)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/uk/
Translation: systemd/main

15 months agopo: Translated using Weblate (Polish)
Piotr Drąg [Sat, 24 Aug 2024 10:36:52 +0000 (12:36 +0200)] 
po: Translated using Weblate (Polish)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pl/
Translation: systemd/main

15 months agopo: Translated using Weblate (Korean)
김인수 [Sat, 24 Aug 2024 10:36:52 +0000 (12:36 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main

15 months agoMerge pull request #34111 from yuwata/log_section_full_errno
Yu Watanabe [Fri, 23 Aug 2024 23:31:02 +0000 (08:31 +0900)] 
Merge pull request #34111 from yuwata/log_section_full_errno

network: introduce log_section_full_errno() and friends, and use them

15 months agoMerge pull request #34110 from yuwata/network-routing-policy-cleanups
Yu Watanabe [Fri, 23 Aug 2024 23:30:48 +0000 (08:30 +0900)] 
Merge pull request #34110 from yuwata/network-routing-policy-cleanups

network/routing-policy-rule: assorted trivial cleanups

15 months agonetwork/routing-policy-rule: use log_section_warning_errno() 34111/head
Yu Watanabe [Thu, 22 Aug 2024 23:07:30 +0000 (08:07 +0900)] 
network/routing-policy-rule: use log_section_warning_errno()

15 months agoconf-parser: introduce log_section_full_errno() and friends
Yu Watanabe [Thu, 22 Aug 2024 23:07:12 +0000 (08:07 +0900)] 
conf-parser: introduce log_section_full_errno() and friends

15 months agotest-network: check one more rule we configure 34110/head
Yu Watanabe [Thu, 22 Aug 2024 19:30:02 +0000 (04:30 +0900)] 
test-network: check one more rule we configure

15 months agonetwork/routing-policy-rule: read FRA_PROTOCOL afer reading other properties
Yu Watanabe [Thu, 22 Aug 2024 18:44:39 +0000 (03:44 +0900)] 
network/routing-policy-rule: read FRA_PROTOCOL afer reading other properties

No functional change, just refactoring.

15 months agonetwork/routing-policy-rule: add more assertions
Yu Watanabe [Thu, 22 Aug 2024 07:17:32 +0000 (16:17 +0900)] 
network/routing-policy-rule: add more assertions

15 months agonetwork/routing-policy-rule: sort conf-parser prototypes
Yu Watanabe [Thu, 22 Aug 2024 06:01:12 +0000 (15:01 +0900)] 
network/routing-policy-rule: sort conf-parser prototypes

15 months agolabeler: support varlink tag
Yu Watanabe [Fri, 23 Aug 2024 14:15:10 +0000 (23:15 +0900)] 
labeler: support varlink tag

15 months agovarlinkctl: output an expressive error message in case invalid method/interface names...
Lennart Poettering [Fri, 23 Aug 2024 08:41:44 +0000 (10:41 +0200)] 
varlinkctl: output an expressive error message in case invalid method/interface names are specified

Inspired by #34098 → let's make it easier for users to understand and
correct the mistakes they made: let's early refuse invalid
interface/method names.

15 months agoupdatectl: fix typo and drop space in empty lines
Yu Watanabe [Fri, 23 Aug 2024 09:24:56 +0000 (18:24 +0900)] 
updatectl: fix typo and drop space in empty lines

Follow-ups for ec15bb71c2ccd57702325a6e6626053a343f3511 (#32363).

15 months agoMerge pull request #34108 from mrc0mmand/update-translation-files
Yu Watanabe [Fri, 23 Aug 2024 14:07:57 +0000 (23:07 +0900)] 
Merge pull request #34108 from mrc0mmand/update-translation-files

po: update translation files

15 months agopo: drop placeholders and re-add SPDX line 34108/head
Frantisek Sumsal [Fri, 23 Aug 2024 13:37:23 +0000 (15:37 +0200)] 
po: drop placeholders and re-add SPDX line

Follow-up for ecce45cd3f1b4d1fd7f6a6d893f7c12c47c70455.

15 months agopo: update translation files
Frantisek Sumsal [Fri, 23 Aug 2024 13:36:10 +0000 (15:36 +0200)] 
po: update translation files

15 months agoMerge pull request #34102 from yuwata/udev-net_id
Yu Watanabe [Fri, 23 Aug 2024 09:06:06 +0000 (18:06 +0900)] 
Merge pull request #34102 from yuwata/udev-net_id

udev/net_id: trivial cleanups

15 months agoudevadm/test,test-builtin: enable debugging logs by default again
Yu Watanabe [Fri, 23 Aug 2024 01:14:45 +0000 (10:14 +0900)] 
udevadm/test,test-builtin: enable debugging logs by default again

The lines were mistakenly dropped by
aa976d87889ae22b7347787a1ebd03a31dcc0a9e.

15 months agoudev/net_id: update log messages 34102/head
Yu Watanabe [Fri, 23 Aug 2024 00:46:09 +0000 (09:46 +0900)] 
udev/net_id: update log messages

This also downgrades the log level of a message to debug.

15 months agoudev/net_id: move naming scheme check
Yu Watanabe [Fri, 23 Aug 2024 00:54:00 +0000 (09:54 +0900)] 
udev/net_id: move naming scheme check

We usually do not set r = -1 when a functionality is disabled or not
supported. Even though the error code is not used, let's set a negative
errno in such case.

No functional change, just refactoring.

Follow-up for 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb.

15 months agotest: use ASSERT_EQ_ID128() and ASSERT_NE_ID128()
Yu Watanabe [Thu, 22 Aug 2024 23:25:53 +0000 (08:25 +0900)] 
test: use ASSERT_EQ_ID128() and ASSERT_NE_ID128()

15 months agoudev-builtin-net_id: ignore firmware_node/sun == 0
Etienne Champetier [Thu, 22 Aug 2024 20:30:56 +0000 (16:30 -0400)] 
udev-builtin-net_id: ignore firmware_node/sun == 0

Since ID_NET_NAME_SLOT was introduced we ignore slot == 0
https://github.com/systemd/systemd/blob/0035597a30d120f70df2dd7da3d6128fb8ba6051/src/udev/udev-builtin-net_id.c#L139

Qemu sets _SUN to PCI_SLOT() for all NICs, so _SUN is not unique.
https://gitlab.com/qemu-project/qemu/-/issues/2530

In my tests with libvirt I can only set 'slot="0x00"' in interface definition,
so all NICs end up with _SUN == 0, and this commit is enough to avoid the issue.

Fixes 0a4ecc54cb9f2d3418b970c51bfadb69c34ae9eb

15 months agoMerge pull request #34087 from DaanDeMeyer/nspawn-init-revert
Yu Watanabe [Thu, 22 Aug 2024 22:42:16 +0000 (07:42 +0900)] 
Merge pull request #34087 from DaanDeMeyer/nspawn-init-revert

Revert "nspawn: Allow specifying custom init program"

15 months agoMerge pull request #34092 from poettering/ambient-caps-fixup
Yu Watanabe [Thu, 22 Aug 2024 21:41:45 +0000 (06:41 +0900)] 
Merge pull request #34092 from poettering/ambient-caps-fixup

minor tweaks to the recent ambient caps rework

15 months agoMerge pull request #34096 from YHNdnzj/logind-followup-256
Yu Watanabe [Thu, 22 Aug 2024 20:38:18 +0000 (05:38 +0900)] 
Merge pull request #34096 from YHNdnzj/logind-followup-256

logind: two follow-ups

15 months agoboot: use MAX() where appropriate
Lennart Poettering [Thu, 22 Aug 2024 16:20:20 +0000 (18:20 +0200)] 
boot: use MAX() where appropriate

15 months agoMerge pull request #34097 from YHNdnzj/journal-browse-prepare
Yu Watanabe [Thu, 22 Aug 2024 20:25:19 +0000 (05:25 +0900)] 
Merge pull request #34097 from YHNdnzj/journal-browse-prepare

shared/logs-show: introduce journal_browse_prepare()

15 months agoRevert "nspawn: Allow specifying custom init program" 34087/head
Daan De Meyer [Thu, 22 Aug 2024 13:59:32 +0000 (15:59 +0200)] 
Revert "nspawn: Allow specifying custom init program"

I don't actually need this anymore since we're going with a
unit based approach for the containers stuff internally so
let's just revert it.

Fixes #34085

This reverts commit ce2291730d5f91190e97e7c515ac772ae4970062.

15 months agoRevert "nspawn: fix settings leak for init parameter"
Daan De Meyer [Thu, 22 Aug 2024 20:20:36 +0000 (22:20 +0200)] 
Revert "nspawn: fix settings leak for init parameter"

This reverts commit 1e2aa88bb238299cd982f9e3f14812a6c7211d31.

15 months agosysupdate: Add tests for incomplete versions 33570/head
Adrian Vovk [Tue, 2 Jul 2024 16:36:37 +0000 (12:36 -0400)] 
sysupdate: Add tests for incomplete versions

To make sure we don't regress on #33339

15 months agosysupdate: Repair incomplete versions in-place
Adrian Vovk [Thu, 20 Jun 2024 01:05:04 +0000 (21:05 -0400)] 
sysupdate: Repair incomplete versions in-place

A previous commit made sysupdate recognize installed versions where some
transfers are missing. This commit teaches sysupdate how to correctly
repair these incomplete versions.

Previously, if you had a incomplete installation of the OS booted, and
ran sysupdate in an attempt to repair it, sysupdate would make things
worse by creating copies of the currently-booted partitions in the
inactive slots. Then at boot you have two identical partitions, with
identical labels an UUIDs, and end up with a mess.

With this commit, sysupdate is able to recognize situations where it can
simply download the missing transfers and leave the rest of the system
undistrubed.

Partial fix for https://github.com/systemd/systemd/issues/33339

15 months agosysupdate: Track incompletely-installed versions
Adrian Vovk [Tue, 2 Jul 2024 16:13:45 +0000 (12:13 -0400)] 
sysupdate: Track incompletely-installed versions

When enumerating what versions exist for a given target, sysupdate would
completely throw out any version that's incomplete (where some of the
transfers in the target have that version installed or available, and
other transfers do not).

If we're trying to find what versions we can offer for download, this is
great behavior. If the server side is advertising a partial update to
download, we shouldn't present it to the user.

On the other hand, if we're enumerating what versions we have currently
installed, this is a bad behavior. It makes sysupdate fragile. For
example, if a sysext introduces a new .conf file into
/usr/lib/sysupdate.d, suddenly the currently-installed OS stops being a
version that we've enumerated. Since it's not enumerated, it's not
protected, and so sysupdate will wipe the booted OS.

So if we're looking for installed versions, we now loosen the
restrictions and enumerate incomplete installations.

Partial fix for https://github.com/systemd/systemd/issues/33339

15 months agosysupdate: Check that --instances-max is in bounds
Adrian Vovk [Sat, 22 Jun 2024 00:49:48 +0000 (20:49 -0400)] 
sysupdate: Check that --instances-max is in bounds

Otherwise user can pass in --instances-max=0 and crash sysupdate with an
assertion failure.

15 months agosysupdate: Fix resource_find_instance
Adrian Vovk [Sat, 22 Jun 2024 00:03:12 +0000 (20:03 -0400)] 
sysupdate: Fix resource_find_instance

The current implementation will never find a match, because in the event
of a match instance_cmp falls through to comparing paths and the key
we're matching against will always have a path of NULL.

So let's just use a separate compare function, just to make sure future
updates to instance_cmp don't break resource_find_instance again.

15 months agoshared/logs-show: introduce journal_browse_prepare() 34097/head
Mike Yuan [Sat, 17 Aug 2024 17:53:09 +0000 (19:53 +0200)] 
shared/logs-show: introduce journal_browse_prepare()

which combines sigbus_install() and bumping fd limit.

15 months agobasic/sigbus: use FOREACH_ELEMENT where appropriate, assert >= 0 for success
Mike Yuan [Sat, 17 Aug 2024 17:40:55 +0000 (19:40 +0200)] 
basic/sigbus: use FOREACH_ELEMENT where appropriate, assert >= 0 for success

15 months agologind-session: downgrade user@.service dep to Wants= 34096/head
Mike Yuan [Sat, 17 Aug 2024 16:34:46 +0000 (18:34 +0200)] 
logind-session: downgrade user@.service dep to Wants=

This partially reverts 52bcc872b5f97a14a9b4e4e383f45bb3066e1643.

We explicitly support running without user manager,
hence only user-runtime-dir@.service should be
required.

Fixes #33405

15 months agologind: DesignatedMaintenanceTime is added in v257 and constant
Mike Yuan [Fri, 26 Jul 2024 13:31:39 +0000 (15:31 +0200)] 
logind: DesignatedMaintenanceTime is added in v257 and constant

Follow-up for 0e10c3d8724b0a5d07871c9de71565ac91dd55b7

Addresses https://github.com/systemd/systemd/pull/25049#discussion_r1647513862

15 months agomain: make sure the ambient caps set is valid in case we fail to read it 34092/head
Lennart Poettering [Thu, 22 Aug 2024 16:36:23 +0000 (18:36 +0200)] 
main: make sure the ambient caps set is valid in case we fail to read it

We ignore failures when reading this after all. Hence we better leave
the memory properly initialized.

15 months agomain: generate warning when we cannot reset caps
Lennart Poettering [Thu, 22 Aug 2024 16:20:38 +0000 (18:20 +0200)] 
main: generate warning when we cannot reset caps

Follow-up for: #32937

15 months agocore: rename original_ambient_set → saved_ambient_set
Lennart Poettering [Thu, 22 Aug 2024 16:18:41 +0000 (18:18 +0200)] 
core: rename original_ambient_set → saved_ambient_set

We call similar other fields in main.c (notably: rlimit stuff, env vars) "saved",
rather than "original". Hence stick to that kind of naming here too.

Follow-up for: #32937

15 months agomkosi: Update to latest
Daan De Meyer [Thu, 22 Aug 2024 13:22:37 +0000 (15:22 +0200)] 
mkosi: Update to latest

Should fix the Fedora Rawhide CI failure.

15 months agoman: document .membership files that nss-systemd processes
Lennart Poettering [Wed, 21 Aug 2024 08:10:34 +0000 (10:10 +0200)] 
man: document .membership files that nss-systemd processes

This has been a glaring omission the docs: when people create
.user/.group/.user-privileged/.group-privileged drop-in files, they
should also create matching .membership files.

15 months agoMerge pull request #34051 from rpigott/resolved-demote-fallback
Yu Watanabe [Thu, 22 Aug 2024 11:21:33 +0000 (20:21 +0900)] 
Merge pull request #34051 from rpigott/resolved-demote-fallback

resolved: demote only the fallback servers in the global scope

15 months agoMerge pull request #34033 from DaanDeMeyer/mkosi-cage
Daan De Meyer [Thu, 22 Aug 2024 10:57:07 +0000 (12:57 +0200)] 
Merge pull request #34033 from DaanDeMeyer/mkosi-cage

 mkosi: Update to latest

15 months agomkosi: Update to latest 34033/head
Daan De Meyer [Mon, 19 Aug 2024 09:27:26 +0000 (11:27 +0200)] 
mkosi: Update to latest

15 months agoMerge pull request #34076 from yuwata/polkit-message
Lennart Poettering [Thu, 22 Aug 2024 08:56:53 +0000 (10:56 +0200)] 
Merge pull request #34076 from yuwata/polkit-message

polkit: add missing period in polkit messages

15 months agomkosi: Improve formatting
Daan De Meyer [Mon, 19 Aug 2024 09:27:11 +0000 (11:27 +0200)] 
mkosi: Improve formatting

15 months agoMerge pull request #34079 from AdrianVovk/sysupdate-fixups
Yu Watanabe [Thu, 22 Aug 2024 04:59:55 +0000 (13:59 +0900)] 
Merge pull request #34079 from AdrianVovk/sysupdate-fixups

systemd-sysupdated follow-ups

15 months agosysupdate: man: Cleanup sections about flags 34079/head
Adrian Vovk [Thu, 22 Aug 2024 02:10:49 +0000 (22:10 -0400)] 
sysupdate: man: Cleanup sections about flags

15 months agosysupdate: Simplify sysupdate_run_simple callsite
Adrian Vovk [Thu, 22 Aug 2024 01:44:53 +0000 (21:44 -0400)] 
sysupdate: Simplify sysupdate_run_simple callsite

Allows the caller to optionally pass in a target, instead of making
everyone call target_get_argument at the call site.

15 months agosysupdated: Verify inputs more rigorously
Adrian Vovk [Thu, 22 Aug 2024 01:36:25 +0000 (21:36 -0400)] 
sysupdated: Verify inputs more rigorously

Also return better errors