1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00
Commit Graph

55652 Commits

Author SHA1 Message Date
Yu Watanabe
5e069e405a sd-lldp: use memcpy_safe() as the buffer size may be zero
(cherry picked from commit 87bd4b79e6)
2022-05-25 16:33:10 +02:00
Yu Watanabe
073eba2319 sd-ndisc: drop unused function
(cherry picked from commit 9a44966e63)
2022-05-25 16:33:10 +02:00
Yu Watanabe
d30d6d8166 libsystemd-network: refuse too large raw_size
Closes #23258.

(cherry picked from commit 4e88a46bfe)
2022-05-25 16:33:10 +02:00
Lennart Poettering
7ccaf3a5df man: document that systemd-fstab-generator actually cares about roothash=/usrhash= on the kernel cmdline
It doesn't really care about the hash value passed (which is processed
by systemd-veritysetup-generator), but it does care about the fact that
it is set (and mounts the DM nodes /dev/mapper/usr + /dev/mapper/root in
that case).

(cherry picked from commit ba4b74cbc7)
2022-05-25 16:33:10 +02:00
Yu Watanabe
a2a0b93574 login: drop non-default value for RuntimeDirectoryInodesMax=
(cherry picked from commit 0bc055cf52)
2022-05-25 16:26:00 +02:00
Yu Watanabe
e0de3d1920 login: make RuntimeDirectoryInodesMax= support K, G, M suffixes
Fixes #23017.

(cherry picked from commit 08a767f1e0)
2022-05-25 16:25:54 +02:00
Zbigniew Jędrzejewski-Szmek
fc589e5a8e oomd: actually fail if configuration is bad
Follow-up for a858355e4a.

(cherry picked from commit c0a96b1b1d)
2022-05-25 16:24:48 +02:00
Jan Janssen
73be964391 bus: Use OrderedSet for introspection
Otherwise, the generated xml files are not reproducible.

(cherry picked from commit acac88340a)
2022-05-12 17:25:59 +01:00
Luca Boccassi
6ce475733a mkosi: add shadow package to SUSE Tumbleweed
[1958/1958] Generating export-dbus-interfaces with a custom command
/root/mkosi.build: line 70: groupadd: command not found

(cherry picked from commit 37b7eef35d)
2022-05-13 01:06:18 +09:00
Luca Boccassi
6d380ae604 networkd-test: lazy umount tmp directories
In Semaphore CI, for some reason, /run/systemd/resolve is busy so the umount
fails at the end of the test run:

Verify link states with Unmanaged= settings, cold-plug. ... umount: /run/systemd/resolve: target is busy.14:57
ok14:57
ERROR14:57
======================================================================14:57
ERROR: tearDownModule (__main__)14:57
----------------------------------------------------------------------14:57
Traceback (most recent call last):14:57
  File /tmp/autopkgtest-lxc.6islza9t/downtmp/build.A9b/src/test/networkd-test.py, line 94, in tearDownModule14:57
    subprocess.check_call([umount, d])14:57
  File /usr/lib/python3.9/subprocess.py, line 373, in check_call14:57
    raise CalledProcessError(retcode, cmd)14:57
subprocess.CalledProcessError: Command '['umount', '/run/systemd/resolve']' returned non-zero exit status 32.14:57
----------------------------------------------------------------------14:58
Ran 35 tests in 138.868s14:58
FAILED (errors=1, skipped=2)

Use lazy umount to avoid erroring out.

(cherry picked from commit 471cac19a6)
2022-04-29 00:13:13 +01:00
Luca Boccassi
8ed918d4e5 semaphoreci: move runner from Bionic to Focal
(cherry picked from commit 16ae198485)
2022-04-29 00:13:13 +01:00
Luca Boccassi
c1c73c64ea semaphoreci: speed up package installation
Disable updating the manpage database, and use dpkg's unsafe-io flag

(cherry picked from commit b6529646e7)
2022-04-29 00:13:13 +01:00
Luca Boccassi
1bf61b5570 semaphoreci: run dhclient manually on setup
For some reason the guest container stopped having its
network interface configured. Run the dhcp client manually.

(cherry picked from commit 9a6260b194)
2022-04-29 00:13:13 +01:00
Luca Boccassi
b3b66a7a0e semaphoreci: check keys.opengpgp.org first
Always resolves and it's faster than the others

+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 1
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 4
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 9
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 16
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 25
+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 1
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 4
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 9
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 16
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 25
+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.openpgp.org
Setting up the GPG keyring
Downloading the image index
Downloading the rootfs

(cherry picked from commit 93de997d12)
2022-04-29 00:13:13 +01:00
Zbigniew Jędrzejewski-Szmek
4a31fa2fb0 hwdb: run "update-hwdb-autosuspend" 2022-04-28 19:42:25 +02:00
Zbigniew Jędrzejewski-Szmek
e92e2d0e3b hwdb: run "update-hwdb" 2022-04-28 19:41:59 +02:00
Lennart Poettering
e1e4395775 hwdb: make sure "ninja update-hwdb" works on f35
let's restore compatibility with pyparsing from fedora 35, i.e.:

