]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agomeson: Get objcopy location from compiler 21928/head
Jan Janssen [Wed, 29 Dec 2021 14:13:35 +0000 (15:13 +0100)] 
meson: Get objcopy location from compiler

3 years agomeson: Remove efi-cc option
Jan Janssen [Wed, 29 Dec 2021 14:02:04 +0000 (15:02 +0100)] 
meson: Remove efi-cc option

Changing the efi compiler this way doesn't really work. The gnu-efi
header checks as well as supported compiler flag checks use the
regular cc that meson detects. Changing the compiler this way will
end up with bad compiler flags. For the very same reason, this does
not work with a cross-compiler without going through proper meson
cross-compilation steps either.

The proper way to build systemd-boot with a different compiler is to
use a different build folder and then just use the proper ninja build
target to only build the bootloader/stub.

3 years agobuild(deps): bump meson from 0.60.2 to 0.60.3 in /.github/workflows
dependabot[bot] [Sat, 1 Jan 2022 09:05:41 +0000 (09:05 +0000)] 
build(deps): bump meson from 0.60.2 to 0.60.3 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 0.60.2 to 0.60.3.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.60.2...0.60.3)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoudev: fix ID_NET_NAME_MAC= udev property
Yu Watanabe [Thu, 30 Dec 2021 21:05:21 +0000 (06:05 +0900)] 
udev: fix ID_NET_NAME_MAC= udev property

This fixes a bug introduced by eaba9bb3e69635d2c490c5e1b0d262b763753e1d.

The commit mistakenly drops 'x' in ID_NET_NAME_MAC, and adds colons.
The colons were dropped by the commit dfa4876c417e2a9935d58100d44d94bb41cd5bfb,
but the missing 'x' was not added at that time.

Follow-up for dfa4876c417e2a9935d58100d44d94bb41cd5bfb.

3 years agomeson: fix detection of libcryptsetup functions
Zbigniew Jędrzejewski-Szmek [Thu, 30 Dec 2021 13:51:44 +0000 (14:51 +0100)] 
meson: fix detection of libcryptsetup functions

Meson would generate the following compile test:

  #define crypt_set_metadata_size meson_disable_define_of_crypt_set_metadata_size

  #include <limits.h>
  #undef crypt_set_metadata_size

  #ifdef __cplusplus
  extern "C"
  #endif
  char crypt_set_metadata_size (void);

  #if defined __stub_crypt_set_metadata_size || defined __stub___crypt_set_metadata_size
  fail fail fail this function is not going to work
  #endif

  int main(void) {
    return crypt_set_metadata_size ();
  }

This works fine when the identifier being queried is an actual function. But
crypt_token_max() is an inline function, so getting the address would fail,
leading to a false negative result. Complation would fail because the function
would be defined twice.

With this patch, the check is changed to include the header:

  #include <libcryptsetup.h>
  #include <limits.h>

  #if defined __stub_crypt_set_metadata_size || defined __stub___crypt_set_metadata_size
  fail fail fail this function is not going to work
  #endif

  int main(void) {
    void *a = (void*) &crypt_set_metadata_size;
    long long b = (long long) a;
    return (int) b;
  }

which seems to work correctly.

3 years agoMerge pull request #21940 from yuwata/network-wireguard-mask-allowed-ips
Luca Boccassi [Thu, 30 Dec 2021 21:18:05 +0000 (21:18 +0000)] 
Merge pull request #21940 from yuwata/network-wireguard-mask-allowed-ips

network: wireguard: handle invalid AllowedIPs= gracefully

3 years agonss-systemd: fix required buffer size calculation
Yu Watanabe [Thu, 30 Dec 2021 15:31:51 +0000 (00:31 +0900)] 
nss-systemd: fix required buffer size calculation

This also fixes the pointer assigned to the gr_mem element of struct group.

Fixes a bug introduced by 47fd7fa6c650d7a0ac41bc89747e3b866ffb9534.

Fixes #21935.

3 years agosysusers: use filename if /proc is not mounted
Yu Watanabe [Thu, 30 Dec 2021 15:11:01 +0000 (00:11 +0900)] 
sysusers: use filename if /proc is not mounted

During system install, /proc may not be mounted yet.

Fixes RHBZ#2036217 (https://bugzilla.redhat.com/show_bug.cgi?id=2036217).

3 years agotest-network: add testcase for invalid AllowedIPs= 21940/head
Yu Watanabe [Thu, 30 Dec 2021 17:15:40 +0000 (02:15 +0900)] 
test-network: add testcase for invalid AllowedIPs=

3 years agonetwork: wireguard: warn about invalid allowed IP addresses
Yu Watanabe [Thu, 30 Dec 2021 17:08:56 +0000 (02:08 +0900)] 
network: wireguard: warn about invalid allowed IP addresses

