]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agotest: extend repart test suite to test for unaligned partitions 21281/head
Lennart Poettering [Tue, 9 Nov 2021 15:53:11 +0000 (16:53 +0100)] 
test: extend repart test suite to test for unaligned partitions

4 years agorepart: fix free area calculations for unaligned partitions
Lennart Poettering [Tue, 9 Nov 2021 15:31:48 +0000 (16:31 +0100)] 
repart: fix free area calculations for unaligned partitions

To properly detect how much space we have to distribute we need to take
into account that both the partition offset and the partition size
aren't aligned.

4 years agorepart: don't distribute space after unaligned partitions
Lennart Poettering [Tue, 9 Nov 2021 15:25:24 +0000 (16:25 +0100)] 
repart: don't distribute space after unaligned partitions

If we operate on a disk that has a pre-existing unaligned partition
(i.e. one that doesn't start on multiple of 4K, or doesn't have a size
of multiple 4K), then the amount of space after it to distribute among
partitions isn't a multiple of 4K either.  So far we might end up
passing the remaining fraction to any partition that wanted it, which
was usually the first one after it that is newly defined. This then
confused the later placement algorithm, since it assumed all partitions
we newly allocate were properly aligned but by being extended by the
fractional space they wouldn't be anymore.

Let's hence fix that by ensuring we never pass space to later partitions
so that things wouldn't be aligned anymore.

Anything that is left-over then at the very end (i.e. typically exactly
the remaining fraction) is added as padding to the existing, unaligned
partition, so that it can't confuse anyone.

Fixes: #20622
4 years agorepart: simplify stat machine we mostly go through linearly
Lennart Poettering [Tue, 9 Nov 2021 15:25:00 +0000 (16:25 +0100)] 
repart: simplify stat machine we mostly go through linearly

4 years agorepart: use LESS_BY() more
Lennart Poettering [Tue, 9 Nov 2021 15:24:22 +0000 (16:24 +0100)] 
repart: use LESS_BY() more

4 years agoRevert "CI: disable opensuse mkosi CI"
Michal Koutný [Thu, 4 Nov 2021 14:38:24 +0000 (15:38 +0100)] 
Revert "CI: disable opensuse mkosi CI"

This reverts commit ab6df5208396b7069d5c12aa9c21b8ecdb689de1.

The image build failed during kernel RPM installation (bug in %post
scriptlet). This has been fixed in the package suse-module-tools 16.0.13
[1]. The fix is in openSUSE Tumbleweed repos so the tests can be enabled
again.

[1] https://github.com/openSUSE/suse-module-tools/pull/53

Fixes: #21019
4 years agoMerge pull request #21269 from yuwata/network-netdev-cleanups
Yu Watanabe [Tue, 9 Nov 2021 10:08:11 +0000 (19:08 +0900)] 
Merge pull request #21269 from yuwata/network-netdev-cleanups

network/netdev: several trivial cleanups

4 years agoMerge pull request #21271 from yuwata/ether-addr-util-helper-functions
Zbigniew Jędrzejewski-Szmek [Tue, 9 Nov 2021 09:02:55 +0000 (10:02 +0100)] 
Merge pull request #21271 from yuwata/ether-addr-util-helper-functions

ether-addr-util: introduce several helper functions

4 years agoMerge pull request #21272 from yuwata/netif-util-split
Zbigniew Jędrzejewski-Szmek [Tue, 9 Nov 2021 09:01:07 +0000 (10:01 +0100)] 
Merge pull request #21272 from yuwata/netif-util-split

netif-util: move several functions from network-util.c to netif-util.c

4 years agoarp-util: drop redundant line
Yu Watanabe [Tue, 9 Nov 2021 01:33:57 +0000 (10:33 +0900)] 
arp-util: drop redundant line

The client's IP address is already loaded to X.
(The comment of the dropped line is wrong, X instead of A.)

4 years agonetwork/netdev: sort netdev kinds 21269/head
Yu Watanabe [Sun, 7 Nov 2021 20:50:16 +0000 (05:50 +0900)] 
network/netdev: sort netdev kinds

4 years agonetwork/bridge: drop if_bridge.h from bridge.h
Yu Watanabe [Mon, 8 Nov 2021 00:51:20 +0000 (09:51 +0900)] 
network/bridge: drop if_bridge.h from bridge.h

To avoid future header conflicts.

