]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agoudev/net: read hardware address from netlink message 21277/head
Yu Watanabe [Thu, 4 Nov 2021 17:29:34 +0000 (02:29 +0900)] 
udev/net: read hardware address from netlink message

4 years agonetworkctl: read permanent hardware address from netlink message
Yu Watanabe [Thu, 4 Nov 2021 17:31:36 +0000 (02:31 +0900)] 
networkctl: read permanent hardware address from netlink message

4 years agonetwork: also logs iftype, kind, and permanent hardware address
Yu Watanabe [Sun, 7 Nov 2021 03:18:08 +0000 (12:18 +0900)] 
network: also logs iftype, kind, and permanent hardware address

4 years agonetwork: read permanent hardware address from netlink message
Yu Watanabe [Thu, 4 Nov 2021 17:18:01 +0000 (02:18 +0900)] 
network: read permanent hardware address from netlink message

The attribute was introduced by f74877a5457d34d604dba6dbbb13c4c05bac8b93 (v5.6),
so, fallback to ethtool if failed.

4 years agoethtool-util: introduce ethtool_get_permanent_hw_addr()
Yu Watanabe [Thu, 4 Nov 2021 17:13:37 +0000 (02:13 +0900)] 
ethtool-util: introduce ethtool_get_permanent_hw_addr()

And replaces all ethtool_get_permanent_macaddr() with it.

4 years agonetworkctl: introduce dump_hw_address()
Yu Watanabe [Fri, 12 Nov 2021 23:45:28 +0000 (08:45 +0900)] 
networkctl: introduce dump_hw_address()

4 years agoMerge pull request #21329 from poettering/homed-compress-default
Lennart Poettering [Fri, 12 Nov 2021 21:55:14 +0000 (22:55 +0100)] 
Merge pull request #21329 from poettering/homed-compress-default

homed: default to btrfs compression

4 years agoman: run ninja -C build update-man-rules
Lennart Poettering [Fri, 12 Nov 2021 21:21:22 +0000 (22:21 +0100)] 
man: run ninja -C build update-man-rules

4 years agohomework: add a const where appropriate
Lennart Poettering [Thu, 4 Nov 2021 21:13:55 +0000 (22:13 +0100)] 
homework: add a const where appropriate

4 years agokeyring-util: add new keyring-util.h helpers
Lennart Poettering [Tue, 2 Nov 2021 17:20:12 +0000 (18:20 +0100)] 
keyring-util: add new keyring-util.h helpers

This adds to new helpers: keyring_read() for reading a key data from a
keyring entry, and TAKE_KEY_SERIAL which is what TAKE_FD is for fds, but
for key_serial_t.

The former is immediately used by ask-password-api.c

4 years agoMerge pull request #21294 from keszybz/binfmt-misc
Lennart Poettering [Fri, 12 Nov 2021 21:14:12 +0000 (22:14 +0100)] 
Merge pull request #21294 from keszybz/binfmt-misc

Improve systemd-binfmt logging, fix exit value

4 years agohomework: turn off compression for files backing LUKS volumes
Lennart Poettering [Thu, 4 Nov 2021 20:58:22 +0000 (21:58 +0100)] 
homework: turn off compression for files backing LUKS volumes

We need random access read/write files, and compression sucks for that,
hence disable it on the underlying files.

Compression in the home directory might be desirable, but if so it
should be done *inside* the home dir fs, not on the underlying fs.

4 years agotree-wide: don't ignore return code from sd_event_source_set_enabled()
Luca Boccassi [Wed, 10 Nov 2021 23:18:06 +0000 (23:18 +0000)] 
tree-wide: don't ignore return code from sd_event_source_set_enabled()

CID#1465793
CID#1465794
CID#1465795

4 years agoMerge pull request #21320 from poettering/namespace-mkdir-umask
Lennart Poettering [Fri, 12 Nov 2021 21:12:58 +0000 (22:12 +0100)] 
Merge pull request #21320 from poettering/namespace-mkdir-umask

make pid1 namespace code independent of umask

4 years agoMerge pull request #21316 from evverx/pin-labeler
Frantisek Sumsal [Fri, 12 Nov 2021 20:51:26 +0000 (20:51 +0000)] 
Merge pull request #21316 from evverx/pin-labeler

ci: pin labeler

