]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
14 months agobuild(deps): bump super-linter/super-linter from 6.6.0 to 7.1.0
dependabot[bot] [Sun, 1 Sep 2024 09:10:23 +0000 (09:10 +0000)] 
build(deps): bump super-linter/super-linter from 6.6.0 to 7.1.0

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 6.6.0 to 7.1.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/88ea3923a7e1f89dd485d079f6eb5f5e8f937589...b92721f792f381cedc002ecdbb9847a15ece5bb8)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agobuild(deps): bump systemd/mkosi
dependabot[bot] [Sun, 1 Sep 2024 09:10:17 +0000 (09:10 +0000)] 
build(deps): bump systemd/mkosi

Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 8c2f828701a1bdb3dc9b80d6f2ab979f0430a6b8 to 31b4e756c1484c302435653da5d3b9bdfae38518.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/8c2f828701a1bdb3dc9b80d6f2ab979f0430a6b8...31b4e756c1484c302435653da5d3b9bdfae38518)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agoMerge pull request #34240 from DaanDeMeyer/mkosi
Daan De Meyer [Tue, 3 Sep 2024 15:52:43 +0000 (17:52 +0200)] 
Merge pull request #34240 from DaanDeMeyer/mkosi

mkosi: Rework debian/ubuntu prepare script to install dependencies

14 months agomkosi: Use apt patterns to install dependencies on Debian/Ubuntu 34240/head
Daan De Meyer [Tue, 3 Sep 2024 13:18:49 +0000 (15:18 +0200)] 
mkosi: Use apt patterns to install dependencies on Debian/Ubuntu

Instead of parsing the human readable output of apt-cache, let's
use apt patterns to figure out the dependencies.

We also filter out virtual packages as apt will fail and say we need
to install an implementation of the virtual package even if a package
that provides the virtual package is already installed.

14 months agomkosi: Make systemd package filtering more robust
Daan De Meyer [Tue, 3 Sep 2024 10:53:23 +0000 (12:53 +0200)] 
mkosi: Make systemd package filtering more robust

Let's not just filter everything with systemd in the name, but instead
use the same list of volatile packages that we install to do the
filtering.

14 months agoMerge pull request #34236 from DaanDeMeyer/manager-split
Daan De Meyer [Tue, 3 Sep 2024 11:47:53 +0000 (13:47 +0200)] 
Merge pull request #34236 from DaanDeMeyer/manager-split

json-util: Add more builders

14 months agojson-util: Add JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL() 34236/head
Daan De Meyer [Fri, 23 Aug 2024 12:57:12 +0000 (14:57 +0200)] 
json-util: Add JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL()

14 months agojson-util: Add JSON_BUILD_TRISTATE() and friends
Daan De Meyer [Tue, 13 Aug 2024 14:39:04 +0000 (16:39 +0200)] 
json-util: Add JSON_BUILD_TRISTATE() and friends

14 months agojson-util: Add JSON_BUILD_PAIR_BASE64_NON_EMPTY() and friends
Daan De Meyer [Tue, 13 Aug 2024 11:04:06 +0000 (13:04 +0200)] 
json-util: Add JSON_BUILD_PAIR_BASE64_NON_EMPTY() and friends

14 months agojson-util: Add JSON_BUILD_PAIR_BYTE_ARRAY_NON_EMPTY()
Daan De Meyer [Sat, 10 Aug 2024 11:42:32 +0000 (13:42 +0200)] 
json-util: Add JSON_BUILD_PAIR_BYTE_ARRAY_NON_EMPTY()

14 months agojson-util: Add JSON_BUILD_PAIR_INTEGER_NON_NEGATIVE()
Daan De Meyer [Fri, 9 Aug 2024 14:25:32 +0000 (16:25 +0200)] 
json-util: Add JSON_BUILD_PAIR_INTEGER_NON_NEGATIVE()

14 months agojson-util: Add JSON_BUILD_PAIR_INTEGER_NON_ZERO()
Daan De Meyer [Fri, 9 Aug 2024 13:12:22 +0000 (15:12 +0200)] 
json-util: Add JSON_BUILD_PAIR_INTEGER_NON_ZERO()

14 months agojson-util: Add JSON_BUILD_PAIR_CALLBACK_NON_NULL()
Daan De Meyer [Fri, 9 Aug 2024 11:40:43 +0000 (13:40 +0200)] 
json-util: Add JSON_BUILD_PAIR_CALLBACK_NON_NULL()

