]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agorepart: Massage the minimize for XFS a bit 28839/head
Daan De Meyer [Tue, 15 Aug 2023 10:58:28 +0000 (12:58 +0200)] 
repart: Massage the minimize for XFS a bit

A 1.5 multiplier doesn't seem to be sufficient for XFS as seen in
mkosi CI. Let's increase it to 2 for XFS to hopefully get better
results.

2 years agomkfs-util: Don't set MKE2FS_DEVICE_PHYS_SECTSIZE
Daan De Meyer [Tue, 15 Aug 2023 10:10:14 +0000 (12:10 +0200)] 
mkfs-util: Don't set MKE2FS_DEVICE_PHYS_SECTSIZE

We only care about the logical sector size and if the physical sector
size isn't set and we're operating on a file, mke2fs will default the
physical sector size to the logical block size anyway.

This change makes sure that if we're operating on a block device and
set an explicit logical sector size, that doesn't affect the physical
sector size.

2 years agorepart: Put function call closer to its error handling
Daan De Meyer [Tue, 15 Aug 2023 10:09:31 +0000 (12:09 +0200)] 
repart: Put function call closer to its error handling

2 years agoMerge pull request #28812 from DaanDeMeyer/sector-size
Luca Boccassi [Tue, 15 Aug 2023 09:16:24 +0000 (10:16 +0100)] 
Merge pull request #28812 from DaanDeMeyer/sector-size

repart: Use 4096 as the fallback sector size for verity/luks/filesystems

2 years agoMerge pull request #28833 from DaanDeMeyer/copy-subvolume
Daan De Meyer [Tue, 15 Aug 2023 07:53:02 +0000 (09:53 +0200)] 
Merge pull request #28833 from DaanDeMeyer/copy-subvolume

repart: Add Subvolumes= setting

2 years agosysupdate: Use sector size for partition size calculations
Michael A Cassaniti [Fri, 11 Aug 2023 12:05:45 +0000 (22:05 +1000)] 
sysupdate: Use sector size for partition size calculations

2 years agoMerge pull request #28829 from DaanDeMeyer/mount-fd
Daan De Meyer [Tue, 15 Aug 2023 07:04:45 +0000 (09:04 +0200)] 
Merge pull request #28829 from DaanDeMeyer/mount-fd

tree-wide: Mount file descriptors via /proc/<pid>/fd

2 years agoMerge pull request #28835 from mrc0mmand/more-tests
Luca Boccassi [Tue, 15 Aug 2023 00:54:52 +0000 (01:54 +0100)] 
Merge pull request #28835 from mrc0mmand/more-tests

test: add coverage for #27953

2 years agofd-util: Use /proc/pid/fd instead of /proc/self/fd 28829/head
Daan De Meyer [Mon, 14 Aug 2023 19:57:59 +0000 (21:57 +0200)] 
fd-util: Use /proc/pid/fd instead of /proc/self/fd

Currently, we mount via file descriptors using /proc/self/fd. This
works, but it means that in /proc/mounts and various other files,
the source of the mount will be listed as /proc/self/fd/xxx. For other
software that parses these files, /proc/self/fd/xxx doesn't mean anything,
or worse, it means the completely wrong thing, as it will refer to one of
their own file descriptors instead.

Let's improve the situation by using /proc/pid/fd instead. This allows
processes parsing /proc/mounts to do the right thing more often than not.
One scenario where even this doesn't work if when containers are involved,
as with the pid namespace unshared, even /proc/pid/fd will mean the wrong
thing, but it's no worse than /proc/self/fd which will always means the wrong
thing.

This also doesn't work if we mount via file descriptor and then exit, as the pid will
be gone, but it does work as long as the process that did the mount is alive, which
makes it useful for systemd-dissect --with for example if the program we run in the
image wants to parse /proc/mounts.

2 years agotest: explicitly specify a UTF-8 locale for UTF-8 shenanigans 28835/head
Frantisek Sumsal [Mon, 14 Aug 2023 18:09:31 +0000 (20:09 +0200)] 
test: explicitly specify a UTF-8 locale for UTF-8 shenanigans

As things don't work well without it:

$ LANG=C printf "\ufffe\n"
\uFFFE

2 years agotest: add coverage for #27953
Frantisek Sumsal [Mon, 14 Aug 2023 17:35:37 +0000 (19:35 +0200)] 
test: add coverage for #27953

