]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agoadd support for hp pavilion gaming 15 lid switch (#29304)
beh_10257 [Tue, 26 Sep 2023 12:32:03 +0000 (12:32 +0000)] 
add support for hp pavilion gaming 15 lid switch (#29304)

Tested together with kernel patch: https://lore.kernel.org/linux-acpi/20230920130506.8595-1-hdegoede@redhat.com/
but the d7 key is still interpreted as a wlan key switch, so an hwdb update is needed.

Raw dmi:

dmi:bvnInsyde:bvrF.45:bd07/07/2023:br15.45:efr2.51:svnHP:pnHPPavilionGamingLaptop15-dk1xxx:pvrType1ProductConfigId:rvnHP:rn8742:rvr02.51:cvnHP:ct10:cvrChassisVersion:sku20T68EA#BH4::

Related to: https://github.com/systemd/systemd/issues/28942

8 months agoRevert "man: Add /usr/local/lib path to Synopsis section for modules-load"
Lennart Poettering [Tue, 26 Sep 2023 08:05:20 +0000 (10:05 +0200)] 
Revert "man: Add /usr/local/lib path to Synopsis section for modules-load"

This reverts commit 17811767687fcee3b96333f724c5cdf3df11ae86.

8 months agoudev: raise RLIMIT_NOFILE as high as we can
Lennart Poettering [Tue, 26 Sep 2023 07:52:05 +0000 (09:52 +0200)] 
udev: raise RLIMIT_NOFILE as high as we can

We might need a lot of fds on large systems, hence raise RLIMIT_NOFILE
to what the service manager allows us, which is quite a lot these days.

udev already sets FORK_RLIMIT_NOFILE_SAFE when forking of chilren, thus
ensuring that forked off processes get their RLIMIT_NOFILE soft limit
reset to 1K for compat with crappy old select().

Replaces: #29298
Fixes: #28583
8 months agovarlink: remove duplicate varlink_clear_current()
Lennart Poettering [Tue, 26 Sep 2023 07:38:12 +0000 (09:38 +0200)] 
varlink: remove duplicate varlink_clear_current()

8 months agocore/service: log the next restart usec only when we're arming timer
Mike Yuan [Mon, 25 Sep 2023 15:23:29 +0000 (23:23 +0800)] 
core/service: log the next restart usec only when we're arming timer

service_restart_usec_next() is also called when querying
'RestartUSecNext' dbus property. Let's avoid the redundant
logging triggered every time user does a 'systemctl status'.

8 months agoman: Add /usr/local/lib path to Synopsis section for modules-load
Raul Cheleguini [Tue, 26 Sep 2023 01:57:05 +0000 (22:57 -0300)] 
man: Add /usr/local/lib path to Synopsis section for modules-load

8 months agoman: document SystemState's possible values
Luca Boccassi [Mon, 25 Sep 2023 18:14:58 +0000 (19:14 +0100)] 
man: document SystemState's possible values

8 months agoman: add version information for udev functions
Abderrahim Kitouni [Tue, 19 Sep 2023 08:04:56 +0000 (09:04 +0100)] 
man: add version information for udev functions

8 months agoMerge pull request #29314 from YHNdnzj/firstboot-fixup
Luca Boccassi [Mon, 25 Sep 2023 21:29:24 +0000 (22:29 +0100)] 
Merge pull request #29314 from YHNdnzj/firstboot-fixup

Small fixups for first boot

8 months agoMerge pull request #29309 from poettering/resolved-varlink-tweaks
Lennart Poettering [Mon, 25 Sep 2023 21:27:33 +0000 (23:27 +0200)] 
Merge pull request #29309 from poettering/resolved-varlink-tweaks

resolved: minor varlink API tweaks

8 months agooomd: correct listening sockets
Lennart Poettering [Mon, 25 Sep 2023 16:10:50 +0000 (18:10 +0200)] 
oomd: correct listening sockets

So, unfortunately oomd uses "io.system." rather than "io.systemd." as
prefix for its sockets. This is a mistake, and doesn't match the
Varlink interface naming or anything else in oomd.

hence, let's fix that.

Given that this is an internal protocol between PID1 and oomd let's
simply change this without retaining compat.

8 months agovarlink: move O_NONBLOCK setting to varlink_server_listen_fd(), and set O_CLOEXEC too
Lennart Poettering [Mon, 25 Sep 2023 14:04:01 +0000 (16:04 +0200)] 
varlink: move O_NONBLOCK setting to varlink_server_listen_fd(), and set O_CLOEXEC too

Let's move setting of O_NONBLOCK into varlink_server_listen_fd() and out
of varlink_server_create_listen_fd_socket(). The latter has two callers:
varlink_server_listen_fd() and varlink_server_listen_address(), which
guarantees O_CLOEXEC+O_NONBLOCK anyway, hence no neet to repeat the
logic.

8 months agoMerge pull request #29315 from poettering/strgrowpad0
Lennart Poettering [Mon, 25 Sep 2023 21:26:47 +0000 (23:26 +0200)] 
Merge pull request #29315 from poettering/strgrowpad0

string-util: make strgrowpad0() safer

8 months agoMerge pull request #29308 from aafeijoo-suse/dissect-fix
Luca Boccassi [Mon, 25 Sep 2023 18:16:08 +0000 (19:16 +0100)] 
Merge pull request #29308 from aafeijoo-suse/dissect-fix

dissect: fix man and bash-completion

8 months agorepart: add extra safety check that the verity signature fits in the partition we... 29315/head
Lennart Poettering [Mon, 25 Sep 2023 17:07:09 +0000 (19:07 +0200)] 
repart: add extra safety check that the verity signature fits in the partition we want to write

8 months agostring-util: make strgrowpad0() a bit safer
Lennart Poettering [Mon, 25 Sep 2023 17:06:06 +0000 (19:06 +0200)] 
string-util: make strgrowpad0() a bit safer

Let#s make sure we never shorten the allocation leaving an invalid
string (i.e. a memory allocation without a trailing NUL) around.

8 months agoman/systemd-firstboot: /etc/ empty -> unpopulated 29314/head
Mike Yuan [Mon, 25 Sep 2023 17:01:57 +0000 (01:01 +0800)] 
man/systemd-firstboot: /etc/ empty -> unpopulated

We use the phrase "unpopulated" in systemd.unit(5) too.
And "/etc/ is empty" is simply spurious.

8 months agocore/main: log that we assume first boot if failed to read machine-id
Mike Yuan [Mon, 25 Sep 2023 17:00:23 +0000 (01:00 +0800)] 
core/main: log that we assume first boot if failed to read machine-id

8 months agoalloc-util: remove duplicate empty line
Lennart Poettering [Fri, 22 Sep 2023 20:21:45 +0000 (22:21 +0200)] 
alloc-util: remove duplicate empty line

8 months agoresolved: rename varlink function to match exposed method name 29309/head
Lennart Poettering [Fri, 22 Sep 2023 20:38:06 +0000 (22:38 +0200)] 
resolved: rename varlink function to match exposed method name

8 months agoresolved: also expose interface index in server JSON data
Lennart Poettering [Fri, 22 Sep 2023 20:37:37 +0000 (22:37 +0200)] 
resolved: also expose interface index in server JSON data

8 months agoMerge pull request #29301 from poettering/pcr-extend-rename
Lennart Poettering [Mon, 25 Sep 2023 16:28:03 +0000 (18:28 +0200)] 
Merge pull request #29301 from poettering/pcr-extend-rename

rename pcrphase binary to pcrextend

8 months agoman: briefly document that we are now keeping an event log in userspace for out measu... 29301/head
Lennart Poettering [Mon, 25 Sep 2023 09:09:34 +0000 (11:09 +0200)] 
man: briefly document that we are now keeping an event log in userspace for out measurements

8 months agopcrextend: make PCR index configurable
Lennart Poettering [Mon, 25 Sep 2023 08:51:56 +0000 (10:51 +0200)] 
pcrextend: make PCR index configurable

Let's make the tool a tiny bit more generic by allowing the PCR index to
measure into to be configurable.

8 months agopcrphase: rename binary to pcrextend
Lennart Poettering [Mon, 25 Sep 2023 08:38:01 +0000 (10:38 +0200)] 
pcrphase: rename binary to pcrextend

The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.

8 months agobash-completion: add missing commands and options to systemd-dissect 29308/head
Antonio Alvarez Feijoo [Mon, 25 Sep 2023 14:46:11 +0000 (16:46 +0200)] 
bash-completion: add missing commands and options to systemd-dissect

8 months agotest: enable debug logs for the user instances as well
Frantisek Sumsal [Mon, 25 Sep 2023 11:25:27 +0000 (13:25 +0200)] 
test: enable debug logs for the user instances as well

To make debugging [0], hopefully, easier.

[0] https://github.com/systemd/systemd/issues/28504

8 months agoMerge pull request #29303 from abderrahim/syntax-fixes
Luca Boccassi [Mon, 25 Sep 2023 14:23:48 +0000 (15:23 +0100)] 
Merge pull request #29303 from abderrahim/syntax-fixes

man: a couple of small fixes

8 months agoman/systemd-dissect: various fixes
Antonio Alvarez Feijoo [Mon, 25 Sep 2023 14:16:41 +0000 (16:16 +0200)] 
man/systemd-dissect: various fixes

- Add synopsis to `--discover` and `--validate` options.
- `-l` is for `--list`, not for `--mtree`.

8 months agoman: fix docbook syntax for function docs 29303/head
Abderrahim Kitouni [Mon, 25 Sep 2023 12:14:13 +0000 (13:14 +0100)] 
man: fix docbook syntax for function docs

This fixes sd_bus_error_add_map and man/sd_uid_get_state

8 months agoman/kernel-command-line: don't refer early_core_pattern to systemd
Abderrahim Kitouni [Mon, 25 Sep 2023 12:12:46 +0000 (13:12 +0100)] 
man/kernel-command-line: don't refer early_core_pattern to systemd

It is defined later in the same file

8 months agodocs/FDS: add missing article and reword sentence
Zbigniew Jędrzejewski-Szmek [Fri, 22 Sep 2023 13:14:40 +0000 (15:14 +0200)] 
docs/FDS: add missing article and reword sentence

8 months agoupdate TODO
Lennart Poettering [Mon, 25 Sep 2023 10:23:12 +0000 (12:23 +0200)] 
update TODO

8 months agomkosi: Run meson and ninja as the user invoking mkosi
Daan De Meyer [Mon, 25 Sep 2023 09:02:13 +0000 (11:02 +0200)] 
mkosi: Run meson and ninja as the user invoking mkosi

Latest mkosi sets $MKOSI_UID and $MKOSI_GID to the uid/gid of the
user running mkosi. Let's make use of this to run meson setup and
ninja as the user running mkosi, so that if we execute git as a
subprocess during meson setup, it doesn't complain about unsafe
directories. This also makes sure all the build artifacts are owned
on the host by the user running mkosi.

8 months agopo: Translated using Weblate (Korean)
김인수 [Mon, 25 Sep 2023 03:36:02 +0000 (05:36 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main

8 months agosd-dhcp-client: reject NAKs from servers that we did not send an offer to (#29290)
Alexandre Peixoto Ferreira [Mon, 25 Sep 2023 02:46:41 +0000 (21:46 -0500)] 
sd-dhcp-client: reject NAKs from servers that we did not send an offer to (#29290)

To support multiple DHCP servers in a network.

8 months agohwdb: ieee1394-unit-function: add Miglia Technology Harmony Audio (HA02)
Takashi Sakamoto [Sun, 24 Sep 2023 03:14:25 +0000 (12:14 +0900)] 
hwdb: ieee1394-unit-function: add Miglia Technology Harmony Audio (HA02)

This commit adds hwdb entry for Miglia Technology Harmony Audio (HA02).
The device is an application of OXford Semiconductor FW970 and will be
supported by ALSA oxfw driver in future.

8 months agotest: wait for the swtpm socket to appear
Frantisek Sumsal [Sat, 23 Sep 2023 07:13:56 +0000 (09:13 +0200)] 
test: wait for the swtpm socket to appear

On slower/overloaded systems it may take a bit for the swtpm socket
to show up:

I: Started swtpm as PID 189419 with state dir /tmp/tmp.pWqUutuGUj
I: Configured emulated TPM2 device tpm-spapr
+ tee /var/tmp/systemd-test-TEST-70-TPM2_1/console.log
+ timeout --foreground 1200 /bin/qemu-system-ppc64le -smp 4 ...
qemu-system-ppc64le: -chardev socket,id=chrtpm,path=/tmp/tmp.pWqUutuGUj/sock: Failed to connect to '/tmp/tmp.pWqUutuGUj/sock': No such file or directory
E: qemu failed with exit code 1

Spotted regularly in the ppc64le cron job and in some Ubuntu CI/CentOS CI
pr runs [0].

[0] https://github.com/systemd/systemd/pull/29183#issuecomment-1721727927

8 months agotest: don't panic on soft lockups
Frantisek Sumsal [Fri, 22 Sep 2023 19:41:34 +0000 (21:41 +0200)] 
test: don't panic on soft lockups

We can't do anything about them anyway, and most importantly this seems
to alleviate systemd/systemd-centos-ci#660, which should make the CIs
a bit less angry (at least until the issue is addressed properly).

9 months agoMerge pull request #29254 from yuwata/sd-ndisc-use-usec_t
Luca Boccassi [Fri, 22 Sep 2023 20:46:50 +0000 (21:46 +0100)] 
Merge pull request #29254 from yuwata/sd-ndisc-use-usec_t

sd-ndisc: make sd_ndisc return time values in usec

9 months agoMerge pull request #29258 from yuwata/sd-dhcp-client-split-out
Luca Boccassi [Fri, 22 Sep 2023 20:46:31 +0000 (21:46 +0100)] 
Merge pull request #29258 from yuwata/sd-dhcp-client-split-out

sd-dhcp-client: preparation for later PR

9 months agosd-dhcp-client: split out client_parse_message() 29258/head
Yu Watanabe [Wed, 20 Sep 2023 19:39:49 +0000 (04:39 +0900)] 
sd-dhcp-client: split out client_parse_message()

No functional change, just refactoring and preparation for later
commits.

9 months agosd-dhcp-client: introduce dhcp_lease_unref_and_replace()
Yu Watanabe [Wed, 20 Sep 2023 19:37:18 +0000 (04:37 +0900)] 
sd-dhcp-client: introduce dhcp_lease_unref_and_replace()

9 months agosd-dhcp-client: do not set fallback subnet mask if it is already set
Yu Watanabe [Wed, 20 Sep 2023 05:32:38 +0000 (14:32 +0900)] 
sd-dhcp-client: do not set fallback subnet mask if it is already set

9 months agosd-dhcp-client: split out client_enter_requesting()
Yu Watanabe [Wed, 20 Sep 2023 04:37:53 +0000 (13:37 +0900)] 
sd-dhcp-client: split out client_enter_requesting()

No functional change, just refactoring and preparation for later
commits.

9 months agosd-dhcp-client: split out client_enter_bound()
Yu Watanabe [Wed, 20 Sep 2023 03:23:54 +0000 (12:23 +0900)] 
sd-dhcp-client: split out client_enter_bound()

No functional change, just refactoring and preparation for later
commits.

9 months agosd-ndisc: make sd_ndisc return time values in usec 29254/head
Yu Watanabe [Thu, 21 Sep 2023 17:18:06 +0000 (02:18 +0900)] 
sd-ndisc: make sd_ndisc return time values in usec

This also introduces sd_ndisc_router_get_lifetime_timestamp() and
friends that return timestamp rather than timespan.

9 months agobtrfs-util: fix one memory leak
Mike Yuan [Tue, 19 Sep 2023 16:37:11 +0000 (00:37 +0800)] 
btrfs-util: fix one memory leak

Follow-up for efb6a76a2a097132087ee30720421136cba9e708

9 months agoAdd recommended initramfs regeneration
RoepLuke [Thu, 21 Sep 2023 21:52:04 +0000 (23:52 +0200)] 
Add recommended initramfs regeneration

I recently tried adding a FIDO2-Device as an unlocking method to the LUKS2 partition containing my Fedora install.
When trying to do this, I stumbled upon the here edited man files detailing how to do this.
I however could not unlock my partition with my FIDO2-Device after editing /etc/crypttab and rebooting.
As I found out after a while, I needed to regenerate / update my currently running / used initramfs (https://unix.stackexchange.com/a/705809).
This would have most likely solved itself for me with the next kernel update install (as far as I understand).
So I propose changing the files edited here to recommend or at least inform the user about this.

9 months agorepart: Don't fail on boot if we can't find the root block device
Daan De Meyer [Fri, 22 Sep 2023 11:47:14 +0000 (13:47 +0200)] 
repart: Don't fail on boot if we can't find the root block device

When booting from virtiofs, we won't be able to find a root block
device. Let's gracefully handle this similar to how we don't fail
if we can't find a GPT partition table.

9 months agoMerge pull request #29282 from YHNdnzj/hibernate-resume-meson
Luca Boccassi [Fri, 22 Sep 2023 14:46:09 +0000 (15:46 +0100)] 
Merge pull request #29282 from YHNdnzj/hibernate-resume-meson

hibernate-resume: minor follow-up for meson and header file

9 months agohibernate-resume: add missing #pragma once 29282/head
Mike Yuan [Fri, 22 Sep 2023 13:03:48 +0000 (21:03 +0800)] 
hibernate-resume: add missing #pragma once

9 months agohibernate-resume: break lines in meson.build files()
Mike Yuan [Fri, 22 Sep 2023 13:02:55 +0000 (21:02 +0800)] 
hibernate-resume: break lines in meson.build files()

9 months agoMerge pull request #29224 from keszybz/netdev-config-parsing
Zbigniew Jędrzejewski-Szmek [Fri, 22 Sep 2023 12:29:47 +0000 (14:29 +0200)] 
Merge pull request #29224 from keszybz/netdev-config-parsing

Use a helper to simplify parsing of ranges in netdev config and related changes

9 months agomkosi: Don't skip initrd dependency when building a directory image
Daan De Meyer [Fri, 22 Sep 2023 11:10:28 +0000 (13:10 +0200)] 
mkosi: Don't skip initrd dependency when building a directory image

mkosi now supports booting directory images in qemu using virtiofs.
However, until distribution kernels build the virtiofs driver directly
into the kernel, we need an initrd to make this work, so make sure to
pull in the initrd preset when building a directory image that could be
bootable to make this work.

9 months agonetdev/wireguard: define iterator variable in the loop 29224/head
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2023 10:56:37 +0000 (12:56 +0200)] 
netdev/wireguard: define iterator variable in the loop

9 months agonetwork: make DEFINE_NETDEV_CAST() assert on input and output
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2023 10:52:26 +0000 (12:52 +0200)] 
network: make DEFINE_NETDEV_CAST() assert on input and output

The macro used to return NULL if input was NULL or had the wrong type. Now
it asserts that input is nonnull and it has the expected type.

There are a few places where a missing or mismatched type was OK, but in a
majority of places, we would do both of the asserts. In various places we'd
only do one, but that was by ommission/mistake. So moving the asserts into the
macro allows us to save some lines.

9 months agonetwork/netdev: align tables
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 22:14:29 +0000 (00:14 +0200)] 
network/netdev: align tables

9 months agonetwork/netdev: fix resetting of 'inherit' field
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 21:54:18 +0000 (23:54 +0200)] 
network/netdev: fix resetting of 'inherit' field

We have two fields: inherit and ttl, and ttl is ignored if inherit is true.
Setting TTL=inherit and later TTL=n would not work because we didn't unset
inherit.

9 months agonetwork: refusing parsing negative flow labels
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 18:42:43 +0000 (20:42 +0200)] 
network: refusing parsing negative flow labels

The docs for FlowLabel= said that the range is 0..1048575, but the code did not
reject negative numbers.

9 months agonetwork/fou-tunnel: simplify parsing of protocol number
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:48:07 +0000 (12:48 +0200)] 
network/fou-tunnel: simplify parsing of protocol number

Previously, we would call parse_ip_protocol(), which internally calls
safe_atoi(), and then call safe_atou(). This isn't terrible, but it's also
slightly confusing. Use parse_ip_protocol_full() to avoid the second call.

9 months agoshared/ip-procotol-list: generalize and rework parse_ip_protocol()
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:43:16 +0000 (12:43 +0200)] 
shared/ip-procotol-list: generalize and rework parse_ip_protocol()

