1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00
Commit Graph

71508 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
31e70e88cd timedatectl: add -P 2024-03-04 16:12:21 +04:00
Lennart Poettering
7addc530ac resolved: explicitly disconnect all left-over TCP connections when coming back from suspend
Fixes:  #13730 (original reporter's log shows the TCP connection needed
to time out first)
2024-03-02 18:05:01 +00:00
Piotr Drąg
4c3cffff7a po: add false positives to POTFILES.skip
Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect these files as containing translations. Avoid this
behavior by putting the files in POTFILES.skip.
2024-03-02 17:28:54 +01:00
Luca Boccassi
e440426221
Merge pull request #31587 from yuwata/udev-rps-follow-ups
udev: follow-ups for RPS setting
2024-03-02 11:47:44 +00:00
Yu Watanabe
1f901c2453
Merge pull request #31586 from YHNdnzj/progress-bar-minor-followup
shared/pretty-print: minor follow-up for progress bar
2024-03-02 15:31:29 +09:00
Yu Watanabe
aa384c6430
Merge pull request #31583 from yuwata/sd-lldp-json-follow-up
sd-lldp: fix assignment of capabilities in JSON output
2024-03-02 15:31:00 +09:00
Yu Watanabe
4b35dab86a test-network: wait for the interface being processed by udevd
Otherwise, even if the interface is available, the requested config may
not be applied to the interface yet.

This also merges multiple tests for RPS setting. Hopefully the
performance of the test is improved.
2024-03-02 14:50:40 +09:00
Yu Watanabe
a39a2a8121 test-network: introduce udevadm() and friends 2024-03-02 14:50:40 +09:00
Yu Watanabe
7e66e053d4 udev/net: fix ReceivePacketSteeringCPUMask=disable assignment
Follow-up for 0f30bf5886.

If 'mask' is newly allocated, previously the value was ignored.
2024-03-02 14:50:39 +09:00
Yu Watanabe
eca7a4886d fuzz-lldp-rx: fuzz lldp_rx_build_neighbors_json()
Addresses https://github.com/systemd/systemd/pull/31583#discussion_r1509882453.
2024-03-02 13:52:28 +09:00
Yu Watanabe
0f805b4661 test-network: check enabled capabilities in LLDP neighbors
Addresses https://github.com/systemd/systemd/pull/31583#discussion_r1509880349.
2024-03-02 13:52:28 +09:00
Yu Watanabe
e2290a7775 sd-lldp: fix assignment of capabilities in JSON output
Follow-up for 329146a9ac.
2024-03-02 13:52:28 +09:00
Mike Yuan
c66da2d9ef
shared/pretty-print: use strrepa where appropriate 2024-03-02 11:50:34 +08:00
Mike Yuan
6283f873fb
shared/pretty-print: print color sequence only when needed
Follow-up for 71cb203a6e
2024-03-02 11:50:34 +08:00
Yu Watanabe
5bafe8d1e7 man: fix typo
Follow-up for 419b25ddca.
2024-03-02 11:57:39 +09:00
Lennart Poettering
e28b70a527 hashmap: reorder fields to pack structure better
When building with ENABLE_DEBUG_HASHMAP we can pack the hashmap iterator
structure a bit better.

Fixes: #31558
2024-03-02 11:47:34 +09:00
Lennart Poettering
0068131bf5
Merge pull request #31507 from poettering/import-modernize
importd: various modernizations
2024-03-01 23:42:32 +01:00
Lennart Poettering
28c47e927d
Merge pull request #31571 from poettering/hostnamed-show-more
hostnamectl: show product uuid/hardware serial in regular output, plus various fixes
2024-03-01 23:42:10 +01:00
Lennart Poettering
5db99d6651
Merge pull request #31274 from bluca/measure_engine
repart/measure/ukify: add support for OpenSSL engines/providers
2024-03-01 23:41:25 +01:00
Ronan Pigott
51d056858e resolve: skip IP_UNICAST_IF for local sockets
SO_BINDTODEVICE was used during connect() to fix an issue where
IP_UNICAST_IF was improperly ignored for route lookups made by connect
in linux. This has since been resolved upstream [1][2], but as a result
we must apply the local socket excpetion to IP_UNICAST_IF as well.

