systemd/.git
5 years agotest: ignore IAB capabilities in `test-execute`
Frantisek Sumsal [Mon, 9 Mar 2020 10:00:58 +0000 (11:00 +0100)]
test: ignore IAB capabilities in `test-execute`

libcap v2.33 introduces a new capability set called IAB[0] which is shown
in the output of `capsh --print` and interferes with the test checks. Let's
drop the IAB set from the output, for now, to mitigate this.

This could be (and probably should be) replaced in the future by the
newly introduced testing options[1][2] in libcap v2.32, namely:
    --has-p=xxx
    --has-i=xxx
    --has-a=xxx

but this needs to wait until the respective libcap version gets a wider
adoption. Until then, let's stick with the relatively ugly sed.

Fixes: #15046

[0] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=943b011b5e53624eb9cab4e96c1985326e077cdd
[1] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=588d0439cb6495b03f0ab9f213f0b6b339e7d4b7
[2] https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=e7709bbc1c4712f2ddfc6e6f42892928a8a03782

(cherry picked from commit e9cdcbed77971da3cb0b98b3eb91081142c91eb7)

5 years agotest: add a test case for migrating DynamicUser=yes to no
Yu Watanabe [Fri, 6 Mar 2020 08:34:55 +0000 (17:34 +0900)]
test: add a test case for migrating DynamicUser=yes to no

(cherry picked from commit abaaa79b22f48dac0b45737fcef730fc3471384c)

5 years agoexecute: Fix migration from DynamicUser=yes to no
Yu Watanabe [Fri, 6 Mar 2020 06:56:28 +0000 (15:56 +0900)]
execute: Fix migration from DynamicUser=yes to no

Closes #12131.

(cherry picked from commit 578dc69f2a60d6282acc2d06ce8a3bf8a9d8ada0)

5 years agohomed: replace "home directory" with "home area" in a few places
Zbigniew Jędrzejewski-Szmek [Wed, 11 Mar 2020 12:07:10 +0000 (13:07 +0100)]
homed: replace "home directory" with "home area" in a few places

(cherry picked from commit b5947b5b100f694c93857a82018fb0656d08be34)

5 years agoshared/ask-password-api: do not show hint on echo
Christian Hesse [Wed, 11 Mar 2020 19:39:07 +0000 (20:39 +0100)]
shared/ask-password-api: do not show hint on echo

Giving --echo to systemd-ask-password allows to echo the user input instead
of masking it. This is useful when querying for usernames or similar.

Showing "(press TAB for no echo)" does not make sense there, so do not.
Note that pressing TAB or ESC still disables echo.

(cherry picked from commit ddee0e815ed5500722019bcb807957ea6846212d)

5 years agoanalyze: fix table time output v245.1
Haochen Tong [Mon, 9 Mar 2020 09:43:09 +0000 (10:43 +0100)]
analyze: fix table time output

(cherry picked from commit 47cc458e97a3825d57462bad2ee854903364512e)

5 years agoSupport compiling with clang and gnu11 standard
Denis Pronin [Sun, 8 Mar 2020 20:57:07 +0000 (23:57 +0300)]
Support compiling with clang and gnu11 standard

Signed-off-by: Denis Pronin <dannftk@yandex.ru>
(cherry picked from commit 36e0d89a88c51ba879a2d7e2f90ea9b38333e2c0)

5 years agoTypo fix
bemarek [Sun, 8 Mar 2020 21:39:01 +0000 (22:39 +0100)]
Typo fix

(cherry picked from commit 1cee1c52833fb6e3829e510109404852a17e5bdd)

