]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agomeson: bump version to 257.7 v257.7
Luca Boccassi [Wed, 25 Jun 2025 12:36:51 +0000 (13:36 +0100)] 
meson: bump version to 257.7

4 months agohwdb: update to main@{2025-06-24}
Luca Boccassi [Tue, 24 Jun 2025 20:52:38 +0000 (21:52 +0100)] 
hwdb: update to main@{2025-06-24}

git restore -s origin/main hwdb.d/ test/hwdb.d

4 months agotest: escape '+' from uname -r before using in regex via '=~'
Luca Boccassi [Tue, 24 Jun 2025 12:07:11 +0000 (13:07 +0100)] 
test: escape '+' from uname -r before using in regex via '=~'

It will otherwise interpret characters such as '+' as if they
were regex, and break matching.

For example TEST-71-HOSTNAME started failing when
uname -r started including a '+':

FAIL: 'Kernel: Linux 6.12.33+deb13-amd64' not found in:
 Static hostname: host
       Icon name: computer-vm
         Chassis: vm ðŸ–´
      Machine ID: e6471c1f95ab49098827498ed816cdf7
         Boot ID: 231da987f64d4af59f2076fbb638c611
  Virtualization: kvm
Operating System: Debian GNU/Linux 13 (trixie)
          Kernel: Linux 6.12.33+deb13-amd64
    Architecture: x86-64

(cherry picked from commit a0dfb0245662e31ded34730010e0e92be9bd9f1a)

4 months agonetwork/dhcp6: consider the DHCPv6 protocol as finished when conflict addresses exist
Yu Watanabe [Fri, 20 Jun 2025 18:51:30 +0000 (03:51 +0900)] 
network/dhcp6: consider the DHCPv6 protocol as finished when conflict addresses exist

Replaces #37891.

(cherry picked from commit 4c4fe8cd71da64506705736fda0ab7f7154f28d2)

4 months agonetwork/dhcp6: refactoring for verify_dhcp6_address()
Yu Watanabe [Fri, 20 Jun 2025 18:48:51 +0000 (03:48 +0900)] 
network/dhcp6: refactoring for verify_dhcp6_address()

No functional change. Preparation for later changes.

(cherry picked from commit 03f0658460964bcc63b5194b69885b1dbf33f77d)

4 months agobootctl: when updating everything check PE machine type
Lennart Poettering [Fri, 20 Jun 2025 12:03:57 +0000 (14:03 +0200)] 
bootctl: when updating everything check PE machine type

Let's never accidentally over-write foreign-arch PE binaries with native
ones.

Fixes: #33413
(cherry picked from commit 6b8770b96b403407b371e704b4afdcd0851deb3b)

4 months agobootctl: be more careful when opening arbitrary files from ESP
Lennart Poettering [Fri, 20 Jun 2025 11:59:04 +0000 (13:59 +0200)] 
bootctl: be more careful when opening arbitrary files from ESP

Let's refuse all kind of weird stuff early.

As suggested here: https://github.com/systemd/systemd/pull/30418#pullrequestreview-2128220792

(cherry picked from commit 95df8288c7dff8a95b86d48787ad03ae9bd5f5ed)

4 months agocore: escape UTF-8 in mount unit Where field before sending to clients
Lennart Poettering [Fri, 20 Jun 2025 11:16:10 +0000 (13:16 +0200)] 
core: escape UTF-8 in mount unit Where field before sending to clients

Followup for: 4804da58536ab7ad46178a03f4d2da49fd8e4ba2 #27541

Fixes: #36206
(cherry picked from commit 222b0b05ce9ac29283cd89cf98444c4da3373568)

4 months agonetwork: also check ID_NET_MANAGED_BY property on reconfigure
Yu Watanabe [Wed, 11 Jun 2025 09:05:46 +0000 (18:05 +0900)] 
network: also check ID_NET_MANAGED_BY property on reconfigure

Previously, the property was checked only when an uevent is received,
so even if an interface has ID_NET_MANAGED_BY property, the interface
will be configured by networkd when reconfiguration is triggered e.g.
when interface state is changed.

Follow-up for ba87a61d05d637be9f0b21707f7fe3b0a74c5a05.
Fixes #36997.

(cherry picked from commit 78f8d5ed71ecc16ad36d1c215d2d57433d127679)

4 months agotest: add test case for issue #36031
Yu Watanabe [Thu, 15 May 2025 04:45:13 +0000 (13:45 +0900)] 
test: add test case for issue #36031

(cherry picked from commit 7824e70a074316ff799cbbc98af4f9ba944d6535)

4 months agocore: introduce Unit.dependency_generation counter and restart loop when dependency...
Yu Watanabe [Thu, 15 May 2025 03:34:35 +0000 (12:34 +0900)] 
core: introduce Unit.dependency_generation counter and restart loop when dependency is updated in the loop

When starting unit A, a dependent unit B may be loaded if it is not
loaded yet, and the dependencies in unit A may be updated.
As Hashmap does not allow a new entry to be added in a loop, we need to
restart loop in such case.

Fixes a bug introduced by cda667722c2218cf1a0185284d2a87f8a25f1b2d.
Fixes #36031.

(cherry picked from commit b7777d08846033859c5b734317fbbbfcca4cafcb)

4 months agocore/transaction: do not override unit load state when unit_load() failed
Yu Watanabe [Tue, 20 May 2025 19:38:07 +0000 (04:38 +0900)] 
core/transaction: do not override unit load state when unit_load() failed

When unit_load() failed for some reasons, previously we overrided the
load state with UNIT_NOT_FOUND, but we did not update the
Unit.fragment_not_found_timestamp_hash. So, the unit may be loaded
multiple times when the unit is in a dependency list of another unit,
as manager_unit_cache_should_retry_load() will be true again even on
next call.
Let's not override the unit state set by unit_load().

Note, after unit_load(), the unit state should not be UNIT_STUB.
Let's also add the assertion about that.

This change is important when combined with the next commit, as with the
next commit we will restart the FOREACH_UNIT_DEPENDENCY() loop if an unit
is reloaded, hence overriding load state with UNIT_NOT_FOUND may cause
infinit loop.

(cherry picked from commit 9b6aa9e443859f1eb69cfe37ca755ac4db31c475)

4 months agocore/transaction: drop redundant call of bus_unit_validate_load_state()
Yu Watanabe [Tue, 20 May 2025 19:32:09 +0000 (04:32 +0900)] 
core/transaction: drop redundant call of bus_unit_validate_load_state()

The function manager_unit_cache_should_retry_load() reutrns true only
when the unit state is UNIT_NOT_FOUND. Hence, it is not necessary to
call bus_unit_validate_load_state() before checking
manager_unit_cache_should_retry_load().

(cherry picked from commit 7ad2e660802be989d8ae8d0166c4fe1b7be0eb21)