But handle them gracefully. Otherwise, when the route to the address is
being configured, kernel refuse the route.

Note that kernel's wireguard module handle e.g. 192.168.10.3/24 as
192.168.10.0/24.

Fixes #21929.

3 years agonetwork: complete example for xfrm setup
Noel Kuntze [Thu, 30 Dec 2021 11:49:23 +0000 (12:49 +0100)] 
network: complete example for xfrm setup

3 years agosystemd-run: ensure error logs suggest to use '--user' when appropriate
Luca Boccassi [Thu, 30 Dec 2021 00:54:32 +0000 (00:54 +0000)] 
systemd-run: ensure error logs suggest to use '--user' when appropriate

Before:

$ systemd-run --service-type=notify --user false
Job for run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service failed because the control process exited with error code.
See "systemctl status run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" and "journalctl -xeu run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" for details.

After:

$ systemd-run --service-type=notify --user false
Job for run-r7791e380a7b6400ea01d6a0e5a458b23.service failed because the control process exited with error code.
See "systemctl --user status run-r7791e380a7b6400ea01d6a0e5a458b23.service" and "journalctl --user -xeu run-r7791e380a7b6400ea01d6a0e5a458b23.service" for details.

Fixes https://github.com/systemd/systemd/issues/21933

3 years agodbus-wait-for-jobs: add extra_args to bus_wait_for_jobs_one()
Luca Boccassi [Thu, 30 Dec 2021 00:53:29 +0000 (00:53 +0000)] 
dbus-wait-for-jobs: add extra_args to bus_wait_for_jobs_one()

And pass it through to bus_wait_for_jobs()

3 years agoMerge pull request #21922 from medhefgo/boot-fix
Luca Boccassi [Wed, 29 Dec 2021 19:35:42 +0000 (19:35 +0000)] 
Merge pull request #21922 from medhefgo/boot-fix

boot: More BCD parser fixes

3 years agotest: mark partition bootable
Ludwig Nussel [Mon, 27 Dec 2021 09:34:52 +0000 (10:34 +0100)] 
test: mark partition bootable

Make test suite partition bootable so nspawn can use the image directly.
Useful for local testing.

https://systemd.io/DISCOVERABLE_PARTITIONS/

3 years agoboot: Introduce helper macros for offset checking 21922/head
Jan Janssen [Wed, 29 Dec 2021 13:35:07 +0000 (14:35 +0100)] 
boot: Introduce helper macros for offset checking

This fixes a subtle sizeof overflow on 32bit machines.

3 years agoboot: Reject unaligned data
Jan Janssen [Tue, 28 Dec 2021 15:07:09 +0000 (16:07 +0100)] 
boot: Reject unaligned data

The data seems to be properly aligned in real BCD stores, so it
should be fine to just reject bad ones.

Fixes: #21917
3 years agoboot: Build BCD parser only on arches supported by Windows
Jan Janssen [Tue, 28 Dec 2021 12:10:39 +0000 (13:10 +0100)] 
boot: Build BCD parser only on arches supported by Windows

3 years agoMerge pull request #21898 from yuwata/meson-dbus-interfaces-dir
Luca Boccassi [Wed, 29 Dec 2021 12:39:50 +0000 (12:39 +0000)] 
Merge pull request #21898 from yuwata/meson-dbus-interfaces-dir

meson: obtain dbus related directories from pkg-config

3 years agomanager: always close idle pipe when sending ready notification
Yu Watanabe [Wed, 29 Dec 2021 03:04:46 +0000 (12:04 +0900)] 
manager: always close idle pipe when sending ready notification

This fixes a bug introduced by 6d9326595592f98e8126eacb4176acd8c3516d5c.

The commit makes several functions skipped if the manager is already
in finished state, as
> In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
> Those steps are idempotent, but no need to waste cycles trying to do them
> more than once.

However, the idle pipe may be re-opened after manager is finished:
manager_dispatch_run_queue() -> manager_watch_idle_pipe().
So, the closing the pipe is not idempotent here.

Fixes #21889.

3 years agostub: Do not assume having DeviceHandle
ksa678491784 [Tue, 28 Dec 2021 15:09:33 +0000 (18:09 +0300)] 
stub: Do not assume having DeviceHandle

3 years agonetwork: ndisc: ignore route prefix to ::/0
Yu Watanabe [Tue, 28 Dec 2021 13:42:03 +0000 (22:42 +0900)] 
network: ndisc: ignore route prefix to ::/0

Fixes #21912.

3 years agoMerge pull request #21925 from yuwata/unit-file-symlinked-drop-in-directory
Luca Boccassi [Tue, 28 Dec 2021 20:38:24 +0000 (20:38 +0000)] 
Merge pull request #21925 from yuwata/unit-file-symlinked-drop-in-directory