5 years agoUpdate Croatian translation (#15042)
gogogogi [Sun, 8 Mar 2020 21:06:12 +0000 (22:06 +0100)]
Update Croatian translation (#15042)

(cherry picked from commit 51915ca447027249b6decb8a3333ed388fdfcca7)

5 years agoboot: Ensure ARM UEFI binary does not contain FP/SIMD instructions
James T. Lee [Sat, 7 Mar 2020 23:05:34 +0000 (18:05 -0500)]
boot: Ensure ARM UEFI binary does not contain FP/SIMD instructions

ARM toolchains will sometimes optimize otherwise floating-point-free
code with floating point and SIMD instructions.  This was happening with
systemd-bootarm.efi and it was causing U-Boot to crash and reset the
CPU.  U-Boot does not support the ARM VFP floating point coprocessor,
which is an optional piece of hardware anyway [1].

Ensure the compiler does not generate FP/SIMD instructions by supplying
the `-mgeneral-regs-only` option when building for ARM [2].

The other option you often see to solve these problems is
`-msoft-float`, but that changes the ABI and prevents linking with
libgnuefi.

[1] https://lists.denx.de/pipermail/u-boot/2011-February/087736.html
[2] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mgeneral-regs-only-1

(cherry picked from commit 1ad6056239b70ce69ea70108cf4e49a05a9c2a1d)

5 years agocore: Fix resolution of nested DM devices for cgroups
Benjamin Berg [Thu, 5 Mar 2020 10:35:45 +0000 (11:35 +0100)]
core: Fix resolution of nested DM devices for cgroups

When using the cgroups IO controller, the device that is controlled
should always be the toplevel block device. This did not get resolved
correctly for an LVM volume inside a LUKS device, because the code would
only resolve one level of indirection.

Fix this by recursively looking up the originating block device for DM
devices.

Resolves: #15008

5 years agoFix typo on initrd-root-device.target
antznin [Fri, 6 Mar 2020 12:51:28 +0000 (13:51 +0100)]
Fix typo on initrd-root-device.target

5 years agoMerge pull request #15034 from keszybz/hwdb-update v245
Zbigniew Jędrzejewski-Szmek [Fri, 6 Mar 2020 12:38:52 +0000 (13:38 +0100)]
Merge pull request #15034 from keszybz/hwdb-update

5 years agoNEWS: final contributor update for v245
Zbigniew Jędrzejewski-Szmek [Fri, 6 Mar 2020 12:25:21 +0000 (13:25 +0100)]
NEWS: final contributor update for v245

5 years agoMerge pull request #15022 from keszybz/make-units-remain-after-exit
Yu Watanabe [Fri, 6 Mar 2020 12:14:36 +0000 (21:14 +0900)]
Merge pull request #15022 from keszybz/make-units-remain-after-exit

Make units remain after exit

5 years agohwdb: update for v245
Zbigniew Jędrzejewski-Szmek [Fri, 6 Mar 2020 11:41:29 +0000 (12:41 +0100)]
hwdb: update for v245

5 years agounits: skip modprobe@.service if the unit appears to be already loaded
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 06:20:49 +0000 (07:20 +0100)]
units: skip modprobe@.service if the unit appears to be already loaded

Possible alternative to #14819.

For me, setting RemainAfterExit=yes would be OK, but if people think that it
might cause issues, then this could be a reasonable alternative that still
let's us skip the invocation of the separate binary.

5 years agotreewide: more portable bash shebangs
Jörg Thalheim [Wed, 4 Mar 2020 09:35:06 +0000 (09:35 +0000)]
treewide: more portable bash shebangs

As in 2a5fcfae024ffc370bb780572279f45a1da3f946
and in 3e67e5c9928f8b1e1c5a63def88d53ed1fed12eb
using /usr/bin/env allows bash to be looked up in PATH
rather than being hard-coded.

As with the previous changes the same arguments apply
- distributions have scripts to rewrite shebangs on installation and
  they know what locations to rely on.
- For tests/compilation we should rather rely on the user to have setup
  there PATH correctly.

In particular this makes testing from git easier on NixOS where do not provide
/bin/bash to improve compose-ability.

5 years agoUse Finished instead of Started for Type=oneshot services (#14851)
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 16:24:19 +0000 (17:24 +0100)]
Use Finished instead of Started for Type=oneshot services (#14851)

UnitStatusMessageFormats.finished_job, if present,
will be called with the same arguments as
job_get_done_status_message_format() to provide a format string
appropriate for the context

This commit replaces "Started" with "Finished" for started oneshot
units, as mentioned in the referenced issue

Closes #2458.

5 years agounits: make systemd-network-generator.service stay around
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 07:08:31 +0000 (08:08 +0100)]
units: make systemd-network-generator.service stay around

Once done, its done, and shouldn't be run again.

5 years agoMerge pull request #15013 from systemd/systemctl-list-dependencies
Yu Watanabe [Thu, 5 Mar 2020 11:54:58 +0000 (20:54 +0900)]
Merge pull request #15013 from systemd/systemctl-list-dependencies

systemctl list-dependencies: fix duplicate output and take multiple arguments

5 years agoMerge pull request #15023 from keszybz/network-generator-man
Yu Watanabe [Thu, 5 Mar 2020 11:54:32 +0000 (20:54 +0900)]
Merge pull request #15023 from keszybz/network-generator-man

Man page for systemd-network-generator

5 years agosystemctl: make list-dependencies take multiple arguments
Zbigniew Jędrzejewski-Szmek [Wed, 4 Mar 2020 08:55:29 +0000 (09:55 +0100)]
systemctl: make list-dependencies take multiple arguments

Other similar commands do, no reason not to do this here too.

5 years agoman: mention networkctl in the networkd man page
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 07:20:31 +0000 (08:20 +0100)]
man: mention networkctl in the networkd man page