4 years agodocs: document new mount option env var 21329/head
Lennart Poettering [Fri, 12 Nov 2021 16:36:53 +0000 (17:36 +0100)] 
docs: document new mount option env var

4 years agohomed: add env var for overriding default mount options
Lennart Poettering [Fri, 5 Nov 2021 14:26:29 +0000 (15:26 +0100)] 
homed: add env var for overriding default mount options

This adds an esay way to override the default mount options to use for
LUKS home dirs via the env vars SYSTEMD_HOME_MOUNT_OPTIONS_EXT4,
SYSTEMD_HOME_MOUNT_OPTIONS_BTRFS, SYSTEMD_HOME_MOUNT_OPTIONS_XFS.

See: #15120

4 years agohomework: default to btrfs compression
Lennart Poettering [Fri, 5 Nov 2021 14:24:58 +0000 (15:24 +0100)] 
homework: default to btrfs compression

This follows what Fedora did with 34: enables compression by default,
lowering IO bandwidth and reducing disk space use, at the price of
slightly higher CPU use.

https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression

4 years agobinfmt: add logging information 21294/head
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 14:44:06 +0000 (15:44 +0100)] 
binfmt: add logging information

In delete_rule(), we already checked that the rule name is a valid file name
(i.e. no slashes), so we can just trivially append.

Also, let's always reject rules that we would later fail to delete. It's
probably better to avoid such confusion.

And print the operations we do with file name and line number. I hope this
helps with cases like https://github.com/systemd/systemd/pull/21178. At least
we'll know what rule failed.

$ sudo SYSTEMD_LOG_LEVEL=debug build/systemd-binfmt
Flushed all binfmt_misc rules.
Applying /etc/binfmt.d/kshcomp.conf…
/etc/binfmt.d/kshcomp.conf:1: binary format 'kshcomp' registered.

4 years agoexecute: always log a warning when setting SELinux context fails
Topi Miettinen [Thu, 11 Nov 2021 22:33:01 +0000 (00:33 +0200)] 
execute: always log a warning when setting SELinux context fails

Update also manual page to explain how the transition can still fail.

4 years agoMerge pull request #21321 from yuwata/ether-addr-fix-local
Zbigniew Jędrzejewski-Szmek [Fri, 12 Nov 2021 16:12:46 +0000 (17:12 +0100)] 
Merge pull request #21321 from yuwata/ether-addr-fix-local

ether-addr-util: fix ether_addr_is_local()

4 years agoci: run codeql-analysis daily
Evgeny Vereshchagin [Wed, 10 Nov 2021 23:02:05 +0000 (23:02 +0000)] 
ci: run codeql-analysis daily

https://github.com/github/codeql-action

Apparently to judge from a couple of warnings I haven't seen
before it's a bit different from LGTM.