4 years agonetwork/netdev: fix typo
Yu Watanabe [Sun, 7 Nov 2021 21:35:04 +0000 (06:35 +0900)] 
network/netdev: fix typo

4 years agonetwork: bareudp: use fill_message_create
Yu Watanabe [Sat, 6 Nov 2021 03:58:01 +0000 (12:58 +0900)] 
network: bareudp: use fill_message_create

4 years agonetwork: geneve: use fill_message_create
Yu Watanabe [Sat, 6 Nov 2021 03:40:29 +0000 (12:40 +0900)] 
network: geneve: use fill_message_create

4 years agonetwork/netdev: update comment
Yu Watanabe [Sat, 6 Nov 2021 03:57:54 +0000 (12:57 +0900)] 
network/netdev: update comment

4 years agonetwork/netdev: reduce indentation
Yu Watanabe [Sat, 6 Nov 2021 03:44:30 +0000 (12:44 +0900)] 
network/netdev: reduce indentation

4 years agoMerge pull request #21226 from yuwata/network-tc-cake
Yu Watanabe [Tue, 9 Nov 2021 05:18:41 +0000 (14:18 +0900)] 
Merge pull request #21226 from yuwata/network-tc-cake

network: add several CAKE settings

4 years agoMerge pull request #21268 from yuwata/network-ndisc-use-gateway
Yu Watanabe [Tue, 9 Nov 2021 02:33:21 +0000 (11:33 +0900)] 
Merge pull request #21268 from yuwata/network-ndisc-use-gateway

network: ndisc: introduce UseGateway= and UseRoutePrefix=

4 years agotest-network: add testcases for CAKE settings 21226/head
Yu Watanabe [Wed, 3 Nov 2021 20:50:42 +0000 (05:50 +0900)] 
test-network: add testcases for CAKE settings

4 years agonetwork: tc/cake: introduce UseRawPacketSize= setting
Yu Watanabe [Thu, 4 Nov 2021 01:04:47 +0000 (10:04 +0900)] 
network: tc/cake: introduce UseRawPacketSize= setting

4 years agonetwork: tc/cake: introduce SplitGSO= setting
Yu Watanabe [Wed, 3 Nov 2021 20:38:13 +0000 (05:38 +0900)] 
network: tc/cake: introduce SplitGSO= setting

4 years agonetwork: tc/cake: introduce Wash= setting
Yu Watanabe [Wed, 3 Nov 2021 20:32:44 +0000 (05:32 +0900)] 
network: tc/cake: introduce Wash= setting

4 years agonetwork: tc/cake: introduce FirewallMark= setting
Yu Watanabe [Wed, 3 Nov 2021 20:13:20 +0000 (05:13 +0900)] 
network: tc/cake: introduce FirewallMark= setting

4 years agonetwork: tc/cake: introduce PriorityQueueingProfile= setting
Yu Watanabe [Wed, 3 Nov 2021 19:59:37 +0000 (04:59 +0900)] 
network: tc/cake: introduce PriorityQueueingProfile= setting

4 years agonetwork: tc/cake: introduce MPUBytes= setting
Yu Watanabe [Wed, 3 Nov 2021 19:16:20 +0000 (04:16 +0900)] 
network: tc/cake: introduce MPUBytes= setting

4 years agonetwork: tc/cake: introduce NAT= setting
Yu Watanabe [Tue, 2 Nov 2021 20:55:54 +0000 (05:55 +0900)] 
network: tc/cake: introduce NAT= setting

4 years agonetwork: tc/cake: introduce FlowIsolationMode= setting
Yu Watanabe [Tue, 2 Nov 2021 20:48:15 +0000 (05:48 +0900)] 
network: tc/cake: introduce FlowIsolationMode= setting

4 years agonetwork: tc/cake: introduce CompensationMode= setting
Yu Watanabe [Tue, 2 Nov 2021 19:50:00 +0000 (04:50 +0900)] 
network: tc/cake: introduce CompensationMode= setting

4 years agonetwork: tc/cake: do not pass 0 if OverheadBytes= is not specified
Yu Watanabe [Tue, 2 Nov 2021 19:14:08 +0000 (04:14 +0900)] 
network: tc/cake: do not pass 0 if OverheadBytes= is not specified

4 years agonetwork: tc/cake: introduce AutoRateIngress= setting
Yu Watanabe [Tue, 2 Nov 2021 19:05:02 +0000 (04:05 +0900)] 
network: tc/cake: introduce AutoRateIngress= setting

