Commit Graph

42365 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 607ebf2bd2 bootlctl: show LoaderDevicePartUUID information in status 2019-11-30 17:42:13 +01:00
Zbigniew Jędrzejewski-Szmek b50a3a1565 gpt-auto-generator: make it easier to notice if boot loader support is missing
The docs didn't talk about this, so let's add an explicit mention that the
boot loader must cooperate. And also make the message from the generator
notice level. This should help people who are trying to mix grub and the
gpt auto logic.
2019-11-30 17:42:00 +01:00
Zbigniew Jędrzejewski-Szmek 1fac34b941 gpt-auto-generator: use write_drop_in_format() helper and downgrade failure
If we fail to write the timeout, let's not exit. (This might happen if another
generator writes the same dropin.) No need to make this fatal.

Since this is non-fatal now and the name doesn't need to be unique, let's make
the drop-in name shorter.
2019-11-30 17:33:34 +01:00
Zbigniew Jędrzejewski-Szmek 074cdb953b gpt-auto-generator: improve debug messages a bit
In particular, let's give a hint when we do nothing in the common case of
root= being used.
2019-11-30 17:33:26 +01:00
Zbigniew Jędrzejewski-Szmek 9fe6f5cc16 gpt-auto-generator: move functions around
open_parent_devno() which is a helper is moved out of the main "business logic"
block of various add_*() functions. And parse_proc_cmdline_item() is moved to
the end, near to run() where it is used. No functional change.
2019-11-28 19:43:43 +01:00
Kevin Kuehler 6da498c28f shared/ask-password-api: modify keyctl break value
We can break if KEYCTL_READ return value is equal to our buffer size.

From keyctl(2):

On a successful return, the return value is always the total size of
the payload data.  To determine whether the buffer was of sufficient
size, check to see that the return value is less than or equal to the
value supplied in arg4.
2019-11-28 08:58:29 +01:00
Lennart Poettering a434236acc systemctl: fix indentation of cgroup tree
Follow-up for 0d588deae2.

In that commit the output got moved a 2 chars to the right, hence make
sure to also shift the cgroup tree to the right, so that it gets
properly aligned under the cgroup path again.
2019-11-27 18:34:53 +01:00
Michal Sekletár 408c81f624 cryptsetup: reduce the chance that we will be OOM killed
cryptsetup introduced optional locking scheme that should serialize
unlocking keyslots which use memory hard key derivation
function (argon2). Using the serialization should prevent OOM situation
in early boot while unlocking encrypted volumes.
2019-11-27 18:34:36 +01:00
Lennart Poettering 6cf5c3318f
Merge pull request #14164 from poettering/exec-start-transient-fix
fix ExecStart= line generation for transient units
2019-11-27 18:32:30 +01:00
Zbigniew Jędrzejewski-Szmek cddaeae6f4
Merge pull request #14145 from poettering/process-bypass
/proc bypass in various process-util.c calls
2019-11-27 14:53:39 +01:00
Lennart Poettering 540ac9338e core: prefer non-@ syntax for ExecStart=
If the zeroth and first argv[] element on the same we don't need to
generate the "@" syntax for ExecStart= and friends.
2019-11-27 12:32:14 +01:00
Lennart Poettering f14bf01312 core: write out correct field name when creating transient service units 2019-11-27 12:23:00 +01:00
Yu Watanabe 403e4b4728
Merge pull request #14160 from mwilck/fix-shutdown-hang
Fix shutdown hang caused by recent udev change
2019-11-27 19:16:12 +09:00
Paul Menzel a19b9a3827 man/systemd.link: Add missing verb *be* 2019-11-27 13:35:29 +09:00
Martin Wilck 030f457167 udevd: don't use monitor after manager_exit()
If udevd receives an exit signal, it releases its reference on the udev
monitor in manager_exit(). If at this time a worker is hanging, and if
the event timeout for this worker expires before udevd exits, udevd
crashes in on_sigchld()->udev_monitor_send_device(), because the monitor
has already been freed.

Fix this by testing the validity of manager->monitor in on_sigchld().
2019-11-26 20:38:28 +01:00
Martin Wilck 3cabdc2345 Revert "udevd: fix crash when workers time out after exit is signal caught"
This reverts commit 5db454b8031c58a743cc4ee3d5d1dd01dcff17e8.
See https://github.com/systemd/systemd/issues/14128
2019-11-26 20:38:28 +01:00
Lennart Poettering 72fd79b3ce test-fileio: cast EOF to (char) before comparing with char explicitly
EOF is defined to -1, hence on platforms that have "char" unsigned we
can't compare it as-is, except if we accept an implicit cast. let's make
it an explicit cast, acknowledging the issue.

