]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agoudev-builtin-net_id: align VF representor names with VF names
Ivan Vecera [Thu, 22 Jun 2023 08:06:27 +0000 (10:06 +0200)] 
udev-builtin-net_id: align VF representor names with VF names

Certain cards support to set their eswitch to switchdev mode. In this
mode for each created VF there is also created so called VF representor.
This representor is helper network interface used for configuration of
mentioned eswitch and belongs to an appropriate PF.

VF representors are identified by the specific value of phys_port_name
attribute and the value has format "pfMvfN" where M is PF function
number and N is VF number inside this PF.

As the VF representor interfaces belong to PF PCI device the naming
scheme used for them is the same like for other PCI devices. In this
case name of PF interface is used and phys_port_name suffix is appended.

E.g.
 PF=enp65s0f0np0 # phys_port_name for PF interface is 'p0'
 VF=enp65s0f0np0v0 # v0 is appended for VF0 in case of NAMING_SR_IOV_V
REP=enp65s0f0np0pf0vf0 # phys_port_name for VF0 representor is 'pf0vf0'

First as the phys_port_name for representors is long (6+ chars) then the
generated name does not fit into IFNAMSIZ so this name is used only as
alternate interface name and for the primary one is used generic one
like eth<N>. Second 'f0' and 'pf0' in REP name is redundant.

This patch fixes this issue by introducing another naming scheme for VF
representors and appending 'rN' suffix to PF interface name for them.
N is VF number so the name used for representor interface is similar to
VF interface and differs only by the suffix.

For the example above we get:
 PF=enp65s0f0np0
 VF=enp65s0f0np0v0
REP=enp65s0f0np0r0

This eases for userspace to determine which representor interface
represents particular VF.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
10 months agoMerge pull request #28138 from pkern/oci-dhcpv6
Luca Boccassi [Thu, 29 Jun 2023 21:17:02 +0000 (22:17 +0100)] 
Merge pull request #28138 from pkern/oci-dhcpv6

sd-dhcp6-lease: Ignore invalid bytes at the end of the packet

10 months agoMerge pull request #28191 from yuwata/network-ipv6-privacy-extensions
Luca Boccassi [Thu, 29 Jun 2023 21:16:10 +0000 (22:16 +0100)] 
Merge pull request #28191 from yuwata/network-ipv6-privacy-extensions

network: introduce global setting for IPv6 privacy extensions

10 months agomount-util: tweak flags decoding in mount_verbose_full()
Lennart Poettering [Thu, 29 Jun 2023 10:55:43 +0000 (12:55 +0200)] 
mount-util: tweak flags decoding in mount_verbose_full()

Fine-tune the decoding of mount options in mount_verbose_full() to
provide more helpful log output:

1. decode changing of propagation changes
2. discern changing of superblock flags/mount option string from mount
   flags
3. don't check secondary fields when deciding which mount op is
   executed, only the flags decide that.

10 months agoman: add brief smbios-type-11 man page
Lennart Poettering [Thu, 29 Jun 2023 13:57:26 +0000 (15:57 +0200)] 
man: add brief smbios-type-11 man page

10 months agoman: document vmm.notify_socket credential in systemd(1) man page
Lennart Poettering [Wed, 28 Jun 2023 16:20:01 +0000 (18:20 +0200)] 
man: document vmm.notify_socket credential in systemd(1) man page

Let's move the long explanation to the man page of the component that
interprets the credential, and keep only a brief summary in
systemd.system-credentials(7).

10 months agotest: add test for trailing invalid byte at the end 28138/head
Yu Watanabe [Thu, 29 Jun 2023 16:14:00 +0000 (01:14 +0900)] 
test: add test for trailing invalid byte at the end

10 months agosd-dhcp6-lease: ignore invalid byte(s) at the end of the packet
Philipp Kern [Fri, 23 Jun 2023 08:39:52 +0000 (10:39 +0200)] 
sd-dhcp6-lease: ignore invalid byte(s) at the end of the packet

Oracle Cloud sends malformed DHCPv6 replies that have an invalid
byte at the end, which cannot be parsed as an option code.

networkd currently can cope with the invalid option (it is ignored),
but the whole packet is ignored altogether because of the additional
null at the end.

It's better to be liberal in what we accept and actually assign an
address, given that the reply contains a valid IA_NA.

Fixes #28183.

