]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 months agoman: `machinectl(1)`: Fix description of subcommand `poweroff` 34678/head
David Joaquín Shourabi Porcel [Tue, 8 Oct 2024 13:20:26 +0000 (15:20 +0200)] 
man: `machinectl(1)`: Fix description of subcommand `poweroff`

12 months agoman: `systemd-nspawn(1)`: Fix some typos
David Joaquín Shourabi Porcel [Fri, 12 Apr 2024 20:14:47 +0000 (22:14 +0200)] 
man: `systemd-nspawn(1)`: Fix some typos

13 months agoMerge pull request #34556 from ryantimwilson/extra-fds
Lennart Poettering [Tue, 8 Oct 2024 11:26:59 +0000 (13:26 +0200)] 
Merge pull request #34556 from ryantimwilson/extra-fds

Add ExtraFileDescriptor property to StartTransientUnit dbus API

13 months agoMerge pull request #34669 from bluca/semaphore
Yu Watanabe [Tue, 8 Oct 2024 05:42:26 +0000 (14:42 +0900)] 
Merge pull request #34669 from bluca/semaphore

Update mkosi debian ref and try to speed up semaphore build

13 months agomkosi: mark test as skipped when QEMU crashes
Luca Boccassi [Mon, 7 Oct 2024 15:48:55 +0000 (16:48 +0100)] 
mkosi: mark test as skipped when QEMU crashes

On Ubuntu/Debian infrastructure QEMU crashes a lot, so mark the test
as skipped in that case as there's nothing we can do about it and
we shouldn't mark runs as failed

13 months agosemaphore: do not build docs 34669/head
Luca Boccassi [Mon, 7 Oct 2024 18:40:31 +0000 (19:40 +0100)] 
semaphore: do not build docs

There are other CI runs that build manpages, speed up build which is close to 1hr limit

13 months agosemaphore: stop building and running extra unit tests
Luca Boccassi [Mon, 7 Oct 2024 18:38:16 +0000 (19:38 +0100)] 
semaphore: stop building and running extra unit tests

This slows down the build, which is often near the 1hr limit. There are
other jobs running the extra unit tests.

13 months agomkosi: update debian commit reference
Luca Boccassi [Mon, 7 Oct 2024 18:38:31 +0000 (19:38 +0100)] 
mkosi: update debian commit reference

51389fefca Upstream profile: skip dh_strip_nondeterminism
647fd0d40c Install kernel-install uki.conf example
ddfeb24f55 autopkgtest: skip gdm3 on armel for smoke tests

13 months agoAdd ExtraFileDescriptor property to StartTransientUnit dbus API 34556/head
Ryan Wilson [Mon, 30 Sep 2024 16:58:34 +0000 (09:58 -0700)] 
Add ExtraFileDescriptor property to StartTransientUnit dbus API

This adds the ExtraFileDescriptor property to StartTransient dbus API
with format "a(hs)" - array of (file descriptor, name) pairs. The FD
will be passed to the unit via sd_notify like Socket and OpenFile.

systemctl show also shows ExtraFileDescriptorName for these transient
units. We only show the name passed to dbus as the FD numbers will
change once passed over the unix socket and are duplicated, so its
confusing to display the numbers.

We do not add this functionality for systemd-run or general systemd
service units as it is not useful for general systemd services.
Arguably, it could be useful for systemd-run in bash scripts but we
prefer to be cautious and not expose the API yet.

Fixes: #34396
13 months agoMerge pull request #34472 from ikruglov/ikruglov/io-systemd-Machine
Daan De Meyer [Mon, 7 Oct 2024 15:22:31 +0000 (17:22 +0200)] 
Merge pull request #34472 from ikruglov/ikruglov/io-systemd-Machine

machine: implement varlink interfaces io.systemd.Machine.{List, Unregister, Terminate, Kill}

13 months agoSemaphore: switch from /tmp to /var/tmp to avoid disk space issues
Luca Boccassi [Mon, 7 Oct 2024 10:23:32 +0000 (11:23 +0100)] 
Semaphore: switch from /tmp to /var/tmp to avoid disk space issues

Builds have been failing as we run out of space in /tmp/, move to
/var/tmp

13 months agomachine: tests for varlink interfaces 34472/head
Ivan Kruglov [Mon, 7 Oct 2024 09:35:32 +0000 (11:35 +0200)] 
machine: tests for varlink interfaces

- io.systemd.Machine.List
- io.systemd.Machine.Kill
- io.systemd.Machine.Terminate
- io.systemd.Machine.Register
- io.systemd.Machine.Unregister