5 years agoman: add systemd-network-generator.service(8)
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 07:05:24 +0000 (08:05 +0100)]
man: add systemd-network-generator.service(8)

It's a bit bare-bones, but it should be enough to point the reader in the right
direction.

5 years agounits: restore RemainAfterExit=yes in systemd-vconsole-setup.service
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 06:11:09 +0000 (07:11 +0100)]
units: restore RemainAfterExit=yes in systemd-vconsole-setup.service

This reverts the second part of 8125e8d38e3aa099c7dce8b0161997b8842aebdc.
The first part was reverted in 750e550eba362096d56a35104c6a32631aa67b8e.
The problem starts when s-v-s.s is pulled in by something that is then pulled
in by sysinit.target. Every time a unit is started, systemd recursively checks
all dependencies, and since sysinit.target is pull in by almost anything, we'll
start s-v-s.s over and over. In particular, plymouth-start.service currently
has Wants=s-v-s.s and After=s-v-s.s.

5 years agopid1: remove unnecessary terminator
Zbigniew Jędrzejewski-Szmek [Thu, 5 Mar 2020 07:06:43 +0000 (08:06 +0100)]
pid1: remove unnecessary terminator

We specify the number of items as the first argument already.

5 years agoman: update list of supported controllers
Anita Zhang [Thu, 5 Mar 2020 01:31:36 +0000 (17:31 -0800)]
man: update list of supported controllers

5 years agounits: do not ignore return value from systemd --user
Zbigniew Jędrzejewski-Szmek [Wed, 4 Mar 2020 13:21:37 +0000 (14:21 +0100)]
units: do not ignore return value from systemd --user

This minus has been there since the unit was added in
d42d27ead91e470cb12986d928441e56c0f543ca. I think the idea was not cause things
to fail if the user instance doesn't work. But ignoring the return value
doesn't seem to be the right way to approach the problem. In particular, if
the program fails to run, we'll get a bogus fail state, see
https://bugzilla.redhat.com/show_bug.cgi?id=1727895#c1:

with the minus:
$ systemctl start user@1002
Job for user@1002.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status user@1002.service" and "journalctl -xe" for details.

without the minus:
$ systemctl start user@1002
Job for user@1002.service failed because the control process exited with error code.
See "systemctl status user@1002.service" and "journalctl -xe" for details.

5 years agopid1, nspawn: voidify loopback_setup()
Yu Watanabe [Wed, 4 Mar 2020 12:20:31 +0000 (21:20 +0900)]
pid1, nspawn: voidify loopback_setup()

5 years agotimesync, meson: allow statically linked build
Robert Scheck [Sat, 8 Feb 2020 13:02:09 +0000 (14:02 +0100)]
timesync, meson: allow statically linked build

Build option "link-timesyncd-shared" to build a statically linked
systemd-timesyncd by using

  -Dlink-udev-shared=false -Dlink-timesyncd-shared=false

on systems with full systemd stack except systemd-timesyncd, such
as RHEL/CentOS 8.

5 years agosystemctl: do not print items twice in list-dependencies
Zbigniew Jędrzejewski-Szmek [Wed, 4 Mar 2020 08:33:12 +0000 (09:33 +0100)]
systemctl: do not print items twice in list-dependencies

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1807485.

5 years agomake namespace_flags_to_string() not return empty string
Yu Watanabe [Tue, 3 Mar 2020 15:52:40 +0000 (00:52 +0900)]
make namespace_flags_to_string() not return empty string

This improves the following debug log.

Before:
systemd[1162]: Restricting namespace to: .

After:
systemd[1162]: Restricting namespace to: n/a.

