]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agotest: record missing openssl as a failure
Michael Biebl [Thu, 16 Dec 2021 18:18:28 +0000 (19:18 +0100)] 
test: record missing openssl as a failure

The openssl binary is an optional dependency.
If systemd has been built with OpenSSL support, we want to test its
OpenSSL functionality.
So record a failure message in /failed if the binary is missing.

See https://github.com/systemd/systemd/pull/21724#issuecomment-992707614

2 years agoNEWS: fix typo
Yu Watanabe [Thu, 16 Dec 2021 19:12:14 +0000 (04:12 +0900)] 
NEWS: fix typo

2 years agoboot: fix typo
Yu Watanabe [Thu, 16 Dec 2021 19:11:41 +0000 (04:11 +0900)] 
boot: fix typo

2 years agoMerge pull request #21786 from keszybz/dirent-work
Yu Watanabe [Thu, 16 Dec 2021 19:07:35 +0000 (04:07 +0900)] 
Merge pull request #21786 from keszybz/dirent-work

Make FOREACH_DIRENT and FOREACH_DIRENT_ALL declare the iterator variables

2 years agoMerge pull request #21736 from yuwata/network-cleanups-for-drop-foreign-configs
Yu Watanabe [Thu, 16 Dec 2021 19:07:00 +0000 (04:07 +0900)] 
Merge pull request #21736 from yuwata/network-cleanups-for-drop-foreign-configs

network: cleanups for dropping foreign configs

2 years agoMerge pull request #21790 from keszybz/network-generator-always
Luca Boccassi [Thu, 16 Dec 2021 15:50:39 +0000 (15:50 +0000)] 
Merge pull request #21790 from keszybz/network-generator-always

Enable systemd-network-generator by default

2 years agotest-network: wait for veth99 being configured 21736/head
Yu Watanabe [Thu, 16 Dec 2021 14:54:17 +0000 (23:54 +0900)] 
test-network: wait for veth99 being configured

As the address, which should be kept, may not be just removed yet.
Let's check that the address is actually kept.

2 years agonetwork: route: link_drop_foreign_routes() must be called only for managed interfaces
Yu Watanabe [Sat, 11 Dec 2021 17:52:09 +0000 (02:52 +0900)] 
network: route: link_drop_foreign_routes() must be called only for managed interfaces

2 years agonetworkd: check the existence of the route
Yu Watanabe [Sat, 11 Dec 2021 17:48:03 +0000 (02:48 +0900)] 
networkd: check the existence of the route

2 years agoMerge pull request #21791 from mrc0mmand/TEST-64-tweaks
Frantisek Sumsal [Thu, 16 Dec 2021 14:22:35 +0000 (14:22 +0000)] 
Merge pull request #21791 from mrc0mmand/TEST-64-tweaks

A couple of TEST-64-UDEV-STORAGE tweaks

2 years agonetwork: address: minor optimization for link_drop_foreign_addresses()
Yu Watanabe [Sat, 11 Dec 2021 17:30:27 +0000 (02:30 +0900)] 
network: address: minor optimization for link_drop_foreign_addresses()

link_address_is_dynamic() is costful in general. Call it only when
KeepConfiguration= is set.

Note, it is not necessary to check link->network in the loop, as we have
the assertion for that in the beginning of the function.

2 years agonetwork: drop IPv6LL addresses manually configured in .network file
Yu Watanabe [Sat, 11 Dec 2021 17:26:22 +0000 (02:26 +0900)] 
network: drop IPv6LL addresses manually configured in .network file

2 years agoNEWS: update again
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 13:17:33 +0000 (14:17 +0100)] 
NEWS: update again

2 years agoMerge pull request #21757 from DaanDeMeyer/boot-id
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 12:47:17 +0000 (13:47 +0100)] 
Merge pull request #21757 from DaanDeMeyer/boot-id

kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info

2 years agokernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info 21757/head
Daan De Meyer [Tue, 14 Dec 2021 16:09:08 +0000 (17:09 +0100)] 
kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info

If KERNEL_INSTALL_MACHINE_ID is defined in /etc/machine-info, prefer it
over the machine ID from /etc/machine-id. If a machine ID is defined in
neither /etc/machine-info nor in /etc/machine-id, generate a new UUID
and try to write it to /etc/machine-info as KERNEL_INSTALL_MACHINE_ID
and use it as the machine ID if writing it to /etc/machine-info succeeds.

