1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

52731 Commits

Author SHA1 Message Date
Daan De Meyer
e4cdadf3bd sd-bus: Improve (sd-buscntr) error logging
We're only doing one thing in the child process which is connecting
to the D-Bus socket so let's mention that in the error message when
something goes wrong instead of having a generic error message.
2021-08-19 15:47:27 +01:00
Daan De Meyer
405a028e65 sd-bus: Return detailed (sd-buscntr) error from bus_container_connect_socket()
Previously, when the connect() call in (sd-buscntr) failed, we returned
-EPROTO without ever reading the actual errno from the error pipe. To fix
the issue, delay checking the process exit status until after we've read
and processed any error from the error pipe.
2021-08-19 15:47:24 +01:00
Yu Watanabe
0d341eccef udev: make RxChannels= or friends also accept "max"
Follow-up for 406041b7de.

Also, this makes
- the settings accept an empty string,
- if the specified value is too large, also use the advertised maximum
  value.
- mention the range of the value in the man page.
2021-08-18 16:55:03 +02:00
Yu Watanabe
bdbb61f69f tree-wide: fix typo 2021-08-18 13:36:14 +02:00
Luca Boccassi
66e093def8 docs: portable services are no longer in preview
Reword the intro to the document, as portable services are a stable interface
and no longer a preview.
2021-08-18 11:30:53 +02:00
Vladimir Panteleev
e9aee93240 fstab-generator: Respect nofail when ordering 2021-08-18 16:00:49 +09:00
Vladimir Panteleev
ecfcf0244a Fix typo in dbus property name ("OnSuccesJobMode") 2021-08-18 16:00:05 +09:00
Yu Watanabe
21ee8eda50
Merge pull request #20460 from yuwata/udevadm-test-builtin-introduce-action
udevadm: introduce --action option for test-builtin
2021-08-18 15:59:40 +09:00
Daan De Meyer
406041b7de
udev: Support "max" string for BufferSize options (#20458)
"max" indicates the hardware advertised maximum queue buffer size
should be used.

The max sizes can be checked by running `ethtool -g <dev>` (Preset maximums).
Since the buffer sizes can't be set to 0 by users, internally we use 0 to
indicate that the hardware advertised maximum should be used.
2021-08-18 15:59:13 +09:00
Yu Watanabe
91546abf9e
Merge pull request #20456 from tomty89/man
Adding a few notes in the systemd.network man page
2021-08-18 15:58:06 +09:00
Yu Watanabe
c4f7a34756 network: do not assume the highest priority when Priority= is unspecified
Previously, when Priority= is unspecified, networkd configured the rule with
the highest (=0) priority. This commit makes networkd distinguish the case
the setting is unspecified and one explicitly specified as Priority=0.

Note.
1) If the priority is unspecified on configure, then kernel dynamically picks
   a priority for the rule.
2) The new behavior is consistent with 'ip rule' command.

Replaces #15606.
2021-08-18 15:57:45 +09:00
Yu Watanabe
7ce05a8d66 udevadm: introduce -a|--action option for test-builtin command
As net_setup_link builtin requires that a device action is set for the
sd_device object.
2021-08-18 00:08:08 +09:00
Tom Yan
5cf9069f08 man: network: mention that RouteMetric= in [DHCPv4] is also applied to the prefix route 2021-08-17 22:53:49 +08:00
Tom Yan
5ea859ef01 man: network: mention that Promiscuous= can be used to set nopromisc for passthru MACV{LAN,TAP} 2021-08-17 22:53:29 +08:00
Lennart Poettering
f6e40037a0
Merge pull request #20448 from medhefgo/boot
sd-boot: UI improvements
2021-08-17 16:26:25 +02:00
Yu Watanabe
74614801f6 shell-completion: add missing uevent actions for udevadm 2021-08-17 23:22:26 +09:00
Yu Watanabe
6de7fa8759 udevadm: introduce parse_device_action() helper function 2021-08-17 23:22:26 +09:00
Yu Watanabe
d1429d8f78 udevadm: introduce find_device_with_action() helper function 2021-08-17 23:22:26 +09:00
Lennart Poettering
29278aa41d
Merge pull request #20281 from bluca/ext_release_naming
extension-release: allow fallback when image name is mangled after build, improve docs
2021-08-17 16:06:26 +02:00
Luca Boccassi
5d55791e3f docs: document layered images in PORTABLE_SERVICES.md 2021-08-17 13:15:13 +01:00
Luca Boccassi
9c8b6eaa46 man: further document extension-release 2021-08-17 13:15:13 +01:00
Luca Boccassi
9a4b883be2 extension-release: search for other files if expected name not found
In some cases image names are unpredictable - some orchestrators/deployment
tools like to mangle names to suit their internal formats. In these cases,
the requirement that the extension-release file matches exactly the image
name where it's contained cannot work.

