1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-04 21:47:31 +03:00

66972 Commits

Author SHA1 Message Date
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
Luca Boccassi
28bd57e350
Merge pull request #28733 from goenkam/maanya/systemd-scoped
core: add confext support for ExtensionImages= and ExtensionDirectories=
2023-08-16 10:12:46 +01:00
Brian Norris
bd2f6a568d tools: update-hwdb-autosuspend.sh: Point at HEAD, not master branch
Many Chromium projects have moved from 'master' to 'main', where
'master' is no longer updated. Point at HEAD instead, which should
always represent the default branch.

I don't actually rerun/regenerate the database, since I don't really run
systemd environments to test that update on.
2023-08-16 02:07:00 +01:00
Maanya Goenka
b856f1dfc5 test: add test for confext service-scoped support 2023-08-15 18:34:57 +00:00
Maanya Goenka
55ea4ef096 allow ExtensionImages= and ExtensionDirectories= settings to support confext images 2023-08-15 18:34:46 +00:00
Maanya Goenka
0da675fddd add an @ option for confext 2023-08-15 17:41:35 +00:00
Luca Boccassi
75bb2425a3
Merge pull request #28839 from DaanDeMeyer/repart-followups
Repart followups
2023-08-15 16:40:05 +01:00
Michael A Cassaniti
c380047bf4 repart: Add verity configuration section and options 2023-08-15 15:32:09 +01:00
Daan De Meyer
f19659b91f
Merge pull request #28838 from DaanDeMeyer/repart-subvolume
mkosi: Create a few subvolumes in the root partition
2023-08-15 14:56:10 +02:00
Daan De Meyer
7bc6c02896 repart: Massage the minimize for XFS a bit
A 1.5 multiplier doesn't seem to be sufficient for XFS as seen in
mkosi CI. Let's increase it to 2 for XFS to hopefully get better
results.
2023-08-15 12:58:28 +02:00
Kiran Vemula
a67e5c6e37
resolved: fixed bugs reported in varlink statistics (#28796)
Fixes https://github.com/systemd/systemd/issues/28791

Follow-up for bc837621a38efbaff14fbe33bfe5c34dac805343
2023-08-15 11:45:58 +01:00
Daan De Meyer
c3e83f09ea mkosi: Update to v15.1 release 2023-08-15 12:32:39 +02:00
Daan De Meyer
06ba811a76 mkosi: Create a few subvolumes in the root partition
Let's exercise the repart Subvolumes= setting by creating a few
subvolumes in the root partition when we create it.
2023-08-15 12:32:39 +02:00
Daan De Meyer
ade85cd519 repart: Rework read-only logic
verity sig partitions can't actually be marked read-only, so let's
not do that to avoid an ugly warning about that. Instead, let's just
make sure that we mark verity hash and verity data partitions as
read-only.
2023-08-15 12:32:39 +02:00
Daan De Meyer
ffd9d75cde repart: Allow using Subvolumes= with automatic --offline
If we fail to allocate a loopback device and subvolumes are configured,
we fail instead of falling back to a regular file.
2023-08-15 12:32:36 +02:00
Warren
5007942477
p11kit: check the flags associated with the slot instead of flags associated with the token
The logic around checking PKCS11 tokens (used by systemd-cryptenroll) contains a bug.
The code is checking the flags field of a pkcs11 token_info structure against a set of flags defined for the pkcs11 slot_info structure. This PR changes the check so that the correct structure's flag field is being checked.
(Reference to the PKCS#11 spec:http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html, section CK_SLOT_INFO).
2023-08-15 11:28:14 +01:00
Daan De Meyer
b1110c81d8 mkfs-util: Don't set MKE2FS_DEVICE_PHYS_SECTSIZE
We only care about the logical sector size and if the physical sector
size isn't set and we're operating on a file, mke2fs will default the
physical sector size to the logical block size anyway.

This change makes sure that if we're operating on a block device and
set an explicit logical sector size, that doesn't affect the physical
sector size.
2023-08-15 12:10:14 +02:00
Daan De Meyer
5f13fb0a73 repart: Put function call closer to its error handling 2023-08-15 12:09:31 +02:00
Luca Boccassi
4ccee4b426
Merge pull request #28812 from DaanDeMeyer/sector-size
repart: Use 4096 as the fallback sector size for verity/luks/filesystems
2023-08-15 10:16:24 +01:00
Daan De Meyer
c81e350c03
Merge pull request #28833 from DaanDeMeyer/copy-subvolume
repart: Add Subvolumes= setting
2023-08-15 09:53:02 +02:00
Michael A Cassaniti
eeee486159 sysupdate: Use sector size for partition size calculations 2023-08-15 09:17:12 +02:00
Daan De Meyer
4b17f5c378
Merge pull request #28829 from DaanDeMeyer/mount-fd
tree-wide: Mount file descriptors via /proc/<pid>/fd
2023-08-15 09:04:45 +02:00
Luca Boccassi
e158e17299
Merge pull request #28835 from mrc0mmand/more-tests
test: add coverage for #27953
2023-08-15 01:54:52 +01:00
Daan De Meyer
4419735822 fd-util: Use /proc/pid/fd instead of /proc/self/fd
Currently, we mount via file descriptors using /proc/self/fd. This
works, but it means that in /proc/mounts and various other files,
the source of the mount will be listed as /proc/self/fd/xxx. For other
software that parses these files, /proc/self/fd/xxx doesn't mean anything,
or worse, it means the completely wrong thing, as it will refer to one of
their own file descriptors instead.

Let's improve the situation by using /proc/pid/fd instead. This allows
processes parsing /proc/mounts to do the right thing more often than not.
One scenario where even this doesn't work if when containers are involved,
as with the pid namespace unshared, even /proc/pid/fd will mean the wrong
thing, but it's no worse than /proc/self/fd which will always means the wrong
thing.

This also doesn't work if we mount via file descriptor and then exit, as the pid will
be gone, but it does work as long as the process that did the mount is alive, which
makes it useful for systemd-dissect --with for example if the program we run in the
image wants to parse /proc/mounts.
2023-08-14 22:43:12 +02:00
Frantisek Sumsal
01febfcdce test: explicitly specify a UTF-8 locale for UTF-8 shenanigans
As things don't work well without it:

$ LANG=C printf "\ufffe\n"
\uFFFE
2023-08-14 20:09:31 +02:00
Frantisek Sumsal
3ba954dd57 test: add coverage for #27953 2023-08-14 19:35:37 +02:00
Frantisek Sumsal
39f17be437 test: drop unnecessary log level setup
As we do that globally via a dropin.
2023-08-14 19:31:20 +02:00
Daan De Meyer
440f805c17 repart: Add Subvolumes= setting
This setting indicates which directories in the target partition
should be btrfs subvolumes. If set, we'll try to create these
directories as subvolumes.

Note that this only works when running as root without --offline,
as mkfs.btrfs does not support creating subvolumes.
2023-08-14 18:46:08 +02:00
Daan De Meyer
c55a97f1fd mkdir: Add support for creating subvolumes to mkdir_p_root()
We pass in the paths which should be subvolumes and try to create
those as subvolumes if we can.
2023-08-14 18:46:08 +02:00
Daan De Meyer
ad6fae7ffc copy: Add support for creating subvolumes to copy_tree_at()
The subvolumes set is a set of source inodes similar to how the
denylist hashmap contains source inodes as keys. It indicates
directories in the source tree that should become subvolumes in
the target tree.
2023-08-14 18:46:08 +02:00
Daan De Meyer
bc6a6130ac fs-util: Add XO_SUBVOLUME flag for xopenat()
When specified, xopenat() will try to create a btrfs subvolume and
fall back to creating a regular directory.
2023-08-14 18:46:08 +02:00
Daan De Meyer
e54c79ccc2 btrfs-util: Move subvolume creation to basic/btrfs.h
Also make btrfs_subvol_make() an openat style function.
2023-08-14 18:46:08 +02:00
Daan De Meyer
6819924c30 path-util: Make ret argument optional for path_extract_directory() 2023-08-14 18:46:06 +02:00
Daan De Meyer
672de611dd
Merge pull request #28828 from DaanDeMeyer/sysupdate-fdisk
fdisk-util: Make fdisk_new_context_fd() more generic
2023-08-14 14:23:03 +02:00
Daan De Meyer
e36c6210b7 dissect-image: Fix mount_point_is_available()
We call dir_is_empty() to check if the directory is empty but don't
take the result into account when returning from the function.
2023-08-14 14:22:38 +02:00
Daan De Meyer
2af02e6165 tree-wide: Always include <net/if.h> before related linux headers
Otherwise, we get redefinition errors if <net/if.h> is included later
on by another header.
2023-08-14 13:16:46 +02:00
Daan De Meyer
93f125a66f repart: Use 4096 as the fallback sector size for verity/luks/filesystems
When we don't know the sector size of the actual block device, because
we're building an image in a loopback file and no sector size was specified
explicitly, let's use 4096 as the sector size for filesystems, verity and
LUKS. This should be the most compatible option, since 4096 will also work
on devices with sector size 512 or 2048.

For the actual GPT partition table size, we stick with 512 as the default
value since UEFI firmware and the kernel will only try to read the GPT
partition table from the first LBA on the device and the sector size for
most devices is still 512. It can also be trivially modified when copying
the image to another device using --copy-from + --sector-size.
2023-08-14 11:04:52 +02:00
Daan De Meyer
4492eb1186 tree-wide: Use fdisk_new_context_at() more 2023-08-14 10:42:43 +02:00
Daan De Meyer
fd9fe57a26 fdisk-util: Make fdisk_new_context_fd() more generic
Let's make this an openat() style function so we can also pass a
device path.
2023-08-14 10:27:57 +02:00
Daan De Meyer
59120e89d8
Merge pull request #28827 from gioele/docs-fix-network-online-example-unit
docs/NETWORK_ONLINE: Move `Type=`, `RemainAfterExit=` to `[Service]` + Use `until` instead of `while !`
2023-08-14 10:08:20 +02:00
Gioele Barabucci
4a899c5a23 docs/NETWORK_ONLINE: Use until instead of while !
`until` is the standard POSIX shell builtin to be used when waiting for
a condition to appear.
2023-08-14 09:15:31 +02:00
Gioele Barabucci
3078ece8c4 docs/NETWORK_ONLINE: Move Type=, RemainAfterExit= to [Service]
`Type=` and `RemainAfterExit=` belong in `[Service]`, not `[Unit]`.

Fixes #28826
2023-08-14 09:15:21 +02:00