]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agoudev/ata_id: use unliagned helpers 26785/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Mar 2023 15:42:32 +0000 (16:42 +0100)] 
udev/ata_id: use unliagned helpers

The array is a union, aligned as uint16_t, so we were accessing fields at
offsets of two, so we didn't do actually do unaligned access. But let's make
this explicit.

2 years agoudev/v4l_id: use O_CLOEXEC|O_NOCTTY
Zbigniew Jędrzejewski-Szmek [Thu, 16 Mar 2023 15:40:00 +0000 (16:40 +0100)] 
udev/v4l_id: use O_CLOEXEC|O_NOCTTY

This is the usual set of flags. O_CLOEXEC doesn't matter because we don't spawn
anything, but O_NOCTTY could possibly make a difference if the helper is called
on a wrong device type.

2 years agomeson: add udev builtins to dist-check
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 11:13:51 +0000 (12:13 +0100)] 
meson: add udev builtins to dist-check

They now pass, and we might as well test them to avoid unexpected
regressions.

2 years agoudev: implement --version in all builtins
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 17:12:04 +0000 (18:12 +0100)] 
udev: implement --version in all builtins

Those are separate binaries, and occasionally people will get a misplaced
binary that doesn't match the rest of the installed system and be confused, so
it good to be able to check the version. It is also nice to have the same
interface in all binaries.

Note that we usually use a separate 'enum ARG_VERSION = 0x100' for an option
without a short name. We can use a less verbose approach of simply taking any
unused letter, which works just as well and even the compiler would warn us
if we tried to use the letter in another place. This way we avoid a few lines
of boilerplate.

The help texts are adjusted to have an empty line between the synopsis and
option list, and no empty lines after the option list.

2 years agoudev/cdrom_id: do not abort on unknown options
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 10:59:43 +0000 (11:59 +0100)] 
udev/cdrom_id: do not abort on unknown options

Copy-pasta is good, but you have to pick a reliable source.

2 years agoudev/mtd_probe: convert to run()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 10:49:48 +0000 (11:49 +0100)] 
udev/mtd_probe: convert to run()

2 years agoudev/mtd_probe: implement --help
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 10:46:01 +0000 (11:46 +0100)] 
udev/mtd_probe: implement --help

2 years agoudev/fido_id: implement --help
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 10:39:44 +0000 (11:39 +0100)] 
udev/fido_id: implement --help

2 years agoudev/ata_id: stop using errno, fix logic
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 10:28:54 +0000 (11:28 +0100)] 
udev/ata_id: stop using errno, fix logic

The code was setting errno, which we don't do, and which is hard to get right…
Rework the code to use the usual negative-errno convention and add some
debug logging.

disk_scsi_inquiry_command() was working partially by accident: the v3 fallback
would enter the v4 check path, and pass it because the v4 data would still be
initialized to 0.

2 years agoudev/ata_id: drop unused output parameter
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 09:56:17 +0000 (10:56 +0100)] 
udev/ata_id: drop unused output parameter

2 years agoudev/ata_id: convert to run()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 09:45:23 +0000 (10:45 +0100)] 
udev/ata_id: convert to run()

2 years agoudev/ata_id: split out parse_argv()
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 09:42:14 +0000 (10:42 +0100)] 
udev/ata_id: split out parse_argv()

Beef up syntax and error messages a bit.

2 years agoudev/v4l_id: convert to run() and add error messages
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2023 09:15:45 +0000 (10:15 +0100)] 
udev/v4l_id: convert to run() and add error messages

Also split out parse_argv(), use "ARG" instead of "<arg>".
Make the syntax help a bit more precise.

2 years agoMerge pull request #26772 from yuwata/time-util-adjust-formattable-timestamp-max
Luca Boccassi [Sun, 12 Mar 2023 23:06:39 +0000 (23:06 +0000)] 
Merge pull request #26772 from yuwata/time-util-adjust-formattable-timestamp-max

time-util: adjust formattable timestamp max