4 months agocore/transaction: fix comment
Yu Watanabe [Thu, 15 May 2025 00:14:07 +0000 (09:14 +0900)] 
core/transaction: fix comment

(cherry picked from commit fe51a6147779e10833273b141c960163c5f6cea2)

4 months agocore/transaction: rename ret -> job
Yu Watanabe [Thu, 15 May 2025 00:10:36 +0000 (09:10 +0900)] 
core/transaction: rename ret -> job

(cherry picked from commit fc49b2994d77338a0982a4d5ff78a35617311a42)

4 months agohome: Make sure we resolve /etc/skel symlink
Daan De Meyer [Sun, 22 Jun 2025 12:17:08 +0000 (14:17 +0200)] 
home: Make sure we resolve /etc/skel symlink

Otherwise copy_tree_at() will try to copy the symlink which we obviously
don't want.

(cherry picked from commit 1e0e7c7411ecb7dc1c6f4d7d6e6a2aa14f6f2395)

4 months agobootspec: ensure memory free in one error path
Lennart Poettering [Mon, 23 Jun 2025 12:40:21 +0000 (14:40 +0200)] 
bootspec: ensure memory free in one error path

(cherry picked from commit 1bd9a3c916a26522ee1b26e08374282df66f734b)

4 months agoconsole: when switching console modes and one doesn't work, always go for the next
Lennart Poettering [Fri, 20 Jun 2025 09:05:00 +0000 (11:05 +0200)] 
console: when switching console modes and one doesn't work, always go for the next

So far we already had a logic in place to go for the next mode if some
mode doesn't work â€“ but it was only applied if we'd actively cycle
through resolutions.

Let's extend the logic and always apply it: whenever we try to switch to
a mode, and it doesn't work, go to the next one until we find one that
works.

Fixes: #37324
(cherry picked from commit b53c3af3fe968fc2fc7631c9dab6737b08f0156a)

4 months agohomed: set "secrets" section to 'sensitive' in more places
Lennart Poettering [Mon, 23 Jun 2025 12:37:58 +0000 (14:37 +0200)] 
homed: set "secrets" section to 'sensitive' in more places

We already do this in all placed where we it *really* matters, i.e. for
passwords PINs. But let's do this also at any place where we add the
section at all, regardless whether it is for storing a pw or something
else.

With this we establish the rule that if it's in "secrets", then it
shall be marked "sensitive".

(cherry picked from commit 5933eb1a712ea533261811a4f9448a207672565a)

4 months agohomed: do not log new password when debug logs are enabled
Luca Boccassi [Sun, 22 Jun 2025 15:44:02 +0000 (16:44 +0100)] 
homed: do not log new password when debug logs are enabled

systemd-homed[3443]: Sending to worker:
{
  "enforcePasswordPolicy": false,
  "userName": "foobarbaz",
  "perMachine": [
    {
      "storage": "directory",
      "matchMachineId": "c1082742b92c4f7e8d30d6b17f9d3351"
    }
  ],
  "disposition": "regular",
  "lastChangeUSec": 1750606709833174,
  "lastPasswordChangeUSec": 1750606709833174,
  "privileged": {
    "hashedPassword": [
      "$y$j9T$ai2Fshq0ev9W05WL4SoRJ1$EFfe41ACrJKXMCQ83A05n6UW.HrRr9/O4b1x0CXgAXD"
    ]
  },
  "binding": {
    "c1082742b92c4f7e8d30d6b17f9d3351": {
      "blobDirectory": "/var/cache/systemd/home/foobarbaz",
      "uid": 60056,
      "gid": 60056
    }
  },
  "secret": {
    "password": [
      "test"
    ]
  },
  "__systemd_homework_internal_blob_fdmap": {}
}

(cherry picked from commit e248790263b63822cdffa399b593a272d7abddc8)

4 months agoresolved: make bypass tests work
Lennart Poettering [Thu, 19 Jun 2025 16:28:16 +0000 (18:28 +0200)] 
resolved: make bypass tests work

It's not sufficient to append a DNS key to a packet, we must also update
the qdcount too. We got this right in most tests but didn#t here.
Moreover, we must extract the packet then to actually have a DnsQuestion
properly filled in.

Fix that. Without this the tests didn't test anything reasonable.

(cherry picked from commit 884fb39f33d098e15fad7647bbeef0a5569402cb)

4 months agoman: encourage the creation of empty machine-id instead of deleting it
Lukas Nykryn [Wed, 18 Jun 2025 11:33:25 +0000 (13:33 +0200)] 
man: encourage the creation of empty machine-id instead of deleting it

Current text hints that machine-id in template image should be empty
if the system is read-only. But most of the bare metal systems and
regular VMs have /etc read-only at this phase of boot.

(cherry picked from commit 64fcb07199f8409a074575eda5abb69b0caab06f)

4 months agoresolved: Tweak link-local addresses relevancy
George Tsiamasiotis [Tue, 17 Jun 2025 12:30:41 +0000 (15:30 +0300)] 
resolved: Tweak link-local addresses relevancy

We now consider link-local addresses routable when we have configured
unicast link-local dns servers. This allows creating the DNS scope, even
when the interface doesn't get a routable address.

(cherry picked from commit c60d2a626b88aec24e6f029f799b6631c1aaeee2)

4 months agoman: fix varname copypasta
Luca Boccassi [Sat, 14 Jun 2025 00:44:11 +0000 (01:44 +0100)] 
man: fix varname copypasta

(cherry picked from commit 5cdf2c4d4067108124913155081f4f0f5bde6ecc)

4 months agofstab-generator: set mode=0755 with root=tmpfs
Luca Boccassi [Mon, 16 Jun 2025 22:28:57 +0000 (23:28 +0100)] 
fstab-generator: set mode=0755 with root=tmpfs

If mode= is not set in rootflags= add mode=0755 when a tmpfs
is used on the rootfs, otherwise it will be group/world writable
as that's the default mode for tmpfs filesystems.

Follow-up for 725ad3b06288b2beeaaf178120010612a30646e4

(cherry picked from commit d3a57a0853de1a4a03b4ae1fbfa8bc59dc01b217)

4 months agoterminal-util: fix doubled 'to' in log messages
Yu Watanabe [Mon, 16 Jun 2025 13:25:24 +0000 (22:25 +0900)] 
terminal-util: fix doubled 'to' in log messages

Follow-up for 3390be38d19c9d339bbc0e003743ce4278aa58b6.

(cherry picked from commit a4eb5094e624bc4143971447f04c03af6aa0c718)

4 months agoTEST-75-RESOLVED: add test case for reloading DNSStubListenerExtra=
Yu Watanabe [Mon, 16 Jun 2025 10:13:51 +0000 (19:13 +0900)] 
TEST-75-RESOLVED: add test case for reloading DNSStubListenerExtra=