Optionally, accept protocols that don't have a known name.
Avoid any allocations in the common case.
Return more granular error codes: -ERANGE for negative values,
-EOPNOTSUPP if the protocol is a valid number, but we don't know
the protocol, and -EINVAL only if it's not a numerical string.

9 months agonetwork/vxlan: avoid unneccesary temporary variables
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:13:56 +0000 (12:13 +0200)] 
network/vxlan: avoid unneccesary temporary variables

parse_ip_port_range() DTRT and only sets the output on success.

9 months agonetwork/netdev: use ASSERT_PTR() more, adjust indentation
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:11:34 +0000 (12:11 +0200)] 
network/netdev: use ASSERT_PTR() more, adjust indentation

9 months agonetwork: use a common helper to parse bounded ranges
Zbigniew Jędrzejewski-Szmek [Sat, 16 Sep 2023 10:06:19 +0000 (12:06 +0200)] 
network: use a common helper to parse bounded ranges

This compresses repetetive code and makes it easier to add new options
in networkd. The formatting of error messages becomes uniform. The
error message always specifies the rvalue literally, instead of using
a "descriptive name". This makes the message much easier to handle for
the user.

I opted to add just one parser, and wrap it with inline functions to proxy
the type. This is less verbose than copying functions for each type
separately, and the compiler should be able to get rid of the inline wrapper
almost entirely.