5 years agoMerge pull request #15009 from keszybz/version-and-doc-updates
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 19:29:12 +0000 (20:29 +0100)]
Merge pull request #15009 from keszybz/version-and-doc-updates

Version and doc updates

5 years agoMerge pull request #15002 from keszybz/sysusers-no-proc
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 19:28:02 +0000 (20:28 +0100)]
Merge pull request #15002 from keszybz/sysusers-no-proc

Make systemd-sysusers work if /proc is unavailable

5 years agolgtm: drop the TMPDIR/meson workaround
Frantisek Sumsal [Tue, 3 Mar 2020 15:40:48 +0000 (16:40 +0100)]
lgtm: drop the TMPDIR/meson workaround

The underlying issue seems to be fixed, so let's drop the now obsolete
workarounds.

Introduced in 65be7042a876ffe186a42ced04cde60ed81d3136

5 years agoman: document that .link/.network/.netdev files have the usual ini syntax
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 18:08:26 +0000 (19:08 +0100)]
man: document that .link/.network/.netdev files have the usual ini syntax

Fixes #1266.

5 years agodocs: add .link/.network/.netdev files to interface stability chart
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 17:42:22 +0000 (18:42 +0100)]
docs: add .link/.network/.netdev files to interface stability chart

Fixes #9850.

5 years agoman: document the default value for IPv6AcceptRA=
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 17:36:03 +0000 (18:36 +0100)]
man: document the default value for IPv6AcceptRA=

Fixes #14121.

5 years agoman: specify that Domains= is a space-separated list
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 17:03:53 +0000 (18:03 +0100)]
man: specify that Domains= is a space-separated list

Fixes #14998.

5 years agohwdb: add corrections for Olimex Teres-I to keyboard hwdb
Daniel Lublin [Tue, 3 Mar 2020 14:59:43 +0000 (15:59 +0100)]
hwdb: add corrections for Olimex Teres-I to keyboard hwdb

The firmware of the Olimex Teres-I (a DIY laptop kit) seems to have wrong
scancodes.

Fixes #15003.

5 years agotree-wide: fix spelling of lookup and setup verbs
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 14:00:53 +0000 (15:00 +0100)]
tree-wide: fix spelling of lookup and setup verbs

"set up" and "look up" are the verbs, "setup" and "lookup" are the nouns.

5 years agotree-wide: drop printk.devkmsg=on setting in various places
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 13:57:03 +0000 (14:57 +0100)]
tree-wide: drop printk.devkmsg=on setting in various places

Since 6123dfaa72 this should not be necessary anymore.

5 years agoman,mkosi: use glibc-minimal-langpack for Fedora
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 13:50:58 +0000 (14:50 +0100)]
man,mkosi: use glibc-minimal-langpack for Fedora

This saves ~24MB of space, see
https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot.

5 years agoman: bump fedora versions
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 13:48:54 +0000 (14:48 +0100)]
man: bump fedora versions

5 years agoMerge pull request #14874 from bluca/portable_detach_now_block
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 13:40:12 +0000 (14:40 +0100)]
Merge pull request #14874 from bluca/portable_detach_now_block

portablectl: block when stopping a unit on detach (--now)

5 years agohwdb: 60-sensor.hwdb: Add proximity sensor udev property (#14845)
Guido Günther [Tue, 3 Mar 2020 13:40:00 +0000 (14:40 +0100)]
hwdb: 60-sensor.hwdb: Add proximity sensor udev property (#14845)

Devices with proximity sensors can specify a near level that
indicates when an object is considered close to the device.

5 years agoselinux: check return value of string_to_security_class()
Christian Göttsche [Mon, 2 Mar 2020 16:53:20 +0000 (17:53 +0100)]
selinux: check return value of string_to_security_class()

This should never happen, but better safe than sorry.

5 years agodrop unused translations
Vladimir Yerilov [Tue, 3 Mar 2020 10:45:43 +0000 (20:45 +1000)]
drop unused translations

5 years agoupdate Russian translation
Vladimir Yerilov [Tue, 3 Mar 2020 09:23:09 +0000 (19:23 +1000)]
update Russian translation

5 years agosysusers: do not require /proc to be mounted
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 10:58:07 +0000 (11:58 +0100)]
sysusers: do not require /proc to be mounted

We're operating on known paths in root-owned directories here, so the detour
through toctou-safe methods that require /proc to be mounted is not necessary.
Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1807768.

5 years agoNEWS: Use correct tense in v245 entry
Paul Menzel [Tue, 3 Mar 2020 11:19:41 +0000 (12:19 +0100)]
NEWS: Use correct tense in v245 entry

5 years agobasic/fs-util: add a version of chmod_and_chown that doesn not use /proc
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 10:51:50 +0000 (11:51 +0100)]
basic/fs-util: add a version of chmod_and_chown that doesn not use  /proc