4 years agoman: use "…" for specifying ranges
Yu Watanabe [Thu, 4 Nov 2021 00:20:21 +0000 (09:20 +0900)] 
man: use "…" for specifying ranges

4 years agoman: move Bandwidth= setting at the beginning of the [CAKE] section
Yu Watanabe [Tue, 2 Nov 2021 19:32:00 +0000 (04:32 +0900)] 
man: move Bandwidth= setting at the beginning of the [CAKE] section

For consistency with tc-cake(8).

4 years agosd-netlink: add more attributes for CAKE
Yu Watanabe [Tue, 2 Nov 2021 18:39:46 +0000 (03:39 +0900)] 
sd-netlink: add more attributes for CAKE

4 years agomeson: Add --warn-common and --fatal-warnings to link flags
Jan Janssen [Thu, 4 Nov 2021 18:03:45 +0000 (19:03 +0100)] 
meson: Add --warn-common and --fatal-warnings to link flags

4 years agonetif-util: split net_get_unique_predictable_data() into two 21272/head
Yu Watanabe [Mon, 8 Nov 2021 02:01:46 +0000 (11:01 +0900)] 
netif-util: split net_get_unique_predictable_data() into two

4 years agonetif-util: rename net_get_name_persistent() -> net_get_persistent_name()
Yu Watanabe [Mon, 8 Nov 2021 01:55:27 +0000 (10:55 +0900)] 
netif-util: rename net_get_name_persistent() -> net_get_persistent_name()

4 years agonetif-util: rename link_get_type_string() -> net_get_type_string()
Yu Watanabe [Sat, 6 Nov 2021 02:28:55 +0000 (11:28 +0900)] 
netif-util: rename link_get_type_string() -> net_get_type_string()

4 years agonetif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]
Yu Watanabe [Sat, 6 Nov 2021 01:24:09 +0000 (10:24 +0900)] 
netif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]

These functions are not relevant to sd-network, and only used by
networkd, networkctl, and udevd.

4 years agoarphrd-util: introduce arphrd_to_hw_addr_len()
Yu Watanabe [Sun, 7 Nov 2021 06:23:38 +0000 (15:23 +0900)] 
arphrd-util: introduce arphrd_to_hw_addr_len()

4 years agoarphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch]
Yu Watanabe [Sun, 7 Nov 2021 06:16:25 +0000 (15:16 +0900)] 
arphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch]

4 years agoether-addr-util: make hw_addr_is_null() return true also for all zero address 21271/head
Yu Watanabe [Sat, 6 Nov 2021 05:12:30 +0000 (14:12 +0900)] 
ether-addr-util: make hw_addr_is_null() return true also for all zero address

This fixes the following error:
---
systemd-networkd[1449490]: ip6tnl0: Saved hardware address: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
systemd-networkd[1449490]: ip6tnl0: Failed to manage link by its new hardware address, ignoring: File exists
---

4 years agoether-addr-util: introduce several helper functions
Yu Watanabe [Sat, 6 Nov 2021 03:15:12 +0000 (12:15 +0900)] 
ether-addr-util: introduce several helper functions

4 years agoMerge pull request #21265 from poettering/userdb-fixes
Yu Watanabe [Mon, 8 Nov 2021 23:14:52 +0000 (08:14 +0900)] 
Merge pull request #21265 from poettering/userdb-fixes

userdb: various userdb fixes and minor feature additions

4 years agonetwork: ndisc: introduce UseGateway= and UseRoutePrefix= settings 21268/head
Yu Watanabe [Mon, 8 Nov 2021 21:44:45 +0000 (06:44 +0900)] 
network: ndisc: introduce UseGateway= and UseRoutePrefix= settings

Closes #21263.

4 years agonetwork: ndisc: do not read DNSSL option when UseDomains=no
Yu Watanabe [Mon, 8 Nov 2021 21:27:21 +0000 (06:27 +0900)] 
network: ndisc: do not read DNSSL option when UseDomains=no

Previously, the following confing did not work:
```
[IPv6AcceptRA]
UseDNS=no
UseDomains=yes
```

4 years agonetwork: ndisc: split out prefix option handling into ndsic_router_process_prefix()
Yu Watanabe [Mon, 8 Nov 2021 21:26:29 +0000 (06:26 +0900)] 
network: ndisc: split out prefix option handling into ndsic_router_process_prefix()

