Commit graph

67524 commits

Author SHA1 Message Date
Lennart Poettering d4899d49e6 Revert "man: Add /usr/local/lib path to Synopsis section for modules-load"
This reverts commit 1781176768.
2023-09-26 13:15:12 +01:00
Lennart Poettering 1617424ce7 udev: raise RLIMIT_NOFILE as high as we can
We might need a lot of fds on large systems, hence raise RLIMIT_NOFILE
to what the service manager allows us, which is quite a lot these days.

udev already sets FORK_RLIMIT_NOFILE_SAFE when forking of chilren, thus
ensuring that forked off processes get their RLIMIT_NOFILE soft limit
reset to 1K for compat with crappy old select().

Replaces: #29298
Fixes: #28583
2023-09-26 13:01:02 +02:00
Lennart Poettering 7af33700e6 varlink: remove duplicate varlink_clear_current() 2023-09-26 12:59:24 +02:00
Mike Yuan fe3d33c140 core/service: log the next restart usec only when we're arming timer
service_restart_usec_next() is also called when querying
'RestartUSecNext' dbus property. Let's avoid the redundant
logging triggered every time user does a 'systemctl status'.
2023-09-26 12:59:15 +08:00
Raul Cheleguini 1781176768 man: Add /usr/local/lib path to Synopsis section for modules-load 2023-09-26 12:56:32 +08:00
Yu Watanabe bb83c7c633 test: add test case that journal file with unreferenced _BOOT_ID data
For issue #29275.
2023-09-26 13:26:22 +09:00
Yu Watanabe 304cb08f84 sd-journal: always fallback to find entry by realtime
Consider the following situation:
- There are two journal files (x and y), that contains entries for two boots (X and Y).
- The journal file x contains entries of the boot X, and y contains
  entries of Y.
- Nevertheless x does not contains entries of boot Y, it contains
  the _BOOT_ID= data object of boot Y. Of course, the data object is not
  referenced by any entries in the journal file x.

In such situation, when the current location of sd_journal is the head
of journal y, that is, the first entry of the boot Y,
sd_journal_previous() failed without this change, and
'journalctl --boot -NUM' for boot X failed.

Fixes #29275.
2023-09-26 13:26:22 +09:00
Yu Watanabe 7c1784db83 test: add tests for journal_find_boot_by_offset() and friends 2023-09-26 13:26:22 +09:00
Yu Watanabe 0141b2143d logs-show: use sd_journal_step_one() 2023-09-26 13:26:22 +09:00
Yu Watanabe 8081939d1d logs-show: move journal_find_boot_by_offset() and friends from journalctl.c 2023-09-26 13:26:22 +09:00
Yu Watanabe f5257facb9 journalctl: several cleanups for find_boot_by_offset()/_by_id()
- their names are prefixed with "journal_",
- make them not directly use global variables,
- simplifies the loop counter in find_boot_by_offset().
2023-09-26 13:26:22 +09:00
Yu Watanabe 1eede15851 sd-journal: refuse to write entry without boot ID
To make journal entries always contain valid boot ID.
2023-09-26 13:26:22 +09:00
Yu Watanabe b761ae0fca sd-journal: boot_id is always non-NULL
The two callers of journal_file_append_entry_internal() always pass
non-NULL boot ID.
2023-09-26 13:26:22 +09:00
Yu Watanabe 6ea51363c8 sd-journal: also verify tail_entry_boot_id and friends in journal_file_verify_header()
Then, we can drop the redundant check in journal_file_read_tail_timestamp().
2023-09-26 13:26:22 +09:00
Yu Watanabe 1fa2ebbec4 test: fix header verification 2023-09-26 13:26:22 +09:00
Luca Boccassi 4c9a288154 man: document SystemState's possible values 2023-09-25 22:55:54 +01:00
Abderrahim Kitouni 01f5c5d52d man: add version information for udev functions 2023-09-25 22:29:38 +01:00
Luca Boccassi e1e0c4f025
Merge pull request #29314 from YHNdnzj/firstboot-fixup
Small fixups for first boot
2023-09-25 22:29:24 +01:00
Lennart Poettering 902dc432e2
Merge pull request #29309 from poettering/resolved-varlink-tweaks
resolved: minor varlink API tweaks
2023-09-25 23:27:33 +02:00
Lennart Poettering 0869e1326a oomd: correct listening sockets
So, unfortunately oomd uses "io.system." rather than "io.systemd." as
prefix for its sockets. This is a mistake, and doesn't match the
Varlink interface naming or anything else in oomd.