Allow falling back to loading the first regular file which name starts with
'extension-release' located in /usr/lib/extension-release.d/ and tagged with
a user.extension-release.strict extended attribute with a true value, if the
one with the expected name cannot be found.
2021-08-17 13:04:44 +01:00
Luca Boccassi
5ce46344fd xattr-util: add fgetxattrat_fake_malloc variant 2021-08-17 13:04:44 +01:00
Jan Janssen
2e65d6103d sd-boot: Draw custom edit cursor
Firmware likes to draw the EFI provided cursor in a weird way that
makes it invisible sometimes. This is even more likely to happen
if unusual colors are picked. It also fails to draw attention to the
user by being very small and not blinking.

Additionally, to make it more clear that we are in edit mode, we
now default to inverting the general default color and use that for
our line edit.

Fixes: #19301
2021-08-17 13:59:13 +02:00
Jan Janssen
e313e934db sd-boot: Add compile-time color support
Fixes: #10139
2021-08-17 13:59:12 +02:00
Jan Janssen
8a8e5666ce sd-boot: Improve key bindings
Making keys case insensitive should help if caps lock is on.
We are not advertising them at runtime or in the manual to
reduce the noise.

This also hides the quit and version commands from the help
string. They are mostly for devs and otherwise have little
to no use to normal users. The latter overlaps with print
status which is still advertised.
2021-08-17 13:57:21 +02:00
Jan Janssen
1ab39cc10e sd-boot: Render title entries centered and not to entire screen width 2021-08-17 13:57:19 +02:00
Jan Janssen
c005f4375e sd-boot: Introduce print_at helper function 2021-08-17 13:53:07 +02:00
Jan Janssen
54af753f3a sd-boot: Fix marking EFI var default entry
Fixes: #18072
2021-08-17 13:49:22 +02:00
Lennart Poettering
7a6abbe937 env-util: add unsetenv_erase() helper
Let's unify how we remove secrets from the env block.
2021-08-17 13:17:44 +02:00
Lennart Poettering
8b474a437c
Merge pull request #20420 from poettering/import-beef-up
import: modernizations, and various additions
2021-08-17 11:53:18 +02:00
Lennart Poettering
1c926126ce import: drop some now unused functions from import-common.c 2021-08-17 10:09:17 +02:00
Lennart Poettering
23851640b8 docs: document how to turn off btrfs quota support in importd
Fixes: #18421 #15903
2021-08-17 10:09:13 +02:00
Lennart Poettering
7ade22c79b import-fs: make various options controllable via cmdline/env var
This basically does what the previous two commits did for systemd-import
+ systemd-pull but for systemd-import-fs.

This commit is a bit simpler though, as a --direct mode doesn't change
that much. It's mostly about not searching for existing, conflicting
images and not much else.
2021-08-17 10:09:09 +02:00
Lennart Poettering
c40d82abf7 pull: add --direct mode + make various eatures optional + explicit checksum verification
This does what the previous commit did for systemd-import the same way
for systemd-pull.

It also adds one more thing: the checksum validation is extended, in
addition of doing SHA256SUMS/gpg verification it is now possible to
immediately specify a hash value on the command line that the download
needs to match. This is particularly useful in --direct mode as we can
download/decompress/unpack arbitrary files and check the hash of the
downloaded file on-the-fly.
2021-08-17 10:09:04 +02:00
Lennart Poettering
d32a5841fb import: add new "--direct" mode + add controls for turning certain features on/off
This reworks/modernizes the tar/raw import logic and adds the following
new features:

- Adds the ability to control btrfs subvol and quota behaviour which was
  previously always on via an env var and cmdline arg

- Adds control whether to sync() stuff after writing it, similar via env
  var + cmdline arg

- Similar, the QCOW2 unpacking logic that was previously the implied
  default may now be controlled via env var + cmdline arg.

- adds a "direct" mode. In this mode, the systemd-import tool can be
  used as a simple tool for decompressing/unpacking/installing arbitrary
  files, without all the additional meta data and auxiliary resources,
  i.e.  outside of the immediate disk image context. Via the new
  --offset= and --size-max= switches the downloaded data can be written
  to specific locations of a file (which is particularly useful to use
  the tool to download fs images and write them to a partition location
  before actually creating the partition).

We'll later use the latter feature for "sysupdate" concept, where images
can be directly be written to partitions. That way the systemd-import
binary will be used as backend for both "systemd-importd" and
"systemd-sysupdate" and share most of the same code.
2021-08-17 10:08:58 +02:00
Lennart Poettering
235be6bcea shared: add generic helper tools for installing files/dir trees
This adds a bit of generic helper tools for installing files/dir trees.
"installing" is supposed to mean the final step when preparing a disk
image or directory tree, where the result is renamed to its final name.
It has some bells and whistles, as it is able to replace existing files
sanely, can fsync() things carefully and can mark things read-only in a
nice way.

This is supposed to be generic, unified code that can be used eventually
for any of our tools that prepare disk images/directory trees, including
importd, nspawn's --template= mechanism, the discover-image.c logic,
and more.
2021-08-17 10:08:48 +02:00
Gustavo Costa
78c23b065f po: Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Gustavo Costa <xfgusta@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt_BR/
Translation: systemd/main
2021-08-17 09:30:29 +02:00
Yu Watanabe
6f795ad2e2
Merge pull request #20450 from yuwata/ethtool-cleanups
ethtool: trivial cleanups
2021-08-17 05:22:40 +09:00
Yu Watanabe
7c58ee5f8c
Merge pull request #20443 from yuwata/network-conf-parser-cleanups
network: conf parser cleanups
2021-08-17 02:42:27 +09:00
Geass-LL
7dbd330c7e unit: coldplug both job and nop_job if possible
Sometimes, both job and nop_job are deserialized. In this case,
if we only cold plug the job, the nop_job will also stuck in the
job list.
2021-08-17 02:41:04 +09:00
Yu Watanabe
aa10fa8d3a
Merge pull request #20442 from yuwata/network-can-introduce-many-settings
network: introduce several CAN interface related settings
2021-08-17 02:40:32 +09:00
Maxime de Roucy
d419ef0243 network: add address label on dhcpv4
Fixes: #13967
2021-08-17 02:40:18 +09:00
Tom Yan
17a6a4ae2e network: allow users to forbid passthru MACVLAN from putting its link into promiscuous mode
While we haven't implemented a key for users to set MACVLAN/MACVTAP flags,
we can at least allow them to make use of the Promiscuous= key of
the corresponding link to set the nopromisc flag.
2021-08-16 17:26:59 +01:00
Yu Watanabe
c2f2250e5c ethtool: make ethtool_set_features() return earlier when nothing is requested 2021-08-17 00:49:01 +09:00
Yu Watanabe
0db68800c7 ethtool: make the size of 'features' array static 2021-08-17 00:48:18 +09:00
Yu Watanabe
80e41a68d6 man: address label can be set only for IPv4 addresses 2021-08-16 22:56:30 +09:00
Jan Janssen
64bb56e58b sd-boot: Allow automatic entries to be default 2021-08-16 15:52:15 +02:00
Jan Janssen
730b719406 sd-boot: Improve selection of initial entries to show 2021-08-16 15:52:09 +02:00
Lennart Poettering
682f952cd7
Merge pull request #20438 from medhefgo/boot
sd-boot: Better self-detection and windows loader title
2021-08-16 15:35:08 +02:00