2 years agotest: drop unnecessary log level setup
Frantisek Sumsal [Mon, 14 Aug 2023 17:12:08 +0000 (19:12 +0200)] 
test: drop unnecessary log level setup

As we do that globally via a dropin.

2 years agorepart: Add Subvolumes= setting 28833/head
Daan De Meyer [Mon, 14 Aug 2023 14:44:30 +0000 (16:44 +0200)] 
repart: Add Subvolumes= setting

This setting indicates which directories in the target partition
should be btrfs subvolumes. If set, we'll try to create these
directories as subvolumes.

Note that this only works when running as root without --offline,
as mkfs.btrfs does not support creating subvolumes.

2 years agomkdir: Add support for creating subvolumes to mkdir_p_root()
Daan De Meyer [Mon, 14 Aug 2023 14:39:39 +0000 (16:39 +0200)] 
mkdir: Add support for creating subvolumes to mkdir_p_root()

We pass in the paths which should be subvolumes and try to create
those as subvolumes if we can.

2 years agocopy: Add support for creating subvolumes to copy_tree_at()
Daan De Meyer [Mon, 14 Aug 2023 13:33:15 +0000 (15:33 +0200)] 
copy: Add support for creating subvolumes to copy_tree_at()

The subvolumes set is a set of source inodes similar to how the
denylist hashmap contains source inodes as keys. It indicates
directories in the source tree that should become subvolumes in
the target tree.

2 years agofs-util: Add XO_SUBVOLUME flag for xopenat()
Daan De Meyer [Mon, 14 Aug 2023 13:32:22 +0000 (15:32 +0200)] 
fs-util: Add XO_SUBVOLUME flag for xopenat()

When specified, xopenat() will try to create a btrfs subvolume and
fall back to creating a regular directory.

2 years agobtrfs-util: Move subvolume creation to basic/btrfs.h
Daan De Meyer [Mon, 14 Aug 2023 13:15:08 +0000 (15:15 +0200)] 
btrfs-util: Move subvolume creation to basic/btrfs.h

Also make btrfs_subvol_make() an openat style function.

2 years agopath-util: Make ret argument optional for path_extract_directory()
Daan De Meyer [Mon, 14 Aug 2023 16:29:25 +0000 (18:29 +0200)] 
path-util: Make ret argument optional for path_extract_directory()

2 years agoMerge pull request #28828 from DaanDeMeyer/sysupdate-fdisk
Daan De Meyer [Mon, 14 Aug 2023 12:23:03 +0000 (14:23 +0200)] 
Merge pull request #28828 from DaanDeMeyer/sysupdate-fdisk

fdisk-util: Make fdisk_new_context_fd() more generic

2 years agodissect-image: Fix mount_point_is_available()
Daan De Meyer [Sun, 13 Aug 2023 20:16:28 +0000 (22:16 +0200)] 
dissect-image: Fix mount_point_is_available()

We call dir_is_empty() to check if the directory is empty but don't
take the result into account when returning from the function.

2 years agotree-wide: Always include <net/if.h> before related linux headers
Daan De Meyer [Mon, 14 Aug 2023 10:54:40 +0000 (12:54 +0200)] 
tree-wide: Always include <net/if.h> before related linux headers

Otherwise, we get redefinition errors if <net/if.h> is included later
on by another header.

2 years agorepart: Use 4096 as the fallback sector size for verity/luks/filesystems 28812/head
Daan De Meyer [Sat, 12 Aug 2023 11:30:46 +0000 (13:30 +0200)] 
repart: Use 4096 as the fallback sector size for verity/luks/filesystems

When we don't know the sector size of the actual block device, because
we're building an image in a loopback file and no sector size was specified
explicitly, let's use 4096 as the sector size for filesystems, verity and
LUKS. This should be the most compatible option, since 4096 will also work
on devices with sector size 512 or 2048.

For the actual GPT partition table size, we stick with 512 as the default
value since UEFI firmware and the kernel will only try to read the GPT
partition table from the first LBA on the device and the sector size for
most devices is still 512. It can also be trivially modified when copying
the image to another device using --copy-from + --sector-size.

2 years agotree-wide: Use fdisk_new_context_at() more 28828/head
Daan De Meyer [Mon, 14 Aug 2023 08:42:43 +0000 (10:42 +0200)] 
tree-wide: Use fdisk_new_context_at() more