5 years agosysusers: many different errnos to express one condition
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 09:18:32 +0000 (10:18 +0100)]
sysusers: many different errnos to express one condition

See https://bugzilla.redhat.com/show_bug.cgi?id=1807768. It turns
out that sysusers cannot query if the group exists:
Failed to check if group dnsmasq already exists: No such process
...
Failed to check if group systemd-timesync already exists: No such process

When the same command is executed later, the issue does not occur. Not sure why
the behaviour in the initial transaction is different. But let's accept all
errors that the man pages list. We check if the user/group exists before creating
anyway, so this seems pretty safe.

5 years agoNEWS: two minor entries v245-rc2
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 07:41:00 +0000 (08:41 +0100)]
NEWS: two minor entries

5 years agoNEWS: update contributors list
Zbigniew Jędrzejewski-Szmek [Tue, 3 Mar 2020 07:31:06 +0000 (08:31 +0100)]
NEWS: update contributors list

5 years agohwdb: update for v245-rc2
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 20:45:56 +0000 (21:45 +0100)]
hwdb: update for v245-rc2

5 years agonetwork: Move config_parse_ip_service_type to networkd-dhcp4.c and
Susant Sahani [Mon, 2 Mar 2020 20:44:01 +0000 (21:44 +0100)]
network: Move config_parse_ip_service_type to networkd-dhcp4.c and
rename

5 years agoMerge pull request #14992 from keszybz/syslog-address-length-fix
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 20:31:24 +0000 (21:31 +0100)]
Merge pull request #14992 from keszybz/syslog-address-length-fix

Syslog address length fix

5 years agoask-password-api: drop unneeded parentheses
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 14:54:43 +0000 (15:54 +0100)]
ask-password-api: drop unneeded parentheses

5 years agocore/execute: use return value from sockaddr_un_set_path(), remove duplicate check
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 14:54:22 +0000 (15:54 +0100)]
core/execute: use return value from sockaddr_un_set_path(), remove duplicate check

5 years agohomed,userdb: don't use sockaddr_un_set_path() on fixed addresses
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 14:53:14 +0000 (15:53 +0100)]
homed,userdb: don't use sockaddr_un_set_path() on fixed addresses

Let's use structured initialization and let the compiler do its job.

5 years agotree-wide: use the return value from sockaddr_un_set_path()
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 14:51:31 +0000 (15:51 +0100)]
tree-wide: use the return value from sockaddr_un_set_path()

It fully initializes the address structure, so no need for pre-initialization,
and also returns the length of the address, so no need to recalculate using
SOCKADDR_UN_LEN().

socklen_t is unsigned, so let's not use an int for it. (It doesn't matter, but
seems cleaner and more portable to not assume anything about the type.)

5 years agotest-sizeof: print size socklen_t
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 14:52:28 +0000 (15:52 +0100)]
test-sizeof: print size socklen_t

It returns 32 bits, unsigned on amd64, so it's probably similar everywhere
with glibc. But let's make the code generic, without assuming specific size
or signedness.

5 years agojournald: fix forwarding to syslog
Zbigniew Jędrzejewski-Szmek [Mon, 2 Mar 2020 13:44:31 +0000 (14:44 +0100)]
journald: fix forwarding to syslog

.msg_namelen was set to a bogus value before we actually stored the path in the
the structure. sockaddr_un_set_path() returns the length, so just use that.

Fixes #14799.

5 years agoRequireMountsFor in systemd-nspawn should wait for machine mount
Kevin P. Fleming [Mon, 24 Feb 2020 14:54:35 +0000 (09:54 -0500)]
RequireMountsFor in systemd-nspawn should wait for machine mount

This patch modifies the RequireMountsFor setting in systemd-nspawn@.service to wait for the machine instance directory to be mounted, not just /var/lib/machines.

Closes #14931

