Commit graph

42889 commits

Author SHA1 Message Date
Yu Watanabe b683b82fe7 busctl: introduce --full command line option 2020-01-10 12:19:47 +09:00
Yu Watanabe 6c64cf8859 bash-completion: networkctl: do not show ellipsized link name 2020-01-10 12:13:12 +09:00
Yu Watanabe a42d949080 networkctl: set table width 0 when --full is specified 2020-01-10 12:12:00 +09:00
Yu Watanabe a362c069a9 systemd-mount: add --full command line option 2020-01-10 12:07:28 +09:00
Lennart Poettering bcf00b6c0a format-table: allow forcing arbitrary width tables
Useful for implementing systemctl's --full.

See #14470
2020-01-10 11:53:28 +09:00
Anita Zhang 79bb680cbf
Merge pull request #14527 from poettering/socket-state-fix
core: propagate service state to socket in more load states
2020-01-09 17:10:48 -08:00
HATAYAMA Daisuke b63c88b627 man: describe "symlink" and "systemctl link" explicitly in UNIT FILE LOAD PATH
There are sometimes users who put unit files in a location that is inaccessible
when systemd starts although they are not found and thus not started because
the corresponding mount units have not activated yet.

There is already a warning for such issue in man 8 systemctl:

     link PATH...
         ...<snip>...
         The file system where
         the linked unit files are located must be accessible
         when systemd is started (e.g. anything underneath /home
         or /var is not allowed, unless those directories are
         located on the root file system).

However, it looks that it's difficult to find the warning because introductory
users typically doesn't know systemctl link.

Although there is a description in UNIT FILE LOAD PATH pointing to systemctl
link, symlink is now not explicitly mentioned there and thus users doesn't
easily get aware of they should read it.

To deal with this, let's describe "symlink" and "systemctl link" more
explicitly in UNIT FILE LOAD PATH.
2020-01-09 18:52:13 +01:00
Lennart Poettering 8ac7339648
Merge pull request #14525 from yuwata/mount-use-format-table
systemd-mount: use format-table.[ch]
2020-01-09 15:47:24 +01:00
Yu Watanabe 0ca1926ec3 bash-completion: networkctl: support --full and --lines 2020-01-09 15:43:18 +01:00
Lennart Poettering 404308486a core: be more restrictive on the dependency types we allow to be created transiently
We should allow the ones that the [Unit] section of regular unit files
may accet, but no other, in particular not the internal deps we
synthesize as reverse of explicitly configured ones, such was WantedBy=.

Fixes: #14251
2020-01-09 15:42:34 +01:00
Yu Watanabe cf57766d79 timedatectl: use format-table.[ch] 2020-01-09 15:40:50 +01:00
Yu Watanabe a5279634c0 systemd-mount: add --no-legend command line option 2020-01-09 20:16:03 +09:00
Yu Watanabe 6ae6ea55d8 systemd-mount: use format-table.[ch] 2020-01-09 20:16:03 +09:00
Yu Watanabe f93d876c80 format-table: introduce TABLE_PATH 2020-01-09 20:16:03 +09:00
Lennart Poettering 4c2ef32767 core: propagate service state to socket in more load states
It makes sense to filter state changes for some load states that
shouldn't happen, but the common cases should be accepted, because they
might happen during runtime when "systemctl daemon-reload" is issued and
unit files changed state in between. Otherwise we lose events.

Fixes: #4708
2020-01-09 11:53:26 +01:00
Thomas Schmitt 19212f2781 udev: don't import parent ID_FS_ data on partitions
When probing partitions, we inherit important information from the parent
disk device such as ID_MODEL, and usage of such properties is seen to
be acceptable and well established.

However, we need to exclude filesystem information from the properties
that get inherited. Information about the device content should not be
passed on in this way.

For example, Linux distro install media commonly uses an ISO filesystem
plus a partition table. The ISO filesystem is detected on the main disk
device, but we should not pass down those details to the partitions,
some or all of which may be pointing at storage areas completely distinct
from the ISO filesystem.