Like JSON_BUILD_PAIR_CALLBACK(), but doesn't add anything to the variant
if the callback doesn't put anything in the return argument.

14 months agojson-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP_NON_NULL()
Daan De Meyer [Thu, 8 Aug 2024 12:16:01 +0000 (14:16 +0200)] 
json-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP_NON_NULL()

14 months agojson-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP()
Daan De Meyer [Thu, 8 Aug 2024 11:43:05 +0000 (13:43 +0200)] 
json-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP()

14 months agojson-util: Add JSON_BUILD_RATELIMIT()
Daan De Meyer [Thu, 8 Aug 2024 11:51:30 +0000 (13:51 +0200)] 
json-util: Add JSON_BUILD_RATELIMIT()

14 months agojson-util: Add JSON_BUILD_STRING_ORDERED_SET()
Daan De Meyer [Wed, 7 Aug 2024 07:45:44 +0000 (09:45 +0200)] 
json-util: Add JSON_BUILD_STRING_ORDERED_SET()

14 months agoMerge pull request #34190 from DaanDeMeyer/repart-compress
Daan De Meyer [Tue, 3 Sep 2024 08:48:39 +0000 (10:48 +0200)] 
Merge pull request #34190 from DaanDeMeyer/repart-compress

repart: Add compression support

14 months agoMerge pull request #34228 from poettering/uki-with-many-prep1
Lennart Poettering [Tue, 3 Sep 2024 07:50:37 +0000 (09:50 +0200)] 
Merge pull request #34228 from poettering/uki-with-many-prep1

Two preparatory EFI library additions

14 months agorepart: Add compression support 34190/head
Daan De Meyer [Fri, 30 Aug 2024 12:09:06 +0000 (14:09 +0200)] 
repart: Add compression support

