]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agocore/unit: fix log message 25387/head
Yu Watanabe [Tue, 15 Nov 2022 13:59:01 +0000 (22:59 +0900)] 
core/unit: fix log message

As you can see in the below, the dropped dependency Before=issue-24990.service
is not logged, but the dependency Before=test1.service which is not owned by
the units generated by the TEST-26 is logged.

Before:
systemd[1]: issue-24990.service: Dependency After=test1.service dropped, merged into issue-24990.service
systemd[1]: issue-24990.service: Dependency Before=test1.service dropped, merged into issue-24990.service

After:
systemd[1]: issue-24990.service: Dependency After=test1.service is dropped, as test1.service is merged into issue-24990.service.
systemd[1]: issue-24990.service: Dependency Before=issue-24990.service in test1.service is dropped, as test1.service is merged into issue-24990.service.

2 years agocore/unit: merge unit names after merging deps
Yu Watanabe [Tue, 15 Nov 2022 18:18:30 +0000 (03:18 +0900)] 
core/unit: merge unit names after merging deps

Before:
systemd[1]: issue-24990.service: Dependency Before=n/a dropped, merged into issue-24990.service
After:
systemd[1]: issue-24990.service: Dependency Before=test1.service dropped, merged into issue-24990.service

2 years agotest: add test case for sysv-generator and invalid dependency
Yu Watanabe [Tue, 15 Nov 2022 12:52:10 +0000 (21:52 +0900)] 
test: add test case for sysv-generator and invalid dependency

2 years agocore/unit: merge two loops into one
Yu Watanabe [Thu, 17 Nov 2022 03:46:45 +0000 (12:46 +0900)] 
core/unit: merge two loops into one

No functional change, just refactoring.

2 years agocore/unit: fix logic of dropping self-referencing dependencies
Yu Watanabe [Tue, 15 Nov 2022 14:08:35 +0000 (23:08 +0900)] 
core/unit: fix logic of dropping self-referencing dependencies

Fixes a bug in 15ed3c3a188cf7fa5a60ae508fc7a3ed048d2220.

2 years agocore/unit: drop dependency to the unit being merged
Yu Watanabe [Tue, 15 Nov 2022 18:08:22 +0000 (03:08 +0900)] 
core/unit: drop dependency to the unit being merged

Fixes a bug in 15ed3c3a188cf7fa5a60ae508fc7a3ed048d2220.

Fixes #24990. Also, hopefully fixes #24577.

2 years agocore/unit: drop doubled empty line
Yu Watanabe [Tue, 15 Nov 2022 03:54:11 +0000 (12:54 +0900)] 
core/unit: drop doubled empty line

2 years agoMerge pull request #25559 from intelfx/work/systemd-importd-quotas
Yu Watanabe [Tue, 6 Dec 2022 05:05:35 +0000 (14:05 +0900)] 
Merge pull request #25559 from intelfx/work/systemd-importd-quotas

import: wire up SYSTEMD_IMPORT_BTRFS_{SUBVOL,QUOTA} to importd

2 years agodissect: show color in log output
Lennart Poettering [Fri, 2 Dec 2022 14:02:44 +0000 (15:02 +0100)] 
dissect: show color in log output

2 years agojournald: fix build error
Luca Boccassi [Tue, 6 Dec 2022 01:06:19 +0000 (01:06 +0000)] 
journald: fix build error

Follow-up for: 379864f89079a92ff09917e25b3aea0fadd228ac

Two PRs clashed with each other and were merged before we noticed

2 years agoMerge pull request #25638 from bluca/rate_limit_config
Luca Boccassi [Tue, 6 Dec 2022 01:07:47 +0000 (02:07 +0100)] 
Merge pull request #25638 from bluca/rate_limit_config

pid1: add env var to override default mount rate limit burst

2 years agoMerge pull request #25513 from brauner/pivot_root.nspawn
Luca Boccassi [Tue, 6 Dec 2022 00:51:51 +0000 (01:51 +0100)] 
Merge pull request #25513 from brauner/pivot_root.nspawn

nspawn: support pivot_root()

2 years agolog: Switch logging to runtime when FS becomes read-only
Richard Phibel [Mon, 5 Dec 2022 12:40:41 +0000 (13:40 +0100)] 
log: Switch logging to runtime when FS becomes read-only

The journal has a mechanism to log to the runtime journal if it fails to
log to the system journal. This mechanism is not triggered when the file
system becomes read-only. We enable it here.

When appending an entry fails if shall_try_append_again returns true,
the journal is rotated. If the FS is read-only, rotation will fail and
s->system_journal will be set to NULL. After that, when find_journal
will try to open the journal since s->system_journal will be NULL, it
will open the runtime journal.

2 years agoMerge pull request #25633 from DaanDeMeyer/journald-another-ratelimit
Luca Boccassi [Mon, 5 Dec 2022 21:08:25 +0000 (22:08 +0100)] 
Merge pull request #25633 from DaanDeMeyer/journald-another-ratelimit

journald: Ratelimit a few more log messages

2 years agopid1: add env var to override default mount rate limit burst 25638/head
Luca Boccassi [Mon, 5 Dec 2022 21:05:54 +0000 (21:05 +0000)] 
pid1: add env var to override default mount rate limit burst

I am hitting the rate limit on a busy system with low resources, and
it stalls the boot process which is Very Bad (TM).

2 years agodoc: CentOS is EOL use CentOS stream
Jan Macku [Mon, 5 Dec 2022 17:19:27 +0000 (18:19 +0100)] 
doc: CentOS is EOL use CentOS stream

2 years agonspawn: split mount tunnel setup 25513/head
Christian Brauner [Mon, 5 Dec 2022 17:34:00 +0000 (18:34 +0100)] 
nspawn: split mount tunnel setup

Before we supported pivot_root() nspawn used to make the rootfs shared
before setting up the mount tunnel. So it was safe for it to just turn
it into a dependent mount during setup.

However, we cannot do this anymore because of the requirements
pivot_root() has. After the pivot_root() we will make the rootfs shared
recursively. If we turned the mount tunnel into dependent mount before
mount_switch_root() this will have the consequence that it becomes a
shared mount within the same peer group as the rootfs. So no mounts will
propagate into the container from the host anymore.

