Commit Graph

75360 Commits

Author SHA1 Message Date
Daan De Meyer
7fe0ea2ead Merge pull request #33857 from DaanDeMeyer/mkosi
Two small improvements
2024-07-29 15:40:48 +02:00
Daan De Meyer
ecfdecfd6a docs: Simplify hacking instructions a bit
We enable RuntimeBuildSources=yes by default so let's drop it from
the documentation.
2024-07-29 13:42:28 +02:00
Daan De Meyer
578ee05155 test: Don't mount build sources into image when running non-interactively 2024-07-29 13:40:42 +02:00
Martin Srebotnjak
be2ad93af3 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-29 10:16:40 +01:00
Luca Boccassi
0fa53f5dd7 Merge pull request #33853 from NickCao/l3mdev
network: Fixup Table when L3MasterDevice is set on routing policy rule
2024-07-29 10:15:52 +01:00
Nick Cao
615af2c77d network: Fixup Table when L3MasterDevice is set on routing policy rule 2024-07-28 14:02:07 -04:00
Nick Cao
034b7dfc08 man: network: move note about L3MasterDevice to the correct section 2024-07-28 13:51:36 -04:00
Vladimir Panteleev
3f24fa57df man: clarify systemd-path variable source 2024-07-28 10:33:49 +01:00
Vladimir Panteleev
6c1e0823b0 man: improve ManagerEnvironment documentation
- Improve wording for explanation when these variables are inherited

- Clarify that these variables are not placed in the process environment block,
  so /proc/PID/environ cannot be used as a debugging tool
2024-07-28 10:33:17 +01:00
Luca Boccassi
0462e902bf Merge pull request #33848 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-07-27 11:27:29 +01:00
Weblate Translation Memory
7f8b46724f po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Martin Srebotnjak
3607e0cf52 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Jose Ignacio Tornos Martinez
eef4cd51f9 kernel-install: remove depmod generated file modules.weakdep
The new file, modules.weakdep, generated by depmod to get the weak
dpendencies information can be present
(05828b4a6e),
so remove it like the other similar files.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-07-26 14:02:14 +01:00
Luca Boccassi
85c7a9a2f5 Merge pull request #27855 from Werkov/test-delegate-useraddfixup
Delegate/cgroup test refactor
2024-07-26 14:01:38 +01:00
Zbigniew Jędrzejewski-Szmek
e520b1258c Merge pull request #30307 from bluca/enforce_inhibitors
logind: always check for inhibitor locks
2024-07-26 13:52:34 +02:00
Ronan Pigott
cd2ce31adb resolved: Don't retry queries that indicate net error
This probably rarely helped anyway, but it also in some cases interferes
with auxiliary dnssec queries where the authoritative nameserver does
not support EDNS0/DNSSEC.

Fixes: ac6844460c ("resolved: support RFC 8914 EDE error codes")
2024-07-26 10:04:36 +01:00
Luca Boccassi
281b0bfbed Merge pull request #33842 from DaanDeMeyer/test
Two fixes
2024-07-26 10:04:20 +01:00
Michal Koutný
3e6e3e6d40 test: Fail cgroup delegation test when user cannot be created
It means: a) user cannot be created, something's wrong in the
test environment -> fail the test; b) user already exists, we shall not
continue and delete (foreign) user.
2024-07-26 10:44:10 +02:00
Daan De Meyer
ae07feb401 resize-fs: Put minimal ext4 size in the same ballpark as the other filesystems
TEST-46-HOMED fails on ext4 because the filesystem is deemed to small
for activation by cryptsetup. Let's bump the minimal filesystem size for
ext4 a bit to be in the same ballpark as ext4 and btrfs to avoid weird
errors due to impossibly small filesystems.

Also use U64_MB while we're touching this.
2024-07-26 08:27:24 +02:00
Michal Koutný
4f0541dc59 test: Reorganize testcase of cgroup delegation
There are multiple subtests, just move them around into functions
(leveraging the testcase_* convention) to make space for new related
subtests.
2024-07-25 17:29:42 +02:00
Luca Boccassi
7020fa8feb Merge pull request #33825 from DaanDeMeyer/chattr
repart: Create disk image file with copy-on-write disabled on btrfs
2024-07-25 14:11:11 +01:00
Luca Boccassi
9ce9dece4f shell completion: add support for sd-analyze capability --mask
Follow-up for 3e7a029c28
2024-07-25 13:22:27 +01:00
Luca Boccassi
a6bcab05df Merge pull request #33840 from bluca/test_locale_dbus
test: fix D-Bus policy override for TEST-73-LOCALE
2024-07-25 13:18:53 +01:00
Luca Boccassi
a1f427ab41 NEWS: mention logind inhibitors change 2024-07-25 12:22:37 +01:00
Luca Boccassi
804874d26a logind: always check for inhibitor locks
Currently inhibitors are bypassed unless an explicit request is made to
check for them, or even in that case when the requestor is root or the
same uid as the holder of the lock.