python3-pyparsing-2.4.7-9.fc35.noarch

(cherry picked from commit 133a000369)
2022-04-28 19:39:08 +02:00
Zbigniew Jędrzejewski-Szmek
1fe496fc3b hwdb: fix parser to work with newer pyparsing
The handling of whitespace in pyparsing is a bother. There's some
global state, and per-element state, and it's hard to get a handle on
things. With python3-pyparsing-2.4.7-10.fc36.noarch the grammar would
not match. After handling of tabs was fixed to not accept duplicate tabs,
the grammar passes.

It seems that the entry for usb:v8087p8087*
was generated incorrectly because we treated the interface line
(with two TABs) as a device line (with one TAB).

(cherry picked from commit f73d689587)
2022-04-28 19:39:01 +02:00
Zbigniew Jędrzejewski-Szmek
32e7c65372 manager: prohibit clone3() in seccomp filters
RestrictNamespaces should block clone3() like flatpak:
a10f52a756

clone3() passes arguments in a structure referenced by a pointer, so we can't
filter on the flags as with clone(). Let's disallow the whole function call.

(cherry picked from commit 30193fe817)
2022-04-28 19:05:30 +02:00
Luca Boccassi
45335a3eed nspawn: fix --ephemeral with --machine
Follow-up for 2362fdde1b

When --machine is specified with --ephemeral, no random suffix is added, so
the recently added assert would fail.

Add a top-level variable with the expected file name for nspawn files, and
compute it when the rest of the names are computed.

(cherry picked from commit 3603f15171)
2022-04-28 19:04:34 +02:00
Luca Boccassi
79b86adcbd nspawn: fix locating config files with --ephemeral
When --ephemeral is used, a random 16 characters suffix is added to the image
name, so matching on .nspawn files based on the image name no longer works.

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

(cherry picked from commit 2362fdde1b)
2022-04-28 19:03:35 +02:00
Yu Watanabe
c202d402d9 resolve: fix typo in dns_class_is_pseudo()
(cherry picked from commit 98e5a6c93c)
2022-04-28 19:00:46 +02:00
Yu Watanabe
9f689fda54 sd-ipv4acd: actually drop the arp packet from one of the host interface
Fixes a bug in 7f77917c0e.

Fixes #23001.

(cherry picked from commit 239adf0384)
2022-04-28 19:00:24 +02:00
Yu Watanabe
e3d57bc301 sd-event: make inotify event work after the process is forked
(cherry picked from commit fbae50904f)
2022-04-28 18:59:21 +02:00
Yu Watanabe
a5fc32fa34 sd-event: do not kill a child process from another child
(cherry picked from commit 86587c93b0)
2022-04-28 18:59:17 +02:00
Yu Watanabe
c36ab05b4f sd-event: do not update signal fd after PID is changed
Otherwise, child event source will not work after the process is forked
and the event source is unref()ed on the child process.

(cherry picked from commit 01e6af7374)
2022-04-28 18:59:12 +02:00
Yu Watanabe
e006b56c18 sd-event: set pid to event source after all setup processes finished
Otherwise, the assertion in source_disconnect() may be triggered,

(cherry picked from commit 54988a27b9)
2022-04-28 18:59:03 +02:00
Yu Watanabe
d2e3b5a841 sd-event: rebreak comments
(cherry picked from commit 91c700713f)
2022-04-28 18:58:59 +02:00
Luca Boccassi
6673131917 core: fix dm-verity auto-discovery in MountImageUnit()
The implementation of MountImageUnit()/systemctl mount-image was
changed to use a /proc/self/fd path as the source, but that causes
the dm-verity files autodiscovery to fail, as it looks for files
in the same directory as the image.

Use the original file path when setting up dm-verity.

(cherry picked from commit cedf5b1aef)
2022-04-28 18:57:48 +02:00
Daan De Meyer
10ee46a2ca analyze: Fix verify exit status regression
Previously, systemd-analyze verify would return 0 even if warnings
were raised during analysis of the specified units or their
dependencies. With 3cc3dc7, verify was changed to return 1 when
warnings were raised.

This commit changes the default mode to _RECURSIVE_ERRORS_INVALID
so that verify returns zero again by default when warnings are
raised.

(cherry picked from commit cae7c28272)
2022-04-28 18:57:37 +02:00
Yu Watanabe
df6253cbda hwdb: fix parsing options
Fixes #22976.

(cherry picked from commit 5674b74c4f)
2022-04-28 18:51:47 +02:00
Yu Watanabe
9727b9ee7b core: command argument can be longer than PATH_MAX
Fixes a bug introduced by 0653649202.

Fixes #22957.

(cherry picked from commit 58dd4999dc)
2022-04-28 18:48:16 +02:00
Yu Watanabe
12f05b856c network: ignore all errors in loading .network files
This partially reverts 9202b567bc.

