Commit graph

68519 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek cae4ad367d man/networkctl,systemd-soft-reboot: capitalize and add periods
We added version information, so now each bullet point contains multiple
paragraphs, so we need proper sentences.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek de6d05d78d man: "Documentation" is not part of the title
<ulinks> contents are used to generate a SEE ALSO section at the
bottom of a man page, so we need to include the title, without additional
words, in the content.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek bf63dadbc6 man: more hyperlinks and other fixes
Closes https://github.com/systemd/systemd/issues/29814.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek 55e40b0be8 tree-wide: s/life-cycle/lifecycle/g 2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek f04aac3d5a docs: fix title levels, remove unneded words
The title applies to the whole page, not just the first section.
And there should be just one title ('# foo') in a given document.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek c8cd6d7bab man: use meaningful titles for <ulink>s
As pointed out in https://github.com/systemd/systemd/issues/29814, we need to
use phrases are are meaningful on their own, because the man page formatter
creates a list at the bottom. With <ulink>see docs</ulink>, we end up with:
  NOTES:
    1. see docs
       https://some.url/page
    2. see docs
       https://some.url/page2
which is not very useful :(

Also, the text inside the tag should not include punctuation.

Python helper:
  from xml_helper import xml_parse
  for p in glob.glob('../man/*.xml'):
       t = xml_parse(p)
       ulinks = t.iterfind('.//ulink')
       for ulink in ulinks:
           if ulink.text is None: continue
           text = ' '.join(ulink.text.split())
           print(f'{p}: {text}')
2023-11-06 20:16:34 +01:00
Luca Boccassi 69c37b26a4
Merge pull request #29873 from yuwata/network-revert-hop-limit
network: several follow-ups for IPv6 hop limit
2023-11-06 10:00:46 +00:00
Yu Watanabe 986e182352 network: do not try to set invalid value for IPv6 hop limit 2023-11-06 15:53:25 +09:00
Yu Watanabe 39713b075f network: fix indentation
Follow-up for f141b2c053.
2023-11-06 15:53:01 +09:00
Yu Watanabe 93e583aaba Revert "ndisc: Also set link hoplimit"
This reverts commit 0ba8374bb8.

- link->network->ipv6_hop_limit must not be updated, as it may be used
  by multiple interfaces,
- We may receive multiple RA from multiple routers with different hop
  limit, and we should not make the default hop limit flicking,
- First of all, there is no reason that we need to update the default hop
  limit,
- The original issue should be caused by the hash and compare functions
  for Route object.
2023-11-06 15:33:10 +09:00
Zbigniew Jędrzejewski-Szmek a4a047c316 NEWS: mention new rpm macros 2023-11-05 18:44:49 +01:00
Zbigniew Jędrzejewski-Szmek 427ddaf60c NEWS: reword things, change ordering, remove one duplicate 2023-11-05 18:40:38 +01:00
Daan De Meyer 4f5278eead kernel-install: Log location that uki is installed in
Let's log where we install a UKI when running in verbose mode.
2023-11-05 15:26:20 +00:00
Frantisek Sumsal 0ffb690111 test: make the test happy with coverage builds
Bump the LimitFSIZE=, since the process needs to write quite a lot of
.gcda files, and suppress coverage errors with DynamicUser=true.
2023-11-05 00:32:04 +00:00
Luca Boccassi 0e5f89b5ab Update NEWS
Note that vmspawn and pcrlock are new and the interface might change
2023-11-04 16:51:28 +00:00
Luca Boccassi e5a2d6f7d6
Merge pull request #29862 from mrc0mmand/udevadm-followups
A couple of follow-ups for `udevadm control`
2023-11-04 16:48:48 +00:00
Frantisek Sumsal 30e8c19270 udevadm: actually set the log level
Follow-up to e4080a6d97.
2023-11-04 14:05:04 +01:00
Frantisek Sumsal a833684d8e udevadm: make sure we don't reset max children on each invocation
Follow-up to e4080a6d97.
2023-11-04 13:58:18 +01:00
Luca Boccassi 53db2e057d
Merge pull request #29858 from bluca/news
man/NEWS update for sleep.conf
2023-11-04 10:43:35 +00:00
Luca Boccassi 2c9fa8d3f0 man: drop obsolete reference to SuspendMode=
Follow-up for 1f82c21dce
2023-11-04 10:43:08 +00:00
Luca Boccassi ce3eccd85f NEWS: update for deprecated sleep configs 2023-11-04 10:43:08 +00:00
Luca Boccassi 00cf9b3b1d
Merge pull request #29402 from yuwata/sd-journal-cleanups-for-generic-array-bisect
sd-journal: cleanups for generic_array_bisect()
2023-11-04 10:38:03 +00:00
Luca Boccassi c7cc6d5859
Merge pull request #29469 from yuwata/sd-journal-pin-object
sd-journal: add a way to 'pin' object to protect from reading another object with the same type
2023-11-04 10:37:43 +00:00
Yu Watanabe e423b40d35 tree-wide: fix typo 2023-11-04 11:58:12 +09:00
Yu Watanabe 7682aedb4e sd-journal: make generic_array_bisect_plus_one() take data object
Then, rename it to generic_array_bisect_for_data().
No functional change, just refactoring.
2023-11-04 11:48:20 +09:00
Yu Watanabe a1b8d21fab sd-journal: introduce journal_file_pin_object()
Previously, OBJECT_UNUSED was used for 'pinning' the mmap cache for an
object. But, OBJECT_UNUSED is also used for reading object when type
cannot be determined before read, e.g. when reading the tail object.

Let's introduce another category for pinning mmap cache, and use it when
we want to temporary pin an object.
2023-11-04 11:47:55 +09:00
Yu Watanabe 7a56f6b2b9 mmap-cache: introduce window_matches_by_addr()
It is similar to window_matches(), but checks the mapped address.
Mostly preparation for later commits.
2023-11-04 11:42:19 +09:00
Yu Watanabe 1a25ab663c mmap-cache: introduce enum MMapCacheCategory
Then rename context -> category.

No functional change, just refactoring and modernization.
2023-11-04 11:41:15 +09:00
Yu Watanabe 2ebc9cc867 mmap-cache: drop Context and boolean flags in Window
No functional change, just refactoring.
2023-11-04 11:12:12 +09:00
Yu Watanabe ab8f553d1e sd-journal: rework generic_array_bisect()
- Rename generic_array_bisect_one() -> generic_array_bisect_step(), as there
  is also generic_array_bisect_plus_one(), so the original name is confusing.
- Make generic_array_bisect_step() return TEST_GOTO_NEXT or TEST_GOTO_PREVIOUS
  when the current array does not contain any matching entries.
- Make generic_array_bisect_step() symmetric with respect to the direction
  we are going to, except for the journal corruption handling.
- Make generic_array_bisect_step() gracefully handle journal corruptions,
  so the corruption handling in the caller side can be mostly dropped.
- Especially, when the last entry in an array is corrupted, previously
  we tried to find a valid entry sequentially from the end of the array,
  but now we anyway bisect the array. That should improve performance of
  reading corrupted journal files.
- Return earlier when no entry linked to the chained array (n == 0).
- Add many comments.

No behavior change unless journal is corrupted.
2023-11-04 11:01:30 +09:00
Yu Watanabe f6548f053d sd-journal: drop redundant re-reading of entry array object
This effectively reverts e562f13158.

In the loop of the generic_array_bisect(), the offset of the entry array
object is unchanged, the object is read at the beginning of the loop, and
we do not read any other entry array object. Hence, it is not necessary to
re-read the object every time we use the object.
2023-11-04 10:54:43 +09:00
Frantisek Sumsal 12c2560997 test: wait for the nvme device to appear
Also, use a /dev/disk/by-id/ symlink to the device, which should be
predictable, unlike the /dev/nvmeX stuff.
2023-11-03 23:26:57 +00:00
Luca Boccassi 775c005026
Merge pull request #29848 from poettering/base64url-too
hexdecoct: implicitly parse URL-safe base64 format, too
2023-11-03 23:26:33 +00:00
Frantisek Sumsal b0d446b381 fuzz: limit the interface definition input size to 64K
To avoid timeouts with larger inputs.

Resolves: #29856
2023-11-03 21:35:32 +00:00
Luca Boccassi d8e7e1b2c2 Update NEWS 2023-11-03 20:50:48 +00:00
Frantisek Sumsal ebefce6eab test: add a couple of tests for systemd-bsod
Add some basic tests for systemd-bsod, mainly to have something to build on
for #29056.
2023-11-03 20:39:15 +00:00
Frantisek Sumsal 4e086c389a Revert "test: don't panic on soft lockups"
Let's put this back in, as it could help with occasional machine lock ups
on overloaded systems (and it didn't help with the original issue
anyway).

This reverts commit 3a89904e45.
2023-11-03 20:38:31 +00:00
Luca Boccassi 82e5dc630d
Merge pull request #29839 from goenkam/maanya/portabled_support_for_confext
portable: add support for confext
2023-11-03 20:37:46 +00:00
Lennart Poettering fd81692f4b test: add test for the combined base64/base64url decoder 2023-11-03 21:35:28 +01:00
Lennart Poettering a5559e0622 hexdecoct: implicitly parse URL-safe base64 format, too
JSON-I (RFC 7493) suggests to use the URL safe base64 alphabet, rather
than the regular one when encoding binary data in JSON strings. We
generally uses the regular alphabet though.

Let's be tolerant in what we parse however: simply accept both formats
when we parse base64.

This does nothing about base64 generation though, only about parsing.
2023-11-03 21:35:24 +01:00
Luca Boccassi efadc82a11
Merge pull request #29847 from dtardon/udevadm-control-arg-processing
Streamline `udevadm control` arg. handling
2023-11-03 20:34:53 +00:00
Antonio Alvarez Feijoo 38cce239c1 cryptsetup: do not print (null) if pkcs11 uri not set
The pkcs11 uri is no set if the smart card is not inserted while using
`pkcs11-uri=auto` with libcryptsetup plugins.

```
> systemd-cryptsetup attach cr_data /dev/sda1 - pkcs11-uri=auto
Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/sda1.
Security token (null) not present for unlocking volume Linux filesystem (cr_data), please plug it in.
```
2023-11-03 19:10:55 +00:00
David Tardon a859f794f9 udev-ctrl: drop the unused maybe_disconnected stuff 2023-11-03 18:44:26 +01:00
David Tardon 3bce9d56fd udevadm-control: return early if --exit is used
All the following commands would just fail with -ENOANO anyway, hence
there's no point in sending them. And it allows us to shave off some
error handling code.
2023-11-03 18:44:26 +01:00
David Tardon e4080a6d97 udevadm-control: parse all args in advance
This is mostly just refactoring to make the code more manageable and
extendable. It doesn't introduce any semantic changes, but it
"optimizes" the communication with udevd a bit:
* If an option is used multiple times, only one command will be sent. If
  the option takes a value, the value of the final appearance of the
  option is used. The only exception is --property, which is additive by
  nature.
* Options --start-exec-queue and --stop-exec-queue are handled together.
  Only one of START_QUEUE/STOP_QUEUE commands will be sent to udevd even
  if both options appear on the command line.
2023-11-03 18:44:26 +01:00
Maanya Goenka db776f6935 portable: add support for confext
Support confexts for portable services
2023-11-03 16:59:58 +00:00
Luca Boccassi f0304df6e4 core: check that extensions have the hierarchies before overlaying
Before confext was added, hierarchies always existed in extensions. Now
they are optional - i.e., a sysext will not contain /etc/. So mixing a
confext and a sysext fails, as we'll try to create an overlay with /etc/
from the base, the confext and the sysext, but the latter doesn't have
the directory.

After the source images are mounted, check that each hierarchy exists in
each source image before creating the overlay, and drop them if they
don't.

Follow-up for 55ea4ef096
2023-11-03 16:59:58 +00:00
Luca Boccassi a39cba252e strv: add strv_free_many() to be used with CLEANUP_ARRAY() 2023-11-03 16:59:58 +00:00
Luca Boccassi bf88d0411f NEWS: add entry for vmspawn 2023-11-03 16:43:01 +00:00
Luca Boccassi 28a8aac745 NEWS: fix typo and reword meson option entry 2023-11-03 16:42:42 +00:00