To fix this we split setting up the mount tunnel and making it active
into two steps. Setting up the mount tunnel is performed before
mount_switch_root() and activating it afterwards. Note that this works
because turning a shared mount into a shared mount is a nop. IOW, no new
peer group will be allocated.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agonspawn: mount temporary visible procfs and sysfs instance
Christian Brauner [Mon, 28 Nov 2022 11:36:47 +0000 (12:36 +0100)] 
nspawn: mount temporary visible procfs and sysfs instance

In order to mount procfs and sysfs in an unprivileged container the
kernel requires that a fully visible instance is already present in the
target mount namespace. Mount one here so the inner child can mount its
own  instances. Later we umount the temporary  instances created here
before we actually exec the payload. Since the rootfs is shared the
umount will propagate into the container. Note, the inner child wouldn't
be able to unmount the  instances on its own since it doesn't own the
originating mount namespace. IOW, the outer child needs to do this.

So far nspawn didn't run into this issue because it used MS_MOVE which
meant that the shadow mount tree pinned a procfs and sysfs instance
which the kernel would find. The shadow mount tree is gone with proper
pivot_root() semantics.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agonspawn: support pivot_root()
Christian Brauner [Thu, 24 Nov 2022 09:45:24 +0000 (10:45 +0100)] 
nspawn: support pivot_root()

In order to support pivot_root() we need to move mount propagation
changes after the pivot_root(). While MS_MOVE requires the source mount
to not be a shared mount pivot_root() also requires the target mount to
not be a shared mount. This guarantees that pivot_root() doesn't leak
any mounts.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agoMerge pull request #25639 from jamacku/update-contributing
Luca Boccassi [Mon, 5 Dec 2022 16:53:14 +0000 (17:53 +0100)] 
Merge pull request #25639 from jamacku/update-contributing

doc: update link to systemd-rhel GitHub repository - `CONTRIBUTING.md`

2 years agodoc: fix markdown-lint issues in `CONTRIBUTING.md` 25639/head
Jan Macku [Mon, 5 Dec 2022 15:31:45 +0000 (16:31 +0100)] 
doc: fix markdown-lint issues in `CONTRIBUTING.md`

2 years agodoc: update link to systemd-rhel GitHub repo
Jan Macku [Mon, 5 Dec 2022 15:29:13 +0000 (16:29 +0100)] 
doc: update link to systemd-rhel GitHub repo

systemd-rhel GitHub repository has been moved to new location:

- https://github.com/redhat-plumbers

2 years agotest: double default image size
Luca Boccassi [Mon, 5 Dec 2022 12:52:19 +0000 (12:52 +0000)] 
test: double default image size

I am now hitting the 500MB limit on Debian stable.

2 years agojournal: Ratelimit more log messages 25633/head
Daan De Meyer [Mon, 5 Dec 2022 13:30:44 +0000 (14:30 +0100)] 
journal: Ratelimit more log messages

Followup for 8522691d4da.

2 years agojournal: Use shared log ratelimit constant
Daan De Meyer [Mon, 5 Dec 2022 13:29:29 +0000 (14:29 +0100)] 
journal: Use shared log ratelimit constant

Instead of maintaining two different constants, move the constant
to journal-internal.h and share it between files.

2 years agoMerge pull request #25537 from evverx/fuzz-resource-records
Zbigniew Jędrzejewski-Szmek [Mon, 5 Dec 2022 12:41:38 +0000 (13:41 +0100)] 
Merge pull request #25537 from evverx/fuzz-resource-records

tests: fuzz dns resource records

2 years agoacl-util: several cleanups
Yu Watanabe [Mon, 5 Dec 2022 06:32:32 +0000 (15:32 +0900)] 
acl-util: several cleanups

- add missing assertions,
- rename function arguments for storing result,
- rename variables which conflict our macros,
- always initialize function arguments for results on success.

2 years agoMerge pull request #25437 from YHNdnzj/systemctl-disable-warn-statically-enabled...
Zbigniew Jędrzejewski-Szmek [Mon, 5 Dec 2022 09:27:24 +0000 (10:27 +0100)] 
Merge pull request #25437 from YHNdnzj/systemctl-disable-warn-statically-enabled-services

systemctl: warn if trying to disable a unit with no install info

2 years agochase-symlinks: Fix regression from 5bc244aaa90211ccd8370535274c266cdff6a1cb
Daan De Meyer [Wed, 30 Nov 2022 10:37:31 +0000 (11:37 +0100)] 
chase-symlinks: Fix regression from 5bc244aaa90211ccd8370535274c266cdff6a1cb

Previously, chase_symlinks() always returned an absolute path, which
changed after 5bc244aaa90211ccd8370535274c266cdff6a1cb. This commit
fixes chase_symlinks() so it returns absolute paths all the time again.

2 years agopstore: fixes for dmesg.txt reconstruction
Eric DeVolder [Mon, 21 Nov 2022 16:27:27 +0000 (11:27 -0500)] 
pstore: fixes for dmesg.txt reconstruction

This patch fixes problems with the re-assembly of the dmesg
from the records stored in pstore.