5 years agoMerge pull request #14991 from yuwata/man-fix-typo
Yu Watanabe [Mon, 2 Mar 2020 10:30:22 +0000 (19:30 +0900)]
Merge pull request #14991 from yuwata/man-fix-typo

assorted tiny fixes

5 years agoshared/logs-show: Remove unused OUTPUT_FOLLOW
HATAYAMA Daisuke [Sat, 29 Feb 2020 21:31:38 +0000 (06:31 +0900)]
shared/logs-show: Remove unused OUTPUT_FOLLOW

As of the commit aae9a96d4b3a8562af9e8c6a23871b442645b954 removing --follow
option in systemctl command, OUTPUT_FOLLOW has never been set anywhere. Let's
remove it.

The condition expression of the if-statement in show_journal() that refers to
OUTPUT_FOLLOW now thus evaluates always to true. Hence, the call of
sd_journal_wait() is in dead code, and the outer infinite for-loop is
meaningless, which we remove as cleanup.

There is no functional change by this commit.

5 years agonetwork: make Type=ether match based on iftype
Yu Watanabe [Thu, 27 Feb 2020 12:56:36 +0000 (21:56 +0900)]
network: make Type=ether match based on iftype

This makes Type= can match the type shown in networkctl.

Closes #14952.

5 years agotest-network: remove unnecessary dummy interface
Yu Watanabe [Mon, 17 Feb 2020 15:12:22 +0000 (00:12 +0900)]
test-network: remove unnecessary dummy interface

5 years agoman: fix typo
Susant Sahani [Mon, 2 Mar 2020 06:43:42 +0000 (15:43 +0900)]
man: fix typo

5 years agoMerge pull request #14990 from keszybz/nss-homed-fix
Yu Watanabe [Mon, 2 Mar 2020 06:18:13 +0000 (15:18 +0900)]
Merge pull request #14990 from keszybz/nss-homed-fix

Fix for lookup of groups defined by homed

5 years agounits: disable ProtectKernelLogs for machined
Guillaume Douézan-Grard [Sun, 1 Mar 2020 20:43:24 +0000 (21:43 +0100)]
units: disable ProtectKernelLogs for machined

machined needs access to the host mount namespace to propagate bind
mounts created with the "machinectl bind" command. However, the
"ProtectKernelLogs" directive relies on mount namespaces to make the
kernel ring buffer inaccessible. This commit removes the
"ProtectKernelLogs=yes" directive from machined service file introduced
in 6168ae5.

Closes #14559.

