1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

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 690a85b1d4

(cherry picked from commit ce513c6c6c)
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 690a85b1d4)
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 2fe6ad5a64)
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 cca8c15599)
2024-07-05 11:38:42 +02:00
Daan De Meyer
f2c782c043 mkosi: Install pciutils
(cherry picked from commit 3cdc8da5ad)
2024-07-05 11:38:42 +02:00
Zbigniew Jędrzejewski-Szmek
054fc83a23 mkosi: move variable to the right scope
(cherry picked from commit 3690971cd0)
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 88e9230643)
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 6efab8c343)
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 5f7136a369)
2024-07-05 11:29:46 +02:00
Luca Boccassi
715d146a3a docs: fix dead link to GNOME documentation
(cherry picked from commit b22ee1010d)
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 affde1d7e7.
Fixes #33293.

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

(cherry picked from commit f97b243edf)
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 69d76823ce)
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 41064a3c97)
2024-06-18 20:41:01 +02:00
Lennart Poettering
90ec026570 tmpfiles: honour --dry-run when removing directories
(cherry picked from commit edeceb80a9)
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 f31f10a620

(cherry picked from commit 5163c9b1e5)
2024-06-18 20:41:01 +02:00
Carlo Teubner
a776dcf7af NEWS: fix typo
(cherry picked from commit f6d517f847)
2024-06-18 20:41:01 +02:00
Luca Boccassi
d89c99c7ad mkosi: bump to latest
(cherry picked from commit 3001339dc5)
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 bdd0b45bfd)
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 4f6d8ab076)
2024-06-18 20:41:01 +02:00
Mike Yuan
f7d55cc801 core/service: fix accept-socket deserialization
Follow-up for 45b1017488

(cherry picked from commit 9f5d8c3da4)
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 80468db8fa)
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 464d182b3e)
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 7d2701e7d1)
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 626518ecd5)
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 f44fc531c9)
2024-06-18 20:41:01 +02:00
Luca Boccassi
50b53b8221 test: check the skip condition before installing additional files
(cherry picked from commit e1daedb4be)
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 47fe3f29b4)
2024-06-18 20:41:01 +02:00
Luca Boccassi
21feae324e mkosi: use ports.ubuntu.com for non-x86 backports
Follow-up for 46368556af

(cherry picked from commit c01cb8cbff)
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 4cfcde024f)
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 b5c8cc0a3b)
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 9ebcac3b51)
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 3c2f2146f5)
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 acaca5ab25)
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 7811864b08)
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 bde35f4a91)
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 40d637bace)
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 726fc7ae69)
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 2ac0e52f29)
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 b99b294127)
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 91adc4db33 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: 9c47b33444 ("resolved: enable DNS proxy mode if client wants DNSSEC")
(cherry picked from commit 364c948707)
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 d6518003f8)
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 621b10fe2c)
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 dc38f9addd)
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 40f9fa0af4)
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 ac908152b3)
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 f11aaf7dfb)
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 2024-06-11 22:42:06 +01:00