asserts are reordered to use the same order as the parameter list.
This makes the code easier to read.

No functional change intended, apart from the difference in error message
formatting.

9 months agoAdd mkosi.conf to gitignore
Jordan Rome [Fri, 22 Sep 2023 00:44:19 +0000 (17:44 -0700)] 
Add mkosi.conf to gitignore

9 months agofind_legacy_keymap: extend variant match bonus again
Adam Williamson [Tue, 19 Sep 2023 23:06:26 +0000 (16:06 -0700)] 
find_legacy_keymap: extend variant match bonus again

If the column is "-" and the X context variant specifer only
contains commas, we should also give the match bonus. The variant
string is supposed to be a comma-separated list as long as the
list of layouts, so it's quite natural for consumers to be written
in such a way that they pass a string only containing commas if
there are multiple layouts and no variants. anaconda is a real
world case that does this.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
9 months agosd-journal: refuse entry objects with an empty boot ID
Yu Watanabe [Thu, 21 Sep 2023 20:08:12 +0000 (05:08 +0900)] 
sd-journal: refuse entry objects with an empty boot ID

Otherwise, e.g. sd_journal_get_monotonic_usec() return an empty boot ID
when called for such a broken entry object.

Such a broken object may be stored when the system was not cleanly shutdown.

Fixes #29167.