13 months agomachine: extend io.systemd.Machine.List output with sshPrivateKeyPath field
Ivan Kruglov [Tue, 24 Sep 2024 08:21:46 +0000 (10:21 +0200)] 
machine: extend io.systemd.Machine.List output with sshPrivateKeyPath field

Effectivelly, this is an implementation of GetMachineSSHInfo in dbus.

13 months agomachine: use JSON_BUILD_PAIR_STRING_NON_EMPTY() in io.systemd.Machine.List output
Ivan Kruglov [Mon, 7 Oct 2024 12:39:32 +0000 (14:39 +0200)] 
machine: use JSON_BUILD_PAIR_STRING_NON_EMPTY() in io.systemd.Machine.List output

13 months agomachine: introduce io.systemd.Machine.Kill varlink method
Ivan Kruglov [Mon, 7 Oct 2024 09:27:41 +0000 (11:27 +0200)] 
machine: introduce io.systemd.Machine.Kill varlink method

13 months agomachine: introduce io.systemd.Machine.Terminate varlink method
Ivan Kruglov [Mon, 7 Oct 2024 09:27:16 +0000 (11:27 +0200)] 
machine: introduce io.systemd.Machine.Terminate varlink method

13 months agomachine: introduce io.systemd.Machine.Unregister varlink method
Ivan Kruglov [Mon, 7 Oct 2024 09:26:02 +0000 (11:26 +0200)] 
machine: introduce io.systemd.Machine.Unregister varlink method

13 months agomachine: io.systemd.Machine.List supports 'pid' filter
Ivan Kruglov [Mon, 7 Oct 2024 09:22:11 +0000 (11:22 +0200)] 
machine: io.systemd.Machine.List supports 'pid' filter

13 months agoMerge pull request #34644 from yuwata/udev-node-diskseq
Luca Boccassi [Mon, 7 Oct 2024 11:17:28 +0000 (12:17 +0100)] 
Merge pull request #34644 from yuwata/udev-node-diskseq

udev-node: do not create stack directory for by-diskseq symlink

13 months agotest: set TEST_NESTED_KVM as default
Thomas Blume [Thu, 19 Sep 2024 10:02:27 +0000 (12:02 +0200)] 
test: set TEST_NESTED_KVM as default

13 months agomkosi: Switch to Fedora 41
Daan De Meyer [Mon, 7 Oct 2024 07:49:38 +0000 (09:49 +0200)] 
mkosi: Switch to Fedora 41

It's due for release soon and will fix the flakyness of TEST-58-REPART
so let's bump the Fedora 40 job to Fedora 41.

13 months agosd-json: use sd_json_dispatch_const_string() in sd_json_dispatch_string()
Yu Watanabe [Mon, 7 Oct 2024 04:27:37 +0000 (13:27 +0900)] 
sd-json: use sd_json_dispatch_const_string() in sd_json_dispatch_string()

Also, do similar for json_dispatch_user_group_name().

13 months agotree-wide: drop doubled empty lines
Yu Watanabe [Mon, 7 Oct 2024 03:47:57 +0000 (12:47 +0900)] 
tree-wide: drop doubled empty lines

13 months agonetwork: use Network.name for bus path
Yu Watanabe [Mon, 7 Oct 2024 03:39:27 +0000 (12:39 +0900)] 
network: use Network.name for bus path

No functional change, just refactoring.

13 months agonetworkctl: sort ifindexes in status command
Yu Watanabe [Mon, 7 Oct 2024 03:18:54 +0000 (12:18 +0900)] 
networkctl: sort ifindexes in status command

Before:
$ networkctl status
● Interfaces: 372, 368, 373, 375, 376, 377, 378, 379, 381, 391, 3, 1201, 1202, 1184, 1610, 9, 8, 1340, 2, 1, 1256, 7

After:
$ networkctl status
● Interfaces: 1, 2, 3, 7, 8, 9, 368, 372, 373, 375, 376, 377, 378, 379, 381, 391, 1184, 1201, 1202, 1256, 1340, 1610

13 months agohomectl: drop unnecessary brackets
Yu Watanabe [Mon, 7 Oct 2024 04:45:46 +0000 (13:45 +0900)] 
homectl: drop unnecessary brackets

Follow-up for 164ca24d7464253e5f8375226b792ef8f6eaffd0.

13 months agoMerge pull request #34491 from AdrianVovk/sysupdate-fixups
Yu Watanabe [Mon, 7 Oct 2024 06:38:58 +0000 (15:38 +0900)] 
Merge pull request #34491 from AdrianVovk/sysupdate-fixups

