1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-07 04:58:29 +03:00

74235 Commits

Author SHA1 Message Date
Luca Boccassi
2e0af5f6fe mkosi: remove conflicting deb packages from builddir
These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4e794af62bca6d1ea530ffc530ee58c

(cherry picked from commit ce513c6c6cfbb52dd4736f8074b61d2dfdb2417d)
2024-07-05 11:38:42 +02:00
Daan De Meyer
6a898c35da mkosi: Copy packages to the build directory as well
With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.

(cherry picked from commit 690a85b1d4e794af62bca6d1ea530ffc530ee58c)
2024-07-05 11:38:42 +02:00
Daan De Meyer
16ea64e2be mkosi: Make sure we don't hide errors from git merge-base
Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.

(cherry picked from commit 2fe6ad5a64bca187712708d41269091c91500a35)
2024-07-05 11:38:42 +02:00
Daan De Meyer
3f42d88faa mkosi: Install perf
It's already installed on ubuntu via linux-tools-common.

(cherry picked from commit cca8c15599b888fc757d7e17a8a8949bca522447)
2024-07-05 11:38:42 +02:00
Daan De Meyer
f2c782c043 mkosi: Install pciutils
(cherry picked from commit 3cdc8da5ad4beb9bdb06e9c6ca3544da410454ce)
2024-07-05 11:38:42 +02:00
Zbigniew Jędrzejewski-Szmek
054fc83a23 mkosi: move variable to the right scope
(cherry picked from commit 3690971cd0d11749e82bc1cb69d5a1e80284ab46)
2024-07-05 11:38:42 +02:00
Daan De Meyer
8abb2e0f55 mkosi: Don't touch the packaging checkout if work is being done
If work is being done in a separate branch, don't touch the packaging
checkout.