2 years agofdisk-util: Make fdisk_new_context_fd() more generic
Daan De Meyer [Mon, 14 Aug 2023 08:27:57 +0000 (10:27 +0200)] 
fdisk-util: Make fdisk_new_context_fd() more generic

Let's make this an openat() style function so we can also pass a
device path.

2 years agoMerge pull request #28827 from gioele/docs-fix-network-online-example-unit
Daan De Meyer [Mon, 14 Aug 2023 08:08:20 +0000 (10:08 +0200)] 
Merge pull request #28827 from gioele/docs-fix-network-online-example-unit

docs/NETWORK_ONLINE: Move `Type=`, `RemainAfterExit=` to `[Service]` + Use `until` instead of `while !`

2 years agodocs/NETWORK_ONLINE: Use `until` instead of `while !` 28827/head
Gioele Barabucci [Mon, 14 Aug 2023 06:53:16 +0000 (08:53 +0200)] 
docs/NETWORK_ONLINE: Use `until` instead of `while !`

`until` is the standard POSIX shell builtin to be used when waiting for
a condition to appear.

2 years agodocs/NETWORK_ONLINE: Move `Type=`, `RemainAfterExit=` to `[Service]`
Gioele Barabucci [Mon, 14 Aug 2023 06:50:46 +0000 (08:50 +0200)] 
docs/NETWORK_ONLINE: Move `Type=`, `RemainAfterExit=` to `[Service]`

`Type=` and `RemainAfterExit=` belong in `[Service]`, not `[Unit]`.

Fixes #28826

2 years agonetwork: ndisc - Ignore route information if reserved (10) value is
Susant Sahani [Mon, 24 Jul 2023 09:34:59 +0000 (15:04 +0530)] 
network: ndisc - Ignore route information if reserved (10) value is
received

RFC4191 – Section 2.3 Route Information Option's Prf field:
If the Reserved (10) value is received, the Route Information Option MUST be ignored.

2 years agosleep: clear EFI HibernateLocation if writing kernel config fails
Mike Yuan [Sun, 13 Aug 2023 14:59:30 +0000 (22:59 +0800)] 
sleep: clear EFI HibernateLocation if writing kernel config fails

Follow-up for f1f331a252d22c15f37d03524cce967664358c5c

2 years agocore: drop redundant assignment of UNIT_MERGED in unit_load_fragment()
Yu Watanabe [Sun, 13 Aug 2023 05:56:49 +0000 (14:56 +0900)] 
core: drop redundant assignment of UNIT_MERGED in unit_load_fragment()

If the unit is merged into another unit, then the load state is already
set in merge_by_names() -> unit_merge(). Let's drop the redundant assignment.

2 years agoMerge pull request #28744 from YHNdnzj/battery-check-minor-followup
Yu Watanabe [Sun, 13 Aug 2023 10:27:56 +0000 (19:27 +0900)] 
Merge pull request #28744 from YHNdnzj/battery-check-minor-followup

battery-util: minor follow-ups

2 years agoMerge pull request #28809 from YHNdnzj/proc-cmdline-true-when-missing
Yu Watanabe [Sun, 13 Aug 2023 10:25:22 +0000 (19:25 +0900)] 
Merge pull request #28809 from YHNdnzj/proc-cmdline-true-when-missing

proc-cmdline: introduce PROC_CMDLINE_TRUE_WHEN_MISSING and use it where appropriate

2 years agobasic: add comment for LFS assert in dirent-util.h
Sam James [Sun, 13 Aug 2023 06:46:45 +0000 (07:46 +0100)] 
basic: add comment for LFS assert in dirent-util.h

Followup to eb29296937b268e0140a2ab1cf204c2ebb72fa5a as promised; requested
by lennart at https://github.com/systemd/systemd/pull/27599#discussion_r1192619263.

2 years agotest: skip test-path on Salsa CI
Luca Boccassi [Sat, 12 Aug 2023 14:15:55 +0000 (15:15 +0100)] 
test: skip test-path on Salsa CI

Salsa is the Debian git forge. In the package build environment test-path
always fails as we cannot set up cgroups and so the path unit fails to
start. Skip the test in that environment.

Unfortunately meson doesn't allow to skip individual tests by name.