The current code simply ignores the last 6 characters of the
file name to form a base record id, which then groups any
pstore files with this base id into the reconstructed dmesg.txt.
This approach fails when the following oops generated the
following in pstore:

 -rw-------.  1 root root  1808 Oct 27 22:07 dmesg-efi-166692286101001
 -rw-------.  1 root root  1341 Oct 27 22:07 dmesg-efi-166692286101002
 -rw-------.  1 root root  1812 Oct 27 22:07 dmesg-efi-166692286102001
 -rw-------.  1 root root  1820 Oct 27 22:07 dmesg-efi-166692286102002
 -rw-------.  1 root root  1807 Oct 27 22:07 dmesg-efi-166692286103001
 -rw-------.  1 root root  1791 Oct 27 22:07 dmesg-efi-166692286103002
 -rw-------.  1 root root  1773 Oct 27 22:07 dmesg-efi-166692286104001
 -rw-------.  1 root root  1801 Oct 27 22:07 dmesg-efi-166692286104002
 -rw-------.  1 root root  1821 Oct 27 22:07 dmesg-efi-166692286105001
 -rw-------.  1 root root  1809 Oct 27 22:07 dmesg-efi-166692286105002
 -rw-------.  1 root root  1804 Oct 27 22:07 dmesg-efi-166692286106001
 -rw-------.  1 root root  1817 Oct 27 22:07 dmesg-efi-166692286106002
 -rw-------.  1 root root  1792 Oct 27 22:07 dmesg-efi-166692286107001
 -rw-------.  1 root root  1810 Oct 27 22:07 dmesg-efi-166692286107002
 -rw-------.  1 root root  1717 Oct 27 22:07 dmesg-efi-166692286108001
 -rw-------.  1 root root  1808 Oct 27 22:07 dmesg-efi-166692286108002
 -rw-------.  1 root root  1764 Oct 27 22:07 dmesg-efi-166692286109001
 -rw-------.  1 root root  1765 Oct 27 22:07 dmesg-efi-166692286109002
 -rw-------.  1 root root  1796 Oct 27 22:07 dmesg-efi-166692286110001
 -rw-------.  1 root root  1816 Oct 27 22:07 dmesg-efi-166692286110002
 -rw-------.  1 root root  1793 Oct 27 22:07 dmesg-efi-166692286111001
 -rw-------.  1 root root  1751 Oct 27 22:07 dmesg-efi-166692286111002
 -rw-------.  1 root root  1813 Oct 27 22:07 dmesg-efi-166692286112001
 -rw-------.  1 root root  1786 Oct 27 22:07 dmesg-efi-166692286112002
 -rw-------.  1 root root  1754 Oct 27 22:07 dmesg-efi-166692286113001
 -rw-------.  1 root root  1752 Oct 27 22:07 dmesg-efi-166692286113002
 -rw-------.  1 root root  1803 Oct 27 22:07 dmesg-efi-166692286114001
 -rw-------.  1 root root  1759 Oct 27 22:07 dmesg-efi-166692286114002
 -rw-------.  1 root root  1805 Oct 27 22:07 dmesg-efi-166692286115001
 -rw-------.  1 root root  1787 Oct 27 22:07 dmesg-efi-166692286115002
 -rw-------.  1 root root  1815 Oct 27 22:07 dmesg-efi-166692286116001
 -rw-------.  1 root root  1771 Oct 27 22:07 dmesg-efi-166692286116002
 -rw-------.  1 root root  1816 Oct 27 22:07 dmesg-efi-166692286117002
 -rw-------.  1 root root  1388 Oct 27 22:07 dmesg-efi-166692286701003
 -rw-------.  1 root root  1824 Oct 27 22:07 dmesg-efi-166692286702003
 -rw-------.  1 root root  1795 Oct 27 22:07 dmesg-efi-166692286703003
 -rw-------.  1 root root  1805 Oct 27 22:07 dmesg-efi-166692286704003
 -rw-------.  1 root root  1813 Oct 27 22:07 dmesg-efi-166692286705003
 -rw-------.  1 root root  1821 Oct 27 22:07 dmesg-efi-166692286706003
 -rw-------.  1 root root  1814 Oct 27 22:07 dmesg-efi-166692286707003
 -rw-------.  1 root root  1812 Oct 27 22:07 dmesg-efi-166692286708003
 -rw-------.  1 root root  1769 Oct 27 22:07 dmesg-efi-166692286709003
 -rw-------.  1 root root  1820 Oct 27 22:07 dmesg-efi-166692286710003
 -rw-------.  1 root root  1755 Oct 27 22:07 dmesg-efi-166692286711003
 -rw-------.  1 root root  1790 Oct 27 22:07 dmesg-efi-166692286712003
 -rw-------.  1 root root  1756 Oct 27 22:07 dmesg-efi-166692286713003
 -rw-------.  1 root root  1763 Oct 27 22:07 dmesg-efi-166692286714003
 -rw-------.  1 root root  1791 Oct 27 22:07 dmesg-efi-166692286715003
 -rw-------.  1 root root  1775 Oct 27 22:07 dmesg-efi-166692286716003
 -rw-------.  1 root root  1820 Oct 27 22:07 dmesg-efi-166692286717003

The "reconstructed" dmesg.txt that resulted from the above contained
the following (ignoring actual contents, just providing the Part info):

 Emergency#3 Part17
 Emergency#3 Part16
 Emergency#3 Part15
 Emergency#3 Part14
 Emergency#3 Part13
 Emergency#3 Part12
 Emergency#3 Part11
 Emergency#3 Part10
 Emergency#3 Part9
 Emergency#3 Part8
 Emergency#3 Part7
 Emergency#3 Part6
 Emergency#3 Part5
 Emergency#3 Part4
 Emergency#3 Part3
 Emergency#3 Part2
 Emergency#3 Part1
 Panic#2 Part17
 Panic#2 Part16
 Oops#1 Part16
 Panic#2 Part15
 Oops#1 Part15
 Panic#2 Part14
 Oops#1 Part14
 Panic#2 Part13
 Oops#1 Part13
 Panic#2 Part12
 Oops#1 Part12
 Panic#2 Part11
 Oops#1 Part11
 Panic#2 Part10
 Oops#1 Part10
 Panic#2 Part9
 Oops#1 Part9
 Panic#2 Part8
 Oops#1 Part8
 Panic#2 Part7
 Oops#1 Part7
 Panic#2 Part6
 Oops#1 Part6
 Panic#2 Part5
 Oops#1 Part5
 Panic#2 Part4
 Oops#1 Part4
 Panic#2 Part3
 Oops#1 Part3
 Panic#2 Part2
 Oops#1 Part2
 Panic#2 Part1
 Oops#1 Part1

The above is a interleaved mess of three dmesg dumps.

This patch fixes the above problems, and simplifies the dmesg
reconstruction process. The code now distinguishes between
records on EFI vs ERST, which have differently formatted
record identifiers. Using knowledge of the format of the
record ids allows vastly improved reconstruction process.

