Commit Graph
79438 Commits
Author SHA1 Message Date
Luca Boccassi 7dd9ba6feb mkosi: update debian commit reference
* 08eb5e1eff Set tty device node mode to 0600
* e3955d1ca2 initramfs-tools: copy hwdb.bin to initramfs
* aff03b8933 d/rules: fix bpftool path discovery on ubuntu
* cab4f15666 Update changelog for 257.3-1 release
* 9bfeffe2a3 autopkgtest: fix mkosi config section
* 44487bfe02 ukify: depend on python3-zstandard and recommend python3-lz4
* 0a20294f18 d/rules: adjust vmlinux.h path for Ubuntu
* 94fa0939ed Drop fallback for missing linux-bpf-dev package
* b0b75e3f4b systemd-boot: check that bootvar really points to sd-boot
* 464453cbd6 systemd-boot: fix creating bootvar on arm64
* ce4a878ef7 systemd-boot: warn if efibootmgr is not installed
* cce6971f68 Install new udev rule for hidraw
* 0c483fbd26 d/t/control: do not pull in gdm3 on loong64
* 52451a0c14 d/t/control: depend on debian-archive-keyring and ubuntu-keyring
2025-02-17 14:50:07 +09:00
Luca Boccassi 135640c140 dissect: fix log_debug_errno assert due to r=0
systemd-dissect[612]: Assertion '(_error) != 0' failed at src/shared/dissect-image.c:3436, function dissected_image_load_verity_sig_partition(). Aborting.
2025-02-17 14:38:05 +09:00
Daan De Meyer 7db71cd79f ukify: Fix --sign-profile= check for main profile
opts.profile is always an env file so we have to parse the default
value as well to check if it's in --sign-profile= or not.
2025-02-16 18:52:26 +01:00
Luca Boccassi 1f1b403d03 journal-remote: several follow-ups for compression support, and trivial cleanups (#36334)
Follow-ups for cfaf78001c (#34822).
2025-02-16 14:33:47 +00:00
Yu Watanabe 5f494e8fa6 macro-fundamental: add _nonnull_if_nonzero_ and use it in basic/ (#36395) 2025-02-16 20:21:08 +09:00
Yu Watanabe 56ab3ae170 journal-upload: several follow-ups for Accept-Encoding header handling
This makes,
- When a wildcard value '*' is specified, use the first supported
  compression algorithm,
- disable compression if Accept-Encoding header is unspecified or
  no supported compression algorithm specified in the header,
- ignore all errors in parsing the header.
2025-02-16 20:10:27 +09:00
Yu Watanabe 04b096400b journal-upload: split-out update_content_encoding_header()
No functional change, just refactoring and preparation for later commit.
2025-02-16 20:08:39 +09:00
Yu Watanabe c259c9e253 journal-remote: several follow-ups for Compression= option handling
Follow-ups for cfaf78001c.

- use OrderedHashmap to manage configured compression algorithms, then
  drop CompressionArgs,
- rename CompressionOpts -> CompressionConfig,
- refuse 'none' in Compression= setting, but accept boolean false, which
  disables compression,
- when Compression= option is unspecified, enable all supported compression
  algorithms by default,
- do not set 'none' to the Accept-Encoding header.
2025-02-16 20:08:39 +09:00
Yu Watanabe 8c7e4e0d5e journal-remote: replace extract_first_word() with simple strchr() 2025-02-16 20:08:39 +09:00
Yu Watanabe c272c06b9e journal-remote: assume received data is not compressed when Content-Encoding header is not set
Also, refuse spurious header `Content-Encoding: none`.
2025-02-16 20:08:39 +09:00
Yu Watanabe fc1cf91aa8 journal-remote: copy positional arguments
This also fixes several memory leaks.
2025-02-16 20:08:39 +09:00
Yu Watanabe a8516216d2 journal-remote: trivial coding style fix 2025-02-16 20:08:39 +09:00
Daan De Meyer eba51a9dbd repart: Delay private key and certificate check until actual use
For many reasons, we might not actually sign a verity signature
partition, even if ope is specified in the partition definition files.
It might already exist, it might be deferred, it might be excluded, ...

Since we cannot check if partition already exists when reading the
configuration, let's delay the check for whether a certificate and
key have been provided until we're actually about to sign a roothash.
2025-02-16 10:43:56 +01:00
Mike Yuan 6da2ea9fa9 basic: use _nonnull_if_nonzero_ where appropriate 2025-02-16 12:37:10 +09:00
Mike Yuan 6bdbfb7eb6 basic/escape: swap 'bad' and 'len' params for decescape()
To follow our usual coding style.
2025-02-16 12:37:10 +09:00
Mike Yuan 7de7c7b6dc basic/escape: accept SIZE_MAX and perform overflow check in cescape_length() and decescape() too
While at it, make cescape() static inline.
2025-02-16 12:37:10 +09:00
Mike Yuan c7a097d7e1 basic/escape: octescape() doesn't really take 'bad' param 2025-02-16 12:37:10 +09:00
Mike Yuan 3aa0cf23b4 macro-fundamental: add _nonnull_if_nonzero_
Introduced in gcc 15:
https://github.com/gcc-mirror/gcc/commit/19fe55c4801de50deee03b333e94d007aae222e3
2025-02-16 12:37:10 +09:00
Daan De Meyer 034f027be4 mkosi: Install systemd in Fedora build image
rpm pulls in systemd-standalone-sysusers now by default to get
systemd-sysusers which causes a conflict later on during the prepare
script when systemd is pulled in as a dependency of device-mapper so
let's install systemd in the initial transaction so systemd provides
systemd-sysusers and systemd-standalone-sysusers is never installed
in the first place.
2025-02-15 23:37:50 +00:00
Louis Sautier 24af6a0d0a man/networkd.conf: add missing whitespace between words
Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
2025-02-16 00:27:43 +01:00
Luca Boccassi 05e0c43a0b README: fix broken link in OBS badge
The badge link was updated, but the URL link was not

Follow-up for 13871aa656
2025-02-15 01:32:51 +00:00
Volodymyr Shkriabets f6209ca4d7 hwdb.d: add ANP09 Intel n100 tablet sensor configuration (#36390)
I propose fix for ACCEL_MOUNT_MATRIX for popular on China markets Intel
n100 7" tablet. I can't find any information about manufacturer.

P:
/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00
M: i2c-BOSC0200:00
R: 00
J: +i2c:i2c-BOSC0200:00
U: i2c
V: bmc150_accel_i2c
E:
DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00
E: SUBSYSTEM=i2c
E: DRIVER=bmc150_accel_i2c
E: MODALIAS=acpi:BOSC0200:BOSC0200:
E: USEC_INITIALIZED=3546649
E: ID_VENDOR_FROM_DATABASE=BOS

P:
/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00/iio:device0
M: iio:device0
R: 0
J: c238:0
U: iio
T: iio_device
D: c 238:0
N: iio:device0
L: 0
E:
DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-14/i2c-BOSC0200:00/iio:device0
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: MAJOR=238
E: MINOR=0
E: USEC_INITIALIZED=3556556
E: ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, -1
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:


DMI tablet string


dmi:bvnAmericanMegatrendsInternational,LLC.:bvrANP09_INTEL001:bd08/16/2024:br5.27:efr0.0:svn:pn:pvrDefaultstring:rvn:rn:rvrDefaultstring:cvnDefaultstring:ct10:cvrDefaultstring:sku:
2025-02-15 00:39:50 +00:00
Luca Boccassi 21d36ef770 mkosi: Fix mkosi.clangd (#36387)
- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.
2025-02-14 20:02:45 +00:00
Daan De Meyer 531750e9b0 mkosi: Fix mkosi.clangd
- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.
2025-02-14 17:13:10 +01:00
Daan De Meyer 487ec6aa3f mkosi: Update to latest 2025-02-14 17:13:08 +01:00
Zbigniew Jędrzejewski-Szmek 8c81f9a3cf ukify: fixes with kernel compression (#36381) 2025-02-14 16:47:49 +01:00
fishears 8ac7e25aab hwdb.d: add support for Akoya P15645 2025-02-15 00:10:00 +09:00
Yu Watanabe 5a83fd5a2a resolve: fix use-after-free (#36353)
Fixes a bug introduced by 81ae2237c1.
Fixes #36351.
2025-02-15 00:03:21 +09:00
Yu Watanabe 03d8b9dfab TEST-75-RESOLVED: skip a testcase when running on sanitizer 2025-02-14 11:54:56 +00:00
Yu Watanabe 2c9d6986d8 TEST-75-RESOLVED: keep IPv6 stack enabled
To make the issue #36351 easily reproduced.
2025-02-14 11:54:56 +00:00
Yu Watanabe 39da9b894f TEST-75-RESOLVED: assume knot 3.0 or newer is installed
And make the test failed if knot is installed but older than 3.0.
2025-02-14 11:54:56 +00:00
Yu Watanabe bf4b254d70 mkosi: wrap several more commands when running on sanitizers
They are used in TEST-75-RESOLVED.
2025-02-14 11:54:56 +00:00
Muhammad Nuzaihan Bin Kamal Luddin e644b332d0 resolve: clear previous assignments of RefuseRecordTypes= on reload
Follow-up for 81ae2237c1.
2025-02-14 11:54:56 +00:00
Yu Watanabe 225dbd6108 resolve: fix use-after-free
Fixes a bug introduced by 81ae2237c1.
Fixes #36351.
2025-02-14 11:54:56 +00:00
Mike Yuan d08848b906 README: new mount API was introduced in v5.2
Follow-up for d75c74e7bf
2025-02-14 12:53:22 +01:00
Luca Boccassi cdedc90caf ukify: do not insist on a stub being available when joining pcrsigs
It is not used in this case, so skip it, otherwise it will need to be
installed even if it is not used

Follow-up for 9876e88e23
2025-02-14 10:57:03 +00:00
Luca Boccassi 0dd03215f1 ukify: if the specified kernel is not a valid PE file try to decompress it
On some distros on some architectures (e.g.: Ubuntu arm64) the kernel is shipped as
a gzipped file, which the UEFI firmware does not understand.
If pefile fails to parse it, try to decompress it.
2025-02-14 10:57:03 +00:00
Luca Boccassi a6d51ae582 ukify: fix zboot parsing with zstd
The header starts with 'zstd', not 'zstd22':

$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2510, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2499, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1328, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 384, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 374, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 221, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 201, in get_zboot_kernel
    raise NotImplementedError(f'unknown compressed type: {comp_type!r}')
NotImplementedError: unknown compressed type: b'zstd\x00\x00'
2025-02-14 10:28:41 +00:00
Luca Boccassi fbc6fecf1a ukify: switch from zstd to zstandard
The zstd library does not support stream decompression, and it
requires the zstd header to contain extra metadata, that the kernel
build does not append:

$ file -k vmlinuz-6.13+unreleased-cloud-arm64
vmlinuz-6.13+unreleased-cloud-arm64: PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows, 2 sections\012- data
$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2508, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2497, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1326, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 382, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 372, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 219, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 199, in get_zboot_kernel
    return cast(bytes, zstd.uncompress(f.read(size)))
                       ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
zstd.Error: Input data invalid or missing content size in frame header.

This appears to be by design:

https://github.com/sergey-dryabzhinsky/python-zstd/issues/53

Switch to python3-zstandard, which works.
2025-02-14 10:28:41 +00:00
Yu Watanabe dd0d821a33 journal-remote: fix typo
Follow-ups for cfaf78001c.
2025-02-14 13:23:27 +09:00
Yu Watanabe 530ee01c60 TODO: fix typo
Follow-ups for 0eeeb36bd5 and
3fd11dbcd9.
2025-02-14 13:23:11 +09:00
Yu Watanabe d75c74e7bf README: mention fsopen() is since kernel v5.2
It is introduced by the following commit.
https://github.com/torvalds/linux/commit/24dcb3d90a1f67fe08c68a004af37df059d74005
2025-02-14 13:06:33 +09:00
Yu Watanabe 4053af87bb core/mount: rework GracefulOptions= as x-systemd.graceful-option= (#36356)
Prompted by #36337
2025-02-14 13:01:14 +09:00
Yu Watanabe daae625140 core/service: drop unneeded unit_add_to_gc_queue() (#36368) 2025-02-14 12:51:48 +09:00
Daan De Meyer ebcd568aa3 mkosi: Update to latest 2025-02-14 02:05:03 +00:00
Luca Boccassi 1585237b6a varlink idl fixes (#36376) 2025-02-13 21:16:04 +00:00
Daan De Meyer 1e6514d6d0 fmf: Don't fail if we can't modify sysctl values
If the script is running unprivileged we might not be able to modify
these so let's skip in that case.
2025-02-13 20:35:56 +00:00
Zbigniew Jędrzejewski-Szmek de02b551ad core/condition: fix segfault when key not found in os-release
'ConditionOSRelease=|ID_LIKE$=*rhel*' results in a segfault.
The key 'ID_LIKE' is not present in Fedora's os-release file.

I think the most reasonable behaviour is to treat missing keys as empty.
This matches the "shell-like" sprit, since in a shell empty keys would
by default be treated as empty too. Thus, "ID_LIKE=" would match, if
ID_LIKE is not present in the file, and ID_LIKE=!$foo" would also match.
The other option would be to make those matches fail, but I think that'd
make the feature harder to use, esp. with negative matches.

Documentation is updated to clarify the new behaviour.

https://bugzilla.redhat.com/show_bug.cgi?id=2345544
2025-02-13 18:16:42 +01:00
Lennart Poettering 2d790b225d logind: map enum strings to underscores in logind
Varlink doesn't know dashes in enums, we use them all the time. Convert
dashes to underscores hence before we pass them through varlink.
2025-02-13 18:16:20 +01:00
Lennart Poettering 0c69a67294 varlink: fix IDL for errno error 2025-02-13 18:15:52 +01:00