4 years agoChange gendered terms to be gender-neutral (#21325)
Emily Gonyer [Fri, 12 Nov 2021 15:09:56 +0000 (10:09 -0500)] 
Change gendered terms to be gender-neutral (#21325)

Some typos are also fixed.

4 years agotests: add test case for UMask=+BindPaths= combination 21320/head
Lennart Poettering [Fri, 12 Nov 2021 12:41:59 +0000 (13:41 +0100)] 
tests: add test case for UMask=+BindPaths= combination

Inspired by the test case described in #19899

4 years agonamespace: make tmp dir handling code independent of umask too
Lennart Poettering [Fri, 12 Nov 2021 10:16:02 +0000 (11:16 +0100)] 
namespace: make tmp dir handling code independent of umask too

Let's make all code in namespace.c robust towards weird umask. This
doesn't matter too much given that the parent dirs we deal here almost
certainly exist anyway, but let's clean this up anyway and make it fully
clean.

4 years agonamespace: make whole namespace_setup() work regardless of configured umask
Lennart Poettering [Fri, 12 Nov 2021 10:11:27 +0000 (11:11 +0100)] 
namespace: make whole namespace_setup() work regardless of configured umask

Let's reset the umask during the whole namespace_setup() logic, so that
all our mkdir() + mknod() are not subjected to whatever umask might
currently be set.

This mostly moves the umask save/restore logic out of
mount_private_dev() and into the stack frame of namespace_setup() that
is further out.

Fixes #19899

4 years agonamespace: rebreak a few comments
Lennart Poettering [Fri, 12 Nov 2021 10:09:40 +0000 (11:09 +0100)] 
namespace: rebreak a few comments

4 years agoumask-util: add helper that resets umask until end of current code block
Lennart Poettering [Fri, 12 Nov 2021 10:06:46 +0000 (11:06 +0100)] 
umask-util: add helper that resets umask until end of current code block

4 years agopid1: add a manager_trigger_run_queue() helper
Lennart Poettering [Fri, 12 Nov 2021 08:43:07 +0000 (09:43 +0100)] 
pid1: add a manager_trigger_run_queue() helper

We have two different places where we re-trigger the run queue now.
let's unify it under a common function, that is part of the Manager
code.

Follow-up for #20953

4 years agotest: add tests for MAC address helper functions 21321/head
Yu Watanabe [Fri, 12 Nov 2021 10:56:14 +0000 (19:56 +0900)] 
test: add tests for MAC address helper functions

4 years agoether-addr-util: fix ether_addr_is_local() and add one more helper
Yu Watanabe [Fri, 12 Nov 2021 10:55:43 +0000 (19:55 +0900)] 
ether-addr-util: fix ether_addr_is_local() and add one more helper

Follow-up for 1f86a3fe52c71af7f46381bf45c2efe580a19dcc.

4 years agoMerge pull request #20953 from msekletar/mount-ratelimit-followup-20329
Lennart Poettering [Fri, 12 Nov 2021 08:23:47 +0000 (09:23 +0100)] 
Merge pull request #20953 from msekletar/mount-ratelimit-followup-20329

Delay running mount start jobs when we /p/s/mountinfo event source is rate limited

4 years agotest: add regression test for systemd-run --scope [--user]
Jonas Witschel [Thu, 11 Nov 2021 21:25:40 +0000 (22:25 +0100)] 
test: add regression test for systemd-run --scope [--user]

systemd-run --scope --user failed to run in system 249.6, cf. #21297. Add tests
for systemd-run --scope and systemd-run --scope --user to make sure this does
not regress again.

4 years agomacro-fundamental: fix bool → sd_bool
Lennart Poettering [Thu, 11 Nov 2021 21:02:56 +0000 (22:02 +0100)] 
macro-fundamental: fix bool → sd_bool

4 years agoMerge pull request #21285 from poettering/boot-os-rel-fix
Luca Boccassi [Thu, 11 Nov 2021 20:23:17 +0000 (20:23 +0000)] 
Merge pull request #21285 from poettering/boot-os-rel-fix

sd-boot/bootspec: os-release parsing fixes

4 years agoMerge pull request #21241 from wat-ze-hex/2021-11-04-fix-bpf-foreign-realization
Luca Boccassi [Thu, 11 Nov 2021 18:49:50 +0000 (18:49 +0000)] 
Merge pull request #21241 from wat-ze-hex/2021-11-04-fix-bpf-foreign-realization

core, bpf: fix bpf-foreign cgroup controller realization

4 years agoupdate TODO
Lennart Poettering [Wed, 10 Nov 2021 14:59:58 +0000 (15:59 +0100)] 
update TODO

4 years agotypes-fundamental: introduce sd_true + sd_false 21285/head
Lennart Poettering [Thu, 11 Nov 2021 14:31:17 +0000 (15:31 +0100)] 
types-fundamental: introduce sd_true + sd_false

I think we should stick to the rule that stuff defined in
types-fundamental.h either:

1. adds a prefixed concept "sd_xyz" that maps differently in the two
   environments

2. adds a non-prefixed concept "xyz" that adds a type otherwise missing
   in one of the two environments but with the same definition as in the
   other.

i.e. if have have some concept that might differ the way its set up in
the two environments it really should be prefixed by "sd_" to make clear
it has semantics we defined. Only drop the prefix if it really means the
exact same thin in all environments.

Now, sd_bool is defined prefixed, because its either mapped to "BOOLEAN"
(which is an integer) in UEFI or "bool" (which is C99 _Bool) in
userspace. size_t is not defined prefixed, because it's mapped to the
same thing ultimately (on the UEFI its mapped to UINTN, but that in turn
is defined as being the type for the size of memory objects, thus it's
really the same as userspace size_t).

So far "true" and "false" where defined unprefixed even though they map
to values of different types. typeof(true) in userspace would reveal
_Bool, but typeof(false) in UEFI would reveal BOOLEAN. The distinction
actually does matter in comparisons (i.e. (_Bool) 1 == (_Bool) 2 holds
while (BOOLEAN) 1 == (BOOLEAN) 2 does not hold).

Hence, let's add sd_true and sd_false, thus indicating we defined our
own concept here, and it has similar but different semantics in UEFI and
in userspace.

4 years agofundamental: rename type.h → types-fundamental.h
Lennart Poettering [Thu, 11 Nov 2021 14:29:53 +0000 (15:29 +0100)] 
fundamental: rename type.h → types-fundamental.h

"type.h" is a very generic name, but this header is very specific to
making the "fundaemtnal" stuff work, it maps genric types in two
distinct ways. Hence let's make clear in the header name already what
this is about.

4 years agoboot: line-break magic[] array to match osrel[] line breaks
Lennart Poettering [Thu, 11 Nov 2021 14:20:51 +0000 (15:20 +0100)] 
boot: line-break magic[] array to match osrel[] line breaks

4 years agobootspec: catch up with sd-boot's bootspec implementation
Lennart Poettering [Tue, 9 Nov 2021 22:58:08 +0000 (23:58 +0100)] 
bootspec: catch up with sd-boot's bootspec implementation

Let's parse the same fields and use them the same way as in sd-boot.

Fixes: #20093
4 years agoboot: when we can't boot use the right boot loader entry display title in log message
Lennart Poettering [Tue, 9 Nov 2021 22:57:49 +0000 (23:57 +0100)] 
boot: when we can't boot use the right boot loader entry display title in log message

4 years agoboot: clean up unified boot loader entry name/version extraction
Lennart Poettering [Tue, 9 Nov 2021 22:54:10 +0000 (23:54 +0100)] 
boot: clean up unified boot loader entry name/version extraction

Let's make sure IMAGE_ID/IMAGE_VERSION are properly honoured, and
explain in a long comment why.

Let's also use ID= field again, which was lost by accident.

(While we are at it do some minimal OOM checks wherever we touch
something)

4 years agobootspec: fix comment that says exactly the opposite of what is true
Lennart Poettering [Tue, 9 Nov 2021 22:51:35 +0000 (23:51 +0100)] 
bootspec: fix comment that says exactly the opposite of what is true

4 years agoboot: const arguments should be const
Lennart Poettering [Tue, 9 Nov 2021 22:49:01 +0000 (23:49 +0100)] 
boot: const arguments should be const

Unfortunately they forgot the "const" decoration on the MetaiMatch()
prototype, but let that omission not leak into our code, let's hide it
away in the innermost use.

4 years agoboot: ternary op is your friend
Lennart Poettering [Tue, 9 Nov 2021 22:48:37 +0000 (23:48 +0100)] 
boot: ternary op is your friend

4 years agoboot: add comments what closely related ConfigEntry fields are about
Lennart Poettering [Tue, 9 Nov 2021 22:47:45 +0000 (23:47 +0100)] 
boot: add comments what closely related ConfigEntry fields are about

4 years agomount: retrigger run queue after ratelimit expired to run delayed mount start jobs 20953/head
Michal Sekletar [Mon, 4 Oct 2021 18:31:49 +0000 (20:31 +0200)] 
mount: retrigger run queue after ratelimit expired to run delayed mount start jobs

Fixes #20329

4 years agomount: make mount units start jobs not runnable if /p/s/mountinfo ratelimit is in...
Michal Sekletar [Mon, 4 Oct 2021 17:41:34 +0000 (19:41 +0200)] 
mount: make mount units start jobs not runnable if /p/s/mountinfo ratelimit is in effect

4 years agocore: rename/generalize UNIT(u)->test_start_limit() hook
Michal Sekletar [Mon, 4 Oct 2021 15:51:52 +0000 (17:51 +0200)] 
core: rename/generalize UNIT(u)->test_start_limit() hook

Up until now the main reason why we didn't proceed with starting the
unit was exceed start limit burst. However, for unit types like mounts
the other reason could be effective ratelimit on /proc/self/mountinfo
event source. That means our mount unit state may not reflect current
kernel state. Hence, we need to attempt to re-run the start job again
after ratelimit on event source expires.

As we will be introducing another reason than start limit let's rename
the virtual function that implements the check.

4 years agosd-event: introduce callback invoked when event source ratelimit expires
Michal Sekletar [Mon, 4 Oct 2021 17:44:06 +0000 (19:44 +0200)] 
sd-event: introduce callback invoked when event source ratelimit expires

4 years agoscope: count successful cgroup additions when delegating via D-Bus
Jonas Witschel [Wed, 10 Nov 2021 21:46:35 +0000 (22:46 +0100)] 
scope: count successful cgroup additions when delegating via D-Bus

Since commit 8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 ("scope: refuse
activation of scopes if no PIDs to add are left") all "systemd-run --scope
--user" calls fail because cgroup attachments delegated to the system instance
are not counted towards successful additions. Fix this by incrementing the
return value in case unit_attach_pid_to_cgroup_via_bus() succeeds, similar to
what happens when cg_attach() succeeds directly.

Note that this can *not* distinguish the case when
unit_attach_pid_to_cgroup_via_bus() has been run successfully, but all
processes to attach are gone in the meantime, unlike the checks that commit
8d3e4ac7cd37200d1431411a4b98925a24b7d9b3 adds for the system instance. This is
because even though unit_attach_pid_to_cgroup_via_bus() leads to an internal
unit_attach_pids_to_cgroup() call, the return value over D-Bus does not include
the number of successfully attached processes and is always NULL on success.

Fixes: #21297
4 years agoman: remove unintentionally repetitive words
ml [Thu, 11 Nov 2021 09:01:19 +0000 (10:01 +0100)] 
man: remove unintentionally repetitive words

4 years agoMerge pull request #21302 from yuwata/udev-drop-colon-from-ID_NET_NAME_MAC
Lennart Poettering [Thu, 11 Nov 2021 13:36:28 +0000 (14:36 +0100)] 
Merge pull request #21302 from yuwata/udev-drop-colon-from-ID_NET_NAME_MAC

udev: drop colon from ID_NET_NAME_MAC

4 years agoMerge pull request #21304 from poettering/chain-ssh-auth-keys
Lennart Poettering [Thu, 11 Nov 2021 13:35:48 +0000 (14:35 +0100)] 
Merge pull request #21304 from poettering/chain-ssh-auth-keys

userdbctl: add support for chaining other ssh-authorized-keys commands from userdbctl

4 years agoMerge pull request #21301 from yuwata/network-neighbor-use-hw-addr-data
Luca Boccassi [Thu, 11 Nov 2021 10:32:11 +0000 (10:32 +0000)] 
Merge pull request #21301 from yuwata/network-neighbor-use-hw-addr-data

network: neighbor: use "struct hw_addr_data"

4 years agoci: pin some workflows to SHAs 21316/head
Evgeny Vereshchagin [Thu, 11 Nov 2021 05:04:56 +0000 (05:04 +0000)] 
ci: pin some workflows to SHAs

to let Dependabot keep track of them using SHAs

codeql-actions doesn't point to SHAs because it isn't clear
whether Dependabot supports their release cycle mentioned
at https://github.com/github/codeql-action/issues/307

4 years agoci: pin labeler
Evgeny Vereshchagin [Thu, 11 Nov 2021 01:56:02 +0000 (01:56 +0000)] 
ci: pin labeler

Turns out GHActions where `pull_request_target` is used are capable
of pwning repositories: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

labeler doesn't check out the source code or build anything so
it's safe in its current form but to avoid surprises let's just pin
it to the latest version. It's annoying to manage dependencies like this
manually so additionally dependabot.yml is introduced to make it
easier to keep GHActions up to date more or less automatically:
https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

4 years agotest: use kbd-mode-map we ship in one more test case
Yu Watanabe [Wed, 10 Nov 2021 23:55:10 +0000 (08:55 +0900)] 
test: use kbd-mode-map we ship in one more test case

Follow-up for be0cc2ce6c947aafadb3f42dba405269f670b31c.

Fixes https://github.com/systemd/systemd/pull/19670#issuecomment-965817823.

4 years agoudev: drop colon from ID_NET_NAME_MAC 21302/head
Yu Watanabe [Thu, 11 Nov 2021 02:56:53 +0000 (11:56 +0900)] 
udev: drop colon from ID_NET_NAME_MAC

Fixes a bug introduced by eaba9bb3e69635d2c490c5e1b0d262b763753e1d.

4 years agoether-addr-util: introduce hw_addr_to_string_full()
Yu Watanabe [Thu, 11 Nov 2021 02:55:04 +0000 (11:55 +0900)] 
ether-addr-util: introduce hw_addr_to_string_full()

4 years agoman: document new --chain switch to userdbctl 21304/head
Lennart Poettering [Thu, 11 Nov 2021 09:04:31 +0000 (10:04 +0100)] 
man: document new --chain switch to userdbctl

And while we are at it, make 'ssh-authorized-keys' verb properly
documented. Given that OpenSSH documents the interface in its man page
it's fine to just document our implementation of it too.

4 years agouserdbctl: add support for chaining command lines in "authorized-keys" verb
Lennart Poettering [Thu, 11 Nov 2021 08:33:39 +0000 (09:33 +0100)] 
userdbctl: add support for chaining command lines in "authorized-keys" verb

4 years agoescape: return unused memory in quote_command_line()
Lennart Poettering [Thu, 11 Nov 2021 08:33:31 +0000 (09:33 +0100)] 
escape: return unused memory in quote_command_line()

4 years agoprocess-util: use quote_command_line() at one more place
Lennart Poettering [Thu, 11 Nov 2021 08:33:10 +0000 (09:33 +0100)] 
process-util: use quote_command_line() at one more place

4 years agoescape: add flags argument to quote_command_line()
Lennart Poettering [Thu, 11 Nov 2021 08:32:32 +0000 (09:32 +0100)] 
escape: add flags argument to quote_command_line()

That way, we can reuse the call at one more place (see later patch).

4 years agocore: check fs type of BPFProgram= property path 21241/head
Julia Kartseva [Fri, 5 Nov 2021 01:55:55 +0000 (18:55 -0700)] 
core: check fs type of BPFProgram= property path

Tests:

```
% stat --file-system --format="%T" /root/bpf/trivial/
bpf_fs

% systemd-nspawn -D/ --volatile=yes \
--property=BPFProgram=egress:/root/bpf/trivial/cgroup_skb_egress \
--quiet -- ping -c 5 -W 1 ::1
PING ::1(::1) 56 data bytes

--- ::1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4110ms
```

```
% stat --file-system --format='%T' /root/meh
btrfs

% systemd-nspawn -D/ --volatile=yes --property=BPFProgram=egress:/root/meh
--quiet -- ping -c 5 -W 1 ::1
```
sudo ./build/systemd-nspawn \
-D/ --volatile=yes --property=BPFProgram=egress:/home/hex --quiet -- \
ping -c 1 -W 1 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.017 ms

--- ::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms

4 years agocore: fix bpf-foreign cg controller realization
Julia Kartseva [Fri, 5 Nov 2021 01:52:02 +0000 (18:52 -0700)] 
core: fix bpf-foreign cg controller realization

Requiring /sys/fs/bpf path to be a mount point at the moment of cgroup
controllers realization does more harm than good, because:
* Realization happens early on boot, the mount point may not be ready at
the time. That happens if mounts are made by a .mount unit (the issue we
encountered).
* BPF filesystem may be mounted on another point.

Remove the check. Instead verify that path provided by BPFProgram= is
within BPF fs when unit properties are parsed.

Split in two commits for simple backport.

4 years agonetwork: neighbor: accept an empty string assignment 21301/head
Yu Watanabe [Thu, 11 Nov 2021 00:24:56 +0000 (09:24 +0900)] 
network: neighbor: accept an empty string assignment

4 years agonetwork: neighbor: use "struct hw_addr_data" to store link layer address
Yu Watanabe [Thu, 11 Nov 2021 00:21:59 +0000 (09:21 +0900)] 
network: neighbor: use "struct hw_addr_data" to store link layer address

4 years agoether-addr-util: expose hw_addr_hash_func()
Yu Watanabe [Thu, 11 Nov 2021 00:21:26 +0000 (09:21 +0900)] 
ether-addr-util: expose hw_addr_hash_func()

4 years agosd-netlink: fix type of NDA_LLADDR attribute
Yu Watanabe [Thu, 11 Nov 2021 03:49:25 +0000 (12:49 +0900)] 
sd-netlink: fix type of NDA_LLADDR attribute

4 years agoMerge pull request #21273 from yuwata/hostname-device-tree
Luca Boccassi [Wed, 10 Nov 2021 23:15:20 +0000 (23:15 +0000)] 
Merge pull request #21273 from yuwata/hostname-device-tree

hostnamed: use /proc/device-tree to get chassis type

4 years agonetif-util: fix stack-use-after-scope
Yu Watanabe [Wed, 10 Nov 2021 19:03:02 +0000 (04:03 +0900)] 
netif-util: fix stack-use-after-scope

Fixes a bug introduced by 0295b2fd1d97c68010c7528af13e2952886d52e0.

Fixes #21292.

4 years agoci: take CIFuzz's matrix into consideration
Frantisek Sumsal [Wed, 10 Nov 2021 19:15:41 +0000 (20:15 +0100)] 
ci: take CIFuzz's matrix into consideration

Otherwise the jobs will try to cancel each other out.

Follow-up to 3884837610168e6fb69fc2d5709f6c017a30beb9.

4 years agosd-id128: use /proc/device-tree 21273/head
Yu Watanabe [Tue, 9 Nov 2021 01:31:17 +0000 (10:31 +0900)] 
sd-id128: use /proc/device-tree

4 years agocondition: use /proc/device-tree/
Yu Watanabe [Tue, 9 Nov 2021 01:28:43 +0000 (10:28 +0900)] 
condition: use /proc/device-tree/

4 years agohostnamed: use /proc/device-tree to get chassis type
Yu Watanabe [Tue, 9 Nov 2021 01:21:23 +0000 (10:21 +0900)] 
hostnamed: use /proc/device-tree to get chassis type

From https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-firmware-ofw
---
Userspace must not use the /sys/firmware/devicetree/base
path directly, but instead should follow /proc/device-tree
symlink. It is possible that the absolute path will change
in the future, but the symlink is the stable ABI.
---

Addresses the comment https://github.com/systemd/systemd/pull/20731#discussion_r744095262.

4 years agoMerge pull request #21290 from poettering/arch-me-harder
Luca Boccassi [Wed, 10 Nov 2021 18:37:01 +0000 (18:37 +0000)] 
Merge pull request #21290 from poettering/arch-me-harder

some docs/tweaks regarding porting to new archs

4 years agomeson: Rework gnu-efi detection
Jan Janssen [Mon, 8 Nov 2021 12:04:45 +0000 (13:04 +0100)] 
meson: Rework gnu-efi detection

Moving all of the gnu-efi detection into src/boot/efi/meson.build makes
more sense than having it partially split.

And thanks to subdir_done() we can simplify the code a lot.

Fixes: #21258
4 years agoMerge pull request #21293 from mrc0mmand/ci-cancel-old-jobs
Luca Boccassi [Wed, 10 Nov 2021 18:15:21 +0000 (18:15 +0000)] 
Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs

ci: cancel previous jobs on ref update

4 years agoci: cancel previous jobs on ref update 21293/head
Frantisek Sumsal [Wed, 10 Nov 2021 15:45:12 +0000 (16:45 +0100)] 
ci: cancel previous jobs on ref update

Let's save the environment (and reduce the number of jobs in GH Actions
queues) by cancelling old jobs on a ref update (force push).

See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency

4 years agoci: fix indentation
Frantisek Sumsal [Wed, 10 Nov 2021 15:42:07 +0000 (16:42 +0100)] 
ci: fix indentation

4 years agoRevert "CI: run GCC unit test job on push to main"
Frantisek Sumsal [Wed, 10 Nov 2021 16:15:00 +0000 (17:15 +0100)] 
Revert "CI: run GCC unit test job on push to main"

This reverts commit c1036042f5aa3369d771776fb6d57fac2543d80d.

Follow-up to 0ad536c16a940b4557322f3f811db73c4b374898.

4 years agobinfmt: unparenthesize a bit
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 13:01:54 +0000 (14:01 +0100)] 
binfmt: unparenthesize a bit

4 years agobinfmt: fix exit value
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 12:58:32 +0000 (13:58 +0100)] 
binfmt: fix exit value