With this change in place, the above pstore records now
result in the following:

 # ls -alR /var/lib/systemd/pstore
 1666922861:
 total 8
 drwxr-xr-x. 4 root root   28 Nov 18 14:58 .
 drwxr-xr-x. 7 root root  144 Nov 18 14:58 ..
 drwxr-xr-x. 2 root root 4096 Nov 18 14:58 001
 drwxr-xr-x. 2 root root 4096 Nov 18 14:58 002

 1666922861/001:
 total 100
 drwxr-xr-x. 2 root root  4096 Nov 18 14:58 .
 drwxr-xr-x. 4 root root    28 Nov 18 14:58 ..
 -rw-------. 1 root root  1808 Oct 27 22:07 dmesg-efi-166692286101001
 -rw-------. 1 root root  1812 Oct 27 22:07 dmesg-efi-166692286102001
 -rw-------. 1 root root  1807 Oct 27 22:07 dmesg-efi-166692286103001
 -rw-------. 1 root root  1773 Oct 27 22:07 dmesg-efi-166692286104001
 -rw-------. 1 root root  1821 Oct 27 22:07 dmesg-efi-166692286105001
 -rw-------. 1 root root  1804 Oct 27 22:07 dmesg-efi-166692286106001
 -rw-------. 1 root root  1792 Oct 27 22:07 dmesg-efi-166692286107001
 -rw-------. 1 root root  1717 Oct 27 22:07 dmesg-efi-166692286108001
 -rw-------. 1 root root  1764 Oct 27 22:07 dmesg-efi-166692286109001
 -rw-------. 1 root root  1796 Oct 27 22:07 dmesg-efi-166692286110001
 -rw-------. 1 root root  1793 Oct 27 22:07 dmesg-efi-166692286111001
 -rw-------. 1 root root  1813 Oct 27 22:07 dmesg-efi-166692286112001
 -rw-------. 1 root root  1754 Oct 27 22:07 dmesg-efi-166692286113001
 -rw-------. 1 root root  1803 Oct 27 22:07 dmesg-efi-166692286114001
 -rw-------. 1 root root  1805 Oct 27 22:07 dmesg-efi-166692286115001
 -rw-------. 1 root root  1815 Oct 27 22:07 dmesg-efi-166692286116001
 -rw-r-----. 1 root root 28677 Nov 18 14:58 dmesg.txt

 1666922861/002:
 total 104
 drwxr-xr-x. 2 root root  4096 Nov 18 14:58 .
 drwxr-xr-x. 4 root root    28 Nov 18 14:58 ..
 -rw-------. 1 root root  1341 Oct 27 22:07 dmesg-efi-166692286101002
 -rw-------. 1 root root  1820 Oct 27 22:07 dmesg-efi-166692286102002
 -rw-------. 1 root root  1791 Oct 27 22:07 dmesg-efi-166692286103002
 -rw-------. 1 root root  1801 Oct 27 22:07 dmesg-efi-166692286104002
 -rw-------. 1 root root  1809 Oct 27 22:07 dmesg-efi-166692286105002
 -rw-------. 1 root root  1817 Oct 27 22:07 dmesg-efi-166692286106002
 -rw-------. 1 root root  1810 Oct 27 22:07 dmesg-efi-166692286107002
 -rw-------. 1 root root  1808 Oct 27 22:07 dmesg-efi-166692286108002
 -rw-------. 1 root root  1765 Oct 27 22:07 dmesg-efi-166692286109002
 -rw-------. 1 root root  1816 Oct 27 22:07 dmesg-efi-166692286110002
 -rw-------. 1 root root  1751 Oct 27 22:07 dmesg-efi-166692286111002
 -rw-------. 1 root root  1786 Oct 27 22:07 dmesg-efi-166692286112002
 -rw-------. 1 root root  1752 Oct 27 22:07 dmesg-efi-166692286113002
 -rw-------. 1 root root  1759 Oct 27 22:07 dmesg-efi-166692286114002
 -rw-------. 1 root root  1787 Oct 27 22:07 dmesg-efi-166692286115002
 -rw-------. 1 root root  1771 Oct 27 22:07 dmesg-efi-166692286116002
 -rw-------. 1 root root  1816 Oct 27 22:07 dmesg-efi-166692286117002
 -rw-r-----. 1 root root 30000 Nov 18 14:58 dmesg.txt

 1666922867:
 total 4
 drwxr-xr-x. 3 root root   17 Nov 18 14:58 .
 drwxr-xr-x. 7 root root  144 Nov 18 14:58 ..
 drwxr-xr-x. 2 root root 4096 Nov 18 14:58 003

 1666922867/003:
 total 104
 drwxr-xr-x. 2 root root  4096 Nov 18 14:58 .
 drwxr-xr-x. 3 root root    17 Nov 18 14:58 ..
 -rw-------. 1 root root  1388 Oct 27 22:07 dmesg-efi-166692286701003
 -rw-------. 1 root root  1824 Oct 27 22:07 dmesg-efi-166692286702003
 -rw-------. 1 root root  1795 Oct 27 22:07 dmesg-efi-166692286703003
 -rw-------. 1 root root  1805 Oct 27 22:07 dmesg-efi-166692286704003
 -rw-------. 1 root root  1813 Oct 27 22:07 dmesg-efi-166692286705003
 -rw-------. 1 root root  1821 Oct 27 22:07 dmesg-efi-166692286706003
 -rw-------. 1 root root  1814 Oct 27 22:07 dmesg-efi-166692286707003
 -rw-------. 1 root root  1812 Oct 27 22:07 dmesg-efi-166692286708003
 -rw-------. 1 root root  1769 Oct 27 22:07 dmesg-efi-166692286709003
 -rw-------. 1 root root  1820 Oct 27 22:07 dmesg-efi-166692286710003
 -rw-------. 1 root root  1755 Oct 27 22:07 dmesg-efi-166692286711003
 -rw-------. 1 root root  1790 Oct 27 22:07 dmesg-efi-166692286712003
 -rw-------. 1 root root  1756 Oct 27 22:07 dmesg-efi-166692286713003
 -rw-------. 1 root root  1763 Oct 27 22:07 dmesg-efi-166692286714003
 -rw-------. 1 root root  1791 Oct 27 22:07 dmesg-efi-166692286715003
 -rw-------. 1 root root  1775 Oct 27 22:07 dmesg-efi-166692286716003
 -rw-------. 1 root root  1820 Oct 27 22:07 dmesg-efi-166692286717003
 -rw-r-----. 1 root root 30111 Nov 18 14:58 dmesg.txt

Furthemore, pstore records on ERST are now able to accurately
identify the change in timestamp sequence in order to start a
new dmesg.txt, as needed.

2 years agoRevert "update credentials when reloading a service"
Lennart Poettering [Wed, 2 Nov 2022 15:02:33 +0000 (16:02 +0100)] 
Revert "update credentials when reloading a service"

This reverts commit 16a42b84cf88745e6b2b93f111f99179117b9610.

2 years agogpt-auto-generator: do not write "noauto" in unit options
Zbigniew Jędrzejewski-Szmek [Thu, 24 Nov 2022 12:45:11 +0000 (13:45 +0100)] 
gpt-auto-generator: do not write "noauto" in unit options