(cherry picked from commit 88e92306431bd5928ab4e5c18310e36de9ffa3f6)
2024-07-05 11:38:42 +02:00
Robin Lee
59ab01d32f vmspawn: define QEMU_MACHINE_TYPE for loongarch64
Use ["virt"](https://www.qemu.org/docs/master/system/loongarch/virt.html) as a commonly used generic platform on loongarch64.

(cherry picked from commit 6efab8c343f0881ad9e1800facb0d08594b025ee)
2024-07-05 11:29:46 +02:00
Xeonacid
ba28889c65 vmspawn: define QEMU_MACHINE_TYPE for riscv
Use ["virt"](https://www.qemu.org/docs/master/system/target-riscv.html#board-specific-documentation) as a commonly used generic platform on riscv.

(cherry picked from commit 5f7136a3690cd118eeef3c84dfbd9f5d0df556d6)
2024-07-05 11:29:46 +02:00
Luca Boccassi
715d146a3a docs: fix dead link to GNOME documentation
(cherry picked from commit b22ee1010d4ba2e0049b162483c0f185c367d0bb)
2024-06-28 13:35:58 +01:00
Yu Watanabe
34ba18b012 logs-show: do not use _SOURCE_MONOTONIC_TIMESTAMP field
The timestamp is not in CLOCK_MONOTONIC, but CLOCK_BOOTTIME,
while header monotonic timestamp is in CLOCK_MONOTONIC. Hence, we cannot
adjust timestamp by comparing with header monotonic timestamp and
_SOURCE_MONOTONIC_TIMESTAMP field.

Fixes a regression caused by affde1d7e79a634ee6053dbd4a57b3b51b74c170.
Fixes #33293.

(cherry picked from commit 144498e7e6efe2d90981cb14e3ed462a70a955c6)
v256.1
2024-06-18 20:41:01 +02:00
Antonio Alvarez Feijoo
f8f669fd69 repart: fix memory leak
(cherry picked from commit a81f5ffd40081441dafc678fe83d185436dde35a)
2024-06-18 20:41:01 +02:00
Luca Boccassi
7b18adadde mkosi: restrict noble-backports to noble builds
Follow-up for c01cb8cbff8512b65b7903b55f78c8d12661b8d7

(cherry picked from commit f97b243edfcae211aade6ceb2fd89ae9d9209fac)
2024-06-18 20:41:01 +02:00
Lennart Poettering
08b8237303 tmpfiles: move --purge to command section in --help text where it belongs
Also, make contrast between --remove and --purge clearer: one deletes
files marked for deletion, the other deletes files marked for creation.

(cherry picked from commit 69d76823ce6e9c307184946ed55b207eb728e625)
2024-06-18 20:41:01 +02:00
Lennart Poettering
e760157389 tmpfiles: insist on at least one configuration file being specified on --purge
Also, extend the man page explanation substantially, matching more
closely what --create says.

Fixes: #33349
(cherry picked from commit 41064a3c97c9a53c97bbe8a1de799a82c4374a2d)
2024-06-18 20:41:01 +02:00
Lennart Poettering
90ec026570 tmpfiles: honour --dry-run when removing directories
(cherry picked from commit edeceb80a91e8400e8c22f08a41045a2ba270fe6)
2024-06-18 20:41:01 +02:00
Luca Boccassi
c26e56d08f install: allow removing symlinks even for units that are gone
If a symlink is leftover, still allow cleaning it up via 'disable'. This
happens when a unit is stopped and removed, but not disabled, and a reload
has already happened. At that point, cleaning up the old symlinks becomes
impossible through the APIs, and needs to be done manually. Always allow
cleaning up symlinks, if they exist, by only erroring out if there is an
OOM.

Follow-up for f31f10a6207efc9ae9e0b1f73975b5b610914017

(cherry picked from commit 5163c9b1e56293b1bb2803420613c5b374570892)
2024-06-18 20:41:01 +02:00
Carlo Teubner
a776dcf7af NEWS: fix typo
(cherry picked from commit f6d517f8478bdd83b7d149b242a47d7686235c7e)
2024-06-18 20:41:01 +02:00
Luca Boccassi
d89c99c7ad mkosi: bump to latest
(cherry picked from commit 3001339dc5b3faf8f8edee4c07b14a4abdf3d66f)
2024-06-18 20:41:01 +02:00
Luca Boccassi
b455006ae1 CI: disable secure boot in mkosi GHA runs
Booting a guest with secure boot is broken in Azure due to a hypervisor
bug. Disable it for now. Given there's no option, need to edit
the configuration on the fly.

(cherry picked from commit bdd0b45bfd7190bb8eb50c71ff6f50a80d6e6e52)
2024-06-18 20:41:01 +02:00
Yu Watanabe
4cc6da9a5d test-network: mention that the captive portal option is supported since v2.20
The current latest release is v2.19, hence the test is typically skipped now.

(cherry picked from commit 4f6d8ab0767e534553bfa130f39dbb07ebb804a4)
2024-06-18 20:41:01 +02:00
Mike Yuan
f7d55cc801 core/service: fix accept-socket deserialization
Follow-up for 45b1017488cef2a5bacdf82028ce900a311c9a1c

(cherry picked from commit 9f5d8c3da4f505346bd1edfae907a2abcdbdc578)
2024-06-18 20:41:01 +02:00
Luca Boccassi
7d65709901 test: use 'auto' instead of 'uefi' for automated fallback
mkosi will prefer UEFI if the architecture supports it, but fallback
to 'linux' if it doesn't.

(cherry picked from commit 80468db8fa21ffd07dc2f28c656eeaf8f0292367)
2024-06-18 20:41:01 +02:00
Luca Boccassi
6178aa4bbc test: support TEST_NO_QEMU in mkosi integration wrapper
Same as the old integration test suite, allow skipping tests that
require qemu.
ppc64el's vsock support doesn't appear to work, so we'll skip it,
as it is already done in the legacy framework.

(cherry picked from commit 464d182b3e470e4163ca376145539a537a6e43a2)
2024-06-18 20:41:01 +02:00
Luca Boccassi
a36cb5660e test: support TEST_NO_KVM
The shell integration suite allows to manually deselect KVM, so
suppor the same env var for the same purpose in python.

(cherry picked from commit 7d2701e7d1d0a7194026dd371071df6e63f59a82)
2024-06-18 20:41:01 +02:00
Luca Boccassi
df1e7d9572 test: drop obsolete comment
We want to keep various logic here instead of mkosi, so drop the
temporary comment

(cherry picked from commit 626518ecd5e7b0c0c708ba53d7eb62934506ed54)
2024-06-18 20:41:01 +02:00
Luca Boccassi
51a2e7be5e test: drop unneeded firmware: uefi setting
These tests no longer need this, as they are running in nspawn, drop it

(cherry picked from commit f44fc531c95e37c83203375c411189009a01b482)
2024-06-18 20:41:01 +02:00
Luca Boccassi
50b53b8221 test: check the skip condition before installing additional files
(cherry picked from commit e1daedb4be6d8180790e0b303872fb1c87ddc7fc)
2024-06-18 20:41:01 +02:00
Luca Boccassi
9802a28b36 mkosi: install EFI packages only on EFI architectures
sbsigntool, systemd-boot and systemd-boot-efi do not  exist on other
architectures

(cherry picked from commit 47fe3f29b4ba1b44ae71a7e67c579c4883731dd4)
2024-06-18 20:41:01 +02:00
Luca Boccassi
21feae324e mkosi: use ports.ubuntu.com for non-x86 backports
Follow-up for 46368556afee7a1f3a1685609942438ef2d9d6c1

(cherry picked from commit c01cb8cbff8512b65b7903b55f78c8d12661b8d7)
2024-06-18 20:41:01 +02:00
Luca Boccassi
9f5f3c2f8b mkosi: enable unprivileged user ns for integration tests
Ubuntu disables them by default in Noble, ship a sysctl to turn them back on
so that tests can use them

(cherry picked from commit 4cfcde024f34b3e5f682364d4e0c6185ef07d467)
2024-06-18 20:41:01 +02:00
Mike Yuan
1a0e6961cf man,units: drop "temporary" from description of systemd-tmpfiles
Historically, systemd-tmpfiles was designed to manager temporary
files, but nowadays it has become a generic tool for managing
all kinds of files. To avoid user confusion, let's remove "temporary"
from the tool's description.

As discussed in #33349

(cherry picked from commit b5c8cc0a3b8e4e2fea0539d6420a76b524ea5735)
2024-06-18 20:41:01 +02:00
Nick Rosbrook
aedeaf7450 man: add a bit of a warning to systemd-tmpfiles --purge
Mention that by default, /home is managed by tmpfiles.d/home.conf, and
recommend that users run systemd-tmpfiles --dry-run --purge first to
see exactly what will be removed.

(cherry picked from commit 9ebcac3b5125a8b0b11f371731ea167cd4684adc)
2024-06-18 20:41:01 +02:00
Cristian Rodríguez
3706b5e8e9 fundamental: declare flex array updated for gcc15 and clang 19
Silly workaround that:
- allowed flexible arrays in unions
- allowed flexible arrays in otherwise empty structs

Is no longer needed since https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=adb1c8a0f167c3a1f7593d75f5a10eb07a5d741a
(GCC15) or clang 19 14ba782a87

(cherry picked from commit 3c2f2146f50c75662987541719bedc4aee9df939)
2024-06-18 20:41:01 +02:00
Lennart Poettering
51390a1f41 analyze: show pcrs also in sha384 bank
SHA384 is pretty much the bank we actually *want* to use, since it's
faster to calculate than SHA256, hence at the very least, start
considering.

(cherry picked from commit acaca5ab250a51be6ba07768bee80bf0f7b462fa)
2024-06-18 20:41:01 +02:00
Lennart Poettering
a61a83a22b CODING_STYLE: document "reterr_" return parameters
In some recent PRs (e.g. #32628) I started to systematically name return
parameters that shall only be initialized on failure (because they carry
additional error meta information, such as the line/column number of
parse failures or so). Let's make this official in the coding style.

(cherry picked from commit 7811864b08393eda5ff92145ea2776180d9b28ee)
2024-06-18 20:41:01 +02:00
David Tardon
2034de6157 shell-completion: only offer devices for completion
This skips directories and other stuff like /dev/core, /dev/initctl or
/dev/log.

(cherry picked from commit bde35f4a91663ebb854330f582baeef0f9adcbfb)
2024-06-18 20:41:01 +02:00
Luca Boccassi
4ebcdcb136 NEWS: note that new stable releases will be in the main repo
(cherry picked from commit 40d637bace4041f081088673cb230669c1e34faf)
2024-06-18 20:41:01 +02:00
Daan De Meyer
d316aed5d8 repart: Use CRYPT_ACTIVATE_PRIVATE
Let's skip udev device scanning when activating a LUKS volume in
systemd-repart as we don't depend on any udev symlinks and don't
expect anything except repart to access the volume.

Suggested by https://github.com/systemd/systemd/issues/33129#issuecomment-2143390941.

(cherry picked from commit 726fc7ae696510b04c24810f691d34f5d20529d6)
2024-06-18 20:41:01 +02:00
Frantisek Sumsal
4a468387ac test: dump a simple summary at the end of TEST-02-UNITTEST
Let's dump a list of skipped tests and logs from failed tests at the end
of TEST-02-UNITTEST to make debugging fails in CI slightly less painful.

(cherry picked from commit 2ac0e52f29eb5f0040882fc46bcfa369893577f3)
2024-06-18 20:41:01 +02:00
Daan De Meyer
70f5fb2f7a repart: Use crypt_reencrypt_run() if available
crypt_reencrypt() is deprecated, so let's look for and prefer
crypt_reencrypt_run() if it is available.

(cherry picked from commit b99b2941276a74878a23470b36c75b0c21dbdd4a)
2024-06-18 20:41:01 +02:00
Ronan Pigott
ba031f1fe8 resolved: permit dnssec rrtype questions when we aren't validating
This check introduced in 91adc4db33f6 is intended to spare us from
encountering broken resolver behavior we don't want to deal with.
However if we aren't validating we more than likely don't know the state
of the upstream resolver's support for dnssec. Let's let clients try
these queries if they want.

This brings the behavior of sd-resolved in-line with previouly stated
change in the meaning of DNSSEC=no, which now means "don't validate"
rather than "don't validate, because the upstream resolver is declared to
be dnssec-unaware".

Fixes: 9c47b334445a ("resolved: enable DNS proxy mode if client wants DNSSEC")
(cherry picked from commit 364c948707afa097f6ad177b61c2b51a86c0089a)
2024-06-18 20:41:01 +02:00
Daan De Meyer
30df42a927 tpm2-setup: Don't fail if we can't access the TPM due to authorization failure
The TPM might be password/pin protected for various reasons even if
there is no SRK yet. Let's handle those cases gracefully instead of
failing the unit as it is enabled by default.

(cherry picked from commit d6518003f8ebbfb6f85dbf227736ae05b0961199)
2024-06-18 20:41:01 +02:00
q66
514ef0f93b strbuf: use GREEDY_REALLOC to grow the buffer
This allows us to reserve a bunch of capacity ahead of time,
improving the performance of hwdb significantly thanks to not
having to reallocate so many times.

Before:
```
$ sudo time valgrind --leak-check=full ./systemd-hwdb update
==113297== Memcheck, a memory error detector
==113297== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==113297== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
==113297== Command: ./systemd-hwdb update
==113297==
==113297==
==113297== HEAP SUMMARY:
==113297==     in use at exit: 0 bytes in 0 blocks
==113297==   total heap usage: 1,412,640 allocs, 1,412,640 frees, 117,920,009,195 bytes allocated
==113297==
==113297== All heap blocks were freed -- no leaks are possible
==113297==
==113297== For lists of detected and suppressed errors, rerun with: -s
==113297== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
132.44user 21.15system 2:35.61elapsed 98%CPU (0avgtext+0avgdata 228560maxresident)k
0inputs+25296outputs (0major+6886930minor)pagefaults 0swaps
```

After:
```
$ sudo time valgrind --leak-check=full ./systemd-hwdb update
==112572== Memcheck, a memory error detector
==112572== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==112572== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
==112572== Command: ./systemd-hwdb update
==112572==
==112572==
==112572== HEAP SUMMARY:
==112572==     in use at exit: 0 bytes in 0 blocks
==112572==   total heap usage: 1,320,113 allocs, 1,320,113 frees, 70,614,501 bytes allocated
==112572==
==112572== All heap blocks were freed -- no leaks are possible
==112572==
==112572== For lists of detected and suppressed errors, rerun with: -s
==112572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
21.94user 0.19system 0:22.23elapsed 99%CPU (0avgtext+0avgdata 229876maxresident)k
0inputs+25264outputs (0major+57275minor)pagefaults 0swaps
```

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
(cherry picked from commit 621b10fe2c3203c537996e84c7c89b0ff994ad93)
2024-06-18 20:41:01 +02:00
Daan De Meyer
a3d94332a2 rules: Limit the number of device units generated for serial ttys
As per the suggestion in https://github.com/systemd/systemd/issues/33242.

This reduces the number of /dev/ttySXX device units generated in
mkosi from 32 to 4.

(cherry picked from commit dc38f9addd04c34d1fd743efc407bdebb3573d05)
2024-06-18 20:41:01 +02:00
Yu Watanabe
0d573787ea sd-dhcp-server: clear buffer before receive
I do not think this is necessary, but all other places in
libsystemd-network we clear buffer before receive. Without this,
Coverity warns about use-of-uninitialized-values.
Let's silence Coverity.

Closes CID#1469721.

(cherry picked from commit 40f9fa0af4c3094d93e833e62f7e301cd453da62)
2024-06-18 20:41:01 +02:00
Lennart Poettering
f2b5c1ff51 hostnamed: don't allow hostnamed to exit on idle if varlink connections are still ongoing
And while we are at it, ongoing PK authorizations are also a reason to
block exit on idle.

(cherry picked from commit ac908152b3b43a49f793d225c075423422cd3e33)
2024-06-18 20:41:01 +02:00
Zbigniew Jędrzejewski-Szmek
d918804408 man/systemd: reorder content a bit
Section "Description" didn't actually say what systemd does. And we had a giant
"Concepts" section that actually described units types and other details about
them. So let's move the basic description of functionality to "Description" and
rename the following section to "Units".

The link to the Original Design Document is moved to "See Also", it is of
historical interest mostly at this point.

The only actual change is that when talking about API filesystems, /dev is also
mentioned. (I think /sys+/proc+/dev are the canonical set and should be always
listed on one breath.)

(cherry picked from commit f11aaf7dfb295de429b1567282b19caaba036bba)
2024-06-18 20:41:01 +02:00
Luca Boccassi
1c27c902ad
Create CNAME 2024-06-11 23:04:12 +01:00
Luca Boccassi
5c79cdec10 Finalize NEWS and version for v256 v256 2024-06-11 22:42:06 +01:00