Positive values are mapped to 0 by DEFINE_MAIN_FUNCTION(), so e.g.
systemd-binfmt --foobar would "succeed".

4 years agodoc: add some docs with a checklist of what to do for new architectures 21290/head
Lennart Poettering [Wed, 10 Nov 2021 11:37:47 +0000 (12:37 +0100)] 
doc: add some docs with a checklist of what to do for new architectures

4 years agoshared: nudge people into sending us patches to make /lib64/ symlink generation work...
Lennart Poettering [Wed, 10 Nov 2021 11:35:27 +0000 (12:35 +0100)] 
shared: nudge people into sending us patches to make /lib64/ symlink generation work on all archs that need it

This is an attempt to nudge people into sending us patches that fix
bug #14311 for us, given that the original submitter lost interest.

4 years agodocs: invite people to define GPT partition types for all archs now
Lennart Poettering [Wed, 10 Nov 2021 11:32:28 +0000 (12:32 +0100)] 
docs: invite people to define GPT partition types for all archs now

The discovery partitions spec so far suggested we should define
arch-specific partition type uuids only for archs that have EFI. Let's
change that and invite people to define them for any arch. Why? Even if
GPT is defined as part of the UEFI spec it's quite useful independently
of it, too. Specifically, our image dissection logic makes use of it,
i.e. systemd-nspawn, systemd-gpt-auto-generator, systemd-repart,
RootImage=, portable services, and so on. None of these tools are
related to UEFI in any way.