4 years agoman: document new --json= mode 21265/head
Lennart Poettering [Mon, 8 Nov 2021 17:05:32 +0000 (18:05 +0100)] 
man: document new --json= mode

4 years agoman: document new --multipler= switch
Lennart Poettering [Mon, 8 Nov 2021 17:02:33 +0000 (18:02 +0100)] 
man: document new --multipler= switch

4 years agouserwork: make sure to return correct errors when service is not specified correctly
Lennart Poettering [Mon, 8 Nov 2021 16:57:42 +0000 (17:57 +0100)] 
userwork: make sure to return correct errors when service is not specified correctly

Fixes: #21215 #21222
4 years agouserdbctl: always show summary after printing table (unless legend is off)
Lennart Poettering [Mon, 8 Nov 2021 16:36:42 +0000 (17:36 +0100)] 
userdbctl: always show summary after printing table (unless legend is off)

We do this in many (most?) other tools, do so here too. It's quite
useful info to count users/groups/…

4 years agouserdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups
Lennart Poettering [Mon, 8 Nov 2021 16:27:26 +0000 (17:27 +0100)] 
userdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups

This is incredibly useful for debugging.

4 years agouserdbctl: make JSON output mode details configurable like in the other tools
Lennart Poettering [Mon, 8 Nov 2021 16:25:50 +0000 (17:25 +0100)] 
userdbctl: make JSON output mode details configurable like in the other tools

Let's add --json= with the same parser as in the other tools, and honour
it.

4 years agouserdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()
Lennart Poettering [Mon, 8 Nov 2021 16:20:16 +0000 (17:20 +0100)] 
userdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()

Similar in style to previous commit, let's handle these two errors
properly, i.e. as equivalent to no entries found. Let's debug log about
them, to make things either to deal with when debugging (after all
userdbctl to a large degree are debugging tools).

4 years agouserwork: properly handle ENOLINK error from lower-level userdb code
Lennart Poettering [Mon, 8 Nov 2021 15:43:07 +0000 (16:43 +0100)] 
userwork: properly handle ENOLINK error from lower-level userdb code

The lower-level userdb code will return ENOLINK if varlink lookups are
disabled explicitly and we couldn#t find an answer any other way. Let's
not propagate this to clients, since they don't have control over this
feature anyway: we decide internally when to disable varlink lookups
(e.g. if DropIn lookups are requested we disable them) and to the client
side that should not be visible: if we can't find a record with the
flags we pick then we should report then we can't find any, and that's
it.

Fixes: #21223
4 years agoman: extend os-release docs a bit regarding quotes
Lennart Poettering [Mon, 8 Nov 2021 17:19:43 +0000 (18:19 +0100)] 
man: extend os-release docs a bit regarding quotes

Fixes: #21194
4 years agoMerge pull request #20813 from unusual-thoughts/exittype_v2
Zbigniew Jędrzejewski-Szmek [Mon, 8 Nov 2021 14:06:37 +0000 (15:06 +0100)] 
Merge pull request #20813 from unusual-thoughts/exittype_v2

Reintroduce ExitType

4 years agoimplement aliasing for systemd-analyze verify
Albert Brox [Wed, 29 Sep 2021 14:09:34 +0000 (10:09 -0400)] 
implement aliasing for systemd-analyze verify

4 years agobuild: preserve correct mode when generating files via jinja2
Christian Brauner [Fri, 5 Nov 2021 13:29:53 +0000 (14:29 +0100)] 
build: preserve correct mode when generating files via jinja2

When using "capture : true" in custom_target()s the mode of the source
file is not preserved when the generated file is not installed and so
needs to be tweaked manually. Switch from output capture to creating the
target file and copy the permissions from the input file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
4 years agoUse ExitType=cgroup for autostart generated services 20813/head
Henri Chain [Fri, 5 Nov 2021 15:11:42 +0000 (16:11 +0100)] 
Use ExitType=cgroup for autostart generated services

This fixes a bug[1] with some generated autostart app services which
fork and exit immediately after main application process start,
that caused them not to launch during session startup, as the entire
cgroup was immediately killed by systemd.

This can also happen with apps such as file browsers, whose initial
process will exit after the window is closed, but who intend to leave a
daemon child running.

Since the forking model of a .desktop application cannot be known at
service generation time otherwise, ExitType=cgroup is the only effective
way to fix this bug.

[1] https://bugs.kde.org/show_bug.cgi?id=433299