In practice, this means we have a more robust fallback if there's no
machine ID in /etc/machine-id than just using "Default" and allows
image builders to force kernel-install to use KERNEL_INSTALL_MACHINE_ID
by simply writing it to /etc/machine-info themselves.

2 years agoMerge pull request #20559 from tomty89/stub_check_in_get
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 11:18:53 +0000 (12:18 +0100)] 
Merge pull request #20559 from tomty89/stub_check_in_get

resolved: filter stub listeners in manager_get_dns_server()

2 years agotest: bump the timeout when collecting test coverage 21791/head
Frantisek Sumsal [Thu, 16 Dec 2021 11:05:01 +0000 (12:05 +0100)] 
test: bump the timeout when collecting test coverage

2 years agotest: settle before checking logs
Frantisek Sumsal [Thu, 16 Dec 2021 10:59:09 +0000 (11:59 +0100)] 
test: settle before checking logs

Otherwise we might miss the "Device path too long" message:

```
[   21.083274] testsuite-64.sh[374]: swapoff /dev/vda1
[   21.089841] testsuite-64.sh[376]: ++ mktemp
[   21.095115] testsuite-64.sh[271]: + logfile=/tmp/tmp.a1MULA35wL
[   21.095115] testsuite-64.sh[271]: + journalctl -b -q --no-pager -o short-monotonic -p info --grep 'Device path.*vda.?'\'' too long to fit into unit name'
...
[   21.277360] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE
[   21.277508] systemd[1]: testsuite-64.service: Failed with result 'exit-code'.
...
[   21.323500] systemd[1]: Device path '/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/0000:0b:00.0/0000:0c:00.0/0000:0d:00.0/0000:0e:00.0/0000:0f:00.0/0000:10:00.0/0000:11:00.0/0000:12:00.0/0000:13:00.0/0000:14:00.0/0000:15:00.0/0000:16:00.0/0000:17:00.0/0000:18:00.0/0000:19:00.0/0000:1a:00.0/virtio0/block/vda/vda1' too long to fit into unit name, ignoring device.

```

2 years agomeson: drop three more single-use convenience libraries 21786/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 10:51:08 +0000 (11:51 +0100)] 
meson: drop three more single-use convenience libraries

The way that the cryptsetup plugins were built was unnecessarilly complicated.
We would build three static libraries that would then be linked into dynamic
libraries. No need to do this.

While at it, let's use a convenience library to avoid compiling the shared code
more than once.

We want the output .so files to be located in the main build directory,
like with all consumable build artifacts, so we need to maintain the split
between src/cryptsetup/cryptsetup-token/meson.build and the main meson.build
file.

AFAICT, the build artifacts are the same: exported and undefined symbols are
identical. There is a tiny difference in size, but I think it might be caused
by a different build directory name.

2 years agomeson: drop convenience library that was only used in one place
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 10:09:51 +0000 (11:09 +0100)] 
meson: drop convenience library that was only used in one place

It doesn't make much sense to do this, the result is very similar to including
to objects directly in the output binary without going through an intermediate
target.

The linkage of test-libudev was rather strange too: udev_link_with is used to
allow udev to be linked to a static version of libshared, so that udev is not
linked to libshared.so. But here we were using both, defeating the purpose of
udev_link_with. I don't think it matters what the test is linked to, so let's
use the non-static linkage to save space.

2 years agomeson: stop building out convenience libraries by default
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 09:58:44 +0000 (10:58 +0100)] 
meson: stop building out convenience libraries by default

The meson default for static_library() are:
build_by_default=true, install=false. We never interact with the
static libraries, and we only care about them as a stepping-stone towards
the installable executables or libraries. Thus let's only build them if
they are a dependency of something else we are building.

While at it, let's drop install:false, since this appears to be the default.

This change would have fixed the issue with lib_import_common failing
to build too: we wouldn't attempt to build it.

In practice this changes very little, because we generally only declare static
libraries where there's something in the default target that will make use of
them. But it seems to be a better pattern to set build_by_default to false.

2 years agomeson: don't compile import sources four times
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 14:39:43 +0000 (15:39 +0100)] 
meson: don't compile import sources four times

Use a 'convenience library' to do the compilation once and then link the
objects into all the files that need it. Those files are small, so this probably
doesn't matter too much for speed, but has the advantage that we don't get the
same error four times if something goes wrong.

The library is conditionalized in the same way importd itself, because we
cannot build it without the deps.

2 years agoman: split out a paragraph and shorten the text about sd-network-generator 21790/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 08:56:13 +0000 (09:56 +0100)] 
man: split out a paragraph and shorten the text about sd-network-generator

