Commit Graph
67462 Commits
Author SHA1 Message Date
Frantisek Sumsal de9eca7e86 tools: pylint gdb-sd_dump_hashmaps.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 8708cd47b2 tools: pylint list-discoverable-partitions.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 54a9070ce5 tools: pylint xml_helper.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 234909f9d6 tools: pylint update-man-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 019e726958 tools: pylint update-dbus-docs.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal c6041b8bf8 tools: pylint make-man-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 947727681b tools: pylint make-directive-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 564602400f tools: pylint make-autosuspend-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal 782051f3cb tools: pylint generate-gperfs.py 2023-08-10 18:13:29 +02:00
Lennart Poettering 8c8c8fce4d networkd: add comment about order of IPReversePathFilter enum
Follow-up for: #28391
2023-08-10 16:17:59 +02:00
Daan De Meyer 257f2063ec 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.
2023-08-10 14:58:21 +01:00
Lennart Poettering 33bc21c3cb update TODO 2023-08-10 15:29:27 +02:00
Lennart Poettering a06c92eb48 sd-event: explicit document what to do with epoll-incompatible fds 2023-08-10 15:02:03 +02:00
Lennart Poettering 9050632ec0 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
2023-08-10 15:01:48 +02:00
Lennart Poettering e5e900edcd 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.
2023-08-10 14:41:14 +02:00
Daan De Meyer 3a78b0e9c4 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
2023-08-10 14:36:26 +02:00
Daan De Meyer 4152fd46bb Merge pull request #28756 from DaanDeMeyer/repart-fix
repart --copy-from followups
2023-08-10 14:36:02 +02:00
Yu Watanabe 8aa0aa40cf udev-builtin-net_id: use strjoin() if possible
Addresses the post-merge comment
https://github.com/systemd/systemd/pull/28623#pullrequestreview-1571307466.
2023-08-10 20:13:43 +09:00
Yu Watanabe f5f1e766ba udev-builtin-net_id: add more debugging logs 2023-08-10 20:09:11 +09:00
Yu Watanabe ce8ff47f74 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.
2023-08-10 20:09:11 +09:00
Yu Watanabe 5dc06b376f 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.
2023-08-10 20:09:06 +09:00
Lennart Poettering d67a0999aa coredump: let's use FOREACH_ARRAY() at once very obvious place 2023-08-10 12:13:46 +02:00
Lennart Poettering 946dc7c635 coredump: fix error path
We must go through finish, to undo the destruction of the final elements
of the iovw properly.
2023-08-10 12:13:09 +02:00
Lennart Poettering db9ac80163 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().
2023-08-10 12:11:55 +02:00
Lennart Poettering e6aa443feb coredump: add four assert()s 2023-08-10 12:11:33 +02:00
Lennart Poettering 6257e2fb1a coredump: use a cleanup handler for destroying iovw objects 2023-08-10 12:10:47 +02:00
Lennart Poettering 85ec1b6efa coredump: explicitly document that in order to process a coredump we have to write it to disk first
Prompted by: #28740
2023-08-10 12:09:15 +02:00
Frantisek Sumsal 8b1932cf2d tools: pylint dbus_exporter.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal f56accb6ef tools: pylint check-includes.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal b4048aaa1e tools: pylint catalog-report.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal e7ecc24eda tools: pylint analyze-dump-sort.py 2023-08-10 11:08:17 +02:00
Daan De Meyer 39b4649fc1 repart: Reword --copy-from docs 2023-08-10 10:46:14 +02:00
Daan De Meyer c74d50ffdd repart: Pass GptPartitionType * 2023-08-10 10:32:35 +02:00
Lennart Poettering 9b5560f39c main: drop redundant () 2023-08-10 10:14:33 +02:00
Lennart Poettering f24e1b54e1 update TODO 2023-08-10 10:07:00 +02:00
Lennart Poettering a74c99807f Merge pull request #28736 from poettering/polkit-tweaks
some minor polkit handling tweaks
2023-08-10 09:35:52 +02:00
Yu Watanabe 7e1850e54b Merge pull request #28732 from yuwata/udev-vs-tmpfiles-take-2
Udev vs tmpfiles take 2
2023-08-10 08:48:51 +09:00
Yu Watanabe b8e483aa2c Merge pull request #28741 from keszybz/minor-tweaks-for-recent-patches
Minor tweaks for recent patches
2023-08-10 08:45:44 +09:00
Yu Watanabe 7a05926fbe 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 9915cc6086,
5022fab15f, and
c0d998248e.
2023-08-10 07:05:47 +09:00
Yu Watanabe c27d9c0ac1 udev-builtin-net_id: fix potential invalid memory access
Follow-up for 28141620d9.

Addresses post-merge review in #28269.
2023-08-10 05:13:17 +09:00
Luca Boccassi 4051fc1d54 Merge pull request #28734 from loongarch64/dev-wu-main
seccomp: add LoongArch 64bit support
2023-08-09 20:20:03 +01:00
Daan De Meyer 1f035c91bb 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.
2023-08-09 18:56:51 +02:00
Lennart Poettering d1e8e8b5ae 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)
2023-08-10 00:01:04 +08:00
Mike Yuan 07ba0bf7f5 Merge pull request #28728 from yuwata/fstab-no
gpt-auto, remount-fs: parse fstab= kernel command line option
2023-08-09 23:59:51 +08:00
Lennart Poettering d2a1673713 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.
2023-08-09 17:34:00 +02:00
Lennart Poettering 7a23cc4b66 Merge pull request #28720 from poettering/vconsole-setup-tweaks
vconsole-setup: trivial modernizations
2023-08-09 17:32:12 +02:00
Xiaotian Wu f106a63952 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
2023-08-09 20:44:57 +08:00
Lennart Poettering 0de0ed6e89 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.
2023-08-09 14:25:46 +02:00
Zbigniew Jędrzejewski-Szmek 288cc26803 60-ukify.install: fix whitespace 2023-08-09 13:56:07 +02:00
Zbigniew Jędrzejewski-Szmek 4d8c16b166 test: use pytest.raises wrapper
This way we check that the appropriate exception is raised,
not just ignore it.

Follow-up for e3c04a5c84.
2023-08-09 13:56:07 +02:00