Hence, let's open this up.

4 years agoshared: start pushing people gently to define GPT partition type UUIDs for missing...
Lennart Poettering [Wed, 10 Nov 2021 11:27:26 +0000 (12:27 +0100)] 
shared: start pushing people gently to define GPT partition type UUIDs for missing archs

Let's generate a single gcc `#warning`  message asking people to define
partition type UUIDs for their architectures if they are missing.

4 years agoarchitecture: drop __riscv__ checks, it's obsolete since 2018
Lennart Poettering [Wed, 10 Nov 2021 11:25:03 +0000 (12:25 +0100)] 
architecture: drop __riscv__ checks, it's obsolete since 2018

4 years agofsck: no emergency.target on nofail mounts
Scott Lamb [Wed, 21 Jul 2021 17:03:49 +0000 (10:03 -0700)] 
fsck: no emergency.target on nofail mounts

Also describe failure behavior more precisely in the manpage.
Fixes #20237.

4 years agocore: replace slice dependencies as they get added
Anita Zhang [Tue, 9 Nov 2021 23:26:28 +0000 (15:26 -0800)] 
core: replace slice dependencies as they get added

Defines a "UNIT_DEPENDENCY_SLICE_PROPERTY" UnitDependencyMask type that
is used when adding slices to the dependencies hashmap. This type is
used to remove slice dependencies when they get overridden by new ones.

