Commit Graph
79213 Commits
Author SHA1 Message Date
Yu Watanabe 052ab05caf Two test readme improvements (#36265) 2025-02-05 10:08:00 +09:00
Daan De Meyer f017a55213 test: Move external packages section down and reword a little
This is advanced level stuff that regular contributors don't care
about in the slightest, so move it further down. Also reword the
section a little while we're at it.
2025-02-04 20:46:11 +01:00
Daan De Meyer 728a88e549 test: Move NO_BUILD instructions to a separate section
This isn't relevant for regular development, so let's move it to a
separate section.
2025-02-04 20:24:17 +01:00
Daan De Meyer 284a56ff60 test: Drop -Dremote=enabled instructions from readme
The test commands now use mkosi sandbox which always makes sure the
required dependencies for systemd-journal-remote are enabled so no
need to reconfigure meson explicitly anymore.
2025-02-04 20:21:36 +01:00
Daan De Meyer 060676871e machine: introduce io.systemd.MachineImage.CleanPool (#35928)
This PR introduces io.systemd.MachineImage.CleanPool method which is
alternative to DBus's CleanPool.
2025-02-04 18:43:23 +01:00
Daan De Meyer 38801c9129 ukify/measure: Revert changes to use SizeOfImage from Linux PE binary
With 19812661f1, we make sure at runtime
in the stub itself that SizeOfImage from the Linux EFISTUB PE binary is
taken into account, so there's no need to take this into account in ukify
itself. By reverting the ukify change, we again ensure that Misc_VirtualSize
reflects the actual size of the Linux EFISTUB PE binary in the .linux section
which lots of tooling depends on. It also makes sure we don't measure a bunch
of extra zeroes in the stub which should fix systemd-pcrlock measurements as
well.

This effectively reverts 2188c759f9 and
0005411352.

Fixes #35851
2025-02-04 14:11:38 +01:00
Ivan Kruglov ea9b72ad35 machine: tests for io.systemd.MachineImage.CleanPool 2025-02-04 03:03:00 -08:00
Ivan Kruglov f6a7328e24 machine: introduce io.systemd.MachineImage.CleanPool 2025-02-04 03:03:00 -08:00
Ivan Kruglov 5a99c9d778 machine: use image_clean_pool_operation() in dbus 2025-02-04 03:03:00 -08:00
Ivan Kruglov a4019c75c2 machine: image_clean_pool_operation() 2025-02-04 03:03:00 -08:00
Ivan Kruglov 2694549ddf machine: rename machine_copy_from_to() -> machine_copy_from_to_operation()
This is done to make it clear that machine_copy_from_to() use and
returns an Operation object.
2025-02-04 02:58:48 -08:00
Daan De Meyer 0e470e1cc3 sysupdate: Update example mode to 644 instead of 444
The UKI file has to be writable to be able to do boot counting in
the UEFI firmware which involves renaming the file by writing to
the file metadata which requires the file to be writable in the FAT
filesystem.

Fixes #36170
2025-02-04 11:47:19 +01:00
Vyacheslav Yurkov b1e5a7aa3f meson: add install tag for systemctl
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
2025-02-04 09:56:33 +01:00
Dimitri John Ledkov 6ad594122c docs: Update CPE fields in package metadata spec (#36251)
Update osCPE field example to use cpe 2.3 format, as is in active use by
AmazonLinux 2023 for example.

Add appCPE field example to document the upstream application CPE for
the applicable CVEs. Often distribution source package names are
different from the upstream CPE. For example adding/removing "lib"
prefix, or adding version stream "-3" suffix. This typically leads to
guessing or fuzzy matching. Adding appCPE in such cases can help to
disambiguate (or collate) correct application CPEs; especially beyond
the lifetime of osCPE support timeframes. This also will help a lot with
packaging multiple alternative source packages of the same software
(e.g. nginx-full nginx-core); different version streams (e.g.
openssl-1.1, openssl-3); or alternative builds of upstream software with
largely the same CVEs with multiple version streams (e.g.
openjdk-{22,17,11..}, corretto-{22,17,11..}, temurin-{22,17,11..}, etc).
2025-02-03 22:14:56 +00:00
Alexander Shopov f3519fb9da po: Translated using Weblate (Bulgarian)
Currently translated at 87.5% (225 of 257 strings)

Co-authored-by: Alexander Shopov <ash@kambanaria.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/bg/
Translation: systemd/main
2025-02-04 06:21:49 +09:00
Daan De Meyer 4ba3530d67 homectl: Fix empty checks 2025-02-03 19:24:31 +01:00
Daan De Meyer 895b2f18cf Update TODO 2025-02-03 17:09:52 +01:00
Dimitri John Ledkov 656dea9074 Symlink NVD CPE search 2025-02-03 12:00:24 +00:00
Dimitri John Ledkov 355afa9232 docs: Update CPE fields in package metadata spec
Update osCPE field example to use cpe 2.3 format, as is in active use by
AmazonLinux 2023 for example.

Add appCPE field example to document the upstream application CPE for the
applicable CVEs. Often distribution source package names are different from the
upstream CPE. For example adding/removing "lib" prefix, or adding version
stream "-3" suffix. This typically leads to guessing or fuzzy matching. Adding
appCPE in such cases can help to disambiguate (or collate) correct application
CPEs; especially beyond the lifetime of osCPE support timeframes.
2025-02-03 11:22:25 +00:00
Daan De Meyer 7ebe910c88 user-runtime-dir: Log the quota limit in the warning message on failure 2025-02-03 11:10:22 +01:00
Zbigniew Jędrzejewski-Szmek 2e326aad7f ukify: Calculate section size more correctly (#36215)
We should only use Misc_VirtualSize if it's smaller than SizeOfRawData,
since in that case it'll be the non-aligned section size. Otherwise we
have to use SizeOfRawData to get the size on disk.
2025-02-03 10:17:37 +01:00
Yu Watanabe d35f7966ba Merge remote-tracking branch 'weblate/main' into HEAD 2025-02-02 16:21:10 +09:00
Emilio Sepulveda 32970e8348 po: Added translation using Weblate (Interlingua)
Co-authored-by: Emilio Sepulveda <emism.translations@gmail.com>
2025-02-02 15:57:57 +09:00
Yu Watanabe 4489fed739 po: sort languages 2025-02-02 15:44:10 +09:00
Emilio Sepulveda 4e8ebed978 po: Added translation using Weblate (Interlingua)
Co-authored-by: Emilio Sepulveda <emism.translations@gmail.com>
2025-02-02 06:37:08 +01:00
andhe 7b7e127a02 man: systemd-repart: factory=reset typo 2025-02-02 08:13:19 +09:00
dependabot[bot] 6e513fa489 build(deps): bump super-linter/super-linter from 7.1.0 to 7.2.1
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/b92721f792f381cedc002ecdbb9847a15ece5bb8...85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-02 04:09:23 +09:00
dependabot[bot] 3094820133 build(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.1
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/01570a1f39cb168c169c802c3bceb9e93fb10974...c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-02 04:08:39 +09:00
dependabot[bot] f826602220 build(deps): bump coverallsapp/github-action from 2.3.4 to 2.3.6
Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.3.4 to 2.3.6.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](https://github.com/coverallsapp/github-action/compare/cfd0633edbd2411b532b808ba7a8b5e04f76d2c8...648a8eb78e6d50909eff900e4ec85cab4524a45b)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-02 04:08:24 +09:00
Luca Boccassi 75ee025c5d kernel-install: install addons in 90-uki-copy.install if they are present
mkosi now has a kernel-install plugin to build addons, mkosi-addon.
If there are addons in <uki>.extra.d/ install them too to
the ESP.
2025-02-01 18:12:47 +09:00
Mike Yuan e14e9c9f17 Revert "Reduce priority of "cleared HibernateLocation" message"
This reverts commit 9f575145ea.
2025-02-01 15:30:50 +09:00
Yu Watanabe 546e6cb2e3 userdb: fix typo
Follow-up for 7419291670.
2025-02-01 14:09:06 +09:00
Ani Sinha 83bf58f39d uki: introduce support for a .efifw section
UKIs can be used to bundle uefi firmwares that can be measured and
used on a confidential computing environment. There can be more than one
firmware blob bundle, each one for a specific platform. Also firmware images
can themselves be containers like IGVM files that can in turn bundle the
actual firmware blob. This change is specifically for uefi firmwares, not
IGVM container files.

This change adds support to introduce a .efifw section in UKI that can be
used for firmware blobs/images. There can be multiple such sections and each
section can contain a single firmware image.

The matching .hwids entry for a specific platform can be used to select the
most appropriate firmware blob.

ukify tool has been also changed to support addition of a firmware image
in UKI.

Since firmware gets measured automatically, we do not need to measure it
separately as a part of the UKI.
2025-01-31 10:05:00 +01:00
Zbigniew Jędrzejewski-Szmek b66a4c157e firstboot: fix crash when hostname question is skipped 2025-01-30 19:48:43 +01:00
Beniamino Galvani 30675a6ee9 dns-domain: accept encoded domain names without terminating zero label
Commit 1be9b30a3b ("dhcp6: use dns_name_from_wire_format") introduced a
stricter validation of domains received via DHCPv6, by using function
dns_name_from_wire_format() which rejects the domain when it is missing the
terminating zero label. According to RFC 4704 § 4.2, DHCPv6 servers should
always add the zero label:

   To send a fully qualified domain name, the Domain Name field is set
   to the DNS-encoded domain name including the terminating zero-length
   label.  To send a partial name, the Domain Name field is set to the
   DNS-encoded domain name without the terminating zero-length label.

   [...]

   Servers SHOULD send the complete fully qualified domain name in
   Client FQDN options.

In practice, there is at least on common DHCPv6 server implementation (dnsmasq)
that sends the FQDN option without the ending zero-length label; after
upgrading to the new systemd, the client cannot parse the option and therefore
the machine doesn't get the hostname provided by dnsmasq.

This commit restores the old behavior that considers a domain valid even when
it's missing the terminating zero label.

Here's a quick reproducer:

--8<--

ip link add veth0 type veth peer name veth1
ip netns add ns1
ip link set veth1 netns ns1
ip link set veth0 address 00:11:22:33:44:55
ip link set veth0 up
ip -n ns1 link set veth1 up
ip -n ns1 address add dev veth1 fd01::1/64

ip netns exec ns1 dnsmasq \
   --pid-file=/tmp/dnsmasq.pid --no-hosts \
   --bind-interfaces --interface veth1 --except-interface lo \
   --dhcp-range=fd01::100,fd01::200 --enable-ra \
   --dhcp-host 00:11:22:33:44:55,foobar &

cat <<EOF > /etc/systemd/network/veth0.network
[Match]
Name=veth0

[Network]
DHCP=ipv6
EOF

networkctl reload
networkctl up veth0
sleep 5
hostname

--8<--

Without this change, systemd-networkd prints the following message and doesn't
set the hostname from DHCP:

  veth0: DHCPv6 client: Failed to parse FQDN option, ignoring: Bad message
2025-01-30 16:18:49 +00:00
Luca Boccassi 515ab90e4d cryptenroll/repart/creds: no longer default to binding against literal PCR 7 (#36200)
PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.
2025-01-30 14:57:15 +00:00
Andrew Sayers 6c45c5a57c Fix tense in SD_MESSAGE_SHUTDOWN_STR
This is printed by bus_manager_log_shutdown() in logind-dbus.c,
near the start of the shutdown process.

Clarify that events *will* happen, long after this message is sent.
2025-01-30 10:36:38 +01:00
Andrew Sayers 9f575145ea Reduce priority of "cleared HibernateLocation" message
This message appears when a computer hibernates, then awakens, then reboots,
and everything goes OK.  It's a normal progress message the user doesn't need
to know about, but it distracts them from important startup messages and could
even train them to ignore the warning when the procedure fails.

Reduce the level to LOG_INFO.
2025-01-30 10:36:13 +01:00
Lennart Poettering c205840fe0 cryptenroll,repart: print a log message if no access restrictions are applied to TPM-based encryption 2025-01-30 10:32:26 +01:00
Lennart Poettering 4b840414be cryptenroll/repart/creds: no longer default to binding against literal PCR 7
PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.
2025-01-30 10:32:26 +01:00
Luca Boccassi f6928e6b5d pe: do not warn about .initrd addons
We now support them, so stop warning about them.
2025-01-30 09:27:42 +01:00
Devilish Spirits 164295eb6d Fix inversion of timesyncd_usec/epoch_usec variables in clock-warp.c
In clock_apply_epoch() function, the /usr/lib/clock-epoch timestamp was set to timesyncd_usec instead of epoch_usec and vice-versa which produced a misleading log message about the clock source systemd used for early clock sanitization. This trivial commit fix the mistake.
2025-01-30 09:27:03 +01:00
Nick Rosbrook 5dc89b327f tree-wide: remove some spurious newlines
Specifically, remove double newlines, and newlines before '}'.
2025-01-29 16:17:46 +00:00
Alex Xu (Hello71) bc996fd1ba meson: generate keyboard-keys-list from local input.h
otherwise it will use the system input.h which will fail to build if
newer than the bundled version

Fixes: 0a73c8e7b8 ("linux: import input.h and friends")
2025-01-30 00:39:52 +09:00
Daan De Meyer 33b25fa11c ukify: Calculate section size more correctly
We should only use Misc_VirtualSize if it's smaller than SizeOfRawData,
since in that case it'll be the non-aligned section size. Otherwise we
have to use SizeOfRawData to get the size on disk.
2025-01-29 14:44:27 +01:00
Daan De Meyer 2d6ae4319c ukify: Fix two typing issues 2025-01-29 14:43:06 +01:00
Lennart Poettering 0f477f1d0b docs: fix plural form
Addresses: https://github.com/systemd/systemd/pull/36133#discussion_r1932816287
2025-01-29 13:13:59 +01:00
Lennart Poettering 37cc66324c userdb: move filter of user/group records to the varlink server side (#36133)
In v257 userdbctl gained support for filtering user records with fuzzy
matching and some other parameters. It was done on the client side only.
This PR adds server-side matching, by exendting the generic userdb
varlink api.

The api is generic any may have many other implementors, hence care is
taken to fallback to exclusively client side filtering in case the
service does not support the new parameters.

In fact I even opted to not actually implement server-side filtering in
any services but systemd-userdbd.service, because it's probably not too
much an optimization in relevant services (we might want to revisit this
later). By implementing it in userdbd the primary entrypoint for userdb
is however covered: the multiplexer interface which provides a single
interface for the multitude of backends. Or in other words: the
multiplexer itself supports server-side filtering even if its own
backends don't, and will hide this neatly away.

One nice side effect from not implementing server side filtering for all
our backends is that the fallback codepaths are comprehensively tested.

Note that this adds some unit tests but not new integration test for all
this, as the filtering tests for userdbctl already existed before, we
just move their implementation from the client to the server side.
2025-01-29 13:11:38 +01:00
Lennart Poettering 814e9eab1e update TODO 2025-01-28 23:56:34 +01:00
AndreFerreiraMsc 3e1d7b6aae man: Update nss-myhostname.xml to reflect files 2025-01-29 04:28:10 +09:00