]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
23 months agocore/exec-invoke: respect needs_sandboxing for PrivateTmp
Mike Yuan [Tue, 18 Jun 2024 13:56:45 +0000 (15:56 +0200)] 
core/exec-invoke: respect needs_sandboxing for PrivateTmp

Follow-up for 0e551b04efb911d38b586cca1a6a462c87a2cb1b

23 months agocore/dbus-util: move dbus setter/getter for PrivateTmp to dbus-execute
Mike Yuan [Tue, 18 Jun 2024 13:35:43 +0000 (15:35 +0200)] 
core/dbus-util: move dbus setter/getter for PrivateTmp to dbus-execute

As with all other properties for ExecContext

23 months agovarlink: yet another fix around handling of IDL comments 33440/head
Lennart Poettering [Fri, 21 Jun 2024 15:05:26 +0000 (17:05 +0200)] 
varlink: yet another fix around handling of IDL comments

Skip over them when validating a message against the IDL.

Add test case that tests this.

23 months agocore/dbus-execute: use FOREACH_ARRAY more, drop bus_ prefix for static funcs
Mike Yuan [Tue, 18 Jun 2024 13:19:52 +0000 (15:19 +0200)] 
core/dbus-execute: use FOREACH_ARRAY more, drop bus_ prefix for static funcs

23 months agoman/org.freedesktop.systemd1: Status{Bus,Varlink}Error belongs to Service, not Scope
Mike Yuan [Thu, 20 Jun 2024 21:14:38 +0000 (23:14 +0200)] 
man/org.freedesktop.systemd1: Status{Bus,Varlink}Error belongs to Service, not Scope

Follow-up for 9c025022d98787d7ad4e46b57f709434531e55a1

Ugh, shouldn't have done this bit when I was sleepy...

23 months agoinstall: shorten code a bit 33408/head
Lennart Poettering [Tue, 18 Jun 2024 15:09:34 +0000 (17:09 +0200)] 
install: shorten code a bit

This changes behaviour a bit, since we now keep track of OOM errors in
install_changes_add(). Which I'd argue is a good thing.

23 months agoinstall: collect more install_changes_add() errors
Lennart Poettering [Tue, 18 Jun 2024 15:09:21 +0000 (17:09 +0200)] 
install: collect more install_changes_add() errors

We so far collected most unexpected errors from install_changes_add()
and propagated them – but for some invocations we forgot to do that. Add
that, and take care we only propagated unexpected errors (i.e. ENOMEM
and such), but treat expected errors as before.

Follow-up for 5163c9b1e56293b1bb2803420613c5b374570892

23 months agocryptsetup: minor coding style tweaks
Lennart Poettering [Fri, 21 Jun 2024 10:10:51 +0000 (12:10 +0200)] 
cryptsetup: minor coding style tweaks

Don't cram function calls and assignment into if condition checks. It's
not how we usually do things.

Also, define variables at innermost scope.

23 months agotest: skip test-cgroup-id on ENOSYS from cg_cgroupid_open
Nick Rosbrook [Thu, 20 Jun 2024 15:27:03 +0000 (11:27 -0400)] 
test: skip test-cgroup-id on ENOSYS from cg_cgroupid_open

Most container managers will block open_by_handle_at with seccomp to
mitigate a container escape attack. LXD in particular returns ENOSYS
rather than e.g. EPERM like nspawn. Skip this test if we get ENOSYS
from open_by_handle_at via cg_cgroupid_open.

2 years agoMerge pull request #33424 from poettering/machined-gc-rework
Yu Watanabe [Thu, 20 Jun 2024 23:26:30 +0000 (08:26 +0900)] 
Merge pull request #33424 from poettering/machined-gc-rework

machined: clean up GC logic

2 years agomeson: bpf: propagate 'sysroot' for cross compilation
Johannes Schneider [Thu, 20 Jun 2024 10:32:18 +0000 (12:32 +0200)] 
meson: bpf: propagate 'sysroot' for cross compilation

During cross-compilation of systemd, the compiler used to build the bpf's needs
to be pointed at the correct include searchpath. Which can be done by passing
the corresponding directory in through the cflags; for example in yocto/bitbake
this would work: CFLAGS += "--sysroot=${STAGING_DIR_TARGET}"

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
2 years agoMerge pull request #33430 from YHNdnzj/buserror-notify
Lennart Poettering [Thu, 20 Jun 2024 21:05:32 +0000 (23:05 +0200)] 
Merge pull request #33430 from YHNdnzj/buserror-notify

core/service: store BUSERROR= & VARLINKERROR= received and show them through systemctl status

