Commit Graph
78406 Commits
Author SHA1 Message Date
Michael Limiero c76a7b7c8c Correct ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max 2025-01-03 09:21:55 +01:00
Daan De Meyer 96cf4d3243 terminal-util: introduce terminal_{new,detach}_session helpers (#35811) 2025-01-03 09:21:19 +01:00
Daan De Meyer 628a3fc287 network/dhcp: introduce global setting for DHCPv4 client identifier (#35783)
Typically, the same client identifier setting is used for all
interfaces. Hence, better to provide the system-wide setting to specify
the client identifier.
2025-01-03 09:19:55 +01:00
Mike Yuan 1de1282320 terminal-util: introduce terminal_{new,detach}_session helpers
Prompted by #35761
2025-01-02 21:14:38 +01:00
Mike Yuan 217bd588c2 terminal-util: regroup some functions 2025-01-02 20:42:20 +01:00
Mike Yuan dfe3fe77f7 shared/hibernate-util: handle the case where no swap has available backing dev (#35802)
Fixes https://github.com/systemd/systemd/issues/35798
Replaces https://github.com/systemd/systemd/pull/35801
2025-01-02 19:26:58 +01:00
Lennart Poettering 5ff7046e61 ask-password: add varlink IPC interface and various other additions and fixes (#35074) 2025-01-02 18:21:35 +01:00
Lennart Poettering ed8e7e2393 core/socket: several fixlets (#35637)
Fixes https://github.com/systemd/systemd/issues/35635
2025-01-02 18:20:48 +01:00
Luca Boccassi 0182958047 test: update README's Ubuntu CI section for mkosi changes 2025-01-02 17:04:30 +00:00
Luca Boccassi 021b51a72b Two doc updates (#35810) 2025-01-02 16:04:00 +00:00
Lennart Poettering 3fbca0e23a test: add CI test validating the new varlink interface and more 2025-01-02 16:39:33 +01:00
Lennart Poettering 7fd0ea6cf6 ask-password: add comment with well-known errors from ask_password_auto() 2025-01-02 16:39:30 +01:00
Lennart Poettering 066f6bfb62 ask-password: add Varlink API for querying passwords from the user
This turns systemd-ask-password into a small Varlink service, so that
there's an standard IPC way to ask for a password. It mostly directly
exposes the functionality of the Varlink service.
2025-01-02 16:39:05 +01:00
Lennart Poettering d66894a7a5 ask-password-api: add new "hup_fd" field to AskPasswordReq
This new field allows specification of an fd on which the password
prompt logic will look for POLLHUP events for, and if seen will abort
the query.

The usecase for this is that when we query for a pw on behalf of a
Varlink client we can abort the query automatically if the client dies.
2025-01-02 16:38:44 +01:00
Lennart Poettering c4a02a526d ask-password-api: move timeout into AskPasswordRequest structure too 2025-01-02 16:38:25 +01:00
Lennart Poettering 72068d9d25 ask-password-api: move tty_fd into AskPasswordRequest structure, too 2025-01-02 16:38:12 +01:00
Lennart Poettering 4ff3689ad2 ask-password-api: move 'flag_file' from function parameter into AskPasswordRequest structure 2025-01-02 16:38:00 +01:00
Lennart Poettering 254649d576 ask-password-agent: send READY=1 when we established inotify watch 2025-01-02 16:37:57 +01:00
Lennart Poettering 49187cfc34 ask-password-agent: optionally read pw to reply from env var 2025-01-02 16:37:54 +01:00
Lennart Poettering 1a2e4b614e pcrextend: split out varlink server setup into its own function 2025-01-02 16:37:52 +01:00
Lennart Poettering 107986a33e sd-varlink: expose api to get input/output fd separately 2025-01-02 16:35:42 +01:00
Daan De Meyer 722e0ccf0e docs: Update code coverage documentation 2025-01-02 16:25:19 +01:00
Daan De Meyer 8a65263650 docs: Use mkosi sandbox in test documentation as well
Same change as in HACKING.md, but for running the integration tests.
2025-01-02 16:17:53 +01:00
Mike Yuan de69879b62 shared/hibernate-util: drop support for kernels lacking /sys/power/resume_offset
The current fallback path is actually unreliable, given
the kernel *supports* setting the resume offset through
cmdline after all, but just not exposed under /sys/.
For v258 let's drop it hence.

I didn't bump the baseline to 4.17, but merely documented
new requirement in README, because there's certainly more
compat stuff to drop between 4.3 and 4.17, and README is
a useful list for things to kill. We'll get to 5.4 eventually.
2025-01-02 15:55:33 +01:00
Mike Yuan 733bc1aee8 README: document a bunch of new kernel APIs we utilize 2025-01-02 15:55:32 +01:00
Mike Yuan 8b0818fa45 shared/blockdev-util: shorten the code a bit
If btrfs_get_block_device_fd() returns 0, ret is already initialized.
2025-01-02 15:29:34 +01:00
Mike Yuan bd3d361580 shared/hibernate-util: handle the case where no swap has available backing dev
This also makes find_suitable_hibernation_device() report
more accurate error (ENOSPC -> ESTALE) if there's
no swap space on the system at all but resume= is set.

Fixes #35798
Replaces #35801
2025-01-02 15:29:34 +01:00
Mike YuanandYu Watanabe 6d3b2273b1 shared/hibernate-util: don't attempt to fiemap fd if no backing dev available
Prompted by #35798

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2025-01-02 15:29:32 +01:00
Yu Watanabe 66f379b63d systemctl: certainly ignore ENOENT in checking inhibitors
Fixes a bug caused by 804874d26a.

Follow-up for 084f361b50 and
a1417e5563.

Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.

Fixes #35757 and #35806.
2025-01-02 14:15:09 +00:00
Daan De Meyer 76d80cc343 mkosi: Allow disabling vcs-tag via environment variable 2025-01-02 14:54:19 +01:00
Luca Boccassi f1f0230cf0 bash-completion/journalctl: list user units when --user is already specified (#35799)
Also, escape the current input before matching listed user units.

Fixes #35794.
2025-01-02 11:20:31 +00:00
Mike Yuan 03ccee1939 errno-list: prefer strerrorname_np() as errno_to_name() provider 2025-01-02 12:01:53 +01:00
Yu Watanabe bbe1d1bcb0 bash-completion/journalctl: also escape the current input of user unit
Follow-up for cec82cb943.
2025-01-02 11:50:44 +09:00
Yu Watanabe 0578c26bd6 bash-completion/journalctl: list user units when --user is already specified
Follow-up for 52051dd84c.
Fixes #35794.
2025-01-02 11:48:58 +09:00
richfifeg 89c4fe6c21 60-sensor.hwdb: Loosen model mask to include entire series
This sensor is the same for Asus's entire Q5##L series, so match accordingly.

Tested with my Q502LAB.
2025-01-02 09:22:42 +09:00
Ettore Atalan 0d080e35bd po: Translated using Weblate (German)
Currently translated at 96.8% (249 of 257 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main
2025-01-01 11:55:42 +09:00
Mike Yuan 7c194bb93c TEST-07-PID1: add test case for #35635 2024-12-31 00:22:53 +01:00
Mike Yuan d8a2ed33fd test: move test for MaxConnectionsPerSource= to TEST-07-PID1
Follow-up for 3456c89ac2
2024-12-31 00:22:53 +01:00
Mike Yuan 58a86a1504 core/socket: introduce intermediate SOCKET_START_OPEN state
Prior to this commit, if no Exec*= is defined for socket,
and the unit was in SOCKET_FAILED state, failure of socket_open_fds()
would induce state transition SOCKET_FAILED -> SOCKET_FAILED,
and OnFailure= deps get unexpectedly skipped. Let's introduce
an intermediate state, so that during unit start we enter
UNIT_ACTIVATING at least once.

Fixes #35635
2024-12-31 00:22:52 +01:00
Mike Yuan 80706c3269 core/socket: clean up usbffs handling
- Log about errors in socket_open_fds()
- Open parent dir fd and operate under it, instead of constructing paths
  everywhere
- Replace scandir() with readdir_all()
2024-12-31 00:22:52 +01:00
Mike Yuan 90761f7f68 basic/recurse-dir: modernize readdir_all() 2024-12-30 23:52:19 +01:00
Mike Yuan d1e3536d6b core/socket: close fds also on SOCKET_CLEAN state
Follow-up for c968d76a38

We'd only transition to SOCKET_CLEAN state if previously
inactive (see socket_clean()), hence no fds shall be persisted
in this state.
2024-12-30 21:43:52 +01:00
Mike Yuan 240457204b core/socket: use correct kill operation for SOCKET_STOP_PRE_SIGTERM
Follow-up for a232ebcc2c
2024-12-30 21:43:52 +01:00
Mike Yuan 2fbdfe0b0d core/socket: trivial coding style cleanups 2024-12-30 21:43:52 +01:00
Mike Yuan 6767b7b3af sysusers.d/basic: fix alignment
Follow-up for a4c0528f14
2024-12-30 21:43:51 +01:00
Luca Boccassi 1737bc0c1e mkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)
The commit history of
[src.opensuse.org](https://src.opensuse.org/pool/systemd/src/branch/devel)
has been reset again to 2015 (both branches, factory and devel)... this
is unusable for now. I'd suggest switching to the github mirror of
code.opensuse.org, maintained since 2019 (at least github is not down
that often and the commit history does not change).
2024-12-30 18:42:29 +00:00
Antonio Alvarez Feijoo 07638ce2a4 mkosi: switch to github mirror of openSUSE sources from build.opensuse.org
The current src.opensuse.org is very unstable and commit hashes are reset (or
even removed) every now and then. While the official repo is not fixed, let's
move to a more stable source, the github mirror of code.opensuse.org, maintained
since 2019.
2024-12-30 17:39:16 +01:00
Antonio Alvarez Feijoo 8a6ad7c837 mkosi: add libopenssl devel package to openSUSE tools tree
Otherwise, the build fails with:

```
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /mnt/work/src/systemd/upstream-fork/main/build-mkosi
ninja: Entering directory `/mnt/work/src/systemd/upstream-fork/main/build-mkosi'
[463/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
FAILED: src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
cc -Isrc/shared/libsystemd-shared-258.a.p -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -I/usr/include/blkid -I/usr/include/libmount -I/usr/include/p11-kit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -MF src/shared/libsystemd-shared-258.a.p/openssl-util.c.o.d -o src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -c ../src/shared/openssl-util.c
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_read’:
../src/shared/openssl-util.c:1395:65: error: implicit declaration of function ‘UI_method_get_ex_data’; did you mean ‘UI_method_get_reader’? [-Wimplicit-function-declaration]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                                                 UI_method_get_reader
../src/shared/openssl-util.c:1395:65: warning: nested extern declaration of ‘UI_method_get_ex_data’ [-Wnested-externs]
../src/shared/openssl-util.c:1395:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                           ^
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_new’:
../src/shared/openssl-util.c:1479:13: error: implicit declaration of function ‘UI_method_set_ex_data’; did you mean ‘UI_method_set_reader’? [-Wimplicit-function-declaration]
 1479 |         if (UI_method_set_ex_data(ui->method, 0, &ui->request) == 0)
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             UI_method_set_reader
../src/shared/openssl-util.c:1479:13: warning: nested extern declaration of ‘UI_method_set_ex_data’ [-Wnested-externs]
[480/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/pkcs11-util.c.o
ninja: build stopped: subcommand failed.
```
2024-12-30 17:38:36 +01:00
Mike Yuan 25a306f6c4 Follow-ups for recent PRs plus modernizations prompted thereby (#35760)
Please backport the first commit to stable.
2024-12-30 16:35:59 +01:00
Antonio Alvarez Feijoo 37c2be73e7 mkosi: update openSUSE commit reference
Force-pushed as usual, now HEAD is v257.1.
2024-12-30 11:31:38 +00:00