hence, let's fix that.

Given that this is an internal protocol between PID1 and oomd let's
simply change this without retaining compat.
2023-09-25 23:27:18 +02:00
Lennart Poettering a4edf0335d varlink: move O_NONBLOCK setting to varlink_server_listen_fd(), and set O_CLOEXEC too
Let's move setting of O_NONBLOCK into varlink_server_listen_fd() and out
of varlink_server_create_listen_fd_socket(). The latter has two callers:
varlink_server_listen_fd() and varlink_server_listen_address(), which
guarantees O_CLOEXEC+O_NONBLOCK anyway, hence no neet to repeat the
logic.
2023-09-25 23:27:04 +02:00
Lennart Poettering 0e19744232
Merge pull request #29315 from poettering/strgrowpad0
string-util: make strgrowpad0() safer
2023-09-25 23:26:47 +02:00
Luca Boccassi 5ea69810fe
Merge pull request #29308 from aafeijoo-suse/dissect-fix
dissect: fix man and bash-completion
2023-09-25 19:16:08 +01:00
Lennart Poettering 3510df0ae4 repart: add extra safety check that the verity signature fits in the partition we want to write 2023-09-25 19:10:37 +02:00
Lennart Poettering 8e47958423 string-util: make strgrowpad0() a bit safer
Let#s make sure we never shorten the allocation leaving an invalid
string (i.e. a memory allocation without a trailing NUL) around.
2023-09-25 19:10:37 +02:00
Mike Yuan ff4a7d32f1
man/systemd-firstboot: /etc/ empty -> unpopulated
We use the phrase "unpopulated" in systemd.unit(5) too.
And "/etc/ is empty" is simply spurious.
2023-09-26 01:01:57 +08:00
Mike Yuan 60e4b4291b
core/main: log that we assume first boot if failed to read machine-id 2023-09-26 01:00:23 +08:00
Lennart Poettering b907b9075e alloc-util: remove duplicate empty line 2023-09-25 18:49:21 +02:00
Lennart Poettering 510b3b06fc resolved: rename varlink function to match exposed method name 2023-09-25 18:45:52 +02:00
Lennart Poettering 0319a28e42 resolved: also expose interface index in server JSON data 2023-09-25 18:45:52 +02:00
Lennart Poettering 8dcce20a27
Merge pull request #29301 from poettering/pcr-extend-rename
rename pcrphase binary to pcrextend
2023-09-25 18:28:03 +02:00
Lennart Poettering 75174a5de9 man: briefly document that we are now keeping an event log in userspace for out measurements 2023-09-25 17:17:20 +02:00
Lennart Poettering b0d00ec60a pcrextend: make PCR index configurable
Let's make the tool a tiny bit more generic by allowing the PCR index to
measure into to be configurable.
2023-09-25 17:17:20 +02:00
Lennart Poettering 32295fa08f pcrphase: rename binary to pcrextend
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
2023-09-25 17:17:20 +02:00
Antonio Alvarez Feijoo acb7d23d8f
bash-completion: add missing commands and options to systemd-dissect 2023-09-25 16:46:11 +02:00
Frantisek Sumsal 7f048f0ed0 test: enable debug logs for the user instances as well
To make debugging [0], hopefully, easier.

