Commit Graph
36053 Commits
Author SHA1 Message Date
Lennart Poettering 2ec0c4f94d sysext: fix tmpfs mount source
It's "sysext", not "sysexit".

The string passed here is pure decoration, and noone will see it, since
it's only in our private mount namespace. But still, it's a typo, let's
fix it
2021-11-16 17:02:18 +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
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 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 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 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 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 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
Yu Watanabe 6706ce2fd2 network: make IgnoreCarrierLoss= also take timespan
Fixes #18738 and #20887.

Replaces #18746.
2021-11-16 02:04:59 +09:00
Lennart Poettering a71a0693cd homework: rework how we disassemble a home dir in home_deactivate()
Let's first move the home dir to a new mount point that is only visible
in our own private namespace. Then, do FITRIM and stuff there, so that
we know the regular userspace can't interfere with that, and we know
that the home fs is not used anymore.

(This will become even more important once we add auto-grow/auto-shrink
for home dirs)
2021-11-15 17:56:35 +01:00
Slava Bacherikov af493fb742 network: Add SuppressInterfaceGroup= into routing policy
This adds SuppressInterfaceGroup= option in the [RoutingPolicyRule] section
which has the same semantics as suppress_ifgroup in `ip rule` command.
2021-11-16 01:54:07 +09:00
Slava Bacherikov 10af8bb24b network: change link group type to int32
Both linux kernel kernel and iproute2 uses int32 type for a link group
attribute and -1 has a special meaning, so setting it to 4294967295
would make it -1 in the linux kernel (and ip link cmd).
2021-11-16 01:53:46 +09:00
Luca Boccassi e2f8c1124d Merge pull request #21277 from yuwata/permanent-hw-addr
network, udev: several improvement of permanent hardware address handling
2021-11-15 10:57:30 +00:00
Yu Watanabe 26591ffffd resolve: do not clear DNS servers or friends on link which is not managed by networkd
When networkd detects an unmanaged link, then the state is changed in
the following order:
pending -> initialized -> unmanaged

The "initialized" state was added by bd08ce5615.
2021-11-15 08:17:34 +09:00
Yu Watanabe 51f6c93d21 Merge pull request #21359 from yuwata/network-split-route
network: log route or nexthop flags
2021-11-15 08:17:07 +09:00