]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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 agorepart: Remove the repeated ';' from code (#25386)
Li kunyu [Tue, 15 Nov 2022 08:02:51 +0000 (08:02 +0000)] 
repart: Remove the repeated ';' from code (#25386)

2 years agoMerge pull request #24908 from DaanDeMeyer/repart-minimize
Daan De Meyer [Tue, 15 Nov 2022 07:19:28 +0000 (08:19 +0100)] 
Merge pull request #24908 from DaanDeMeyer/repart-minimize

repart: Add Minimize setting

2 years agorepart: Add Minimize= integration test 24908/head
Daan De Meyer [Thu, 10 Nov 2022 11:33:02 +0000 (12:33 +0100)] 
repart: Add Minimize= integration test

2 years agoMerge pull request #25327 from keszybz/mkosi-less-work
Frantisek Sumsal [Mon, 14 Nov 2022 11:44:16 +0000 (11:44 +0000)] 
Merge pull request #25327 from keszybz/mkosi-less-work

Skip mkosi runs on docs-only changes and some small cleanups

2 years agoMerge pull request #25361 from bluca/readme
Luca Boccassi [Mon, 14 Nov 2022 11:32:39 +0000 (12:32 +0100)] 
Merge pull request #25361 from bluca/readme

README: note a couple more kconfigs

2 years agomeasure: fix section names in 'objcopy' example in systemd-measure man
Vitaly Kuznetsov [Fri, 11 Nov 2022 16:15:55 +0000 (17:15 +0100)] 
measure: fix section names in 'objcopy' example in systemd-measure man

A copy paste error has crippled in the objcopy example in 'systemd-measure'
manual,  "--change-section-vma" should reference the section being added,
not ".splash". When used as-is, the resulting UKI is unbootable.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 years agoREADME: note Kconfig for verifying DDIs via MoK keys 25361/head
Luca Boccassi [Sat, 12 Nov 2022 01:07:13 +0000 (01:07 +0000)] 
README: note Kconfig for verifying DDIs via MoK keys

Also note them in the mkosi.build kernel config list

2 years agomkosi: drop spaces after shell redirection operator 25327/head
Zbigniew Jędrzejewski-Szmek [Thu, 10 Nov 2022 14:12:33 +0000 (15:12 +0100)] 
mkosi: drop spaces after shell redirection operator

2 years agoci: use mkosi executable directly
Zbigniew Jędrzejewski-Szmek [Thu, 10 Nov 2022 14:10:08 +0000 (15:10 +0100)] 
ci: use mkosi executable directly

2 years agosystemctl: do not show unit properties with --all
Yu Watanabe [Sun, 13 Nov 2022 12:10:56 +0000 (21:10 +0900)] 
systemctl: do not show unit properties with --all

Fixes a bug introduced by a6e334649d4bdff0c6f664e98666b2223aa21a8b.

Fixes #25343.

2 years agotmpfiles: log at info level when some allowed failures occur
Luca Boccassi [Thu, 10 Nov 2022 15:47:19 +0000 (15:47 +0000)] 
tmpfiles: log at info level when some allowed failures occur

In provision.conf we ship:

d- /root :0700 root :root -
d- /root/.ssh :0700 root :root -

These are allowed to fail, for example on a read-only filesystem. But they still
log at error level, which is annoying and gets flagged. Tune those specific errors
down to info.

There are likely more that could be tuned down, but the important thing is to cover
the tmpfiles.d that we ship right now.

Before:

$ echo -e "d- /root :0700 root :root - \nd- /root/.ssh :0700 root :root -" | SYSTEMD_LOG_LEVEL=err build/systemd-tmpfiles --root=/tmp/img --create -
Failed to create directory or subvolume "/tmp/img/root": Read-only file system
Failed to open path '/tmp/img/root': No such file or directory
$

After:

$ echo -e "d- /root :0700 root :root - \nd- /root/.ssh :0700 root :root -" | SYSTEMD_LOG_LEVEL=err build/systemd-tmpfiles --root=/tmp/img --create -
$

2 years agomodule-util: use the blacklist from module_blacklist= in cmdline
Mike Yuan [Fri, 11 Nov 2022 18:52:38 +0000 (02:52 +0800)] 
module-util: use the blacklist from module_blacklist= in cmdline

When a module is blacklisted using module_blacklist=
we shouldn't fail with 'Operation not permitted'.
Instead we check for it and skip it if this is the case.

2 years agoMerge pull request #25368 from yuwata/bootctl-ignore-invalid-boot-entries
Yu Watanabe [Mon, 14 Nov 2022 01:51:33 +0000 (10:51 +0900)] 
Merge pull request #25368 from yuwata/bootctl-ignore-invalid-boot-entries

bootctl: ignore invalid boot entries

2 years agoMerge pull request #25373 from medhefgo/boot-fixes
Yu Watanabe [Sun, 13 Nov 2022 23:18:21 +0000 (08:18 +0900)] 
Merge pull request #25373 from medhefgo/boot-fixes

boot: Small fixes

3 years agodissect-image: do not try to close invalid fd
Yu Watanabe [Sun, 13 Nov 2022 10:25:02 +0000 (19:25 +0900)] 
dissect-image: do not try to close invalid fd

Fixes a bug introduced by f7725647bb41c3398a867f139efe526efe8aa1b3.

Hopefully fixes #25348.

3 years agoboot: Fix error message 25373/head
Jan Janssen [Sun, 13 Nov 2022 15:14:17 +0000 (16:14 +0100)] 
boot: Fix error message

3 years agoboot: Silence driver reconnect errors
Jan Janssen [Sat, 12 Nov 2022 15:24:53 +0000 (16:24 +0100)] 
boot: Silence driver reconnect errors

3 years agoMerge pull request #25338 from DaanDeMeyer/at-fixes
Yu Watanabe [Sun, 13 Nov 2022 13:59:40 +0000 (22:59 +0900)] 
Merge pull request #25338 from DaanDeMeyer/at-fixes

Followups for #24813

3 years agoMerge pull request #25339 from dtardon/vertical-tables
Yu Watanabe [Sun, 13 Nov 2022 13:39:36 +0000 (22:39 +0900)] 
Merge pull request #25339 from dtardon/vertical-tables

Port more tools to vertical table

3 years agolocalectl: port to vertical table 25339/head
David Tardon [Fri, 11 Nov 2022 08:59:09 +0000 (09:59 +0100)] 
localectl: port to vertical table

3 years agohostnamectl: port to vertical table
David Tardon [Fri, 11 Nov 2022 08:57:10 +0000 (09:57 +0100)] 
hostnamectl: port to vertical table

3 years agoanalyze-inspect-elf: port to vertical table
David Tardon [Fri, 11 Nov 2022 08:53:10 +0000 (09:53 +0100)] 
analyze-inspect-elf: port to vertical table

3 years agoanalyze-timespan: port to vertical table
David Tardon [Fri, 11 Nov 2022 08:42:52 +0000 (09:42 +0100)] 
analyze-timespan: port to vertical table

3 years agoanalyze-timestamp: port to vertical table
David Tardon [Fri, 11 Nov 2022 08:17:20 +0000 (09:17 +0100)] 
analyze-timestamp: port to vertical table

3 years agoanalyze-calendar: port to vertical table
David Tardon [Fri, 11 Nov 2022 08:11:30 +0000 (09:11 +0100)] 
analyze-calendar: port to vertical table

3 years agoanalyze-calendar: avoid unnecessary abbreviation
David Tardon [Fri, 11 Nov 2022 08:12:06 +0000 (09:12 +0100)] 
analyze-calendar: avoid unnecessary abbreviation

3 years agoMerge pull request #25360 from poettering/strv-fixes
Yu Watanabe [Sun, 13 Nov 2022 11:17:10 +0000 (20:17 +0900)] 
Merge pull request #25360 from poettering/strv-fixes

nulstr fixes

3 years agoMerge pull request #25355 from poettering/chase-symlinks-no-symlink
Yu Watanabe [Sun, 13 Nov 2022 11:16:34 +0000 (20:16 +0900)] 
Merge pull request #25355 from poettering/chase-symlinks-no-symlink

chase_symlinks(): add CHASE_PROHIBIT_SYMLINKS

3 years agoMerge pull request #25349 from poettering/table-header-rework-only
Yu Watanabe [Sun, 13 Nov 2022 11:16:09 +0000 (20:16 +0900)] 
Merge pull request #25349 from poettering/table-header-rework-only

format-table: add TABLE_HEADER cell table

3 years agobootctl,bootspec: make use of CHASE_PROHIBIT_SYMLINKS whenever we access the ESP... 25355/head
Lennart Poettering [Fri, 11 Nov 2022 16:36:29 +0000 (17:36 +0100)] 
bootctl,bootspec: make use of CHASE_PROHIBIT_SYMLINKS whenever we access the ESP/XBOOTLDR

Let's make use of the new flag whenever we access the ESP or XBOOTLDR.
The resources we make use of in these partitions can't possibly use
symlinks (because UEFI knows no symlink concept), and they are untrusted
territory, hence under no circumstances we should be tricked into
following symlinks that shouldn't be there in the first place.

Of course, you might argue thta ESP/XBOOTLDR are VFAT and thus don#t
know symlinks. But the thing is, they don#t have to be. Firmware can
support other file systems too, and people can use efifs to gain access
to arbitrary Linux file systems from EFI. Hence, let's better be safe
than sorry.

3 years agochase-symlinks: add new flag for prohibiting any following of symlinks
Lennart Poettering [Fri, 11 Nov 2022 16:31:34 +0000 (17:31 +0100)] 
chase-symlinks: add new flag for prohibiting any following of symlinks

This is useful when operating in the ESP, which is untrusted territory,
and where under no circumstances we should be tricked by symlinks into
doing anything we don't want to.

3 years agotests: add tests for various corner cases of nulstr 25360/head
Lennart Poettering [Fri, 11 Nov 2022 22:26:08 +0000 (23:26 +0100)] 
tests: add tests for various corner cases of nulstr

3 years agonulstr-util: fix corner cases of strv_make_nulstr()
Lennart Poettering [Fri, 11 Nov 2022 22:17:12 +0000 (23:17 +0100)] 
nulstr-util: fix corner cases of strv_make_nulstr()

Let's change the return semantics of strv_make_nulstr() so that we can
properly distuingish the case where we have a no entries in the nulstr
from the case where we have a single empty string in a nulstr.

Previously we couldn't distuingish those, we'd in both cases return a
size of zero, and a buffer with two NUL bytes.

With this change, we'll still return a buffer with two NULL bytes, but
for the case where no entries are defined we'll return a size of zero,
and where we have two a size of one.

This is a good idea, as it makes sure we can properly handle all corner
cases.

Nowadays the function is used by one place only: ask-password-api.c. The
corner case never mattered there, since it was used to serialize
passwords, and it was known that there was exactly one password, not
less. But let's clean this up. This means the subtraction of the final
NUL byte now happens in ask-password-api.c instead.

3 years agonulstr-util: don't use 'r' for anything but integer return values
Lennart Poettering [Fri, 11 Nov 2022 21:07:43 +0000 (22:07 +0100)] 
nulstr-util: don't use 'r' for anything but integer return values

3 years agonulstr-util: use memdup_suffix0() where appropriate
Lennart Poettering [Fri, 11 Nov 2022 21:04:37 +0000 (22:04 +0100)] 
nulstr-util: use memdup_suffix0() where appropriate

if the nulstr is not nul-terminated, we shouldn't use strndup() but
memdup_suffix0(), to not trip up static analyzers which imply we are
duping a string here.

3 years agonulstr-util: use _cleanup_strv_free_() where appropriate
Lennart Poettering [Fri, 11 Nov 2022 21:01:03 +0000 (22:01 +0100)] 
nulstr-util: use _cleanup_strv_free_() where appropriate

3 years agonulstr-util: rebreak comments
Lennart Poettering [Fri, 11 Nov 2022 20:59:41 +0000 (21:59 +0100)] 
nulstr-util: rebreak comments

3 years agonulstr-util: modernize strv_from_nulstr() a bit
Lennart Poettering [Fri, 11 Nov 2022 20:57:28 +0000 (21:57 +0100)] 
nulstr-util: modernize strv_from_nulstr() a bit

3 years agostrv: move nulstr utilities to nulstr-util.[ch]
Lennart Poettering [Fri, 11 Nov 2022 20:55:00 +0000 (21:55 +0100)] 
strv: move nulstr utilities to nulstr-util.[ch]

Let's move them out of the generic, already very long strv.[ch] module
into the more specific nulst-util.[ch]

No code changes.

3 years agoformat-table: teach table_add_cell_stringf_full() to generate TABLE_FIELD/TABLE_HEADE... 25349/head
Lennart Poettering [Fri, 11 Nov 2022 14:01:46 +0000 (15:01 +0100)] 
format-table: teach table_add_cell_stringf_full() to generate TABLE_FIELD/TABLE_HEADER cells, too

3 years agoformat-table: introduce TABLE_HEADER cell type
Lennart Poettering [Fri, 11 Nov 2022 13:25:51 +0000 (14:25 +0100)] 
format-table: introduce TABLE_HEADER cell type

This rework the logic for handling the "header" cells a bit. Instead of
special casing the first row in regards to uppercasing/coloring let's
just intrduce a proper cell type TABLE_HEADER which is in most ways
identical to TABLE_STRING except that it defaults to uppercase output
and underlined coloring.

This is mostly refactoring, but I think it makes a ton of sense as it
makes the first row less special and you could in fact insert
TABLE_HEADER (and in fact TABLE_FIELD) cells wherever you like and
something sensible would happen (i.e. a string cell is displayed with
a specific formatting).

3 years agoac-power: check battery existence and status
Yu Watanabe [Fri, 11 Nov 2022 04:54:03 +0000 (13:54 +0900)] 
ac-power: check battery existence and status

If a battery is not present or its status is not discharging, then
the battery should not be used as a power source.
Let's count batteries currently discharging.

Fixes #25316.

3 years agobootctl: downgrade log message when firmware reports non-existent or invalid boot... 25368/head
Yu Watanabe [Sun, 13 Nov 2022 05:41:08 +0000 (14:41 +0900)] 
bootctl: downgrade log message when firmware reports non-existent or invalid boot entry

Fixes #25359.

3 years agobootctl: make boot entry id logged in hex
Yu Watanabe [Sun, 13 Nov 2022 05:36:01 +0000 (14:36 +0900)] 
bootctl: make boot entry id logged in hex

To make consistent with the printed boot id below and other tools e.g.
efibootmgr.

3 years agoMerge pull request #25268 from PeterCxy/fido2-preflight
Luca Boccassi [Sat, 12 Nov 2022 14:51:47 +0000 (15:51 +0100)] 
Merge pull request #25268 from PeterCxy/fido2-preflight

libfido2-util: Perform pre-flight check for credentials in token

3 years agoREADME: use https on one more link
Luca Boccassi [Sat, 12 Nov 2022 01:04:19 +0000 (01:04 +0000)] 
README: use https on one more link

3 years agoman/systemd-dissect.xml: fix trivial error
Carlo Teubner [Fri, 11 Nov 2022 19:42:49 +0000 (19:42 +0000)] 
man/systemd-dissect.xml: fix trivial error

3 years agoMerge pull request #25351 from crrodriguez/Wenum-int-mismatch
Luca Boccassi [Sat, 12 Nov 2022 00:40:57 +0000 (01:40 +0100)] 
Merge pull request #25351 from crrodriguez/Wenum-int-mismatch

Fix gcc 13 -Wenum-int-mismatch warnings

3 years agoshared|install: Use InstallChangeType consistently 25351/head
Cristian Rodríguez [Fri, 11 Nov 2022 15:34:32 +0000 (15:34 +0000)] 
shared|install: Use InstallChangeType consistently

gcc 13 -Wenum-int-mismatch, enabled by default, reminds us enum ! = int

3 years agoresolve: dns_server_feature_level_*_string type is DnsServerFeatureLevel
Cristian Rodríguez [Fri, 11 Nov 2022 15:31:18 +0000 (15:31 +0000)] 
resolve: dns_server_feature_level_*_string type is DnsServerFeatureLevel

gcc 13 -Wenum-int-mismatch reminds us that enum != int

3 years agojournal-remote: code is of type enum MHD_RequestTerminationCode
Cristian Rodríguez [Fri, 11 Nov 2022 15:28:51 +0000 (15:28 +0000)] 
journal-remote: code is of type enum MHD_RequestTerminationCode

Fixes gcc 13 -Wenum-int-mismatch which are enabled by default.

3 years agolibfido2-util: Perform pre-flight check for credentials in token 25268/head
MkfsSion [Sat, 29 Oct 2022 18:29:02 +0000 (14:29 -0400)] 
libfido2-util: Perform pre-flight check for credentials in token

Do not attempt to decrypt using a key slot unless its corresponding
credential is found on an available FIDO2 token. Avoids multiple touches
/ confirmations when unlocking a LUKS2 device with multiple FIDO2 tokens
enrolled.

Partially fixes #19208 (when the libcryptsetup plugin is in use).

3 years agolibfido2-util: Extract error handling logic from fido2_use_hmac_hash_specific_token
MkfsSion [Sat, 29 Oct 2022 18:21:06 +0000 (14:21 -0400)] 
libfido2-util: Extract error handling logic from fido2_use_hmac_hash_specific_token

3 years agolibfido2-util: Commonize FIDO2 basic property settings
MkfsSion [Sat, 29 Oct 2022 18:14:22 +0000 (14:14 -0400)] 
libfido2-util: Commonize FIDO2 basic property settings

These properties are repeatedly set across multiple functions.

3 years agorepart: fix build
Lennart Poettering [Fri, 11 Nov 2022 16:47:21 +0000 (17:47 +0100)] 
repart: fix build

Follow-up for: 12e2b70f9b849e54018f147b8a11154cd5e2dcf6

3 years agonulstr-util: Declare NULSTR_FOREACH() iterator inline
Daan De Meyer [Fri, 11 Nov 2022 11:08:26 +0000 (12:08 +0100)] 
nulstr-util: Declare NULSTR_FOREACH() iterator inline

3 years agostrv: Make sure strv_make_nulstr() always returns a valid nulstr
Daan De Meyer [Fri, 11 Nov 2022 10:26:54 +0000 (11:26 +0100)] 
strv: Make sure strv_make_nulstr() always returns a valid nulstr

strv_make_nulstr() is documented to always return a valid nulstr,
but if the input is `NULL` we return a string terminated with only
a single NUL terminator, so let's fix that and always terminate the
resulting string with two NUL bytes.

3 years agosd-bus: Use goto finish instead of return in bus_add_match_full
Daan De Meyer [Fri, 11 Nov 2022 10:09:28 +0000 (11:09 +0100)] 
sd-bus: Use goto finish instead of return in bus_add_match_full

Fixes #25340

3 years agoresolve: Use only C99 flex arrays (#25335)
Cristian Rodríguez [Fri, 11 Nov 2022 14:22:49 +0000 (11:22 -0300)] 
resolve: Use only C99 flex arrays (#25335)

3 years agorepart: Take into account minimal filesystem size
Daan De Meyer [Wed, 12 Oct 2022 21:59:37 +0000 (23:59 +0200)] 
repart: Take into account minimal filesystem size

Instead of requiring users to guess the required space for partitions
populated with CopyFiles=, let's make an educated guess ourselves. We
can populate the filesystem once in a very large sparse file and see
how much data is actually used as a good indicator of the required size.

3 years agorepart: Use ULL for all size constants
Daan De Meyer [Thu, 10 Nov 2022 10:03:15 +0000 (11:03 +0100)] 
repart: Use ULL for all size constants

3 years agorepart: Allow custom root directory per copy blocks source
Daan De Meyer [Fri, 14 Oct 2022 11:32:47 +0000 (13:32 +0200)] 
repart: Allow custom root directory per copy blocks source

Preparation for the next commit

3 years agorepart: Don't log partition number when populating filesystem
Daan De Meyer [Thu, 13 Oct 2022 12:02:39 +0000 (14:02 +0200)] 
repart: Don't log partition number when populating filesystem

This might not be known yet so let's use the filesystem itself
instead.

3 years agorepart: Create loop device when populating filesystems if needed
Daan De Meyer [Thu, 13 Oct 2022 11:45:34 +0000 (13:45 +0200)] 
repart: Create loop device when populating filesystems if needed

3 years agorepart: Move fstype_is_ro() checks out of the populate functions
Daan De Meyer [Thu, 13 Oct 2022 11:38:36 +0000 (13:38 +0200)] 
repart: Move fstype_is_ro() checks out of the populate functions

Preparation for the next commit.

3 years agoresize-fs: Bump xfs minimum partition size to 16MB
Daan De Meyer [Thu, 13 Oct 2022 11:31:13 +0000 (13:31 +0200)] 
resize-fs: Bump xfs minimum partition size to 16MB

14MB leads to errors in mkfs.xfs when running repart.

3 years agorepart: Calculate filesystem UUID earlier
Daan De Meyer [Thu, 13 Oct 2022 11:26:07 +0000 (13:26 +0200)] 
repart: Calculate filesystem UUID earlier

3 years agorepart: Use COPY_HOLES more
Daan De Meyer [Wed, 12 Oct 2022 18:05:38 +0000 (20:05 +0200)] 
repart: Use COPY_HOLES more

3 years agorepart: Use COPY_REFLINK in context_copy_blocks()
Daan De Meyer [Wed, 12 Oct 2022 18:04:11 +0000 (20:04 +0200)] 
repart: Use COPY_REFLINK in context_copy_blocks()

We might be copying between files without a loop device involved.
In that case, a reflink is possible and will be much faster.

3 years agorepart: Use copy_bytes() instead of copy_bytes_full()
Daan De Meyer [Wed, 12 Oct 2022 18:01:37 +0000 (20:01 +0200)] 
repart: Use copy_bytes() instead of copy_bytes_full()

3 years agoMerge pull request #24803 from DaanDeMeyer/repart-copy-deny-list
Daan De Meyer [Fri, 11 Nov 2022 12:19:58 +0000 (13:19 +0100)] 
Merge pull request #24803 from DaanDeMeyer/repart-copy-deny-list

repart: Don't descend into directories assigned to other partitions

3 years agoci: skip running on docs-only changes
Zbigniew Jędrzejewski-Szmek [Thu, 10 Nov 2022 14:00:53 +0000 (15:00 +0100)] 
ci: skip running on docs-only changes

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-paths

> If you define a path with the ! character, you must also define at least one
> path without the ! character. If you only want to exclude paths, use
> paths-ignore instead.
>
> The order that you define patterns matters:
>     A matching negative pattern (prefixed with !) after a positive match will
>     exclude the path.
>     A matching positive pattern after a negative match will include the path
>     again.

Even if some of the exluded paths *could* impact the build, generally it's a
waste of time to do mkosi builds on them. Let's skip to releave the builders a
bit.

3 years agoRevert "rm-rf: Add rm_rf_physical_and_close()" 25338/head
Daan De Meyer [Fri, 11 Nov 2022 09:05:32 +0000 (10:05 +0100)] 
Revert "rm-rf: Add rm_rf_physical_and_close()"

This reverts commit 56e2bceddc7383c4abe1ef0110192e491c729de4.

Doing destructive cleanup operations via unreliable /proc path
lookups is unsafe and should be avoided so let's remove this function.

3 years agotest-copy: Stop using rm_rf_physical_and_close
Daan De Meyer [Fri, 11 Nov 2022 09:04:37 +0000 (10:04 +0100)] 
test-copy: Stop using rm_rf_physical_and_close

This cleanup function depends on resolving fd's to paths via /proc
which is unreliable so we shouldn't depend on it for destructive
operations. Use regular path based cleanup instead.

3 years agofs-util: Add missing assert to chmod_and_chown_at()
Daan De Meyer [Fri, 11 Nov 2022 08:59:25 +0000 (09:59 +0100)] 
fs-util: Add missing assert to chmod_and_chown_at()

3 years agochase-symlinks: Drop unnecessary if
Daan De Meyer [Fri, 11 Nov 2022 08:52:12 +0000 (09:52 +0100)] 
chase-symlinks: Drop unnecessary if

3 years agopath-util: Drop path_make_relative_cwd()
Daan De Meyer [Fri, 11 Nov 2022 08:50:50 +0000 (09:50 +0100)] 
path-util: Drop path_make_relative_cwd()

Function is unused

3 years agotmpfile-util: Add missing assert
Daan De Meyer [Fri, 11 Nov 2022 08:50:19 +0000 (09:50 +0100)] 
tmpfile-util: Add missing assert

3 years agoMerge pull request #25328 from poettering/vertical-tables
Yu Watanabe [Fri, 11 Nov 2022 06:18:12 +0000 (15:18 +0900)] 
Merge pull request #25328 from poettering/vertical-tables

format-table: add concept of "vertical" table

3 years agoMerge pull request #25325 from yuwata/resolve-cap-per-link-setting-by-global
Luca Boccassi [Thu, 10 Nov 2022 22:20:40 +0000 (23:20 +0100)] 
Merge pull request #25325 from yuwata/resolve-cap-per-link-setting-by-global

resolve: provide effective mDNS or LLMNR settings

3 years agotimedatectl: port to new 'vertical' table type 25328/head
Lennart Poettering [Thu, 10 Nov 2022 12:32:08 +0000 (13:32 +0100)] 
timedatectl: port to new 'vertical' table type

3 years agoresolvectl: port to new 'vertical' table type
Lennart Poettering [Thu, 10 Nov 2022 12:31:43 +0000 (13:31 +0100)] 
resolvectl: port to new 'vertical' table type

3 years agoMerge pull request #25261 from poettering/dissec-uuid
Lennart Poettering [Thu, 10 Nov 2022 22:10:17 +0000 (23:10 +0100)] 
Merge pull request #25261 from poettering/dissec-uuid

systemd-dissect: show image UUID in output

3 years agoresolvectl: fail properly if we can't append to table
Lennart Poettering [Thu, 10 Nov 2022 12:30:02 +0000 (13:30 +0100)] 
resolvectl: fail properly if we can't append to table

3 years agoformat-table: add an explicit "vertical" mode
Lennart Poettering [Thu, 10 Nov 2022 11:52:08 +0000 (12:52 +0100)] 
format-table: add an explicit "vertical" mode

Originally, the table formatting code was written to display a number of
records, one per line, and within each line multiple fields of the same
record. The first line contains the column names.

It was then started to be used in a "vertical" mode however,
i.e. with field names on the left instead of the top. Let's support such
a mode explicitly, so that we can provide systematic styling, and can
properly convert this mode to JSON.

A new constructor "table_new_vertical()" is added creating such
"vertical" tables. Internally, this is a table with two columns: "key"
and "value". When outputting this as JSON we'll output a single JSON
object, with key/value as fields. (Which is different from the
traditional output where we'd use the first line as JSON field names,
and output an array of objects).

A new cell type TABLE_FIELD is added for specifically marking the
"field" cells, i.e. the cells in the first column. We'll automatically
suffic ":" to these fields on output.

3 years agomeson: install systemd-ac-power under /usr/bin
Yu Watanabe [Thu, 10 Nov 2022 16:17:57 +0000 (01:17 +0900)] 
meson: install systemd-ac-power under /usr/bin

And test the its help message.

The program is useful for e.g. scripts that conditionalize their tasks
to be invoked only when running on AC power.

3 years agoupdate TODO
Lennart Poettering [Thu, 10 Nov 2022 21:19:22 +0000 (22:19 +0100)] 
update TODO

3 years agopo: Translated using Weblate (Finnish)
Ricky Tigg [Thu, 10 Nov 2022 19:19:46 +0000 (20:19 +0100)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main

3 years agotest: add quick test for ensuring image UUID is deterministic based on the seed passe... 25261/head
Lennart Poettering [Thu, 10 Nov 2022 16:33:31 +0000 (17:33 +0100)] 
test: add quick test for ensuring image UUID is deterministic based on the seed passed to repart

3 years agolocale: honour new env var $SYSTEMD_UTF8=
Lennart Poettering [Thu, 10 Nov 2022 16:18:50 +0000 (17:18 +0100)] 
locale: honour new env var $SYSTEMD_UTF8=

This is useful to force off fancy unicode glyph use (i.e. use "->"
instead of "→"), which is useful in tests where locales might be
missing, and thus control via $LC_CTYPE is not reliable.

Use this in TEST-58, to ensure the output checks we do aren't confused
by missing these glyphs being unicode or not.

3 years agorepart: Add integration test for #24678 24803/head
Daan De Meyer [Wed, 9 Nov 2022 12:41:38 +0000 (13:41 +0100)] 
repart: Add integration test for #24678

3 years agorepart: Don't descend into directories assigned to other partitions
Daan De Meyer [Fri, 23 Sep 2022 19:15:01 +0000 (21:15 +0200)] 
repart: Don't descend into directories assigned to other partitions

Let's say we have the following repart definitions files root.conf
and home.conf:

```
[Partition]
Type=root
CopyFiles=/
```

```
[Partition]
Type=home
CopyFiles=/home
```

Currently, we'd end up copying /home to both the root partition and
the home partition. To prevent this from happening, let's adopt a
new policy when copying files for a partition: We won't copy any
files/directories that appear in the CopyFiles= list of another
partition, unless that directory explicitly appears in our own
CopyFiles= list.

This way, we prevent copying /home twice into the root and home
partition, but should a user really want that behavior, they can
have it by adding /home to the CopyFIles= list of the root partition
as well.

3 years agogpt: Add gpt_partition_type_mountpoint_nulstr()
Daan De Meyer [Tue, 27 Sep 2022 10:30:55 +0000 (12:30 +0200)] 
gpt: Add gpt_partition_type_mountpoint_nulstr()

3 years agogpt: Replace bitfields with designator field in GptPartitionType
Daan De Meyer [Tue, 27 Sep 2022 10:20:20 +0000 (12:20 +0200)] 
gpt: Replace bitfields with designator field in GptPartitionType

To achieve this we move the PartitionDesignator enum from
dissect-image.h to gpt.h

3 years agocopy: Support passing a deny list of files/directories to not copy
Daan De Meyer [Fri, 23 Sep 2022 19:07:41 +0000 (21:07 +0200)] 
copy: Support passing a deny list of files/directories to not copy

3 years agodissect: make image name bold
Lennart Poettering [Wed, 9 Nov 2022 21:51:42 +0000 (22:51 +0100)] 
dissect: make image name bold

3 years agodissect: also parse out the top-level GPT table uuid and expose this as image UUID
Lennart Poettering [Thu, 20 Oct 2022 21:14:28 +0000 (23:14 +0200)] 
dissect: also parse out the top-level GPT table uuid and expose this as image UUID

systemd-repart generates this in a suitably stable fashion, hence let's
actually use it as an identifier for the image. As a first step parse
it, and show it.

3 years agojson: add build helpers to insert id128 in uuid formatting into json object
Lennart Poettering [Thu, 20 Oct 2022 21:08:45 +0000 (23:08 +0200)] 
json: add build helpers to insert id128 in uuid formatting into json object

3 years agoupdate TODO
Lennart Poettering [Thu, 10 Nov 2022 14:59:58 +0000 (15:59 +0100)] 
update TODO