Commit Graph

77577 Commits

Author SHA1 Message Date
Davide Cavalca
fa8a55a914 mkosi: ruff is not available on all distros
Refactor to only install ruff where it is available
2024-11-12 18:05:17 +00:00
Maanya Goenka
68a2a43c9b
TODO: Fix typo (#35138)
Replace confex with confext
2024-11-12 19:00:23 +01:00
Antonio Alvarez Feijoo
2a310c0ad6 sbsign: remove unused --no-pager option 2024-11-12 17:52:48 +01:00
Davide Cavalca
f2672f2c5d mkosi: Install tpm2-tss-devel to tools for CentOS and Fedora instead of tss2-devel
tss2-devel is the IBM TPM stack, we want the Intel TPM stack, so let's
use the correct package.
2024-11-12 22:45:25 +09:00
Yu Watanabe
5da7e9b208
Fix man page links broken due to incorrect volume numbers (#35122) 2024-11-12 18:23:47 +09:00
Antonio Alvarez Feijoo
05a0366381 man/systemd-keyutil: fix rendering typo 2024-11-12 17:54:07 +09:00
Štěpán Němec
62ec4798f2 man/systemd.special: fix a typo 2024-11-11 20:31:43 +01:00
Štěpán Němec
597c6cc119 man: fix incorrect volume numbers in internal man page references
Some ambiguity (e.g., same-named man pages in multiple volumes)
makes it impossible to fully automate this, but the following
Python snippet (run inside the man/ directory of the systemd repo)
helped to generate the sed command lines (which were subsequently
manually reviewed, run and the false positives reverted):

from pathlib import Path

import lxml
from lxml import etree as ET

man2vol: dict[str, str] = {}
man2citerefs: dict[str, list] = {}

for file in Path(".").glob("*.xml"):
    tree = ET.parse(file, lxml.etree.XMLParser(recover=True))
    meta = tree.find("refmeta")
    if meta is not None:
        title = meta.findtext("refentrytitle")
        if title is not None:
            vol = meta.findtext("manvolnum")
            if vol is not None:
                man2vol[title] = vol
            citerefs = list(tree.iter("citerefentry"))
            if citerefs:
                man2citerefs[title] = citerefs

for man, refs in man2citerefs.items():
    for ref in refs:
        title = ref.findtext("refentrytitle")
        if title is not None:
            has = ref.findtext("manvolnum")
            try:
                should_have = man2vol[title]
            except KeyError:  # Non-systemd man page reference?  Ignore.
                continue
            if has != should_have:
                print(
                    f"sed -i '\\|<citerefentry><refentrytitle>{title}"
                    f"</refentrytitle><manvolnum>{has}</manvolnum>"
                    f"</citerefentry>|s|<manvolnum>{has}</manvolnum>|"
                    f"<manvolnum>{should_have}</manvolnum>|' {man}.xml"
                )
2024-11-11 20:31:08 +01:00
Yu Watanabe
3304a029b8
network: forget IPv4 non-local routes when an interface went down (#35099)
Fixes #35047.
2024-11-12 01:07:43 +09:00
Lennart Poettering
67e003d7dd
Introduce systemd-keyutil to do various key/certificate operations (#35095)
Let's gather generic key/certificate operations in a new tool
systemd-keyutil instead of spreading them across various special purpose
tools.

Fixes #35087
2024-11-11 16:09:07 +01:00
Yu Watanabe
7f1b36a82a test-network: add test case for issue #35047 2024-11-11 13:59:41 +00:00
Yu Watanabe
688f166972 network/nexthop: also forget IPv4 nexthops when an interface went down
Similar to the previous commit, but for nexthop.
2024-11-11 13:59:41 +00:00
Yu Watanabe
6954c38cf8 network/route: forget IPv4 non-local routes when an interface went down
When an interface went down, IPv4 non-local routes are removed by the
kernel without any notifications. Let's forget the routes in that case.

Fixes #35047.
2024-11-11 13:59:41 +00:00
Yu Watanabe
fd2ea787bd network/nexthop: forget dependent routes without trying to remove
When a nexthop is removed, routes depend on the removed nexthop are
already removed. It is not necessary to remove them, as already
commented. Let's forget them without trying to remove.
2024-11-11 13:59:41 +00:00
Yu Watanabe
1ca180b994 network/nexthop: do not remove depending nexthops when a nexthop is removed
Previously, when a nexthop is removed, depending nexthops were removed, but
that's not necessary, as the kernel keeps them, at least with v6.11.
2024-11-11 13:59:41 +00:00
Yu Watanabe
422e418ab9 network/route: update reference of the route from nexthop
Follow-up for 6f09031e4d.

The function has been introduced by the commit, but it has never been used...
2024-11-11 13:59:41 +00:00
Luca Boccassi
2e33cd7110
network: further rework for reconfiguring interfaces (#35059)
Follow-ups for #35035.
Split-out of #34989.
Fixes #35092.
2024-11-11 12:59:31 +00:00
Yu Watanabe
d48bdad0b8
Split src/partition (#35110) 2024-11-11 18:36:26 +09:00
Gabriel Elyas
698afbf4fe po: Translated using Weblate (Portuguese (Brazil))
Currently translated at 96.1% (247 of 257 strings)

Co-authored-by: Gabriel Elyas <gabrielelyas@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt_BR/
Translation: systemd/main
2024-11-11 17:57:18 +09:00
Zbigniew Jędrzejewski-Szmek
211d2f972d Rename src/partition to src/repart 2024-11-11 09:17:10 +01:00
Yu Watanabe
82df2e0f04 network: make 'networkctl reconfigure' work safely even when KeepConfiguration=dhcp or yes
Previously, even if KeepConfiguration=dhcp or yes is specified in the
new .network file, dynamic configurations like DHCP address and routes
were dropped when 'networkctl reconfigure INTERFACE' is invoked.

If the setting is specified, let's gracefully handle the dynamic
configurations. Then, 'networkctl reconfigure' can be also used for
an interface that has critical connections.
2024-11-11 11:53:24 +09:00
Yu Watanabe
e8da735ceb network: drop static configs later
Follow-up for dd6d53a8dc.

Unnecessary static configs will be anyway dropped later in
link_configure() -> link_drop_unmanaged_config(). Hence, even if we are
reconfiguring an interface cleanly, it is not necessary to drop static
configs here.
2024-11-11 11:53:24 +09:00
Yu Watanabe
4e76c57c7f network/dhcp-pd: do not remove unreachable route when reconfiguring non-upstream interface
Unreachable routes are not owned by any interfaces, and its ifindex is
zero. Previously, if a non-upstream interface is reconfigured, all routes
including unreachable routes configured by the upstream interface are
removed.

This makes unreachable routes are always handled by the upstream interface,
and only removed when the delegated prefixes are changed or lost.
2024-11-11 11:53:24 +09:00
Yu Watanabe
42152390da network: reorder dropping dynamic configuration
Follow-up for 451c2baf30.
2024-11-11 11:53:24 +09:00
Yu Watanabe
130d66956f test-network: reconfigure interface cleanly to drop previous DHCP lease and friends
Follow-up for 451c2baf30.

With the commits, reloading .network files does not release previously
acquired DHCP lease and friends if possible.

On graceful reconfigure triggered by the reload, the interface may
acquire a new DHCPv4 lease earlier than DHCPv6 lease. In that case,
the check will fail as it is done with the new DHCPv4 lease and old
DHCPv6 lease, which does not contain any IPv6 DNS servers or so.
So, when switching from no -> yes, we need to wait a new lease with DNS
servers or so. To achieve that, we need to clean reconfigure the interface.
2024-11-11 11:53:24 +09:00
Yu Watanabe
52f46b77d7 network: reset 'configured' flags even if we keep DHCP lease and friends on reconfigure
Follow-up for 451c2baf30.

With the commits, reloading .network files does not release previously
acquired DHCP lease and friends if possible. If previously a DHCP client
was configured as not requesting DNS servers or so, then the previously
acquired lease might not contain any DNS servers. In that case, if the
new .network file enables UseDNS=, then the interface should enter the
configured state after a new lease is acquired. To achieve that, we need
to reset the flags.

With this change, the workaround applied to the test by the commit
451c2baf30 can be dropped.
2024-11-11 11:53:24 +09:00
Yu Watanabe
525a582ae8 network: drop unnecessary size specifier
It does not save any memory usage but increase code complexity.
2024-11-11 11:53:24 +09:00
Yu Watanabe
ed3bab7a0e netwrok: call link_drop_unmanaged_config() earlier in link_configure()
Otherwise, even if a link enters the configuring state at the beginning
of link_configure(), link_check_ready() may be called before
link_drop_unmanaged_config() is called, and the link may enter the
configured state.

Fixes #35092.
2024-11-11 11:53:24 +09:00
Zbigniew Jędrzejewski-Szmek
a32e1f8896 Move growfs+makefs to src/growfs/
Those two programs are used together and it makes sense to keep them
together. makefs is smaller, so name the directory after growfs.
2024-11-10 14:09:46 +01:00
Yu Watanabe
cf8fd7148c
Various multi-dt fixes and CHID test (#35056)
Part of #34158
2024-11-10 11:19:10 +09:00
12paper
8254755091
login: fix session_kill(..., KILL_LEADER,...) (#35105)
`loginctl kill-session --kill-whom=leader <N>` (or the D-Bus equivalent)
doesn't work because logind ends up calling `KillUnit(..., "main", ...)`
on a scope unit and these don't have a `MainPID` property. Here, I just
make it send a signal to the `Leader` directly.
2024-11-10 11:13:39 +09:00
Valentin David
053452e22b ukify: Fix broken assert when building a signed addon
An assert always expected a kernel when signature key was present in command
line. That prevented building signed addons.

Fixes #35041
2024-11-10 05:44:30 +09:00
Weblate Translation Memory
5cfe76e1d6 po: Translated using Weblate (German)
Currently translated at 93.7% (241 of 257 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2024-11-10 05:40:14 +09:00
Ettore Atalan
bb7e2e4b9d po: Translated using Weblate (German)
Currently translated at 93.7% (241 of 257 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2024-11-10 05:40:14 +09:00
Mike Yuan
e997cfaa73 meson.build: add a few features to summary 2024-11-10 05:39:11 +09:00
Luca Boccassi
6d558e53c9
sysupdate: Bug fixes for target enumeration (#35052)
Fixes a couple of bugs with systemd-sysupdated's target enumeration. See
commit messages for details.











<!-- devel-freezer =
{"comment-id":"2460494553","freezing-tag":"v257-rc1"} -->
2024-11-08 23:21:29 +00:00
Lidong Zhong
2ae79a31b7 udev: skipping empty udev rules file while collecting the stats
To keep align with the logic used in udev_rules_parse_file(), we also
should skip the empty udev rules file while collecting the stats during
manager reload. Otherwise all udev rules files will be parsed again whenever
reloading udev manager with an empty udev rules file. It's time consuming
and the following uevents will fail with timeout.
2024-11-08 23:20:09 +00:00
Lennart Poettering
56933f2073 uid-classification: properly classify *all* container UIDs
A bit confusingly CONTAINER_UID_BASE_MAX is just the maximum *base* UID
for a container. Thus, with the usual 64K UID assignments, the last
actual container UID is CONTAINER_UID_BASE_MAX+0xFFFF.

To make this less confusing define CONTAINER_UID_MIN/MAX that add the
missing extra space.

Also adjust two uses where this was mishandled so far, due to this
confusion.

With this change the UID ranges we default to should properly match what
is documented on https://systemd.io/UIDS-GIDS/.
2024-11-08 23:18:39 +00:00
Zbigniew Jędrzejewski-Szmek
347def981b
News and f41 and formatting (#35078) 2024-11-08 17:17:37 +01:00
Daan De Meyer
4b1ad0398e Introduce systemd-keyutil to do various key/certificate operations
Let's gather generic key/certificate operations in a new tool
systemd-keyutil instead of spreading them across various special
purpose tools.

Fixes #35087
2024-11-08 15:00:21 +01:00
Zbigniew Jędrzejewski-Szmek
fe45f8dc9b man: drop whitespace from final <programlisting> lines
In the troff output, this doesn't seem to make any difference. But in the
html output, the whitespace is sometimes preserved, creating an additional
gap before the following content. Drop it everywhere to avoid this.
2024-11-08 14:14:36 +01:00
Yu Watanabe
5261c521e3 mount-util: make path_get_mount_info() work arbitrary inode
Follow-up for d49d95df0a.
Replaces 9a032ec55a.
Fixes #35075.
2024-11-08 13:25:17 +01:00
Franck Bui
514d9e1665 test: install integration-test-setup.sh in testdata/
integration-test-setup.sh is an auxiliary script that tests rely on at
runtime. As such, install the script in testdata/.

Follow-up for af153e36ae.
2024-11-08 12:37:40 +01:00
Lennart Poettering
b480a4c15e update TODO 2024-11-08 10:10:11 +01:00
Lennart Poettering
af3baf174a fs-util: add comment about XO_NOCOW 2024-11-08 09:21:25 +01:00
Ryan Wilson
d8091e1281 Fix PrivatePIDs=yes integration test for kernels with no /proc/scsi 2024-11-08 13:38:35 +09:00
anonymix007
310997d5b4 fundamental: Fix buffer size in get_chid
NUL byte should not be hashed
2024-11-08 00:53:26 +03:00
anonymix007
9f9c847609 fundamental: Fix iteration count in chid_calculate 2024-11-08 00:53:26 +03:00
anonymix007
5d8d7d8e43 fundamental: move string includes from chid-fundamental.c to header 2024-11-08 00:53:26 +03:00
anonymix007
ab7c319268 test: Add chid-fundamental test 2024-11-08 00:53:22 +03:00