unit-file: fix symlinked drop-in directory handling

3 years agotest: add testcases of symlinked drop-in directories 21925/head
Yu Watanabe [Tue, 28 Dec 2021 15:49:11 +0000 (00:49 +0900)] 
test: add testcases of symlinked drop-in directories

3 years agounti-file: fix symlinked drop-in directory handling
Yu Watanabe [Tue, 28 Dec 2021 15:47:20 +0000 (00:47 +0900)] 
unti-file: fix symlinked drop-in directory handling

This fixes a bug introduced by 95ef0eaf0d5cd43fcc8e9eb541f2c342f25f8f2f.

Fixes #21920.

3 years agomeson: obtain dbus directories from pkg-config 21898/head
Yu Watanabe [Sun, 26 Dec 2021 07:19:17 +0000 (16:19 +0900)] 
meson: obtain dbus directories from pkg-config

3 years agomeson: show dbus interfaces directory in summary
Yu Watanabe [Sun, 26 Dec 2021 01:44:52 +0000 (10:44 +0900)] 
meson: show dbus interfaces directory in summary

3 years agomeson: move dbus-interfaces-dir
Yu Watanabe [Sun, 26 Dec 2021 01:30:28 +0000 (10:30 +0900)] 
meson: move dbus-interfaces-dir

3 years agocore: do not touch /run/systemd/systemd-units-load from user session instances
Luca Boccassi [Mon, 27 Dec 2021 18:22:43 +0000 (18:22 +0000)] 
core: do not touch /run/systemd/systemd-units-load from user session instances

Follow-up for: https://github.com/systemd/systemd/commit/15b9243c0d7f6d1531fa65dbc01bd11e8e6c12ca
Fixes: https://github.com/systemd/systemd/issues/21911
3 years agoMerge pull request #21916 from medhefgo/boot-fix
Luca Boccassi [Tue, 28 Dec 2021 11:48:19 +0000 (11:48 +0000)] 
Merge pull request #21916 from medhefgo/boot-fix

boot: Fixes

3 years agoboot: Fix name length comparison 21916/head
Jan Janssen [Mon, 27 Dec 2021 21:49:02 +0000 (22:49 +0100)] 
boot: Fix name length comparison

3 years agoboot: Fix off-by-one offset sanity checks
Jan Janssen [Mon, 27 Dec 2021 21:46:06 +0000 (22:46 +0100)] 
boot: Fix off-by-one offset sanity checks

3 years agoboot: Fix off-by-one NUL-termination
Jan Janssen [Mon, 27 Dec 2021 21:41:50 +0000 (22:41 +0100)] 
boot: Fix off-by-one NUL-termination

3 years agobuild(deps): bump github/super-linter from 4.8.4 to 4.8.5
dependabot[bot] [Mon, 27 Dec 2021 09:14:40 +0000 (09:14 +0000)] 
build(deps): bump github/super-linter from 4.8.4 to 4.8.5

Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.4 to 4.8.5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/563be7dc5568017515b9e700329e9c6d3862f2b7...b8641364ca9a79b3cf07f3c4c59a82709cd39094)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agochrattr-util: return EOPNOTSUPP from chrattr_full if no other failure was observed
Luca Boccassi [Sun, 26 Dec 2021 16:45:13 +0000 (16:45 +0000)] 
chrattr-util: return EOPNOTSUPP from chrattr_full if no other failure was observed

When chattr_full tries to apply flags one-by-one, and one fails,
record which errno was returned. But record EOPNOTSUPP(&friends)
only if no other error is observed, and return it only in that case
(otherwise keep returning ENOANO), so that callers can respond
appropriately to EOPNOTSUPP vs more relevant errors.
For example, this lets tmpfiles.d log at debug level when a filesystem
flag cannot be applied because the filesystem does not support it,
but at warning level if something else went wrong when applying it.
Restores logging behaviour of tmpfiles.d to pre-250.

Follow-up for: https://github.com/systemd/systemd/commit/c1631ee124a30abfb9c71e2a1534b8afffc3b6a7

Fixes: https://github.com/systemd/systemd/issues/21901
3 years agoMerge pull request #21881 from yuwata/update-linux-headers
Luca Boccassi [Sun, 26 Dec 2021 17:30:47 +0000 (17:30 +0000)] 
Merge pull request #21881 from yuwata/update-linux-headers

Update linux headers

3 years agoMerge pull request #21892 from yuwata/network-vxlan-automatic-local-address-selection
Luca Boccassi [Sun, 26 Dec 2021 17:27:41 +0000 (17:27 +0000)] 
Merge pull request #21892 from yuwata/network-vxlan-automatic-local-address-selection

network: vxlan: automatic local address selection

