Commit Graph

75969 Commits

Author SHA1 Message Date
Christoph Anton Mitterer
3e98472223 man: fix typos
Closes #34199.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2024-08-31 13:59:02 +09:00
Adrian Vovk
5f9dd9c64d
progress-bar: Add unbuffered variant
The progress_bar functions do their own buffering: they reconfigure
stderr, then print, then flush and disable buffering on their own. In
situations where multiple progress bars are being drawn at a time (for
example, in updatectl), it's even more efficient to hoist the buffering
and flushing to the call site, and avoid drawing each progress bar
individually.

To that end, new _unbuffered variants of the progress_bar functions. And
we use them in updatectl.
2024-08-30 22:50:24 -04:00
Adrian Vovk
ca7490c5ad
updatectl: Improve behavior of progress logging
This applies a couple of aesthetic changes to the way updatectl renders
progress information

1. We invert from "ICON TARGET MESSAGE" to "TARGET: ICON MESSAGE" to
   better fit in with the systemd progress bars, which look like
   "TARGET [==========---------] XX%". The original version of the
   sysupdated PR implemented its own progress bars that were oriented
   differently: "[==========---------] TARGET XX%". When we swapped
   the progress bar we didn't swap the status messages

2. When a target finishes updating, instead of leaving a 100% progress
   bar on screen for potentially extended periods of time (which implies
   to the user that the update isn't actually done...), we show a status
   message saying the target is done updating.

3. Fixed a minor bug where an extra newline would be printed after the
   total progress bar. At the top of the rendering function, we scroll
   the terminal's scroll-back just enough to fit a line for each target,
   and one for the total. This means that we should not print an
   additional line after the total, or else it'll scroll the terminal's
   buffer by an additional character. This bug was introduced at some
   point during review

4. Clears the Total progress bar before quitting. By the time we're
   quitting, that progress bar will be showing no useful status for the
   user. Also, the fix in point 3 will cause the shell's prompt to
   appear on the same line as the Total progress bar, partially
   overwriting it and leaving the shell in a glitchy state.
2024-08-30 22:50:23 -04:00
Yu Watanabe
3722db214b man: fix typo
Follow-up for 1ff0164be5.
2024-08-31 11:19:15 +09:00
Adrian Vovk
2aff6efe67
updatectl: Ensure we clear the progress bar
Otherwise we end up half-overwriting the progress bar, which looks buggy
2024-08-30 21:53:14 -04:00
Adrian Vovk
aa2e664e18
sysupdated: Register known error types
This fixes a bug introduced during review of sysupdated. Originally,
we just returned EALREADY verbatim to signify that the target is
already up-to-date. Then we switched this to a proper error
(org.freedesktop.sysupdate1.NoCandidate) during review. But that now
maps to EIO, not EALREADY. Thus, whenever there's nothing to update,
updatectl would report I/O errors to the user, even though nothing
actually went wrong.
2024-08-30 21:43:44 -04:00
Adrian Vovk
6e1992166f
progress-bar: Put a space after the prefix
We always want a space there. So let's just put one in the drawing
routine, and adjust the call cites to avoid adding a second one.
2024-08-30 21:25:37 -04:00
Yu Watanabe
7571cb42a8
Merge pull request #34189 from poettering/cryptenroll-slot-fix
cryptenroll: don't return slot 0 when we have no policy to search for
2024-08-31 04:26:02 +09:00
Daan De Meyer
d850a544bc repart: Keep existing directory timestamps intact when copying
Otherwise, when merging multiple directory trees, the output becomes
unreproducible as the directory timestamps will be changed to the current
time when copying identical directories from the second tree.

We introduce a new copy flag to achieve this behavior.
2024-08-30 15:20:40 +01:00
PavlNekrasov
bd7b6c213b
Use correct error code in log message in pkcs11_token_find_x509_certificate (#34187) 2024-08-30 15:18:56 +01:00
Lennart Poettering
379e088f6f test: when refusing to run slow tests, mention how to run them
Let's be helpful and provide an actionable hint.
2024-08-30 14:17:36 +02:00
Lennart Poettering
43b93a8a26 crypenroll: make slot wiping on pin change a bit more explicit 2024-08-30 14:17:36 +02:00
Lennart Poettering
41bcb93087 cryptenroll: don't return slot 0 when we have no policy to search for
If the policy hash is empty we shouldn't return "0" from
search_policy_hash(), because that is understood as slot index 0, but
that's unlikely to match the policy.

Hence, return -ENOENT instead, indicating that we can't find a matching
slot.
2024-08-30 14:16:39 +02:00
Lennart Poettering
549c1a99d4 cryptenroll: iovec'ify a few more things 2024-08-30 14:15:33 +02:00
Luca Boccassi
c08ffe5b12 mkosi: update debian commit reference
* bb6db3edfe Install new sd-sysupdated files in systemd-container
2024-08-30 11:54:13 +01:00
Daan De Meyer
562881c178 repart: Switch to new mkfs.btrfs subvolume API
In https://github.com/kdave/btrfs-progs/pull/877 the API is changing
to "--subvol <path>:ro,default" so let's adapt our usage to match.

This also adds support for read-only subvolumes.

Fixes #34134
2024-08-30 12:18:10 +02:00
Daan De Meyer
9023266a0e repart: Remove unused Context argument from make_subvolumes_set() 2024-08-30 12:15:36 +02:00
Daan De Meyer
9f482c5a05 repart: Fix memory leak 2024-08-30 12:13:13 +02:00
Daan De Meyer
32b2f4c01e image-policy: Fix size assertion
We're going to write a null pointer to l[m] so we need to make sure
m is smaller than the size of the array, not m + 1.
2024-08-30 12:13:05 +02:00
Daan De Meyer
11781f37ac image-policy: Fix strv size calculation
We want the logarithm of the next power of two, which is the same
as the mask + 1, so add one to the mask to make sure the size is
sufficient to fit all flags.
2024-08-30 12:12:53 +02:00
Lennart Poettering
9407fe6c3d treewide: use sd_json_variant_un{hex|base64}() pervasively
Use these helpers whenever appropriate. Drop separate string checks,
since these helpers already do them anyway.

No actual code change, just a rework to make use of a nice helper we
have already.
2024-08-30 10:35:44 +02:00
Lennart Poettering
38c0086361 update TODO 2024-08-30 10:21:31 +02:00
Yu Watanabe
16d70515e1 hwdb: add entry for Dell AlpsPS/2 ALPS DualPoint TouchPad
Closes #34133.
2024-08-30 09:37:52 +02:00
Daan De Meyer
c5730846fe mkosi: Don't fetch remote if the commit to check out already exists
If the commit we're about to check out already exists in the local
repository, don't fetch from the remote repository.
2024-08-29 19:16:19 +01:00
Filip Lewiński
8c7b140164 hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x dGPU
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2024-08-29 16:32:14 +01:00
Göran Uddeborg
66ccda6cab po: Translated using Weblate (Swedish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-29 15:16:19 +01:00
Yu Watanabe
c5d5d76988 test: add test for GetUnitByPID() D-Bus method
For issue #34104.
2024-08-29 14:16:43 +01:00
Daan De Meyer
43960ff021 core: Fix log message typo 2024-08-29 15:14:09 +02:00
Daan De Meyer
e921a8ad67 mkosi: update fedora commit reference
* a67221c3f0 Always build ukify package
* abb115a905 Do not use patch to modify systemd-user pam config file
* 196ec98228 Drop %upstream conditionalization for patches
2024-08-29 15:13:39 +02:00
Luca Boccassi
5162829ec8 core: do BindMount/MountImage operations in async control process
These operations might require slow I/O, and thus might block PID1's main
loop for an undeterminated amount of time. Instead of performing them
inline, fork a worker process and stash away the D-Bus message, and reply
once we get a SIGCHILD indicating they have completed. That way we don't
break compatibility and callers can continue to rely on the fact that when
they get the method reply the operation either succeeded or failed.

To keep backward compatibility, unlike reload control processes, these
are ran inside init.scope and not the target cgroup. Unlike ExecReload,
this is under our control and is not defined by the unit. This is necessary
because previously the operation also wasn't ran from the target cgroup,
so suddenly forking a copy-on-write copy of pid1 into the target cgroup
will make memory usage spike, and if there is a MemoryMax= or MemoryHigh=
set and the cgroup is already close to the limit, it will cause an OOM
kill, where previously it would have worked fine.
2024-08-29 12:48:55 +01:00
Daan De Meyer
5121f7c45b ukify: Skip test on architectures without UEFI 2024-08-29 13:58:29 +03:00
Luca Boccassi
1e17e48b96 test: mount ld.so.cache in minimal nspawn container if present
In some cases (SUSE Tumbleweed) this is needed as a library (libz) is
not in the default path, so it fails to run.
2024-08-29 07:27:16 +02:00
Yu Watanabe
ee9a70ccc7
Merge pull request #34160 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-08-29 07:54:03 +09:00
Göran Uddeborg
da89bf12c4 po: Translated using Weblate (Swedish)
Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-28 21:48:51 +02:00
Weblate Translation Memory
f6d54c1823 po: Translated using Weblate (Swedish)
Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 89.7% (227 of 253 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-28 21:48:50 +02:00
Daan De Meyer
ffd76bdd97 mkosi: Switch back to src.opensuse.org for opensuse spec
Supposedly they're never going to rewrite their git history again
so let's give src.opensuse.org another try given that code.opensuse.org
is down again.
2024-08-28 20:36:46 +01:00
Daan De Meyer
7560a5393a test: Set show_status=error
The TEST-64-UDEV-STORAGE tests fail before we even start the test.
Let's set show_status=error to get more information when those failures
happen.
2024-08-28 19:20:56 +02:00
Lennart Poettering
313c178b1b user-record: add helper that checks if a user record is root or the nobody user 2024-08-28 18:56:45 +02:00
Luca Boccassi
4b54da2e37
Merge pull request #34142 from DaanDeMeyer/update-distributions
mkosi: Update distribution packaging commits
2024-08-28 17:17:12 +01:00
Lennart Poettering
12e506f437 nspawn: propagate SSH authorized keys when binding user into contaier via --bind-user=
This means the host user typically can just log into his own account
bound into the container via SSH.
2024-08-28 17:13:48 +01:00
Luca Boccassi
b3014aafb5 TODO: add note about live mounting via pinned namespace fd 2024-08-28 16:57:14 +01:00
Luca Boccassi
ec54029017 mkosi: use util-linux's autologin
login is now from util-linux so credentials are supported.
It also needs to be pulled in as it's Protected: yes rather than
Essential: yes.

Keep the old setting for Ubuntu as that still uses login from shadow.
2024-08-28 16:32:17 +01:00
Daan De Meyer
e885e9defa mkosi: update debian commit reference
* aa17b7ddf9 Fix stage1 build
* 2c13391e33 Update changelog for 256.5-1 release
* 7d13196926 autopkgtest: skip TEST-64-UDEV-STORAGE due to qemu crash
* 47769e8d7c Drop patch merged upstream
*   4e8e9315b5 Update upstream source from tag 'upstream/256.5'
|\
| * 71b885347d New upstream version 256.5
* 89a33e5408 d/e/checkout-upstream: undo quilt patches before switching debian branch
* 3c942ecb0d d/e/checkout-upstream: do not rebase on main when building stable branches
2024-08-28 16:15:42 +02:00
Daan De Meyer
92c22e02c1 mkosi: update fedora commit reference
* 28076e6232 Only make python3-pillow Recommends on Fedora
* a9807c4486 Do not require grubby on CentOS Stream 9
* d38cacfd3a Version 256.5
* 38291e13c1 Disable integration of userdb in sshd
* 53118d2112 Backport patch to only read /proc/cmdline when not in container
* 903e8e0f88 Backport upstream patch to try more initrd variants in 90-loaderentry.install
* b29a66006c Version 256.4
* 1cdae03391 Update tmpfiles --destroy-data patch
* 4fd4ef72a6 Upload sources
* 3c3772150d Version 256.3
2024-08-28 16:15:42 +02:00
Daan De Meyer
051fddfc41 mkosi: update opensuse commit reference
* 2866762da8 Update systemd to version 256.4 / rev 429 via SR 1192932
2024-08-28 16:15:42 +02:00
Daan De Meyer
caf984def5 mkosi: update arch commit reference
* ea5f086275 handle uncommon license
* 43e43faab8 upgpkg: 256.5-1: new upstream release
* 7f4443062f Provide /etc/cryptsetup-keys.d/
* 262a14b8e5 upgpkg: 256.4-1: new upstream release
* 1aff4eb5f6 upgpkg: 256.3-1: new upstream release
2024-08-28 16:15:42 +02:00
Daan De Meyer
3e09a3eac2 mkosi: Include noarch in dnf repoquery architectures
ukify is noarch so we should include noarch to get all results.
2024-08-28 16:15:42 +02:00
Daan De Meyer
71acb00c28 mkosi: Always specify _sourcedir as an absolute path
A relative path is not supported by rpm so let's make sure we specify
it as an absolute path.
2024-08-28 16:15:42 +02:00
Daan De Meyer
00a2a67d81 mkosi: Don't apply distribution specific patches
rpm upstream is going to imply --noprep when running with --build-in-place so let's do the same on older
versions of rpm (e0925ad6e3)

Also, to keep things consistent between distros, run with --noprepare
on Arch Linux as well (we already skip patches on Debian/Ubuntu).

To keep things working on Arch, we apply the one downstream patch
manually ourselves.
2024-08-28 16:14:05 +02:00
Daan De Meyer
dbff64ddf0 mkosi: Update to latest 2024-08-28 15:36:52 +02:00