Commit Graph

74803 Commits

Author SHA1 Message Date
Daan De Meyer
a2403af329 docs: Update HACKING
Let's mention the new way to install the latest changes without
rebuilding the image. Let's also remove the duplicate info about
distribution packages that is already mentioned in its own section.
2024-07-03 22:59:40 +02:00
Daan De Meyer
18c98a839f mkosi: Install zypper in opensuse images 2024-07-03 22:48:37 +02:00
Daan De Meyer
d1bbeeea4c mkosi: Fix sync script git command
Let's make sure we actually operate on the packaging git repo.
2024-07-03 22:40:31 +02:00
James Hilliard
aa329b8922 README: add missing CONFIG_MEMCG kernel config option for oomd
We need to enable this otherwise systemd-oomd.service fails to start.

Fixes:
ConditionControlGroupController=memory was not met
2024-07-03 22:11:24 +02:00
Daan De Meyer
cd98453908 mkosi: update arch commit reference
* d74b24c7c6 meson options: vcs-tag=false
* 7424fedef0 upgpkg: 256.1-1: new upstream release
* 6016864c99 upgpkg: 256-3: rebuild to fix man pages...
* 6f6d48b221 upgpkg: 256-2: update shells
* b9ce44e766 drop systemd-stable repository, build from main one
* baf4803252 upgpkg: 256-1: new upstream release
* 1d75e7ddaa add an install hint on NEWS
* 6f17a23127 Ups, inverted...
* d76029f7cc update meson options
* 6e7929dd98 upgpkg: 256rc4-1: new upstream pre-release - testing only!
* 7b70e7b0e7 upgpkg: 256rc3-2: fast-forward to current git main, non-official testing
* a438b879e2 upgpkg: 256rc3-1: new upstream pre-release, non-official testing
* ff30a600c9 upgpkg: 256rc2-1: new upstream pre-release, non-official testing
2024-07-03 22:04:18 +02:00
Daan De Meyer
2f6046f66b mkosi: Clean up old packages from the build directory 2024-07-03 21:05:55 +02:00
Luca Boccassi
ce513c6c6c mkosi: remove conflicting deb packages from builddir
These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4
2024-07-03 21:05:14 +02:00
Daan De Meyer
a7856c8182 load-fragment: Remove faulty assertion
Followup for 453cb5d01e

Fixes the following assertion:

"""
x86 130 ~/systemd ❯❯❯ meson compile -C build
ninja: Entering directory `/home/tfleig/systemd/build'
[2/5] Generating export-dbus-interfaces with a custom command
FAILED: interfaces
/home/tfleig/systemd/tools/dbus_exporter.py interfaces /home/tfleig/systemd/build/systemd /home/tfleig/systemd/build/systemd-homed /home/tfleig/systemd/build/systemd-hostnamed /home/tfleig/systemd/build/systemd-importd /home/tfleig/systemd/build/systemd-localed /home/tfleig/systemd/build/systemd-logind /home/tfleig/systemd/build/systemd-machined /home/tfleig/systemd/build/systemd-networkd /home/tfleig/systemd/build/systemd-oomd /home/tfleig/systemd/build/systemd-portabled /home/tfleig/systemd/build/systemd-resolved /home/tfleig/systemd/build/systemd-timedated
Assertion '__unique_prefix__expr_91' failed at src/core/load-fragment.c:3912, function config_parse_tasks_max(). Aborting.
Traceback (most recent call last):
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 45, in <module>
    main()
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 42, in main
    extract_interfaces_xml(args.output, exe)
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 9, in extract_interfaces_xml
    proc = run(
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/home/tfleig/systemd/build/systemd'), '--bus-introspect', 'list']' died with <Signals.SIGABRT: 6>.
[4/5] Generating man/systemd.index.xml with a custom command
ninja: build stopped: subcommand failed.
"""
2024-07-03 20:49:44 +02:00
Daan De Meyer
90a255779d repart: Allow overriding fstype per partition designator
$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.
2024-07-03 15:45:51 +02:00
Daan De Meyer
690a85b1d4 mkosi: Copy packages to the build directory as well
With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.
2024-07-03 15:44:27 +02:00
Daan De Meyer
2fe6ad5a64 mkosi: Make sure we don't hide errors from git merge-base
Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.
2024-07-03 15:42:12 +02:00
Anton Golubev
4ee0ac1ae4 hwdb: Add some HP IR cameras
Two very similar devices, with two functions - a regular camera and IR.
The peculiarity of their infrared camera is that it uses a color image
format (YUYV), although it is essentially black and white.