3 years agoci: replace apt-key with signed-by
Evgeny Vereshchagin [Sun, 26 Dec 2021 01:11:00 +0000 (01:11 +0000)] 
ci: replace apt-key with signed-by

to limit the scope of the key to apt.llvm.org only.

This is mostly inspired by https://blog.cloudflare.com/dont-use-apt-key/

3 years agohwdb: 60-keyboard: Fix volume-button mapping on Asus TF103C
Hans de Goede [Sat, 25 Dec 2021 10:19:03 +0000 (11:19 +0100)] 
hwdb: 60-keyboard: Fix volume-button mapping on Asus TF103C

The Asus TF103C misses the home button in its PNP0C40 GPIO resources
causing the button mappings for the volume buttons to be off by one,
leading to the volume-up button sending home button presses and the
volume-down button sending volume-up button presses.

Add a 60-keyboard hwdb entry to correct the mappings. Note this is
split over 2 input devices because the soc_button_array driver
creates separate input devices for power + home and vol up/down.
This is done because power/home act as wakeup buttons where as
the volume buttons do not.

This means that after this fixup the home -> volume-up button
still acts as a wakeup button, there is nothing which can be done
about this without adding a kludge to the kernel which is not
worth the trouble (IMHO).

3 years agorandom-util: use ssize_t for getrandom return value
Mike Gilbert [Sat, 25 Dec 2021 00:20:36 +0000 (19:20 -0500)] 
random-util: use ssize_t for getrandom return value

This matches the prototype provided by glibc.

3 years agomeson: don't try to guess versioned clang/llvm-strip bins for cross compile
James Hilliard [Sat, 25 Dec 2021 10:16:57 +0000 (03:16 -0700)] 
meson: don't try to guess versioned clang/llvm-strip bins for cross compile

This should simplify overriding the program locations as the binary
names should now not change if cross compiling.

It's likely any attempts at autodetecting these in cross environments will
be brittle at best so lets just disable it.

3 years agotree-wide: fix typo
Yu Watanabe [Sat, 25 Dec 2021 09:08:39 +0000 (18:08 +0900)] 
tree-wide: fix typo

3 years agoMerge pull request #21774 from keszybz/make-libcore-shared-and-add-lib-tag-option
Yu Watanabe [Sat, 25 Dec 2021 09:02:54 +0000 (18:02 +0900)] 
Merge pull request #21774 from keszybz/make-libcore-shared-and-add-lib-tag-option

Make libcore shared and add private shared lib tag option

3 years agoMerge pull request #21765 from yuwata/udev-warn-truncation
Yu Watanabe [Sat, 25 Dec 2021 09:02:32 +0000 (18:02 +0900)] 
Merge pull request #21765 from yuwata/udev-warn-truncation

udev: warn string truncation

3 years agoshared/linux: update linux headers from v5.16-rc6 21881/head
Yu Watanabe [Fri, 24 Dec 2021 02:23:11 +0000 (11:23 +0900)] 
shared/linux: update linux headers from v5.16-rc6

3 years agobasic/linux: update linux headers from v5.16-rc6
Yu Watanabe [Fri, 24 Dec 2021 02:14:54 +0000 (11:14 +0900)] 
basic/linux: update linux headers from v5.16-rc6

3 years agotest-network: add testcase for vxlan local address auto selection 21892/head
Yu Watanabe [Sun, 12 Dec 2021 04:58:13 +0000 (13:58 +0900)] 
test-network: add testcase for vxlan local address auto selection

3 years agonetwork: vxlan: support to select an address assigned on underlying interface as...
Yu Watanabe [Sun, 12 Dec 2021 04:28:06 +0000 (13:28 +0900)] 
network: vxlan: support to select an address assigned on underlying interface as local address

3 years agoMerge pull request #20833 from pdmorrow/onfailure_env
Yu Watanabe [Sat, 25 Dec 2021 06:29:42 +0000 (15:29 +0900)] 
Merge pull request #20833 from pdmorrow/onfailure_env

service: pass exiting service state to triggered On{Failure,Success}= dependencies

3 years agotest: ignore the error about our own libraries missing during image creation 21774/head
Zbigniew Jędrzejewski-Szmek [Wed, 15 Dec 2021 08:14:44 +0000 (09:14 +0100)] 
test: ignore the error about our own libraries missing during image creation

19:50:59 F: Missing a shared library required by /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so.
19:50:59 F: Run "ldd /var/tmp/systemd-test.NIPT2q/root/lib/systemd/libsystemd-core-250.so" to find out what it is.
19:50:59 F: libsystemd-shared-250.so => not found
19:50:59 F: Cannot create a test image.