(cherry picked from commit 888e3f435770568643fc97aa20b112ded94f33eb)

4 months agomanager: also restart stub listner on reload
Yu Watanabe [Mon, 16 Jun 2025 08:55:11 +0000 (17:55 +0900)] 
manager: also restart stub listner on reload

Previously, the extra stub listners were stopped but new ones were not
started. Also, the main stub listners were not restarted, hence the
new settings were not applied. This fixes the above two issues.

Note, to fix the issue, we need to keep CAP_NET_BIND_SERVICE capability
to make it allow to bind stub listner later.

Fixes #37843.

(cherry picked from commit 752cdf5051d4de17864e7b2dbfec0023207a3d4e)

4 months agounits: make sure the network tap driver is actually loaded
Lennart Poettering [Fri, 13 Jun 2025 13:14:06 +0000 (15:14 +0200)] 
units: make sure the network tap driver is actually loaded

We have the After= line, but not the Wants= line. Fix that.

(cherry picked from commit 008818ec96bc4b619967fb060a847cc6ef5b2b79)

4 months agozsh: complete positional devpath in udevadm info/trigger
Ronan Pigott [Fri, 13 Jun 2025 09:09:55 +0000 (02:09 -0700)] 
zsh: complete positional devpath in udevadm info/trigger

(cherry picked from commit 88036a47e42a5773c05b44c860a3f9b940384385)

4 months agoudev/rules.d: import hwdb before calling net_id builtin
Yu Watanabe [Thu, 12 Jun 2025 09:25:54 +0000 (18:25 +0900)] 
udev/rules.d: import hwdb before calling net_id builtin

The commit cdcb1eeeb883b2ecb3992865f458f874900ddb87 adds
ID_NET_NAME_INCLUDE_DOMAIN property support in net_id builtin.
The property is basically set through hwdb. However, previously hwdb was
imported after calling net_id builtin, hence when net_id is called, the
property was never set.

This makes hwdb is imported before calling net_id builtin, so that the
property is set when net_id is called if hwdb has an entry about that
for the interface.

Follow-up for cdcb1eeeb883b2ecb3992865f458f874900ddb87.
Fixes #37758.

(cherry picked from commit a7deadd763427fcff67b6697557dfbd0c91647ec)

4 months agoresolved: ignore mDNS replies from legacy mDNS ports
Lennart Poettering [Thu, 5 Jun 2025 16:51:34 +0000 (18:51 +0200)] 
resolved: ignore mDNS replies from legacy mDNS ports

mDNS replies always have to come from the mDNS port (unlike mDNS
queries, which are also allowed from non-mDNS ports). Hence refuse this.

Fixes: #33806
(cherry picked from commit 373e6cdadbdc4a2b5081f02b0e4ad5dcea9eb6df)

4 months agoresolve: exit from loop for transactions when transactions has been regenerated
Yu Watanabe [Wed, 14 May 2025 22:18:38 +0000 (07:18 +0900)] 
resolve: exit from loop for transactions when transactions has been regenerated

Fixes #37458.

(cherry picked from commit 5814acca9aa4354d121de4bf174851f092a6b643)

4 months agosocket: downgrade not-supported logging for SO_PASSSEC
Luca Boccassi [Mon, 9 Jun 2025 16:24:24 +0000 (17:24 +0100)] 
socket: downgrade not-supported logging for SO_PASSSEC

Kernel 6.16 started returning EOPNOTSUPP when a required kconfig
is disabled. Downgrade to debug level in that case.

Fixes https://github.com/systemd/systemd/issues/37783

(cherry picked from commit bb887cf22e68b6c83ff8a9c9bccda04d95ac23b3)

4 months agotest: do not fail when lacking privs to create sysfs directory
Luca Boccassi [Sun, 8 Jun 2025 11:21:58 +0000 (12:21 +0100)] 
test: do not fail when lacking privs to create sysfs directory

4109s /* test_mdio_bus */
4109s src/libsystemd/sd-device/test-sd-device.c:55: Assertion failed: Expected "mkdir_p(syspath, 0755)" to succeed, but got error: Permission denied
4109s (mdio_bus) terminated by signal ABRT.
4109s src/libsystemd/sd-device/test-sd-device.c:37: Assertion failed: Expected "r = safe_fork("(mdio_bus)", FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_REOPEN_LOG|FORK_LOG|FORK_WAIT|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL)" to succeed, but got error: Protocol error

Follow-up for 687a92a1b6a62b705acbb9065bb60fc6e84c9c20

(cherry picked from commit f245fa005845a74be107be1650901d242c97fce6)

4 months agocoredump: fix 0-passed-as-pointer warning
Zbigniew JÄ™drzejewski-Szmek [Fri, 6 Jun 2025 15:03:46 +0000 (17:03 +0200)] 
coredump: fix 0-passed-as-pointer warning

(cherry picked from commit 8ec2e177b01339ee940efd323361971acf027cc9)

4 months agotest: extend timeout and enable generating debugging logs
Yu Watanabe [Fri, 6 Jun 2025 15:09:37 +0000 (00:09 +0900)] 
test: extend timeout and enable generating debugging logs

Not sure why the test failed, but maybe the test environment is too
slow? Even this does not fix the failure, by enabling debugging logs,
this hopefully provides more useful information for debugging.

For issue #37685.

(cherry picked from commit b5bd717fcdf5127495e178cf3fe8cbd8b86d390c)

4 months agosd-device: replace '!' with '/' before calling sd_device_new_from_subsystem_sysname()
Yu Watanabe [Fri, 6 Jun 2025 12:14:20 +0000 (21:14 +0900)] 
sd-device: replace '!' with '/' before calling sd_device_new_from_subsystem_sysname()

Device ID uses device directory name as is, hence may contain '!', but
sd_device_new_from_subsystem_sysname() expects that the input is sysname.
So, we need to replace '!' with '/'.

Follow-up for 1393c5a2a42d6ff16afcdc3ac39f007921b9cb57.
Fixes #37711.

(cherry picked from commit 687a92a1b6a62b705acbb9065bb60fc6e84c9c20)

4 months agomeson: Don't fail install script if file doesn't exist
Daan De Meyer [Thu, 5 Jun 2025 10:14:45 +0000 (12:14 +0200)] 
meson: Don't fail install script if file doesn't exist

Depending on which optional features are enabled, the NSS module
might not have been built, which means the custom install script
will fail to remove the file. Let's pass -f so it succeeds regardless
of whether the file exists or not.

(cherry picked from commit a292b55980d6ff2afd98deb9bcc3118cfcac4c67)