4 years agoReintroduce ExitType
Henri Chain [Wed, 24 Feb 2021 15:13:21 +0000 (16:13 +0100)] 
Reintroduce ExitType

This introduces `ExitType=main|cgroup` for services.
Similar to how `Type` specifies the launch of a service, `ExitType` is
concerned with how systemd determines that a service exited.

- If set to `main` (the current behavior), the service manager will consider
  the unit stopped when the main process exits.

- The `cgroup` exit type is meant for applications whose forking model is not
  known ahead of time and which might not have a specific main process.
  The service will stay running as long as at least one process in the cgroup
  is running. This is intended for transient or automatically generated
  services, such as graphical applications inside of a desktop environment.

Motivation for this is #16805. The original PR (#18782) was reverted (#20073)
after realizing that the exit status of "the last process in the cgroup" can't
reliably be known (#19385)

This version instead uses the main process exit status if there is one and just
listens to the cgroup empty event otherwise.

The advantages of a service with `ExitType=cgroup` over scopes are:
- Integrated logging / stdout redirection
- Avoids the race / synchronisation issue between launch and scope creation
- More extensive use of drop-ins and thus distro-level configuration:
  by moving from scopes to services we can have drop ins that will affect
  properties that can only be set during service creation,
  like `OOMPolicy` and security-related properties
- It makes systemd-xdg-autostart-generator usable by fixing [1], as obviously
  only services can be used in the generator, not scopes.

[1] https://bugs.kde.org/show_bug.cgi?id=433299

4 years agotest: refactor test-procfs-util for clarity and skip test on perm failure
Dan Streetman [Fri, 5 Nov 2021 20:56:16 +0000 (16:56 -0400)] 
test: refactor test-procfs-util for clarity and skip test on perm failure

After commit c3dead53d50e334f2d072a2248256983d6dc9f8c the test can fail
if the procfs file(s) aren't writable, because the check for permission
failure happens after a call that will never fail, since setting the
limit to the existing limit will always pass.

This also refactors the function slightly to make the test var names
clearer.

4 years agohwdb: remove the tablet pad entry for the UC-Logic 1060N
Peter Hutterer [Mon, 8 Nov 2021 00:47:56 +0000 (10:47 +1000)] 
hwdb: remove the tablet pad entry for the UC-Logic 1060N

This entry only matches on vid/pid, so the pen event node of the device
would also get assigned the ID_INPUT_TABLET_PAD property - making it
break with libinput.

On top of that, UC-Logic's tablets re-use USB ids, so now we're breaking
multiple devices this way.

To get this device tagged correctly, use libwacom which has the
per-device hwdb entries.

Fixes #17953

This reverts commit 0fbe78ac7a4c5689660b1c1e2c956ffa1a2e4ee5

4 years agopo: Translated using Weblate (German)
Ettore Atalan [Mon, 8 Nov 2021 00:49:23 +0000 (01:49 +0100)] 
po: Translated using Weblate (German)

Currently translated at 77.7% (147 of 189 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/
Translation: systemd/main

4 years agoMerge pull request #21237 from bluca/analyze_skip
Luca Boccassi [Sat, 6 Nov 2021 11:19:40 +0000 (11:19 +0000)] 
Merge pull request #21237 from bluca/analyze_skip

analyze: allow a custom policy to skip a check

4 years agoMerge pull request #21171 from DaanDeMeyer/tty-dimensions
Lennart Poettering [Sat, 6 Nov 2021 09:16:45 +0000 (10:16 +0100)] 
Merge pull request #21171 from DaanDeMeyer/tty-dimensions

exec: Add TTYRows and TTYColumns properties to set TTY dimensions

4 years agouser-record: show CIFS extra mount options, in output too
Lennart Poettering [Fri, 5 Nov 2021 14:30:36 +0000 (15:30 +0100)] 
user-record: show CIFS extra mount options, in output too

Follow-up for 4c2ee5c7f26fda41d7eb1250c61c85cc869a90de

4 years agotest: wait until `lvm-activate-$vgroup.service` finishes
Frantisek Sumsal [Fri, 5 Nov 2021 17:57:26 +0000 (18:57 +0100)] 
test: wait until `lvm-activate-$vgroup.service` finishes

The new lvm autoactivation method runs `vgchange` via
`systemd-run --no-block`[0], which means that checking if the unit
is in the `active` state is not enough, since the main binary might
still be running. Let's fix this by waiting until the unit reaches
the `exited` sub state.

Follow-up to:
  * 29f8bef05eb9a4bb7f578b31409ca38ec1b1a069
  * e50d743f99fa66c9f55e534c4e109a2cf6323f04

[0] https://sourceware.org/git/?p=lvm2.git;a=blob;f=udev/69-dm-lvm.rules.in;h=39e5b98074010745f78a7a86a05929700c9cd690;hb=67722b312390cdab29c076c912e14bd739c5c0f6#l83

Example:
```
[   17.102002] systemd-udevd[282]: sdf: '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212'(err) 'Running as unit: lvm-activate-iscsi_>
[   17.102522] systemd-udevd[282]: sdf: Process '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212' succeeded.
[   17.102697] systemd-udevd[282]: sdf: Adding watch on '/dev/sdf'
[   17.104944] systemd[1]: lvm-activate-iscsi_lvm2212.service: Changed dead -> running
...
[   17.105434] systemd[1]: Started /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212.
[   17.105601] systemd[931]: lvm-activate-iscsi_lvm2212.service: Executing: /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212
...
[   17.420228] testsuite-64.sh[268]: + systemctl -q is-active lvm-activate-iscsi_lvm2212.service
[   17.420228] testsuite-64.sh[268]: + return 0
[   17.420228] testsuite-64.sh[268]: + test -e /dev/disk/by-path/ip-127.0.0.1:3260-iscsi-iqn.2021-09.com.example:iscsi.lvm.test-lun-4
[   17.420228] testsuite-64.sh[268]: + udevadm settle
[   17.420228] testsuite-64.sh[268]: + test -e /dev/iscsi_lvm2212/mypart1
...
[   17.451313] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE
[   17.451475] systemd[1]: testsuite-64.service: Failed with result 'exit-code'.
...
[   17.555759] systemd[1]: Starting End the test...
[   17.556972] sh[941]: + systemctl poweroff --no-block
...
[   17.688923] lvm[931]:   2 logical volume(s) in volume group "iscsi_lvm2212" now active
...
[   17.838484] systemd[1]: lvm-activate-iscsi_lvm2212.service: Child 931 belongs to lvm-activate-iscsi_lvm2212.service.
[   17.838718] systemd[1]: lvm-activate-iscsi_lvm2212.service: Main process exited, code=exited, status=0/SUCCESS (success)

```

4 years agocoredump: fix filename in journal when not compressed
xdavidwu [Fri, 5 Nov 2021 14:37:06 +0000 (22:37 +0800)] 
coredump: fix filename in journal when not compressed

Since 587f2a5e564cf434c2e0a653f52b8f73e86092d8, filename for
not-compressed coredump is missing from save_external_coredump, making
it write COREDUMP_FILENAME= (empty) in journal, making `coredumpctl`
report it missing but it is actually saved.
This fixes it.

4 years agoanalyze: allow a custom policy to skip a check with weight=0 21237/head
Luca Boccassi [Thu, 4 Nov 2021 19:48:58 +0000 (19:48 +0000)] 
analyze: allow a custom policy to skip a check with weight=0

In some cases an offline analysis should ignore some fields, for example
a portable service in an image will never list RootImage/RootDirectory, as
they are added at runtime, and thus can be skipped.

4 years agoexec: Add TTYRows and TTYColumns properties to set TTY dimensions 21171/head
Daan De Meyer [Thu, 28 Oct 2021 15:26:50 +0000 (16:26 +0100)] 
exec: Add TTYRows and TTYColumns properties to set TTY dimensions

4 years agogetty: Pass tty to use by agetty via stdin
Daan De Meyer [Fri, 29 Oct 2021 12:54:31 +0000 (13:54 +0100)] 
getty: Pass tty to use by agetty via stdin

If the tty arg is set to "-", agetty uses the stdin fd as the tty.
Let's pass the tty this way so that we keep an fd open to the tty
at all times. If all fd's to a tty are closed, the kernel might
reset the tty which we want to avoid.

4 years agotest: exercise sytemd-integritysetup & generator
Tony Asleson [Thu, 4 Nov 2021 19:19:56 +0000 (14:19 -0500)] 
test: exercise sytemd-integritysetup & generator

Ensures we can open a dm-integrity volume formated with
integritysetup.

4 years agosd-boot: Add .osrel section
Jan Janssen [Thu, 4 Nov 2021 09:37:25 +0000 (10:37 +0100)] 
sd-boot: Add .osrel section

This allows starting systemd-boot from \EFI\Linux for easier testing
and bisection without risking an unbootable system as the user does not
need to replace their working loader.

4 years agoanalyze: explain how the weight/range policy fields are used
Luca Boccassi [Thu, 4 Nov 2021 19:47:29 +0000 (19:47 +0000)] 
analyze: explain how the weight/range policy fields are used

4 years agoMerge pull request #21252 from poettering/homed-record-dir-env-var
Lennart Poettering [Fri, 5 Nov 2021 20:52:00 +0000 (21:52 +0100)] 
Merge pull request #21252 from poettering/homed-record-dir-env-var

homed: add env var to override dir where we fine stored user records

4 years agouser-record: fix display of access mode
Lennart Poettering [Fri, 5 Nov 2021 15:36:32 +0000 (16:36 +0100)] 
user-record: fix display of access mode

4 years agouser-record: show fs/luks/gpt UUIDs as proper UUIDs
Lennart Poettering [Fri, 5 Nov 2021 17:04:53 +0000 (18:04 +0100)] 
user-record: show fs/luks/gpt UUIDs as proper UUIDs

These are not defined by us, but are defined as proper UUIDs by their
respective specs, hence show them as such.

4 years agodocs: document systemd-homed development env vars 21252/head
Lennart Poettering [Fri, 5 Nov 2021 18:07:52 +0000 (19:07 +0100)] 
docs: document systemd-homed development env vars

4 years agohomed: add env var to override dir where we fine stored user records
Lennart Poettering [Fri, 5 Nov 2021 17:03:05 +0000 (18:03 +0100)] 
homed: add env var to override dir where we fine stored user records

This adds an env var which we can use to redirect where homed stores and
looks for user records kept on the host. This is useful for debugging
purposes so that one can easily run another homed instnce that doesn't
interfere with the main instance.

4 years agotest: Add test for flag macros
Jan Janssen [Fri, 5 Nov 2021 11:53:09 +0000 (12:53 +0100)] 
test: Add test for flag macros

4 years agoMerge pull request #20056 from calestyo/split-up-sysusers.d-systemd.conf.in
Zbigniew Jędrzejewski-Szmek [Fri, 5 Nov 2021 14:30:33 +0000 (15:30 +0100)] 
Merge pull request #20056 from calestyo/split-up-sysusers.d-systemd.conf.in

sysusers: split up systemd.conf

4 years agoMerge pull request #20138 from keszybz/coding-style-variable-decls
Luca Boccassi [Fri, 5 Nov 2021 13:57:30 +0000 (13:57 +0000)] 
Merge pull request #20138 from keszybz/coding-style-variable-decls

A coding style tweak and checking of sd_notify() calls and voidification of pager_open()

4 years agomeson-render-jinja2: use ast.literal_eval()
Zbigniew Jędrzejewski-Szmek [Fri, 5 Nov 2021 10:51:17 +0000 (11:51 +0100)] 
meson-render-jinja2: use ast.literal_eval()

Imports are sorted in the usual fashion: stdlib first.

literal_eval() parses string/numbers/lists/sets/dicts, and nothing else, while
eval will execute any python code. Using literal_eval() is generally more
correct, because it avoids the risk of side effects from the parsed expression.
In this case, we generate the parsed strings ourselves, so it's very unlikely
to have anything unexpected in the expressions. But let's do the correct thing
anyway.

4 years agoMerge pull request #21225 from medhefgo/boot-cleanup
Zbigniew Jędrzejewski-Szmek [Fri, 5 Nov 2021 13:53:47 +0000 (14:53 +0100)] 
Merge pull request #21225 from medhefgo/boot-cleanup

Boot cleanup

4 years agobasic/mountpoint-util: detect erofs as a read-only FS
Luca Boccassi [Thu, 4 Nov 2021 20:29:43 +0000 (20:29 +0000)] 
basic/mountpoint-util: detect erofs as a read-only FS

4 years agoloop-util: reopen device node if we shortcut loop device creation
Lennart Poettering [Thu, 4 Nov 2021 14:01:33 +0000 (15:01 +0100)] 
loop-util: reopen device node if we shortcut loop device creation

The LoopDevice object supports a shortcut: if the backing fd we are
supposed to create a loopback device of refers to a
block device alrady then we'll use it as is – if we can – instead of
setting up an unnecessary loopback device that would be pretty much
the same as its backing device.

Previously, when doing this we'd just dup() the original backing fd and
use that. But that's problematic in case O_DIRECT was set on the fd,
since we'll keep that flag set on our copy too, which means we can't do
simple, regular IO on it anymore.

Thus, let's reopen the inode in this case with the exact access flags
we'd apply if we'd actually allocate and open a new loopback device.

Fixes: #21176
4 years agoanalyze: fix typos in test policy
Luca Boccassi [Thu, 4 Nov 2021 19:22:28 +0000 (19:22 +0000)] 
analyze: fix typos in test policy

4 years agoMerge pull request #21229 from keszybz/improve-m-hint
Luca Boccassi [Thu, 4 Nov 2021 18:40:26 +0000 (18:40 +0000)] 
Merge pull request #21229 from keszybz/improve-m-hint

Improve hint to use -M in various tools

4 years agosd-boot: Fix efi_arch checks 21225/head
Jan Janssen [Tue, 2 Nov 2021 09:47:41 +0000 (10:47 +0100)] 
sd-boot: Fix efi_arch checks

efi_arch is set to whatever meson returns from host_machine.cpu_family() and
gnu_efi_arch is then set accordingly.

On x86, efi_arch == x86 and gnu_efi_arch == ia32. Surprisingly, compilation
worked (without disabling some instruction sets) and nobody ever complained
about systemd-bootia32.efi not working.

4 years agosd-boot: Detect supported compile args
Jan Janssen [Tue, 2 Nov 2021 09:21:19 +0000 (10:21 +0100)] 
sd-boot: Detect supported compile args

This brings the final list of compiler arguments more in line with
how meson does things. In particular, --buildtype=plain will not
add any optimizations on its own (and would have to be provided
through CFLAGS=).

4 years agosd-boot: Add some link flags
Jan Janssen [Mon, 1 Nov 2021 09:36:12 +0000 (10:36 +0100)] 
sd-boot: Add some link flags

These flags are used by gnu-efi. Adding --no-undefined even allows
us to drop the no-undefined-symbols.sh test in favor of immediate
compile time errors.

4 years agosd-stub: Fix possible memory leak
Jan Janssen [Tue, 26 Oct 2021 10:39:16 +0000 (12:39 +0200)] 
sd-stub: Fix possible memory leak

4 years agosd-boot: Check for existence of required pe sections
Jan Janssen [Tue, 26 Oct 2021 10:33:43 +0000 (12:33 +0200)] 
sd-boot: Check for existence of required pe sections

4 years agosd-boot: Move optional header verification into verify_pe
Jan Janssen [Tue, 26 Oct 2021 10:25:41 +0000 (12:25 +0200)] 
sd-boot: Move optional header verification into verify_pe

4 years agosd-boot: Use FLAGS_SET
Jan Janssen [Tue, 26 Oct 2021 10:17:31 +0000 (12:17 +0200)] 
sd-boot: Use FLAGS_SET

4 years agosd-boot: Move flags helpers to macro-fundamental.h
Jan Janssen [Tue, 26 Oct 2021 09:07:39 +0000 (11:07 +0200)] 
sd-boot: Move flags helpers to macro-fundamental.h

4 years agosd-boot: Always compile with -ffreestanding and -fshort-wchar
Jan Janssen [Tue, 26 Oct 2021 08:56:17 +0000 (10:56 +0200)] 
sd-boot: Always compile with -ffreestanding and -fshort-wchar

This is not a hosted environment and we should not pretend otherwise
if -ffreestanding is not supported.

With EFI strings being in UCS2, it is not supported to build without
-fshort-wchar as gcc/clang default to a w_char_t size of 4 bytes.

This also makes the charset for wide chars explicit on gcc. This way
we get a nice error message if anyone ever tries to add 💩 to strings.

4 years agosd-boot: Save and restore console attributes
Jan Janssen [Tue, 26 Oct 2021 07:56:32 +0000 (09:56 +0200)] 
sd-boot: Save and restore console attributes

This also only writes the message on a new line if we aren't at the
beginning of one already.

4 years agoMerge pull request #21070 from medhefgo/boot-save
Lennart Poettering [Thu, 4 Nov 2021 16:37:12 +0000 (17:37 +0100)] 
Merge pull request #21070 from medhefgo/boot-save

sd-boot: Add support to boot last select entry