]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
16 months agotest_ukify: add instructions 33767/head
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2024 12:50:43 +0000 (14:50 +0200)] 
test_ukify: add instructions

Copied directly from a1d6dbb1c94685d7972f63ed2762fe4ba0251287.

16 months agotest_ukify: use sha384 in the signing tests
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2024 12:48:37 +0000 (14:48 +0200)] 
test_ukify: use sha384 in the signing tests

On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed:

$ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign
  --linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
  --osrel=/tmp/tmp.osrelbl2sr77f
  --cmdline=/tmp/tmp.cmdlineouc7hqtj
  --uname=/tmp/tmp.unamecbjgesty
  --pcrpkey=/tmp/tmpufiadu8l
  --initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd
  --sbat=/tmp/tmp.sbataz9arpy0
  --private-key=/tmp/tmppyf0gx6w
  --public-key=/tmp/tmpufiadu8l
  --bank=sha1
Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
Loaded 'libtss2-esys.so.0' via dlopen()
Loaded 'libtss2-rc.so.0' via dlopen()
Loaded 'libtss2-mu.so.0' via dlopen()
PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7
Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest
Failed to sign PCR policy: Input/output error

16 months agotest_ukify: do not use files from /boot
Zbigniew Jędrzejewski-Szmek [Thu, 18 Jul 2024 12:43:32 +0000 (14:43 +0200)] 
test_ukify: do not use files from /boot

They might not be readable to the unprivileged user running the tests
and it shouldn't really matter what is used. OTOH, we need a real kernel
because we look at the header.

16 months agoMerge pull request #33761 from DaanDeMeyer/mkosi
Daan De Meyer [Thu, 18 Jul 2024 10:46:58 +0000 (12:46 +0200)] 
Merge pull request #33761 from DaanDeMeyer/mkosi

mkosi: Various NO_BUILD improvements

16 months agomkosi: Build CentOS Stream 10 images by default 33761/head
Daan De Meyer [Thu, 18 Jul 2024 06:46:14 +0000 (08:46 +0200)] 
mkosi: Build CentOS Stream 10 images by default

CentOS Stream 10 has a newer util-linux which means the terminal
gets correctly resized to the size specified by mkosi. This is a
much nicer experience than CentOS Stream 9 where you're stuck on
80x24 so let's make CentOS Stream 10 the default release to build.

16 months agoupdate TODO
Lennart Poettering [Thu, 18 Jul 2024 09:40:10 +0000 (11:40 +0200)] 
update TODO

16 months agomkosi: Streamline running the integration tests without building systemd
Daan De Meyer [Thu, 11 Jul 2024 14:09:47 +0000 (16:09 +0200)] 
mkosi: Streamline running the integration tests without building systemd

Let's document in detail how to build the integration test image and run
the integration tests without building systemd. To streamline the process,
we stop automatically using binaries from build/ when invoking mkosi directly
and don't automatically use a tools tree anymore if systemd on the host is too
old. Instead, we document these options in HACKING.md and change the mkosi meson
target to automatically use the current build directory as an extra binary search
path for mkosi.

16 months agomkosi: Skip sync script if NO_BUILD is enabled
Daan De Meyer [Thu, 11 Jul 2024 14:09:15 +0000 (16:09 +0200)] 
mkosi: Skip sync script if NO_BUILD is enabled

If we're not doing a build, there's no point in syncing either so
lets skip it.

16 months agoMerge pull request #33092 from YHNdnzj/freezer-cleanup
Mike Yuan [Wed, 17 Jul 2024 21:45:32 +0000 (23:45 +0200)] 
Merge pull request #33092 from YHNdnzj/freezer-cleanup

UnitFreezer: several cleanups

16 months agosd-device: remove debug log message when dirs are missing
Lennart Poettering [Wed, 17 Jul 2024 13:56:59 +0000 (15:56 +0200)] 
sd-device: remove debug log message when dirs are missing

This is a common case, and nothing noteworthy at all. For example, if we
establish an enumerator for listing all devices tagged by some tag, then
the per-tag dir is not going to exist if there are currently no devices
tagged that way, but that's a really common case, and doesn't really
deserve any mention, not even at debug level.

16 months agomain: show different welcome msg in initrd than on the host
Lennart Poettering [Wed, 17 Jul 2024 13:07:29 +0000 (15:07 +0200)] 
main: show different welcome msg in initrd than on the host

It has bugged me for a while that we show the exact same welcome message
at boot twice: once in the initrd, and once after the initrd→host
transition. That's very confusing.

Let's change the text a bit, and tone down the initrd message a bit (by
removing the empty line before and after it), because it is the less
relevant one.