But in many cases this makes it impractical to rely on inhibitor locks.
For example, in Debian there are several convoluted and archaic
workarounds that divert systemctl/reboot to some hacky custom scripts
to try and enforce blocking accidental reboots, when it's not expected
that the requestor will remember to specify the command line option
to enable checking for active inhibitor locks.

Also in many cases one wants to ensure that locks taken by a user are
respected by actions initiated by that same user.

Change logind so that inhibitors checks are not skipped in these
cases, and systemctl so that locks are checked in order to show a
friendly error message rather than "permission denied".

Add new block-weak and delay-weak modes that keep the previous
behaviour unchanged.
2024-07-25 12:22:36 +01:00
Daan De Meyer
ebe17e3f9e TEST-54-CREDS: Specify SMBIOS creds via corresponding mkosi option
This allows mkosi to combine fstab.extra with its own fstab.extra so
that it doesn't override the one we pass for the test.
2024-07-25 13:12:16 +02:00
David Tardon
7a64c5f23e sd-event: do not assert on invalid signal
The signalfd_siginfo struct is received from outside via a FD, hence
assert() is not appropriate way to check it. Just do a normal runtime
check.
2024-07-25 11:57:05 +01:00
David Tardon
639719e010 logind-dbus: check auth. for all inhibitor operations
Fixes #33834
2024-07-25 11:55:39 +01:00
Jeffrey Bosboom
f7fa632682 docs/CONTROL_GROUP_INTERFACE.md: document accounting information available via D-Bus 2024-07-25 11:46:18 +01:00
Luca Boccassi
3bf483fc4f Merge pull request #33727 from intelfx/work/analyze-capability-masks
analyze: capability: add support for decoding capability masks
2024-07-25 11:08:21 +01:00
Mike Yuan
268f58076f basic/log: do not treat all negative errnos as synthetic
Currently, IS_SYNTHETIC_ERRNO() evaluates to true for all negative errnos,
because of the two's-complement negative value representation.
Subsequently, ERRNO= is not logged for most of our own code.
Let's fix this, by formatting all synthetic errnos as positive.
Then, treat all negative values as non-synthetic.

While at it, mark the evaluation order explicitly, and remove
unneeded comment.

Fixes #33800
2024-07-25 12:03:59 +02:00
Daan De Meyer
42e9288180 tree-wide: Don't explicity disable copy-on-write when copying images
Since the copy helpers now copy file attributes as well, let's not
explicitly disable copy-on-write anymore when we copy an image. If
the source already has copy-on-write disabled, the copy will have it
disabled as well. Otherwise, the copy will also have copy-on-write
enabled.

This makes sure that reflinks always work as reflink is only supported
if both source and target are copy-on-write or both source and target
are not copy-on-write.
2024-07-25 11:56:07 +02:00
Daan De Meyer
2356104efc copy: Copy file attributes as well
Let's make sure we copy all file attributes that can be copied as
well.
2024-07-25 11:56:05 +02:00
Luca Boccassi
30e1cbbcad mkosi: update debian commit reference
* 7eebe8c0b1 autopkgtest: allow localectl in localed tests
* c08a88ffbb Update changelog for 256.4-1 release
* 03814c87fe Fix D-Bus policy for locale1 blocking
* 16f6130038 Drop last patch, all merged upstream
* fe6956e934 Install varlinkctl zsh completion file
* 9bc2a52832 Update upstream source from tag 'upstream/256.4'
* 8574241978 New upstream version 256.4
2024-07-25 10:46:56 +01:00
Luca Boccassi
a4c436c9d8 test: fix D-Bus policy override for TEST-73-LOCALE
We don't need to allow non-root, and the policy needs to specify destination
and interface too, to narrow it down

