]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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 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

2 years agoman: let's tone down the recommendation to use Type=exec a bit
Lennart Poettering [Wed, 9 Aug 2023 16:23:09 +0000 (18:23 +0200)] 
man: let's tone down the recommendation to use Type=exec a bit

This is a follow-up for #28596.

I think the suggestion to use Type=exec uses too strong wording:
Type=exec has non-trivial drawbacks over Type=simple, and they deserve
to be mentioned.

Hence drop the <emphasis> and turn this around so that Type=exec is
*recommended*, but Type=simple is not expressly discouraged, because
there are plenty reasons to use it.

Add a brief discussion where Type=simple might be preferable.

Also, fix the outright unruth that Type=exec was the "simplest and
fastest", because it certainly is a lot, but not that.

2 years agoexecute: Chown credentials files and directories to service group
Daan De Meyer [Thu, 10 Aug 2023 09:32:55 +0000 (11:32 +0200)] 
execute: Chown credentials files and directories to service group

For a userns root user to be able to access the credentials, both
the uid and gid of the credentials directory have to be mapped into
the userns. Currently, the credentials directory group is root, which
we obviously do not want to map in to a userns, so let's make sure
that the credentials directory and files are owned by the service
group instead, which can generally be safely mapped into the userns.

Since we use permissions mode 0600, this shouldn't cause any change
in who is able to access the credentials.

Fixes #28747

2 years agoMerge pull request #28756 from DaanDeMeyer/repart-fix
Daan De Meyer [Thu, 10 Aug 2023 12:36:02 +0000 (14:36 +0200)] 
Merge pull request #28756 from DaanDeMeyer/repart-fix

repart --copy-from followups

2 years agoudev-builtin-net_id: use strjoin() if possible 28749/head
Yu Watanabe [Thu, 10 Aug 2023 11:13:32 +0000 (20:13 +0900)] 
udev-builtin-net_id: use strjoin() if possible

Addresses the post-merge comment
https://github.com/systemd/systemd/pull/28623#pullrequestreview-1571307466.

2 years agoudev-builtin-net_id: add more debugging logs
Yu Watanabe [Wed, 9 Aug 2023 22:02:19 +0000 (07:02 +0900)] 
udev-builtin-net_id: add more debugging logs

2 years agoudev-builtin-net_id: introduce get_first_syspath_component() helper function
Yu Watanabe [Wed, 9 Aug 2023 21:57:43 +0000 (06:57 +0900)] 
udev-builtin-net_id: introduce get_first_syspath_component() helper function

Obtaining a component from syspath is a common pattern. Let's split out
the pattern. No functional change, just refactoring.

2 years agoudev-builtin-net_id: introduce get_matching_parent() helper function
Yu Watanabe [Wed, 9 Aug 2023 21:24:29 +0000 (06:24 +0900)] 
udev-builtin-net_id: introduce get_matching_parent() helper function

The pattern is common in many naming scheme. Let's split out the
pattern. No functional change, just refactoring.

2 years agocoredump: let's use FOREACH_ARRAY() at once very obvious place 28760/head
Lennart Poettering [Thu, 10 Aug 2023 10:13:46 +0000 (12:13 +0200)] 
coredump: let's use FOREACH_ARRAY() at once very obvious place

2 years agocoredump: fix error path
Lennart Poettering [Thu, 10 Aug 2023 10:13:07 +0000 (12:13 +0200)] 
coredump: fix error path

We must go through finish, to undo the destruction of the final elements
of the iovw properly.

2 years agocoredump: rename gather_pid_metadata() → gather_pid_metadata_from_procfs()
Lennart Poettering [Thu, 10 Aug 2023 10:11:52 +0000 (12:11 +0200)] 
coredump: rename gather_pid_metadata() → gather_pid_metadata_from_procfs()

Let's make clear what this function does, and what it distinguishes with
the more precisely named gather_pid_metadata_from_argv().

2 years agocoredump: add four assert()s
Lennart Poettering [Thu, 10 Aug 2023 10:11:33 +0000 (12:11 +0200)] 
coredump: add four assert()s

2 years agocoredump: use a cleanup handler for destroying iovw objects
Lennart Poettering [Thu, 10 Aug 2023 10:10:47 +0000 (12:10 +0200)] 
coredump: use a cleanup handler for destroying iovw objects

2 years agocoredump: explicitly document that in order to process a coredump we have to write...
Lennart Poettering [Thu, 10 Aug 2023 10:09:15 +0000 (12:09 +0200)] 
coredump: explicitly document that in order to process a coredump we have to write it to disk first

Prompted by: #28740

2 years agotools: pylint dbus_exporter.py
Frantisek Sumsal [Mon, 17 Jul 2023 16:38:54 +0000 (18:38 +0200)] 
tools: pylint dbus_exporter.py

2 years agotools: pylint check-includes.py
Frantisek Sumsal [Mon, 17 Jul 2023 16:37:17 +0000 (18:37 +0200)] 
tools: pylint check-includes.py

2 years agotools: pylint catalog-report.py
Frantisek Sumsal [Mon, 17 Jul 2023 16:34:12 +0000 (18:34 +0200)] 
tools: pylint catalog-report.py

2 years agotools: pylint analyze-dump-sort.py
Frantisek Sumsal [Mon, 17 Jul 2023 16:16:21 +0000 (18:16 +0200)] 
tools: pylint analyze-dump-sort.py

2 years agorepart: Reword --copy-from docs 28756/head
Daan De Meyer [Thu, 10 Aug 2023 08:46:14 +0000 (10:46 +0200)] 
repart: Reword --copy-from docs

2 years agorepart: Pass GptPartitionType *
Daan De Meyer [Thu, 10 Aug 2023 08:32:35 +0000 (10:32 +0200)] 
repart: Pass GptPartitionType *

2 years agomain: drop redundant ()
Lennart Poettering [Thu, 10 Aug 2023 08:14:33 +0000 (10:14 +0200)] 
main: drop redundant ()

2 years agoupdate TODO
Lennart Poettering [Thu, 10 Aug 2023 08:06:50 +0000 (10:06 +0200)] 
update TODO

2 years agoMerge pull request #28736 from poettering/polkit-tweaks
Lennart Poettering [Thu, 10 Aug 2023 07:35:52 +0000 (09:35 +0200)] 
Merge pull request #28736 from poettering/polkit-tweaks

some minor polkit handling tweaks

2 years agoMerge pull request #28732 from yuwata/udev-vs-tmpfiles-take-2
Yu Watanabe [Wed, 9 Aug 2023 23:48:51 +0000 (08:48 +0900)] 
Merge pull request #28732 from yuwata/udev-vs-tmpfiles-take-2

Udev vs tmpfiles take 2

2 years agoMerge pull request #28741 from keszybz/minor-tweaks-for-recent-patches
Yu Watanabe [Wed, 9 Aug 2023 23:45:44 +0000 (08:45 +0900)] 
Merge pull request #28741 from keszybz/minor-tweaks-for-recent-patches

Minor tweaks for recent patches