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

2 years agoudev: re-introduce symlinks for loopback block device
Yu Watanabe [Fri, 21 Jul 2023 01:26:13 +0000 (10:26 +0900)] 
udev: re-introduce symlinks for loopback block device

But the directories are changed from /dev/loop/by-ref/ -> /dev/disk/by-loop-ref/
and /dev/loop/by-inode/ -> /dev/disk/by-loop-inode/.
As /dev/loop/ is used by losetup command for other purpose.
See issue #28475.

This effectively reverts commits 9915cc60868c77e7e8cecb669ddb90516dffc7df,
5022fab15fc16204d163883ca818fd6092dc919c, and
c0d998248e10e1dcf18108fdbb70f259acd452eb.

2 years agoudev-builtin-net_id: fix potential invalid memory access
Yu Watanabe [Wed, 9 Aug 2023 20:08:23 +0000 (05:08 +0900)] 
udev-builtin-net_id: fix potential invalid memory access

Follow-up for 28141620d963c0c490d409d6ec6ff5f143357124.

Addresses post-merge review in #28269.

2 years agoMerge pull request #28734 from loongarch64/dev-wu-main
Luca Boccassi [Wed, 9 Aug 2023 19:20:03 +0000 (20:20 +0100)] 
Merge pull request #28734 from loongarch64/dev-wu-main

seccomp: add LoongArch 64bit support

2 years agomkosi: Update to latest
Daan De Meyer [Wed, 9 Aug 2023 15:17:50 +0000 (17:17 +0200)] 
mkosi: Update to latest

This update introduces the explicit Dependencies= setting, instead
of relying on implicit dependencies via alphanumerical ordering.

We also take the opportunity to rename the "final" preset to the
"system" preset, which seems like a better name.

2 years agotree-wide: drop _pure_ + _const_ from local, static functions
Lennart Poettering [Wed, 9 Aug 2023 08:48:47 +0000 (10:48 +0200)] 
tree-wide: drop _pure_ + _const_ from local, static functions

This is supposed to be a help for compilers to apply optimizations on
functions where they can't determine whether they are const/pure on
their own. For static, local functions the compiler can do this on its
own easily however, hence the decoration with pure/const is just noise.
Let's drop it, and let the compiler to its thing better.

(Use it for exported functions, since compilers can't 'reach-over' into
other modules to determine if they are pure, except if LTO is used)

2 years agoMerge pull request #28728 from yuwata/fstab-no
Mike Yuan [Wed, 9 Aug 2023 15:59:51 +0000 (23:59 +0800)] 
Merge pull request #28728 from yuwata/fstab-no

gpt-auto, remount-fs: parse fstab= kernel command line option

2 years agosysusers: move global variables into a Context object
Lennart Poettering [Tue, 8 Aug 2023 12:56:40 +0000 (14:56 +0200)] 
sysusers: move global variables into a Context object

Our coding style says static variables suck except for very special
cases, i.e. things like the log level or very per-process stuff, such as
parsed version of cmdline args and such. sysusers departed from that as
one of the very few exceptions in our codebases: it keeps its
operational state in global variables.

Address that. Introduce a Context object that carries the fields that so
far have been global, and pass it around as needed.

This has the nice effect that state and configuration is clearly
separated in code, and we can very clearly see which functions mangle
state and which ones do not.

No actual codeflow changes, just refactoring.

2 years agoMerge pull request #28720 from poettering/vconsole-setup-tweaks
Lennart Poettering [Wed, 9 Aug 2023 15:32:12 +0000 (17:32 +0200)] 
Merge pull request #28720 from poettering/vconsole-setup-tweaks

vconsole-setup: trivial modernizations

2 years agoLoongArch: Replace __loongarch64 with __loongarch_lp64 28734/head
Xiaotian Wu [Wed, 9 Aug 2023 12:52:27 +0000 (20:52 +0800)] 
LoongArch: Replace __loongarch64 with __loongarch_lp64

`__loongarch64` is no longer used for historical reasons and should be replaced by `__loongarch_lp64` in new code.

https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html#_cc_preprocessor_built_in_macro_definitions

2 years agobootctl: don't advertise systemd-efi-options in --help/man anymore
Lennart Poettering [Wed, 9 Aug 2023 11:08:58 +0000 (13:08 +0200)] 
bootctl: don't advertise systemd-efi-options in --help/man anymore

The command is deprecated, as per NEWS of 254. Let's go one step further
and remove it from the help text and man page, so that people are not
inspired to use it at this time anymore.

This is how we usually have done this before: remove it from visibility,
but support it for a while still.

2 years ago60-ukify.install: fix whitespace 28741/head
Zbigniew Jędrzejewski-Szmek [Wed, 9 Aug 2023 10:54:14 +0000 (12:54 +0200)] 
60-ukify.install: fix whitespace

2 years agotest: use pytest.raises wrapper
Zbigniew Jędrzejewski-Szmek [Wed, 9 Aug 2023 10:25:06 +0000 (12:25 +0200)] 
test: use pytest.raises wrapper

This way we check that the appropriate exception is raised,
not just ignore it.

Follow-up for e3c04a5c84af5a39794a0a4963bc9916787aa5b4.

2 years agopolkit: move asserts up, so that they cover all reply codepaths 28736/head
Lennart Poettering [Wed, 9 Aug 2023 08:51:40 +0000 (10:51 +0200)] 
polkit: move asserts up, so that they cover all reply codepaths

2 years agopolkit: use LIST_POP where appropriate
Lennart Poettering [Wed, 9 Aug 2023 08:51:19 +0000 (10:51 +0200)] 
polkit: use LIST_POP where appropriate

2 years agoremount-fs: refuse to remount based on fstab when fstab=no kernel command line option... 28728/head
Yu Watanabe [Tue, 8 Aug 2023 17:02:23 +0000 (02:02 +0900)] 
remount-fs: refuse to remount based on fstab when fstab=no kernel command line option specified

Otherwise, if for some reasons remount-fs is invoked even when fstab=no is
specified, mounts may get unexpected options from fstab.

For safety, let's parse the kernel command line option.

2 years agoremount-fs: split-out remount_by_fstab()
Yu Watanabe [Tue, 8 Aug 2023 16:57:16 +0000 (01:57 +0900)] 
remount-fs: split-out remount_by_fstab()

No functional change, just refactoring and preparation for later
commits.

2 years agofstab-generator: update cache in fstab_enabled_full() based on the parsed result...
Yu Watanabe [Tue, 8 Aug 2023 17:40:21 +0000 (02:40 +0900)] 
fstab-generator: update cache in fstab_enabled_full() based on the parsed result of fstab=

Currently, fstab-generator does not use fstab file parsers in
fstab-util.c. So, this is not necessary. Just for a possible
optimization in the case the parsers used in the future.