This is particularly problematic when adding new partitions on media
set up in this way (since the new partitions are then reported to contain
the parent device's ISO filesystem), or when dealing with more unusual
hybrid ISO layouts. The inaccuracy of information here inversely affects
users of blkid and udev's persistent storage symlinks.

Exclude ID_FS_* properties from the inheritance chain to avoid these
problems.

Fixes: #14408
2020-01-09 11:20:55 +01:00
Yu Watanabe 125c7814fa
Merge pull request #14523 from keszybz/refactorings
Refactorings inspired by recent pull requests
2020-01-09 12:50:11 +09:00
Zbigniew Jędrzejewski-Szmek b44d87e200 sd-event: use _cleanup_ in one more place 2020-01-08 17:15:54 +01:00
Zbigniew Jędrzejewski-Szmek 1eac79486e sd-event: use RAII for struct epoll_event
Inspired by #14353.
2020-01-08 17:15:46 +01:00
Zbigniew Jędrzejewski-Szmek 0475919b56 network: use automatic stack allocation and structured init 2020-01-08 17:15:19 +01:00
Zbigniew Jędrzejewski-Szmek 6666c4faee network: do not require ethtool_get_permanent_macaddr() to get an fd 2020-01-08 17:14:56 +01:00
Lennart Poettering 6a6078a585 test: minor typo fix
As pointed out on: https://github.com/systemd/systemd/pull/14465#discussion_r364152064
2020-01-08 14:50:30 +00:00
Lennart Poettering 0aa9bffe10
Merge pull request #14448 from yuwata/network-permanent-mac-address
network, udev: support permanent mac address
2020-01-08 15:36:27 +01:00
Lennart Poettering 3bfcfcf942
Merge pull request #14518 from keszybz/interface-text
doc: tweak grammar in CONTAINER_INTERFACE description
2020-01-08 14:26:33 +01:00
Lennart Poettering a1edbc5118
Merge pull request #14511 from keszybz/sleep-check-rework
Sleep check rework
2020-01-08 14:26:17 +01:00
Lennart Poettering 48dfa8b0e1
Merge pull request #14512 from poettering/root-image-devices
Make RootImage= work reliable with DeviceAllow= in the mix
2020-01-08 12:18:38 +01:00
Frantisek Sumsal 514793658c test: pin meson to 0.52.1 for fuzzit/fuzzbuzz
Latest meson doesn't work with older python 3.5, which is present on
Ubuntu 16.04. Let's pin in to the latest working version (0.52.1) until
we properly bump all necessary Ubuntu images to 18.04.

See: https://github.com/mesonbuild/meson/issues/6427
2020-01-08 13:56:30 +03:00
Zbigniew Jędrzejewski-Szmek 64be35ab02 network: rename *fd to *ethtool_fd 2020-01-08 11:55:07 +01:00
Zbigniew Jędrzejewski-Szmek d9b204544b man: use xi:include to avoid duplication
... and fix some unwarranted discrepancies between the two man pages.
2020-01-08 11:43:09 +01:00
Zbigniew Jędrzejewski-Szmek 06ae8800d0
Merge pull request #14465 from poettering/setprio-rework
When Nice= is used, clamp to RLIMIT_NICE
2020-01-08 11:06:46 +01:00
Zbigniew Jędrzejewski-Szmek 629548c405
Merge pull request #14488 from yuwata/networkctl-show-logs
networkctl: status command also shows logs of networkd
2020-01-08 10:49:39 +01:00
Zbigniew Jędrzejewski-Szmek 9552209292 man: fix option name 2020-01-08 10:39:44 +01:00
Zbigniew Jędrzejewski-Szmek d2e825b4ab doc: tweak grammar in CONTAINER_INTERFACE description
The only non-stylistic change is to replace descriptions of how we are
encouraging people to use PrivateTmp= and such, because now they are widely
used.
2020-01-08 10:29:10 +01:00
Zbigniew Jędrzejewski-Szmek af6a2a1e57
Merge pull request #14494 from poettering/container-interface
Let's import the container interface description text from the fdo wiki
2020-01-08 09:58:57 +01:00
Yu Watanabe caa8538a22 networkctl: show permanent mac address if it is not used now 2020-01-08 17:54:59 +09:00
Yu Watanabe 4bb7cc8287 network, udev: introduce PermanentMACAddress= setting in [Match] section
Closes #13983.
2020-01-08 17:54:54 +09:00
ezst036 95f2b4dd23 Support Plugable UD-PRO8 dock
Add support for Plugable Pro8 docking station for auto-configuring seat
2020-01-08 09:54:25 +01:00
Yu Watanabe 79b4428a7d ethtool: introduce ethtool_get_permanent_macaddr()
Will be used in later commits.
2020-01-08 17:51:56 +09:00
Lennart Poettering 4f0840669e gpt-auto: don't assume XBOOTLDR is vfat
Let's not assume "umask=" is a valid mount option for XBOOTLDR
partitions unconditionally.

Fixes: #14165
2020-01-08 09:51:42 +01:00
Robert Scheck 5ac8b50d58 network, meson: allow statically linked build
Build option "link-networkd-shared" to build a statically linked
systemd-networkd by using

  -Dlink-udev-shared=false -Dlink-networkd-shared=false

on systems with full systemd stack except systemd-networkd, such
as RHEL/CentOS 8.
2020-01-08 09:50:32 +01:00
Zbigniew Jędrzejewski-Szmek 31ffbfd101
Merge pull request #14510 from poettering/net-naming-scheme-fixlets
some net naming scheme documentation fixes
2020-01-08 09:46:49 +01:00
Daniel Shahaf 356873ddec zsh: Complete systemctl subcommands in separate tags
Fixes #14422
2020-01-08 09:43:01 +01:00
Zbigniew Jędrzejewski-Szmek 8f817cb888 shared/sleep-config: do not ignore resume_offset when resume not set
This is most likely a user error, let's make it easier to diagnose.
2020-01-08 08:07:14 +01:00
Zbigniew Jędrzejewski-Szmek 8efc2c1608 shared/sleep-config: make swap detection stricter again
To make this easier to understand, let's always log (at debug level)
when we accept or reject each device:
/swapfile: detection of swap file offset on Btrfs is not supported
/swapfile: is a candidate device.
/dev/zram0: ignoring zram swap
/dev/vdb: ignoring device with lower priority
/dev/vdc: ignoring device with lower usable space
...

If we know that hibernation will fail, refuse. This includes cases where
/sys/power/resume is set and doesn't match any device, or
/sys/power/resume_offset is set and we're not on btrfs and it doesn't match.
If /sys/power/resume is not set at all, we still accept the device with the
highest priority (see 6d176522f5 and
88bc86fcf8)

Tested cases:
1. no swap active → refuse
2. just zram swap active → refuse
3. swapfile on btrfs with /sys/power/resume{,_offset} set → OK
4. swapfile on btrfs with /sys/power/resume set, offset not set → refuse
5. swapfile on btrfs with /sys/power/resume set to nonexistent device, offset set → refuse
6. /sys/power/resume not set, offset set, candidate exists → OK (*)
7. /sys/power/resume not set, offset not set, candidate exists → OK

(*) I think this should fail, but I'm leaving that for the next commit.
2020-01-08 08:07:14 +01:00
Chris Down bbfd9f513b
Merge pull request #14423 from danielshahaf/zsh-add-missing-completions
zsh: Add missing completions
2020-01-07 19:34:55 +00:00
Lennart Poettering 4353974d75 boot: fix osrel parser
let's check VERSION instead of VERSION_ID where appropriate.

Fixes: #14493
2020-01-07 19:32:14 +00:00
Anita Zhang ffe61e19cb
Merge pull request #14472 from poettering/test-43-fixes
Various robustness fixes for TEST-43-PRIVATEUSER-UNPRIV
2020-01-07 10:53:13 -08:00
Lennart Poettering 65ad4ad89d
Merge pull request #14499 from yuwata/network-gateway-dhcp
network: static route via DHCP gateway
2020-01-07 19:17:51 +01:00
Lennart Poettering 3a827125e7 man: stop recommending modprobe -abq in ExecStartPre= 2020-01-07 19:00:56 +01:00
Lennart Poettering d5016c21d7 units: tweaks to modprobe@.service
Let's use uppercase wording in the description string, like we usually
do.

Let's allow using this service in early boot.

If it's pulled into the initial transaction it's better to finish
loading this before sysinit.target.

Don't bother with this in containers that lack CAP_SYS_MODULE
2020-01-07 18:54:24 +01:00