16 months agovarlink-util: minor tweak
Lennart Poettering [Wed, 17 Jul 2024 16:56:31 +0000 (18:56 +0200)] 
varlink-util: minor tweak

Apparently I forgot that in the initial PR. Fix that.

https://github.com/systemd/systemd/pull/33714#pullrequestreview-2177885475

16 months agoMerge pull request #33609 from AdrianVovk/table-json
Lennart Poettering [Wed, 17 Jul 2024 21:03:54 +0000 (23:03 +0200)] 
Merge pull request #33609 from AdrianVovk/table-json

Improve table JSON name mangling

16 months agotable: Fix JSON name mangling breaking changes 33609/head
Adrian Vovk [Thu, 11 Jul 2024 23:35:10 +0000 (19:35 -0400)] 
table: Fix JSON name mangling breaking changes

In previous commits, we've changed the JSON name mangling logic. This,
of course, will cause breaking changes to occur on anything that relied
on the JSON mangling logic.

This commit fixes those breaking changes by manually forcing the JSON
name back to what it was before.

16 months agotable: Improve mangling of JSON field names
Adrian Vovk [Wed, 3 Jul 2024 21:57:42 +0000 (17:57 -0400)] 
table: Improve mangling of JSON field names

First, when displaying JSON we convert dashes into underscores. We want
to avoid using dashes in JSON field names in new code, because some
JSON parsers don't support dashes very well.

Second, we make the first character of every word lower-case. This
better matches our JSON field name style, and makes the automatic
JSON name mangling a lot more useful for vertical tables, where fields
are given a display name. For example, "Foo Bar" would be converted into
"foo_bar" instead of "Foo_Bar", which much better matches our style.
We don't make the whole string lowercase to support cases like:
"fooBar" should stay as "fooBar".

Some situations don't behave quite perfectly, such as "Foo BarBaz" gets
converted into "foo_barBaz", or all-caps headings get mangled
incorrectly. In these situations, the JSON field should be overridden
manually. In most cases, or at least more cases than before, this
heuristic does good enough.

16 months agotable: Add TABLE_SET_JSON_FIELD_NAME
Adrian Vovk [Wed, 3 Jul 2024 21:51:35 +0000 (17:51 -0400)] 
table: Add TABLE_SET_JSON_FIELD_NAME

Lets you conveniently set JSON field names in table_add_many. Especially
useful for vertical tables. For example:

table_add_many(t,
               TABLE_FIELD, "Display Name",
               TABLE_STRING, obj->display_name,
               TABLE_SET_JSON_FIELD_NAME, "displayName",
               TABLE_FIELD, "Timestamp",
               TABLE_TIMESTAMP, obj->timestamp,
               TABLE_SET_JSON_FIELD_NAME, "timestampUSec");

16 months agoMerge pull request #33752 from DaanDeMeyer/lsm
Daan De Meyer [Wed, 17 Jul 2024 18:15:17 +0000 (20:15 +0200)] 
Merge pull request #33752 from DaanDeMeyer/lsm

Two mkosi improvements

16 months agomkosi: Remove enforcing=0 from default kernel command line 33752/head
Daan De Meyer [Wed, 17 Jul 2024 16:56:02 +0000 (18:56 +0200)] 
mkosi: Remove enforcing=0 from default kernel command line

We already have selinux=0 in the default kernel command line so
enforcing=0 is redundant. Instead, pass in enforcing=0 when we
enable selinux in TEST-06-SELINUX.

16 months agomkosi: Stop setting apparmor=0
Daan De Meyer [Wed, 17 Jul 2024 16:55:24 +0000 (18:55 +0200)] 
mkosi: Stop setting apparmor=0

It doesn't get pulled in as a dependency anyway and kernel command
line space is precious so let's remove apparmor=0 as it's a noop
anyway.

16 months agosleep,home: always initialize UnitFreezer if used 33092/head
Mike Yuan [Tue, 11 Jun 2024 14:00:22 +0000 (16:00 +0200)] 
sleep,home: always initialize UnitFreezer if used