The SO_BINDTODEVICE is no longer necessary, but left in place for 5.x
kernels.

[1] https://lore.kernel.org/all/20220829111554.GA1771@debian/
[2] https://lore.kernel.org/all/20221208145437.GA75680@debian/
2024-03-01 22:56:09 +01:00
Lennart Poettering
38ff8b07e3
Merge pull request #31567 from YHNdnzj/service-unused-param
core/service: remove unused function param and minor cleanup
2024-03-01 22:39:27 +01:00
Lennart Poettering
06cce5d40c
Merge pull request #31565 from YHNdnzj/safe_dlclose
dlfcn-util: use safe_dlclose for dlclosep
2024-03-01 22:39:11 +01:00
Lennart Poettering
75c7df05fb hostnamectl: display product uuid + hardware serial in regular status output
hostnamed provides this, hence hostnamectl should show it
2024-03-01 22:37:38 +01:00
Lennart Poettering
171ddae1a1 hostnamed: add explicit BUS_ERROR_NO_HARDWARE_SERIAL error
For the very similar case of the product UUID we have its own error
BUS_ERROR_NO_PRODUCT_UUID if we have no UUID. Let's mirror this for the
hardware serial, and expose the same, to keep things nicely symmteric.
2024-03-01 22:37:38 +01:00
Lennart Poettering
64724e0579 hostnamed: do some validation of the hw serial before we return it
Let's make sure the serial contains not control chars, and is UTF-8
clean. In particular the latter matters as D-Bus shouldn't kick us
from the bus.
2024-03-01 22:37:38 +01:00
Lennart Poettering
cb0734d53f hostnamed: in get_hardware_firmware_data() don't dup a string if we shan't return it 2024-03-01 22:37:38 +01:00
Lennart Poettering
f3525b78af hostnamed: our base indentation is 8 spaces, not 9 spaces
No idea what was going on here...
2024-03-01 22:37:38 +01:00
Lennart Poettering
8157cc0e3e bus-util: add generic parser for extracting id128 values from bus messages 2024-03-01 22:37:38 +01:00
Lennart Poettering
7e9cdafad3 update TODO 2024-03-01 22:29:08 +01:00
Lennart Poettering
befbfca70f test: add integration test for importctl
(these are explicit tests, on top of the existing machinectl tests that
are now chainload importctl)
2024-03-01 22:29:08 +01:00
Lennart Poettering
fd571c9df0 man: document new importctl/importd functionality
This also replaces the Fedora download example with another one from
Ubuntu, since Fedora's images these days no longer qualify as DDIs, they
have no distinctive partition type UUIDs set for multiple of their
partitions, hence the images cannot be booted. A bit sad. Let's provide
a command that just works in its place.
2024-03-01 22:29:07 +01:00
Lennart Poettering
5b7bfe0637 importd: add command to list downloaded images
It's a bit weird we allow importing/pulling/exporting images, but we
have no scheme for showing what#s already downloaded. Hence let's add
this, it's easy to add after all.
2024-03-01 22:25:42 +01:00
Lennart Poettering
5a985dd05a importd: pass log level to invoked child 2024-03-01 22:25:42 +01:00
Lennart Poettering
ed459ec0c0 import: mention explicitly which image directory we operate on
Also, let's move the similar message about sync() mode to more common
code.
2024-03-01 22:25:42 +01:00
Lennart Poettering
d304686ca3 import: downgrade HTTP error code log message levels
Let's downgrade log levels a bit on HTTP error codes. After all we
gracefully handle many of them, and we do generated an extra message for
the ones which are fatal anyway, hence there's no point in emphasizing
the HTTP erro message levels as we currently do.
2024-03-01 22:25:42 +01:00
Lennart Poettering
71cb203a6e importctl: draw a pretty progress bar while downloading
Everybody loves pretty terminal progress bar.
2024-03-01 22:25:42 +01:00
Lennart Poettering
8ce438bb71 machinectl: chainload importctl for relevant verbs
Now that "importctl" exists, let's chainload it from machinectl for the
relevant verbs so that we only have a single implementation of the
logic.
2024-03-01 22:25:42 +01:00
Lennart Poettering
1a176d5bb7 importd: log the import callout that is going to be called 2024-03-01 22:25:42 +01:00
Lennart Poettering
b146afc449 importd: make keeping pristine copy of downloaded images optional
Previously, when downloading an image, importd would first download them
into one image which it would then consider immutable (named after the
originating URL/etag), and then immediately make a copy of it (named
after the client chosen name).