[0] https://github.com/systemd/systemd/issues/28504
2023-09-25 15:24:11 +01:00
Luca Boccassi b7733dfee9
Merge pull request #29303 from abderrahim/syntax-fixes
man: a couple of small fixes
2023-09-25 15:23:48 +01:00
Antonio Alvarez Feijoo a0582220f5
man/systemd-dissect: various fixes
- Add synopsis to `--discover` and `--validate` options.
- `-l` is for `--list`, not for `--mtree`.
2023-09-25 16:16:41 +02:00
Abderrahim Kitouni 0ee4239437 man: fix docbook syntax for function docs
This fixes sd_bus_error_add_map and man/sd_uid_get_state
2023-09-25 13:34:45 +01:00
Abderrahim Kitouni d511acdf82 man/kernel-command-line: don't refer early_core_pattern to systemd
It is defined later in the same file
2023-09-25 13:14:34 +01:00
Zbigniew Jędrzejewski-Szmek 61afc53924 docs/FDS: add missing article and reword sentence 2023-09-25 11:30:02 +01:00
Lennart Poettering 02c9d62b30 update TODO 2023-09-25 12:23:29 +02:00
Daan De Meyer 7d376f1dde mkosi: Run meson and ninja as the user invoking mkosi
Latest mkosi sets $MKOSI_UID and $MKOSI_GID to the uid/gid of the
user running mkosi. Let's make use of this to run meson setup and
ninja as the user running mkosi, so that if we execute git as a
subprocess during meson setup, it doesn't complain about unsafe
directories. This also makes sure all the build artifacts are owned
on the host by the user running mkosi.
2023-09-25 11:06:15 +01:00
김인수 e2b8a61919 po: Translated using Weblate (Korean)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main
2023-09-25 12:59:02 +09:00
Alexandre Peixoto Ferreira 13abd00685
sd-dhcp-client: reject NAKs from servers that we did not send an offer to (#29290)
To support multiple DHCP servers in a network.
2023-09-25 11:46:41 +09:00
Takashi Sakamoto fb86af6399 hwdb: ieee1394-unit-function: add Miglia Technology Harmony Audio (HA02)
This commit adds hwdb entry for Miglia Technology Harmony Audio (HA02).
The device is an application of OXford Semiconductor FW970 and will be
supported by ALSA oxfw driver in future.
2023-09-24 10:56:40 +01:00
Frantisek Sumsal 18c3ffbfcc test: wait for the swtpm socket to appear
On slower/overloaded systems it may take a bit for the swtpm socket
to show up:

I: Started swtpm as PID 189419 with state dir /tmp/tmp.pWqUutuGUj
I: Configured emulated TPM2 device tpm-spapr
+ tee /var/tmp/systemd-test-TEST-70-TPM2_1/console.log
+ timeout --foreground 1200 /bin/qemu-system-ppc64le -smp 4 ...
qemu-system-ppc64le: -chardev socket,id=chrtpm,path=/tmp/tmp.pWqUutuGUj/sock: Failed to connect to '/tmp/tmp.pWqUutuGUj/sock': No such file or directory
E: qemu failed with exit code 1

Spotted regularly in the ppc64le cron job and in some Ubuntu CI/CentOS CI
pr runs [0].

[0] https://github.com/systemd/systemd/pull/29183#issuecomment-1721727927
2023-09-23 11:32:12 +01:00
Frantisek Sumsal 3a89904e45 test: don't panic on soft lockups
We can't do anything about them anyway, and most importantly this seems
to alleviate systemd/systemd-centos-ci#660, which should make the CIs
a bit less angry (at least until the issue is addressed properly).
2023-09-23 14:19:55 +08:00
Luca Boccassi f5f4486c65
Merge pull request #29254 from yuwata/sd-ndisc-use-usec_t
sd-ndisc: make sd_ndisc return time values in usec
2023-09-22 21:46:50 +01:00
Luca Boccassi 593551a8a2
Merge pull request #29258 from yuwata/sd-dhcp-client-split-out
sd-dhcp-client: preparation for later PR
2023-09-22 21:46:31 +01:00