3 years agomeson: allow specifying a custom "tag" for the private shared libaries
Zbigniew Jędrzejewski-Szmek [Tue, 14 Dec 2021 17:03:06 +0000 (18:03 +0100)] 
meson: allow specifying a custom "tag" for the private shared libaries

We have /usr/lib/systemd/libsystemd-{shared,core}-nnn.so. With this
path the 'nnn' part can be changed to something different. The idea
is that during a package build this will be set to the package version.

This way during in-place upgrades with the same major version both
the new and old libraries can cooexit. This should fix the issue
when systemd programs are called during package upgrades and fail
to exec because the expect different symbols in the library they
are linked to.

This should fix https://bugzilla.redhat.com/show_bug.cgi?id=1906010.

3 years agomeson: create new libsystemd-core.so private shared library
Zbigniew Jędrzejewski-Szmek [Tue, 14 Dec 2021 12:20:28 +0000 (13:20 +0100)] 
meson: create new libsystemd-core.so private shared library

The scheme is very similar to libsystemd-shared.so: instead of building a
static library, we build a shared library from the same objects and link the
two users to it. Both systemd and systemd-analyze consist mostly of the fairly
big code in libcore, so we save a bit on the installation:

(-0g, no strip)
-rwxr-xr-x 5238864 Dec 14 12:52 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 5399600 Dec 14 12:52 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  244912 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  461224 Dec 14 13:17 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 5271568 Dec 14 13:17 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

(-0g, strip)
-rwxr-xr-x 2522080 Dec 14 13:19 /var/tmp/inst1/usr/lib/systemd/systemd
-rwxr-xr-x 2604160 Dec 14 13:19 /var/tmp/inst1/usr/bin/systemd-analyze
-rwxr-xr-x  113304 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/systemd
-rwxr-xr-x  207656 Dec 14 13:19 /var/tmp/inst2/usr/bin/systemd-analyze
-rwxr-xr-x 2648520 Dec 14 13:19 /var/tmp/inst2/usr/lib/systemd/libsystemd-core-250.so

So for systemd itself we grow a bit (2522080 → 2648520+113304=2761824), but
overall we save. The most is saved on all the test files that link to libcore,
if they are installed, because there's 15 of them:

$ du -s /var/tmp/inst?
220096 /var/tmp/inst1
122960 /var/tmp/inst2

I also considered making systemd-analyze a symlink to /usr/lib/systemd/systemd
and turning systemd into a multicall binary. We did something like this with
udevd and udevadm. But that solution doesn't fit well in this case.
systemd-analyze has a bunch of functionality that is not used in systemd,
so the systemd binary would need to grow quite a bit. And we're likely to
add new types of verification or introspection features in analyze, and this
baggage would only grow. In addition, there are the test binaries which also
benefit from this.

3 years agotest: add test for truncation of program result invoked by udev 21765/head
Yu Watanabe [Mon, 13 Dec 2021 23:31:23 +0000 (08:31 +0900)] 
test: add test for truncation of program result invoked by udev

3 years agoudev: refuse to process line when invalid program output is obtained
Yu Watanabe [Wed, 15 Dec 2021 22:49:18 +0000 (07:49 +0900)] 
udev: refuse to process line when invalid program output is obtained

3 years agoudev: do not import property value from truncated line of program result
Yu Watanabe [Wed, 15 Dec 2021 22:47:24 +0000 (07:47 +0900)] 
udev: do not import property value from truncated line of program result

3 years agoudev: warn about truncation of program result
Yu Watanabe [Mon, 13 Dec 2021 23:21:58 +0000 (08:21 +0900)] 
udev: warn about truncation of program result

Closes #21078.

3 years agoudev: warn when result of string substitution is truncated
Yu Watanabe [Mon, 13 Dec 2021 23:05:41 +0000 (08:05 +0900)] 
udev: warn when result of string substitution is truncated

3 years agotest: add tests for strnpcpy_full() and friends
Yu Watanabe [Wed, 15 Dec 2021 21:19:28 +0000 (06:19 +0900)] 
test: add tests for strnpcpy_full() and friends

3 years agoutil: introduce strnpcpy_full() and friends to provide whether result is truncated...
Yu Watanabe [Mon, 13 Dec 2021 22:33:53 +0000 (07:33 +0900)] 
util: introduce strnpcpy_full() and friends to provide whether result is truncated or not

3 years agoMerge pull request #21868 from lucab/ups/factory-locale-conf
Yu Watanabe [Sat, 25 Dec 2021 06:09:35 +0000 (15:09 +0900)] 
Merge pull request #21868 from lucab/ups/factory-locale-conf

factory: populate /etc/locale.conf with systemd build-time setting

3 years agoMerge pull request #21762 from yuwata/udev-ctrl-do-not-kill
Yu Watanabe [Sat, 25 Dec 2021 06:08:13 +0000 (15:08 +0900)] 
Merge pull request #21762 from yuwata/udev-ctrl-do-not-kill

