Commit Graph
66657 Commits
Author SHA1 Message Date
Michal Koutný 9e42433ff9 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.)
2023-08-10 19:14:40 +01:00
Luca Boccassi bd95029c3e Merge pull request #28743 from mrc0mmand/lint-python-scripts
tools: lint Python scripts
2023-08-10 19:13:45 +01:00
Lennart Poettering a5e4f3ab4e tmpfiles: move static vars into Context object
Same as #28722, but for tmpfiles rather than sysusers
2023-08-10 19:12:06 +01:00
Franck Bui 372d40fb03 test: testsuite-35.sh needs manual/test-session-properties to be installed on SUSE 2023-08-10 19:11:07 +01:00
Frantisek Sumsal 79f902eb09 Add .pylintrc to globally suppress warnings we don't really care about
Also, drop the respective disable directives from existing files.
2023-08-10 18:13:29 +02:00
Frantisek Sumsal 2d49429e58 tools: pylint meson-render-jinja2.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal d853b9be98 tools: pylint analyze-dump-sort.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal fecdbd7227 tools: pylint dump-auxv.py 2023-08-10 18:13:29 +02:00
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 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
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
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
Lennart Poettering c1b2e1a89a polkit: move asserts up, so that they cover all reply codepaths 2023-08-09 11:02:51 +02:00
Lennart Poettering 0a901c71f5 polkit: use LIST_POP where appropriate 2023-08-09 11:02:51 +02:00
Yu Watanabe a38de31c8b 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.
2023-08-09 17:59:41 +09:00
Yu Watanabe 1be6f21320 remount-fs: split-out remount_by_fstab()
No functional change, just refactoring and preparation for later
commits.
2023-08-09 17:59:41 +09:00
Yu Watanabe b564224b37 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.
2023-08-09 17:57:43 +09:00