4 months agoman: suggest using --unlock-tpm2-device=auto in cryptenroll example
Lennart Poettering [Thu, 5 Jun 2025 12:40:42 +0000 (14:40 +0200)] 
man: suggest using --unlock-tpm2-device=auto in cryptenroll example

When refreshing a tpm2 enrollment, it makes sense to use tpm2 to unlock
the device.

Fixes: #35279
(cherry picked from commit c91f1a3db864650166d1b635470119b5072d7c41)

4 months agoresolvectl: improve error message if we do not support dumping payload of RR
Lennart Poettering [Thu, 5 Jun 2025 10:43:36 +0000 (12:43 +0200)] 
resolvectl: improve error message if we do not support dumping payload of RR

(cherry picked from commit 231a0417cdb10a60e566900d5525cf7ee0dd9027)

4 months agoman: reword --raw= explanation a bit
Lennart Poettering [Thu, 5 Jun 2025 10:22:34 +0000 (12:22 +0200)] 
man: reword --raw= explanation a bit

Explain what we mean by "payload", and for which RR types this is
intended.

And don#t claim we'd output a full packet, because we don't. We output
only the RR in binary.

Fixes: #37737
(cherry picked from commit 317054365eb11d98ac9d2439ef537e2ee6a3228c)

4 months agoresolvectl: output slightly more data when --raw=payload is used
Lennart Poettering [Thu, 5 Jun 2025 10:17:01 +0000 (12:17 +0200)] 
resolvectl: output slightly more data when --raw=payload is used

Let's also show A/AAAA data in binary form if --raw=payload is used. For
these RR types there's only a single data field, hence it's obbviously
meant.

Inspired by: #37737

(cherry picked from commit 141894f53ac02115cfc9821125619dc782c01122)

4 months agovmspawn: fix call to GetUnitByPID
Sam Leonard [Mon, 2 Jun 2025 15:13:13 +0000 (16:13 +0100)] 
vmspawn: fix call to GetUnitByPID

This commit also adds a handler for SIGRTMIN+4 which is another signal
used to shutdown systemd.

(cherry picked from commit 305e58936f06faa221ddb9cb9a60c2b3d57f083f)

4 months agoio-util: protect against INT_MAX overflow in flush_fd()
Lennart Poettering [Wed, 4 Jun 2025 14:05:41 +0000 (16:05 +0200)] 
io-util: protect against INT_MAX overflow in flush_fd()

(cherry picked from commit 874c4beb24ade904589bf672685752727cbb791e)

4 months agotest-network: extend comments how to run the test
Yu Watanabe [Wed, 4 Jun 2025 15:22:14 +0000 (00:22 +0900)] 
test-network: extend comments how to run the test

(cherry picked from commit 356e9bc0181f575e6c208d343f8e2eef151abc47)

4 months agodoc: clarify that root storage daemons need unit files
Lennart Poettering [Wed, 4 Jun 2025 12:50:11 +0000 (14:50 +0200)] 
doc: clarify that root storage daemons need unit files

Fixes: #37700
(cherry picked from commit d1bacb0b8d311413413a666d23f1025c15a74757)

4 months agodoc: mention 'exitrd' term
Lennart Poettering [Wed, 4 Jun 2025 12:50:07 +0000 (14:50 +0200)] 
doc: mention 'exitrd' term

(cherry picked from commit 59fe8d74b57f54d1d6b7da2b3fe5b82c18c48db1)

4 months agoresolved: honour SD_RESOLVED_NO_CNAME flag when processing cache
Lennart Poettering [Wed, 4 Jun 2025 08:53:50 +0000 (10:53 +0200)] 
resolved: honour SD_RESOLVED_NO_CNAME flag when processing cache

Fixes: #33300
Replaces: #35102
(cherry picked from commit 959d7f1759d67994e3bed7b9d2f23e063475a872)

4 months agocompress: avoid a bunch of div-by-zeroes
Lennart Poettering [Tue, 3 Jun 2025 14:26:17 +0000 (16:26 +0200)] 
compress: avoid a bunch of div-by-zeroes

Follow-up for #37706. Implements the same logic for all compression
algorithms we have.

(cherry picked from commit d483ac1d0d26f1df5237d15765a8fa782ed0db08)

4 months agorepart: if partition already exists, required size may not be multiple of grain size
Yu Watanabe [Fri, 18 Apr 2025 18:41:45 +0000 (03:41 +0900)] 
repart: if partition already exists, required size may not be multiple of grain size

See partition_min_size_with_padding().
Fixes #37178.

(cherry picked from commit cb109e00c45c8e92b1020e6249aac4a212e7f72d)

4 months agovmspawn: do not preserve access permissions and xattrs of template OVMF vars
Arian van Putten [Sun, 1 Jun 2025 10:02:55 +0000 (12:02 +0200)] 
vmspawn: do not preserve access permissions and xattrs of template OVMF vars

This makes vmspawn work when /usr/share/qemu/edk2-i386-vars.fd is on
disk with 0444 permissions as is the case on NixOS.

The nix package manager does not store any access permissions, ownership,
timestamps, or extended attributes in its package format to increase
reproducibility. The only meta-data that is stored is the executable bit.

Thus when unpacking a nix package, the executable bit is preserved, but no other
access permissions are preserved and all files in /nix/store end up as
read-only.

This causes the template OVMF vars file to have 0444 permissions. If we preserve
those permissions when copying the template file to /tmp that means QEMU can not
write to the file and fails.

So lets not preserve permissions and keep the 0600 permissions that are set by
default.

(cherry picked from commit 96e481bfbd6c52aabc72116f7ff479f11baeead1)