2 years agoMerge pull request #33425 from poettering/json-enum-easier
Lennart Poettering [Thu, 20 Jun 2024 21:05:08 +0000 (23:05 +0200)] 
Merge pull request #33425 from poettering/json-enum-easier

json: make serializing/deserializing systemd-style enums easier in Varlink

2 years agoMerge pull request #33428 from poettering/graceful-varlinkctl
Lennart Poettering [Thu, 20 Jun 2024 21:04:45 +0000 (23:04 +0200)] 
Merge pull request #33428 from poettering/graceful-varlinkctl

varlinkctl: add new --graceful= switch for treating selected errors like a success

2 years agomachined: watch leader PID's lifetime via pidfd 33424/head
Lennart Poettering [Mon, 27 May 2024 13:36:44 +0000 (15:36 +0200)] 
machined: watch leader PID's lifetime via pidfd

If we have a pidfd, we might as well track the machine's leader PID's
lifetime, and enqueue the machine for a GC run.

(This is similar to what we are already doing for logind's session
leaders)

2 years agomachined: GC machines during runtime too
Lennart Poettering [Mon, 27 May 2024 13:37:51 +0000 (15:37 +0200)] 
machined: GC machines during runtime too

One major omission in machine's logic so far was that the GC was only
run at startup and on the check-idle timeout, which is really slow.

Let's make this more like the GC logic in homed or logind: make sure we
run it in a close-by event loop cycle.

2 years agoTEST-80-NOTIFYACCESS: introduce test for ERRNO= + BUS/VARLINKERROR= 33430/head
Mike Yuan [Thu, 20 Jun 2024 16:39:52 +0000 (18:39 +0200)] 
TEST-80-NOTIFYACCESS: introduce test for ERRNO= + BUS/VARLINKERROR=

2 years agobusctl: send BUSERROR= to caller via sd_notify() protocol
Lennart Poettering [Thu, 20 Jun 2024 14:22:32 +0000 (16:22 +0200)] 
busctl: send BUSERROR= to caller via sd_notify() protocol

varlinkctl has this nice feature that it sends the varlink error it gets
via sd_notify() to the caller. With previous commits this information
is collected and exposed in "systemctl status".

Let's make sure we can provide the same in busctl: also propagate errors
the same way.

With this we can comprehensively close #6073

2 years agosystemctl-show: show Status{Bus,Varlink}Error in status
Mike Yuan [Thu, 9 May 2024 16:25:16 +0000 (00:25 +0800)] 
systemctl-show: show Status{Bus,Varlink}Error in status

2 years agocore/service: store BUSERROR= & VARLINKERROR= received through notification
Mike Yuan [Thu, 9 May 2024 14:05:22 +0000 (22:05 +0800)] 
core/service: store BUSERROR= & VARLINKERROR= received through notification

Closes #6073

2 years agosd-bus/bus-error: inline iterator var, use assert_return
Mike Yuan [Thu, 9 May 2024 13:18:10 +0000 (21:18 +0800)] 
sd-bus/bus-error: inline iterator var, use assert_return

2 years agojson: make it easy to dispatch our enums 33425/head
Lennart Poettering [Thu, 20 Jun 2024 07:39:51 +0000 (09:39 +0200)] 
json: make it easy to dispatch our enums

This does the opposite of the previous patch: it undoes the "-" → "_"
mapping of enum values when we try to parse enums again.

2 years agojson: make it easy to serialize our enums to json
Lennart Poettering [Thu, 20 Jun 2024 07:24:18 +0000 (09:24 +0200)] 
json: make it easy to serialize our enums to json

Most of our enums are mapped to strings that use dashes ("-") as word
separators, i.e. "foo-bar-baz". However, Varlink enums do not allow "-"
as separator, see:

https://varlink.org/Interface-Definition

Hence, let's add some simple glue to automatucally turn "-" into "_" for
use when serializing our enums.

2 years agoci: test new --graceful= switch of varlinkctl 33428/head
Lennart Poettering [Thu, 20 Jun 2024 10:23:53 +0000 (12:23 +0200)] 
ci: test new --graceful= switch of varlinkctl

2 years agovarlinkctl: add --graceful= option for optionally marking some errors as successes
Lennart Poettering [Mon, 27 May 2024 20:32:51 +0000 (22:32 +0200)] 
varlinkctl: add --graceful= option for optionally marking some errors as successes

This is generally useful, but in some cases particularly: when
implementing enumeration calls that use the "more" flag to return
multiple replies then for the first reply we need to return an error in
case the list of objects to enumerate is empty, usually so form of
"NoSuchXYZ" error. In many cases this shouldn't really be treated as
error, as an empty list probably more than not is as valid as a list
with one, two or more entries.