2 years agobattery-util: log_notice when unsure about battery state 28744/head
Mike Yuan [Wed, 9 Aug 2023 16:15:29 +0000 (00:15 +0800)] 
battery-util: log_notice when unsure about battery state

Follow-up for 02f7f8aa4f1d0b7a24ee3cd5685a791771d9ded5

This deserves some highlight.

Addresses https://github.com/systemd/systemd/pull/28597#discussion_r1288592726

2 years agobattery-util: don't log duplicate message
Mike Yuan [Wed, 9 Aug 2023 16:13:42 +0000 (00:13 +0800)] 
battery-util: don't log duplicate message

Follow-up for 02f7f8aa4f1d0b7a24ee3cd5685a791771d9ded5

Addresses https://github.com/systemd/systemd/pull/28597#discussion_r1288591215

> this is pretty unnecessary, battery_read_capacity_percentage()
debug logs on its own about this already, in more detailed way?

2 years agoreboot-util: cache the result of shall_restore_state 28809/head
Mike Yuan [Thu, 10 Aug 2023 15:25:59 +0000 (23:25 +0800)] 
reboot-util: cache the result of shall_restore_state

2 years agobattery-check: use proc_cmdline_get_bool
Mike Yuan [Thu, 10 Aug 2023 15:25:44 +0000 (23:25 +0800)] 
battery-check: use proc_cmdline_get_bool

2 years agofstab-util: make use of PROC_CMDLINE_TRUE_WHEN_MISSING
Mike Yuan [Thu, 10 Aug 2023 15:25:17 +0000 (23:25 +0800)] 
fstab-util: make use of PROC_CMDLINE_TRUE_WHEN_MISSING

2 years agoproc-cmdline: do assert on flags earlier
Mike Yuan [Sat, 12 Aug 2023 07:22:06 +0000 (15:22 +0800)] 
proc-cmdline: do assert on flags earlier

2 years agoproc-cmdline: introduce PROC_CMDLINE_TRUE_WHEN_MISSING
Mike Yuan [Sat, 12 Aug 2023 07:20:59 +0000 (15:20 +0800)] 
proc-cmdline: introduce PROC_CMDLINE_TRUE_WHEN_MISSING

2 years agomkosi: disable key check on Fedora Rawhide for now
Luca Boccassi [Sat, 12 Aug 2023 18:14:12 +0000 (19:14 +0100)] 
mkosi: disable key check on Fedora Rawhide for now

There are key issues so jobs are failing, disable the check for now

2 years agotest: disable TEST-08-INITRD on ubuntu CI
Yu Watanabe [Sat, 12 Aug 2023 12:35:39 +0000 (21:35 +0900)] 
test: disable TEST-08-INITRD on ubuntu CI

Currently, the test does not work on ubuntu CI, unfortunately.
Let's disable it at least tentatively.

2 years agotest: fix expected result of systemd-repart
Yu Watanabe [Sat, 12 Aug 2023 05:53:16 +0000 (14:53 +0900)] 
test: fix expected result of systemd-repart

Follow-up for e1536d1fb00787f0b064007573292d4ebc01971f.

Fixes #28807.
Replaces #28802.

2 years agomkfs-util: Pass sector size to mkfs.f2fs
Daan De Meyer [Sat, 12 Aug 2023 11:29:50 +0000 (13:29 +0200)] 
mkfs-util: Pass sector size to mkfs.f2fs

Let's pass the sector size to mkfs.f2fs as well.

2 years agomkfs-util: Set sector size environment variables when invoking mkfs.ext4
Daan De Meyer [Sat, 12 Aug 2023 11:28:10 +0000 (13:28 +0200)] 
mkfs-util: Set sector size environment variables when invoking mkfs.ext4

Let's inform mkfs.ext4 about the sector size we're using.

2 years agomeson: drop unnecessary dependency on libidn
Yu Watanabe [Sat, 12 Aug 2023 07:45:46 +0000 (16:45 +0900)] 
meson: drop unnecessary dependency on libidn

2 years agoMerge pull request #28801 from mrc0mmand/initrd-shutdown-test
Yu Watanabe [Sat, 12 Aug 2023 11:04:06 +0000 (20:04 +0900)] 
Merge pull request #28801 from mrc0mmand/initrd-shutdown-test

test: introduce TEST-08-INITRD