4 months agocompress: prevent divide-by-zero when no data is read (#37706)
Alex [Tue, 3 Jun 2025 01:51:00 +0000 (21:51 -0400)] 
compress: prevent divide-by-zero when no data is read (#37706)

If the first call to `loop_read()` returns 0 (no input), `total_in`
remains 0, causing `total_out/total_in` to potential divide by zero.

We add a check before logging the compression ratio to skip the
percentage calculation when total_in is zero.

Co-authored-by: jinyaoguo <guo846@purdue.edu>
(cherry picked from commit 2584f745e0509472e68449bd81c60c26056d514a)

4 months agonetwork: fix a potential divide-by-zero (#37705)
Alex [Mon, 2 Jun 2025 22:47:49 +0000 (18:47 -0400)] 
network: fix a potential divide-by-zero (#37705)

In function `tc_init`, hz is parsed from the content of file
`"/proc/net/psched"` and can be 0.
In function `hierarchy_token_bucket_class_verify`, hz is directly used
as a divisor in
`htb->buffer = htb->rate / hz + htb->mtu;` without any check. This adds a check on hz before using it as a divisor.

Co-authored-by: jinyaoguo <guo846@purdue.edu>
(cherry picked from commit 1a596054a0f937bfc244580f07510759a0e45657)

4 months agorepart: fix generation of UUID= line for vfat in fstab entries
Lennart Poettering [Mon, 2 Jun 2025 08:12:10 +0000 (10:12 +0200)] 
repart: fix generation of UUID= line for vfat in fstab entries

Fixes: #36735
(cherry picked from commit 8504721e0e758aadf454141de014fe28d14cefcd)

4 months agobootctl: fix unclosed quote in debug log
Joaquim Monteiro [Sat, 31 May 2025 18:56:28 +0000 (19:56 +0100)] 
bootctl: fix unclosed quote in debug log

(cherry picked from commit c9e614eb256ec2591170c1b840558103dfa3d2b0)

4 months agomount-util: avoid unnecessary mount_setattr() call in make_fsmount()
Lennart Poettering [Sat, 31 May 2025 05:58:30 +0000 (07:58 +0200)] 
mount-util: avoid unnecessary mount_setattr() call in make_fsmount()

If .attr_set is zero (and .att_clr, .propagation too), then there's no
point in calling mount_setattr().

Fixes: #37062
Note that this optimization is not precisely load-bearing anymore, since
3cc23a2c2345eb188551565349c89ec1fa8f650f got merged which removes the
only caller of make_fsmount() that might trigger it. But it's worth
fixing generic code anyway, in case it gets used like this later again.

(cherry picked from commit 249752d1ecd0f8e160d6e8633f71771b51db5a84)

4 months agotest: wait for coredump to appear before parsing
Luca Boccassi [Fri, 30 May 2025 21:08:39 +0000 (22:08 +0100)] 
test: wait for coredump to appear before parsing

A new core was added to the test, but the loop counter was not increased
to wait for it, so the test races against systemd-coredump's processing.

This failed at least once in debci:

8015s [   32.227813] TEST-87-AUX-UTILS-VM.sh[1038]: + coredumpctl info COREDUMP_TIMESTAMP=1679509902000000
8015s [   32.228684] TEST-87-AUX-UTILS-VM.sh[1723]: No coredumps found.

Follow-up for 0c49e0049b7665bb7769a13ef346fef92e1ad4d6

Fixes https://github.com/systemd/systemd/issues/37666

(cherry picked from commit 703fbb0bba7f1a1b46342d6efedda30e51d46135)

4 months agosync-docs: add '(latest stable)' next to the latest version in the menu
Luca Boccassi [Fri, 30 May 2025 01:03:08 +0000 (02:03 +0100)] 
sync-docs: add '(latest stable)' next to the latest version in the menu

Add visual indicator of what is the latest version in the
version menu

(cherry picked from commit 90b0222091e23ed21ecf7dacc9f885e72bcdfdc5)

4 months agosync-docs: fix selection menu when opening 'latest' man
Luca Boccassi [Fri, 30 May 2025 01:02:01 +0000 (02:02 +0100)] 
sync-docs: fix selection menu when opening 'latest' man

'devel' will always sort first, so the highest version is the second
entry, not the first one

(cherry picked from commit 1cd995185bcd0ea3612ebaee2c311a5f36b2fa64)

4 months agosync-docs: fix syntax warning
Luca Boccassi [Fri, 30 May 2025 00:59:15 +0000 (01:59 +0100)] 
sync-docs: fix syntax warning

sync-docs.py:94: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("v?(\d+).*", tag)

(cherry picked from commit 34d63ac87930ab64cb0f7b9a956ee91ba29148f0)

4 months agosysupdate: change status once operation has completed
Luca Boccassi [Wed, 28 May 2025 23:36:47 +0000 (00:36 +0100)] 
sysupdate: change status once operation has completed

Otherwise after the service exits it will still show
"Installing 'foobar'" as the status, which is confusing

(cherry picked from commit 5cfc9c34f4a38cc82c233e453373d48231944d81)

4 months agossh-generator: add missing newline before [Service] and trailing NL to generated...
Mike Yuan [Wed, 28 May 2025 20:30:46 +0000 (22:30 +0200)] 
ssh-generator: add missing newline before [Service] and trailing NL to generated service

(cherry picked from commit e72bd8dbc867dbd68fa48b22f258feeb7760caa6)

4 months agossh-generator: fix typo
Mike Yuan [Wed, 28 May 2025 20:30:39 +0000 (22:30 +0200)] 
ssh-generator: fix typo

(cherry picked from commit 0aa4c3f0f90f22b566b3c1002ccdce5ab5fb4062)

4 months agoman: better tags, more links, minor grammar and formatting improvements
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:20:50 +0000 (15:20 +0200)] 
man: better tags, more links, minor grammar and formatting improvements

Closes https://github.com/systemd/systemd/issues/35751.

(cherry picked from commit b082968d199976a868fd686340691af112d44c51)

4 months agoman/systemd.network: reword description of MulticastIGMPVersion=
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:31:19 +0000 (15:31 +0200)] 
man/systemd.network: reword description of MulticastIGMPVersion=

(cherry picked from commit acf3bdf8132fc2788ca8a992f9353ccfeef2a3d1)

4 months agoman/systemd.timer: change to positive wording
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:30:20 +0000 (15:30 +0200)] 
man/systemd.timer: change to positive wording

(cherry picked from commit f56d9b82b14f899e03eb1852a705eb91197a0793)

4 months agoman: reword descriptions of numerical fields
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:30:05 +0000 (15:30 +0200)] 
man: reword descriptions of numerical fields

A "string" is a concept in C. In a text-based API, this is implicit, especially
if we say that something was "formatted". So change occurences of "decimal
string" to just "decimal". Similarly, "numerics" is unclear, say "digits".

Also, a "timestamp is in a clock" just sounds wrong. Reword those sentences.

(cherry picked from commit de8d2894b8bd2d77c0f54d0fadd31a67fe1ba822)

4 months agoman/systemd-resolved: update description of routing
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:25:47 +0000 (15:25 +0200)] 
man/systemd-resolved: update description of routing

(cherry picked from commit 948369983c8f8729f13799a2adfff8b95d442824)

4 months agoman/systemd-analyze: rewrite "Exit status" section
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:25:23 +0000 (15:25 +0200)] 
man/systemd-analyze: rewrite "Exit status" section

(cherry picked from commit 8bfdba3cb1f8148ac9218719bf0a93f371128404)

4 months agoman/pam_systemd: use <constant> consistently
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:23:48 +0000 (15:23 +0200)] 
man/pam_systemd: use <constant> consistently

For some reason, <constant> and <literal> were used interchangeably.

(cherry picked from commit 3a23e96b6799589caef547306f5f85f1feaf73dd)

4 months agoman: introduce openssl as man page provider and use it for ukify.1
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 13:23:03 +0000 (15:23 +0200)] 
man: introduce openssl as man page provider and use it for ukify.1

