Commit graph

54452 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek b15f6eae42 tmpfiles: split out config for systemd-resolve
This mirrors what was done in 564761fcae
for sysusers.d. If we allow separating resolved sysusers config
in a subpackage, we should do the same for the symlink that is
only useful when resolved is installed.

Related to #21317.
2021-11-16 16:56:08 +01:00
Lennart Poettering 67d0c6744f
Merge pull request #21275 from keszybz/makefs-quiet
Makefs quiet output
2021-11-16 16:55:47 +01:00
Lennart Poettering 032e11a234
Merge pull request #21386 from keszybz/binfmt-later
Order binfmt.service after local-fs.target
2021-11-16 16:54:47 +01:00
Takashi Sakamoto 289c2459b7 hwdb: ieee1394-unit-function: add entry for MOTU Track 16
In Linux kernel 5.16 prepatch, MOTU Track 16 is newly supported by ALSA
firewire-motu driver.

This commit adds hwdb entry for the device.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=411ac2982cb6
2021-11-16 16:54:33 +01:00
Yu Watanabe 39b91d1ae4 network: tuntap: drop unnecessary minus 2021-11-16 16:53:43 +01:00
Lennart Poettering 91822de4f6
Merge pull request #21383 from yuwata/network-address-scope
network: use route_scope_from_string() at one more place
2021-11-16 16:53:26 +01:00
Lennart Poettering 31f5c84dfc
Merge pull request #21380 from poettering/homed-test-qemu
homed: make sure homed tests actually run in qemu, too
2021-11-16 16:52:57 +01:00
Lennart Poettering d6c3a32056 umount: fix log message
The sentence wasn't correct English language, let's fix that. More
importantly: if the mount options are empty we'd display "(null)" here.
Fix that. (And they can be empty IRL, see CI results)
2021-11-16 15:08:29 +01:00
Zbigniew Jędrzejewski-Szmek 1c271d3871 man: document fs types known to makefs 2021-11-16 13:55:50 +01:00
Zbigniew Jędrzejewski-Szmek 2d96440fd5 makefs: add "support" for f2fs
The man page doesn't quite match what --help says, and I needed to use "-f" to
write a wiped partition. This all feels a bit experimental, but the fs has some
adherents, and we should make it easy to use.

(Also, an empty 256MB device formatted and mounted shows up as
  Filesystem      Size  Used Avail Use% Mounted on
  /dev/loop0      254M   85M  170M  34% /var/tmp/mount
which also seems a bit over the top…)

Requested in https://github.com/systemd/systemd/pull/21275#issuecomment-967928690.
2021-11-16 13:55:49 +01:00
Zbigniew Jędrzejewski-Szmek 8d433a99a4 makefs: fix too-long swap labels
Apparently mkswap has it's own limit, and it seems to be one lower than the one
for ext2/3/4.

$ for i in ext2 ext3 ext4 btrfs xfs vfat swap minix; do
  echo $i && wipefs -q -a '/var/tmp/głąbźśńćąśððð.img'
  build/systemd-makefs $i '/var/tmp/głąbźśńćąśððð.img'
done

ext2
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext2 (label "głąbźśńćą", uuid 7626bc5c-8ac4-43cf-87b7-1b2761272dd3)
ext3
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext3 (label "głąbźśńćą", uuid 0da22cad-0dbf-4a7a-962d-12cd39d006b5)
ext4
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext4 (label "głąbźśńćą", uuid dded267b-8955-4d19-82a5-1f231d446059)
btrfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as btrfs (label "głąbźśńćąśððð.img", uuid 9e2e89f1-010d-4ab6-80f3-f9e215dbc225)
xfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as xfs (label "głąbźśń", uuid 2cc937af-4c41-465c-8f52-aab2304bd860)
vfat
mkfs.fat 4.2 (2021-01-31)
/var/tmp/głąbźśńćąśððð.img successfully formatted as vfat (label "G__B_______", uuid a3a9e028)

swap
...
LABEL=głąbźśńć, UUID=0ab787aa-37a6-4b32-978b-d71efc6e6098
/var/tmp/głąbźśńćąśððð.img successfully formatted as swap (label "głąbźśńć", uuid 0ab787aa-37a6-4b32-978b-d71efc6e6098)