2 years agovarlink: add helper that validates a qualified Varlink symbol name
Lennart Poettering [Mon, 27 May 2024 20:31:09 +0000 (22:31 +0200)] 
varlink: add helper that validates a qualified Varlink symbol name

Qualified Varlink symbol names are the combination of an interface name,
followed by a dot, followed by a symbol name. It's a primary concept,
after all it's what we send over the wire for method calls and get back
for error returns.

hence, let's add an explicit validator for it.

2 years agoMerge pull request #33426 from aafeijoo-suse/conf-parser-parse-size-log
Yu Watanabe [Thu, 20 Jun 2024 14:56:59 +0000 (23:56 +0900)] 
Merge pull request #33426 from aafeijoo-suse/conf-parser-parse-size-log

conf-parser: print why config_parse_iec_uint64() fails

2 years agologind: implement maintenance time
Ludwig Nussel [Mon, 6 May 2024 13:55:16 +0000 (15:55 +0200)] 
logind: implement maintenance time

Update frameworks that work automatically in the background
occasionally need to schedule reboots. Systemd-logind already
provides a nice mechanism to schedule shutdowns, send notfications
and block logins short before the time. Systemd has a framework for
calendar events, so we may conveniently use logind to define a
maintenance time for reboots.

The existing ScheduleShutdown DBus method in logind expects a usec_t
with an absolute time. Passing USEC_INFINITY as magic value now tells
logind to take the time from the configured maintenance time if set.

"shutdown -r" leverages that and uses the maintenance time
automatically if configured. The one minute default is still used if
nothing was specified.

Similarly the new 'auto' setting for the --when parameter of systemctl
uses the maintenance time if configured or a one minute timer like the
shutdown command.

2 years agocryptenroll: support for enrolling FIDO2 tokens in manual mode
Kamil Szczęk [Fri, 7 Jun 2024 11:22:49 +0000 (13:22 +0200)] 
cryptenroll: support for enrolling FIDO2 tokens in manual mode

systemd-cryptsetup supports a FIDO2 mode with manual parameters, where
the user provides all the information necessary for recreating the
secret, such as: credential ID, relaying party ID and the salt. This
feature works great for implementing 2FA schemes, where the salt file
is for example a secret unsealed from the TPM or some other source.
While the unlocking part is quite straightforward to set up, enrolling
such a keyslot - not so easy. There is no clearly documented
way on how to set this up and online resources are scarce on this topic
too. By implementing a straightforward way to enroll such a keyslot
directly from systemd-cryptenroll we streamline the enrollment process
and reduce chances for user error when doing such things manually.

2 years agoconf-parser: print why config_parse_iec_uint64() fails 33426/head
Antonio Alvarez Feijoo [Thu, 20 Jun 2024 10:54:32 +0000 (12:54 +0200)] 
conf-parser: print why config_parse_iec_uint64() fails

Print the same output as `config_parse_iec_size()` and
`config_parse_si_uint64()` if `parse_size()` fails, not only the `rvalue`.

2 years agoconf-parser: set standard pointer alignment
Antonio Alvarez Feijoo [Thu, 20 Jun 2024 10:53:08 +0000 (12:53 +0200)] 
conf-parser: set standard pointer alignment

2 years agoMerge pull request #33407 from poettering/varlink-idl-comment-fix
Lennart Poettering [Thu, 20 Jun 2024 10:13:59 +0000 (12:13 +0200)] 
Merge pull request #33407 from poettering/varlink-idl-comment-fix

varlink: make comments on enum entries work

2 years agobootctl: add comments to Varlink interface 33407/head
Lennart Poettering [Wed, 19 Jun 2024 11:54:47 +0000 (13:54 +0200)] 
bootctl: add comments to Varlink interface

This is mostly intended as test case for the early enum comment bugfix,
as this Varlink IDL description now contains such comments, and
test-varlink-idl will process it forth and back aleady.

2 years agobootctl: normalize how we report no boot entries found
Lennart Poettering [Wed, 19 Jun 2024 11:54:35 +0000 (13:54 +0200)] 
bootctl: normalize how we report no boot entries found

This normalizes how we report an empty list of boot entries in
ListBootEntries(). Our usual pattern is to return one item per method
call, but when there is none we usually return a NoSuchXYZ error. Do so
here too.

Before this we'd return a null item instead here, and only here.