(cherry picked from commit 001ae86a739b13e987419af1e3e13a3caaafa8c3)

4 months agotest-network: add test case for issue #37629
Yu Watanabe [Tue, 27 May 2025 14:31:48 +0000 (23:31 +0900)] 
test-network: add test case for issue #37629

(cherry picked from commit b1bed07d84d76f3ab2f11a42fefce2685dbbe685)

4 months agonetwork/link: update state file when master ifindex is changed
Yu Watanabe [Tue, 27 May 2025 17:09:52 +0000 (02:09 +0900)] 
network/link: update state file when master ifindex is changed

If master ifindex is non-zero, then the carrier state and operational
state of the interface may be the enslaved state.
As the operational state is saved in link state file, and read by
wait-online, we need to update the state file when the master ifindex is
changed.

(cherry picked from commit 7dde00ca57cf20a5d71e580d0bc6173f454095e5)

4 months agonetwork/link: ENODATA from reading IFLA_MASTER when an interface has no master
Yu Watanabe [Tue, 27 May 2025 14:17:40 +0000 (23:17 +0900)] 
network/link: ENODATA from reading IFLA_MASTER when an interface has no master

When an interface leaved from the master interface, then reading
IFLA_MASTER attribute causes ENODATA. When the interface was previously
enslaved to another interface, we need to remove reference to the
interface from the previous master interface.

This is especially important when
```
ip link set dev eth0 nomaster
```
is called.

Fixes a bug introduced by 0d411b7f8f5407e9ce84dcb4ede0b029ade7fede (v249).
Fixes #37629.

(cherry picked from commit f44b20b7b6c6b0a089a3ec2392ac85e4772e0357)

4 months agoman/systemd.timer: Correct inaccuracy in man page
Adrian Vovk [Tue, 18 Feb 2025 20:59:03 +0000 (15:59 -0500)] 
man/systemd.timer: Correct inaccuracy in man page

The docs previously stated that RandomizedDelaySec is applied onto the
next scheduled time, but after 9fa326b18aef0c1e5c80e23a5b41de02155e6f7e
this is no longer the case.

I also reworded FixedRandomDelay= slightly, to make it a bit clearer

(cherry picked from commit fca20a1be69d0ffe3067e5c8676d75b5f8af1a5d)

4 months agomeson: Stop doing nested build when fuzzers are enabled
Daan De Meyer [Sun, 11 May 2025 07:42:28 +0000 (09:42 +0200)] 
meson: Stop doing nested build when fuzzers are enabled

Currently, when fuzzers are enabled, we run meson from within meson
to build the fuzzer executables with sanitizers. The idea is that
we can build the fuzzers with different kinds of sanitizers
independently from the main build.

The issue with this setup is that we don't actually make use of it.
We only build the fuzzers with one set of sanitizers (address,undefined)
so we're adding a bunch of extra complexity without any benefit as we
can just setup the top level meson build with these sanitizers and get
the same result.

The other issue with this setup is that we don't pass on all the options
passed to the top level meson build to the nested meson build. The only things
we pass on are extra compiler arguments and the value of the auto_features
option, but none of the individual feature options if overridden are passed on,
which can lead to very hard to debug issues as an option enabled in the top
level build is not enabled in the nested build.

Since we're not getting anything useful out of this setup, let's simplify
and get rid of the nested meson build. Instead, sanitizers should be enabled
for the top level meson.build. This currently didn't work as we were overriding
the sanitizers passed to the meson build with the fuzzer sanitizer, so we
fix that as well by making sure we combine the fuzzer sanitizer with the ones
passed in by the user.

We also drop support for looking up libFuzzer as a separate library as
it has been shipped builtin in clang since clang 6.0, so we can assume
that -fsanitize=fuzzer is available.

To make sure we still run the fuzzing tests, we enable the fuzz-tests option
by default now to make sure they still always run (without instrumentation unless
one of llvm-fuzz or oss-fuzz is enabled).

(cherry picked from commit d8def5dc8745c3d77cf49ad5abbb6719ffd94035)

4 months agomkosi: install util-linux-systemd in SUSE
Luca Boccassi [Tue, 3 Jun 2025 17:54:52 +0000 (18:54 +0100)] 
mkosi: install util-linux-systemd in SUSE

Some tools (findmnt, logger, lsblk, lslogins) got moved to a
new util-linux-systemd package in Tumbleweed so install it explicitly

(cherry picked from commit aba73b88a224f03c9fdddb2a410bbb29a4d395aa)