minix
...
/var/tmp/głąbźśńćąśððð.img successfully formatted as minix (no label or uuid specified)
2021-11-16 13:55:48 +01:00
Zbigniew Jędrzejewski-Szmek 7ffe593b79 makefs: fix too-long ext2/3/4 labels 2021-11-16 13:55:46 +01:00
Zbigniew Jędrzejewski-Szmek dc91c971bf makefs: fix label for vfat filesystems
I was testing with a "test1.img" and mkfs.vfat rejects "TEST1.IMG" with the
error "Labels with characters *?.,;:/\|+=<>[]" are not allowed". So let's
replace those characters with "_".
2021-11-16 13:55:33 +01:00
Zbigniew Jędrzejewski-Szmek 9b49a3b49e basic/utf8: add function to convert to ASCII
The conversion must be lossy because ASCII doesn't have enough chars.
2021-11-16 13:54:38 +01:00
Lennart Poettering 3054863345 test: make homed test run in qemu 2021-11-16 12:33:44 +01:00
Lennart Poettering 491347bdf6 homed: wait for luks devices to go away
Let's make sure LUKS volumes are really definitely gone before we retun
in the deactivation logic.
2021-11-16 10:27:24 +01:00
Zbigniew Jędrzejewski-Szmek 7ee587afe3
Merge pull request #21373 from poettering/filesystems-more-groups
some file system tables/magic love
2021-11-16 10:27:21 +01:00
Zbigniew Jędrzejewski-Szmek 0491ab5fcd units: delay binfmt processing until after local-fs.target
Users may use rules that refer to binaries e.g. in /opt or /usr/local,
and those directories may be separate mount points. We don't need the
binfmt rules in early boot, so let's delay the service so that we can
rely on the full local filesystem being visible.

Fixes #21178.
2021-11-16 09:21:22 +01:00
Zbigniew Jędrzejewski-Szmek fe8538e499 man: add markup 2021-11-16 09:21:22 +01:00
Zbigniew Jędrzejewski-Szmek 1990bc64cd basic/errno-util: adjust indentation
It was bothering me that this backslash wasn't aligned with the
ones below.
2021-11-16 09:21:22 +01:00
Lennart Poettering 947796eac3 docs: mention RET_NERRNO() in CODING_STYLE.md 2021-11-16 08:04:09 +01:00
Lennart Poettering 7c248223eb tree-wide: use new RET_NERRNO() helper at various places 2021-11-16 08:04:09 +01:00
Lennart Poettering ef470ffa23 macro: add new helper RET_NERRNO()
This new helper converts libc style syscall return values into
systemd-kernel (actually: kernel style) negative errno values.

It's implemented as macro-like inline function, and propagates return
values >= 0 as themselves and returns -errno for negative error returns.

THis is supposed to be little more than syntactic sugar so that we can
reduce a lot of (short, but still) boilerplate code whever we convert
libc style error handling into our own.

As discussed here:

https://github.com/systemd/systemd/pull/21326#discussion_r748413537
2021-11-16 08:04:09 +01:00
Lennart Poettering cb3763d57b cgroup-util: laccess() returns negative errno already 2021-11-16 08:04:09 +01:00
Yu Watanabe faa201dc6b network: address: explicitly mention that the address is localhost 2021-11-16 16:01:18 +09:00
Yu Watanabe d8c472f297 network: address: use route_scope_from_string() 2021-11-16 16:01:18 +09:00
Lennart Poettering 12a9f68f06 units: relax sandbox so that uidmap stuff can work
The uidmap suff requires additional caps and userns to work in some
cases. Allow it.

Follow-up for: 1147c538bb
2021-11-16 10:41:36 +09:00
Lennart Poettering 228b1decc6 homed: reset HomeSetup.undo_dm field when deactivating home dir the official way
There are two ways to deactivate a home dir: the official way if someone
calls "homectl deactivate" or something similar. Or the
error-case/side-effect code path, where we unwind exactly what we
already set up.

The .undo_dm field is supposed to tell us whether we shall still detach
the DM device. We forgot to update it in the official code path. Add
that. (We did it correctly in the error case codepath already).