Follow-up for 7b5c38a91d
2024-07-25 10:43:48 +01:00
Daan De Meyer
5e49684521 Make read_attr_path() more generic
Let's make this an openat() like function so it can be used in more
scenarios.
2024-07-24 18:58:41 +02:00
Daan De Meyer
4dee4e0039 repart: Create disk image file with copy-on-write disabled on btrfs
COW on btrfs generally does not play well lots of random writes so
let's make the disk images generated by repart NOCOW by default on
btrfs like we do elsewhere across the codebase.
2024-07-24 18:58:41 +02:00
Daan De Meyer
b9c0b6c011 repart: Make partition files NOCOW if the disk image is NOCOW
On btrfs, reflinks into a disk image that has copy-on-write disabled
only work if the source has copy-on-write disabled as well so let's
make sure that's the case if the disk image has copy-on-write disabled.
2024-07-24 18:58:41 +02:00
Daan De Meyer
1b05ac946a fs-util: Add XO_NOCOW flag
Let's add a flag for xopenat() that immediately makes a file NOCOW
after opening it if it's supported.
2024-07-24 18:58:41 +02:00
Daan De Meyer
32dfe3b63e fs-util: Clean up properly in xopenat_full() on labelling error
If we fail to relabel the file, we should unlink the file or directory
again, so let's make sure we do that.
2024-07-24 18:58:41 +02:00
Daan De Meyer
0dd82dab91 fs-util: Handle dangling symlinks in openat_report_new()
openat() will always resolve symlinks, except if O_NOFOLLOW is passed
or O_CREAT|O_EXCL is passed. This means that if a dangling symlink is
passed to openat_report_new(), the first call to openat() will always
fail with ENOENT and the second call to openat() will always fail with
EEXIST.

Let's catch this case explicitly and fallback to creating the file with
just O_CREAT and assume we're the ones that created the file. We can't
resolve the symlink with chase() because this function is itself called
by chase() so we could end up in weird recursive calls if we'd try to do
so.
2024-07-24 18:58:41 +02:00
Daan De Meyer
b91ad56228 test-fs-util: Modernize openat_report_new() test 2024-07-24 18:58:41 +02:00
Daan De Meyer
372e96a5a1 test-id128: Use new assertion macros 2024-07-24 18:58:40 +02:00
Daan De Meyer
60a4505da4 test: Add ASSERT_EQ_ID128() and ASSERT_NE_ID128() 2024-07-24 18:58:40 +02:00
Daan De Meyer
8eb06fd162 test: Add ASSERT_FAIL() 2024-07-24 18:58:40 +02:00
Daan De Meyer
3d6c6f9b9e mkosi: Update to latest
Includes the required fix to make mkosi copy NOCOW disk images properly.
2024-07-24 18:58:38 +02:00
Ivan Shapovalov
3e7a029c28 analyze: capability: add support for decoding capability masks
This adds support in `systemd-analyze capability` for decoding
capability masks (sets), e.g.:

```console
$ systemd-analyze capability --mask 0000000000003c00
NAME                 NUMBER
cap_net_bind_service     10
cap_net_broadcast        11
cap_net_admin            12
cap_net_raw              13
```

This is intended as a convenience tool for pretty-printing capability
values as found in e.g. `/proc/$PID/status`.
2024-07-24 17:25:47 +02:00
Luca Boccassi
11d5e2b5fb mkosi: update debian commit reference
* c7138e0b87 Configure default DNS servers for upstream CI builds
* bc5d1afe1e Drop out-of-tree localed patch and use D-Bus policy instead
* b5f8ababde autopkgtest: set Release= in mkosi.local.conf to distinguish testing vs unstable
* 323afafd80 autopkgtest: add allow-stderr to timedated test
* 0291f361e3 Install valrinkctl zsh completion file
* f40b9eba02 d/t/control: add Depends: lib{systemd,udev}-dev for upstream
* 3def595de3 d/t/upstream: ensure correct ubuntu codename is used
* 531bb6817e d/t/boot-and-services: fix a couple python sytax warnings
* 963ac13b7d d/t/boot-and-services: skip test_tmp_cleanup if tmp.mount is overridden
2024-07-24 11:38:55 +01:00
MkKvcs
af5195f7a6 hwdb: add axis range corrections for the Lenovo Thinkpad E16 2024-07-24 08:24:36 +01:00
Luca Boccassi
acf0851dcf Merge pull request #33823 from YHNdnzj/varlink-deserialize-again
core: reliably check if varlink socket has been deserialized; switch varlink server to pidref
2024-07-24 08:23:36 +01:00