Now that mkfs.btrfs is adding support for compressing the generated
filesystem (https://github.com/kdave/btrfs-progs/pull/882), let's
add general support for specifying the compression algorithm and
compression level to use.

We opt to not parse the specified compression algorithm and instead
pass it on as is to the mkfs tool. This has a few benefits:

- We support every compression algorithm supported by every tool
  automatically.
- Users don't need to modify systemd-repart if a mkfs tool learns a
  new compression algorithm in the future
- We don't need to maintain a bunch of tables for filesystem to map
  from our generic compression algorithm enum to the filesystem specific
  names.

We don't add support for btrfs just yet until the corresponding PR
in btrfs-progs is merged.

14 months agoTEST-58-REPART: Only skip part of testcase_minimize() that requires root
Daan De Meyer [Sun, 1 Sep 2024 07:33:00 +0000 (09:33 +0200)] 
TEST-58-REPART: Only skip part of testcase_minimize() that requires root

14 months agoTEST-58-REPART: Always run TEST-58-REPART in virtual machine
Daan De Meyer [Sat, 31 Aug 2024 21:05:11 +0000 (23:05 +0200)] 
TEST-58-REPART: Always run TEST-58-REPART in virtual machine

Required for various tests in TEST-58-REPART.

14 months agomkosi: Don't create sanitizer wrappers for every mkfs binary
Daan De Meyer [Sun, 1 Sep 2024 07:31:12 +0000 (09:31 +0200)] 
mkosi: Don't create sanitizer wrappers for every mkfs binary

mksquashfs for some reason ends up in nss_systemd and mkfs.btrfs
links against libudev. The others don't need a sanitizer wrapper
script.

14 months agoMerge pull request #34149 from DaanDeMeyer/btrfs
Daan De Meyer [Tue, 3 Sep 2024 06:47:50 +0000 (08:47 +0200)] 
Merge pull request #34149 from DaanDeMeyer/btrfs

repart: Switch to new mkfs.btrfs subvolume API

14 months agoresolve: fix typo
Yu Watanabe [Tue, 3 Sep 2024 05:00:15 +0000 (14:00 +0900)] 
resolve: fix typo

Follow-up for 67d0ce8843d612a2245d0966197d4f528b911b66.

14 months agoresolved: include Varlink error on inconsistent DNS-SD services in introspection...
Lennart Poettering [Fri, 23 Aug 2024 08:43:40 +0000 (10:43 +0200)] 
resolved: include Varlink error on inconsistent DNS-SD services in introspection data

Let's also rename the error slightly, since what happens here is that a
a valid service RR name is CNAME'd onto an invalid one. That's an
inconsistency on the server side, which we really should report as such.

Follow-up for: b48ab08732a76b7337628e1e716f11c687000903

14 months agoMerge pull request #34140 from yuwata/conf-parser-log-message
Yu Watanabe [Mon, 2 Sep 2024 23:20:07 +0000 (08:20 +0900)] 
Merge pull request #34140 from yuwata/conf-parser-log-message

conf-parser: introduce log_syntax_parse_error() and use it

14 months agoMerge pull request #34202 from AdrianVovk/sysupdated-fixups
Adrian Vovk [Mon, 2 Sep 2024 20:35:02 +0000 (16:35 -0400)] 
Merge pull request #34202 from AdrianVovk/sysupdated-fixups

sysupdated: Bugfixes & improvements

14 months agotest: don't install Python scripts from systemd-test RPM
Frantisek Sumsal [Mon, 2 Sep 2024 14:24:35 +0000 (16:24 +0200)] 
test: don't install Python scripts from systemd-test RPM

The original regex didn't cover the `run-unit-tests.py` script that
made the old framework pull in Python into the test image, which in turn
allowed the new TEST-69-SHUTDOWN Python script to get executed in the
old framework's image, causing unexpected fails with latest Python on
Rawhide.

14 months agosysupdated: Improve logging about jobs 34202/head
Adrian Vovk [Sat, 31 Aug 2024 04:42:54 +0000 (00:42 -0400)] 
sysupdated: Improve logging about jobs

If someone runs `updatectl update`, sysupdate will be running multiple
update jobs at the same time, which can make reasoning about the output
in the journal quite difficult. Especially if things go wrong: the error
messages didn't mention which job failed. Nor was there any link between
job ID and the PID of the worker process logging to the journal. This
is all fixed here!

14 months agosysupdated: Cleanup handling of notifications
Adrian Vovk [Sat, 31 Aug 2024 04:10:23 +0000 (00:10 -0400)] 
sysupdated: Cleanup handling of notifications

Cuts out some `strdup`s, and also avoids a rather weird case of donating
memory to a function. Basically just duplicates the solution I just
implemented for sysupdate's callout handler.

14 months agosysupdate: Don't ignore callout binary failure
Adrian Vovk [Sat, 31 Aug 2024 03:58:19 +0000 (23:58 -0400)] 
sysupdate: Don't ignore callout binary failure

Previously, if the callout binary (i.e. sd-pull, sd-import) failed
gracefully, we'd return its exit status from the event loop and thus
from run_callout(). Of course, exit status is a positive number in the
event of failure. Which means that we completely ignore the callout
binary failing, and instead continue using whatever it managed to
download before failing.

This is bad for obvious reasons, not the least of which is installing
a half-downloaded OS. This also means that we would completely ignore
failed signature checks 😬️

14 months agoportable: ensure PORTABLE_FORCE_ATTACH works even when there is a leftover unit
Luca Boccassi [Fri, 30 Aug 2024 16:55:18 +0000 (17:55 +0100)] 
portable: ensure PORTABLE_FORCE_ATTACH works even when there is a leftover unit

Force means force, we skip checks with PID1 for existing units, but
then bail out with EEXIST if the files are actually there. Overwrite
everything instead.

14 months agoefi: add file_handle_read() helper that reads from a file handle 34228/head
Lennart Poettering [Fri, 28 Jun 2024 17:40:27 +0000 (19:40 +0200)] 
efi: add file_handle_read() helper that reads from a file handle

14 months agoefi: return pointer to processed string in strtolower8()/strtolower16()
Lennart Poettering [Thu, 4 Jul 2024 15:13:02 +0000 (17:13 +0200)] 
efi: return pointer to processed string in strtolower8()/strtolower16()

15 months agoconf-parser: use log_syntax_parse_error() and friends more 34140/head
Yu Watanabe [Tue, 27 Aug 2024 01:59:53 +0000 (10:59 +0900)] 
conf-parser: use log_syntax_parse_error() and friends more

This also makes all conf parsers defined in conf-parser.c return 1
on success, 0 on non-critical error.
Also, use free_and_strdup_warn() where applicable.

15 months agoconf-parser: several cleanups for DEFINE_CONFIG_PARSE_ENUMV() macro
Yu Watanabe [Sun, 1 Sep 2024 21:11:32 +0000 (06:11 +0900)] 
conf-parser: several cleanups for DEFINE_CONFIG_PARSE_ENUMV() macro

- use GREEDY_REALLOC() and FOREACH_ARRAY(),
- do not set an array with only terminating 'invalid' value.

Note, this macro is only used by parsing NamePolicy= and AlternativeNamesPolicy=
in .link files. and udevd correctly handles both an empty array and an
array with only 'invalid'. Hence, this does not change any behavior.

15 months agotree-wide: drop msg argument for DEFINE_CONFIG_PARSE() macro and friends
Yu Watanabe [Tue, 27 Aug 2024 01:20:03 +0000 (10:20 +0900)] 
tree-wide: drop msg argument for DEFINE_CONFIG_PARSE() macro and friends

This makes the macros use log_syntax_parse_error(), hopefully which provides
more informative log message in general, and reduces binary size.

15 months agolog: protect errno from log_syntax_invalid_utf8_internal()
Yu Watanabe [Sun, 1 Sep 2024 07:17:08 +0000 (16:17 +0900)] 
log: protect errno from log_syntax_invalid_utf8_internal()

Potentially, utf8_escape_invalid() called by
log_syntax_invalid_utf8_internal() may update errno.

15 months agolog: introduce log_syntax_parse_error()
Yu Watanabe [Thu, 22 Aug 2024 05:14:03 +0000 (14:14 +0900)] 
log: introduce log_syntax_parse_error()

This provides generic error message for failures in conf parsers.
Currently this is not used, but will be used later.

15 months agotest: modernize test-networkd-conf
Yu Watanabe [Tue, 27 Aug 2024 02:47:35 +0000 (11:47 +0900)] 
test: modernize test-networkd-conf

15 months agotest: modernize test-conf-parser.c
Yu Watanabe [Tue, 27 Aug 2024 02:58:25 +0000 (11:58 +0900)] 
test: modernize test-conf-parser.c

15 months agoconf-parser: make config_parse_strv() stricter and optionally drop duplicated entries
Yu Watanabe [Sat, 31 Aug 2024 02:22:55 +0000 (11:22 +0900)] 
conf-parser: make config_parse_strv() stricter and optionally drop duplicated entries

15 months agoconf-parser: fix memleak in config_parse_calendar()
Yu Watanabe [Tue, 27 Aug 2024 02:17:56 +0000 (11:17 +0900)] 
conf-parser: fix memleak in config_parse_calendar()

Fixes a bug introduced by 0e10c3d8724b0a5d07871c9de71565ac91dd55b7 (#25049).

15 months agonetwork/route: fix typo
Yu Watanabe [Sun, 1 Sep 2024 13:03:09 +0000 (22:03 +0900)] 
network/route: fix typo

Follow-up for c8dbf9acc10939f2d6c4bdd8cdee1d2ff9a4204e.

15 months agoMerge pull request #34213 from yuwata/network-route-fix-weight
Luca Boccassi [Sun, 1 Sep 2024 10:54:05 +0000 (11:54 +0100)] 
Merge pull request #34213 from yuwata/network-route-fix-weight

network/route: fix adjustment of nexthop weight

15 months agonetwork/route: fix adjustment of nexthop weight 34213/head
Yu Watanabe [Sun, 1 Sep 2024 02:52:12 +0000 (11:52 +0900)] 
network/route: fix adjustment of nexthop weight

Fixes #34167.

15 months agonetwork/route: also update source, status, and so on EEXIST
Yu Watanabe [Sun, 1 Sep 2024 01:39:51 +0000 (10:39 +0900)] 
network/route: also update source, status, and so on EEXIST

Otherwise, an existing route may be labeled as foreign even after we
reconfigure it.

15 months agonetwork/route: also show weight of gateway in debugging logs
Yu Watanabe [Sun, 1 Sep 2024 02:09:45 +0000 (11:09 +0900)] 
network/route: also show weight of gateway in debugging logs

15 months agobasic/raw-clone: refuse CLONE_PIDFD too
Mike Yuan [Wed, 28 Aug 2024 17:15:10 +0000 (19:15 +0200)] 
basic/raw-clone: refuse CLONE_PIDFD too

15 months agodocs/UIDS-GIDS: drop obsolete comment about Fedora
Zbigniew Jędrzejewski-Szmek [Sat, 31 Aug 2024 10:58:00 +0000 (13:58 +0300)] 
docs/UIDS-GIDS: drop obsolete comment about Fedora

https://fedoraproject.org/wiki/Changes/RenameNobodyUser, 2018:
> Use "nobody:nobody" as the names for the kernel overflow UID:GID pair, and
> retire the old "nfsnobody" name and the old "nobody:nobody" pair with 99:99
> numbers.

15 months agotest-network: use the same MTU bytes for veth interfaces
Yu Watanabe [Sat, 31 Aug 2024 07:28:14 +0000 (16:28 +0900)] 
test-network: use the same MTU bytes for veth interfaces

Hopefully fixes #34204.

15 months agolabeler: set network label when tests for networkd or friends are updated
Yu Watanabe [Sat, 31 Aug 2024 07:33:59 +0000 (16:33 +0900)] 
labeler: set network label when tests for networkd or friends are updated

15 months agoMerge pull request #34198 from AdrianVovk/updatectl-bugfixes
Yu Watanabe [Sat, 31 Aug 2024 06:20:15 +0000 (15:20 +0900)] 
Merge pull request #34198 from AdrianVovk/updatectl-bugfixes

updatectl: Bugfixes

15 months agoman: fix typos
Christoph Anton Mitterer [Sat, 31 Aug 2024 03:40:52 +0000 (05:40 +0200)] 
man: fix typos

Closes #34199.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
15 months agoprogress-bar: Add unbuffered variant 34198/head
Adrian Vovk [Sat, 31 Aug 2024 02:39:17 +0000 (22:39 -0400)] 
progress-bar: Add unbuffered variant

The progress_bar functions do their own buffering: they reconfigure
stderr, then print, then flush and disable buffering on their own. In
situations where multiple progress bars are being drawn at a time (for
example, in updatectl), it's even more efficient to hoist the buffering
and flushing to the call site, and avoid drawing each progress bar
individually.

To that end, new _unbuffered variants of the progress_bar functions. And
we use them in updatectl.

15 months agoupdatectl: Improve behavior of progress logging
Adrian Vovk [Sat, 31 Aug 2024 01:57:07 +0000 (21:57 -0400)] 
updatectl: Improve behavior of progress logging

This applies a couple of aesthetic changes to the way updatectl renders
progress information

1. We invert from "ICON TARGET MESSAGE" to "TARGET: ICON MESSAGE" to
   better fit in with the systemd progress bars, which look like
   "TARGET [==========---------] XX%". The original version of the
   sysupdated PR implemented its own progress bars that were oriented
   differently: "[==========---------] TARGET XX%". When we swapped
   the progress bar we didn't swap the status messages

2. When a target finishes updating, instead of leaving a 100% progress
   bar on screen for potentially extended periods of time (which implies
   to the user that the update isn't actually done...), we show a status
   message saying the target is done updating.

3. Fixed a minor bug where an extra newline would be printed after the
   total progress bar. At the top of the rendering function, we scroll
   the terminal's scroll-back just enough to fit a line for each target,
   and one for the total. This means that we should not print an
   additional line after the total, or else it'll scroll the terminal's
   buffer by an additional character. This bug was introduced at some
   point during review

4. Clears the Total progress bar before quitting. By the time we're
   quitting, that progress bar will be showing no useful status for the
   user. Also, the fix in point 3 will cause the shell's prompt to
   appear on the same line as the Total progress bar, partially
   overwriting it and leaving the shell in a glitchy state.

15 months agoman: fix typo
Yu Watanabe [Sat, 31 Aug 2024 02:19:13 +0000 (11:19 +0900)] 
man: fix typo

Follow-up for 1ff0164be5978b824d2213bc546dac66619e1a48.

15 months agoupdatectl: Ensure we clear the progress bar
Adrian Vovk [Sat, 31 Aug 2024 01:53:14 +0000 (21:53 -0400)] 
updatectl: Ensure we clear the progress bar

Otherwise we end up half-overwriting the progress bar, which looks buggy

15 months agosysupdated: Register known error types
Adrian Vovk [Sat, 31 Aug 2024 01:43:44 +0000 (21:43 -0400)] 
sysupdated: Register known error types

This fixes a bug introduced during review of sysupdated. Originally,
we just returned EALREADY verbatim to signify that the target is
already up-to-date. Then we switched this to a proper error
(org.freedesktop.sysupdate1.NoCandidate) during review. But that now
maps to EIO, not EALREADY. Thus, whenever there's nothing to update,
updatectl would report I/O errors to the user, even though nothing
actually went wrong.

15 months agoprogress-bar: Put a space after the prefix
Adrian Vovk [Sat, 31 Aug 2024 01:25:37 +0000 (21:25 -0400)] 
progress-bar: Put a space after the prefix

We always want a space there. So let's just put one in the drawing
routine, and adjust the call cites to avoid adding a second one.

15 months agoMerge pull request #34189 from poettering/cryptenroll-slot-fix
Yu Watanabe [Fri, 30 Aug 2024 19:26:02 +0000 (04:26 +0900)] 
Merge pull request #34189 from poettering/cryptenroll-slot-fix

cryptenroll: don't return slot 0 when we have no policy to search for

15 months agorepart: Keep existing directory timestamps intact when copying
Daan De Meyer [Thu, 29 Aug 2024 20:59:48 +0000 (22:59 +0200)] 
repart: Keep existing directory timestamps intact when copying

Otherwise, when merging multiple directory trees, the output becomes
unreproducible as the directory timestamps will be changed to the current
time when copying identical directories from the second tree.

We introduce a new copy flag to achieve this behavior.

15 months agoUse correct error code in log message in pkcs11_token_find_x509_certificate (#34187)
PavlNekrasov [Fri, 30 Aug 2024 14:18:56 +0000 (17:18 +0300)] 
Use correct error code in log message in pkcs11_token_find_x509_certificate (#34187)

15 months agotest: when refusing to run slow tests, mention how to run them 34189/head
Lennart Poettering [Thu, 29 Aug 2024 15:07:46 +0000 (17:07 +0200)] 
test: when refusing to run slow tests, mention how to run them

Let's be helpful and provide an actionable hint.

15 months agocrypenroll: make slot wiping on pin change a bit more explicit
Lennart Poettering [Wed, 28 Aug 2024 14:52:43 +0000 (16:52 +0200)] 
crypenroll: make slot wiping on pin change a bit more explicit

15 months agocryptenroll: don't return slot 0 when we have no policy to search for
Lennart Poettering [Thu, 29 Aug 2024 10:54:40 +0000 (12:54 +0200)] 
cryptenroll: don't return slot 0 when we have no policy to search for

If the policy hash is empty we shouldn't return "0" from
search_policy_hash(), because that is understood as slot index 0, but
that's unlikely to match the policy.

Hence, return -ENOENT instead, indicating that we can't find a matching
slot.

15 months agocryptenroll: iovec'ify a few more things
Lennart Poettering [Tue, 27 Aug 2024 14:31:39 +0000 (16:31 +0200)] 
cryptenroll: iovec'ify a few more things

15 months agomkosi: update debian commit reference
Luca Boccassi [Fri, 30 Aug 2024 08:30:28 +0000 (09:30 +0100)] 
mkosi: update debian commit reference

bb6db3edfe Install new sd-sysupdated files in systemd-container

15 months agorepart: Switch to new mkfs.btrfs subvolume API 34149/head
Daan De Meyer [Tue, 27 Aug 2024 13:54:12 +0000 (15:54 +0200)] 
repart: Switch to new mkfs.btrfs subvolume API

In https://github.com/kdave/btrfs-progs/pull/877 the API is changing
to "--subvol <path>:ro,default" so let's adapt our usage to match.

This also adds support for read-only subvolumes.

Fixes #34134

15 months agorepart: Remove unused Context argument from make_subvolumes_set()
Daan De Meyer [Fri, 30 Aug 2024 10:15:15 +0000 (12:15 +0200)] 
repart: Remove unused Context argument from make_subvolumes_set()

15 months agorepart: Fix memory leak
Daan De Meyer [Wed, 28 Aug 2024 12:29:50 +0000 (14:29 +0200)] 
repart: Fix memory leak

15 months agoimage-policy: Fix size assertion
Daan De Meyer [Tue, 27 Aug 2024 13:27:08 +0000 (15:27 +0200)] 
image-policy: Fix size assertion

We're going to write a null pointer to l[m] so we need to make sure
m is smaller than the size of the array, not m + 1.

15 months agoimage-policy: Fix strv size calculation
Daan De Meyer [Tue, 27 Aug 2024 13:26:20 +0000 (15:26 +0200)] 
image-policy: Fix strv size calculation

We want the logarithm of the next power of two, which is the same
as the mask + 1, so add one to the mask to make sure the size is
sufficient to fit all flags.

15 months agotreewide: use sd_json_variant_un{hex|base64}() pervasively
Lennart Poettering [Thu, 29 Aug 2024 19:36:05 +0000 (21:36 +0200)] 
treewide: use sd_json_variant_un{hex|base64}() pervasively

Use these helpers whenever appropriate. Drop separate string checks,
since these helpers already do them anyway.

No actual code change, just a rework to make use of a nice helper we
have already.

15 months agoupdate TODO
Lennart Poettering [Thu, 29 Aug 2024 14:13:42 +0000 (16:13 +0200)] 
update TODO

15 months agohwdb: add entry for Dell AlpsPS/2 ALPS DualPoint TouchPad
Yu Watanabe [Fri, 30 Aug 2024 04:08:40 +0000 (13:08 +0900)] 
hwdb: add entry for Dell AlpsPS/2 ALPS DualPoint TouchPad

Closes #34133.

15 months agomkosi: Don't fetch remote if the commit to check out already exists
Daan De Meyer [Thu, 29 Aug 2024 16:36:55 +0000 (18:36 +0200)] 
mkosi: Don't fetch remote if the commit to check out already exists

If the commit we're about to check out already exists in the local
repository, don't fetch from the remote repository.

15 months ago hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x dGPU
Filip Lewiński [Wed, 28 Aug 2024 17:33:43 +0000 (19:33 +0200)] 
 hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x dGPU

Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
15 months agopo: Translated using Weblate (Swedish)
Göran Uddeborg [Thu, 29 Aug 2024 13:33:49 +0000 (15:33 +0200)] 
po: Translated using Weblate (Swedish)

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main

15 months agotest: add test for GetUnitByPID() D-Bus method
Yu Watanabe [Thu, 29 Aug 2024 09:53:31 +0000 (18:53 +0900)] 
test: add test for GetUnitByPID() D-Bus method

For issue #34104.

15 months agocore: Fix log message typo
Daan De Meyer [Thu, 29 Aug 2024 11:58:52 +0000 (13:58 +0200)] 
core: Fix log message typo

15 months agomkosi: update fedora commit reference
Daan De Meyer [Thu, 29 Aug 2024 11:26:28 +0000 (13:26 +0200)] 
mkosi: update fedora commit reference

a67221c3f0 Always build ukify package
abb115a905 Do not use patch to modify systemd-user pam config file
196ec98228 Drop %upstream conditionalization for patches

15 months agocore: do BindMount/MountImage operations in async control process
Luca Boccassi [Mon, 29 Apr 2024 15:14:12 +0000 (16:14 +0100)] 
core: do BindMount/MountImage operations in async control process

These operations might require slow I/O, and thus might block PID1's main
loop for an undeterminated amount of time. Instead of performing them
inline, fork a worker process and stash away the D-Bus message, and reply
once we get a SIGCHILD indicating they have completed. That way we don't
break compatibility and callers can continue to rely on the fact that when
they get the method reply the operation either succeeded or failed.

To keep backward compatibility, unlike reload control processes, these
are ran inside init.scope and not the target cgroup. Unlike ExecReload,
this is under our control and is not defined by the unit. This is necessary
because previously the operation also wasn't ran from the target cgroup,
so suddenly forking a copy-on-write copy of pid1 into the target cgroup
will make memory usage spike, and if there is a MemoryMax= or MemoryHigh=
set and the cgroup is already close to the limit, it will cause an OOM
kill, where previously it would have worked fine.

15 months agoukify: Skip test on architectures without UEFI
Daan De Meyer [Wed, 28 Aug 2024 12:08:30 +0000 (14:08 +0200)] 
ukify: Skip test on architectures without UEFI

15 months agotest: mount ld.so.cache in minimal nspawn container if present
Luca Boccassi [Wed, 28 Aug 2024 21:08:33 +0000 (22:08 +0100)] 
test: mount ld.so.cache in minimal nspawn container if present

In some cases (SUSE Tumbleweed) this is needed as a library (libz) is
not in the default path, so it fails to run.

15 months agoMerge pull request #34160 from weblate/weblate-systemd-main
Yu Watanabe [Wed, 28 Aug 2024 22:54:03 +0000 (07:54 +0900)] 
Merge pull request #34160 from weblate/weblate-systemd-main

Translations update from Fedora Weblate

15 months agopo: Translated using Weblate (Swedish) 34160/head
Göran Uddeborg [Wed, 28 Aug 2024 19:48:51 +0000 (21:48 +0200)] 
po: Translated using Weblate (Swedish)

Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main

15 months agopo: Translated using Weblate (Swedish)
Weblate Translation Memory [Wed, 28 Aug 2024 19:48:50 +0000 (21:48 +0200)] 
po: Translated using Weblate (Swedish)

Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 89.7% (227 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/sv/
Translation: systemd/main

15 months agomkosi: Switch back to src.opensuse.org for opensuse spec
Daan De Meyer [Wed, 28 Aug 2024 15:52:40 +0000 (17:52 +0200)] 
mkosi: Switch back to src.opensuse.org for opensuse spec

Supposedly they're never going to rewrite their git history again
so let's give src.opensuse.org another try given that code.opensuse.org
is down again.

15 months agotest: Set show_status=error
Daan De Meyer [Wed, 28 Aug 2024 15:32:53 +0000 (17:32 +0200)] 
test: Set show_status=error

The TEST-64-UDEV-STORAGE tests fail before we even start the test.
Let's set show_status=error to get more information when those failures
happen.

15 months agouser-record: add helper that checks if a user record is root or the nobody user
Lennart Poettering [Mon, 26 Aug 2024 14:38:59 +0000 (16:38 +0200)] 
user-record: add helper that checks if a user record is root or the nobody user

15 months agoMerge pull request #34142 from DaanDeMeyer/update-distributions
Luca Boccassi [Wed, 28 Aug 2024 16:17:12 +0000 (17:17 +0100)] 
Merge pull request #34142 from DaanDeMeyer/update-distributions

mkosi: Update distribution packaging commits

15 months agonspawn: propagate SSH authorized keys when binding user into contaier via --bind...
Lennart Poettering [Mon, 26 Aug 2024 15:29:15 +0000 (17:29 +0200)] 
nspawn: propagate SSH authorized keys when binding user into contaier via --bind-user=

This means the host user typically can just log into his own account
bound into the container via SSH.

15 months agoTODO: add note about live mounting via pinned namespace fd
Luca Boccassi [Wed, 28 Aug 2024 15:57:07 +0000 (16:57 +0100)] 
TODO: add note about live mounting via pinned namespace fd

15 months agomkosi: use util-linux's autologin
Luca Boccassi [Wed, 28 Aug 2024 12:53:31 +0000 (13:53 +0100)] 
mkosi: use util-linux's autologin

login is now from util-linux so credentials are supported.
It also needs to be pulled in as it's Protected: yes rather than
Essential: yes.

Keep the old setting for Ubuntu as that still uses login from shadow.

15 months agomkosi: update debian commit reference 34142/head
Daan De Meyer [Wed, 28 Aug 2024 07:46:10 +0000 (09:46 +0200)] 
mkosi: update debian commit reference

aa17b7ddf9 Fix stage1 build
2c13391e33 Update changelog for 256.5-1 release
7d13196926 autopkgtest: skip TEST-64-UDEV-STORAGE due to qemu crash
47769e8d7c Drop patch merged upstream
*   4e8e9315b5 Update upstream source from tag 'upstream/256.5'
|\
| * 71b885347d New upstream version 256.5
89a33e5408 d/e/checkout-upstream: undo quilt patches before switching debian branch
3c942ecb0d d/e/checkout-upstream: do not rebase on main when building stable branches

15 months agomkosi: update fedora commit reference
Daan De Meyer [Wed, 28 Aug 2024 07:46:07 +0000 (09:46 +0200)] 
mkosi: update fedora commit reference

28076e6232 Only make python3-pillow Recommends on Fedora
a9807c4486 Do not require grubby on CentOS Stream 9
d38cacfd3a Version 256.5
38291e13c1 Disable integration of userdb in sshd
53118d2112 Backport patch to only read /proc/cmdline when not in container
903e8e0f88 Backport upstream patch to try more initrd variants in 90-loaderentry.install
b29a66006c Version 256.4
1cdae03391 Update tmpfiles --destroy-data patch
4fd4ef72a6 Upload sources
3c3772150d Version 256.3

15 months agomkosi: update opensuse commit reference
Daan De Meyer [Wed, 28 Aug 2024 07:46:05 +0000 (09:46 +0200)] 
mkosi: update opensuse commit reference

2866762da8 Update systemd to version 256.4 / rev 429 via SR 1192932

15 months agomkosi: update arch commit reference
Daan De Meyer [Wed, 28 Aug 2024 07:46:04 +0000 (09:46 +0200)] 
mkosi: update arch commit reference

ea5f086275 handle uncommon license
43e43faab8 upgpkg: 256.5-1: new upstream release
7f4443062f Provide /etc/cryptsetup-keys.d/
262a14b8e5 upgpkg: 256.4-1: new upstream release
1aff4eb5f6 upgpkg: 256.3-1: new upstream release