(The issue is minor: if we forget to reset it in the clean code path,
then we'll try to unmount again what is already unmounted in the error
code paths, but since we ignore errors there — to not "stack" errors –
we never noticed and there's no bad effect of it)
2021-11-16 10:35:09 +09:00
Yu Watanabe 50e67237a7
Merge pull request #21377 from poettering/slow-math
meson: stop using -ffast-math
2021-11-16 10:33:48 +09:00
Yu Watanabe 7777024dab
Merge pull request #21344 from yuwata/network-ignore-carrier-loss-timespan
network: make IgnoreCarrierLoss= also take a timespan
2021-11-16 10:27:01 +09:00
Yu Watanabe d068f3a243
Merge pull request #21235 from bacher09/slava/supress_ifgroup
Add suppress_ifgroup option in routing policy
2021-11-16 10:25:33 +09:00
Lennart Poettering ad004abe9d filesystems: apparently f2fs is als reasonably common
As suggested:

https://github.com/systemd/systemd/pull/21373#discussion_r749523677
2021-11-15 22:54:15 +01:00
Lennart Poettering 05715f12a8 filesystems: add ntfs/ntfs3 magic and add it current version to group
As suggested:

https://github.com/systemd/systemd/pull/21373#discussion_r749523677
2021-11-15 22:53:25 +01:00
Lennart Poettering ad4e99fe9a filesystems: add comments to gperf file anomalies
Some file systems have non-unique names or non-unique magics. Let's add
some comments explaining that.
2021-11-15 22:43:03 +01:00
Lennart Poettering 0ed6103c19 filesystems: fix magic of "smb3" fs
smb3 is an alias for modern CIFS, not the old SMB fs (see kmod alias list, i.e. modinfo fs-smb3).

(the old smbfs has long been removed from the kernel actually, it's dead
and obsolete)
2021-11-15 22:43:03 +01:00
Lennart Poettering d7c2f8817a filesystems: list rpc_pipefs as auxiliary kernel API VFS 2021-11-15 22:43:03 +01:00
Lennart Poettering 7e8fd61089 filesystems: list orangefs as network fs
it's the new name or pvfs2, hence we might as well list it, given we
list that already.
2021-11-15 22:43:03 +01:00
Lennart Poettering 2b69f6e591 devtmpfs is a primary API fs 2021-11-15 22:43:03 +01:00
Lennart Poettering e0f89b0656 analyze: don't list filesystems among ungrouped that are aliases
There are a bunch of filesystems that actually are just aliases for
other filesystems. So far we listed them as "ungrouped", suggesting they
should be added to some file system group. But that's not really
something needed, since they are after all not file systems in their own
right, but aliases only (and usually legacy at that).

hence, let's hide them from display (but debug log about them)
2021-11-15 22:43:03 +01:00
Lennart Poettering 7c604e89aa homed: replace home-grown fs magic translation with fs_type_to_string() 2021-11-15 22:43:03 +01:00
Lennart Poettering 66d39325d7 filesystems: add three more file system types
devtmpfs and cpuset are not actual filesystems of their own. cpuset used
to be but is now an alias for cgroupsfs. devtmpfs is the same as tmpfs
as its just a "named superblock", i.e. a specific instance of tmpfs, but
not a file system of its own.
2021-11-15 22:43:03 +01:00
Lennart Poettering 5538ecbac8 analyze: show fs magic info in 'systemd-analyze filesystem'
Let's show this information, since its quite useful. Moreover it allows
us to highlight file system aliases.
2021-11-15 22:43:03 +01:00
Lennart Poettering 6d439321e8 filesystems: add internal APIs to convert fs magic to name
We previously had tooling for the opposite direction, let's complete the
work.
2021-11-15 22:43:03 +01:00
Lennart Poettering 3818d6a3a5 mountpoint-util: sort list of read-only fs again 2021-11-15 22:43:03 +01:00
Lennart Poettering 5feeb2584f filesystems: add group for "application" file system
This group shall cover file systems whose job is to make stuff that
isn't actually storing anything in itself, and isn't just an API file
system, but allows exposing stuff with special semantics in the VFS.
2021-11-15 22:43:03 +01:00
Lennart Poettering 9c8214d559 filesystems: add binfmt_misc to auxiliary API VFS group 2021-11-15 22:43:03 +01:00
Lennart Poettering 333a2ad649 filesystems: add ceph to network file systems group 2021-11-15 22:43:03 +01:00
Lennart Poettering 2867cb392a filesystems: slightly update common block device groups 2021-11-15 22:43:03 +01:00
Lennart Poettering 73e7576e3b filesystems: add two new filesystem groups
1. @anonymous → for file systems that aren't real file systems but
   simply the backing for sockets, pipes and other "anonymous" fds.

2. @security → for the various MAC security file systems.
2021-11-15 22:43:03 +01:00
Lennart Poettering c79aaff9d5 test-json: add test that makes sure floats are somewhat reasonably implemented
Test that we don't loose accuracy without bounds for extreme values, and
validate that nan/inf/-inf actually get converted to null properly.
2021-11-15 22:24:49 +01:00