2 years agoadded a unit test for a function in "argv-utils.c" (#26760)
OMOJOLA JOSHUA [Sun, 12 Mar 2023 23:03:52 +0000 (00:03 +0100)] 
added a unit test for a function in "argv-utils.c" (#26760)

* added a unit test for argv-utils.c

2 years agotest-time-util: do not fail on DST change 26772/head
Yu Watanabe [Sun, 12 Mar 2023 18:47:45 +0000 (03:47 +0900)] 
test-time-util: do not fail on DST change

2 years agotime-util: add note about on DST change
Yu Watanabe [Sun, 12 Mar 2023 18:47:15 +0000 (03:47 +0900)] 
time-util: add note about on DST change

2 years agotest: add more testcases for formatting/parsing timestamp
Yu Watanabe [Sun, 12 Mar 2023 11:59:38 +0000 (20:59 +0900)] 
test: add more testcases for formatting/parsing timestamp

2 years agotime-util: make USEC_TIMESTAMP_FORMATTABLE_MAX for 32bit system off by one day
Yu Watanabe [Sun, 12 Mar 2023 11:57:16 +0000 (20:57 +0900)] 
time-util: make USEC_TIMESTAMP_FORMATTABLE_MAX for 32bit system off by one day

As the same reason why we take one day off for 64bit case.

This also makes both upper bounds always defined for testing.

2 years agoMerge pull request #26775 from DaanDeMeyer/ext-default
Yu Watanabe [Sun, 12 Mar 2023 19:04:09 +0000 (04:04 +0900)] 
Merge pull request #26775 from DaanDeMeyer/ext-default

mkfs-util: Always use "default" usage type for ext filesystems

2 years agoMerge pull request #26776 from YHNdnzj/edit-util-more-cleanup
Yu Watanabe [Sun, 12 Mar 2023 19:01:02 +0000 (04:01 +0900)] 
Merge pull request #26776 from YHNdnzj/edit-util-more-cleanup

edit-util: some more cleanups

2 years agoedit-util: include the correct header 26776/head
Mike Yuan [Sun, 12 Mar 2023 17:44:51 +0000 (01:44 +0800)] 
edit-util: include the correct header

2 years agoedit-util: rename trim_edit_marker to strip_edit_temp_file
Mike Yuan [Sun, 12 Mar 2023 16:39:07 +0000 (00:39 +0800)] 
edit-util: rename trim_edit_marker to strip_edit_temp_file

with some minor cleanups

2 years agoedit-util: always create temp file
Mike Yuan [Sun, 12 Mar 2023 10:06:02 +0000 (18:06 +0800)] 
edit-util: always create temp file

even if neither original_path nor comment_paths is specified.

2 years agoedit-util: minor cleanups
Mike Yuan [Sat, 11 Mar 2023 14:52:39 +0000 (22:52 +0800)] 
edit-util: minor cleanups

Reuse unlink_and_free() and avoid unnecessary
call to rmdir()

2 years agomkfs-util: Redirect mkfs.vfat stdout to /dev/null 26775/head
Daan De Meyer [Sun, 12 Mar 2023 15:20:38 +0000 (16:20 +0100)] 
mkfs-util: Redirect mkfs.vfat stdout to /dev/null

mkfs.vfat does not have a --quiet option so let's redirect its
stdout to /dev/null instead.

2 years agomkfs-util: Don't explicitly enable has_journal for ext3/ext4
Daan De Meyer [Sun, 12 Mar 2023 14:36:08 +0000 (15:36 +0100)] 
mkfs-util: Don't explicitly enable has_journal for ext3/ext4

It's enabled by default anyway and removing it allows merging the ext
conditionals into one.

2 years agomkfs-util: Always use "default" usage type for ext filesystems
Daan De Meyer [Sun, 12 Mar 2023 14:15:35 +0000 (15:15 +0100)] 
mkfs-util: Always use "default" usage type for ext filesystems

If no usage type is explicitly specified, ext will choose one based
on the filesystem size. Let's override this and always use the
"default" usage type so that we can create filesystems that are
initially small but might grow later without opting in to the "small"
usage type.

2 years agoMerge pull request #26756 from yuwata/edit-util-cleanups
Mike Yuan [Sun, 12 Mar 2023 11:23:19 +0000 (19:23 +0800)] 
Merge pull request #26756 from yuwata/edit-util-cleanups

edit-util: several cleanups

2 years agosd-boot: fix incompatible type
Yu Watanabe [Sun, 12 Mar 2023 07:40:18 +0000 (16:40 +0900)] 
sd-boot: fix incompatible type

Fixes the following build error:
```
../src/boot/efi/vmm.c: In function ‘get_smbios_table’:
../src/boot/efi/vmm.c:217:24: error: incompatible types when returning type ‘_Bool’ but ‘const SmbiosHeader *’ was expected
  217 |                 return false;
      |                        ^~~~~
```

2 years agoedit-util: unlink temporary file on failure 26756/head
Yu Watanabe [Sat, 11 Mar 2023 13:20:51 +0000 (22:20 +0900)] 
edit-util: unlink temporary file on failure

Addresses the suggestion
https://github.com/systemd/systemd/pull/26756#discussion_r1133078705.

2 years agoedit-util: fix potentical crash when no edit markers
Yu Watanabe [Sat, 11 Mar 2023 08:38:03 +0000 (17:38 +0900)] 
edit-util: fix potentical crash when no edit markers

This also makes trim_edit_markers() take EditFile as the argument.

2 years agoedit-util: make create_edit_temp_file() take EditFile as the argument
Yu Watanabe [Sat, 11 Mar 2023 08:35:55 +0000 (17:35 +0900)] 
edit-util: make create_edit_temp_file() take EditFile as the argument

No functional changes, just refactoring.

2 years agoedit-util: make EditFile take reference of EditFileContext
Yu Watanabe [Sat, 11 Mar 2023 08:42:34 +0000 (17:42 +0900)] 
edit-util: make EditFile take reference of EditFileContext

No functional change, just preparation for later commits.

2 years agosystemctl-edit: invert one error check
Yu Watanabe [Sat, 11 Mar 2023 08:19:35 +0000 (17:19 +0900)] 
systemctl-edit: invert one error check

2 years agosystemctl-edit: shorten code a bit
Yu Watanabe [Sat, 11 Mar 2023 08:18:29 +0000 (17:18 +0900)] 
systemctl-edit: shorten code a bit

2 years agomkosi: Update to latest
Daan De Meyer [Sat, 11 Mar 2023 12:32:29 +0000 (13:32 +0100)] 
mkosi: Update to latest

2 years agoMerge pull request #26641 from medhefgo/boot-elf2efi
Yu Watanabe [Sat, 11 Mar 2023 08:15:01 +0000 (17:15 +0900)] 
Merge pull request #26641 from medhefgo/boot-elf2efi

boot: Drop gnu-efi / Add elf2efi.py

2 years agoMerge pull request #26303 from YHNdnzj/edit-util
Yu Watanabe [Sat, 11 Mar 2023 08:13:27 +0000 (17:13 +0900)] 
Merge pull request #26303 from YHNdnzj/edit-util

shared: add edit-util (part of which extracted from systemctl-edit)

2 years agoMerge pull request #26739 from ldv-alt/udevadm-verify
Yu Watanabe [Sat, 11 Mar 2023 08:12:57 +0000 (17:12 +0900)] 
Merge pull request #26739 from ldv-alt/udevadm-verify

udevadm verify: introduce --root option

2 years agoMerge pull request #26752 from Foxboron/morten/fix-manpage
Yu Watanabe [Sat, 11 Mar 2023 08:12:47 +0000 (17:12 +0900)] 
Merge pull request #26752 from Foxboron/morten/fix-manpage

src: Fixup copy-paste error for terminal_urlify_man

2 years agoman: Fix pcrphase.service manvolnum from 1 to 8 26752/head
Morten Linderud [Fri, 10 Mar 2023 19:29:56 +0000 (20:29 +0100)] 
man: Fix pcrphase.service manvolnum from 1 to 8

2 years agosrc: Fixup copy-paste error for terminal_urlify_man
Morten Linderud [Fri, 10 Mar 2023 19:20:44 +0000 (20:20 +0100)] 
src: Fixup copy-paste error for terminal_urlify_man

Signed-off-by: Morten Linderud <morten@linderud.pw>
2 years agogenerator: fix comment 26750/head
Yu Watanabe [Fri, 10 Mar 2023 18:32:23 +0000 (03:32 +0900)] 
generator: fix comment

2 years agoedit-util: several cleanups for run_editor 26303/head
Mike Yuan [Sat, 25 Feb 2023 18:09:24 +0000 (02:09 +0800)] 
edit-util: several cleanups for run_editor

run_editor is now switched to heap allocation
for simplicity. The code for child is made into
an individual function for simpler error handling.

2 years agosystemctl: edit: several cleanups
Mike Yuan [Sat, 25 Feb 2023 17:54:10 +0000 (01:54 +0800)] 
systemctl: edit: several cleanups

2 years agoedit-util: introduce EditFileContext
Mike Yuan [Sat, 25 Feb 2023 13:02:17 +0000 (21:02 +0800)] 
edit-util: introduce EditFileContext

This is a rather large change which moves
the add and install logic into edit-util.

We store an EditFile array and the number of
elements, along with the edit markers used in
temporary files and whether to remove the parent
directories of the target files if they're empty
in an EditFileContext object.

Call edit_files_add() to add an file to edit,
and do_edit_files_and_install() to do the actual
editing (through create_edit_temp_file(),
run_editor() and trim_edit_markers()).
After that, edit_file_context_done() can be used
to destroy the object.

2 years agoedit-util: several cleanups to create_edit_temp_file
Mike Yuan [Sat, 25 Feb 2023 13:11:02 +0000 (21:11 +0800)] 
edit-util: several cleanups to create_edit_temp_file

original_path and comment_paths can now be used
together.

Removes reference to "unit"

2 years agoshared: extract edit-util from systemctl-edit
Mike Yuan [Sat, 25 Feb 2023 12:47:13 +0000 (20:47 +0800)] 
shared: extract edit-util from systemctl-edit

2 years agoudev_rules_parse_file: issue diagnostics about duplicate LABEL tokens 26739/head
Dmitry V. Levin [Fri, 10 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
udev_rules_parse_file: issue diagnostics about duplicate LABEL tokens

When a rules contains several LABEL tokens, the parser used to silently
discard all of them besides the last one without any diagnostics at all.
It's time to break the vow of silence and let the parser issue a warning.

2 years agomount: Include After=local-fs-pre.target by default in initrd
Will Fancher [Wed, 8 Feb 2023 03:00:38 +0000 (22:00 -0500)] 
mount: Include After=local-fs-pre.target by default in initrd

Although it may be true that /sysroot and its children don't belong in
local-fs.target, that doesn't mean they shouldn't come after
local-fs-pre.target. For instance, systemd-hibernate-resume@.service needs to
come before /sysroot and its children, but currently that only happens
coincidentally because of the ordering between systemd-fsck@.service and
local-fs-pre.target. As a result, mount units can be mistakenly started
simultaneously with systemd-hibernate-resume@.service, which can cause
corruption and data loss in the worst of cases.

2 years agotestsuite-17.11.sh: check udevadm verify --root
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
testsuite-17.11.sh: check udevadm verify --root

2 years agoudevadm verify: introduce --root option
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
udevadm verify: introduce --root option

When udevadm verify is invoked without positional arguments and loads
all rules files from the system like the udev daemon does, this option
can be used to operate on files underneath the specified root path.

2 years agoudevadm verify: load all rules from the system if no rules were given
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
udevadm verify: load all rules from the system if no rules were given

When udevadm verify is invoked without positional arguments, that is,
when no udev rules files are specified, load all rules files from the system
like the udev daemon does, and verify them.

2 years agotestsuite-17.11.sh: prepare to test udevadm verify --root
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
testsuite-17.11.sh: prepare to test udevadm verify --root

2 years agotestsuite-17.11.sh: create all files in a temporary directory
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
testsuite-17.11.sh: create all files in a temporary directory

Make sure the test would not collide with anything else by moving
all files it created into a temporary directory.

2 years agotestsuite-17.11.sh: robustify unknown user/group checks
Dmitry V. Levin [Thu, 9 Mar 2023 08:00:00 +0000 (08:00 +0000)] 
testsuite-17.11.sh: robustify unknown user/group checks

Use certainly invalid user/group names in the tests that check
unknown user/group diagnostics.

2 years agoMerge pull request #26726 from DaanDeMeyer/cleanups
Daan De Meyer [Fri, 10 Mar 2023 13:22:53 +0000 (14:22 +0100)] 
Merge pull request #26726 from DaanDeMeyer/cleanups

Various small cleanups

2 years agoMerge pull request #26737 from poettering/runtime-scope
Lennart Poettering [Fri, 10 Mar 2023 12:09:40 +0000 (13:09 +0100)] 
Merge pull request #26737 from poettering/runtime-scope

add RuntimeScope enum, replacing LookupScope and various booleans indicating whether we are called in a per-system or per-user context

2 years agoMerge pull request #26747 from poettering/dissect-common-decrypt
Lennart Poettering [Fri, 10 Mar 2023 12:07:22 +0000 (13:07 +0100)] 
Merge pull request #26747 from poettering/dissect-common-decrypt

minor clean-ups for src/dissect/dissect.c

2 years agotest: run script from /tmp, not /run
Luca Boccassi [Thu, 9 Mar 2023 17:08:01 +0000 (17:08 +0000)] 
test: run script from /tmp, not /run

On Debian the test fails because /run is noexec. Simply create the
script in /tmp (and use a BindPath=), as other tests are doing.

Follow-up for 3b7101183cac4b35a8bd6ea2c1de9260c33f977f

2 years agolock-util: Use unposix_lock() in make_lock_file() and release_lock_file() 26726/head
Daan De Meyer [Fri, 10 Mar 2023 10:08:57 +0000 (11:08 +0100)] 
lock-util: Use unposix_lock() in make_lock_file() and release_lock_file()

2 years agouser-util: Use unposix_lock() in take_etc_passwd_lock()
Daan De Meyer [Thu, 9 Mar 2023 11:28:31 +0000 (12:28 +0100)] 
user-util: Use unposix_lock() in take_etc_passwd_lock()

2 years agolock-util: Move to src/basic
Daan De Meyer [Thu, 9 Mar 2023 11:26:25 +0000 (12:26 +0100)] 
lock-util: Move to src/basic

2 years agolock-util: Add CLEANUP_UNPOSIX_UNLOCK()
Daan De Meyer [Wed, 8 Mar 2023 12:00:40 +0000 (13:00 +0100)] 
lock-util: Add CLEANUP_UNPOSIX_UNLOCK()

Also migrate the logic in dynamic-user.c to use the new cleanup
macro.

2 years agolock-util: Add unposix_lock()
Daan De Meyer [Thu, 9 Mar 2023 11:16:54 +0000 (12:16 +0100)] 
lock-util: Add unposix_lock()

Let's add an interface to UNPOSIX locks that mimicks the flock()
interface for BSD locks.

2 years agomeson: Use static library for EFI tests 26641/head
Jan Janssen [Sat, 4 Mar 2023 13:10:35 +0000 (14:10 +0100)] 
meson: Use static library for EFI tests

This also moves them so that fuzz builds do not need pyelftools around.

2 years agoboot: Fix unused function warning
Jan Janssen [Thu, 2 Mar 2023 16:11:52 +0000 (17:11 +0100)] 
boot: Fix unused function warning

2 years agoci: Adjust for new EFI build
Jan Janssen [Thu, 2 Mar 2023 14:41:17 +0000 (15:41 +0100)] 
ci: Adjust for new EFI build

2 years agoboot: Add RISCV32 and LoongArch support
Jan Janssen [Tue, 28 Feb 2023 17:05:18 +0000 (18:05 +0100)] 
boot: Add RISCV32 and LoongArch support

This is completely untested, but should work in theory, as it's just
adding a couple defines according to the specs.

2 years agoboot: Fix debug experience
Jan Janssen [Tue, 28 Feb 2023 16:44:05 +0000 (17:44 +0100)] 
boot: Fix debug experience

2 years agoboot: Bring back bootloader builds
Jan Janssen [Mon, 27 Feb 2023 15:54:48 +0000 (16:54 +0100)] 
boot: Bring back bootloader builds

This adds back sd-boot builds by using meson compile targets directly.
We can do this now, because userspace binaries use the special
dependency that allows us to easily separate flags, so that we don't
pass anything to EFI builds that shouldn't be passed.

Additionally, we pass a bunch of flags to hopefully disable/override any
distro provided flags that should not be used for EFI binaries.

Fixes: #12275
2 years agotree-wide: Drop gnu-efi
Jan Janssen [Sun, 26 Feb 2023 13:09:44 +0000 (14:09 +0100)] 
tree-wide: Drop gnu-efi

This drops all mentions of gnu-efi and its manual build machinery. A
future commit will bring bootloader builds back. A new bootloader meson
option is now used to control whether to build sd-boot and its userspace
tooling.

2 years agomeson: Introduce userspace dep
Jan Janssen [Sun, 26 Feb 2023 10:07:24 +0000 (11:07 +0100)] 
meson: Introduce userspace dep

This will help in a later commit to separate userspace from EFI builds.

2 years agodissect: use a switch statements where appropriate 26747/head
Lennart Poettering [Fri, 10 Mar 2023 10:33:23 +0000 (11:33 +0100)] 
dissect: use a switch statements where appropriate

2 years agodissect: share dissected_image_decrypt_interactively() invocation between actions
Lennart Poettering [Fri, 10 Mar 2023 10:32:20 +0000 (11:32 +0100)] 
dissect: share dissected_image_decrypt_interactively() invocation between actions

Let's invoke dissected_image_decrypt_interactively() at once place only,
instead of in each function separately.

No actual changes, just some minor refactoring.

2 years agoMerge pull request #26331 from ddstreet/tpm2_pcr_read
Lennart Poettering [Fri, 10 Mar 2023 09:24:39 +0000 (10:24 +0100)] 
Merge pull request #26331 from ddstreet/tpm2_pcr_read

Tpm2 pcr read

2 years agolockfile-util: Rename to lock-util
Daan De Meyer [Wed, 8 Mar 2023 11:57:39 +0000 (12:57 +0100)] 
lockfile-util: Rename to lock-util

2 years agolockfile-util: Drop flock() fallback
Daan De Meyer [Thu, 9 Mar 2023 10:44:13 +0000 (11:44 +0100)] 
lockfile-util: Drop flock() fallback

UNPOSIX locks were added in 3.15 which is now our minimal kernel
version, so let's drop the fallback.

2 years agoruntime-scope: add helper that turns RuntimeScope enum into --system/--user string 26737/head
Lennart Poettering [Thu, 9 Mar 2023 16:41:25 +0000 (17:41 +0100)] 
runtime-scope: add helper that turns RuntimeScope enum into --system/--user string

2 years agobasic: add RuntimeScope enum
Lennart Poettering [Fri, 10 Mar 2023 08:47:10 +0000 (09:47 +0100)] 
basic: add RuntimeScope enum

In various tools and services we have a per-system and per-user concept.
So far we sometimes used a boolean indicating whether we are in system
mode, or a reversed boolean indicating whether we are in user mode, or
the LookupScope enum used by the lookup path logic.

Let's address that, in introduce a common enum for this, we can use all
across the board.

This is mostly just search/replace, no actual code changes.

2 years agosocket-util: fix socket_get_family()
Lennart Poettering [Tue, 7 Mar 2023 21:50:41 +0000 (22:50 +0100)] 
socket-util: fix socket_get_family()

Function didn't actually return anything useful. Quite a shame.

2 years agoMerge pull request #26693 from poettering/udev-loop-links
Lennart Poettering [Fri, 10 Mar 2023 08:34:31 +0000 (09:34 +0100)] 
Merge pull request #26693 from poettering/udev-loop-links

udev: add /dev/loop/by-inode/… + /dev/loop/by-ref/… loopback block device symlinks

2 years agoMerge pull request #26704 from poettering/mnt-nosymlinks
Lennart Poettering [Fri, 10 Mar 2023 08:34:04 +0000 (09:34 +0100)] 
Merge pull request #26704 from poettering/mnt-nosymlinks

Set MS_NOSYMFOLLOW for ESP + XBOOTLDR and many mount option clean-ups

2 years agorepart: Add support for reading mkfs options from environment
Daan De Meyer [Thu, 9 Mar 2023 19:33:04 +0000 (20:33 +0100)] 
repart: Add support for reading mkfs options from environment

2 years agoMerge pull request #26741 from poettering/acquire-fd-fixes
Lennart Poettering [Fri, 10 Mar 2023 08:33:20 +0000 (09:33 +0100)] 
Merge pull request #26741 from poettering/acquire-fd-fixes

trivial fixes to acquire_data_fd()

2 years agoload-fragment: add user credential specifiers to user.conf
Ronan Pigott [Tue, 28 Feb 2023 05:57:06 +0000 (22:57 -0700)] 
load-fragment: add user credential specifiers to user.conf

This enables the ManagerEnvironment= settings in the user's user.conf to
reference some user data like $HOME for the purpose of setting
environment variables derived from these values.

2 years agoMerge pull request #26734 from mrc0mmand/test-followups
Luca Boccassi [Fri, 10 Mar 2023 00:03:48 +0000 (00:03 +0000)] 
Merge pull request #26734 from mrc0mmand/test-followups

Assorted test tweaks

2 years agoMerge pull request #26731 from yuwata/mempressure-follow-ups
Luca Boccassi [Thu, 9 Mar 2023 22:35:29 +0000 (22:35 +0000)] 
Merge pull request #26731 from yuwata/mempressure-follow-ups

Mempressure follow ups

2 years agodata-fd-util: use fd_reopen() a bit more 26741/head
Lennart Poettering [Thu, 9 Mar 2023 21:56:53 +0000 (22:56 +0100)] 
data-fd-util: use fd_reopen() a bit more

2 years agofd-util: move ACQUIRE_NO_XYZ flags to the header the function using them is in
Lennart Poettering [Tue, 7 Mar 2023 21:50:02 +0000 (22:50 +0100)] 
fd-util: move ACQUIRE_NO_XYZ flags to the header the function using them is in

Follow-up for: b25a930f0e2ebe77bc8b0f0acfac8a3b27ef1f0a

2 years agomempress: change default PSI window duration to 2s
Lennart Poettering [Thu, 9 Mar 2023 11:34:23 +0000 (12:34 +0100)] 
mempress: change default PSI window duration to 2s

This changes the PSI window duration we default to for watching memory
pressure events from 1s to 2s. This is because apparently the kernel
will soon disallow window durations other than 2s for unprivileged
processes.

Hence, we'll bump the threshold from 100m to 200ms, and the window from
1s to 2s.

2 years agoupdate TODO 26693/head
Lennart Poettering [Mon, 6 Mar 2023 11:13:57 +0000 (12:13 +0100)] 
update TODO

2 years agotest: test new systemd-dissect --attach/--detach/--loop-ref= and /dev/loop/* symlinks
Lennart Poettering [Mon, 6 Mar 2023 12:23:48 +0000 (13:23 +0100)] 
test: test new systemd-dissect --attach/--detach/--loop-ref= and /dev/loop/* symlinks

Let's test that everything we just added works in combination.

2 years agomountpoint-util: add comment explaining why fstype_can_discard() can't use mount_opti... 26704/head
Lennart Poettering [Tue, 7 Mar 2023 11:21:10 +0000 (12:21 +0100)] 
mountpoint-util: add comment explaining why fstype_can_discard() can't use mount_option_supported()

2 years agomountpoint-util: add new fstype_can_umask() helper
Lennart Poettering [Tue, 7 Mar 2023 10:29:38 +0000 (11:29 +0100)] 
mountpoint-util: add new fstype_can_umask() helper

2 years agomountpoint-util: move 'norecovery' detection into its own helper call
Lennart Poettering [Tue, 7 Mar 2023 10:24:00 +0000 (11:24 +0100)] 
mountpoint-util: move 'norecovery' detection into its own helper call

And let's also ask the kernel explicitly for support.

2 years agomountpoint-util: use mount_option_supported() to detect if 'discard' is support for...
Lennart Poettering [Tue, 7 Mar 2023 10:19:56 +0000 (11:19 +0100)] 
mountpoint-util: use mount_option_supported() to detect if 'discard' is support for an fs

2 years agomountpoint-util: generalize mount_option_supported()
Lennart Poettering [Tue, 7 Mar 2023 10:19:35 +0000 (11:19 +0100)] 
mountpoint-util: generalize mount_option_supported()

2 years agogpt-auto-generator: port to partition_pick_mount_options() too
Lennart Poettering [Tue, 7 Mar 2023 09:52:01 +0000 (10:52 +0100)] 
gpt-auto-generator: port to partition_pick_mount_options() too

This way we'll have the same mount options in place if we boot via the
gpt generator, or if we mount a DDI locally.

Note that this will also enable MS_NOSYMFOLLOW on ESP and XBOOTLDR now,
if booted via gpt-auto-generator.