This makes some sense in VM/container cases where the images are
typically mutable, and thus the original downloaded copy is of some
value.

For sysexts/confexts/portable this doesn't make much sense though, as
they are typically immutable. Hence make the concept optional.

This adds --keep-download=yes/no as a new option that controls the
above. Moreover it disables the behaviour for all image classes but
"machine". The behaviour remains enabled for "machine", for compat.
2024-03-01 22:25:42 +01:00
Lennart Poettering
8f20b498bd importd: validate local image names with the right helper
A while back we introduced image_name_is_valid() for validating image
file names. It's more liberal than hostname_is_valid() in many ways (and
allows version suffixes and such). Since importd deals in offline images
(as opposed to machined otherwise which deals in running machines),
let's hence use the right helper to validate the identifiers.
2024-03-01 22:25:42 +01:00
Lennart Poettering
420b8ce798 importlisttransfersxclient 2024-03-01 22:25:42 +01:00
Lennart Poettering
67c7ee11af importctl: add support for selecting image class to download 2024-03-01 22:25:42 +01:00
Lennart Poettering
c3c892b41f importd: tighten checks in fds passed to us 2024-03-01 22:25:42 +01:00
Lennart Poettering
7af5785d77 importd: add support for downloading sysext/confext/portable images too
This adds "Ex" versions of all bus calls import implements, that make
two changes:

1. A "class" parameter is added that allows choosing between
   machine/sysext/confext/portable images to download. Depending on the
   chose class the target directory is selected differently (i.e. not
   just /var/lib/machines/, but alternatively /var/lib/portables/,
   /var/lib/extensions/, /var/lib/confexts/.

2. The boolean flags are replaced by a 64bit flags parameter.
2024-03-01 22:25:42 +01:00
Lennart Poettering
83d7411209 import: merge PullFlags enum into ImportFlags
The two enums are mostly the same, the former is just an extension of
the latter. Let's merge them, to simplify things. This is particularly
useful as we then can reuse this systematically as D-Bus method call
flags too, in a generic fashion that works for both imports and pulls
the same.

Pretty much just renaming of flags.
2024-03-01 22:25:42 +01:00
Lennart Poettering
8229e226fe importctl: port tabular output for format-table.h APIs 2024-03-01 22:25:42 +01:00
Lennart Poettering
663a15e7cc importctl: modernize signal handling 2024-03-01 22:25:42 +01:00
Lennart Poettering
1db33ce50b importctl: add standalone client to importd
This is pretty much a 1:1 copy of the importd specific part of
machinectl.

We turn this into a separate tool, so that we can eventually make the
tool generic to also download other DDIs, not just machine images.
2024-03-01 22:25:42 +01:00
Lennart Poettering
423bba9926 importd: modernize signal handling a bit 2024-03-01 22:25:42 +01:00
Lennart Poettering
b37ec1e7ca importd: trivial modernizations 2024-03-01 22:25:42 +01:00