10 months agotest-network: add test for global IPv6PrivacyExtensions= setting 28191/head
Yu Watanabe [Thu, 29 Jun 2023 12:58:23 +0000 (21:58 +0900)] 
test-network: add test for global IPv6PrivacyExtensions= setting

10 months agonetwork: add global setting for IPv6PrivacyExtensions=
Yu Watanabe [Thu, 29 Jun 2023 10:09:53 +0000 (19:09 +0900)] 
network: add global setting for IPv6PrivacyExtensions=

Closes #28186.

10 months agonetwork: introduce IPV6_PRIVACY_EXTENSIONS_KERNEL enum value
Yu Watanabe [Thu, 29 Jun 2023 09:51:58 +0000 (18:51 +0900)] 
network: introduce IPV6_PRIVACY_EXTENSIONS_KERNEL enum value

No functional change. Preparation for using the _INVALID value in later
commit.

10 months agoNEWS: various fixes
Joerg Behrmann [Thu, 29 Jun 2023 12:07:54 +0000 (14:07 +0200)] 
NEWS: various fixes

10 months agomkosi: Enable Incremental= mode by default
Daan De Meyer [Thu, 29 Jun 2023 11:35:03 +0000 (13:35 +0200)] 
mkosi: Enable Incremental= mode by default

Since mkosi is now smart enough to drop the caches when the list of
packages changes, let's enable Incremental= mode by default to ensure
a good experience for anyone new to hacking on systemd with mkosi.

10 months agotest: use correct path for systemd-battery-check
Frantisek Sumsal [Thu, 29 Jun 2023 08:06:48 +0000 (10:06 +0200)] 
test: use correct path for systemd-battery-check

Follow-up to #28185.

10 months agoupdate TODO
Lennart Poettering [Thu, 29 Jun 2023 08:34:27 +0000 (10:34 +0200)] 
update TODO