2 years agoman: kernel-install(8) add uki.conf in FILES & add ukify(1) in SEE ALSO
Rahil Bhimjiani [Sat, 12 Aug 2023 08:19:11 +0000 (13:49 +0530)] 
man: kernel-install(8) add uki.conf in FILES & add ukify(1) in SEE ALSO

Signed-off-by: Rahil Bhimjiani <rahil3108@gmail.com>
2 years agotest: introduce TEST-08-INITRD 28801/head
Frantisek Sumsal [Fri, 11 Aug 2023 14:46:53 +0000 (16:46 +0200)] 
test: introduce TEST-08-INITRD

And move the initrd related tests from TEST-01-BASIC there.

Additionally, this should provide coverage for recemt shutdown initrd
related issues, see:
  - https://github.com/systemd/systemd/issues/28645
  - https://github.com/systemd/systemd/pull/28648
  - https://github.com/systemd/systemd/pull/28793

2 years agoMerge pull request #28784 from yuwata/udev-vs-tmpfiles-take-3
Yu Watanabe [Sat, 12 Aug 2023 04:12:10 +0000 (13:12 +0900)] 
Merge pull request #28784 from yuwata/udev-vs-tmpfiles-take-3

Udev vs tmpfiles take 3

2 years agoMerge pull request #28799 from bluca/fixlets
Luca Boccassi [Fri, 11 Aug 2023 23:25:15 +0000 (00:25 +0100)] 
Merge pull request #28799 from bluca/fixlets

core: some fixlets

2 years agoman: systemd-repart can now create filesystems, update manpage
Luca Boccassi [Fri, 11 Aug 2023 21:29:50 +0000 (22:29 +0100)] 
man: systemd-repart can now create filesystems, update manpage

2 years agounits: introduce systemd-tmpfiles-setup-dev-early.service 28784/head
Yu Watanabe [Fri, 11 Aug 2023 22:54:32 +0000 (07:54 +0900)] 
units: introduce systemd-tmpfiles-setup-dev-early.service

This makes tmpfiles, sysusers, and udevd invoked in the following order:
1. systemd-tmpfiles-setup-dev-early.service
   Create device nodes gracefully, that is, create device nodes anyway
   by ignoring unknown users and groups.
2. systemd-sysusers.service
   Create users and groups, to make later invocations of tmpfiles and
   udevd can resolve necessary users and groups.
3. systemd-tmpfiles-setup-dev.service
   Adjust owners of previously created device nodes.
4. systemd-udevd.service
   Process all devices. Especially to make block devices active and can
   be mountable.
5. systemd-tmpfiles-setup.service
   Setup basic filesystem.

Follow-up for b42482af904ae0b94a6e4501ec595448f0ba1c06.

Fixes #28653.
Replaces #28681 and #28732.

2 years agoRevert "unit: make udev rules really take precedence over tmpfiles"
Yu Watanabe [Fri, 11 Aug 2023 04:45:25 +0000 (13:45 +0900)] 
Revert "unit: make udev rules really take precedence over tmpfiles"

This reverts commits 112a41b6ece19d03e951d886fe2f26512ab31fab,
3178698bb5352989e4bff866641838b1c2a0efcb, and
b768379e8b494b025f41946205944a6f3a1a553f.

The commit 112a41b6ece19d03e951d886fe2f26512ab31fab introduces #28765,
as systemd-tmpfiles-setup.service has ordering after local-fs.target,
but usually the target requires block devices processed by udevd.
Hence, the service can only start after the block devices timed out.

Fixes #28765.

2 years agoiovec-util: add iovw_isempty() helper
Lennart Poettering [Fri, 11 Aug 2023 09:11:09 +0000 (11:11 +0200)] 
iovec-util: add iovw_isempty() helper

Follow-up for: 3746131aac4798cacf67b60cfc4e2e1c80ec4efb

2 years agocore: split manager's process killing on shutdown to separate helper 28799/head
Luca Boccassi [Wed, 9 Aug 2023 13:02:34 +0000 (14:02 +0100)] 
core: split manager's process killing on shutdown to separate helper

2 years agocore: allow to pass EINVAL to unit_add_two_dependencies()
Luca Boccassi [Wed, 9 Aug 2023 12:59:22 +0000 (13:59 +0100)] 
core: allow to pass EINVAL to unit_add_two_dependencies()

Useful to conditionally add two deps at a time