"auto"/"noauto" only make sense in the fstab. Putting them in Options= in the
generated unit has no effect and is confusing.

2 years agoMerge pull request #25618 from keszybz/sysctl-simplify-writing
Zbigniew Jędrzejewski-Szmek [Mon, 5 Dec 2022 07:41:00 +0000 (08:41 +0100)] 
Merge pull request #25618 from keszybz/sysctl-simplify-writing

Write sysctl values without newlines and as fixed strings

2 years agoimport: wire up SYSTEMD_IMPORT_BTRFS_{SUBVOL,QUOTA} to importd 25559/head
Ivan Shapovalov [Tue, 29 Nov 2022 12:20:48 +0000 (16:20 +0400)] 
import: wire up SYSTEMD_IMPORT_BTRFS_{SUBVOL,QUOTA} to importd

Btrfs quotas are actually being enabled in systemd-importd via
setup_machine_directory(), not in systemd-{import,pull} where those
environment variables are checked. Therefore, also check them in
systemd-importd and avoid enabling quotas if requested by the user.

Fixes: #18421
Fixes: #15903
Fixes: #24387
2 years agomachine-pool: simplify return values from setup_machine_directory()
Ivan Shapovalov [Sat, 3 Dec 2022 16:31:36 +0000 (20:31 +0400)] 
machine-pool: simplify return values from setup_machine_directory()

Non-negative return values of setup_machine_directory() were never used
and never had clear meaning, so do not distinguish between various
non-error conditions and just return 0 in all cases.

2 years agorpm/systemd-update-helper: use --no-warn when disabling units 25437/head
Mike Yuan [Sat, 3 Dec 2022 12:27:47 +0000 (20:27 +0800)] 
rpm/systemd-update-helper: use --no-warn when disabling units