The ordering of the service wrt. to udevd is enforced by unit configuration,
so no need to tell the user about this. From users' POV, the only thing that
counts is that the unit is enabled and then the right thing happens.

2 years agounits: enable systemd-network-generator by default
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 08:46:26 +0000 (09:46 +0100)] 
units: enable systemd-network-generator by default

It is used by udevd and networkd. Since udevd is enabled statically, let's also
change the preset to "on". networkd is opt-in, so let's pull in the generator
when enabling networkd too.

2 years agoMerge pull request #21766 from yuwata/network-generator-name-policy
Zbigniew Jędrzejewski-Szmek [Thu, 16 Dec 2021 08:34:01 +0000 (09:34 +0100)] 
Merge pull request #21766 from yuwata/network-generator-name-policy

network-generator: support setting NamePolicy=

2 years agoMerge pull request #21784 from DaanDeMeyer/issue-21675
Luca Boccassi [Wed, 15 Dec 2021 22:38:00 +0000 (22:38 +0000)] 
Merge pull request #21784 from DaanDeMeyer/issue-21675

journal: Hole punching improvements

2 years agoDefine FOREACH_DIRENT through FOREACH_DIRENT_ALL
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 11:52:58 +0000 (12:52 +0100)] 
Define FOREACH_DIRENT through FOREACH_DIRENT_ALL

As in the previous commit, 'de' is used as the iterator variable name.

2 years agonetwork: route: update comment
Yu Watanabe [Wed, 15 Dec 2021 18:36:06 +0000 (03:36 +0900)] 
network: route: update comment

2 years agojournal: Stop reading in increments of block size during hole punching 21784/head
Daan De Meyer [Wed, 15 Dec 2021 17:23:15 +0000 (18:23 +0100)] 
journal: Stop reading in increments of block size during hole punching

Let's not try to be overly clever here. This code path is not overly
performance sensitive and we should avoid trying to outsmart the kernel
without proper benchmarking.

2 years agojournal: Use 16kb buffer during hole punching
Daan De Meyer [Wed, 15 Dec 2021 17:22:17 +0000 (18:22 +0100)] 
journal: Use 16kb buffer during hole punching

Let's use the same buffer size as used in as copy.h.

2 years agojournal: Correctly advance offset when iterating hash table entries
Daan De Meyer [Wed, 15 Dec 2021 17:18:25 +0000 (18:18 +0100)] 
journal: Correctly advance offset when iterating hash table entries

pread() is not guaranteed to completely fill up the given buffer with
data which we assumed until now. Instead, only increment the offset by
the number of bytes that were actually read.

2 years agojournal: Add a minimum hole size for hole punching
Daan De Meyer [Wed, 15 Dec 2021 17:17:22 +0000 (18:17 +0100)] 
journal: Add a minimum hole size for hole punching

Let's not bother punching extremely small holes to avoid unnecessary
file fragmentation.

2 years agoNEWS: update networkd related entries
Yu Watanabe [Wed, 15 Dec 2021 17:12:03 +0000 (02:12 +0900)] 
NEWS: update networkd related entries

2 years agotest: add testcases for net.ifname-policy= kernel command line argument 21766/head
Yu Watanabe [Tue, 14 Dec 2021 04:11:17 +0000 (13:11 +0900)] 
test: add testcases for net.ifname-policy= kernel command line argument

2 years agonetwork-generator: support to set NamePolicy= through kernel command line argument
Yu Watanabe [Tue, 14 Dec 2021 02:29:08 +0000 (11:29 +0900)] 
network-generator: support to set NamePolicy= through kernel command line argument

Closes #16296.

2 years agoudev: move NamePolicy to netif-naming-scheme.[ch]
Yu Watanabe [Tue, 14 Dec 2021 02:26:44 +0000 (11:26 +0900)] 
udev: move NamePolicy to netif-naming-scheme.[ch]

2 years agonetwork-generator: support MAC address longer or shorter than ETH_ALEN
Yu Watanabe [Tue, 14 Dec 2021 01:38:02 +0000 (10:38 +0900)] 
network-generator: support MAC address longer or shorter than ETH_ALEN

2 years agomeson: build network-generator unconditionally
Yu Watanabe [Wed, 15 Dec 2021 16:51:22 +0000 (01:51 +0900)] 
meson: build network-generator unconditionally

The service also generates .link files for udevd.

2 years agounit: run network-generator before starting udevd
Yu Watanabe [Tue, 14 Dec 2021 04:12:41 +0000 (13:12 +0900)] 
unit: run network-generator before starting udevd

