1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-29 15:22:07 +03:00
Commit Graph

67450 Commits

Author SHA1 Message Date
Mike Yuan
1482feda01
sleep-util: move check_wakeup_type to sleep/sleep 2023-09-27 21:48:39 +08:00
Zbigniew Jędrzejewski-Szmek
e071384dc5 Merge pull request #29296 from yuwata/sd-journal-several-cleanups-for-boot-id 2023-09-27 14:56:48 +02:00
Frantisek Sumsal
c1b129f4ad test: introduce TEST-09-REBOOT
To test stuff involving state preserved across (multiple) reboots, like
journal boot IDs.
2023-09-27 14:50:19 +02:00
Luca Boccassi
578840bdf9
Merge pull request #29296 from keszybz/make-cryptsetup-offical-and-add-docs
Make cryptsetup offical and add docs
2023-09-27 13:31:11 +01:00
Mike Yuan
99f360a46b units/blockdev@.target: conflict with umount.target
Follow-up for d120ce478d

blockdev@.target is used as a synchronization point between
the mount unit and corresponding systemd-cryptsetup@.service.
After the mentioned commit, it doesn't get a stop job enqueued
during shutdown, and thus the stop job for systemd-cryptsetup@.service
could be run before the mount unit is stopped.

Therefore, let's make blockdev@.target conflict with umount.target,
which is also what systemd-cryptsetup@.service does.

Fixes #29336
2023-09-27 12:33:40 +02:00
Susant Sahani
0ba8374bb8 ndisc: Also set link hoplimit
The per route hop limit does not place the hop limit in the IPv6 header.
https://github.com/systemd/systemd/issues/28437#issuecomment-1711055181
2023-09-27 11:05:15 +02:00
Lennart Poettering
c8cb548f0b Revert "userdbd: Order systemd-userdbd.service after systemd-remount-fs.service"
This reverts commit 9dd8858281.
2023-09-27 11:02:06 +02:00
Christian Hesse
75271582be fix typo in NEWS
Looks like `-a change` is a typo and should have been `-c change` to
match on the action.
2023-09-27 17:24:39 +09:00
Balázs Úr
3d6df0c4e2 po: Translated using Weblate (Hungarian)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Balázs Úr <balazs@urbalazs.hu>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/hu/
Translation: systemd/main
2023-09-27 07:56:54 +00:00
Abderrahim Kitouni
ad4934904a update-dbus-docs: Test that items are documented in the History section
This also adds an ignore list, which currently contains the whole API as of
version 250, since that's the base we used for dbus interfaces.

See d9d2d16aea
2023-09-26 19:11:53 +01:00
Daan De Meyer
3bd337a084 network: Rename json_append_one() and move to json.h 2023-09-26 19:01:34 +01:00
Daan De Meyer
418a498777 journal: Stop trying to open runtime journal once flushed
Once we've flushed the runtime journal to /var, stop trying to open
it since that will just fail with ENOENT all the time.
2023-09-26 19:01:07 +01:00
Jan Janssen
90461ef56f meson: Fix version script handling
Build targets should have a link dependency on the version scripts they
use. This also uses absolute paths in anticipation for meson 1.3
needlessly deprecating file to string conversions.
2023-09-26 19:41:53 +02:00
huyubiao
b53a80966e systemd-hwdb: fix unsigned and signed comparison problem
...
uint8_t c;
struct trie_node *child;

for (p = 0; (c = trie->strings->buf[node->prefix_off + p]); p++) {
        _cleanup_free_ struct trie_node *new_child = NULL;
        _cleanup_free_ char *s = NULL;
        ssize_t off;
if (c == search[i + p])
        continue;
...
When '®' is present in search, c is 194, search[i + p] is -62, c is not equal to search[i + p], but c should be equal to search[i + p].
2023-09-26 17:38:16 +01:00
Zbigniew Jędrzejewski-Szmek
10aeee95d0 man: rename systemd-cryptsetup@.service → systemd-cryptsetup
We already had the other name as alias, so this just changes what is the "main"
name. The text is adjusted to describe the command briefly.
2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
ab68c6fb08 TEST-70: use new cryptsetup path 2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
a1ca52c2da meson: add comments to compat symlinks 2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
fb8d67cd34 meson: move systemd-cryptsetup to /usr/bin
This was requested, though I think an issue was never filed. If people are
supposed to invoke it, even for testing, then it's reasonable to make it
"public".
2023-09-26 17:03:26 +02:00
Zbigniew Jędrzejewski-Szmek
5bae80bd44 cryptsetup: fail with error if extraneous arguments are specified
So far the program would silently ignore those… I think it's better to fail.
2023-09-26 16:21:31 +02:00
Zbigniew Jędrzejewski-Szmek
166015faf5 cryptsetup: add parse_argv() and implement --version
All public programs are expected to have that. The --help output is adjusted to
follow the usual style (highlighting, listing of options). The OPTIONS
positional argument is renamed to "CONFIG", because we now also have "OPTIONS…"
to describe the non-positional options.
2023-09-26 16:20:29 +02:00
Zbigniew Jędrzejewski-Szmek
4cc8e81db5 cryptenroll: align tables 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
5f5f1ba169 man/crypttab: fix indentation 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
4381474f7f man/crypttab: add a more comprehensive example of encrypted device setup 2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
12c346d8e8 man/crypttab: do not recommend using /dev/sdX symlinks in /etc/crypttab
This is just wrong. Quering the symlink names with udevadm is not the
easiest, but I think that's the safest way for a documented example.
2023-09-26 15:35:06 +02:00
Zbigniew Jędrzejewski-Szmek
38e3c61dbb man/cryptenroll: link to crypttab(5) for examples
I was missing an example of how to use cryptenroll. We have that, but in
another page. Instead of repeating, let's just direct the user to the right
place.

Also, reformat synopsis to the "official" non-nested syntax.
2023-09-26 15:35:06 +02:00
beh_10257
5808300c44
add support for hp pavilion gaming 15 lid switch (#29304)
Tested together with kernel patch: https://lore.kernel.org/linux-acpi/20230920130506.8595-1-hdegoede@redhat.com/
but the d7 key is still interpreted as a wlan key switch, so an hwdb update is needed.

Raw dmi:

dmi:bvnInsyde:bvrF.45:bd07/07/2023:br15.45:efr2.51:svnHP:pnHPPavilionGamingLaptop15-dk1xxx:pvrType1ProductConfigId:rvnHP:rn8742:rvr02.51:cvnHP:ct10:cvrChassisVersion:sku20T68EA#BH4::

Related to: https://github.com/systemd/systemd/issues/28942
2023-09-26 13:32:03 +01:00
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