Fixes #22954.

(cherry picked from commit 036a8d503f)
2022-04-28 18:47:58 +02:00
Luca Boccassi
b5dfdf0301 analyze: fix offline check for syscal filter
The deny/allow list check was inverted, if we are deny listing and the
hashmap contains the syscall then that's good

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

(cherry picked from commit dd51e725df)
2022-04-28 18:47:27 +02:00
Luca Boccassi
8ed1490de6 analyze: fix offline check for 'native' syscall architecture
Enum values are stored in the set, not strings

(cherry picked from commit 1449b0f8a9)
2022-04-28 18:47:24 +02:00
Romain Naour
72d0c6b171 missing-syscall: define MOVE_MOUNT_T_EMPTY_PATH if missing
MOVE_MOUNT_T_EMPTY_PATH has been added to systemd 250 by [1]
but it's defined in kernel headers since version 5.2.

[1] c7bf079bbc

(cherry picked from commit 608c3b0293)
2022-04-28 18:46:34 +02:00
Yu Watanabe
bba396d78c journal-remote: refuse to specify --trust option when gnutls is disabled
and check_permission() should not be called in that case.

Replaces #22847.

(cherry picked from commit f7adeaeb89)
2022-04-28 18:46:14 +02:00
Gibeom Gwon
8d4c0d2383 calendarspec: fix possibly skips next elapse
If the time unit changes after adding the repetition value, the
timer may skip the next elapse. This patch reset sub time units
to minimum value when upper unit is changed.

Fixes #22665.

(cherry picked from commit 1e582ede3b)
2022-04-28 18:45:54 +02:00
Franck Bui
d9ea8dab6d copy: use FLAGS_SET() in copy_xattr()
(cherry picked from commit e394a6fc09)
2022-04-28 18:43:36 +02:00
Franck Bui
077ca08b38 journal: preserve acls when rotating user journals with NOCOW attribute set
When restoring the COW flag for journals on BTRFS, the full journal contents
are copied into new files. But during these operations, the acls of the
previous files were lost and users were not able to access to their old
journal contents anymore.

(cherry picked from commit 11ee11dbb3)
2022-04-28 18:43:16 +02:00
Frantisek Sumsal
25b3c48ec5 macro: account for negative values in DECIMAL_STR_WIDTH()
With negative numbers we wouldn't account for the minus sign, thus
returning a string with one character too short, triggering buffer
overflows in certain situations.

(cherry picked from commit e3dd9ea8ea)
2022-04-28 18:37:25 +02:00
Yu Watanabe
8f2f6a94d8 network: enable KeepConfiguration= when running on network filesystem
Also, set KeepConfiguration=dhcp-on-stop by default when running in
initrd.

Fixes #21967.

(cherry picked from commit ea853de57d)
2022-04-28 18:35:20 +02:00
Yu Watanabe
61649fbada stat-util: introduce path_is_network_fs()
(cherry picked from commit 4e247216e5)
2022-04-28 18:35:12 +02:00
Yu Watanabe
3f6e62eccb network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
To emphasize this is DHCPv4. No behavior is changed.

(cherry picked from commit 318a53d10a)
2022-04-28 18:35:07 +02:00
Georges Basile Stavracas Neto
a7585a3a38 hwdb: Add AV production access to Elgado Stream Deck devices
The Stream Deck products from Elgato are simple key pads
intended to be used as macro pads. They're popular within
the streaming community.

This commit adds all 5 Stream Deck variants available to
the AV production file.

See https://www.elgato.com/en/stream-deck

(cherry picked from commit e982320b44)
2022-04-19 05:30:54 +09:00
Be
18c0096ec2 Add AV production controllers to hwdb and add uaccess
This adds support for AV production controller devices, such
as DJ tables, music-oriented key pads, and others.

The USB vendor and product IDs come from Mixxx, Ctlra, and
Ardour.

Fixes #20533

Co-developed-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>

(cherry picked from commit f2c36c0e24)
2022-04-19 05:30:54 +09:00
Luca Boccassi
2298094b2c packit: drop bfq patch
Does not apply on v250-stable
2022-04-02 01:56:36 +09:00
Luca Boccassi
7cda67d4f4 packit: build on and use Fedora 36 spec file
It's targeted to the v250 branch, while the rawhide one follows
the newest upstream release, and the command line options are not
compatible
2022-04-02 01:56:36 +09:00
Laura Barcziova
056bae9f1b Packit: build SRPMs in Copr
Add srpm_build_deps key to the Packit config to specify needed dependencies for SRPM build
and indicate to build SRPM in Copr.

(cherry picked from commit d15e1a29e3)
2022-04-02 01:56:36 +09:00
Lennart Poettering
6253eb576c journal-file: if we are going down, don't use event loop to schedule post
The event loop is already shutting down, hence no point in using it
anymore, it's not going to run any further iteration.

(cherry picked from commit 47f04c2a69)
2022-04-01 14:27:11 +09:00