Otherwise, .link files generated by the service may not be loaded by
udevd.

2 years agotree-wide: make FOREACH_DIRENT_ALL define the iterator variable
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 14:02:55 +0000 (15:02 +0100)] 
tree-wide: make FOREACH_DIRENT_ALL define the iterator variable

The variable is not useful outside of the loop (it'll always be null
after the loop is finished), so we can declare it inline in the loop.
This saves one variable declaration and reduces the chances that somebody
tries to use the variable outside of the loop.

For consistency, 'de' is used everywhere for the var name.

2 years agokernel-install: Remove "Default" from list of suffixes checked
Daan De Meyer [Wed, 15 Dec 2021 12:58:24 +0000 (13:58 +0100)] 
kernel-install: Remove "Default" from list of suffixes checked

This was an undocumented change in behavior introduced by
9e82a74cb0f08a288f9db228a0b5bec8a7188cdb. Previously, we only
checked for "Default" if we didn't find a machine ID. Let's make
sure we keep the previous behavior intact.

2 years agoMerge pull request #21763 from yuwata/udevadm-write-only-attributes
Zbigniew Jędrzejewski-Szmek [Wed, 15 Dec 2021 12:22:45 +0000 (13:22 +0100)] 
Merge pull request #21763 from yuwata/udevadm-write-only-attributes

udevadm: also show write-only attributes

2 years agoresolved: filter out our own stub resolvers when parsing servers 20559/head
Zbigniew Jędrzejewski-Szmek [Wed, 15 Dec 2021 10:42:59 +0000 (11:42 +0100)] 
resolved: filter out our own stub resolvers when parsing servers

We get "upstream" dns server config from ~three places: /etc/resolv.conf,
config files, and runtime config via dbus. With this commit, we'll filter out
our own stub listeners if they are configured in either of the first two
sources. For /etc/resolv.conf this is done quitely, and for our own config
files, a LOG_INFO message is emitted, since this is a small inconsistency in
the config.

Setting loops like this over dbus is still allowed. The reason is that in the
past we didn't treat this as an error, and if we were to start responding with
an error, we could break a scenario that worked previously. E.g. NM sends us a
list of servers, and one happens to be the our own. We would just not use that
stub server before, but it'd still be shown in the dbus properties and such.
We would have to return error for the whole message, also rejecting the other
valid servers. I think it's easier to just keep that part unchanged.

Test case:
$ ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 57 Dec 15 10:26 /etc/resolv.conf
$ cat /etc/resolv.conf
nameserver 192.168.150.1
options edns0 trust-ad
search .
$ cat /etc/systemd/resolved.conf.d/stub.conf
[Resolve]
DNSStubListenerExtra=192.168.150.1

$ resolvectl
...
Global
    resolv.conf mode: foreign
         DNS Servers: 192.168.150.1
Fallback DNS Servers: ...
(with the patch):
Global
    resolv.conf mode: foreign
Fallback DNS Servers: ...

2 years agoresolved: return immediately if we already know what to return
Zbigniew Jędrzejewski-Szmek [Wed, 15 Dec 2021 09:54:17 +0000 (10:54 +0100)] 
resolved: return immediately if we already know what to return

2 years agohwdb: Add accel orientation quirk for the Chuwi Hi10 Go tablet
Jayce Fayne [Tue, 14 Dec 2021 13:57:38 +0000 (14:57 +0100)] 
hwdb: Add accel orientation quirk for the Chuwi Hi10 Go tablet

2 years agofstab-generator: do not remount /sys when running in a container
Yu Watanabe [Sun, 12 Dec 2021 02:43:21 +0000 (11:43 +0900)] 
fstab-generator: do not remount /sys when running in a container

Closes #21744.