4 months agomkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2...
Daan De Meyer [Tue, 27 May 2025 16:31:48 +0000 (18:31 +0200)] 
mkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2 (#37632)

5e739ef1ed mkosi-initrd: Optionally match t64 suffix for tss2
libraries
*   ec70393077 Merge pull request https://github.com/systemd/mkosi/pull/3742 from DaanDeMeyer/man
|\
| * 94cc136fbe mkosi-tools: Install man tool and pages as part of misc
profile
| * eda2ed533d Enforce C.UTF-8 locale for all commands we run
* | 9821e9a3e3 sandbox: Support using mkosi-sandbox as a library
* | 4145382edf Serialize pid in state and check if still exists on load
* |   3d119cba07 Merge pull request https://github.com/systemd/mkosi/pull/3736 from DaanDeMeyer/rpm-gpgkey
|\ \
| |/
|/|
| * 0a5d87b7bb Only pick up /etc/pki/tls and /etc/pki/ca-trust as
certificate dirs
| * c30eee187f Look for rpm gpg keys from inside the sandbox
|/
ef2842dfea Fix version bump check if image version was passed on CLI
12b6251153 apt: Install apt sources if apt was installed via base tree
a0b4e1af9a Make sure git doesn't fail when running as root
585a47705d repart: use --append-fstab=auto if available
cec6ae1dda sandbox: handle case where dev node for tty doesn't exist
a60dade823 initrd: shadow-utils removal is only necessary on old
Fedora
ca11acbd5b Use SPDX identifier instead of file path for license in
pyproject.toml
4d031bc57d Revert license-files property
*   c80dd09008 Merge pull request https://github.com/systemd/mkosi/pull/3722 from behrmann/versiontweaks
|\
| * c76e5dc4bc make version test more readable
| * 90ba99dde1 version: add __repr__ to GenericVersion
|/
dd794ec832 Fix licenses path in pyproject.toml
*   7eeb749840 Merge pull request https://github.com/systemd/mkosi/pull/3702 from aafeijoo-suse/initrd-kmp
|\
| * 565b905aa1 mkosi-initrd: handle symlinks under weak-updates
| * a83ccc10c7 mkosi-initrd: perform basic checks on the kernel dir
before calling mkosi
| * 73cad79c9e mkosi-initrd: --kernel-modules-include ->
--kernel-modules
bac76904c3 build(deps): bump github/codeql-action from 3.28.13 to
3.28.16
44161624a2 Supress ssh unit generation if sshd is not present
b8758dac28 Partially revert 640000a861e9cd9a3807e4158e110a098c74d078
6f11937dc6 Don't use default value if optional settings are set to
none
640000a861 Use a default tools tree by default if mkosi.tools.conf
exists
63d91cc285 mkosi: Override misconfigured gitconfig HTTP/HTTPS proxy
with ProxyUrl
a859b5eb13 Make sure we create the default workspace directory as well

(cherry picked from commit 3366807bf2dd4f9837b596acac7aa5d48b541989)

4 months agomkosi: Run clangd within the tools tree instead of the build container
Daan De Meyer [Wed, 23 Apr 2025 15:31:20 +0000 (17:31 +0200)] 
mkosi: Run clangd within the tools tree instead of the build container

Running within the build sandbox has a number of disadvantages:
- We have a separate clangd cache for each distribution/release combo
- It requires to build the full image before clangd can be used
- It breaks every time the image becomes out of date and requires a
  rebuild
- We can't look at system headers as we don't have the knowledge to map
  them from inside the build sandbox to the corresponding path on the host

Instead, let's have mkosi.clangd run clangd within the tools tree. We
already require building systemd for both the host and the target anyway,
and all the dependencies to build systemd are installed in the tools tree
already for that, as well as clangd since it's installed together with the
other clang tooling we install in the tools tree. Unlike the previous approach,
this approach only requires the mkosi tools tree to be built upfront, which has
a much higher chance of not invalidating its cache. We can also trivially map
system header lookups from within the sandbox to the path within mkosi.tools
on the host so that starts working as well.

(cherry picked from commit bde994efcc45d4e612a15fbd61de42b3149dea20)

4 months agoci: Use mkosi in linter workflow
Daan De Meyer [Wed, 23 Apr 2025 13:17:33 +0000 (15:17 +0200)] 
ci: Use mkosi in linter workflow

Let's reuse the mkosi tools tree to get all the tools we need instead
of pulling them from pypi.

(cherry picked from commit 9e3d048bd0ce74b6285b47c8328de60d0ae63827)

4 months agomkosi: Add clang tools and iwyu to tools tree
Daan De Meyer [Fri, 18 Apr 2025 14:03:09 +0000 (16:03 +0200)] 
mkosi: Add clang tools and iwyu to tools tree

(cherry picked from commit 46833d6c8fbd9ae4379043e54edb1009b9829e0e)

4 months agomkosi: Replace base-devel with base in arch tools packages
Daan De Meyer [Fri, 18 Apr 2025 13:59:41 +0000 (15:59 +0200)] 
mkosi: Replace base-devel with base in arch tools packages

base-devel pulls in a bit too much, especially for NO_BUILD builds
so let's use base instead.

(cherry picked from commit 8ffacf8efa97a8c375dda46dc6d9c4a1940b6fa2)

4 months agomkosi: update mkosi commit reference to dbb4020beee2cdf250f93a425794f1cf8b0fe693
Daan De Meyer [Thu, 17 Apr 2025 14:02:47 +0000 (16:02 +0200)] 
mkosi: update mkosi commit reference to dbb4020beee2cdf250f93a425794f1cf8b0fe693

dbb4020bee mkosi: Use tools tree by default in repository config
a2407a305c dnf: Stop messing around with plugins
eee382ebc6 Fix mkosi help
8d4f9969bb mkosi-obs: simplify generation of signed UEFI auth files
*   364dfc65eb Merge pull request #3661 from septatrix/ssh-runtime
|\
| * ab3b52841c Improve Ssh= documentation
| * 79878d7e6c Add new Ssh=auto and Ssh=runtime options
*   49036322c2 Merge pull request #3682 from DaanDeMeyer/history
|\
| * 96e512fe6e installer: Make sure package manager state is preserved in the image
| * b859a7cf0a Only copy repository metadata from specific subdirs from /var
| * c8bf8e4278 Rename cache_subdirs() to package_subdirs()
* |   54b59c4a2e Merge pull request #3696 from DaanDeMeyer/history-cli
|\ \
| * | 898d89e887 Rework version bumping
| * | cc45fe3bad Only write CLI arguments to history instead of full config
| * | 1def443097 Disallow using --rerun-build-scripts with --force again
| * | 87b03ee264 Rename get_configdir() to finalize_configdir()
| * | 9c1217a217 Get rid of to_json() methods on Args and Config
| |/
* | 124f551e77 mkosi-obs: do not publish roothash
* | fc86100e51 mkosi-obs: append certs from mkosi.uefi.db/ to 'db'
* | 8bee4cb8e2 Make sure sync scripts are executable
|/
a7e90514fa Simplify tools tree out of date error
f9956daba7 Fail if --rerun-build-scripts is used and tools is out of date
d94bf56ae8 mkosi-initrd: add specific configuration for plymouth in Debian
8235ddbc5b Take shared lock in copy_ephemeral()
19c74d5ba5 Two follow ups for #3678
*   0d6f15e8c3 Merge pull request #3678 from DaanDeMeyer/history
|\
| * 5410c4c7af tests: Require genkey to be run once upfront
| * 86b8c611a1 tests: Drop unused tools field
| * c3d1bd0dde Rework history <=> sandbox integration
fce4db970f zypper: display debugging output if ARG_DEBUG is set
2c052b9d45 Allow PCR signing settings to be overridden in sub-images
00c220225b zypper: do not fail if a package configured to be removed is not found

(cherry picked from commit d9826d303bda2cb90437ad3a003d12a298805c58)

4 months agoRevert "mkosi: temporarily disable panic_on_warn"
Luca Boccassi [Fri, 4 Apr 2025 12:48:31 +0000 (13:48 +0100)] 
Revert "mkosi: temporarily disable panic_on_warn"

The BRTFS issue that caused a spurious WARN has been fixed and
backported to Noble, so we can enable panic_on_warm again.

This reverts commit 930d65ccca8193a8cb635099c55852b677f5d58a.

(cherry picked from commit 10ed8cda58f8b4c5ceea305ecf41f3f8103458ea)

4 months agomkosi: Rename mkosi.prepare scripts for systemd deps to systemd.prepare
Daan De Meyer [Thu, 17 Apr 2025 10:40:17 +0000 (12:40 +0200)] 
mkosi: Rename mkosi.prepare scripts for systemd deps to systemd.prepare

These scripts are reused by multiple images, so let's give them a
non-standard name to indicate that. Otherwise it's all too easy to add
something to mkosi.prepare for the main image and accidentally have it
included in all the subimages as well even though that's not desired.

(cherry picked from commit e8881f09c5a48408b545140c3ed822cec0365f86)

4 months agomkosi: Reuse main image prepare scripts in subimages
Daan De Meyer [Wed, 16 Apr 2025 12:04:33 +0000 (14:04 +0200)] 
mkosi: Reuse main image prepare scripts in subimages

In the subimages we also want to make sure all dependencies of the
systemd packages are cached so reuse the same prepare scripts from
the main image to do that.

We only want required dependencies in the subimages, not recommended
or suggested dependendencies, so add an environment variable
$SYSTEMD_REQUIRED_DEPS_ONLY which the prepare scripts can check for
and enable it for the subimages.

(cherry picked from commit 52a82bcfc9ea627c12ae32f3065b1582dfbf864b)

4 months agomkosi: Make sure coreutils is installed in initrd/exitrd
Daan De Meyer [Wed, 16 Apr 2025 12:20:41 +0000 (14:20 +0200)] 
mkosi: Make sure coreutils is installed in initrd/exitrd

This is already installed but Fedora/CentOS systems are nudged towards
installing coreutils-single which then later causes issues when we try
to install coreutils as a dependency of systemd so let's make sure we
pick coreutils from the beginning.

(cherry picked from commit 0ac6fc2917704e1bddedde95cf1e899811e5f581)

4 months agodocs: fix mkosi section for Environment= setting
Yu Watanabe [Tue, 15 Apr 2025 23:30:25 +0000 (08:30 +0900)] 
docs: fix mkosi section for Environment= setting

(cherry picked from commit f477751b10178d2a5b8c6a186b03fcc04479cbd9)

4 months agomkosi: enable autologin also with --console=gui
Luca Boccassi [Thu, 10 Apr 2025 22:30:50 +0000 (23:30 +0100)] 
mkosi: enable autologin also with --console=gui

(cherry picked from commit 988fae80245ca8891ebde168e3fdd9d968705fa0)

4 months agomkosi: Move TEST-24-CRYPTSETUP files to mkosi/ directory
Daan De Meyer [Wed, 9 Apr 2025 13:31:21 +0000 (15:31 +0200)] 
mkosi: Move TEST-24-CRYPTSETUP files to mkosi/ directory

If the integration tests have been installed in the systemd-tests
package, the path to these in mkosi.postinst.chroot will be wrong.
Let's fix the issue by moving these files into the mkosi/ directory
as they're only used by mkosi regardless so they make more sense to
be there anyway.

(cherry picked from commit e2b01571d01dd120584f7be93e2cfdd7f87296d3)

4 months agomkosi: update mkosi commit reference to 7e4ec15aee6b98300b2ee14265bc647a716a9f8a
Daan De Meyer [Wed, 9 Apr 2025 14:25:49 +0000 (16:25 +0200)] 
mkosi: update mkosi commit reference to 7e4ec15aee6b98300b2ee14265bc647a716a9f8a

7e4ec15aee Generate key-cert pair in config directory (fixes #3655)
5793e64958 Don't use gen_kernel_images() in run_depmod()
bc497f1d17 Fix typing due to recent changes in typeshed
e6a603a21a Add "plymouth" initrd profile

(cherry picked from commit c7bb07fff5cf4356e4b633cf93a460d1beb92b6e)

4 months agomkosi: Set time-epoch= to fixed value
Daan De Meyer [Wed, 9 Apr 2025 14:12:30 +0000 (16:12 +0200)] 
mkosi: Set time-epoch= to fixed value

Turns out makepkg sets $SOURCE_DATE_EPOCH= to the current time for
every build if not set explicitly which causes full rebuilds if we
don't set time-epoch explicitly ourselves, so let's do that everywhere
to avoid unnecessary rebuilds.

(cherry picked from commit aba3ef6616d8c91a0b0ef1432d52d814a162fb13)

4 months agomkosi: drop os-release symlink for minimal-base image
Luca Boccassi [Tue, 8 Apr 2025 19:32:32 +0000 (20:32 +0100)] 
mkosi: drop os-release symlink for minimal-base image

[  385s] ERROR: link target doesn't exist (neither in build root nor in installed system):
[  385s]   /usr/lib/systemd/tests/mkosi/mkosi.images/minimal-base/mkosi.extra/etc/os-release -> ../usr/lib/os-release

It shouldn't be even needed, everything should look in /usr/lib/os-release too

Follow-up for a0ce5e642ff4fcfcd7da25a585bfbd83b5737235

(cherry picked from commit 5e5f792193c1bda2684436a46dca45ed487d4f49)

4 months agomkosi: Set mitigations=off
Daan De Meyer [Tue, 8 Apr 2025 16:56:39 +0000 (18:56 +0200)] 
mkosi: Set mitigations=off

Might as well disable mitigations for these VMs. Who knows, maybe it'll
speed something up.

(cherry picked from commit 36645ec255b1508a76e3d07efb129616e89ca3ac)

4 months agomkosi: Make MinimumVersion= a git commit
Daan De Meyer [Tue, 8 Apr 2025 11:02:54 +0000 (13:02 +0200)] 
mkosi: Make MinimumVersion= a git commit

With the latest mkosi it's possible for MinimumVersion= to be a git
commit so let's start making use of that. This will make mkosi fail
if it's executed within the systemd repository and the checked out
commit is too old.

Putting the mkosi commit sha in mkosi/mkosi.conf also allows retrieving
it without having the full source tree available.

We also make a bunch of improvements to the fetch-mkosi.py script.

(cherry picked from commit 278d5bfd7e04d1eacd2996573729193b4396b6c0)

4 months agomkosi: Update to latest
Daan De Meyer [Mon, 7 Apr 2025 08:22:57 +0000 (10:22 +0200)] 
mkosi: Update to latest

(cherry picked from commit a94520dc78c34b5b5f86c2b13f6930d749503e3c)

5 months agomeson: bump version to 257.6 v257.6
Zbigniew JÄ™drzejewski-Szmek [Thu, 29 May 2025 16:30:31 +0000 (18:30 +0200)] 
meson: bump version to 257.6

5 months agoDefine helper to call PR_SET_DUMPABLE
Zbigniew JÄ™drzejewski-Szmek [Wed, 28 May 2025 16:31:13 +0000 (18:31 +0200)] 
Define helper to call PR_SET_DUMPABLE

(cherry picked from commit 9ce8e3e449def92c75ada41b7d10c5bc3946be77)

5 months agocoredump: introduce an enum to wrap dumpable constants
Zbigniew JÄ™drzejewski-Szmek [Tue, 27 May 2025 18:32:30 +0000 (20:32 +0200)] 
coredump: introduce an enum to wrap dumpable constants

Two constants are described in the man page, but are not defined by a header.
The third constant is described in the kernel docs. Use explicit values to
show that those are values are defined externally.

(cherry picked from commit 76e0ab49c47965877c19772a2b3bf55f6417ca39)