Fixes #20182

4 years agoMerge pull request #21287 from yuwata/man-network-condition
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 09:36:54 +0000 (10:36 +0100)] 
Merge pull request #21287 from yuwata/man-network-condition

man: cleanups for [Match] section

4 years agonetwork: cake: fix copy-and-paste error
Yu Watanabe [Wed, 10 Nov 2021 01:32:52 +0000 (10:32 +0900)] 
network: cake: fix copy-and-paste error

Follow-up for 35896db4895f68050c3edd2c58b913dcba4e0fd8.

Fixes CID#1465796.

4 years agoman: use include directive for [Match] section 21287/head
Yu Watanabe [Wed, 10 Nov 2021 01:57:18 +0000 (10:57 +0900)] 
man: use include directive for [Match] section

4 years agoman: add missing Firmware= setting
Yu Watanabe [Wed, 10 Nov 2021 01:56:42 +0000 (10:56 +0900)] 
man: add missing Firmware= setting

4 years agoMerge pull request #21276 from yuwata/ether-addr-util
Yu Watanabe [Wed, 10 Nov 2021 00:22:01 +0000 (09:22 +0900)] 
Merge pull request #21276 from yuwata/ether-addr-util

ether-addr-util: introduce parse_hw_addr() and related conf parsers

4 years agoMerge pull request #21281 from poettering/repart-align-fixes
Yu Watanabe [Wed, 10 Nov 2021 00:21:24 +0000 (09:21 +0900)] 
Merge pull request #21281 from poettering/repart-align-fixes

repart: fixes when operating on unaligned partitions

4 years agoMerge pull request #21283 from poettering/nspawn-idempotent-empty-settings
Lennart Poettering [Tue, 9 Nov 2021 21:20:22 +0000 (22:20 +0100)] 
Merge pull request #21283 from poettering/nspawn-idempotent-empty-settings

nspawn: make empty settings files true NOPs