2 years agocore: copy os-release with COPY_TRUNCATE
Luca Boccassi [Fri, 11 Aug 2023 13:42:02 +0000 (14:42 +0100)] 
core: copy os-release with COPY_TRUNCATE

Otherwise if the os-release file shrinks between updates, there
will be a merge of the two.
Also remove redundant ENOENT check.

Follow-up for 3f37a82545d461ab

2 years agotest: correctly propagate return code from check_result hooks
Frantisek Sumsal [Fri, 11 Aug 2023 14:39:30 +0000 (16:39 +0200)] 
test: correctly propagate return code from check_result hooks

2 years agotest: save the console log to a file
Frantisek Sumsal [Fri, 11 Aug 2023 14:36:45 +0000 (16:36 +0200)] 
test: save the console log to a file

So we can refer to it later if needed.

2 years agoman: don't claim BindPaths= file systems would remain "in memory", they are just...
Lennart Poettering [Fri, 11 Aug 2023 11:24:07 +0000 (13:24 +0200)] 
man: don't claim BindPaths= file systems would remain "in memory", they are just kept "mounted"

Follow-up for: 947d836a6e86f1936250ff8e3c67fa33b92a597f

(I guess in the original patch authors usecase the root fs actually
*does* remain in memory, but that's a special case and does not belong
in the man pages this way).

2 years agoMerge pull request #28766 from DaanDeMeyer/repart-copy-from
Daan De Meyer [Fri, 11 Aug 2023 12:51:24 +0000 (14:51 +0200)] 
Merge pull request #28766 from DaanDeMeyer/repart-copy-from

repart: Allow specifying --copy-from more than once

2 years agofile-io: Fix copying sparse files
Michael A Cassaniti [Fri, 11 Aug 2023 06:41:56 +0000 (16:41 +1000)] 
file-io: Fix copying sparse files

This change makes sure a data copy using copy_bytes() does not exceed the
max_bytes value when using COPY_HOLES and max_bytes stops before the next
data section.

2 years agorepart: Allow specifying --copy-from more than once 28766/head
Daan De Meyer [Thu, 10 Aug 2023 12:41:31 +0000 (14:41 +0200)] 
repart: Allow specifying --copy-from more than once

Definitions will be synthesized from each of the given images.

2 years agodocs: update link to RHEL/CentOS Stream tracker
Jan Macku [Thu, 10 Aug 2023 12:58:16 +0000 (14:58 +0200)] 
docs: update link to RHEL/CentOS Stream tracker

Also update link to systemd downstream GitHub repo.

2 years agorepart: Allow acquire shared lock on --copy-from files/devices
Daan De Meyer [Fri, 11 Aug 2023 08:41:04 +0000 (10:41 +0200)] 
repart: Allow acquire shared lock on --copy-from files/devices

We're not going to modify these, so no need for an exclusive lock.

2 years agotest-mountpoint-util: /root might be mounted
Franck Bui [Thu, 10 Aug 2023 12:13:45 +0000 (14:13 +0200)] 
test-mountpoint-util: /root might be mounted

On openSUSE with BTRFS, /root has to be mounted as dedicated subvolume to avoid
restoring it when a rollback of the system happens.

2 years agoMerge pull request #28779 from yuwata/iovw-append
Yu Watanabe [Thu, 10 Aug 2023 22:21:32 +0000 (07:21 +0900)] 
Merge pull request #28779 from yuwata/iovw-append

io-util, coredump: introduce iovw_append() and use it

2 years agocoredump: fix various invalid memory access 28779/head
Yu Watanabe [Thu, 10 Aug 2023 19:48:01 +0000 (04:48 +0900)] 
coredump: fix various invalid memory access

Previously, we did not check error from iovw_put(). If it fails, the
target iovw may have no iov or partial iovs from the journal importar.
So, the finalization may cause underflow and may access and free invalid
memory.

Follow-up for 946dc7c635f050129896d1515c08a81504af2421.

2 years agoio-util: introduce iovw_append() helper function
Yu Watanabe [Thu, 10 Aug 2023 19:46:00 +0000 (04:46 +0900)] 
io-util: introduce iovw_append() helper function

2 years agoMake ukify the default ifUKI_GENERATOR is unset
cvlc12 [Sat, 5 Aug 2023 12:25:23 +0000 (14:25 +0200)] 
Make ukify the default ifUKI_GENERATOR is unset