udev: do not kill "udevadm control" processes in the same cgroup

3 years agobus-dump: change capture output to use pcapng (#21738)
Stephen Hemminger [Sat, 25 Dec 2021 06:07:40 +0000 (22:07 -0800)] 
bus-dump: change capture output to use pcapng (#21738)

This patch changes busctl capture to generate pcapng format
instead of the legacy pcap format files. It includes basic
meta-data in the file and still uses microsecond time
resolution. In future, more things can be added such as
high resolution timestams, statistics, etc.

PCAP Next Generation capture file format is what tshark uses
and is in process of being standardized in IETF. It is also
readable with libpcap.

$ capinfos /tmp/new.pcapng
File name:           /tmp/new.pcapng
File type:           Wireshark/... - pcapng
File encapsulation:  D-Bus
File timestamp precision:  microseconds (6)
Packet size limit:   file hdr: (not set)
Packet size limit:   inferred: 4096 bytes
Number of packets:   22
File size:           21kB
Data size:           20kB
Capture duration:    0.005694 seconds
First packet time:   2021-12-11 11:57:42.788374
Last packet time:    2021-12-11 11:57:42.794068
Data byte rate:      3,671kBps
Data bit rate:       29Mbps
Average packet size: 950.27 bytes
Average packet rate: 3,863 packets/s
SHA256:              b85ed8b094af60c64aa6d9db4a91404e841736d36b9e662d707db9e4096148f1
RIPEMD160:           81f9bac7ec0ec5cd1d55ede136a5c90413894e3a
SHA1:                8400822ef724b934d6000f5b7604b9e6e91be011
Strict time order:   True
Capture oper-sys:    Linux 5.14.0-0.bpo.2-amd64
Capture application: systemd 250 (250-rc2-33-gdc79ae2+)
Number of interfaces in file: 1
Interface #0 info:
                     Encapsulation = D-Bus (146 - dbus)
                     Capture length = 4096
                     Time precision = microseconds (6)
                     Time ticks per second = 1000000
                     Number of stat entries = 0
                     Number of packets = 22

3 years agoMerge pull request #21737 from yuwata/network-wait-dsa-master-up
Yu Watanabe [Sat, 25 Dec 2021 06:05:36 +0000 (15:05 +0900)] 
Merge pull request #21737 from yuwata/network-wait-dsa-master-up

network: wait for DSA master up

3 years agoMerge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection
Yu Watanabe [Sat, 25 Dec 2021 06:05:13 +0000 (15:05 +0900)] 
Merge pull request #21648 from yuwata/network-tunnel-local-automatic-address-selection

network: tunnel: automatic local address selection

3 years agoMerge pull request #21871 from keszybz/meson-sbat-report
Yu Watanabe [Sat, 25 Dec 2021 06:03:50 +0000 (15:03 +0900)] 
Merge pull request #21871 from keszybz/meson-sbat-report

Report sbat settings in meson summary

3 years agoMerge pull request #21888 from mrc0mmand/ci-more-build-coverage
Yu Watanabe [Sat, 25 Dec 2021 06:03:08 +0000 (15:03 +0900)] 
Merge pull request #21888 from mrc0mmand/ci-more-build-coverage

ci: test build with supported cryptolibs to some degree

3 years agolist: drop unnecessary line continuation
Yu Watanabe [Fri, 24 Dec 2021 10:21:16 +0000 (19:21 +0900)] 
list: drop unnecessary line continuation

Fixes #21886.

3 years agoci: test build with supported cryptolibs to some degree 21888/head
Frantisek Sumsal [Fri, 24 Dec 2021 10:50:37 +0000 (11:50 +0100)] 
ci: test build with supported cryptolibs to some degree

Let's assign a specific -Dcryptolib= value to each job to have at least
some coverage for all supported cryptolibs without unnecessarily
multiplying the test matrix.

Should provide coverage for #21880.

3 years agoci: drop build test with -O2, since it's covered by -O3 tests
Frantisek Sumsal [Fri, 24 Dec 2021 10:45:51 +0000 (11:45 +0100)] 
ci: drop build test with -O2, since it's covered by -O3 tests

3 years agomeson: fix build with -Dcryptolib=openssl -Ddns-over-tls=false
Yu Watanabe [Fri, 24 Dec 2021 01:06:13 +0000 (10:06 +0900)] 
meson: fix build with -Dcryptolib=openssl -Ddns-over-tls=false

Previously, when -Ddns-over-tls=false, libopenssl was missing in the
dependency of resolved.
Also, this drops libgpg_error when it is not necessary.

Replaces #21878.

3 years agoman: also add anotations for methods
Yu Watanabe [Fri, 24 Dec 2021 05:52:44 +0000 (14:52 +0900)] 
man: also add anotations for methods

Fixes #21882.

3 years agomissing-syscall: define all MOUNT_ATTR_* if missing
Yu Watanabe [Fri, 24 Dec 2021 00:15:51 +0000 (09:15 +0900)] 
missing-syscall: define all MOUNT_ATTR_* if missing

Fixes #21876.

3 years agoNEWS: finalize release v250
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 12:32:03 +0000 (13:32 +0100)] 
NEWS: finalize release

3 years agoanalyze: fix segfault when malloc() fails (#21874)
Yu Watanabe [Thu, 23 Dec 2021 20:03:16 +0000 (05:03 +0900)] 
analyze: fix segfault when malloc() fails (#21874)

Fixes #21872.

log_syntax_callback sets 's', a.k.a. '*userdata', to POINTER_MAX to signal allocation failure.
If the error does not cause immediate failure of the program, and log_syntax_callback is called
again, it would try to use 's' as a pointer to a set and fail badly.

3 years agoMerge pull request #21869 from yuwata/sd-journal-fix-segfault
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 19:07:41 +0000 (20:07 +0100)] 
Merge pull request #21869 from yuwata/sd-journal-fix-segfault

sd-journal: fix segfault

3 years agomeson: report SBAT settings 21871/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 12:19:42 +0000 (13:19 +0100)] 
meson: report SBAT settings

3 years agoMerge pull request #21870 from keszybz/cleanup-and-comments
Luca Boccassi [Thu, 23 Dec 2021 17:43:37 +0000 (17:43 +0000)] 
Merge pull request #21870 from keszybz/cleanup-and-comments

Use _cleanup_ and adjust comments

3 years agofactory/locale.conf: mention systemd ownership 21868/head
Luca BRUNO [Thu, 23 Dec 2021 12:35:26 +0000 (12:35 +0000)] 
factory/locale.conf: mention systemd ownership

This explicitly mentions that comments and empty lines are supported
(and ignored) in /etc/locale.conf. It then adds ownership reference
to the factory default.

3 years agomeson: move efi summary() section to src/boot/efi
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 12:05:01 +0000 (13:05 +0100)] 
meson: move efi summary() section to src/boot/efi