9 months agosd-ndisc: rename function arguments for storing results
Yu Watanabe [Thu, 21 Sep 2023 17:16:49 +0000 (02:16 +0900)] 
sd-ndisc: rename function arguments for storing results

9 months agoelf2efi: fix a typo
Mike Yuan [Thu, 21 Sep 2023 17:06:55 +0000 (01:06 +0800)] 
elf2efi: fix a typo

9 months agomeson: relax ukify requirements
Luca Boccassi [Wed, 20 Sep 2023 19:58:47 +0000 (20:58 +0100)] 
meson: relax ukify requirements

Installing ukify.py doesn't require a working UEFI architecture, but
only that the bootloader option is enabled (and python3). On Debian
Arch: all packages (like python scripts) can theorethically be built
on any builder with any architecture, so there's no guarantee that
it will actually be an EFI-enabled architecture to do that package build.

Relax the requirement to check only for the ukify config option.

9 months agosystemctl: link to all non-man-page files in help
Zbigniew Jędrzejewski-Szmek [Fri, 8 Sep 2023 15:02:57 +0000 (17:02 +0200)] 
systemctl: link to all non-man-page files in help

For file:// links, we urlify the link so that the user can click and either
open the file in a editor or some viewer. The detection is chosen via some
mechanism implemented by the terminal emulator. This seems too DTRT for text
files and PDFs, which should cover the majority of realistic cases. If the file
is not viable, the terminal emulator will say
  "Could not open file://…. No application is registered to view this file type."