The IR camera interface differs from the regular camera interface by name:

"HP Wide Vision FHD Camera: HP W" for the regular camera and
"HP Wide Vision FHD Camera: HP I" for an infrared camera

Therefore, glob *I is used to separate the IR camera
2024-07-03 13:51:52 +02:00
Luca Boccassi
0f20f7d6fe Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only
core/dbus-manager: several cleanups, refuse SoftReboot() for user manager
2024-07-03 13:40:06 +02:00
Lennart Poettering
9545512f3e update TODO 2024-07-03 10:55:18 +02:00
Daan De Meyer
6bd14bf4b3 mkosi: update fedora commit reference
* f9fe17dbde Use vmlinux.h from kernel-devel
* 9cbad936a6 Pull in openssl-devel-engine
* 8ae009f929 Only add Requires on python3-zstd on Fedora
* 750e910c7c Drop BuildRequires on python3-zstd
2024-07-03 10:39:58 +02:00
Mike Yuan
33a06bbc74 core/main: add an assertion to ensure user managers won't initiate destructive/system-wide operation 2024-07-03 10:12:53 +02:00
Mike Yuan
6851abe403 core/manager: invoke special targets on signal only for system manager 2024-07-03 10:11:25 +02:00
Mike Yuan
236cd48546 core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...
2024-07-03 10:11:24 +02:00
Mike Yuan
541aadff97 core/dbus-manager: check for runtime scope first for system-wide operations
It's pointless to do selinux or /run/ space checks
for user managers.
2024-07-03 10:11:24 +02:00
Mike Yuan
a85fe612d7 core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate
Also, there can only be one system manager.
2024-07-03 10:11:24 +02:00
Mike Yuan
b80ae4bcfd core/dbus-manager: use path_simplify_alloc() for root and init paths 2024-07-03 10:11:24 +02:00
Mike Yuan
ff21827fee core/dbus-manager: use PidRef for log_caller()
This is only for logging, but since we lookup for the unit
here, let's try to be accurate.
2024-07-03 10:11:21 +02:00
Daan De Meyer
88e9230643 mkosi: Don't touch the packaging checkout if work is being done
If work is being done in a separate branch, don't touch the packaging
checkout.
2024-07-03 01:17:35 +02:00
Daan De Meyer
48d6dad100 meson: Define __TARGET_ARCH macros required by bpf
These are required by the bpf_tracing.h header in libbpf, see
https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h.

bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX
is not defined but recommends using the __TARGET_ARCH macros instead
so let's do that.
2024-07-03 01:16:35 +02:00
Luca Boccassi
e6b2508275 coredump: correctly take tmpfs size into account for compression
We calculate the amount of uncompressed data we can write by taking the limits
into account and halving it to ensure there's room for switching to compression
on the fly when storing cores on a tmpfs (eg: due read-only rootfs).

But the logic is flawed, as taking into account the size of the tmpfs storage
was applied after the halving, so in practice when an uncompressed core file
was larger than the tmpfs, we fill it and then fail.

Rearrange the logic so that the halving is done after taking into account
the tmpfs size.
2024-07-03 01:15:03 +02:00
Mike Yuan
4b7249111a docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ret type
Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225
2024-07-02 23:35:58 +02:00
Luca Boccassi
467c501667 Merge pull request #33577 from fbuihuu/testsuite-tweaks-for-v256-on-SUSE
Testsuite tweaks for v256 on suse
2024-07-02 23:35:33 +02:00
Lennart Poettering
6f5c8f44f1 Merge pull request #33574 from poettering/get-efi-var-raw
efi: efi variable refactoring
2024-07-02 21:16:37 +02:00
Franck Bui
252542ffc3 test: fix TEST-74-AUX-UTILS.ssh.sh on SUSE 2024-07-02 19:07:03 +02:00
Franck Bui
855bad331e test: preserve symlink in inst_recursive()
On SUSE this function is used to copy symlinks installed in *.wants/
directories.
2024-07-02 19:06:21 +02:00
Franck Bui
56a894e888 test: fix TEST-24-CRYPTSETUP on SUSE
/etc/systemd/journald.conf.d drop-in dir already exists on SUSE.
2024-07-02 19:05:07 +02:00
Franck Bui
a09825ce9f test: install /etc/hosts
Needed for resolving the "localhost" hostname.
2024-07-02 19:03:49 +02:00
Lennart Poettering
31e1edf570 efivars: rename efivar_get_uint_string() → efivar_get_uint64_str16()
Be explicit with the type, and more inline with our other code, that
likes to indicate the string char width in the name.

