Commit Graph
66813 Commits
Author SHA1 Message Date
Susant Sahani 543d2a4d45 CI: network dhcp6 - Add test for custom client identifier 2023-08-17 23:52:33 +05:30
Susant Sahani 89e73ce86f network: DHCP6 client- Allow to send manual DUID
```
[DHCPv6]
DUIDType=custom
DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00
```

```
Client Identifier
    Option: Client Identifier (1)
    Length: 12
    DUID: 0000ab11f92ac27729f95c00
    DUID Type: Unknown (0)
```
2023-08-17 23:52:22 +05:30
Johannes SegitzandFrantisek Sumsal 5f22d16bb3 test: Check that SELinux policy is available before running SELinux test (#28868)
* test: Check that SELinux policy is available before running SELinux test

---------

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
2023-08-17 18:04:53 +01:00
Luca Boccassi f1a621b09b Merge pull request #28832 from dtardon/list-clear
Add LIST_CLEAR() helper that empties the list
2023-08-17 16:27:43 +01:00
Daan De Meyer be7d808c1c Merge pull request #28869 from DaanDeMeyer/repart-trailing
repart: Make sure we keep trailing slashes in ExcludeFiles=
2023-08-17 14:55:03 +02:00
Luca Boccassi 13f008272a Merge pull request #28751 from yuwata/mount-revert
Revert "mount: check right before invoking /bin/umount if it makes sense"
2023-08-17 13:03:36 +01:00
Daan De Meyer cc2a0d85d2 meson: Use rsync to copy test data directories
install_subdir() does not copy symlinks but copies the file they
point to. We also get a very ugly warning in the meson install
output:

"""
Warning: trying to copy a symlink that points to a file. This will copy the file,
but this will be changed in a future version of Meson to copy the symlink as is. Please update your
build definitions so that it will not break when the change happens.
"""

Let's fix both problems at once by using rsync which does the right
thing. Verified by running systemd-dissect --mtree on both the install
output before and after and all the symlinks are now correctly preserved.
2023-08-17 13:50:26 +02:00
Daan De Meyer d10eccbd77 repart: Make sure we keep trailing slashes in ExcludeFiles=
We conditionalize behavior based on whether these paths have trailing
slashes or not, so let's make sure we keep them intact.
2023-08-17 13:23:39 +02:00
Daan De Meyer ce60b3a40a parse-helpers: Add PATH_KEEP_TRAILING_SLASH 2023-08-17 13:23:39 +02:00
Daan De Meyer 4541d045b2 path-util: Add path_simplify_full()
Sometimes its useful to keep a trailing slash in the path so let's
add path_simplify_full() and a flag to do just that.
2023-08-17 13:23:36 +02:00
David Tardon 45b1c015b0 bus-polkit: don't propagate error from polkit
An error reply from polkit is a valid case and should not be propagated
as failure of async_polkit_callback(). It should only be saved here.
It'll be returned by bus_verify_polkit_async() later, when it's called
for the same method again.

Follow-up for #26365.
2023-08-17 12:08:32 +02:00
Emanuele Giuseppe Esposito fab0eeb72b systemd-stub: ignore EFI shell unauthenticated kernel command line if we are in confidential vms 2023-08-17 11:31:43 +02:00
David Tardon 01d3fe43e2 open-file: add missing assert 2023-08-17 09:48:17 +02:00
David Tardon 6e8c5e9766 systemctl-show: rename cleanup function 2023-08-17 09:48:17 +02:00
David Tardon 52e3671bf7 tree-wide: use LIST_POP() 2023-08-17 09:48:17 +02:00
David Tardon 9aad490e53 tree-wide: use LIST_CLEAR() 2023-08-17 09:48:17 +02:00
David Tardon d327b7752f list: add LIST_CLEAR() helper that empties the list 2023-08-17 09:48:17 +02:00
Yu Watanabe 57d2b6a96f core/mount: disable timer event source when USEC_INFINITY
Setting USEC_INFINITY to timer event source should not cause any
problem. But, disabling timer event source should be preferable.

[zjs: simplify the call to sd_event_source_set_enabled()]
2023-08-17 08:25:31 +02:00
Luca Boccassi c0083c9ce0 Merge pull request #28862 from DaanDeMeyer/swap
mkosi: Add a swap partition
2023-08-16 22:24:18 +01:00
Daan De Meyer eeb246920d mkosi: Add a swap partition
systemd-oomd keeps complaining about the lack of swap partition, so
let's add one.
2023-08-16 21:26:07 +02:00
Daan De Meyer 973d6be402 repart: Default to swap format for swap partitions 2023-08-16 21:26:04 +02:00
Maanya Goenka d07246a621 documentation: add man page data for confext 2023-08-16 19:19:44 +01:00
Luca Boccassi 1c693730ef Merge pull request #28758 from keszybz/negative-errno-macro
Use macros to reduce indentation in errno error handling
2023-08-16 17:18:45 +01:00
Mike Yuan f2e2c93d0f journalctl: minor follow-up for --lines=
Follow-up for 8d6791d2aa

Addresses https://github.com/systemd/systemd/pull/28777#discussion_r1295790102
2023-08-16 16:23:35 +01:00
Luca Boccassi 663e27564f core: stage /run/host/os-release with a symlink to avoid possible race condition
If someone reads /run/host/os-release at the exact same time it is being updated, and it
is large enough, they might read a half-written file. This is very unlikely as
os-release is typically small and very rarely changes, but it is not
impossible.

Bind mount a staging directory instead of the file, and symlink the file
into into, so that we can do atomic file updates and close this gap.
Atomic replacement creates a new inode, so existing bind mounts would
continue to see the old file, and only new services would see the new file.
The indirection via the directory allows to work around this, as the
directory is fixed and never changes so the bind mount is always valid,
and its content is shared with all existing services.

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

Follow-up for 3f37a82545
2023-08-16 16:17:41 +01:00
Daan De Meyer 409986ed3e Merge pull request #28859 from poettering/btrfs-subvol-fix
btrfs: create subvol fix
2023-08-16 16:03:54 +02:00
Lennart Poettering 33b2da2d5b btrfs: use ERRNO_IS_NOT_SUPPORTED() where appropriate 2023-08-16 14:30:51 +02:00
Lennart Poettering f5254d0047 btrfs: drop O_PATH from dir_fd passed to btrfs_subvol_make() if needed
Let's make sure btrfs_subvol_make() can operate on O_PATH fds, just like
mkdirat().

Fixes a bunch of tmpfiles errors at boot if we try to create btrfs
subvols, introduced by e54c79ccc2

Fixes: e54c79ccc2
2023-08-16 14:29:20 +02:00
Mike Yuan 8d6791d2aa journalctl: support --lines=+N for showing the oldest N entries
After f582695107, the wrong behavior
occurred when --since= and --lines= are both specified is fixed.
However, it seems that the old behavior is already being somewhat
widely used, and the function itself makes sense, i.e. to allow --lines=
to output the first N journal entries.

Therefore, let's support prefixing the number for --lines= with '+',
and provide such functionality.

Related: #28746
2023-08-16 14:05:19 +02:00
Luca Boccassi d401182643 Merge pull request #28854 from keszybz/mailmap-and-license-info
Mailmap and license info
2023-08-16 12:34:22 +01:00
Luca Boccassi 2f72e94984 hwdb: update autosuspend rules
ninja -C build update-hwdb-autosuspend
2023-08-16 13:01:07 +02:00
Zbigniew Jędrzejewski-Szmek 5fa01ac036 manager: fix error handling after failure to set up child
exec_child() is supposed to set *exit_status when returning failure.
Unfortunately, we didn't do that in two cases. The result would be:
- a bogus error message "Failed at step SUCCESS spawning foo: …",
- a bogus success exit status.

Bugs introduced in 390902012c and
ad21e542b2.

The code is reworked to add some asserts and not set exit_status in the caller
so that it's clearer (also to the compiler) that it needs to be set.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 7ab24710a6 shared/barrier: remove parens 2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 3c098014f5 nspawn,shared: make ERRNO_IS_SECCOMP_FATAL an inline func with _NEG_ variant
Also rebreak comments and lines.

No functional change.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 7d01eb35dc shared/kbd-util: simplify error handling in keymap_exists()
Once we know the return value, we can just return it, no need to
exit the loop.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek bb44fd0734 various: use _NEG_ macros to reduce indentation
No functional change intended.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 1f2db2e315 libsystemd-network: use _NEG_ macros to reduce indentation
No functional change intended.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek c5ed77b220 libsystemd: use _NEG_ macros, adjust some comments
No functional change.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 882321a139 manager: use _NEG_ macros to reduce indentation, reword comments, drop parens 2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek fe0feacb9e errno-util: allow ERRNO_IS_* to accept types wider than int
This is useful if the variable is ssize_t and we don't want to trigger a
warning or truncation.

With gcc (gcc-13.2.1-1.fc38.x86_64), the resulting systemd binary is identical,
so I assume that the compiler is able to completely optimize away the type.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek d66ad6ff85 sd-id128: introduce ERRNO_IS_NEG_MACHINE_ID_UNSET 2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 3c8c67ce1d shared/cgroup-show: do not format path twice
Also, invert the "negative" condition to positive so that it matches the assert
right above. Also, print the path in the debug message.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 13d84288bc tree-wide: use cocinnelle to apply _NEG_ macros 2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek b0be985cdd basic/errno-util: add wrappers which only accept negative errno
We do 'IN_SET(r, -CONST1, -CONST2)', instead of 'IN_SET(-r, CONST1, CONST2)'
because -r is undefined if r is the minimum value (i.e. INT_MIN). But we know
that the constants are small, so their negative values are fine.
2023-08-16 12:52:56 +02:00
Zbigniew Jędrzejewski-Szmek 767aad7bfd Mark all base64 files as generated
This makes them ignored by license review.
2023-08-16 12:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 4afa722868 bsod: fix license tag 2023-08-16 12:49:44 +02:00
Zbigniew Jędrzejewski-Szmek 140d6853e9 mailmap: "reduce contributor count by 13"
This merges the counts for a few people who existed with and without accents,
or with different capitalizations, and suffixes. Also, stop overriding
NeilBrown's spelling of the name.

Note: IIUC, we have two Luca Bruno's: lucab@debian.net is not the same as the
other Luca BRUNO who works on coreos.

@@ -386 +385,0 @@
-     2	Damjan Georgievski
@@ -401 +399,0 @@
-     1	Daniel Berrange
@@ -425 +423 @@
-    11	Daniel P. Berrangé
+    12	Daniel P. Berrangé
@@ -888 +885,0 @@
-     1	Jiri Pirko
@@ -891 +888 @@
-     1	Jiří Pírko
+     2	Jiří Pírko
@@ -1105 +1102 @@
-    12	Luca BRUNO
+    18	Luca BRUNO
@@ -1107 +1104 @@
-     8	Luca Bruno
+     2	Luca Bruno
@@ -1160,2 +1157 @@
-     1	Marc-Andre Lureau
-    17	Marc-André Lureau
+    18	Marc-André Lureau
@@ -1313,2 +1309 @@
-    31	Michal Sekletar
-   168	Michal Sekletár
+   199	Michal Sekletár
@@ -1383,3 +1378 @@
-     2	Neal Gompa
-     1	Neal Gompa (ニール・ゴンパ)
-    12	Neil Brown
+     3	Neal Gompa (ニール・ゴンパ)
@@ -1387,0 +1381 @@
+    12	NeilBrown
@@ -1494,2 +1488 @@
-     1	Perry Yuan
-     1	Perry.Yuan
+     3	Perry Yuan
@@ -1941,2 +1934 @@
-     2	Viktar Vauchkevich
-     2	Viktar Vaŭčkievič
+     4	Viktar Vaŭčkievič
@@ -2016,2 +2008 @@
-     1	Yao Wei
-     1	Yao Wei (魏銘廷)
+     2	Yao Wei (魏銘廷)
@@ -2145 +2135,0 @@
-     1	gdamjan
@@ -2256 +2245,0 @@
-     1	perry_yuan
@@ -2331 +2320 @@
-    18	Дамјан Георгиевски
+    21	Дамјан Георгиевски
2023-08-16 12:49:42 +02:00
Lennart Poettering aea0f9abc5 update TODO 2023-08-16 11:42:13 +02:00
Lennart Poettering 79ae9015ac update TODO 2023-08-16 11:37:56 +02:00
Lennart Poettering c7c46845ff update TODO 2023-08-16 11:31:31 +02:00