Suppress the "empty [Install] section" warning (see #25437).

2 years agosystemctl: allow suppress the warning of no install info using --no-warn
Mike Yuan [Sun, 27 Nov 2022 13:18:44 +0000 (21:18 +0800)] 
systemctl: allow suppress the warning of no install info using --no-warn

In cases like packaging scripts, it might be desired to use
enable/disable on units without install info. So, adding an
option '--no-warn' to suppress the warning.

2 years agosystemctl: warn if trying to disable a unit with no install info
Mike Yuan [Fri, 18 Nov 2022 07:43:34 +0000 (15:43 +0800)] 
systemctl: warn if trying to disable a unit with no install info

Trying to disable a unit with no install info is mostly useless, so
adding a warning like we do for enable (with the new dbus method
'DisableUnitFilesWithFlagsAndInstallInfo()'). Note that it would
still find and remove symlinks to the unit in /etc, regardless of
whether it has install info or not, just like before. And if there are
actually files to remove, we suppress the warning.

Fixes #17689

2 years agoUpdate TODO
Luca Boccassi [Sat, 3 Dec 2022 11:23:00 +0000 (11:23 +0000)] 
Update TODO

2 years agomanager: write net/unix/max_dgram_qlen sysctl as fixed string 25618/head
Zbigniew Jędrzejewski-Szmek [Sat, 3 Dec 2022 10:57:17 +0000 (11:57 +0100)] 
manager: write net/unix/max_dgram_qlen sysctl as fixed string

2 years agomanager: define a string constant for LONG_MAX and use that for sysctl
Zbigniew Jędrzejewski-Szmek [Sat, 3 Dec 2022 10:55:55 +0000 (11:55 +0100)] 
manager: define a string constant for LONG_MAX and use that for sysctl

This moves the formatting of the constant to compilation time and let's us
avoid asprintf() in the very hot path of initial boot.

2 years agomanager: do not append '\n' when writing sysctl settings
Zbigniew Jędrzejewski-Szmek [Sat, 3 Dec 2022 10:27:40 +0000 (11:27 +0100)] 
manager: do not append '\n' when writing sysctl settings

When booting with debug logs, we print:

   Setting '/proc/sys/fs/file-max' to '9223372036854775807
   '
   Setting '/proc/sys/fs/nr_open' to '2147483640
   '
   Couldn't write fs.nr_open as 2147483640, halving it.
   Setting '/proc/sys/fs/nr_open' to '1073741816
   '
   Successfully bumped fs.nr_open to 1073741816

The strange formatting is because we explicitly appended a newline in those two
places. It seems that the kernel doesn't care. In fact, we have a few dozen other
writes to sysctl where we don't append a newline. So let's just drop those here
too, to make the code a bit simpler and avoid strange output in the logs.

2 years agodissect: add new helper verity_settings_data_covers()
Lennart Poettering [Wed, 30 Nov 2022 17:44:06 +0000 (18:44 +0100)] 
dissect: add new helper verity_settings_data_covers()

This function checks if the external verity data referenced in
VeritySettings covers the specified partition (indicated via
designator).

Right now, we'll use that at one place, but in a later commit in more.

2 years agodissect: pick up gpt partition flags
Lennart Poettering [Wed, 30 Nov 2022 17:55:05 +0000 (18:55 +0100)] 
dissect: pick up gpt partition flags

Let's store the GPT partition flags in the dissected partition info.

Right now we won't actually use them for anything yet, but later we'll
add that, when enforcing policy on dissection.

2 years agoMerge pull request #25570 from yuwata/dissect-rootless-image
Lennart Poettering [Fri, 2 Dec 2022 17:25:53 +0000 (18:25 +0100)] 
Merge pull request #25570 from yuwata/dissect-rootless-image

dissect: support to unmount image without root partition

2 years agoRevert "basic: add fallback in chase_symlinks_and_opendir() for cases when /proc...
Lennart Poettering [Fri, 2 Dec 2022 16:53:27 +0000 (17:53 +0100)] 
Revert "basic: add fallback in chase_symlinks_and_opendir() for cases when /proc is not mounted"

This reverts commit 3e22dfc2352bb5c4f058e23a82f424655b599b18.

2 years agobasic: add fallback in chase_symlinks_and_opendir() for cases when /proc is not mounted
Michal Sekletar [Wed, 30 Nov 2022 17:01:01 +0000 (18:01 +0100)] 
basic: add fallback in chase_symlinks_and_opendir() for cases when /proc is not mounted

https://bugzilla.redhat.com/show_bug.cgi?id=2136916

2 years agoMerge pull request #25541 from medhefgo/boot-reconnect
Zbigniew Jędrzejewski-Szmek [Fri, 2 Dec 2022 13:37:17 +0000 (14:37 +0100)] 
Merge pull request #25541 from medhefgo/boot-reconnect

boot: Fix huge boot delay

2 years agotest: check if we can use SHA1 MD for signing before using it
Frantisek Sumsal [Fri, 2 Dec 2022 11:48:26 +0000 (12:48 +0100)] 
test: check if we can use SHA1 MD for signing before using it

Some distributions have started phasing out SHA1, which breaks
the systemd-measure test case in its current form. Let's make sure we
can use SHA1 for signing beforehand to mitigate this.

Spotted on RHEL 9, where SHA1 signatures are disallowed by [0]:
```
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out "/tmp/pcrsign-private.pem"
...
openssl rsa -pubout -in "/tmp/pcrsign-private.pem" -out "/tmp/pcrsign-public.pem"
writing RSA key
/usr/lib/systemd/systemd-measure sign --current --bank=sha1 --private-key="/tmp/pcrsign-private.pem" --public-key="/tmp/pcrsign-public.pem"
Failed to initialize signature context.
```

[0] https://gitlab.com/redhat/centos-stream/rpms/openssl/-/blob/c9s/0049-Selectively-disallow-SHA1-signatures.patch

2 years agoMerge pull request #25603 from DaanDeMeyer/mkosi
Zbigniew Jędrzejewski-Szmek [Fri, 2 Dec 2022 13:27:16 +0000 (14:27 +0100)] 
Merge pull request #25603 from DaanDeMeyer/mkosi

mkosi config changes

2 years agodissect-image: log expected UUID for /var
Yu Watanabe [Fri, 2 Dec 2022 05:42:52 +0000 (14:42 +0900)] 
dissect-image: log expected UUID for /var

Closes #25443.

2 years agobootspec: fix null-dereference-read
Yu Watanabe [Fri, 2 Dec 2022 05:30:22 +0000 (14:30 +0900)] 
bootspec: fix null-dereference-read

Fixes [oss-fuzz#53578](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53578).
Fixes #25450.

2 years agofuzz-systemctl: limit the size of input
Yu Watanabe [Fri, 2 Dec 2022 05:14:50 +0000 (14:14 +0900)] 
fuzz-systemctl: limit the size of input

Fixes [oss-fuzz#53552](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53552).
Fixes #25445.

2 years agomkosi: Drop HostonlyInitrd=yes 25603/head
Daan De Meyer [Fri, 2 Dec 2022 09:46:32 +0000 (10:46 +0100)] 
mkosi: Drop HostonlyInitrd=yes

This option will be removed in the upcoming version of mkosi so let's
stop using it in our config.

2 years agomkosi: Drop explicit Format=
Daan De Meyer [Fri, 2 Dec 2022 09:44:56 +0000 (10:44 +0100)] 
mkosi: Drop explicit Format=

Once mkosi migrates to systemd-repart, only "disk" will be supported
for making disk images with mkosi and the filesystem will have to be
specified in repart partition definition files. To accomodate this
change, let's remove the explicit Format= assignment which means we'll
default to a disk image with ext4 until we add our own mkosi.repart/
directory.

2 years agotree-wide: fix typo
Yu Watanabe [Fri, 2 Dec 2022 04:26:33 +0000 (13:26 +0900)] 
tree-wide: fix typo

2 years agohwdb: add Dell Inspiron N4010 touchpad corrections
rogg [Thu, 1 Dec 2022 15:43:15 +0000 (15:43 +0000)] 
hwdb: add Dell Inspiron N4010 touchpad corrections

2 years agovirt: Support detection of LMHS SRE guests
Neil Moore [Thu, 1 Dec 2022 19:03:06 +0000 (14:03 -0500)] 
virt: Support detection of LMHS SRE guests

2 years agoMerge pull request #25591 from poettering/dissect-probe-offset
Yu Watanabe [Fri, 2 Dec 2022 00:15:20 +0000 (09:15 +0900)] 
Merge pull request #25591 from poettering/dissect-probe-offset

dissect-image: probe file system via main block device fd/image file fd

2 years agonspawn: Use "Ctrl-" rather than "^" in info msg
Phaedrus Leeds [Wed, 30 Nov 2022 17:42:57 +0000 (09:42 -0800)] 
nspawn: Use "Ctrl-" rather than "^" in info msg

Maybe most people know that "^]" means "Ctrl + ]" but for those that
don't, this should be more clear.

2 years agonetwork: unset Link.ndisc_configured only when a new address or route is requested
Yu Watanabe [Wed, 30 Nov 2022 02:10:21 +0000 (11:10 +0900)] 
network: unset Link.ndisc_configured only when a new address or route is requested

This fixes an issue introduced by af2aea8bb64b0dc42ecbe5549216eb567681a803.

When an outdated address or route is passed to link_request_address()/route(),
then they return 0 and the address or route will not be assigned. Such
situation can happen when we receive RA with zero lifetime. In that
case, we should not unset Link.ndisc_configured flag, otherwise even
no new address nor route will assigned, the interface will enter to the
configuring state, and unnecessary DBus property change is emit and the state
file will be updated. That makes resolved or timesyncd triggered to
reconfigure the interface.

Fixes #25456.

2 years agoMerge pull request #25568 from yuwata/network-tiny-cleanups
Luca Boccassi [Thu, 1 Dec 2022 22:12:26 +0000 (23:12 +0100)] 
Merge pull request #25568 from yuwata/network-tiny-cleanups

network: tiny cleanups

2 years agodissect-image: probe file system via main block device fd/image file fd 25591/head
Lennart Poettering [Wed, 30 Nov 2022 22:00:37 +0000 (23:00 +0100)] 
dissect-image: probe file system via main block device fd/image file fd

let's make sure we can probe file systems also when unprivileged:
instead of probing the partition block devices for file system
signatures, let's go via the original "whole" fd.

libblkid makes this easy actually, as it allows us to specify the
offset/size of the area to probe. And we have the partition
offsets/sizes anyway, so it's trivial for us to make use of.

This thus enables fs probing also when lacking privs and operating on
naked regular files without loopback devices or anything like this.

2 years agotest-loop-block: let's explicitly flush buffer cache on whole block device
Lennart Poettering [Thu, 1 Dec 2022 16:17:46 +0000 (17:17 +0100)] 
test-loop-block: let's explicitly flush buffer cache on whole block device

Let's explicitly flush the kernel's buffer cache on the whole block
device once we ran "mkfs". This is necessary, because partition and
whole block devices maintain separate buffer caches, and thus writing
to one will not be visible on the other if cached there already, until
the latter's cache is explicitly flushed.

This is preparation for later adding support for probing file sytems
also if we have no open partition block devices, and hence want to use
the whole block device instead.

2 years agotest-loop-block: also test dissection without ADD/PIN of partition block devices
Lennart Poettering [Thu, 1 Dec 2022 16:16:18 +0000 (17:16 +0100)] 
test-loop-block: also test dissection without ADD/PIN of partition block devices

Let's extend the test further, and try the codepaths where we do not
pin/add the partition block devices (i.e. which is the codepaths we use
when running without privs)

2 years agotest-loop-block: tighten tests a bit - check fstype, too
Lennart Poettering [Thu, 1 Dec 2022 16:15:10 +0000 (17:15 +0100)] 
test-loop-block: tighten tests a bit - check fstype, too

Let's verify that we properly created the file systems once we did so.
And tets this way that our dissector works correctly.

2 years agoMerge pull request #25593 from poettering/blkid-safeprobe-enum
Lennart Poettering [Thu, 1 Dec 2022 21:07:00 +0000 (22:07 +0100)] 
Merge pull request #25593 from poettering/blkid-safeprobe-enum

define symbolic enum for blkid_do_safeprobe() return values

2 years agodissect: support to unmount image without root partition 25570/head
Yu Watanabe [Wed, 30 Nov 2022 03:55:13 +0000 (12:55 +0900)] 
dissect: support to unmount image without root partition

Fixes #25480.

2 years agodissect: use sd-device to find and open loopback block device
Yu Watanabe [Wed, 30 Nov 2022 04:00:42 +0000 (13:00 +0900)] 
dissect: use sd-device to find and open loopback block device

2 years agoupdate TODO
Lennart Poettering [Thu, 1 Dec 2022 16:35:33 +0000 (17:35 +0100)] 
update TODO

2 years agoblkid-util: define enum for blkid_do_safeprobe() return values 25593/head
Lennart Poettering [Thu, 1 Dec 2022 14:37:59 +0000 (15:37 +0100)] 
blkid-util: define enum for blkid_do_safeprobe() return values

libblkid really should define an enum for this on its own, but it
currently doesn't and returns literal numeric values. Lets make this
more readable by adding our own symbolic names via an enum.

2 years agotree-wide: use errno_or_else() more, instead of homegrown checks
Lennart Poettering [Thu, 1 Dec 2022 14:36:55 +0000 (15:36 +0100)] 
tree-wide: use errno_or_else() more, instead of homegrown checks

2 years agoMerge pull request #25579 from DaanDeMeyer/copy-graceful-symlinks
Daan De Meyer [Thu, 1 Dec 2022 12:47:14 +0000 (13:47 +0100)] 
Merge pull request #25579 from DaanDeMeyer/copy-graceful-symlinks

repart: Ignore copy failures for unsupported file types

2 years agobuild(deps): bump ninja from 1.10.2.4 to 1.11.1 in /.github/workflows
dependabot[bot] [Thu, 1 Dec 2022 10:29:40 +0000 (10:29 +0000)] 
build(deps): bump ninja from 1.10.2.4 to 1.11.1 in /.github/workflows

Bumps [ninja](https://github.com/ninja-build/ninja) from 1.10.2.4 to 1.11.1.
- [Release notes](https://github.com/ninja-build/ninja/releases)
- [Commits](https://github.com/ninja-build/ninja/commits/v1.11.1)

---
updated-dependencies:
- dependency-name: ninja
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agorepart: Ignore copy failures for unsupported file types 25579/head
Daan De Meyer [Wed, 30 Nov 2022 16:04:14 +0000 (17:04 +0100)] 
repart: Ignore copy failures for unsupported file types

e.g. vfat doesn't support symlinks, sockets, fifos, etc so let's ignore
any copy failures related to unsupported file types when populating
filesystems.

2 years agoMerge pull request #25554 from enr0n/follow-on-25509
Lennart Poettering [Thu, 1 Dec 2022 11:04:23 +0000 (12:04 +0100)] 
Merge pull request #25554 from enr0n/follow-on-25509

oomd: only check prefix_uid when uid != 0

2 years agodissect: rework DISSECT_IMAGE_ADD_PARTITION_DEVICES + DISSECT_IMAGE_OPEN_PARTITION_DE...
Lennart Poettering [Wed, 30 Nov 2022 16:17:20 +0000 (17:17 +0100)] 
dissect: rework DISSECT_IMAGE_ADD_PARTITION_DEVICES + DISSECT_IMAGE_OPEN_PARTITION_DEVICES

Curently, these two flags were implied by dissect_loop_device(), but
that's not right, because this means systemd-gpt-auto-generator will
dissect the root block device with these flags set and that's not
desirable: the generator should not cause the partition devices to be
created (we don't intend to use them right-away after all, but expect
udev to find/probe them first, and then mount them though .mount units).
And there's no point in opening the partition devices, since we do not
intend to mount them via fds either.

Hence, rework this: instead of implying the flags, specify them
explicitly.

While we are at it, let's also rename the flags to make them more
descriptive:

DISSECT_IMAGE_MANAGE_PARTITION_DEVICES becomes
DISSECT_IMAGE_ADD_PARTITION_DEVICES, since that's really all this does:
add the partition devices via BLKPG.

DISSECT_IMAGE_OPEN_PARTITION_DEVICES becomes
DISSECT_IMAGE_PIN_PARTITION_DEVICES, since we not only open the devices,
but keep the devices open continously (i.e. we "pin" them).

Also, drop the DISSECT_IMAGE_BLOCK_DEVICE combination flag, since it is
misleading, i.e. it suggests it was appropriate to specify on all
dissected blocking devices, but that's precisely not the case, see the
systemd-gpt-auto-generator case. My guess is that the confusion around
this was actually the cause for this bug we are addressing here.

Fixes: #25528
2 years agoterminal-util: Set OPOST when setting ONLCR
Ray Strode [Wed, 30 Nov 2022 19:07:29 +0000 (14:07 -0500)] 
terminal-util: Set OPOST when setting ONLCR

reset_terminal_fd sets certain minimum required terminal attributes
that systemd relies on.

One of those attributes is `ONLCR` which ensures that when a new line
is sent to the terminal, that the cursor not only moves to the next
line, but also moves to the very beginning of that line.

In order for `ONLCR` to work, the terminal needs to perform output
post-processing. That requires an additional attribute, `OPOST`,
which reset_terminal_fd currently fails to ensure is set.

In most cases `OPOST` (and `ONLCR` actually) are both set anyway, so
it's not an issue, but it could be a problem if, e.g., the terminal was
put in raw mode by a program and the program unexpectedly died before
restoring settings.

This commit ensures when `ONLCR` is set `OPOST` is set too, which is
the only thing that really makes sense to do.

2 years agobuild(deps): bump meson from 0.63.3 to 0.64.1 in /.github/workflows
dependabot[bot] [Thu, 1 Dec 2022 09:01:42 +0000 (09:01 +0000)] 
build(deps): bump meson from 0.63.3 to 0.64.1 in /.github/workflows

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Thu, 1 Dec 2022 09:01:46 +0000 (09:01 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 3.1.1 to 3.2.1.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/1b1b75e42f0694c1012228513b21617a748c866e...f3cd08fcf12680861615270b29494d2b87c3e1cc)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/upload-artifact from 3.1.0 to 3.1.1
dependabot[bot] [Thu, 1 Dec 2022 09:01:43 +0000 (09:01 +0000)] 
build(deps): bump actions/upload-artifact from 3.1.0 to 3.1.1

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.0...83fd05a356d7e2593de66fc9913b3002723633cb)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump redhat-plumbers-in-action/advanced-issue-labeler
dependabot[bot] [Thu, 1 Dec 2022 09:01:38 +0000 (09:01 +0000)] 
build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler

Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/compare/fe9c43b7d77bd8bd7fbe86c2c217e74ebeea71f2...88209aef583c66312529c515d41ea6a710a4baba)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoTODO: add unprivileged nspawn item
Christian Brauner [Wed, 30 Nov 2022 15:05:31 +0000 (16:05 +0100)] 
TODO: add unprivileged nspawn item

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agoTODO: add socket reduction entry for nspawn
Christian Brauner [Wed, 30 Nov 2022 15:03:42 +0000 (16:03 +0100)] 
TODO: add socket reduction entry for nspawn

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agoTODO: add CLONE_PARENT entry for nspawn
Christian Brauner [Wed, 30 Nov 2022 15:02:39 +0000 (16:02 +0100)] 
TODO: add CLONE_PARENT entry for nspawn

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agoTODO: consolidate nspawn items
Christian Brauner [Wed, 30 Nov 2022 15:01:07 +0000 (16:01 +0100)] 
TODO: consolidate nspawn items

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2 years agocopy: Add COPY_GRACEFUL_WARN
Daan De Meyer [Wed, 30 Nov 2022 16:01:09 +0000 (17:01 +0100)] 
copy: Add COPY_GRACEFUL_WARN

When copying between filesystems, sometimes the target filesystem
might not support symlinks/fifos/sockets/... and we want to log and
ignore  any failures to copy such files when copying. Let's introduce
a new flag to enable this behavior.

2 years agoMerge pull request #25578 from mrc0mmand/test-shutdown-tweaks
Yu Watanabe [Thu, 1 Dec 2022 07:37:16 +0000 (16:37 +0900)] 
Merge pull request #25578 from mrc0mmand/test-shutdown-tweaks

test: give the container time to properly shut down on exception

2 years agoupdate TODO
Lennart Poettering [Wed, 30 Nov 2022 16:26:02 +0000 (17:26 +0100)] 
update TODO

2 years agotest: a couple of pylint-related tweaks 25578/head
Frantisek Sumsal [Wed, 30 Nov 2022 15:18:50 +0000 (16:18 +0100)] 
test: a couple of pylint-related tweaks

2 years agotest: give the container time to properly shut down on exception
Frantisek Sumsal [Wed, 30 Nov 2022 15:13:19 +0000 (16:13 +0100)] 
test: give the container time to properly shut down on exception

Otherwise the `terminate()` method sends SIGKILL rather quickly (~0.3s),
which then leaves a dangling scope on the host system, breaking further
test executions.

2 years agoMerge pull request #25574 from bluca/gh_wf
Daan De Meyer [Wed, 30 Nov 2022 13:28:05 +0000 (14:28 +0100)] 
Merge pull request #25574 from bluca/gh_wf

actions: restrict development_freeze to main repo and disable codeql on security repo

2 years agoGA: do not run codeql on systemd-security 25574/head
Luca Boccassi [Wed, 30 Nov 2022 10:28:34 +0000 (10:28 +0000)] 
GA: do not run codeql on systemd-security

Scanning is not available on private repositories

2 years agoGA: run development_freeze only on main repository
Luca Boccassi [Wed, 30 Nov 2022 10:28:13 +0000 (10:28 +0000)] 
GA: run development_freeze only on main repository

No point in running this checker on other forks

2 years agosd-netlink: fix assertion triggered by message_get_serial()
Yu Watanabe [Wed, 30 Nov 2022 00:20:12 +0000 (09:20 +0900)] 
sd-netlink: fix assertion triggered by message_get_serial()

This fixes an issue introduced by 7b34bae3b1a8726e241a56600a6edf9b3733a4f4.

Fixes https://github.com/systemd/systemd/pull/25565#issuecomment-1331353945.

2 years agomkfs-util: fix memleak
Yu Watanabe [Wed, 30 Nov 2022 00:26:13 +0000 (09:26 +0900)] 
mkfs-util: fix memleak

Fixes an issure introduced by c75cf0164cbd69104f13cbe7be42ab639953bd7d.

Fixes CID#1501073.

2 years agonetwork: address: use ASSERT_PTR() 25568/head
Yu Watanabe [Wed, 30 Nov 2022 01:22:39 +0000 (10:22 +0900)] 
network: address: use ASSERT_PTR()

2 years agonetwork: address: always update link state when an address is removed
Yu Watanabe [Wed, 30 Nov 2022 01:21:50 +0000 (10:21 +0900)] 
network: address: always update link state when an address is removed

The removed address might be in the tentative state.

2 years agonetwork: add missing assertion
Yu Watanabe [Tue, 29 Nov 2022 01:58:08 +0000 (10:58 +0900)] 
network: add missing assertion

2 years agocgtop: Update code comments
Michal Koutný [Tue, 29 Nov 2022 12:23:51 +0000 (13:23 +0100)] 
cgtop: Update code comments