This way we can add the entries more naturally in the same place where
they are defined.

3 years agomeson: move efi file lists closer to where they are used
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 11:55:40 +0000 (12:55 +0100)] 
meson: move efi file lists closer to where they are used

The goal is to have the detection of features and paths done first, and
then the build target constructions second.

3 years agosrc/basic: adjust grammar in comments 21870/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 12:26:09 +0000 (13:26 +0100)] 
src/basic: adjust grammar in comments

3 years agoshared: re-wrap comment
Zbigniew Jędrzejewski-Szmek [Fri, 17 Dec 2021 15:04:33 +0000 (16:04 +0100)] 
shared: re-wrap comment

3 years agohostname: use _cleanup_ in one more place
Zbigniew Jędrzejewski-Szmek [Fri, 17 Dec 2021 14:22:18 +0000 (15:22 +0100)] 
hostname: use _cleanup_ in one more place

3 years agosd-journal: fix segfault when match_new() fails 21869/head
Yu Watanabe [Thu, 23 Dec 2021 12:45:29 +0000 (21:45 +0900)] 
sd-journal: fix segfault when match_new() fails

Fixes #21867.

3 years agosd-journal: free incomplete match on failure
Yu Watanabe [Thu, 23 Dec 2021 12:35:29 +0000 (21:35 +0900)] 
sd-journal: free incomplete match on failure

3 years agoMerge pull request #21866 from yuwata/update-hwdb-and-news-v250
Zbigniew Jędrzejewski-Szmek [Thu, 23 Dec 2021 12:30:26 +0000 (13:30 +0100)] 
Merge pull request #21866 from yuwata/update-hwdb-and-news-v250

Update hwdb and news for v250

3 years agoboot: Use correct handle to find TextInputEx protocol
Jan Janssen [Tue, 21 Dec 2021 16:10:42 +0000 (17:10 +0100)] 
boot: Use correct handle to find TextInputEx protocol

LibLocateProtocol will return the protocol for the first device that
supports it. But it may not actually come from the ConIn device that
we want to use here.

This should be the root cause of what was previously considered just
broken firmware. If you ask the wrong device to return some key, of
course it will never provide one.

This changes the way we handle input yet again in light of this new
knowledge and because using the correct TextInputEx with fallback to
ConIn can actually create double input in some cases.

Since we are now confident that we get the right TextInputEx, we can
use that exclusively, only falling back to ConIn if the console input
device does not support the better interface (the spec is pretty clear
that it must support it, though).