Fixes: #14118
2019-11-26 14:55:47 +01:00
Yu Watanabe 6eee88577d udev: tiny update for log messages 2019-11-26 10:42:54 +01:00
Yu Watanabe f5c3892266
network: also assume Table=local for ipv6 route if Type=local, broadcast, anycast or nat (#14148)
Also, if Type=multicast and scope is not set, then assume Scope=link.

Fixes #14122.
2019-11-26 12:41:54 +09:00
Yu Watanabe cfbb1c6def
Merge pull request #14134 from keszybz/variables-and-docs
Documentation and option parsing fixes
2019-11-26 12:40:30 +09:00
Anita Zhang 05d6628ad2
Merge pull request #14151 from mk-fg/fix-timer-dump-syntax-bug
core.timer: fix "systemd-analyze dump" and docs syntax inconsistencies wrt OnTimezoneChange=
2019-11-25 15:56:33 -08:00
Mike Kazantsev 0810e39628 core.timer: fix "systemd-analyze dump" and docs syntax inconsistencies wrt OnTimezoneChange= 2019-11-26 04:29:03 +05:00
Anita Zhang 9b1f0b9064
Merge pull request #14112 from keszybz/restart-no-log
core/service: downgrade "scheduling restart" message to debug
2019-11-25 12:09:00 -08:00
Lennart Poettering 5c7b99745a process-util: shortcut get_process_state() for our own process 2019-11-25 19:23:31 +01:00
Lennart Poettering cde93ba2a5 process-util: shortcut get_process_comm() for our own process
Let's bypass /proc if we can.
2019-11-25 19:23:31 +01:00
Lennart Poettering aad3a64d63 process-util: tweak get_process_cwd() when calling for own process
Let's bypass /proc if we can.
2019-11-25 15:01:53 +01:00
Zbigniew Jędrzejewski-Szmek 6a5b75dbcc man: refer to systemd.syntax(7) from systemd.nspawn(5)
systemd.nspawn(5) contained a partial repeat of the stuff that is now in the
dedicated man page. Let's just refer to that.

While at it, do s/searched/searched for/ where appropriate and reword some
sentences for brevity.
2019-11-25 14:03:09 +01:00
Zbigniew Jędrzejewski-Szmek 83dbb4df99 fuzz-unit-file: add new items to the corpus 2019-11-25 14:02:58 +01:00
Zbigniew Jędrzejewski-Szmek 0b8d307587 pid1: fix the names of AllowedCPUs= and AllowedMemoryNodes=
The original PR was submitted with CPUSetCpus and CPUSetMems, which was later
changed to AllowedCPUs and AllowedMemmoryNodes everywhere (including the parser
used by systemd-run), but not in the parser for unit files.

Since we already released -rc1, let's keep support for the old names. I think
we can remove it in a release or two if anyone remembers to do that.

Fixes #14126. Follow-up for 047f5d63d7.
2019-11-25 14:02:14 +01:00
hadess 1a92b3f2ec
Merge pull request #14129 from jlxawk/hwdb-sensor-jumper-ezpad-go
hwdb: add accel sensor entry for Jumper EZpad Go
2019-11-25 11:59:38 +01:00
Mike Gilbert e05b7c0955 test-proc-cmdline: disable EFI-dependent tests when EFI is disabled
Fixes: https://github.com/systemd/systemd/issues/14116
2019-11-25 08:37:09 +01:00
Haochen Tong 9e94246cad hwdb: add bluetooth entry for Logitech MX Anywhere 2S 2019-11-25 08:32:22 +01:00
Steve Ramage 81a4108180 man: restores ConditionVirtualization documentation (#14138)
Resolves #14137. Error introduced in 337b733449.
2019-11-25 08:31:39 +01:00
Zbigniew Jędrzejewski-Szmek 3d58bfc01c man: document all pager variables for systemctl and systemd
In those two pages, we need to include individual entries with xi:include to
merge the list less-variables.xml with the other entries, which is obviously
error prone. All variables are supported in both tools so add them.
2019-11-24 13:59:32 +01:00
Zbigniew Jędrzejewski-Szmek c484315b01 basic/terminal-util: add support for $NO_COLOR
See inline comments. Fixes #13752.
2019-11-24 13:59:22 +01:00
Yu Watanabe 8c99d40d47 travis: add missing closing quote sign
Fixes #14127.
2019-11-24 13:15:20 +03:00
J. Xing 9627fc633f
hwdb: add accel sensor entry for Jumper EZpad Go
This commit fix the accelerometer orientation on the Jumper EZpad
Go tablet.

The tablet does not have its product name filled in dmi table, make
the match string a bit generic.  Here we assume that the use of a
KIOX000A + bios-vendor + chassis-type combo is unique enough to
match the currently available product in Jumper's x86 tablet series.

For future reference, as in 2019, the tablet has a dmialias of:

  dmi:bvnAmericanMegatrendsInc.:bvrZB-BI-11.6-SF133AR200-059-J \
  :bd05/21/2019:svnjumper:pnEZpad:pvrTobefilledbyO.E.M.:rvnTob \
  efilledbyO.E.M.:rnTobefilledbyO.E.M.:rvrTobefilledbyO.E.M.:c \
  vnTobefilledbyO.E.M.:ct31:cvrTobefilledbyO.E.M.:
2019-11-24 08:54:38 +08:00
Zbigniew Jędrzejewski-Szmek 78af8a798a meson: bump version numbers for v244 2019-11-22 14:41:10 +01:00
Zbigniew Jędrzejewski-Szmek 58c0663b97
Merge pull request #14099 from keszybz/machine-ref-unref-fix
Fix for the issue when machine cannot be started second time, and better nspawn logging
2019-11-22 14:33:27 +01:00
Pascal de Bruijn b4e2236a72 systemd-tmpfiles: don't install timer when service isn't installed either
Fixes: systemd-tmpfiles-clean.timer: Refusing to start, unit
systemd-tmpfiles-clean.service to trigger not loaded.
2019-11-22 14:30:37 +01:00
Zbigniew Jędrzejewski-Szmek 62092b2fae
Merge pull request #14109 from poettering/varlink-tweaks
varlink: fix more/continues method calls, and correctly apply method call timeout
2019-11-22 14:30:16 +01:00
Zbigniew Jędrzejewski-Szmek 868f7d36cc core/service: downgrade "scheduling restart" message to debug
I see we log this during every boot, even though it is a routine expected event:
Nov 12 14:50:01 krowka systemd[1]: systemd-journald.service: Service has no hold-off time (RestartSec=0), scheduling restart.
(and for other services too). Let's downgrade this to debug level.

https://bugzilla.redhat.com/show_bug.cgi?id=1614871
2019-11-22 14:19:51 +01:00
Lennart Poettering f1194f5d59 varlink: fix enablement of varlink timeout event source 2019-11-22 10:54:52 +01:00
Lennart Poettering c4fe0cbc17 varlink: drop too much whitespace 2019-11-22 10:54:52 +01:00
Lennart Poettering 88a36d3690 varlink: port varlink code over to use getdtablesize() for sizing number of concurrent connections
Use the official glibc API for determining this parameter. In most other
cases in our tree it's better to go directly for RLIMIT_NOFILE since
it's semantically what we want, but for this case it appears more
appropriate to use the friendlier, shorter, explicit API.
2019-11-22 10:54:52 +01:00
Lennart Poettering a0c41de277 varlink: move connection fds > fd2
We want to use this code in NSS modules, and we never know the execution
environment we are run in there, hence let's move our fds up to ensure
we won't step into dangerous fd territory.

This is similar to how we already do it in sd-bus for client connection
fds.
2019-11-22 10:54:52 +01:00
Lennart Poettering 45a6c96598 varlink: fix support for more/continues method calls 2019-11-22 10:54:52 +01:00
Zbigniew Jędrzejewski-Szmek 698876640d machine: fold machine_stop_scope() into machine_stop()
No functional change.
2019-11-22 10:24:32 +01:00
Zbigniew Jędrzejewski-Szmek eec12b7756 machined: simplify reference handling for units
Before, we'd unref from machine_stop_unit, still keeping the unit name around,
and only forget the name later, when garbage collecting. If we didn't call
manager_stop_unit(), then we wouldn't do the unref. Let's unref at the same
point where we do garbage collection, so that it is always true that
iff we have the name generated with AddRef=1, then have a reference to the unit,
and as soon as we forget the name, we drop the reference.

This should fix the issue when repeated systemd-nspawn --register=yes fails
with "scope already exists" error.

Incidentally, this fixes an error in the code path where r was used instead of q.
2019-11-22 10:24:32 +01:00
Zbigniew Jędrzejewski-Szmek a01ecfa982 machine: simplify machine_start_scope()
It is called from only one place, and we can make things simpler by calculating the
necessary stuff directly in the function. No functional change.
2019-11-22 10:24:29 +01:00