2 years agovconsole-setup: use "@kernel" rather than "kernel" as special string to leave keymap...
Lennart Poettering [Thu, 10 Aug 2023 13:12:15 +0000 (15:12 +0200)] 
vconsole-setup: use "@kernel" rather than "kernel" as special string to leave keymap untouched

This is a magic string, and we should avoid stepping into the territory
of normal keymap names with that, given that users can pick names
otherwise freely.

Hence, prefix the name with a special char to avoid any namespace
issues.

Follow-up for: #28660

2 years agoMerge pull request #28760 from poettering/coredump-tweaks
Yu Watanabe [Thu, 10 Aug 2023 19:16:31 +0000 (04:16 +0900)] 
Merge pull request #28760 from poettering/coredump-tweaks

coredump: minor tweaks/modernizations

2 years agofile-io: let's use offsetof() rather than sizeof() for determining EFI_FILE_INFO...
Lennart Poettering [Thu, 10 Aug 2023 08:46:05 +0000 (10:46 +0200)] 
file-io: let's use offsetof() rather than sizeof() for determining EFI_FILE_INFO prefix size

The gnu-efi definition of the struct uses [1], our local one [0] to size
the filename array. Let's avoid an ambiguity and use offsetof() so that
this difference doesn't matter. Also, doing it this way makes very clear
to the read what happens here: it's a structure with a variable size
suffix.

2 years agoMerge pull request #28749 from yuwata/udev-net-id-fix-and-cleanup
Yu Watanabe [Thu, 10 Aug 2023 19:10:32 +0000 (04:10 +0900)] 
Merge pull request #28749 from yuwata/udev-net-id-fix-and-cleanup

udev-builtin-net_id: fix and cleanups

2 years agoukify: Use length= instead of ignore_padding= in inspect
Daan De Meyer [Thu, 10 Aug 2023 15:05:55 +0000 (17:05 +0200)] 
ukify: Use length= instead of ignore_padding= in inspect

ignore_padding= was only added in a recent version of pefile. Let's
set length= to the virtual size instead which is what ignore_padding
does behind the scenes so we're compatible with older versions of
pefile.

2 years agoMerge pull request #28767 from poettering/epoll-eperm-journalctl
Yu Watanabe [Thu, 10 Aug 2023 18:18:36 +0000 (03:18 +0900)] 
Merge pull request #28767 from poettering/epoll-eperm-journalctl

journalctl epoll/EPERM follow-up

2 years agomkosi: Copy sources under /usr in the image
Michal Koutný [Wed, 9 Aug 2023 19:31:58 +0000 (21:31 +0200)] 
mkosi: Copy sources under /usr in the image

Originally, the source code was copied under /root/src.
This home directory is part of root FS and the new mkosi building
paradigm has only ephemeral root FS that is generated lazily.
Any files placed on the root FS in the build environment are that
excluded from the final image.

It is useful to have source codes available in the image's runtime (not
build time) environment for debugging.

ExtraTrees= as used currently are ineffective, so change the destination
to copy files under /usr to achieve the intention.

gdb sees source files as:
> 1354 ../src/src/systemctl/systemctl.c: No such file or directory.

Modify gdb configration in the built image accordingly (that file cannot
be in /root neither) to resolve to the moved sources.

(Commit fdecbf7 ("Enable unprivileged image builds") envisions bind
mounting or virtiofsd for nspawn or qemu containers respectively.)

2 years agoMerge pull request #28743 from mrc0mmand/lint-python-scripts
Luca Boccassi [Thu, 10 Aug 2023 18:13:45 +0000 (19:13 +0100)] 
Merge pull request #28743 from mrc0mmand/lint-python-scripts

tools: lint Python scripts

2 years agotmpfiles: move static vars into Context object
Lennart Poettering [Wed, 9 Aug 2023 09:37:46 +0000 (11:37 +0200)] 
tmpfiles: move static vars into Context object

Same as #28722, but for tmpfiles rather than sysusers

2 years agotest: testsuite-35.sh needs manual/test-session-properties to be installed on SUSE
Franck Bui [Tue, 8 Aug 2023 09:40:36 +0000 (11:40 +0200)] 
test: testsuite-35.sh needs manual/test-session-properties to be installed on SUSE