2 years agojournactl: show info about journal range only at debug level (#21775)
Zbigniew Jędrzejewski-Szmek [Tue, 14 Dec 2021 21:30:15 +0000 (22:30 +0100)] 
journactl: show info about journal range only at debug level (#21775)

The message that the "journal begins … ends …" has been always confusing to
users. (Before b91ae210e62 it was "logs begin … end …" which was arguably even
more confusing, but really the change in b91ae210e62 didn't substantially change
this.)

When the range shown is limited (by -e, -f, --since, or other options), it
doesn't really matter to the user what the oldest entries are, since they are
purposefully limiting the range. In fact, if we are showing the last few
entries with -e or -f, knowing that many months the oldest entries have is
completely useless.

And when such options are *not* used, the first entry generally corresponds to
the beginning of the range shown, and the last entry corresponds to the end of
that range. So again, it's not particularly useful, except when debugging
journalctl or such. Let's just treat it as a debug message.

Fixes #21491.

2 years agohostnamectl: add a chassis symbol in status output
Zbigniew Jędrzejewski-Szmek [Tue, 14 Dec 2021 11:25:10 +0000 (12:25 +0100)] 
hostnamectl: add a chassis symbol in status output

The idea is to be able to distinguish whether we're in a VM/container or something
more substantial at a glance.
         Chassis: laptop 💻
         Chassis: tablet 具
         Chassis: vm 🖴
         Chassis: server 🖳
         Chassis: handset 🕻
         Chassis: watch ⌚
         Chassis: desktop 🖥
         Chassis: container ☐

2 years agoMerge pull request #21769 from yuwata/home-fix-heap-use-after-free
Luca Boccassi [Tue, 14 Dec 2021 15:54:00 +0000 (15:54 +0000)] 
Merge pull request #21769 from yuwata/home-fix-heap-use-after-free

home: fix heap-use-after-free

2 years agoudevadm: also show write-only attributes 21763/head
Yu Watanabe [Mon, 13 Dec 2021 21:25:03 +0000 (06:25 +0900)] 
udevadm: also show write-only attributes

2 years agosd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes
Yu Watanabe [Mon, 13 Dec 2021 21:24:24 +0000 (06:24 +0900)] 
sd-device: make FOREACH_DEVICE_SYSATTR() also list write-only attributes

Closes #10102.

2 years agohome: fix heap-use-after-free 21769/head
Yu Watanabe [Tue, 14 Dec 2021 06:38:12 +0000 (15:38 +0900)] 
home: fix heap-use-after-free

`bus_home_emit_remove()` may be called from manager_free() -> home_free().
In that case, manager->bus is already unref()ed.

Fixes #21767.

2 years agohome: clear Manager::bus, ::event, ::homes_by_xxx and so on
Yu Watanabe [Tue, 14 Dec 2021 10:37:27 +0000 (19:37 +0900)] 
home: clear Manager::bus, ::event, ::homes_by_xxx and so on

`home_free()` may try to call some dbus or event related functions.
To prevent that, set those variables NULL.

2 years agopolkit: make bus_verify_polkit_async_registry_free() return Hashmap* with NULL
Yu Watanabe [Tue, 14 Dec 2021 10:36:34 +0000 (19:36 +0900)] 
polkit: make bus_verify_polkit_async_registry_free() return Hashmap* with NULL

2 years agowait-online: also use address state even when operational state is below degraded
Yu Watanabe [Mon, 13 Dec 2021 11:14:06 +0000 (20:14 +0900)] 
wait-online: also use address state even when operational state is below degraded

Closes #21706.

2 years agoshell-completion: Add completion for systemd-analyze critical-chain
Nishal Kulkarni [Tue, 14 Dec 2021 08:43:13 +0000 (14:13 +0530)] 
shell-completion: Add completion for systemd-analyze critical-chain

systemd-analyze critical-chain accepts an optional unit argument,
however currently there's no shell-completion for it
This change provides unit name completion for both bash and zsh.

Closes: #20927
2 years agoFix loading of graphs
acsfer [Tue, 14 Dec 2021 06:25:00 +0000 (07:25 +0100)] 
Fix loading of graphs

2 years agoboot, meson: allow statically linked build
Robert Scheck [Sun, 12 Dec 2021 00:27:03 +0000 (01:27 +0100)] 
boot, meson: allow statically linked build

Build option "link-boot-shared" to build a statically linked bootctl and
systemd-bless-boot by using

  -Dlink-boot-shared=false

on systems with full systemd stack except bootctl and systemd-bless-boot,
such as CentOS/RHEL 9.

2 years agoman: do not install sd-boot man pages when -Dgnu-efi=false is set
Davide Cavalca [Mon, 13 Dec 2021 17:27:20 +0000 (09:27 -0800)] 
man: do not install sd-boot man pages when -Dgnu-efi=false is set

2 years agoman: how to unset CPUQuota=
Sho Iizuka [Mon, 13 Dec 2021 13:53:36 +0000 (22:53 +0900)] 
man: how to unset CPUQuota=

This description will help users who are trying to reset the already configured
CPUQuota= by trying incorrect ways such as CPUQuota=0 or CPUQUota=infinity.

2 years agoMerge pull request #21752 from keszybz/man-creds
Luca Boccassi [Mon, 13 Dec 2021 19:43:37 +0000 (19:43 +0000)] 
Merge pull request #21752 from keszybz/man-creds

Small improvements to systemd-creds output and man page

2 years agoresolved: filter stub listeners in manager_get_dns_server()
Tom Yan [Wed, 8 Dec 2021 02:53:07 +0000 (10:53 +0800)] 
resolved: filter stub listeners in manager_get_dns_server()

Commit 49ef064c8dcd8ed12d98e6c705e676babade0897 attempts to handle
"stub loop" by switching to the next server *after the query has
been made*.

The approach may be good enough for link scopes. However, for the
manager / global scope, it is not. First of all, there are more than
one types (SYSTEM and FALLBACK) of servers it can use. Also, whether
those of type FALLBACK should be used depends.

Besides, dns_scope_good_domain() determines whether things should
be routed to a scope by checking whether the scope has a server.
The decision made would be incorrect if stubs were not filtered
beforehand.

Therefore, to avoid failing query unnecessarily, and to make sure
that extra stub listeners will not trigger unexpected and/or
inconsistent behavior, make manager_get_dns_server() do what it
should have done.

2 years agoman: make systemd-creds man page a bit easier to read 21752/head
Zbigniew Jędrzejewski-Szmek [Sun, 12 Dec 2021 17:56:07 +0000 (18:56 +0100)] 
man: make systemd-creds man page a bit easier to read

2 years agoshared/creds: print debugging information when something goes wrong
Zbigniew Jędrzejewski-Szmek [Sun, 12 Dec 2021 17:55:36 +0000 (18:55 +0100)] 
shared/creds: print debugging information when something goes wrong

2 years agobuild(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0
dependabot[bot] [Mon, 13 Dec 2021 09:16:09 +0000 (09:16 +0000)] 
build(deps): bump actions/upload-artifact from 2.2.4 to 2.3.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.2.4 to 2.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/27121b0bdffd731efa15d66772be8dc71245d074...da838ae9595ac94171fa2d4de5a2f117b3e7ac32)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #21749 from nabijaczleweli/bashpsko
Luca Boccassi [Mon, 13 Dec 2021 11:11:39 +0000 (11:11 +0000)] 
Merge pull request #21749 from nabijaczleweli/bashpsko

Shebang bash via env

2 years agobuild(deps): bump github/codeql-action from 1.0.25 to 1.0.26
dependabot[bot] [Mon, 13 Dec 2021 09:16:01 +0000 (09:16 +0000)] 
build(deps): bump github/codeql-action from 1.0.25 to 1.0.26

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.25 to 1.0.26.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/546b30f35ae5a3db0e0be1843008c2224f71c3b0...5f532563584d71fdef14ee64d17bafb34f751ce5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agotest: bump timeout for TEST-50-DISSECT and TEST-67-INTEGRITY
Luca Boccassi [Sun, 12 Dec 2021 23:42:58 +0000 (23:42 +0000)] 
test: bump timeout for TEST-50-DISSECT and TEST-67-INTEGRITY

TEST-67-INTEGRITY times out quite often, and when it passes
it does so a few seconds short of the timeout. It's a slow
qemu test, so bump the timeout.
TEST-50-DISSECT has been reported to fail in the same way
on Debian's infrastructure, again narrowly failing or passing
just short of the timeout.

2 years agoman: reorder item
Zbigniew Jędrzejewski-Szmek [Sun, 12 Dec 2021 16:44:45 +0000 (17:44 +0100)] 
man: reorder item

We said that recovery keys are "similar to regular passphrases"
before intorducing "regular passphrases".

2 years agoman/sd-run: /bin/bash -> bash in -t example 21749/head
наб [Sun, 12 Dec 2021 19:30:26 +0000 (20:30 +0100)] 
man/sd-run: /bin/bash -> bash in -t example

sd-run already does PATH lookup via find_executable_full()

2 years agoman/sd-notify: /bin/bash -> /bin/sh, read -> read -r in example
наб [Sun, 12 Dec 2021 19:28:39 +0000 (20:28 +0100)] 
man/sd-notify: /bin/bash -> /bin/sh, read -> read -r in example

2 years agoChange all fixed-path bash shebangs to /u/b/env bash outside test/
наб [Sun, 12 Dec 2021 19:27:04 +0000 (20:27 +0100)] 
Change all fixed-path bash shebangs to /u/b/env bash outside test/

2 years agoDisable exporting D-Bus Introspection XML if cross-compiling
igo95862 [Sat, 11 Dec 2021 10:59:17 +0000 (13:59 +0300)] 
Disable exporting D-Bus Introspection XML if cross-compiling

This is a soft disable. Passing `dbus-interfaces-dir` build option
will with path or 'yes' enable exports again even when cross
compiling. (maybe your environment will allow to execute
cross compiled binaries)

2 years agoEnable /dev/sgx_vepc access for the group 'sgx'
Jarkko Sakkinen [Sat, 11 Dec 2021 04:39:59 +0000 (06:39 +0200)] 
Enable /dev/sgx_vepc access for the group 'sgx'

Enable /dev/sgx_vepc access for the group 'sgx', which allows KVM-backed VMs
to host Intel Software Guard eXtension (SGX) enclaves. The upcoming QEMU
6.2 uses /dev/sgx_vepc to reserve portions of Enclave Page Cache (EPC) for
VMs. EPC is the reserved physical memory used for hosting enclaves.

2 years agoMerge pull request #21614 from medhefgo/boot-bcd
Zbigniew Jędrzejewski-Szmek [Sun, 12 Dec 2021 08:18:26 +0000 (09:18 +0100)] 
Merge pull request #21614 from medhefgo/boot-bcd

boot: Add BCD store parser

2 years agomeson: Drop meson version compare for fuzz test
Jan Janssen [Sat, 11 Dec 2021 22:08:20 +0000 (23:08 +0100)] 
meson: Drop meson version compare for fuzz test

We are depending on meson >= 0.53.2 now, so this check can be dropped.

2 years agotest: Add BCD unit test 21614/head
Jan Janssen [Fri, 10 Dec 2021 10:55:38 +0000 (11:55 +0100)] 
test: Add BCD unit test

2 years agoboot: Remove unused memmem_safe
Jan Janssen [Thu, 2 Dec 2021 12:16:33 +0000 (13:16 +0100)] 
boot: Remove unused memmem_safe

2 years agoboot: Add BCD store parser
Jan Janssen [Thu, 2 Dec 2021 12:07:23 +0000 (13:07 +0100)] 
boot: Add BCD store parser

This replaces the memmem-based approach of finding a suitable title
for the windows boot manager with one that actually parses the BCD
store. It's probably faster but more importantly, it's more correct.

The memmem approach may detect stale title strings that are still
in the file but unused due to the way registry hives are updated.
This approach also allows us to detect if the BCD store is multi-boot
so that we can fall back on the generic one instead.

2 years agoboot: Make OFFSETOF lowercase
Jan Janssen [Fri, 10 Dec 2021 09:53:35 +0000 (10:53 +0100)] 
boot: Make OFFSETOF lowercase

This is more in line with the userspace offsetof.

2 years agoboot: Add strncasecmpa helper function
Jan Janssen [Thu, 2 Dec 2021 12:06:07 +0000 (13:06 +0100)] 
boot: Add strncasecmpa helper function

2 years agomeson: Fix gnu-efi detection for clang
Jan Janssen [Sat, 11 Dec 2021 12:47:21 +0000 (13:47 +0100)] 
meson: Fix gnu-efi detection for clang

The gnu-efi headers emit some warnings in clang when not compiled with
-ffreestanding. This is normally not an issue for has_header_symbol()
unless meson is run with CFLAGS="-Werror". Note that this differs
from the --werror option, which does not get passed to clang.

Work around this by adding some compile args to the has_header_symbol()
invocation.

2 years agoMerge pull request #21664 from yuwata/network-tunnel-cleanups 21709/head
Zbigniew Jędrzejewski-Szmek [Sat, 11 Dec 2021 16:17:40 +0000 (17:17 +0100)] 
Merge pull request #21664 from yuwata/network-tunnel-cleanups

network: several cleanups for tunnel device

2 years agoMerge pull request #21570 from AdrianVovk/stub-global-creds
Zbigniew Jędrzejewski-Szmek [Sat, 11 Dec 2021 14:59:10 +0000 (15:59 +0100)] 
Merge pull request #21570 from AdrianVovk/stub-global-creds

stub: Load credentials from \loader\credentials\*.cred

2 years agonamespace: allow overriding /run with a TemporaryFileSystem=
Topi Miettinen [Tue, 7 Dec 2021 20:34:17 +0000 (22:34 +0200)] 
namespace: allow overriding /run with a TemporaryFileSystem=

Lower priority of RUN, so that TMPFS and especially the mount flags given with
`TemporaryFileSystem=` are used.

This allows making `/run` private with drop-ins such as:
```
[Service]
BindReadOnlyPaths=/run/systemd:/run/systemd:norbind
TemporaryFileSystem=/run:nodev,noexec,nosuid,rw,size=32k,nr_inodes=10,mode=0755
```

2 years agoMerge pull request #21727 from medhefgo/ld
Zbigniew Jędrzejewski-Szmek [Sat, 11 Dec 2021 14:55:35 +0000 (15:55 +0100)] 
Merge pull request #21727 from medhefgo/ld

ci: Build test with different linkers

2 years agoMerge pull request #20598 from tomty89/order_noauto
Zbigniew Jędrzejewski-Szmek [Sat, 11 Dec 2021 13:06:38 +0000 (14:06 +0100)] 
Merge pull request #20598 from tomty89/order_noauto

fstab-generator, core/mount: Avoid special fs target before dependency only if nofail is used

2 years agoMerge pull request #21731 from yuwata/test-62-bpf-framework
Luca Boccassi [Sat, 11 Dec 2021 10:46:46 +0000 (10:46 +0000)] 
Merge pull request #21731 from yuwata/test-62-bpf-framework

test: fix TEST-62

2 years agomeson: Auto detect efi-ld 21727/head
Jan Janssen [Sat, 11 Dec 2021 10:29:30 +0000 (11:29 +0100)] 
meson: Auto detect efi-ld

2 years agoci: Build test with different linkers
Jan Janssen [Fri, 10 Dec 2021 17:28:33 +0000 (18:28 +0100)] 
ci: Build test with different linkers

2 years agotest: add missing section for Description= 21731/head
Yu Watanabe [Sat, 11 Dec 2021 02:55:03 +0000 (11:55 +0900)] 
test: add missing section for Description=

2 years agotest: fix grepping fixed string starts from hyphen
Yu Watanabe [Sat, 11 Dec 2021 02:54:01 +0000 (11:54 +0900)] 
test: fix grepping fixed string starts from hyphen

Follow-up for 85445fba22b2f81853a3f018ed1f28864cef37fc.

Fixes #21718.

2 years agonetwork-generator: support link6 network configuration
Jonas Jelten [Fri, 10 Dec 2021 23:12:08 +0000 (00:12 +0100)] 
network-generator: support link6 network configuration

this just brings up an interface in order to have IPv6 link local
connectivity.

2 years agoExport systemd-networkd D-Bus XML introspection
igo95862 [Fri, 10 Dec 2021 16:22:23 +0000 (19:22 +0300)] 
Export systemd-networkd D-Bus XML introspection

2 years agostub: Load credentials from \loader\credentials\*.cred 21570/head
Adrian Vovk [Wed, 8 Dec 2021 02:21:40 +0000 (21:21 -0500)] 
stub: Load credentials from \loader\credentials\*.cred

Some types of credentials that a user would want to pass
into the initrd do not depend on the specific kernel/initrd
version. For instance, this can include SSH keys, rootfs
encryption keys, dm-integrity keys, and so on. This
introduces a directory where such credentials can be placed
so that any kernel image will load them

2 years agoMerge pull request #21722 from yuwata/bpf-framework
Zbigniew Jędrzejewski-Szmek [Fri, 10 Dec 2021 16:18:24 +0000 (17:18 +0100)] 
Merge pull request #21722 from yuwata/bpf-framework

build: include BPF_FRAMEWORK in version string

2 years agoMerge pull request #21708 from mrc0mmand/mkosi-ci-improvements
Frantisek Sumsal [Fri, 10 Dec 2021 13:50:55 +0000 (13:50 +0000)] 
Merge pull request #21708 from mrc0mmand/mkosi-ci-improvements

ci: check for failed services after boot

2 years agotest: addresses shell check warning 21722/head
Yu Watanabe [Fri, 10 Dec 2021 11:07:35 +0000 (20:07 +0900)] 
test: addresses shell check warning

This fixes the following warning:
-----
In /github/workspace/test/units/testsuite-62.sh line 39:
KERNEL_MINOR="${KERNEL_VERSION#$KERNEL_MAJOR.}"
                               ^-----------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"

2 years agotest: skip TEST-62 if bpf-framework is not supported
Yu Watanabe [Fri, 10 Dec 2021 10:51:23 +0000 (19:51 +0900)] 
test: skip TEST-62 if bpf-framework is not supported

Fixes #21718.

2 years agobuild: include BPF_FRAMEWORK tag in version string
Yu Watanabe [Fri, 10 Dec 2021 10:50:51 +0000 (19:50 +0900)] 
build: include BPF_FRAMEWORK tag in version string