Quick sysupdate fixups

13 months agopo: Translated using Weblate (Kabyle)
ButterflyOfFire [Mon, 7 Oct 2024 04:52:46 +0000 (06:52 +0200)] 
po: Translated using Weblate (Kabyle)

Currently translated at 3.1% (8 of 253 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main

13 months agoMerge pull request #34408 from Werkov/fix-device-limits
Yu Watanabe [Mon, 7 Oct 2024 05:05:44 +0000 (14:05 +0900)] 
Merge pull request #34408 from Werkov/fix-device-limits

core/cgroup: Apply IODevice*= directives in configured order

13 months agocore: warn if a generator is world-writable
Lukas Nykryn [Fri, 4 Oct 2024 08:51:02 +0000 (10:51 +0200)] 
core: warn if a generator is world-writable

... because that is obviously a security risk.

13 months agohwdb: add SCAI SKU prefix for Samsung keyboard mapping (#34648)
Joshua Grisham [Mon, 7 Oct 2024 01:41:30 +0000 (03:41 +0200)] 
hwdb: add SCAI SKU prefix for Samsung keyboard mapping (#34648)

13 months agoudev-node: introduce node_remove_symlink() 34644/head
Yu Watanabe [Sun, 6 Oct 2024 05:41:23 +0000 (14:41 +0900)] 
udev-node: introduce node_remove_symlink()

Also
- make the failure propagated,
- remove /dev/block or /dev/char if empty.

Hopefully, no effective functionality changed. Just refactoring.

13 months agoudev-node: rename node_symlink() -> node_create_symlink()
Yu Watanabe [Sun, 6 Oct 2024 05:39:46 +0000 (14:39 +0900)] 
udev-node: rename node_symlink() -> node_create_symlink()

Also adds short comment for the NULL arguments.

No functional change, just refactoring.

13 months agotest: add test case for issue #34637
Yu Watanabe [Sun, 6 Oct 2024 06:39:36 +0000 (15:39 +0900)] 
test: add test case for issue #34637

13 months agoudev-node: skip stack directory creation for diskseq
Yu Watanabe [Sun, 6 Oct 2024 05:43:45 +0000 (14:43 +0900)] 
udev-node: skip stack directory creation for diskseq

The disk/by-diskseq symlink should not be shared with multiple block
devices. Hence, it is not necessary to create stack directory for the
symlink that manages which device owns the symlink.

This is not just a optimization.
If a service unit tries to mount a disk image but the service fails, then
the diskseq of the loop device for the image may be continuously increased
during restart, and inodes in /run may increase rapidly, as the stack
directories are cleaned up only when udev queue is empty.

Fixes #34637.

13 months agoTODO: fix typo
Yu Watanabe [Mon, 7 Oct 2024 00:53:57 +0000 (09:53 +0900)] 
TODO: fix typo

Follow-up for 26e6986527fe553edf35a442a520deb10c45a155.

13 months agoMerge pull request #34432 from YHNdnzj/path-lookup-refactor
Yu Watanabe [Mon, 7 Oct 2024 00:31:47 +0000 (09:31 +0900)] 
Merge pull request #34432 from YHNdnzj/path-lookup-refactor

path-lookup: several cleanups

13 months agobusctl: Support file descriptors in busctl
Ryan Wilson [Mon, 30 Sep 2024 16:52:55 +0000 (09:52 -0700)] 
busctl: Support file descriptors in busctl

Previously using file descriptors as input arguments in busctl was
unsupported with "UNIX file descriptor not supported as type."

We fix this by parsing the file descriptor as an integer and verifying
it is an available file descriptor in busctl.

Fixes: #14954
Replaces: #34551

13 months agoshutdown: In sync_with_progress(), log first then send SIGKILL
Benjamin ROBIN [Sun, 6 Oct 2024 15:02:06 +0000 (17:02 +0200)] 
shutdown: In sync_with_progress(), log first then send SIGKILL

The order of these 2 lines was swapped in commit
758760a3610e3c6674de8a1d51b12b991eafef7c. Put them in the right order,
and take yuwata's comment into account.

13 months agosd-json: reorder enum so that SD_JSON_FORMAT_OFF is first
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2024 15:37:25 +0000 (17:37 +0200)] 
sd-json: reorder enum so that SD_JSON_FORMAT_OFF is first

This doesn't really matter, all bits in a word are created equal, but having
the "off" value in the middle seems strange.

13 months agopath-lookup: move xdg_user_dirs() to xdg-autostart-generator 34432/head
Mike Yuan [Sat, 14 Sep 2024 17:14:33 +0000 (19:14 +0200)] 
path-lookup: move xdg_user_dirs() to xdg-autostart-generator

This is the only place where xdg_user_dir() is needed and
makes sense. All other invocations have been replaced with
user_search_dirs() - see previous commits for details.

13 months agopath-lookup: refactor lookup_paths_init() search paths handling
Mike Yuan [Sat, 7 Sep 2024 17:12:58 +0000 (19:12 +0200)] 
path-lookup: refactor lookup_paths_init() search paths handling

* Rename user_dirs() -> user_unit_search_dirs() and port to
  user_search_dirs()
* Use STRV_IFNOTNULL to guard paths that could be NULL,
  assert otherwise

13 months agopath-lookup: introduce user_search_dirs() (shall replace xdg_user_dirs())
Mike Yuan [Sat, 14 Sep 2024 17:02:32 +0000 (19:02 +0200)] 
path-lookup: introduce user_search_dirs() (shall replace xdg_user_dirs())

xdg_user_dirs() doesn't seem well-organized currently.
In all other xdg_user_*() funcs we assume /etc/xdg/systemd
to be a symlink to /etc/systemd/, hence it is the odd one out.
Also, when the relevant envvar is unset, it only returns
the global search dirs.

sd_path_lookup() actually covers this nicely with SD_PATH_SEARCH_*,
where the combined search paths (from user home and system) are used.
Therefore, let's introduce a wrapper for that, and deprecate xdg_user_dirs()
(would be removed in later commits).

13 months agopath-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used...
Mike Yuan [Sun, 6 Oct 2024 17:41:33 +0000 (19:41 +0200)] 
path-lookup: assert that LOOKUP_PATHS_{EXCLUDE,TEMPORARY}_GENERATED are not used in conjunction

13 months agopath-lookup: unify *_generator_binary_paths()
Mike Yuan [Sat, 7 Sep 2024 13:27:04 +0000 (15:27 +0200)] 
path-lookup: unify *_generator_binary_paths()

13 months agopath-lookup: modernize get_paths_from_environ()
Mike Yuan [Sun, 25 Aug 2024 18:32:18 +0000 (20:32 +0200)] 
path-lookup: modernize get_paths_from_environ()

Use retval rather than additional param to indicate
whether the normal paths shall be appended.

13 months agopath-lookup: shortcut patch_root_prefix() if no root_dir
Mike Yuan [Sun, 25 Aug 2024 18:18:58 +0000 (20:18 +0200)] 
path-lookup: shortcut patch_root_prefix() if no root_dir

13 months agopath-lookup: unify acquire_{config,control,attached}_dir()
Mike Yuan [Sun, 25 Aug 2024 18:07:12 +0000 (20:07 +0200)] 
path-lookup: unify acquire_{config,control,attached}_dir()

Note that -ENXIO reported by xdg_user_config_dir() is now properly
propagated rather than ignored, as unlike XDG_RUNTIME_DIR, XDG_CONFIG_HOME
has a default value hence ENXIO is not really expected.

13 months agopath-lookup: use path_strv_contains() rather than strv_contains()
Mike Yuan [Sun, 15 Sep 2024 16:53:22 +0000 (18:53 +0200)] 
path-lookup: use path_strv_contains() rather than strv_contains()

13 months agopath-lookup: clean up acquire_{generator,transient}_dirs() a bit
Mike Yuan [Sun, 25 Aug 2024 17:42:59 +0000 (19:42 +0200)] 
path-lookup: clean up acquire_{generator,transient}_dirs() a bit

13 months agopath-lookup: modernize runtime_directory() too
Mike Yuan [Sat, 24 Aug 2024 13:33:53 +0000 (15:33 +0200)] 
path-lookup: modernize runtime_directory() too

13 months agopath-lookup: deduplicate xdg_user_*() with sd_path_lookup()
Mike Yuan [Fri, 23 Aug 2024 16:55:24 +0000 (18:55 +0200)] 
path-lookup: deduplicate xdg_user_*() with sd_path_lookup()

While at it, place ret param at last.

13 months agopath-lookup: move from basic/ to libsystemd/
Mike Yuan [Sun, 15 Sep 2024 18:57:03 +0000 (20:57 +0200)] 
path-lookup: move from basic/ to libsystemd/

So that sd_path_lookup() can be utilized to replace
duplicate functions.

13 months agopath-lookup: move find_portable_profile() to portable-util
Mike Yuan [Fri, 4 Oct 2024 10:57:23 +0000 (12:57 +0200)] 
path-lookup: move find_portable_profile() to portable-util

13 months agopath-lookup: move NETWORK_DIRS to network-util.h
Mike Yuan [Fri, 4 Oct 2024 10:56:34 +0000 (12:56 +0200)] 
path-lookup: move NETWORK_DIRS to network-util.h

13 months agounit-file: make unit_type_may_{alias_template} static inline
Mike Yuan [Thu, 19 Sep 2024 11:53:25 +0000 (13:53 +0200)] 
unit-file: make unit_type_may_{alias_template} static inline

13 months agobasic/unit-file: move to shared/
Mike Yuan [Thu, 19 Sep 2024 11:48:05 +0000 (13:48 +0200)] 
basic/unit-file: move to shared/

Preparation for later commits, where path-lookup would be
moved into libsystemd.

Note that it currently includes sd-id128.h, hence shared/
seems more appropriate anyway.

13 months agoUse case insensitive comparison for the machine's architechture
Daniel Martinez [Sun, 6 Oct 2024 03:39:43 +0000 (23:39 -0400)] 
Use case insensitive comparison for the machine's architechture

boot loader specification states:

architecture: refers to the architecture this entry is for. The argument
should be an architecture identifier, using the architecture vocabulary
defined by the EFI specification (i.e. IA32, x64, IA64, ARM, AA64, …).
If specified and it does not match the local system architecture this
entry should be hidden. The comparison should be done case-insensitively.

Example: architecture aa64

https://uapi-group.org/specifications/specs/boot_loader_specification/#type-1-boot-loader-entry-keys

13 months agoMerge pull request #34638 from YHNdnzj/laccess-error-check
Yu Watanabe [Sun, 6 Oct 2024 04:50:11 +0000 (13:50 +0900)] 
Merge pull request #34638 from YHNdnzj/laccess-error-check

various: correct laccess() error check

13 months agoMerge pull request #34639 from DaanDeMeyer/repart-fix
Daan De Meyer [Sat, 5 Oct 2024 06:36:14 +0000 (08:36 +0200)] 
Merge pull request #34639 from DaanDeMeyer/repart-fix

Two repart fixes

13 months agofs-util: rename laccess to access_nofollow 34638/head
Mike Yuan [Fri, 4 Oct 2024 23:30:43 +0000 (01:30 +0200)] 
fs-util: rename laccess to access_nofollow

In order to distinguish it from libc function naming.

13 months agotest: Add test for per-device cgroup properties 34408/head
Michal Koutný [Fri, 4 Oct 2024 18:40:51 +0000 (20:40 +0200)] 
test: Add test for per-device cgroup properties

Reported in #34126

13 months agochase: Fix shortcut 34639/head
Daan De Meyer [Fri, 4 Oct 2024 19:34:33 +0000 (21:34 +0200)] 
chase: Fix shortcut

We can't shortcut chaseat() if CHASE_PARENT is set.

13 months agorepart: Don't copy root directory mode from source file
Daan De Meyer [Fri, 4 Oct 2024 19:33:52 +0000 (21:33 +0200)] 
repart: Don't copy root directory mode from source file

If the source is a file, don't copy the mode and such from it to
the root directory, even if the target is /.

13 months agovarious: correct laccess() error check
Mike Yuan [Fri, 4 Oct 2024 19:05:21 +0000 (21:05 +0200)] 
various: correct laccess() error check

laccess is our own macro that uses RET_NERRNO.

13 months agoMerge pull request #34608 from DaanDeMeyer/ukify
Daan De Meyer [Fri, 4 Oct 2024 11:57:16 +0000 (13:57 +0200)] 
Merge pull request #34608 from DaanDeMeyer/ukify

ukify: Rework multi-profile UKIs

13 months agoman: Use proper conjunction and remove superfluous or
Jörg Behrmann [Fri, 4 Oct 2024 11:24:32 +0000 (13:24 +0200)] 
man: Use proper conjunction and remove superfluous or

13 months agorepart: Handle empty arg_copy_source in file_is_denylisted()
Daan De Meyer [Fri, 4 Oct 2024 08:27:04 +0000 (10:27 +0200)] 
repart: Handle empty arg_copy_source in file_is_denylisted()

13 months agoman: consolidate list of active unit states into a shared table
Luca Boccassi [Thu, 3 Oct 2024 19:50:38 +0000 (20:50 +0100)] 
man: consolidate list of active unit states into a shared table

Avoids the need to maintain the same list over and over again, and
link it to the defition table in the implementation as a reminder
too

13 months agoukify: Rework multi-profile UKIs 34608/head
Daan De Meyer [Tue, 1 Oct 2024 12:30:15 +0000 (14:30 +0200)] 
ukify: Rework multi-profile UKIs

The API introduced in https://github.com/systemd/systemd/pull/34295
is less than ideal:

- It doesn't consider signing at all (ukify can't sign separately yet)
- Measurement is completely broken (all profile sections are marked to
  not be measured)
- It focuses on a very niche use case of extending existing UKIs and makes
  the more common use case of building a UKI with several profiles included
  much harder than needed.

Let's instead rework the API to focus on the primary use case of building
a UKI with multiple profiles added to it immediately. We require the profiles
to be built upfront as separate PE binaries with UKI. There's no need to sign
or measure these, they're solely vehicles for profile sections. This saves us
from having to complicate the command line and config parsing to support defining
multiple profiles.

To add the profiles when building a UKI, we introduce the new --add-profile
switch which takes a path to a PE binary describing a profile. The required
sections are read from each PE binary, measured and added as a profile.

The integration test is disabled until the new API is merged and exposed in
mkosi so that building a UKI with profiles can be left to mkosi and the integration
test will only test the switching between profiles and not the building of UKIs
with profiles.

13 months agoMerge pull request #34610 from poettering/exec-start-single-line
Luca Boccassi [Thu, 3 Oct 2024 21:46:11 +0000 (22:46 +0100)] 
Merge pull request #34610 from poettering/exec-start-single-line

Soft deprecate multiple ExecStart= command lines within a single assignment

13 months agoukify: Fix Profile config setting
Daan De Meyer [Tue, 1 Oct 2024 12:23:50 +0000 (14:23 +0200)] 
ukify: Fix Profile config setting

13 months agoukify: Introduce pe_strip_section_name()
Daan De Meyer [Tue, 1 Oct 2024 08:24:30 +0000 (10:24 +0200)] 
ukify: Introduce pe_strip_section_name()

13 months agoRevert "ukify: add new --extend= switch for importing an existing UKI's sections...
Daan De Meyer [Tue, 1 Oct 2024 08:18:09 +0000 (10:18 +0200)] 
Revert "ukify: add new --extend= switch for importing an existing UKI's sections to later extend"

This reverts commit b6570095ce889b07242d36cd05fa1d1899d0bc6c.

13 months agoRevert "ukify: introduce new --measure-base= switch"
Daan De Meyer [Tue, 1 Oct 2024 08:15:15 +0000 (10:15 +0200)] 
Revert "ukify: introduce new --measure-base= switch"

This reverts commit bc3e2c5a5774ae7b212817d04e04abccf30088ae.

13 months agoMerge pull request #34590 from poettering/file-hier-removals
Luca Boccassi [Thu, 3 Oct 2024 20:04:30 +0000 (21:04 +0100)] 
Merge pull request #34590 from poettering/file-hier-removals

man: remove some irrelevant dirs from file-hierarchy(7)

13 months agoMerge pull request #34600 from poettering/varlink-idl-add-flags-everywhere
Luca Boccassi [Thu, 3 Oct 2024 20:02:22 +0000 (21:02 +0100)] 
Merge pull request #34600 from poettering/varlink-idl-add-flags-everywhere

sd-varlink: maintain "more" flag support in the IDL structures

13 months agorepart: open target devices before UUID creation
Michael Ferrari [Thu, 3 Oct 2024 12:02:12 +0000 (14:02 +0200)] 
repart: open target devices before UUID creation

This is to ensure that the UUIDs from the CopyBlocks= devices are copied
to the corresponding new partition instead of creating a new UUID for
it. With this verity partitions can be copied, keeping their UUIDs to
ensure that they still match up with what is specified in roothash=.

13 months agohomectl: fix inverted table footer condition
Zbigniew Jędrzejewski-Szmek [Thu, 3 Oct 2024 17:06:49 +0000 (19:06 +0200)] 
homectl: fix inverted table footer condition

Fixup for 2413a0fab4fdad7eef3ce1d4b57664be5795b002.

13 months agoman/systemd-stub: reword descriptions of .dtb and .profile sections
Zbigniew Jędrzejewski-Szmek [Thu, 3 Oct 2024 10:52:56 +0000 (12:52 +0200)] 
man/systemd-stub: reword descriptions of .dtb and .profile sections

- The text was clearly edited in variuos places to e.g. allow multiple
  sections, so it first said that sections are singletons, and immediately
  after that that some section are not.
- Replace "regardless of the kernel" with "regardless of the kernel version".
  The kernel is very much involved e.g. in loading of the initrds.
- Various other small rewordings to make the text more legible.

13 months agonsresourced: Fix declaration of bpf_rdonly_cast()
Daan De Meyer [Thu, 3 Oct 2024 08:46:27 +0000 (10:46 +0200)] 
nsresourced: Fix declaration of bpf_rdonly_cast()

Fixes compilation error

"""
[780/3171] /usr/bin/clang -std=gnu11 -Wno-compare-distinct-pointer-types -fno-stack-protector -O2 -target bpf -g -c -D__aarch64__ -I. -isystem /usr/include/ -idirafter /usr/include ../src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c -o src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.unstripped.o -I/usr/src/kernels/6.11.1-0.hs1.hs+fb.el9.aarch64
FAILED: src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.unstripped.o
/usr/bin/clang -std=gnu11 -Wno-compare-distinct-pointer-types -fno-stack-protector -O2 -target bpf -g -c -D__aarch64__ -I. -isystem /usr/include/ -idirafter /usr/include ../src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c -o src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.unstripped.o -I/usr/src/kernels/6.11.1-0.hs1.hs+fb.el9.aarch64
../src/nsresourced/bpf/userns_restrict/userns-restrict.bpf.c:27:7: error: conflicting types for 'bpf_rdonly_cast'
   27 | void *bpf_rdonly_cast(void *, __u32) __ksym;
      |       ^
/usr/src/kernels/6.11.1-0.hs1.hs+fb.el9.aarch64/vmlinux.h:143063:14: note: previous declaration is here
 143063 | extern void *bpf_rdonly_cast(const void *obj__ign, u32 btf_id__k) __weak __ksym;
        |              ^
1 error generated.
"""

13 months agologind: add support for hidraw devices
Peter Hutterer [Tue, 12 Apr 2022 04:48:04 +0000 (14:48 +1000)] 
logind: add support for hidraw devices

Add support for opening /dev/hidraw devices via logind's TakeDevice().
Same semantics as our support for evdev devices, but it requires the
HIDIOCREVOKE ioctl in the kernel.

13 months agocore: fix copy/paste error
Antonio Alvarez Feijoo [Wed, 2 Oct 2024 19:43:09 +0000 (21:43 +0200)] 
core: fix copy/paste error

13 months agocore: load IPE policy on boot
Luca Boccassi [Sat, 14 Sep 2024 12:27:53 +0000 (14:27 +0200)] 
core: load IPE policy on boot

IPE is a new LSM being introduced in 6.12. Like IMA, it works based on a
policy file that has to be loaded at boot, the earlier the better. So
like IMA, if such a policy is present, load it and activate it.

If there are any .p7b files in /etc/ipe/, load them as policies.
The files have to be inline signed in DER format as per IPE documentation.

For more information on the details of IPE:

https://microsoft.github.io/ipe/

13 months agoMerge pull request #34447 from DaanDeMeyer/homectl-firstboot-groups
Lennart Poettering [Wed, 2 Oct 2024 16:28:01 +0000 (18:28 +0200)] 
Merge pull request #34447 from DaanDeMeyer/homectl-firstboot-groups

home: Prompt for auxiliary groups in homectl firstboot

13 months agoman: using WantedBy=default.target is not a good idea
Lukas Nykryn [Tue, 1 Oct 2024 09:30:18 +0000 (11:30 +0200)] 
man: using WantedBy=default.target is not a good idea

We had several users, that wrote their unit files with
WantedBy=default.target because it should be started "every time".
But for example in Fedora/CentOS/RHEL, this often breaks for
example selinux relabels (where we just want to do a relabel and reboot).

13 months agohomectl: Acquire bus connection after querying for user input 34447/head
Daan De Meyer [Wed, 18 Sep 2024 15:02:28 +0000 (17:02 +0200)] 
homectl: Acquire bus connection after querying for user input

Otherwise when the user takes a long time to enter input the operation
to create the user's home will fail with "transport endpoint not connected".

13 months agohome: Prompt for shell in homectl firstboot
Daan De Meyer [Tue, 17 Sep 2024 21:01:13 +0000 (23:01 +0200)] 
home: Prompt for shell in homectl firstboot

13 months agohome: Prompt for auxiliary groups in homectl firstboot
Daan De Meyer [Mon, 16 Sep 2024 11:43:38 +0000 (13:43 +0200)] 
home: Prompt for auxiliary groups in homectl firstboot

13 months agoMove show_menu() to terminal-util.h
Daan De Meyer [Tue, 17 Sep 2024 10:06:49 +0000 (12:06 +0200)] 
Move show_menu() to terminal-util.h

13 months agoMerge pull request #34616 from DaanDeMeyer/mkosi
Daan De Meyer [Wed, 2 Oct 2024 11:44:12 +0000 (13:44 +0200)] 
Merge pull request #34616 from DaanDeMeyer/mkosi

Various mkosi fixes

13 months agomkosi: Stop installing bpftrace 34616/head
Daan De Meyer [Wed, 2 Oct 2024 09:27:55 +0000 (11:27 +0200)] 
mkosi: Stop installing bpftrace

bpftrace nudges the Fedora Rawhide images towards compiler-rt18 while the
sanitizer builds pull in clang19, leading to the sanitizer libraries
not being found at runtime. Let's drop bpftrace for now so that compiler-rt19
is pulled in in the main image.

13 months agomkosi: Pass ASAN_OPTIONS to subimages
Daan De Meyer [Wed, 2 Oct 2024 09:27:09 +0000 (11:27 +0200)] 
mkosi: Pass ASAN_OPTIONS to subimages

systemd built with sanitizers is installed in subimages and tools
might get invoked in postinstall scripts so we have to disable ASAN
in the subimages as well during the image build.

13 months agomkosi: Don't sync if the packaging specs repo is dirty
Daan De Meyer [Wed, 2 Oct 2024 08:50:59 +0000 (10:50 +0200)] 
mkosi: Don't sync if the packaging specs repo is dirty

13 months agotree-wide: Fix Wformat warnings
Daan De Meyer [Tue, 1 Oct 2024 07:28:42 +0000 (09:28 +0200)] 
tree-wide: Fix Wformat warnings

The latest clang has started catching more integer promotions which
cause us to pass the wrong type to printf() format specifiers so let's
fix those.

13 months agoman: drop reference to /bin/ from docs regarding binary search path 34610/head
Lennart Poettering [Tue, 1 Oct 2024 13:52:56 +0000 (15:52 +0200)] 
man: drop reference to /bin/ from docs regarding binary search path

We don't support "split /usr" systems anymore, hence no point in
mentioning /bin/ anymore as being part of the binary search path.

13 months agoman: soft deprecate use of ";" for separating multiple command lines in ExecStart=
Lennart Poettering [Tue, 1 Oct 2024 10:12:52 +0000 (12:12 +0200)] 
man: soft deprecate use of ";" for separating multiple command lines in ExecStart=

So far we supported this syntax:

    ExecStart=foo ; bar

as equivalent to:

    ExecStart=foo
    ExecStart=bar

With this change we'll "soft" deprecate the first syntax. i.e. it's
still supported in code, but not documented anymore.

The concept was originally added to make things easier for 3rd party
.ini readers, as it allowed writing unit files with a .ini framework
that doesn't allow multiple assignments for the same key. But frankly,
this is kinda pointless, as so many other of our knobs require the
double assignment.

Hence, let's just stop advertising the concept, let's simplify the docs,
by removing one entirely redundant feature from it.

Replaces: #34570

13 months agoMerge pull request #34546 from ikruglov/ikruglov/refactor-GetMachineAddresses
Daan De Meyer [Wed, 2 Oct 2024 08:24:59 +0000 (10:24 +0200)] 
Merge pull request #34546 from ikruglov/ikruglov/refactor-GetMachineAddresses

machine: generalise logic of GetMachineAddresses/GetOsRelease to later use it in corresponding varlink interfaces

13 months agoupdate TODO 34600/head
Lennart Poettering [Tue, 1 Oct 2024 08:23:21 +0000 (10:23 +0200)] 
update TODO

13 months agosd-varlink: mark functions that can take 'more' flag in IDL structures with an explic...
Lennart Poettering [Tue, 1 Oct 2024 07:34:25 +0000 (09:34 +0200)] 
sd-varlink: mark functions that can take 'more' flag in IDL structures with an explicit flag

Let's mark functions that accept the 'more' flag explicitly for that,
and validate for this explicitly.

This is preparation for
https://github.com/varlink/varlink.github.io/issues/26, if we get that
one day. Let's make sure that from day #1 we have this info available
even if we don't generate this in the IDL for now.

Also enables the two flags for all interfaces we export that use the
logic.