Because some firmware is broken, we still need to provide a fallback
to the previously used TextInputEx thats overrides ConIn/ConInEx if
it is functional.

3 years agofactory: populate /etc/locale.conf with systemd build-time setting
Luca BRUNO [Thu, 23 Dec 2021 11:01:07 +0000 (11:01 +0000)] 
factory: populate /etc/locale.conf with systemd build-time setting

This adds /etc/locale.conf to the set of configuration files
populated by tmpfiles.d factory /etc handling.
In particular, the build-time locale configuration in systemd is
now wired to a /usr factory file, and installed to the system.
On boot, if other locale customization tools did not write
/etc/locale.conf on the system, the factory default file gets
copied to /etc by systemd-tmpfiles.
This is done in order to avoid skews between different system
components when no locale settings are configured. At that point,
systemd can safely act as the fallback owner of /etc/locale.conf.

3 years agoNEWS: update contributors list and release date 21866/head
Yu Watanabe [Thu, 23 Dec 2021 10:40:32 +0000 (19:40 +0900)] 
NEWS: update contributors list and release date

3 years agohwdb: update hwdb for v250-final
Yu Watanabe [Thu, 23 Dec 2021 10:36:06 +0000 (19:36 +0900)] 
hwdb: update hwdb for v250-final

Generated by `meson compile -C build update-hwdb update-hwdb-autosuspend`.

3 years agomachined: set TTYPath for container shell
Ludwig Nussel [Tue, 21 Dec 2021 10:38:49 +0000 (11:38 +0100)] 
machined: set TTYPath for container shell

TTYPath is needed for proper utmp registration of the shell to
receive wall messages.

3 years agoman: reindent and rebreak systemd.network
Yu Watanabe [Thu, 23 Dec 2021 07:49:42 +0000 (16:49 +0900)] 
man: reindent and rebreak systemd.network

Also fixes the following:
- IPServiceType= is moved to [DHCPv4] section,
- drop an incorrect sentence in RouteMTUBytes= in [DHCPv4] section.
- drop unnecessary word 'unsigned'.

3 years agomeson: fix typo
Yu Watanabe [Thu, 23 Dec 2021 08:01:55 +0000 (17:01 +0900)] 
meson: fix typo

3 years agoanalyze: do not connect to DBUS with --offline
Luca Boccassi [Wed, 22 Dec 2021 18:31:15 +0000 (18:31 +0000)] 
analyze: do not connect to DBUS with --offline

Co-authored-by: Lucas Werkmeister <mail@lucaswerkmeister.de>
3 years agoMerge pull request #21858 from yuwata/fix-test-home
Luca Boccassi [Wed, 22 Dec 2021 16:14:53 +0000 (16:14 +0000)] 
Merge pull request #21858 from yuwata/fix-test-home

test: workaround for TEST-46-HOMED

3 years agoboot: Use -fvisibility=hidden instead of -fwhole-program
Jan Janssen [Wed, 22 Dec 2021 12:35:05 +0000 (13:35 +0100)] 
boot: Use -fvisibility=hidden instead of -fwhole-program

It's functionally the same for sd-boot, but using visibilty
is generally preferred over whole-program.

3 years agomeson: make it compatible with AFL and honggfuzz again
Evgeny Vereshchagin [Tue, 21 Dec 2021 21:05:10 +0000 (21:05 +0000)] 
meson: make it compatible with AFL and honggfuzz again

afl-clang and hufzz-clang try to instrument the code and the
underlying compilers don't like it. It should probably be
fixed in both afl and honggfuzz eventually but until then
let's just use "raw" clang to build bpf-skeletons.

It's a follow-up to https://github.com/systemd/systemd/pull/21607

3 years agotest: wait for user inactive 21858/head
Yu Watanabe [Wed, 22 Dec 2021 07:52:47 +0000 (16:52 +0900)] 
test: wait for user inactive

The user may be busy when auto-rebalancing the user's home device.

Workaround for #21589.

---
Dec 01 15:03:15 H systemd-homework[1078]: Provided password unlocks user record.
Dec 01 15:03:15 H systemd-homework[1078]: Image file '/home/test-user.home' already locked, can't use.
Dec 01 15:03:15 H systemd-homed[240]: Worker reported error code EADDRINUSE.
Dec 01 15:03:15 H systemd-homed[240]: Activation failed: Address already in use
---

3 years agotest: remove test-user2
Yu Watanabe [Wed, 22 Dec 2021 06:43:05 +0000 (15:43 +0900)] 
test: remove test-user2

Otherwise, we cannot run the test multiple times.

3 years agohome: update log message
Yu Watanabe [Wed, 22 Dec 2021 08:11:31 +0000 (17:11 +0900)] 
home: update log message

The ratelimit hits even when the all previous attempts are successfull.