Previously, unit_freezer_new_freeze() would only return
UnitFreezer object if FreezeUnit() succeeds. This is not
ideal though, as a failed bus call doesn't mean the action
actually failed. E.g. a timeout might occur because pid1
is waiting for cgroup event from kernel, while the bus call
timeout was exceeded (#33269). In such a case, ThawUnit()
will never be called, resulting in frozen units remain that
way after resuming from sleep.

Therefore, let's get rid of unit_freezer_new_freeze(),
and make sure as long as unit freezer is involved, we'll
call ThawUnit() when we're done. This should make things
a lot more robust.

16 months agosleep: also log about errno when getenv_bool fails
Mike Yuan [Tue, 11 Jun 2024 16:17:01 +0000 (18:17 +0200)] 
sleep: also log about errno when getenv_bool fails

16 months agosleep: explicitly list valid sleep operations in switch
Mike Yuan [Fri, 31 May 2024 04:18:44 +0000 (12:18 +0800)] 
sleep: explicitly list valid sleep operations in switch

To follow our usual coding style.

16 months agocore/dbus-unit: add an explicit bus error when unit is frozen by parent
Mike Yuan [Tue, 11 Jun 2024 17:09:05 +0000 (19:09 +0200)] 
core/dbus-unit: add an explicit bus error when unit is frozen by parent

While at it, use more accurate errno (EDEADLK) instead of ECHILD.

16 months agocore/unit: introduce unit_freezer_complete, correctly report end state
Mike Yuan [Fri, 31 May 2024 12:43:53 +0000 (20:43 +0800)] 
core/unit: introduce unit_freezer_complete, correctly report end state

16 months agocore/unit: introduce unit_set_freezer_state, make logging consistent
Mike Yuan [Fri, 31 May 2024 12:46:16 +0000 (20:46 +0800)] 
core/unit: introduce unit_set_freezer_state, make logging consistent

Also, emit PropertiesChanged signal for FreezerState too.

Fixes #31115

16 months agocore/cgroup: skip freezer action wholly if current == objective
Mike Yuan [Sat, 25 May 2024 10:46:55 +0000 (18:46 +0800)] 
core/cgroup: skip freezer action wholly if current == objective

16 months agocore/cgroup: replace hardcoded state set with freezer_state_finish()
Mike Yuan [Mon, 15 Jul 2024 18:32:47 +0000 (20:32 +0200)] 
core/cgroup: replace hardcoded state set with freezer_state_finish()

This makes code simpler and more readable.

16 months agocore/unit: rename a few more vars for unit_next_freezer_state()
Mike Yuan [Wed, 17 Jul 2024 15:34:16 +0000 (17:34 +0200)] 
core/unit: rename a few more vars for unit_next_freezer_state()

16 months agoid128: add 'var-partition-uuid' verb
Luca Boccassi [Tue, 16 Jul 2024 15:53:08 +0000 (16:53 +0100)] 
id128: add 'var-partition-uuid' verb

As per DPS the UUID for /var/ should be keyed by the local machine-id,
which is non-trivial to do in a script. Enhance 'systemd-id128' to
take 'var-partition-uuid' as a verb, and if so perform the
calculation.

16 months agocore/unit: use switch for unit_next_freezer_state
Mike Yuan [Sat, 25 May 2024 10:46:23 +0000 (18:46 +0800)] 
core/unit: use switch for unit_next_freezer_state

16 months agocore/unit: rename freezer "target" to "objective"
Mike Yuan [Sat, 25 May 2024 10:44:51 +0000 (18:44 +0800)] 
core/unit: rename freezer "target" to "objective"

16 months agocore/slice: simplify slice_freezer_action a bit
Mike Yuan [Sat, 25 May 2024 10:45:31 +0000 (18:45 +0800)] 
core/slice: simplify slice_freezer_action a bit

16 months agocore: make unit_can_freeze take const Unit*
Mike Yuan [Fri, 24 May 2024 14:57:18 +0000 (22:57 +0800)] 
core: make unit_can_freeze take const Unit*

16 months agocore,unit-def: use our usual way of asserting enums
Mike Yuan [Fri, 24 May 2024 14:52:28 +0000 (22:52 +0800)] 
core,unit-def: use our usual way of asserting enums

16 months agocore/unit: drop pointless unit_freezer_state wrapper
Mike Yuan [Fri, 24 May 2024 14:27:52 +0000 (22:27 +0800)] 
core/unit: drop pointless unit_freezer_state wrapper

16 months agocore/dbus-unit: use UNIT_IS_LOAD_ERROR where appropriate
Mike Yuan [Thu, 30 May 2024 12:54:24 +0000 (20:54 +0800)] 
core/dbus-unit: use UNIT_IS_LOAD_ERROR where appropriate

16 months agoMerge pull request #33714 from poettering/make-varlink-public
Daan De Meyer [Wed, 17 Jul 2024 10:58:50 +0000 (12:58 +0200)] 
Merge pull request #33714 from poettering/make-varlink-public

varlink: make API public as "sd-varlink.h"

16 months agodocs: update mkosi version mentioned in HACKING.md (#33723)
migleeson [Wed, 17 Jul 2024 07:45:26 +0000 (03:45 -0400)] 
docs: update mkosi version mentioned in HACKING.md (#33723)

* fix: update docs since the default config uses a setting only available in v23

* fix: update docs to only refer to installing from the mkosi repo

16 months agorules: Add uaccess tag to /dev/udmabuf
Hans de Goede [Tue, 16 Jul 2024 15:46:09 +0000 (17:46 +0200)] 
rules: Add uaccess tag to /dev/udmabuf

In some cases userspace may need to create dmabuffers from userspace
on such example is the software ISP part of libcamera which needs to
allocate dma-buffers for the output of the software ISP.

At first the plan was to allow console users access to /dev/dma_heap/*,
this was discussed with various kernel folks here:
https://lore.kernel.org/all/bb372250-e8b8-4458-bc99-dd8365b06991@redhat.com/

Giving console users access to the dma_heap's was deemed a bad idea
because memory allocated this way is not accounted in cgroup limits.

Giving access to /dev/udmabuf OTOH was deemed acceptable so that
is what this patch adds.

Resolves: #32662

16 months agoid128: refuse --app-specific= if we're listing GPT types
Mike Yuan [Tue, 16 Jul 2024 19:10:46 +0000 (21:10 +0200)] 
id128: refuse --app-specific= if we're listing GPT types

Prompted by #33737

The intention of b37e8184a5a376749fbf68674ed6d7a4fc9901aa
is to expose sd_id128_get_app_specific() on command line.
But combining that with GPT type list makes little sense.

16 months agogpt: add more architecture aliases
Luca Boccassi [Tue, 16 Jul 2024 16:46:54 +0000 (17:46 +0100)] 
gpt: add more architecture aliases

Same as the other aliases. Allows chaining commands like:

$ systemd-id128 show -P root-$(dpkg-architecture --query DEB_HOST_ARCH)
4f68bce3e8cd4db196e7fbcaf984b709

16 months agomkosi: List library packages explicitly in VolatilePackages=
Daan De Meyer [Tue, 16 Jul 2024 12:15:38 +0000 (14:15 +0200)] 
mkosi: List library packages explicitly in VolatilePackages=

These should already get pulled in as dependencies, but it doesn't
hurt to be explicit.

16 months agomkosi: Build initrd as a subimage
Daan De Meyer [Tue, 16 Jul 2024 10:07:38 +0000 (12:07 +0200)] 
mkosi: Build initrd as a subimage

Let's make things a little more consistent and build the initrd
explicitly as a subimage as well instead of relying on mkosi building
it as part of the main image build.

We drop the opensuse initrd postinst script as we don't use erofs by
default anymore. We can always reintroduce it again later if needed.

16 months agomkosi: Drop CacheOnly=always from two subimages
Daan De Meyer [Tue, 16 Jul 2024 09:45:43 +0000 (11:45 +0200)] 
mkosi: Drop CacheOnly=always from two subimages

This is a universal setting and can only be configured in the main
image so let's drop it from the subimages.

16 months agoupdate TODO 33714/head
Lennart Poettering [Fri, 12 Jul 2024 14:38:20 +0000 (16:38 +0200)] 
update TODO

16 months agosd-json/sd-varlink: downgrade assert() → assert_ret()
Lennart Poettering [Fri, 12 Jul 2024 14:39:01 +0000 (16:39 +0200)] 
sd-json/sd-varlink: downgrade assert() → assert_ret()

Our usual rule is that we are more lenient towards misuse for public
users of our code than for ourselves. Or in other words: when validating
parameters of our public functions (those starting with sd_…) we prefer
assert_ret() over assert().

16 months agolibsystemd: use C23 explicit enum types where available
Lennart Poettering [Fri, 12 Jul 2024 14:27:25 +0000 (16:27 +0200)] 
libsystemd: use C23 explicit enum types where available

In C23 we can explicitly choose the integer type for an enum. Let's do
so to make our requirements for 64bit integers explicitly. Previously,
we'd rely on a GNU extension that would size the enum to 64bit if at
least one value outside the 32bit range is in the enum. Let's keep that
too, for compat with older compilers.

(Also, add the support for older compilers to the definition of
sd_json_dispatch_flags_t, where it was forgotten so far)

16 months agosd-varlink: make our internal Varlink API public as sd-varlink.[ch]
Lennart Poettering [Fri, 12 Jul 2024 09:22:58 +0000 (11:22 +0200)] 
sd-varlink: make our internal Varlink API public as sd-varlink.[ch]

It's time. sd-json was already done earlier in this cycle, let's now
make sd-varlink public too.

This is mostly just a search/replace job of epical proportions.

I left some functions internal (mostly IDL handling), and I turned some
static inline calls into regular calls.

16 months agoMerge pull request #33695 from DaanDeMeyer/epel
Daan De Meyer [Tue, 16 Jul 2024 09:43:49 +0000 (11:43 +0200)] 
Merge pull request #33695 from DaanDeMeyer/epel

mkosi: Add CI for CentOS Stream 10

16 months agoTEST-13-NSPAWN: make sure we don't load libnss_systemd 33695/head
Daan De Meyer [Mon, 15 Jul 2024 21:07:52 +0000 (23:07 +0200)] 
TEST-13-NSPAWN: make sure we don't load libnss_systemd

Let's make sure we don't load libnss_systemd.so from bash as the
necessary environment variables aren't set to make that work when
we're running with sanitizers enabled.

We can't add a sanitizer wrapper for bash as the wrapper runs using
bash so you end up in a loop.

16 months agomkosi: Disable unique debug source names
Daan De Meyer [Mon, 15 Jul 2024 15:15:43 +0000 (17:15 +0200)] 
mkosi: Disable unique debug source names

We use -fdebug-prefix-map= because debugedit doesn't work for us (for
a currently unknown reason since it's the most obtuse code I've ever
had the pleasure of reading). With all the unique macros enabled, the
destination directory we pass to -fdebug-prefix-map= includes the package
release. The release is either the timestamp of the current commit or
the current time if the working tree is dirty. This means it generally
changes every time we rerun the build script. However, meson only reads
compiler arguments the first time it is invoked or if --wipe is specified.
This means that on a rerun -fdebug-prefix-map= will be configured wrong
and the build will fail.

Let's prevent this from happening by disabling the unique debug source
names by overriding the --unique-debug-src-base option that is passed to
find-debuginfo.sh by rpm via the _find_debuginfo_opts macro.

16 months agosystemd-networkd-tests: Skip tests requiring dhcpd if it is not available
Daan De Meyer [Mon, 15 Jul 2024 10:26:04 +0000 (12:26 +0200)] 
systemd-networkd-tests: Skip tests requiring dhcpd if it is not available

dhcpd is not available on CentOS Stream 10

See https://github.com/systemd/systemd/issues/33717

16 months agoTEST-55-OOMD: Remove the opensuse user@ dropin
Daan De Meyer [Mon, 15 Jul 2024 07:21:51 +0000 (09:21 +0200)] 
TEST-55-OOMD: Remove the opensuse user@ dropin

Required to make TEST-55-OOMD pass on OpenSUSE.

16 months agomkosi: Install binutils
Daan De Meyer [Sun, 14 Jul 2024 20:56:43 +0000 (22:56 +0200)] 
mkosi: Install binutils

16 months agoTEST-64-UDEV-STORAGE: Use max_ioqpairs instead of num_queues
Daan De Meyer [Sun, 14 Jul 2024 20:27:09 +0000 (22:27 +0200)] 
TEST-64-UDEV-STORAGE: Use max_ioqpairs instead of num_queues

Fixes a deprecation warning from qemu.

16 months agomkosi: Use clang --print-runtime-dir
Daan De Meyer [Fri, 12 Jul 2024 14:45:04 +0000 (16:45 +0200)] 
mkosi: Use clang --print-runtime-dir

16 months agomkosi: Extend arch build script comment about symlinks
Daan De Meyer [Fri, 12 Jul 2024 14:42:00 +0000 (16:42 +0200)] 
mkosi: Extend arch build script comment about symlinks

16 months agotest: do not attempt to set xattr on tmpfs
Daan De Meyer [Fri, 12 Jul 2024 14:04:22 +0000 (16:04 +0200)] 
test: do not attempt to set xattr on tmpfs

This is only possible since a recent kernel version, and fails otherwise,
like on CentOS 9

16 months agomkosi: Add CI for CentOS Stream 10
Daan De Meyer [Thu, 11 Jul 2024 13:49:17 +0000 (15:49 +0200)] 
mkosi: Add CI for CentOS Stream 10

We switch to the c10s-sig-hyperscale branch of the spec repository
as it will receive all the latest changes the earliest before they
end up in the c9s-sig-hyperscale branch.

16 months agomkosi: Use squashfs for sysext if mkfs.erofs is not available
Daan De Meyer [Thu, 11 Jul 2024 14:19:20 +0000 (16:19 +0200)] 
mkosi: Use squashfs for sysext if mkfs.erofs is not available

CentOS Stream 10 does not have erofs-utils so let's add a fallback
to squashfs when building the sysext.

16 months agomkosi: Make epel repositories optional for CentOS Stream 9
Daan De Meyer [Fri, 5 Jul 2024 09:56:44 +0000 (11:56 +0200)] 
mkosi: Make epel repositories optional for CentOS Stream 9

This allows us to add CI for CentOS Stream 10 as EPEL 10 doesn't
exist yet and won't exist for quite some time.

CentOS Stream 10 will be enabled later as soon as
https://issues.redhat.com/browse/RHEL-46604 is resolved.

16 months agomkosi: Introduce build image
Daan De Meyer [Fri, 12 Jul 2024 13:33:49 +0000 (15:33 +0200)] 
mkosi: Introduce build image

We want the exitrd image to be built with the latest systemd as well.
As the exitrd image is built as part of mkosi.images, and all subimages
are built before the main image, this implies the packages must be built
as a subimage in mkosi.images/ as well. So we introduce the build image and
move all logic related to building distribution packages there.

This also has the nice side effect of slimming down the main image as the
build dependencies are not installed into the main image anymore. It also
makes sure the packages are built in a "clean" chroot without any of the
other packages which we install in the main image available.

16 months agomkosi: update fedora commit reference
Daan De Meyer [Sun, 14 Jul 2024 15:50:23 +0000 (17:50 +0200)] 
mkosi: update fedora commit reference

a3524fc837 Use a more precise Recommends for libkxbcommon
980ede8c0f Drop machined revert
d569018a92 Rebuilt for the bin-sbin merge
8881fa94ee Version 256.2
1cc4f83002 Link systemd-executor statically
0319e62d9c Update dracut workaround
c96f54de22 Fix ELN build
3f68c5d802 Only exclude dracut conflicts on non-fedora on upstream builds
7db154308b Conditionalize dracut Conflicts more

16 months agomkosi: Update to latest
Daan De Meyer [Fri, 12 Jul 2024 14:09:21 +0000 (16:09 +0200)] 
mkosi: Update to latest

16 months agoRevert "hwdb: Added StarLabs StarLite position sensor mapping"
Sean Rhodes [Sun, 14 Jul 2024 19:28:00 +0000 (20:28 +0100)] 
Revert "hwdb: Added StarLabs StarLite position sensor mapping"

This reverts commit 1bd5db86f50feb2efd8e54e8156816d9727f6f2f.

The `kxcjk-1013` driver in Linux will parse the rotation matrix
from ACPI. This quirk is not specific enough to exist without
causing issues on different variations.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
16 months agoMerge pull request #33718 from YHNdnzj/machine-id-followup
Lennart Poettering [Mon, 15 Jul 2024 09:16:59 +0000 (11:16 +0200)] 
Merge pull request #33718 from YHNdnzj/machine-id-followup

core/main: several cleanups

16 months agosysupdate: fix return types according to style guide
Abderrahim Kitouni [Sun, 14 Jul 2024 08:29:34 +0000 (09:29 +0100)] 
sysupdate: fix return types according to style guide

16 months agofstab-generator: add x-systemd.wants
chayleaf [Sun, 14 Jul 2024 02:15:39 +0000 (09:15 +0700)] 
fstab-generator: add x-systemd.wants

This is an analog of x-systemd.requires that adds a Wants dependency
instead. This is useful for filesystems that support mounting in
degraded states (such as multi-device filesystems).

16 months agokernel-install: Remove existing loader entries and UKIs
Jörg Behrmann [Fri, 12 Jul 2024 08:43:54 +0000 (10:43 +0200)] 
kernel-install: Remove existing loader entries and UKIs

When boot counting is enabled, adding a new loader entry or UKI can conflict
with an existing one that has booted successfully and therefore has its boot
counter removed. systemd-bless-boot will fail to bless the new successful boot,
since a file without a boot counter already exists. Since kernel-install will
clobber existing files without boot counting, we should therefore remove files
without a boot count as well, when we add a file with one.

Fixes: #33504
16 months agosysupdate: fix size_t specifier
Abderrahim Kitouni [Sat, 13 Jul 2024 08:10:10 +0000 (09:10 +0100)] 
sysupdate: fix size_t specifier

16 months agocore/main: refuse to run if /usr/ is not populated 33718/head
Mike Yuan [Sat, 13 Jul 2024 17:10:58 +0000 (19:10 +0200)] 
core/main: refuse to run if /usr/ is not populated

The support for split-usr has been dropped in v255.
So, rather than emitting a warning, let's refuse
such unsupported setups completely.

16 months agocore/main: move capability_ambient_set_apply() to initialize_runtime()
Mike Yuan [Sat, 13 Jul 2024 20:36:22 +0000 (22:36 +0200)] 
core/main: move capability_ambient_set_apply() to initialize_runtime()

This is preparation for (user) manager, and we apply capability
settings for the system manager in initialize_runtime() too.

16 months agocore/main: respect skip_setup for RUNTIME_SCOPE_USER too
Mike Yuan [Sat, 13 Jul 2024 20:27:53 +0000 (22:27 +0200)] 
core/main: respect skip_setup for RUNTIME_SCOPE_USER too

16 months agocore/main: merge second RUNTIME_SCOPE_SYSTEM block into switch above
Mike Yuan [Sat, 13 Jul 2024 20:27:07 +0000 (22:27 +0200)] 
core/main: merge second RUNTIME_SCOPE_SYSTEM block into switch above

16 months agocore/main: modernize setup_os_release() a bit
Mike Yuan [Sat, 13 Jul 2024 17:04:23 +0000 (19:04 +0200)] 
core/main: modernize setup_os_release() a bit

16 months agocore/main: cast ignored retval of machine_id_setup() to void
Mike Yuan [Sat, 13 Jul 2024 16:17:44 +0000 (18:17 +0200)] 
core/main: cast ignored retval of machine_id_setup() to void

16 months agocore/import-creds: use proc_cmdline_get_bool()
Mike Yuan [Sat, 13 Jul 2024 16:47:41 +0000 (18:47 +0200)] 
core/import-creds: use proc_cmdline_get_bool()

16 months agocore/import-creds: use FOREACH_ARRAY and RET_GATHER where appropriate
Mike Yuan [Sat, 13 Jul 2024 16:46:10 +0000 (18:46 +0200)] 
core/import-creds: use FOREACH_ARRAY and RET_GATHER where appropriate

16 months agobasic/mkdir: merge two if blocks, return more accurate errno
Mike Yuan [Sat, 13 Jul 2024 16:54:36 +0000 (18:54 +0200)] 
basic/mkdir: merge two if blocks, return more accurate errno

16 months agomachine-id: Add cmdline argument to use VM behaviour on bare metal (#32086)
Merlin Jehli [Sat, 13 Jul 2024 16:00:16 +0000 (18:00 +0200)] 
machine-id: Add cmdline argument to use VM behaviour on bare metal (#32086)

Closes #30707

16 months agoMerge pull request #33711 from dtardon/masked-unit-NeedDaemonReload
Luca Boccassi [Sat, 13 Jul 2024 12:22:05 +0000 (14:22 +0200)] 
Merge pull request #33711 from dtardon/masked-unit-NeedDaemonReload

Fix `NeedDaemonReload=` for masked units with drop-ins

16 months agocore/execute-serialize: fix deserialization for apparmor_profile_ignore
Mike Yuan [Fri, 12 Jul 2024 13:44:23 +0000 (15:44 +0200)] 
core/execute-serialize: fix deserialization for apparmor_profile_ignore

Follow-up for 99a1cdc9510ac8b4865d8d403b66bc82335a6520

16 months agoMerge pull request #33520 from tomcoldrick-ct/coldtom/sysupdate-improvements
Lennart Poettering [Fri, 12 Jul 2024 17:12:41 +0000 (19:12 +0200)] 
Merge pull request #33520 from tomcoldrick-ct/coldtom/sysupdate-improvements

sysupdate: Add --offline mode, notifications, JSON output and additional metadata

16 months agologind-user: take gc_mode into account when reporting user state
Mike Yuan [Sat, 6 Jul 2024 17:05:57 +0000 (19:05 +0200)] 
logind-user: take gc_mode into account when reporting user state

Prompted by #33650

Previously, if a user manually starts user@.service (which is
something we support), we'd track it as 'manager' session.
However, since user_get_state() ignores all non-pinning sessions,
if lingering is not enabled, the user state would always be
reported as 'closing', which is spurious.

Let's instead take gc_mode into consideration, and ignore
non-pinning sessions only if USER_GC_BY_PIN.

16 months agocore/unit: ignore dropins for masked units completely when checking need_reload 33711/head
Mike Yuan [Mon, 8 Jul 2024 15:12:20 +0000 (17:12 +0200)] 
core/unit: ignore dropins for masked units completely when checking need_reload

Follow-up for 19a44dfe4525ab01caf593a9c2beada4b412910d

If a drop-in is set from upper level, e.g. global unit_type.d/,
even if a unit is masked, its dropin_paths would still be partially
populated. However, unit_need_daemon_reload() would always
compare u->dropin_paths with empty strv in case of masked units,
resulting in it always returning true. Instead, let's ignore
dropins entirely here.

Fixes #33672

16 months agotest: add a reproducer for #33672
David Tardon [Fri, 12 Jul 2024 12:38:08 +0000 (14:38 +0200)] 
test: add a reproducer for #33672

16 months agoupdate TODO
Lennart Poettering [Fri, 12 Jul 2024 13:55:15 +0000 (15:55 +0200)] 
update TODO

16 months agosysupdate: Split reboot_now into utils 33520/head
Adrian Vovk [Wed, 19 Jul 2023 21:55:18 +0000 (17:55 -0400)] 
sysupdate: Split reboot_now into utils

This will let us reuse reboot_now in updatectl

16 months agosysupdate: Split UpdateSetFlags out from UpdateSet
Adrian Vovk [Thu, 13 Jul 2023 18:47:30 +0000 (14:47 -0400)] 
sysupdate: Split UpdateSetFlags out from UpdateSet

This will let us reuse UpdateSetFlags in updatectl

16 months agosysupdate: Use FOREACH_ARRAY where possible
Tom Coldrick [Thu, 27 Jun 2024 11:45:17 +0000 (12:45 +0100)] 
sysupdate: Use FOREACH_ARRAY where possible

Replace simple loops over arrays with the FOREACH_ARRAY macro.

16 months agosysupdate: Support changelogs & appstream metadata
Adrian Vovk [Wed, 19 Jul 2023 18:43:58 +0000 (14:43 -0400)] 
sysupdate: Support changelogs & appstream metadata

Makes it possible to specify URLs to a changelog and an appstream
catalog XML in the sysupdate.d/*.conf files. This will be passed along
to the clients of systemd-sysupdated, which can then present this data.

16 months agosysupdate: Implement JSON output
Adrian Vovk [Tue, 11 Jul 2023 22:46:11 +0000 (18:46 -0400)] 
sysupdate: Implement JSON output

Previously, the JSON output happened mostly as an accident (i.e. just
dumped tables intended for viewing). Now we have more complete JSON
output.

16 months agosysupdate: Add --offline mode
Adrian Vovk [Tue, 11 Jul 2023 22:35:54 +0000 (18:35 -0400)] 
sysupdate: Add --offline mode

This prevents sysupdate from going out to the network to enumerate
available instances. When combined with the list command, this lets us
query installed instances

16 months agosysupdate: Report download progress via sd_notify
Adrian Vovk [Thu, 22 Jun 2023 23:47:20 +0000 (19:47 -0400)] 
sysupdate: Report download progress via sd_notify

We set up a NOTIFY_SOCKET to get download progress notifications from
each individual import helper. Along with the number of import jobs we
have to run, this gives an overall progress value which we report using
sd_notify

16 months agostub: const'ify a few parameters
Lennart Poettering [Wed, 10 Jul 2024 09:57:43 +0000 (11:57 +0200)] 
stub: const'ify a few parameters

16 months agoMerge pull request #33686 from poettering/boot-tweaklets
Daan De Meyer [Fri, 12 Jul 2024 07:50:07 +0000 (09:50 +0200)] 
Merge pull request #33686 from poettering/boot-tweaklets

boot/bootspec: some minor fixes/additions

16 months agoMerge pull request #33697 from poettering/vmspawn-stream-fix
Daan De Meyer [Fri, 12 Jul 2024 06:33:18 +0000 (08:33 +0200)] 
Merge pull request #33697 from poettering/vmspawn-stream-fix

vmspawn: fix AF_VSOCK sd_notify() reception

16 months agosignal-util: use common definitions for ignore + default "struct sigaction"
Lennart Poettering [Wed, 10 Jul 2024 15:14:17 +0000 (17:14 +0200)] 
signal-util: use common definitions for ignore + default "struct sigaction"

We use this at various places, let's unify this in one global constant.

This changes flags in crash-handler.c in a tiny irrelevant way: we ask
syscalls to be continued on signal arrival, which we previously didn't.
But that shouldn't change anything, the only thing we'll do in the
relevant process is call raise(), and that's it, hence there definitely
are no syscalls to restart or not to restart.

16 months agobootspec: correct log level for fatal errors 33686/head
Lennart Poettering [Fri, 5 Jul 2024 08:13:35 +0000 (10:13 +0200)] 
bootspec: correct log level for fatal errors

16 months agobootspec: implement sorting by tries left/done, to match what sd-boot does
Lennart Poettering [Fri, 5 Jul 2024 07:52:58 +0000 (09:52 +0200)] 
bootspec: implement sorting by tries left/done, to match what sd-boot does