or similar.

For all other links, which are primarily http:// and https://, we just show the
link, letting the terminal handle the hyperlinking. The user can then ctrl-click
and open the file it their browser. If we tried to open the files automatically,
we'd would need to open many pages, and we'd need to figure out what browser to
use, etc. When the user picks whether to open the file, this leads to a nicer
user experience.

Man pages are separated by an empty line from preceding in and following output.
In my testing, this makes the output easier to read. A bit of explicit flushing
is needed to make sure that various outputs are not interleaved.

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

9 months agohwdb: Bush tablet rotation support (#29268)
Tomasz Świątek [Thu, 21 Sep 2023 15:13:00 +0000 (17:13 +0200)] 
hwdb: Bush tablet rotation support (#29268)

9 months agomeson: do not explicitly specify ownership of /var/log/journal/
Zbigniew Jędrzejewski-Szmek [Thu, 21 Sep 2023 08:47:36 +0000 (10:47 +0200)] 
meson: do not explicitly specify ownership of /var/log/journal/

In 9289e093ae6fd5484f9119e1ee07d1dffe37cd10 we started using install_emptydir().

When running unprivileged, 'DESTDIR=… meson install -C build --quiet --no-rebuild'
would emit two warnings:
  '…/var/log/journal': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...
  '…/var/log/journal/remote': Unable to set owner 'root' and group 'root': Operation not permitted, ignoring...

Those were the only two install_emptydir()s that specified ownership.
Let's drop the user/group specification to get rid of the warning.

When installing as root, we will create a root-owned directory anyway.
When not running as root, we cannot create a root-owned directory.
So this specification only makes a difference if we are running as root,
and the directory already existed, and was not owned by root. In that case,
I think it's actually better to leave the existing modification in place.
(E.g. maybe the admin chgrp'ed the ownership for whatever reason. We might
just as well leave that in place.)

9 months agoMerge pull request #29253 from yuwata/sd-radv-use-usec_t
Luca Boccassi [Thu, 21 Sep 2023 13:06:28 +0000 (14:06 +0100)] 
Merge pull request #29253 from yuwata/sd-radv-use-usec_t

sd-radv: use usec_t

9 months agonetwork: split out link_get_address_states()
Yu Watanabe [Wed, 20 Sep 2023 06:01:53 +0000 (15:01 +0900)] 
network: split out link_get_address_states()

No functional change, just refactoring and preparation for later
commits.

9 months agoMerge pull request #29252 from yuwata/sd-dhcp6-client-use-usec_t
Luca Boccassi [Thu, 21 Sep 2023 10:30:02 +0000 (11:30 +0100)] 
Merge pull request #29252 from yuwata/sd-dhcp6-client-use-usec_t

sd-dhcp6-client: use usec t

9 months agosd-event: drop unnecessary call of sd_event_now() when requested relative time is...
Yu Watanabe [Wed, 20 Sep 2023 02:32:27 +0000 (11:32 +0900)] 
sd-event: drop unnecessary call of sd_event_now() when requested relative time is zero

9 months agosd-dhcp-client: use unaligned_be32_sec_to_usec()
Yu Watanabe [Wed, 6 Sep 2023 19:33:05 +0000 (04:33 +0900)] 
sd-dhcp-client: use unaligned_be32_sec_to_usec()

Note, previously, we set 1 second if the time value is zero.
But the adjustment is dropped now, as for the lifetime we have explicit
check that the message has non-zero lifetime, and for T1 and T2 we have
better adjustment in client_set_lease_timeouts().

9 months agokeyboard-model-map: correct sk-qwerty entry
Adam Williamson [Wed, 20 Sep 2023 22:14:31 +0000 (15:14 -0700)] 
keyboard-model-map: correct sk-qwerty entry

qwerty here is a variant, not an option.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
9 months agosd-device: include missing alloc-util.h
Yu Watanabe [Wed, 20 Sep 2023 04:06:16 +0000 (13:06 +0900)] 
sd-device: include missing alloc-util.h

unref_and_replace_full() is defined in alloc-util.h.

9 months agoMerge pull request #29235 from yuwata/sd-journal-reset-saved-direction-on-seek
Luca Boccassi [Wed, 20 Sep 2023 21:06:01 +0000 (22:06 +0100)] 
Merge pull request #29235 from yuwata/sd-journal-reset-saved-direction-on-seek

sd-journal: reset saved direction on seek

9 months agotest-ndisc-ra: add tests for recently added functions 29253/head
Yu Watanabe [Tue, 5 Sep 2023 13:12:09 +0000 (22:12 +0900)] 
test-ndisc-ra: add tests for recently added functions

9 months agosd-radv: make sd_radv always take timespan in usec
Yu Watanabe [Tue, 5 Sep 2023 07:51:39 +0000 (16:51 +0900)] 
sd-radv: make sd_radv always take timespan in usec

9 months agosd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friends 29252/head
Yu Watanabe [Tue, 5 Sep 2023 06:50:50 +0000 (15:50 +0900)] 
sd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friends

9 months agosd-dhcp6-client: use be32_sec_to_usec() at more places
Yu Watanabe [Tue, 5 Sep 2023 06:50:23 +0000 (15:50 +0900)] 
sd-dhcp6-client: use be32_sec_to_usec() at more places

9 months agosd-dhcp6-client: rework IA_NA or IA_PD getters
Yu Watanabe [Mon, 4 Sep 2023 18:12:46 +0000 (03:12 +0900)] 
sd-dhcp6-client: rework IA_NA or IA_PD getters

This splits sd_dhcp6_lease_get_address() into small pieces,
and introduce FOREACH_DHCP6_ADDRESS() macro.
Also, the lifetimes provided by _get_address_lifetime() are now in usec,
and _get_address_lifetime_timestamp() provides timestamp.

The same change is also applied for IA_PD.

9 months agosd-dhcp6-client: introduce sd_dhcp6_lease_has_pd_prefix() and friend
Yu Watanabe [Mon, 4 Sep 2023 18:11:53 +0000 (03:11 +0900)] 
sd-dhcp6-client: introduce sd_dhcp6_lease_has_pd_prefix() and friend

No functional change, just refactoring.

9 months agosd-journal: also clear saved direction on seek 29235/head
Yu Watanabe [Tue, 19 Sep 2023 21:36:50 +0000 (06:36 +0900)] 
sd-journal: also clear saved direction on seek

Otherwise, sd_journal_previous() -> real_journal_next(DIRECTION_UP) ->
next_beyond_location() wrongly handles that previously we hit EOF of
the file, and returns 0 without finding a matching entry.

Fixes #29216.

9 months agotest: add more testcases for seeking journal entries
Yu Watanabe [Tue, 19 Sep 2023 20:37:39 +0000 (05:37 +0900)] 
test: add more testcases for seeking journal entries

This is mostly for issue #29216.

9 months agotest: check return value of sd_journal_next() and friends
Yu Watanabe [Tue, 19 Sep 2023 20:36:41 +0000 (05:36 +0900)] 
test: check return value of sd_journal_next() and friends

9 months agotreewide: split commandline into command line
Joerg Behrmann [Tue, 19 Sep 2023 15:45:44 +0000 (17:45 +0200)] 
treewide: split commandline into command line

9 months agoMerge pull request #29239 from poettering/clock-nanosleep
Lennart Poettering [Wed, 20 Sep 2023 14:14:53 +0000 (16:14 +0200)] 
Merge pull request #29239 from poettering/clock-nanosleep

use clock_nanosleep() rather than nanosleep()

9 months agodocs: excorcise NIS from nsswitch.conf
Lennart Poettering [Wed, 20 Sep 2023 09:50:20 +0000 (11:50 +0200)] 
docs: excorcise NIS from nsswitch.conf

Let's replace the "compat" module in our proposed nsswitch.conf
configuration with "files", since it is not 1995 anymore.

Fedora and other distros have deprecated and removed NIS support a while
back. While others still retain some support I am not sure we should
advertise it in our examples. Downstream can of course still use
"compat" instead of "files" if they want to, but let's not confuse
people who don't care about NIS anymore with this.

Also, bring the nsswitch.conf snippet in README in line with what our
man pages say.

Also see: https://fedoraproject.org/wiki/Changes/retire_NIS_user_space_utils

9 months agoscsi_serial: convert from nanosleep() to usleep_safe() 29239/head
Lennart Poettering [Wed, 20 Sep 2023 09:18:59 +0000 (11:18 +0200)] 
scsi_serial: convert from nanosleep() to usleep_safe()

9 months agoMerge pull request #29092 from yuwata/sd-dhcp-server-use-usec
Zbigniew Jędrzejewski-Szmek [Wed, 20 Sep 2023 09:43:26 +0000 (11:43 +0200)] 
Merge pull request #29092 from yuwata/sd-dhcp-server-use-usec

sd-dhcp-server: store lifetime and friends in usec_t

9 months agoMerge pull request #29179 from YHNdnzj/resume-offset-btrfs
Mike Yuan [Wed, 20 Sep 2023 09:40:54 +0000 (17:40 +0800)] 
Merge pull request #29179 from YHNdnzj/resume-offset-btrfs

btrfs-util: introduce btrfs_get_file_physical_offset_fd

9 months agoservice: use empty_to_na() where appropriate
Lennart Poettering [Wed, 20 Sep 2023 07:39:12 +0000 (09:39 +0200)] 
service: use empty_to_na() where appropriate

9 months agoman/kernel-install: document missing $KERNEL_INSTALL_IMAGE_TYPE
Antonio Alvarez Feijoo [Wed, 20 Sep 2023 07:35:37 +0000 (09:35 +0200)] 
man/kernel-install: document missing $KERNEL_INSTALL_IMAGE_TYPE

Available since https://github.com/systemd/systemd/commit/3d5f0bfe

9 months agotime-util: use clock_nanosleep() rather than nanosleep()
Lennart Poettering [Wed, 20 Sep 2023 09:18:02 +0000 (11:18 +0200)] 
time-util: use clock_nanosleep() rather than nanosleep()

nanosleep() is kinda broken since it sleeps in the CLOCK_REALTIME clock,
i.e. is subject to time changes.

Let's use clock_nanosleep() instead with CLOCK_MONOTONIC, which is
really the only thing that makes sense.