This is a minor compat break, but given that this IPC interface is very
new and probably not used so far (we don't use it in our code at least,
and google doesn#t find any other use) I think this normalization is OK
at this point.

2 years agovarlink: correctly format comments for enums too
Lennart Poettering [Wed, 19 Jun 2024 08:46:27 +0000 (10:46 +0200)] 
varlink: correctly format comments for enums too

I apparently never tested comments on enum values and hence they didn#t
work. Fix that.

2 years agobootctl: add --random-seed=yes/no
Ludwig Nussel [Wed, 17 Apr 2024 09:30:03 +0000 (11:30 +0200)] 
bootctl: add --random-seed=yes/no

2 years agoMerge pull request #33420 from poettering/build-with-object
Yu Watanabe [Thu, 20 Jun 2024 04:04:32 +0000 (13:04 +0900)] 
Merge pull request #33420 from poettering/build-with-object

sd-json: add sd_json_build() flavour that implies we are building an object

2 years agoman: fix typo in systemd-tmpfiles
Diego Viola [Thu, 20 Jun 2024 00:15:38 +0000 (21:15 -0300)] 
man: fix typo in systemd-tmpfiles

Signed-off-by: Diego Viola <diego.viola@gmail.com>
2 years agoMerge pull request #33419 from YHNdnzj/install-report-symlink
Yu Watanabe [Thu, 20 Jun 2024 04:00:44 +0000 (13:00 +0900)] 
Merge pull request #33419 from YHNdnzj/install-report-symlink

shared/install: several fixes for change reporting

2 years agocore/namespace: ensure private tmpfs is mounted earlier
Yu Watanabe [Wed, 19 Jun 2024 16:33:51 +0000 (01:33 +0900)] 
core/namespace: ensure private tmpfs is mounted earlier

And drop spurious assertion.

Fortunately, the previous logic worked, as /run/systemd/unit-private-tmp
is ordered earlier than /tmp or /var/tmp. But, let's ensure the tmpfs
mounted earlier to make the logic clearer.

Follow-up for 0e551b04efb911d38b586cca1a6a462c87a2cb1b.

2 years agoMerge pull request #33410 from poettering/sd-json-log-level-clean-up
Yu Watanabe [Thu, 20 Jun 2024 03:59:06 +0000 (12:59 +0900)] 
Merge pull request #33410 from poettering/sd-json-log-level-clean-up

sd-json: clean up SD_JSON_WARNING/SD_JSON_DEBUG definition and comments

2 years agoupdate TODO 33420/head
Lennart Poettering [Wed, 19 Jun 2024 14:55:13 +0000 (16:55 +0200)] 
update TODO

2 years agotree-wide: port over to new builder apis
Lennart Poettering [Tue, 18 Jun 2024 15:08:49 +0000 (17:08 +0200)] 
tree-wide: port over to new builder apis

2 years agosd-json: add sd_json_build() wrapper macro that implies SD_JSON_BUILD_OBJECT()
Lennart Poettering [Tue, 18 Jun 2024 10:21:31 +0000 (12:21 +0200)] 
sd-json: add sd_json_build() wrapper macro that implies SD_JSON_BUILD_OBJECT()

In 99% of uses of sd_json_build() we want to build an object as
outermost construct. Let's shorten this most common case a bit, by
adding sd_json_buildo() that implies this. This allows us to shorten
much of our code, all across the tree.

2 years agoupdate TODO 33410/head
Lennart Poettering [Tue, 18 Jun 2024 09:46:41 +0000 (11:46 +0200)] 
update TODO

2 years agosd-json: add comment clarifying that _SD_JSON_BUILD* enums are not to be used directly
Lennart Poettering [Tue, 18 Jun 2024 09:47:06 +0000 (11:47 +0200)] 
sd-json: add comment clarifying that _SD_JSON_BUILD* enums are not to be used directly

2 years agosd-json.h: reword SD_JSON_WARNING/SD_JSON_DEBUG comments
Lennart Poettering [Tue, 18 Jun 2024 09:43:58 +0000 (11:43 +0200)] 
sd-json.h: reword SD_JSON_WARNING/SD_JSON_DEBUG comments

Even though we don't export json_log() in the public API, let's
officially make the SD_JSON_WARNING/SD_JSON_DEBUG that control its
effect in the public API.

After all, for our own dispatcher functions they have a nice effect, and
they are trivially reimplemented in user code independently.

(We might eventually consider exporting json_log() as public API, but
this is quite involved, given its use of macros/inline functions and
iternal logging API).

This mostly just swaps around the bit flags and cleans up comments.

2 years agotest-install-root: introduce test case for #33411 33419/head
Mike Yuan [Wed, 19 Jun 2024 19:28:05 +0000 (21:28 +0200)] 
test-install-root: introduce test case for #33411

2 years agoshared/install: correctly report changes in install_info_symlink_alias()
Mike Yuan [Wed, 19 Jun 2024 16:45:14 +0000 (18:45 +0200)] 
shared/install: correctly report changes in install_info_symlink_alias()

Follow-up for b2751cf0394d36c24590b5f7b33e9f864b57ba0d

Also make the conditions consistent for install_info_symlink_wants().

Fixes #33411

2 years agoshared/install: propagate all errors in install_info_apply()
Mike Yuan [Wed, 19 Jun 2024 16:59:15 +0000 (18:59 +0200)] 
shared/install: propagate all errors in install_info_apply()

Currently, install_info_apply() only updates r if it's 0,
meaning that if one of the earlier install_info_symlink_alias/wants()
calls returns > 0, errors generated by later calls will be discarded.
Fix that.

2 years agoshared/install: drop unneeded initialization
Mike Yuan [Wed, 19 Jun 2024 16:44:26 +0000 (18:44 +0200)] 
shared/install: drop unneeded initialization

2 years agoMerge pull request #33034 from yuwata/update-kernel-headers
Yu Watanabe [Wed, 19 Jun 2024 18:53:16 +0000 (03:53 +0900)] 
Merge pull request #33034 from yuwata/update-kernel-headers

basic/linux: update kernel headers from v6.10-rc3

2 years agokernel-install: correct the place where it works in man and help text
Antonio Alvarez Feijoo [Wed, 19 Jun 2024 12:41:55 +0000 (14:41 +0200)] 
kernel-install: correct the place where it works in man and help text

2 years agoman/systemd.exec: list inaccessible files for ProtectKernelTunables
Maximilian Wilhelm [Wed, 19 Jun 2024 11:41:39 +0000 (13:41 +0200)] 
man/systemd.exec: list inaccessible files for ProtectKernelTunables

2 years agovmspawn: define QEMU_MACHINE_TYPE for riscv
Xeonacid [Wed, 19 Jun 2024 09:56:57 +0000 (17:56 +0800)] 
vmspawn: define QEMU_MACHINE_TYPE for riscv

Use ["virt"](https://www.qemu.org/docs/master/system/target-riscv.html#board-specific-documentation) as a commonly used generic platform on riscv.

2 years agoMerge pull request #32868 from keszybz/more-whomification
Yu Watanabe [Wed, 19 Jun 2024 17:59:14 +0000 (02:59 +0900)] 
Merge pull request #32868 from keszybz/more-whomification

Fix confusion between killer and prey

2 years agocore: drop unnecessary auto_fs4.h inclusion 33034/head
Yu Watanabe [Tue, 28 May 2024 02:21:35 +0000 (11:21 +0900)] 
core: drop unnecessary auto_fs4.h inclusion

auto_fs4.h is a trivial wrapper of auto_fs.h, and it is already included
by auto_dev-ioctl.h.

2 years agomissing: drop BCACHEFS_SUPER_MAGIC as it is now defined in linux/magic.h
Yu Watanabe [Fri, 31 May 2024 02:28:15 +0000 (11:28 +0900)] 
missing: drop BCACHEFS_SUPER_MAGIC as it is now defined in linux/magic.h

2 years agobasic/linux: update kernel headers from v6.10-rc3
Yu Watanabe [Tue, 28 May 2024 02:04:47 +0000 (11:04 +0900)] 
basic/linux: update kernel headers from v6.10-rc3

This also
- merges basic/linux and shared/linux,
- moves BPF_JUMP_A() to basic/missing_bpf.h,
- copies from usrspace kernel headers directory generated by 'make headers',
  rather than copying from kernel tree,
- copies const.h into our tree to reduce change in ethtool.h,
- copies auto_fs.h into our tree to reduce change in auto_dev-ioctl.h.

2 years agoman: drop reference to _SOURCE_MONOTONIC_TIMESTAMP= 33401/head
Yu Watanabe [Wed, 19 Jun 2024 15:03:09 +0000 (00:03 +0900)] 
man: drop reference to _SOURCE_MONOTONIC_TIMESTAMP=

The timestamp is broken at least now. We should not advertise it.

2 years agoRevert "logs-show: use _SOURCE_MONOTONIC_TIMESTAMP when _SOURCE_BOOTTIME_TIMESTAMP...
Yu Watanabe [Wed, 19 Jun 2024 07:38:07 +0000 (16:38 +0900)] 
Revert "logs-show: use _SOURCE_MONOTONIC_TIMESTAMP when _SOURCE_BOOTTIME_TIMESTAMP field exists"

This reverts commit f5bdecba08fd3ee11bebc635ea9d17fd97bd33d7.

Some kmsg sent before sleep may be received by systemd-journald after
sleep. In that case, map_clock_usec() does not provide correct
timestamp.
So, _SOURCE_MONOTONIC_TIMESTAMP field is anyway unreliable.
Let's not use the field.

2 years agojournal: drop mapping from CLOCK_BOOTTIME -> CLOCK_MONOTONIC
Yu Watanabe [Wed, 19 Jun 2024 15:07:36 +0000 (00:07 +0900)] 
journal: drop mapping from CLOCK_BOOTTIME -> CLOCK_MONOTONIC

This partially reverts commit a9357c2ce2d188b5b63592fd271f14d335867c23.

Some kmsg sent before sleep may be received by systemd-journald after
sleep. In that case, map_clock_usec() does not provide correct
timestamp.
So, we cannot provide reliable _SOURCE_MONOTONIC_TIMESTAMP.

2 years agoupdate TODO
Lennart Poettering [Wed, 19 Jun 2024 14:53:48 +0000 (16:53 +0200)] 
update TODO

2 years agovarious: move ptr indicator to return value 32868/head
Zbigniew Jędrzejewski-Szmek [Fri, 17 May 2024 06:54:00 +0000 (08:54 +0200)] 
various: move ptr indicator to return value

2 years agovarious: move const ptr indicator to return value
Zbigniew Jędrzejewski-Szmek [Fri, 17 May 2024 06:54:00 +0000 (08:54 +0200)] 
various: move const ptr indicator to return value

2 years agoFix confusion between killer and prey
Zbigniew Jędrzejewski-Szmek [Thu, 16 May 2024 14:45:04 +0000 (16:45 +0200)] 
Fix confusion between killer and prey

"who" is the entity doing the killing, "whom" is the target.
Follow-up for 4ccde410a3fc141c9ddf285f24a22dfea99e0287.

2 years agovarlink-idl: allow unbalanced quote and trailing backslash in comment
Yu Watanabe [Wed, 19 Jun 2024 06:17:26 +0000 (15:17 +0900)] 
varlink-idl: allow unbalanced quote and trailing backslash in comment

Fixes #33381.
Fixes OSS-FUZZ#69730.
Follow-up for fbb69c0306d434153ca85b227c7d42b9c92872e4.

2 years agoudev-spawn: fix typo and simplify code
Antonio Alvarez Feijoo [Mon, 27 May 2024 15:17:52 +0000 (17:17 +0200)] 
udev-spawn: fix typo and simplify code

Follow-up for 11706971e8b6aa289af56454330fffd87f5d5a78

2 years agoUse consistent spelling of systemd.condition_first_boot argument
pyfisch [Tue, 18 Jun 2024 20:22:15 +0000 (22:22 +0200)] 
Use consistent spelling of systemd.condition_first_boot argument

2 years agoman/systemd.journal-fields: document _SOURCE_{MONOTONIC,BOOTTIME}_TIMESTAMP
Mike Yuan [Tue, 18 Jun 2024 16:37:44 +0000 (18:37 +0200)] 
man/systemd.journal-fields: document _SOURCE_{MONOTONIC,BOOTTIME}_TIMESTAMP

Follow-up for a9357c2ce2d188b5b63592fd271f14d335867c23

2 years agoMerge pull request #33391 from YHNdnzj/runtime-dir-cleanup
Yu Watanabe [Wed, 19 Jun 2024 05:44:01 +0000 (14:44 +0900)] 
Merge pull request #33391 from YHNdnzj/runtime-dir-cleanup

login/user-runtime-dir: free ignored sd_bus_error, avoid triggering assertion

2 years agologin/user-runtime-dir: free ignored sd_bus_error, avoid triggering assertion 33391/head
Mike Yuan [Tue, 18 Jun 2024 14:32:14 +0000 (16:32 +0200)] 
login/user-runtime-dir: free ignored sd_bus_error, avoid triggering assertion

Fixes #33388

2 years agologin/user-runtime-dir: use STRLEN where appropriate
Mike Yuan [Tue, 18 Jun 2024 14:31:12 +0000 (16:31 +0200)] 
login/user-runtime-dir: use STRLEN where appropriate

Also, add missing trailing / to paths used in STRLEN/sizeof.

2 years agostrv: replace always-true condition with assertion
Yu Watanabe [Tue, 18 Jun 2024 09:12:39 +0000 (18:12 +0900)] 
strv: replace always-true condition with assertion

Follow-up for aca093018c5d2cd8a63129cab67941fe1b8fd850.
Fixes CID#1547105.

2 years agoMerge pull request #33386 from yuwata/journal-timestamp 33380/head
Luca Boccassi [Tue, 18 Jun 2024 15:27:36 +0000 (16:27 +0100)] 
Merge pull request #33386 from yuwata/journal-timestamp

journal: fix _SOURCE_MONOTONIC_TIMESTAMP field

2 years agorepart: fix memory leak
Antonio Alvarez Feijoo [Tue, 18 Jun 2024 12:07:50 +0000 (14:07 +0200)] 
repart: fix memory leak

2 years agomkosi: restrict noble-backports to noble builds
Luca Boccassi [Tue, 18 Jun 2024 12:35:32 +0000 (13:35 +0100)] 
mkosi: restrict noble-backports to noble builds

Follow-up for c01cb8cbff8512b65b7903b55f78c8d12661b8d7

2 years agoMerge pull request #33383 from poettering/tmpfiles-limit-purge
Luca Boccassi [Tue, 18 Jun 2024 14:44:32 +0000 (15:44 +0100)] 
Merge pull request #33383 from poettering/tmpfiles-limit-purge

tmpfiles: make --purge more restrictive, and various other tweaks

2 years agoinstall: allow removing symlinks even for units that are gone
Luca Boccassi [Fri, 7 Jun 2024 20:39:45 +0000 (21:39 +0100)] 
install: allow removing symlinks even for units that are gone

If a symlink is leftover, still allow cleaning it up via 'disable'. This
happens when a unit is stopped and removed, but not disabled, and a reload
has already happened. At that point, cleaning up the old symlinks becomes
impossible through the APIs, and needs to be done manually. Always allow
cleaning up symlinks, if they exist, by only erroring out if there is an
OOM.

Follow-up for f31f10a6207efc9ae9e0b1f73975b5b610914017

2 years agoman: suffix tmpfiles.d with /, as per coding style 33383/head
Lennart Poettering [Tue, 18 Jun 2024 08:27:06 +0000 (10:27 +0200)] 
man: suffix tmpfiles.d with /, as per coding style

2 years agotmpfiles: mention that --create also adjusts files/directories in --help text
Lennart Poettering [Tue, 18 Jun 2024 08:00:16 +0000 (10:00 +0200)] 
tmpfiles: mention that --create also adjusts files/directories in --help text

2 years agotmpfiles: suffix --replace= properly with = in comment
Lennart Poettering [Tue, 18 Jun 2024 07:56:49 +0000 (09:56 +0200)] 
tmpfiles: suffix --replace= properly with = in comment

2 years agotmpfiles: make --tldr help text symmetric to --cat-config
Lennart Poettering [Tue, 18 Jun 2024 07:56:36 +0000 (09:56 +0200)] 
tmpfiles: make --tldr help text symmetric to --cat-config

2 years agotmpfiles: improve debug logging around O_NOATIME fallback
Lennart Poettering [Tue, 18 Jun 2024 07:55:48 +0000 (09:55 +0200)] 
tmpfiles: improve debug logging around O_NOATIME fallback

2 years agotmpfiles: remove pointless empty line
Lennart Poettering [Tue, 18 Jun 2024 07:55:32 +0000 (09:55 +0200)] 
tmpfiles: remove pointless empty line

2 years agotmpfiles: move --purge to command section in --help text where it belongs
Lennart Poettering [Tue, 18 Jun 2024 07:56:15 +0000 (09:56 +0200)] 
tmpfiles: move --purge to command section in --help text where it belongs

Also, make contrast between --remove and --purge clearer: one deletes
files marked for deletion, the other deletes files marked for creation.

2 years agotmpfiles: insist on at least one configuration file being specified on --purge
Lennart Poettering [Tue, 18 Jun 2024 07:55:20 +0000 (09:55 +0200)] 
tmpfiles: insist on at least one configuration file being specified on --purge

Also, extend the man page explanation substantially, matching more
closely what --create says.

Fixes: #33349
2 years agoAdd OrangePi NEO Scancodes
Derek J. Clark [Mon, 17 Jun 2024 18:49:30 +0000 (11:49 -0700)] 
Add OrangePi NEO Scancodes

Adds scancodes for the OrangePi NEO Handheld Gaming computer. This
device ships with an AT Translated Set 2 Keyboard device that
provides two buttons, ~~LC (Top Left) and RC (Top Right)~~
Home (front, bottom left) and Gamepad (front, bottom right). The
scancodes do not properly map in Linux. This change maps these
scancodes to ensure the hardware behaves as the OEM expects.

2 years agoNEWS: fix typo
Carlo Teubner [Tue, 18 Jun 2024 08:41:59 +0000 (09:41 +0100)] 
NEWS: fix typo

2 years agologs-show: use _SOURCE_MONOTONIC_TIMESTAMP when _SOURCE_BOOTTIME_TIMESTAMP field... 33386/head
Yu Watanabe [Tue, 18 Jun 2024 09:00:33 +0000 (18:00 +0900)] 
logs-show: use _SOURCE_MONOTONIC_TIMESTAMP when _SOURCE_BOOTTIME_TIMESTAMP field exists

With the previous commit, now the _SOURCE_MONOTONIC_TIMESTAMP field is
usable but only when _SOURCE_BOOTTIME_TIMESTAMP exists.

2 years agojournal: introduce _SOURCE_BOOTTIME_TIMESTAMP field
Yu Watanabe [Tue, 18 Jun 2024 08:36:51 +0000 (17:36 +0900)] 
journal: introduce _SOURCE_BOOTTIME_TIMESTAMP field

Then, fix the monotonic timestamp.

The _SOURCE_MONOTONIC_TIMESTAMP field is already used in other projects.
Hence, we cannot remove the field. But, let's store the correct value.
The existence of the new _SOURCE_BOOTTIME_TIMESTAMP field can indicate
that the monotonic timestamp field is reliable or not.

2 years agosd-journal: realign flags
Yu Watanabe [Tue, 18 Jun 2024 08:24:47 +0000 (17:24 +0900)] 
sd-journal: realign flags

2 years agologs-show: do not use _SOURCE_MONOTONIC_TIMESTAMP field
Yu Watanabe [Tue, 18 Jun 2024 08:55:31 +0000 (17:55 +0900)] 
logs-show: do not use _SOURCE_MONOTONIC_TIMESTAMP field

The timestamp is not in CLOCK_MONOTONIC, but CLOCK_BOOTTIME,
while header monotonic timestamp is in CLOCK_MONOTONIC. Hence, we cannot
adjust timestamp by comparing with header monotonic timestamp and
_SOURCE_MONOTONIC_TIMESTAMP field.

Fixes a regression caused by affde1d7e79a634ee6053dbd4a57b3b51b74c170.
Fixes #33293.

2 years agotmpfiles: honour --dry-run when removing directories
Lennart Poettering [Tue, 18 Jun 2024 07:54:33 +0000 (09:54 +0200)] 
tmpfiles: honour --dry-run when removing directories

2 years agotmpfiles: sort needs_purge line list in same order as enum defines them
Lennart Poettering [Tue, 18 Jun 2024 08:15:02 +0000 (10:15 +0200)] 
tmpfiles: sort needs_purge line list in same order as enum defines them

2 years agoupdate TODO
Lennart Poettering [Tue, 18 Jun 2024 07:27:57 +0000 (09:27 +0200)] 
update TODO

2 years agohwdb: add scancodes for AYANEO devices (#33378)
Derek J. Clark [Tue, 18 Jun 2024 00:19:30 +0000 (17:19 -0700)] 
hwdb: add scancodes for AYANEO devices (#33378)

AYANEO has multiple models that all use the same AT Translated Set
2 Keyboard device with 3-4 buttons available. Starting with the
AYANEO 2 there was a change to the IMU programming they were using
that caused the scancodes to no longer present the correct values
in Linux. This change adds a blanket scancode mapping to present
the correct keycodes as designed by the OEM.

In some cases a kernel bug will cause the AT Translated Set 2
Keyboard to present as an AT Raw Set 2 keyboard. I have also
adjusted the scancodes for this scenario as well so they are
in line with expected behavior. Currently only the Kun is still
experiencing this bug.

Example userspace tool refs:
https://github.com/ShadowBlip/InputPlumber/blob/main/rootfs/usr/lib/udev/hwdb.d/59-inputplumber.hwdb
https://github.com/ShadowBlip/HandyGCCS/blob/main/usr/lib/udev/hwdb.d/59-handygccs-ayaneo.hwdb
https://github.com/hhd-dev/hhd/tree/master/usr/lib/udev/hwdb.d

2 years agovarlink-idl: fix typo
Yu Watanabe [Tue, 18 Jun 2024 00:11:48 +0000 (09:11 +0900)] 
varlink-idl: fix typo

Follow-ups for fbb69c0306d434153ca85b227c7d42b9c92872e4.

2 years agocatalog: fix typo
Yu Watanabe [Tue, 18 Jun 2024 00:09:26 +0000 (09:09 +0900)] 
catalog: fix typo

Follow-up for d6518003f8ebbfb6f85dbf227736ae05b0961199.

2 years agoMerge pull request #33376 from yuwata/strv_sort_uniq
Luca Boccassi [Mon, 17 Jun 2024 23:22:19 +0000 (00:22 +0100)] 
Merge pull request #33376 from yuwata/strv_sort_uniq

strv: introduce strv_sort_uniq()