5 years agorandom-seed: add missing header for GRND_NONBLOCK (#14988)
Romain Naour [Mon, 2 Mar 2020 05:48:21 +0000 (06:48 +0100)]
random-seed: add missing header for GRND_NONBLOCK (#14988)

GRND_NONBLOCK has been introduced with the 3.17 kernel version [1]
while adding getrandom(2) system call.

The header missing_random.h is needed for random-seed.c when building
with old toolchain, such Sourcery CodeBench ARM 2014.05 (kernel headers
3.13).

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/454255917

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=c6e9d6f38894798696f23c8084ca7edbf16ee895

5 years agopo: update Polish translation
Piotr Drąg [Sun, 1 Mar 2020 13:47:36 +0000 (14:47 +0100)]
po: update Polish translation

5 years agol10n: update Czech Translation
AsciiWolf [Sun, 1 Mar 2020 12:44:36 +0000 (13:44 +0100)]
l10n: update Czech Translation

5 years agoMerge pull request #14983 from ssahani/dhcp-use-routes-14982
Yu Watanabe [Mon, 2 Mar 2020 05:44:00 +0000 (14:44 +0900)]
Merge pull request #14983 from ssahani/dhcp-use-routes-14982

network: Allow to configure GW even if UseRoutes=false

5 years agoMerge pull request #14976 from keszybz/show-status-message
Zbigniew Jędrzejewski-Szmek [Sun, 1 Mar 2020 22:37:41 +0000 (23:37 +0100)]
Merge pull request #14976 from keszybz/show-status-message

core: fix message about show status state

5 years agotest-network: add a test case for [DHCPv4] UseRoutes=no
Yu Watanabe [Sun, 1 Mar 2020 16:28:01 +0000 (01:28 +0900)]
test-network: add a test case for [DHCPv4] UseRoutes=no

5 years agonetwork: Allow to configure GW even UseRoutes=false
Susant Sahani [Sun, 1 Mar 2020 04:12:39 +0000 (05:12 +0100)]
network: Allow to configure GW even UseRoutes=false

When use UseRoutes=False so the DHCP request itself does not request
for Classless Static Routes option.
As a result, the DHCP server will only respond with a Router option.
In this case since we are using the UseRoutes=False option the gateway
that comes in via the router option does not get configured.
This patch fixes theis behaviour.

5 years agorules.d: import the keyboard builtin instead of running it
Peter Hutterer [Mon, 10 Feb 2020 04:32:48 +0000 (14:32 +1000)]
rules.d: import the keyboard builtin instead of running it

RUN seems to be used primarily for historical reasons over the more
immediate IMPORT command. As a side-effect, RUN also runs *after* all the
rules have been processed which is not really what we want here - we expect
the device to be updated immediately. Other rules that rely on accurate evdev
axes should be able to assume the axes are already present. So let's use
IMPORT here.

For consistency, the second two rules are split across multiple lines as well.

5 years agoresolve: error handling improvements
Yu Watanabe [Mon, 10 Feb 2020 05:50:03 +0000 (14:50 +0900)]
resolve: error handling improvements

5 years agouserdb: fix lookup of groups defined by homed
Zbigniew Jędrzejewski-Szmek [Sun, 1 Mar 2020 11:24:56 +0000 (12:24 +0100)]
userdb: fix lookup of groups defined by homed

5 years agoFix two typos
Zbigniew Jędrzejewski-Szmek [Sun, 1 Mar 2020 11:24:25 +0000 (12:24 +0100)]
Fix two typos

5 years agoItalian: removed spurious lines of old labels
Daniele Medri [Sun, 1 Mar 2020 08:24:12 +0000 (09:24 +0100)]
Italian: removed spurious lines of old labels

5 years agoitalian: language updates
Daniele Medri [Thu, 27 Feb 2020 16:33:35 +0000 (17:33 +0100)]
italian: language updates

5 years agopid1: add new mode systemd.show-status=error and use it when 'quiet' is passed
Zbigniew Jędrzejewski-Szmek [Sat, 29 Feb 2020 16:49:50 +0000 (17:49 +0100)]
pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed

systemd.show-status=error is useful for the case where people care about errors
only.

If people want to have a quiet boot, they most likely don't want to see all
status output even if there is a delay in boot, so make "quiet" imply
systemd.show-status=error instead of systemd.show-status=auto.

Fixes #14976.

5 years agopid1: when showing error status, do not switch to status=temporary
Zbigniew Jędrzejewski-Szmek [Sat, 29 Feb 2020 16:19:46 +0000 (17:19 +0100)]
pid1: when showing error status, do not switch to status=temporary

We would flip to status=temporary mode on the first error, and then switch back
to status=auto after the initial transaction was done. This isn't very useful,
because usually all the messages about successfully started units and not
related to the original failure. In fact, all those messages most likely cause
the information about the prime error to scroll off screen. And if the user
requested quiet boot, there's no reason to think that they care about those
success messages.

Also, when logging about dependency cycles, treat this similarly to a unit
error and show the message even if the status is "soft disabled" (before we
wouldn't show it in that case).

5 years agopid1: make cylon timeout significantly bigger when not showing any messages
Zbigniew Jędrzejewski-Szmek [Sat, 29 Feb 2020 15:29:42 +0000 (16:29 +0100)]
pid1: make cylon timeout significantly bigger when not showing any messages

When we are booting with show-status=on, normally new status updates happen a
few times per second. Thus, it is reasonable to start showing the cylon eye
after 5 s, because that means a significant delay has happened. When we are
running with show-status=off or show-status=auto (and no error had occured),
the user is expecting maybe 15 to 90 seconds with no output (because that's
usually how long the whole boot takes). So we shouldn't bother the user with
information about a few seconds of delay. Let's make the timeout 25s if we are
not showing any messages.

Conversly, when we are outputting status messages, we can show the cylon eye
with a shorter delay, now that we removed the connection to enablement status.
Let's make this 2s, so users get feedback about delays more quickly.

5 years agopid1: touch the /run/systemd/show-status just once
Zbigniew Jędrzejewski-Szmek [Sat, 29 Feb 2020 10:30:16 +0000 (11:30 +0100)]
pid1: touch the /run/systemd/show-status just once

We know if we created the file before, no need to repeat the operation. The
state in /run should always match our internal state. Since we call
manager_set_show_status() quite often internally, this saves quite a few
pointless syscalls.

5 years agopid1: when printing status message status, give reason
Zbigniew Jędrzejewski-Szmek [Sat, 29 Feb 2020 09:59:27 +0000 (10:59 +0100)]
pid1: when printing status message status, give reason

5 years agocore: fix message about show status state
Zbigniew Jędrzejewski-Szmek [Fri, 28 Feb 2020 21:49:19 +0000 (22:49 +0100)]
core: fix message about show status state

We would say "Enabling" also for SHOW_STATUS_AUTO, which is actually
"soft off". So just print the exact state to make things easier to understand.
Also add a helper function to avoid repeating the enum value list.

For #14814.

5 years agoMerge pull request #14966 from keszybz/journalctl-facilities
Yu Watanabe [Sun, 1 Mar 2020 04:17:00 +0000 (13:17 +0900)]
Merge pull request #14966 from keszybz/journalctl-facilities

journalctl: filtering by facility

5 years agohwdb: Add Medion Akoya E1239T MD60568 to 60-sensor.hwdb
Hans de Goede [Tue, 11 Feb 2020 11:27:10 +0000 (12:27 +0100)]
hwdb: Add Medion Akoya E1239T MD60568 to 60-sensor.hwdb

Unlike newer Medion Akoya E* models for which we have a generic
wildcard match, this model uses a somewhat older KIOX0009 accelerometer.

Not only does our generic catch all not match, we also need a different
matrix for this model, so add a model-specific entry for it.

5 years agojournalctl: implement --facility=foo
Zbigniew Jędrzejewski-Szmek [Thu, 27 Feb 2020 20:36:42 +0000 (21:36 +0100)]
journalctl: implement --facility=foo

Fixes #9716.

5 years agohomed: fix typo
Yu Watanabe [Sat, 29 Feb 2020 13:38:02 +0000 (22:38 +0900)]
homed: fix typo

5 years agoMerge pull request #14979 from keszybz/enable-pstore-by-default
Yu Watanabe [Sat, 29 Feb 2020 14:36:23 +0000 (23:36 +0900)]
Merge pull request #14979 from keszybz/enable-pstore-by-default

Enable pstore by default

5 years agoRevert "namespace: fix MAC labels of /dev when PrivateDevices=yes"
Topi Miettinen [Fri, 28 Feb 2020 18:43:28 +0000 (18:43 +0000)]
Revert "namespace: fix MAC labels of /dev when PrivateDevices=yes"

This reverts commit e6e81ec0a56861b905db975fc32c83e2f2faca7d.

5 years agopid1: do not fail if we get EPERM while setting up network name
Zbigniew Jędrzejewski-Szmek [Fri, 28 Feb 2020 13:49:17 +0000 (14:49 +0100)]
pid1: do not fail if we get EPERM while setting up network name

In a user namespace container:
Feb 28 12:45:53 0b2420135953 systemd[1]: Starting Home Manager...
Feb 28 12:45:53 0b2420135953 systemd[21]: systemd-homed.service: Failed to set up network namespacing: Operation not permitted
Feb 28 12:45:53 0b2420135953 systemd[21]: systemd-homed.service: Failed at step NETWORK spawning /usr/lib/systemd/systemd-homed: Operation not permitted
Feb 28 12:45:53 0b2420135953 systemd[1]: systemd-homed.service: Main process exited, code=exited, status=225/NETWORK
Feb 28 12:45:53 0b2420135953 systemd[1]: systemd-homed.service: Failed with result 'exit-code'.
Feb 28 12:45:53 0b2420135953 systemd[1]: Failed to start Home Manager.

We should treat this similarly to the case where network namespace are not
supported at all.

https://bugzilla.redhat.com/show_bug.cgi?id=1807465

5 years agoexecute: Make '+' exec prefix ignore PrivateTmp=yes
Nate Jones [Sat, 29 Feb 2020 01:31:23 +0000 (20:31 -0500)]
execute: Make '+' exec prefix ignore PrivateTmp=yes

The man pages state that the '+' prefix in Exec* directives should
ignore filesystem namespacing options such as PrivateTmp. Now it does.

This is very similar to #8842, just with PrivateTmp instead of
PrivateDevices.