Also, switch to a fixed size type, since EFI variables should really be
binary exact the same on all archs.
2024-07-02 18:15:35 +02:00
Lennart Poettering
50e8b11e16 efi: rename efivar_(set|get)() → efivar_(set|get)_str16()
These functions after all write EFI UTF-16 strings, i.e. are relatively
high-level, hence give them a specific name indicating the type, to
match our other helpers that have similar type suffixes.
2024-07-02 18:15:32 +02:00
Lennart Poettering
70871dd0a3 efivars: use appropropriate uint8_t type when dealing with "raw" bytes
We don't actually want chars here, but rather raw bytes, in particular
to avoid signedness issues. Hence, let's use uint8_t here.
2024-07-02 18:15:30 +02:00
Lennart Poettering
1d22e23edb efivars: change return parameter of efivar_get_raw() to be void**
This is the "raw", untyped version after all, hence we should return a
void pointer, and let the client cast, if they know more.

Replaces: #30812
2024-07-02 18:15:27 +02:00
Lennart Poettering
f84b512290 efi: split out efivars.[ch] from util.[ch]
These are quite a bunch of functions, let's give them their own file.

No code changes, just some trivial refactoring.
2024-07-02 18:15:16 +02:00
Daan De Meyer
cca8c15599 mkosi: Install perf
It's already installed on ubuntu via linux-tools-common.
2024-07-02 18:14:19 +02:00
Lennart Poettering
ead6c49ee1 update TODO 2024-07-02 16:59:14 +02:00
Daniel Rusek
a9d472d6e4 test: split the resolved test suite into separate test cases
Although being far from ideal and the first two test cases have to be run
before the setup phase otherwise they will fail, it still makes the test
suite look much better and easier to read
2024-07-02 10:08:53 +02:00
Luca Boccassi
5dfce2296c Merge pull request #33496 from YHNdnzj/fd-is-mount-symlink
mountpoint-util: do not assume symlinks are not mountpoints
2024-07-02 10:07:20 +02:00
Luca Boccassi
1b3dc17624 Merge pull request #33560 from YHNdnzj/trivial-cleanup-2
2 trivial follow-ups for recent PRs
2024-07-02 10:05:49 +02:00
Luca Boccassi
aedc4f77d1 Merge pull request #33523 from neighbourhoodie/fix/dns-opt-extended-rcode
Fix DNS OPT extended rcode parsing
2024-07-02 01:48:40 +02:00
dependabot[bot]
ba490e2281 build(deps): bump github/codeql-action from 3.24.7 to 3.25.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.7 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3ab4101902...b611370bb5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 22:08:28 +02:00
Luca Boccassi
4739539a78 mkosi: update debian commit reference
* abf24e775c Add recommends on linux-sysctl-defaults
* 76cb4138d2 autopkgtest: skip qemu tests on arm64
* 0935d73526 Install new systemd-import generator
2024-07-01 21:42:11 +02:00
Mike Yuan
0ee63608bc shared/condition: add missing space after 'if'
Follow-up for 98b1ecc917
2024-07-01 19:14:22 +02:00
Mike Yuan
71c404f9cf shared/mount-util: return early if param is NULL
To make things more readable and consistent.
2024-07-01 18:59:28 +02:00
Lennart Poettering
1c30bf35bc Merge pull request #33475 from poettering/name-to-handle-at-fid
teach inode_same() the concept of name_to_handle_at() FIDs to properly detect inode identities
2024-07-01 18:53:14 +02:00
Daan De Meyer
9fc4388ae4 mkfs-util: Simplify logic 2024-07-01 18:52:57 +02:00
Lennart Poettering
29294d21cf units: add dep on systemd-logind.service by user@.service
Let's make sure logind is accessible by the time user@.service runs, and
that logind stays around as long as it does so.

Addresses an issue reported here:

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html

This addresses an issued introduced by
278e815bfa, which dropped the a dependency
from user@.service systemd-user-sessions.service without replacement.
While dropping that dependency does make sense, it should have been
replaced with the weaker dependency on systemd-logind.service, hence fix
that now.

user@.service is after all a logind concept, hence logind really should
be around for its lifetime.

systemd-user-sessions.service is a later milestone that only really
should apply to regular users (not root), hence it's too strong a
requirement.
2024-07-01 18:52:35 +02:00