2 years agoAdd .pylintrc to globally suppress warnings we don't really care about 28743/head
Frantisek Sumsal [Wed, 9 Aug 2023 19:57:47 +0000 (21:57 +0200)] 
Add .pylintrc to globally suppress warnings we don't really care about

Also, drop the respective disable directives from existing files.

2 years agotools: pylint meson-render-jinja2.py
Frantisek Sumsal [Thu, 10 Aug 2023 09:10:28 +0000 (11:10 +0200)] 
tools: pylint meson-render-jinja2.py

2 years agotools: pylint analyze-dump-sort.py
Frantisek Sumsal [Wed, 9 Aug 2023 19:54:28 +0000 (21:54 +0200)] 
tools: pylint analyze-dump-sort.py

2 years agotools: pylint dump-auxv.py
Frantisek Sumsal [Wed, 9 Aug 2023 19:53:45 +0000 (21:53 +0200)] 
tools: pylint dump-auxv.py

2 years agotools: pylint gdb-sd_dump_hashmaps.py
Frantisek Sumsal [Wed, 9 Aug 2023 19:44:36 +0000 (21:44 +0200)] 
tools: pylint gdb-sd_dump_hashmaps.py

2 years agotools: pylint list-discoverable-partitions.py
Frantisek Sumsal [Wed, 9 Aug 2023 19:43:08 +0000 (21:43 +0200)] 
tools: pylint list-discoverable-partitions.py

2 years agotools: pylint xml_helper.py
Frantisek Sumsal [Mon, 17 Jul 2023 20:51:19 +0000 (22:51 +0200)] 
tools: pylint xml_helper.py

2 years agotools: pylint update-man-rules.py
Frantisek Sumsal [Mon, 17 Jul 2023 20:39:37 +0000 (22:39 +0200)] 
tools: pylint update-man-rules.py

2 years agotools: pylint update-dbus-docs.py
Frantisek Sumsal [Mon, 17 Jul 2023 19:11:04 +0000 (21:11 +0200)] 
tools: pylint update-dbus-docs.py

2 years agotools: pylint make-man-index.py
Frantisek Sumsal [Mon, 17 Jul 2023 18:02:54 +0000 (20:02 +0200)] 
tools: pylint make-man-index.py

2 years agotools: pylint make-directive-index.py
Frantisek Sumsal [Mon, 17 Jul 2023 17:58:38 +0000 (19:58 +0200)] 
tools: pylint make-directive-index.py

2 years agotools: pylint make-autosuspend-rules.py
Frantisek Sumsal [Mon, 17 Jul 2023 17:08:08 +0000 (19:08 +0200)] 
tools: pylint make-autosuspend-rules.py

2 years agotools: pylint generate-gperfs.py
Frantisek Sumsal [Mon, 17 Jul 2023 17:06:40 +0000 (19:06 +0200)] 
tools: pylint generate-gperfs.py

2 years agonetworkd: add comment about order of IPReversePathFilter enum
Lennart Poettering [Thu, 10 Aug 2023 14:17:32 +0000 (16:17 +0200)] 
networkd: add comment about order of IPReversePathFilter enum

Follow-up for: #28391

2 years agomkosi: Move python3dist(pytest-flakes) to base preset build packages
Daan De Meyer [Thu, 10 Aug 2023 13:11:32 +0000 (15:11 +0200)] 
mkosi: Move python3dist(pytest-flakes) to base preset build packages

We don't want to pull in python in the base image to keep the initrd
small.

2 years agoupdate TODO
Lennart Poettering [Thu, 10 Aug 2023 13:29:21 +0000 (15:29 +0200)] 
update TODO

2 years agosd-event: explicit document what to do with epoll-incompatible fds 28767/head
Lennart Poettering [Thu, 10 Aug 2023 13:01:16 +0000 (15:01 +0200)] 
sd-event: explicit document what to do with epoll-incompatible fds

2 years agojournalcl: simplify handling of stdout being a regular file and epoll()
Lennart Poettering [Thu, 10 Aug 2023 12:47:12 +0000 (14:47 +0200)] 
journalcl: simplify handling of stdout being a regular file and epoll()

Let's not check the fd type beforehand, let's instead gracefully handle
if we get EPERM back from epoll_ctl() because the fd doesn't do epoll.
THis should be safer and more generic.

The epoll_ctl(2) man page clearly documents EPERM is being returned in
this case, hence it's safe to check for exactly that case.

Follow-up for: #28644