10 months agonetwork: Add `IgnoreDdontFragment=` option for Fragmentation control (#28131)
Yuxiang Zhu [Thu, 29 Jun 2023 10:11:52 +0000 (18:11 +0800)] 
network: Add `IgnoreDdontFragment=` option for Fragmentation control (#28131)

From `ip-link(8)`:
> [no]ignore-df - enables/disables IPv4 DF
                      suppression on this tunnel.  Normally datagrams
                      that exceed the MTU will be fragmented; the
                      presence of the DF flag inhibits this, resulting
                      instead in an ICMP Unreachable (Fragmentation
                      Required) message.  Enabling this attribute causes
                      the DF flag to be ignored.

If this option is enabled for a GRE/GRETAP tunnel, the `DF` flag in the outer IP header
will not inherit the inner IP header's `DF` flag.

This is useful to transfer packets that exceed the MTU of the underlay
network.

10 months agoman: Extend journalctl color information
Alexander Krabler [Tue, 27 Jun 2023 16:45:33 +0000 (18:45 +0200)] 
man: Extend journalctl color information

Add sentence about colored warning messages in journalctl.

10 months agobattery-check: several follow-ups
Yu Watanabe [Wed, 28 Jun 2023 17:43:17 +0000 (02:43 +0900)] 
battery-check: several follow-ups

Follow-ups for e3d4148d50909119c4e9327e6ad96d3ca7f4661a.

- add reference to initrd-battery-check.service in man page, and move
  its section from 1 to 8,
- add link to man page in help message,
- introduce ERRNO_IS_NO_PLYMOUTH(),
- propagate error in battery_check_send_plymouth_message(),
- rename battery_check_send_plymouth_message() -> plymouth_send_message(),
- return earlier when the first battery level check passed to reduce
  indentation,
- fix potential use of invalid fd on battery restored,
- do not use emoji for /dev/console,
- add simple test (mostly for coverity),

etc, etc...

10 months agomeson: first try dependency(), then fallback to find_library()
Yu Watanabe [Mon, 26 Jun 2023 19:53:13 +0000 (04:53 +0900)] 
meson: first try dependency(), then fallback to find_library()

This also drops the fallback for libacl, libcap, libcrypt, and libgcrypt,
as recent Ubuntu (at least, 20.04 LTS and newer) and Debian (at least, buster
and newer) have relevant .pc files.

Fixes #28161.

10 months agoNEWS: various fixes/additions
Lennart Poettering [Wed, 28 Jun 2023 20:35:12 +0000 (22:35 +0200)] 
NEWS: various fixes/additions

10 months agoMerge pull request #28168 from poettering/xdg-state-home
Lennart Poettering [Wed, 28 Jun 2023 20:30:23 +0000 (22:30 +0200)] 
Merge pull request #28168 from poettering/xdg-state-home

properly support XDG_STATE_HOME

10 months agotmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too 28168/head
Lennart Poettering [Tue, 27 Jun 2023 11:14:17 +0000 (13:14 +0200)] 
tmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too

10 months agoman: properly close XML tags
Lennart Poettering [Tue, 27 Jun 2023 08:32:11 +0000 (10:32 +0200)] 
man: properly close XML tags

10 months agoman: rebreak lines in file-hierarchy(7) a bit
Lennart Poettering [Tue, 27 Jun 2023 08:28:44 +0000 (10:28 +0200)] 
man: rebreak lines in file-hierarchy(7) a bit

(Does not change a single word, just rebreaks a bunch of paragraphs
matching our current line breaking rules)

10 months agoman: mention the newly-added XDG_STATE_HOME
Franklin Yu [Fri, 26 May 2023 05:06:54 +0000 (22:06 -0700)] 
man: mention the newly-added XDG_STATE_HOME

The description is copied from config-home.

Taken from: #27795

10 months agotest: add test for new XDG_STATE_HOME handling
Lennart Poettering [Mon, 26 Jun 2023 21:23:21 +0000 (23:23 +0200)] 
test: add test for new XDG_STATE_HOME handling

10 months agoexecute: don't bother with chowning StateDirectory= and friends in user mode
Lennart Poettering [Tue, 27 Jun 2023 09:19:47 +0000 (11:19 +0200)] 
execute: don't bother with chowning StateDirectory= and friends in user mode

10 months agoexecute: shorten code by making use of laccess() return code properly
Lennart Poettering [Tue, 27 Jun 2023 09:19:31 +0000 (11:19 +0200)] 
execute: shorten code by making use of laccess() return code properly

10 months agoexecute: shorten some code by using RET_NERRNO()
Lennart Poettering [Tue, 27 Jun 2023 09:19:12 +0000 (11:19 +0200)] 
execute: shorten some code by using RET_NERRNO()

10 months agoexecute: associate logs from setup_exec_directory() with the unit name
Lennart Poettering [Tue, 27 Jun 2023 09:16:01 +0000 (11:16 +0200)] 
execute: associate logs from setup_exec_directory() with the unit name

10 months agoexecute: add support for XDG_STATE_HOME for placing service state data in --user...
Lennart Poettering [Mon, 26 Jun 2023 20:42:33 +0000 (22:42 +0200)] 
execute: add support for XDG_STATE_HOME for placing service state data in --user mode

This adds support for the new XDG_STATE_HOME env var that was added to
the xdg basedir spec. Previously, because the basedir spec didn't know
the concept we'd alias the backing dir for StateDirectory= to the one
for ConfigurationDirectory= when runnin in --user mode. With this change
we'll make separate. This brings us various benefits, such as proper
"systemctl clean" support, where we can clear service state separately
from service configuration, now in user mode too.

This does not come without complications: retaining compatibility with
older setups is difficult, because we cannot possibly identitfy which
files in existing populated config dirs are actually "state" and which
one are true" configuration.

Hence let's deal with this pragmatically: if we detect that a service
that has both dirs configured only has the configuration dir existing,
then symlink the state dir to the configuration dir to retain
compatibility.

This is not great, but it's the only somewhat reasonable way out I can
see.

Fixes: #25739
10 months agoexecute: when recursively chowning StateDirectory= when spawning services, follow...
Lennart Poettering [Tue, 27 Jun 2023 09:09:03 +0000 (11:09 +0200)] 
execute: when recursively chowning StateDirectory= when spawning services, follow initial symlink

It should be OK to allow one level of symlink for the various types of
directories like StateDirectory=, LogsDirectory= and such.

10 months agoexecute: remove redundant assignment
Lennart Poettering [Mon, 26 Jun 2023 20:36:31 +0000 (22:36 +0200)] 
execute: remove redundant assignment

10 months agoexecude: include RuntimeScope field in ExecParameters
Lennart Poettering [Mon, 26 Jun 2023 20:34:25 +0000 (22:34 +0200)] 
execude: include RuntimeScope field in ExecParameters

Let's decouple execute.c a bit from the Manager object, let's pass the
runtime scope (i.e. the enum that discern invocation for user or system
context) as part of ExecParameters. This makes the scope available in
various functions without having to pass the Manager object in.

10 months agopath tool: add some basic ansi highlighing
Lennart Poettering [Mon, 26 Jun 2023 16:55:52 +0000 (18:55 +0200)] 
path tool: add some basic ansi highlighing

10 months agosd-path: bring spacing in sd-path.h and systemd-path tool in sync
Lennart Poettering [Mon, 26 Jun 2023 16:55:39 +0000 (18:55 +0200)] 
sd-path: bring spacing in sd-path.h and systemd-path tool in sync

10 months agosd-path: add support for XDG_STATE_HOME
Lennart Poettering [Mon, 26 Jun 2023 16:55:14 +0000 (18:55 +0200)] 
sd-path: add support for XDG_STATE_HOME

10 months agoMerge pull request #28178 from mrc0mmand/nss-tests
Luca Boccassi [Wed, 28 Jun 2023 18:41:11 +0000 (19:41 +0100)] 
Merge pull request #28178 from mrc0mmand/nss-tests

test: add a couple of tests for nss-myhostname & nss-mymachines

10 months agoMerge pull request #28164 from poettering/replace-env-var-fixes
Luca Boccassi [Wed, 28 Jun 2023 18:40:51 +0000 (19:40 +0100)] 
Merge pull request #28164 from poettering/replace-env-var-fixes

pid1: warn about unset+invalid env var names when resolving ExecStart= expressions and similar

10 months agoupdate TODO
Lennart Poettering [Wed, 28 Jun 2023 15:39:27 +0000 (17:39 +0200)] 
update TODO

10 months agoMerge pull request #28146 from keszybz/ansi-seq-skip
Lennart Poettering [Wed, 28 Jun 2023 17:18:27 +0000 (19:18 +0200)] 
Merge pull request #28146 from keszybz/ansi-seq-skip

Pass ANSI sequences through when ellipsizing output

10 months agoMerge pull request #27830 from 1awesomeJ/initrd
Lennart Poettering [Wed, 28 Jun 2023 17:18:03 +0000 (19:18 +0200)] 
Merge pull request #27830 from 1awesomeJ/initrd

PID1: Detect battery level in initrd and if low refuse continuing to …

10 months agotest: enable LSan for certain wrapped binaries 28178/head
Frantisek Sumsal [Wed, 28 Jun 2023 07:53:13 +0000 (09:53 +0200)] 
test: enable LSan for certain wrapped binaries

So we're able to detect memory leaks in our NSS modules.

An example after introducing a memory leak in nss-myhostname.c:

testsuite-71.sh[2881]: =================================================================
testsuite-71.sh[2881]: ==2880==ERROR: LeakSanitizer: detected memory leaks
testsuite-71.sh[2881]: Direct leak of 2 byte(s) in 1 object(s) allocated from:
testsuite-71.sh[2881]:     #0 0x7fa28907243b in strdup (/usr/lib64/libasan.so.8.0.0+0x7243b)
testsuite-71.sh[2881]:     #1 0x7fa286a7bc10 in gethostname_full ../src/basic/hostname-util.c:67
testsuite-71.sh[2881]:     #2 0x7fa286a74af9 in gethostname_malloc ../src/basic/hostname-util.h:24
testsuite-71.sh[2881]:     #3 0x7fa286a756f4 in _nss_myhostname_gethostbyname4_r ../src/nss-myhostname/nss-myhostname.c:79
testsuite-71.sh[2881]:     #4 0x7fa288f17588 in getaddrinfo (/lib64/libc.so.6+0xf4588)
testsuite-71.sh[2881]:     #5 0x7fa2890a4d93 in __interceptor_getaddrinfo.part.0 (/usr/lib64/libasan.so.8.0.0+0xa4d93)
testsuite-71.sh[2881]:     #6 0x55a54b2b7159 in ahosts_keys_int.part.0 (/usr/bin/getent.orig+0x4159)
testsuite-71.sh[2881]: SUMMARY: AddressSanitizer: 2 byte(s) leaked in 1 allocation(s).

10 months agotest: add a couple of tests for nss-mymachines
Frantisek Sumsal [Tue, 27 Jun 2023 20:34:59 +0000 (22:34 +0200)] 
test: add a couple of tests for nss-mymachines

10 months agoupdate NEWS
Lennart Poettering [Fri, 23 Jun 2023 19:48:05 +0000 (21:48 +0200)] 
update NEWS

10 months agoNEWS: add pcrs verb
Lennart Poettering [Wed, 28 Jun 2023 14:53:30 +0000 (16:53 +0200)] 
NEWS: add pcrs verb

10 months agoanalyze: add new "pcrs" verb
Lennart Poettering [Tue, 27 Jun 2023 16:45:34 +0000 (18:45 +0200)] 
analyze: add new "pcrs" verb

It shows the PCRs we know about along with their name strings and
current values.

10 months agopwquality: remove old built-in cracklib dictionary workaround
Dmitry V. Levin [Tue, 27 Jun 2023 21:00:00 +0000 (21:00 +0000)] 
pwquality: remove old built-in cracklib dictionary workaround

The first version of libpwquality with the required change was 1.4.1
released in 2019.

10 months agoNEWS: typos
Luca Boccassi [Wed, 28 Jun 2023 13:51:35 +0000 (14:51 +0100)] 
NEWS: typos

10 months agoPID1: detect battery level in initrd and if low refuse continuing to boot, print... 27830/head
OMOJOLA JOSHUA [Wed, 28 Jun 2023 13:04:42 +0000 (14:04 +0100)] 
PID1: detect battery level in initrd and if low refuse continuing to boot, print message and shut down.

10 months agoNEWS: mention that sd_event_trim_memory can be overridden
Luca Boccassi [Wed, 28 Jun 2023 13:43:54 +0000 (14:43 +0100)] 
NEWS: mention that sd_event_trim_memory can be overridden

10 months agoNEWS: mention addon<efi>.efi.stub
Luca Boccassi [Wed, 28 Jun 2023 13:42:18 +0000 (14:42 +0100)] 
NEWS: mention addon<efi>.efi.stub

10 months agoNEWS: do not make specific promises about future development, keep it vague
Luca Boccassi [Wed, 28 Jun 2023 13:34:12 +0000 (14:34 +0100)] 
NEWS: do not make specific promises about future development, keep it vague

10 months agoNEWS: move PrivateUsers= change at the top, as it changes behaviour
Luca Boccassi [Wed, 28 Jun 2023 13:33:48 +0000 (14:33 +0100)] 
NEWS: move PrivateUsers= change at the top, as it changes behaviour

10 months agoNEWS: more updates for future v254
Lennart Poettering [Tue, 27 Jun 2023 16:44:57 +0000 (18:44 +0200)] 
NEWS: more updates for future v254

10 months agoRemove battery level check at early boot from TODO
OMOJOLA JOSHUA [Wed, 28 Jun 2023 12:32:38 +0000 (13:32 +0100)] 
Remove battery level check at early boot from TODO

10 months agosysv-generator: deprecate even more
Lennart Poettering [Wed, 28 Jun 2023 07:50:16 +0000 (09:50 +0200)] 
sysv-generator: deprecate even more

Let's add a comment about the deprecation to the docs, and as comment to
the sources.

Follow-up for: #28179

10 months agotest: add a couple of tests for nss-myhostname
Frantisek Sumsal [Tue, 27 Jun 2023 14:15:24 +0000 (16:15 +0200)] 
test: add a couple of tests for nss-myhostname

10 months agomute the memory recursiveprot log if version of kernel is low.
cunshunxia [Mon, 26 Jun 2023 04:14:40 +0000 (04:14 +0000)] 
mute the memory recursiveprot log if version of kernel is low.

10 months agoMerge pull request #28179 from poettering/sysvgendeprecated
Lennart Poettering [Wed, 28 Jun 2023 07:37:42 +0000 (09:37 +0200)] 
Merge pull request #28179 from poettering/sysvgendeprecated

make systemd-sysv-generator even more deprecated

10 months agomeson: drop doubled empty line
Yu Watanabe [Fri, 23 Jun 2023 02:16:47 +0000 (11:16 +0900)] 
meson: drop doubled empty line

10 months agostring-util: pass ANSI sequences through unchanged 28146/head
Zbigniew Jędrzejewski-Szmek [Sat, 24 Jun 2023 00:40:14 +0000 (18:40 -0600)] 
string-util: pass ANSI sequences through unchanged

Cutting off in the middle may leave the terminal in a bad state, breaking
further output. But we don't know what a given ANSI sequence does, e.g.
ANSI_NORMAL should not be skipped. But it is also nice to keep various
sequences intact, so that if we had part of the string in blue, and we cut out
the beginning of the blue part, we still want to keep the remainder in color.
So let's just pass them through, stripping out the characters that take up
actual space.

Also, use memcpy_safe as we may end up copying zero bytes when ellipsizing at
the start/end of a string.

Fixes: #24502
This also fixes an ugliness where we would ellipsize string with ANSI
sequences too much, leading to output that was narrower on screen than the
requested length:

  Starting AAAAAAAAAAAAAAAAAAAAA.service
  Starting BBBBBBBBBBBBBBBBBBBBB.service
  Starting LONG…ER.service

Co-authored-by: Jan Janssen <medhefgo@web.de>
10 months agoNEWS: add comment about SysV script deprecation 28179/head
Lennart Poettering [Tue, 27 Jun 2023 21:19:17 +0000 (23:19 +0200)] 
NEWS: add comment about SysV script deprecation

10 months agosysv-generator: make sysv deprecation message a bit "louder"
Lennart Poettering [Tue, 27 Jun 2023 16:46:28 +0000 (18:46 +0200)] 
sysv-generator: make sysv deprecation message a bit "louder"

Let's add a catalog entry, make the log record structured, and most
importantly, let's add warning emojis.

Just to underline that this stuff should really go away.

10 months agojournalctl: read env vars that override compiled catalog database and source files
Lennart Poettering [Tue, 27 Jun 2023 21:15:27 +0000 (23:15 +0200)] 
journalctl: read env vars that override compiled catalog database and source files

This makes it a bit easier to test catalog files without installing
systemd.

10 months agocatalog,po: update Polish translation
Piotr Drąg [Sun, 28 May 2023 11:35:31 +0000 (13:35 +0200)] 
catalog,po: update Polish translation

10 months agotpm2: make PcrIndex an anonymous enum
Lennart Poettering [Tue, 27 Jun 2023 16:46:07 +0000 (18:46 +0200)] 
tpm2: make PcrIndex an anonymous enum

It just gives names for things generally just handled as numeric
indexes, hence drop the type name, and make the enum anonymous. Nothing
is using the type name anyway.

10 months agohwdb: fix volume control keys on Lenovo IdeaPad Flex 5 (14ARE05)
Hoe Hao Cheng [Tue, 27 Jun 2023 13:29:57 +0000 (21:29 +0800)] 
hwdb: fix volume control keys on Lenovo IdeaPad Flex 5 (14ARE05)

10 months agorepart: Fix HAVE_LIBCRYPTSETUP check
Daan De Meyer [Tue, 27 Jun 2023 11:54:22 +0000 (13:54 +0200)] 
repart: Fix HAVE_LIBCRYPTSETUP check

Fixes #28169

10 months agoenv-file: when resolving env vars in command lines, collect list of unset/invalid... 28164/head
Lennart Poettering [Mon, 26 Jun 2023 15:20:49 +0000 (17:20 +0200)] 
env-file: when resolving env vars in command lines, collect list of unset/invalid ones

When resolving environment variables we currently silently resolve unset
and invalid environment variables to empty strings. Let's do this
slightly less silently: log about unset and invalid env vars, but still
resolve them to an empty string.

Fixes: #27036
10 months agoenv-util: make strv_env_get() a static inline wrapper around strv_env_get_n()
Lennart Poettering [Mon, 26 Jun 2023 14:15:44 +0000 (16:15 +0200)] 
env-util: make strv_env_get() a static inline wrapper around strv_env_get_n()

Let's make length = SIZE_MAX also mean "call strlen()".

10 months agoenv-util: introduce proper flags type ReplaceEnvFlags for replace_env()
Lennart Poettering [Mon, 26 Jun 2023 15:10:28 +0000 (17:10 +0200)] 
env-util: introduce proper flags type ReplaceEnvFlags for replace_env()

10 months agoenv-util: add explicit size check before strndupa() in strv_env_get_n()
Lennart Poettering [Mon, 26 Jun 2023 14:14:27 +0000 (16:14 +0200)] 
env-util: add explicit size check before strndupa() in strv_env_get_n()

Let's better be safe than sorry.

10 months agoenv-util: modernize env_name_is_valid_n() a bit
Lennart Poettering [Mon, 26 Jun 2023 14:13:27 +0000 (16:13 +0200)] 
env-util: modernize env_name_is_valid_n() a bit

If the size is specified as SIZE_MAX, then imply strlen().

10 months agostring-util: add strextendn() helper
Lennart Poettering [Mon, 26 Jun 2023 15:15:28 +0000 (17:15 +0200)] 
string-util: add strextendn() helper

10 months agoNEWS: copy deprecation notices for cgroup v1 and unmerged-usr/split-usr
Luca Boccassi [Tue, 27 Jun 2023 11:38:27 +0000 (12:38 +0100)] 
NEWS: copy deprecation notices for cgroup v1 and unmerged-usr/split-usr

10 months agoNEWS: fix typos
Luca Boccassi [Tue, 27 Jun 2023 11:30:57 +0000 (12:30 +0100)] 
NEWS: fix typos

10 months agostart updating NEWS for 254
Lennart Poettering [Tue, 27 Jun 2023 11:13:27 +0000 (13:13 +0200)] 
start updating NEWS for 254

10 months agoreplace basename() with path_extract_filename() in resolved-resolv-conf.c (#28114)
Steven Luo [Tue, 27 Jun 2023 08:11:38 +0000 (04:11 -0400)] 
replace basename() with path_extract_filename() in resolved-resolv-conf.c (#28114)

10 months agoMerge pull request #28064 from bluca/test_oomd_swap
Luca Boccassi [Mon, 26 Jun 2023 18:39:07 +0000 (19:39 +0100)] 
Merge pull request #28064 from bluca/test_oomd_swap

TEST-55-OOMD: use 'stress' to create high pressure, ensure swap is set up correctly on Ubuntu CI

10 months agoMerge pull request #28159 from poettering/bpf-foreign-warnings
Lennart Poettering [Mon, 26 Jun 2023 16:02:47 +0000 (18:02 +0200)] 
Merge pull request #28159 from poettering/bpf-foreign-warnings

bpf-foreign: tweaks

10 months agomount-util: use inode_type_to_string() in mode_to_inaccessible_inode()
Lennart Poettering [Mon, 26 Jun 2023 10:52:22 +0000 (12:52 +0200)] 
mount-util: use inode_type_to_string() in mode_to_inaccessible_inode()

Let's reuse the inode type name table here and shorten/simplify the code
a bit.

10 months agofirstboot: fix typo
Antonio Alvarez Feijoo [Mon, 26 Jun 2023 14:01:13 +0000 (16:01 +0200)] 
firstboot: fix typo

10 months agosleep: refuse hibernation if there's no possible way to resume
Mike Yuan [Fri, 23 Jun 2023 21:49:21 +0000 (05:49 +0800)] 
sleep: refuse hibernation if there's no possible way to resume

Follow-up for 90efe8a6d4c0035c6a01d42805be87d99fb12f9a
Closes #19819

10 months agotest: fix test service unit description
Frantisek Sumsal [Mon, 26 Jun 2023 13:54:01 +0000 (15:54 +0200)] 
test: fix test service unit description

10 months agomkosi: Update to latest
Daan De Meyer [Mon, 26 Jun 2023 12:08:49 +0000 (14:08 +0200)] 
mkosi: Update to latest

mkosi now prebuilds the hwdb during image build which should hopefully
get rid of the CentOS 8 failures we're seeing in CI.

10 months agoman: rework BPFForeign= documentation a bit 28159/head
Lennart Poettering [Mon, 26 Jun 2023 11:16:11 +0000 (13:16 +0200)] 
man: rework BPFForeign= documentation a bit

Various assorted changes, among them make clear that a missing BPF
program is not reason to abort unit activation.

10 months agobpf-foreign: add an explicit, explanatory message when reference BPF program is not...
Lennart Poettering [Mon, 26 Jun 2023 11:05:56 +0000 (13:05 +0200)] 
bpf-foreign: add an explicit, explanatory message when reference BPF program is not loaded yet

10 months agobpf-foreign: if one program fails, still load the next
Lennart Poettering [Mon, 26 Jun 2023 11:04:59 +0000 (13:04 +0200)] 
bpf-foreign: if one program fails, still load the next

Let's make sure that if we load one program we don't prematurely fail,
and continue with the others still.

10 months agobpf-foreign: remove duplicate various occasions of duplicate logging
Lennart Poettering [Mon, 26 Jun 2023 11:03:39 +0000 (13:03 +0200)] 
bpf-foreign: remove duplicate various occasions of duplicate logging

10 months agotest: skip if ldd command not found
Yu Watanabe [Sun, 25 Jun 2023 05:53:02 +0000 (14:53 +0900)] 
test: skip if ldd command not found

Prompted by #28015.

10 months agoMerge pull request #28117 from yuwata/copy-follow-ups
Daan De Meyer [Sun, 25 Jun 2023 11:35:15 +0000 (12:35 +0100)] 
Merge pull request #28117 from yuwata/copy-follow-ups

copy: several follow ups

10 months agoMerge pull request #28149 from mrc0mmand/test-machinectl-bump-container-size
Luca Boccassi [Sun, 25 Jun 2023 11:01:30 +0000 (12:01 +0100)] 
Merge pull request #28149 from mrc0mmand/test-machinectl-bump-container-size

test: bump the test container size to 64 MiB

10 months agopo: Translated using Weblate (Korean)
김인수 [Sun, 25 Jun 2023 07:20:56 +0000 (09:20 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (193 of 193 strings)

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

10 months agoMerge pull request #28147 from mrc0mmand/drop-workarounds
Yu Watanabe [Sun, 25 Jun 2023 05:13:45 +0000 (14:13 +0900)] 
Merge pull request #28147 from mrc0mmand/drop-workarounds

test: drop a couple of workarounds for recently fixed issues

10 months agotest: bump the test container size to 64 MiB 28149/head
Frantisek Sumsal [Sat, 24 Jun 2023 18:25:04 +0000 (20:25 +0200)] 
test: bump the test container size to 64 MiB

As 32 MiB appears to be on the edge of barely enough on C8S:

[  149.974689] testsuite-13.sh[601]: + dd if=/dev/zero of=/tmp/container.raw bs=1M count=32
[  150.388423] testsuite-13.sh[1096]: 32+0 records in
[  150.390721] testsuite-13.sh[1096]: 32+0 records out
[  150.392450] testsuite-13.sh[1096]: 33554432 bytes (34 MB, 32 MiB) copied, 0.354336 s, 94.7 MB/s
[  150.396422] testsuite-13.sh[601]: + mkfs.ext4 /tmp/container.raw
[  150.472209] testsuite-13.sh[1097]: mke2fs 1.45.6 (20-Mar-2020)
[  150.561303] testsuite-13.sh[1097]: Discarding device blocks: done
[  150.565438] testsuite-13.sh[1097]: Creating filesystem with 32768 1k blocks and 8192 inodes
[  150.568301] testsuite-13.sh[1097]: Filesystem UUID: d8e3c43b-0f1f-4e89-8c26-100e4a32b64f
[  150.569777] testsuite-13.sh[1097]: Superblock backups stored on blocks:
[  150.571135] testsuite-13.sh[1097]:   8193, 24577
[  150.572751] testsuite-13.sh[1097]: Allocating group tables: done
[  150.574294] testsuite-13.sh[1097]: Writing inode tables: done
[  150.598696] testsuite-13.sh[1097]: Creating journal (4096 blocks): done
[  150.604285] testsuite-13.sh[1097]: Writing superblocks and filesystem accounting information: done
[  150.612309] testsuite-13.sh[601]: + mount -o loop /tmp/container.raw /tmp/mnt
[  150.879736] testsuite-13.sh[601]: + cp -r /var/lib/machines/container1/bin ... /tmp/mnt
[  152.347545] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/log': No space left on device
[  152.351739] testsuite-13.sh[1104]: cp: cannot create directory '/tmp/mnt/var/tmp': No space left on device

10 months agotest: show the subtest name together with the failing code
Frantisek Sumsal [Sat, 24 Jun 2023 18:43:26 +0000 (20:43 +0200)] 
test: show the subtest name together with the failing code

To make debugging slightly easier.

10 months agotest: don't assume yum is a script
François Rigault [Sat, 24 Jun 2023 08:44:54 +0000 (10:44 +0200)] 
test: don't assume yum is a script

on Rawhide at the moment yum is a symlink to dnf5 which is a binary.

10 months agoTEST-55-OOMD: use swap file instead of partition 28064/head
Luca Boccassi [Fri, 23 Jun 2023 22:19:31 +0000 (23:19 +0100)] 
TEST-55-OOMD: use swap file instead of partition

The partition seems not to work on Ubuntu for some reason, use a
swap file instead

10 months agoTEST-55-OOMD: use 'stress' to create high pressure
Luca Boccassi [Fri, 16 Jun 2023 23:07:32 +0000 (00:07 +0100)] 
TEST-55-OOMD: use 'stress' to create high pressure

The test fails on my machine, running Debian stable, because
testsuite-55-testbloat.service just swaps and never goes over the
limit, so it's not killed. Use 'stress' instead which seems to be
able to overwhelm the swap too.