Commit Graph

44657 Commits

Author SHA1 Message Date
Lennart Poettering f1eb0ccd9e update TODO 2020-05-10 10:19:12 +02:00
Lennart Poettering 622e1cdb31 fs-util: beef up path_is_encrypted() to deal with LVM block devices
Let's iterate through the slaves/ directory to find backing devices of
the block devices we care about.
2020-05-10 09:23:30 +02:00
Benjamin Robin 20c3acfaad tree-wide: Replace assert() by assert_se() when there is side effect 2020-05-10 09:23:12 +02:00
Lennart Poettering b2da95cfa1 update TODO 2020-05-09 11:10:56 +02:00
Lennart Poettering 15981c26e3 update TODO 2020-05-09 10:37:32 +02:00
наб 2f665f2437 networkctl: use uint64_t for link speed throughout
format-table used size_t/uint64_t interchangeably for TABLE_BPS,
and ethtool-util used SIZE_MAX to indicate SPEED_UNKNOWN,
which worked only on ABIs with 64-bit pointers.

For example, the tg3 driver returns SPEED_UNKNOWN with no link (cf.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/broadcom/tg3.c?id=3eb2efbea193789397c36f52b17d8692ac79bf68#n12190)
which on x32 (and other 32-bit ABIs, presumably) caused
"networkctl status" to mark it with "Speed: 4Gbps":

nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 32-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /libx32/ld-linux-x32.so.2,
BuildID[sha1]=36d684cb1fc8fb5060050d32b969e5aa172fa607, for GNU/Linux
3.4.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
                Driver: tg3
                 Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
                 Speed: 4Gbps

Whereas on 64-bit-pointer ABIs (here: amd64):

nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=7a3e406e54968d7774ad467fc3f6a9d35ff7aea2, for GNU/Linux
3.2.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
                Driver: tg3
                 Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
                 Speed: n/a

With this patch, networkctl returns, for x32:

nabijaczleweli@szarotka:~$ networkctl --version
systemd 245 (245.5-2.1~networkctl-4g-v2)
nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 32-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /libx32/ld-linux-x32.so.2,
BuildID[sha1]=36d684cb1fc8fb5060050d32b969e5aa172fa607, for GNU/Linux
3.4.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
                Driver: tg3
                 Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
                 Speed: n/a

And for amd64:

nabijaczleweli@szarotka:~$ file $(which networkctl)
/bin/networkctl: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=7a3e406e54968d7774ad467fc3f6a9d35ff7aea2, for GNU/Linux
3.2.0, stripped
nabijaczleweli@szarotka:~$ networkctl status onboard1
● 4: onboard1
                Driver: tg3
                 Model: NetXtreme BCM5755 Gigabit Ethernet PCI Express
                 Speed: n/a
2020-05-09 08:49:31 +02:00
Frantisek Sumsal a114ab6373 cifuzz: fuzz the master branch on push
Apart from running CIFuzz for each relevant PR, let's run it
unconditionally for each push to master to detect possible issues
(caused by ignored PRs, etc.).

Followup to 94f660a8fe.
2020-05-08 21:30:19 +03:00
Frantisek Sumsal 94f660a8fe cifuzz: run only for relevant PRs
Fuzz only PRs with relevant changes (source code and fuzzer corpora) to
save resources.
2020-05-08 20:58:11 +03:00
Zbigniew Jędrzejewski-Szmek f2a8372e37
Merge pull request #15703 from poettering/homed-tweak-default-storage
homed: avoid double encryption
2020-05-08 16:57:14 +02:00
Zbigniew Jędrzejewski-Szmek 0328d672f3
Merge pull request #15651 from poettering/newlocale-check
check if locales are installed before using them
2020-05-08 11:31:34 +02:00
Lennart Poettering c01ef54f7f homectl: color disk free output if low on free space 2020-05-08 11:26:03 +02:00
Hans de Goede 27593a0641 hwdb: Fix accel orientation quirk for Medion Akoya E2215T MD60198
Commit 3d864658ea ("hwdb: assume all Medion Akoya E-models have the
same matrix"), unified the entries for most Medion Akoya E* modes,
including the entry for the Medion Akoya E2215T MD60198.

But the accelerometer on the E2215T has an ACPI-id of KIOX000A, rather
then KIOX010A as the other models have, so that commit broke the
ACCEL_MOUNT_MATRIX for the E2215T.

Add a separate match for the E2215T so that it gets the correct
ACCEL_MOUNT_MATRIX again.
2020-05-08 11:23:55 +02:00
Zbigniew Jędrzejewski-Szmek 165bda37ba
Merge pull request #15718 from poettering/tmpfiles-offline
tmpfiles: read /etc/passwd + /etc/group with fgetpwent()/fgetgrent() if --root= is specified
2020-05-08 11:22:19 +02:00
Zbigniew Jędrzejewski-Szmek 8acb7780df
Merge pull request #15623 from poettering/cmsg-cleanup
various CMSG_xyz clean-ups, split out of #15571
2020-05-08 11:05:06 +02:00
Lennart Poettering 321330ecab update TODO 2020-05-07 23:37:35 +02:00
Lennart Poettering feb86ca90c man: document homed.conf 2020-05-07 23:37:30 +02:00
Lennart Poettering c76dd733af homed: make default storage/file system type configurable in homed.conf 2020-05-07 23:33:09 +02:00
Lennart Poettering c07bf7a4ed homed: move supported_fstype() to home-util.c
That way we can use it from other modules too. Just some shifting
around, no change in behaviour.
2020-05-07 23:33:04 +02:00
Lennart Poettering 1dfe5de095 homed: tweak logic for picking a default storage and file system
Let's make the logic a bit smarter: if we detect that /home is
encrypted, let's avoid double encryption and prefer plain
directory/subvolumes instead of our regular luks images.

Also, allow configuration go storage/file system via an env var passed
to homework. In a later commit, let's then change homed to initialize
that env var from a config file setting, when invoking homework.
2020-05-07 23:33:01 +02:00
Lennart Poettering 0d5e523461 home: when adding a binding for a user record, use common code for determining automatic image path
Make use of the new user_record_build_image_path() helper the previous
commit added to share some code.

Also, let's make sure we update all parsed-out fields with the new data
from the binding, so that the parsed-out fields are definitely
up-to-date.
2020-05-07 23:32:57 +02:00
Lennart Poettering a43eddbdf4 user-record: split out code that generates automatic image path for records
No change of behaviour, just some refactoring, so that we can use this
new helper function elswhere, too.
2020-05-07 23:32:41 +02:00
Lennart Poettering ed9c0851e5 fs-util: add helper path_is_encrypted() that checks if a file system is encrypted 2020-05-07 23:31:36 +02:00
Lennart Poettering a6e1018df2 update TODO 2020-05-07 23:30:06 +02:00
Michal Sekletar d910f4c2b2 core/cgroup: fix return value of unit_cgorup_freezer_action()
We should return 0 only if current freezer state, as reported by the
kernel, is already the desired state. Otherwise, we would dispatch
return dbus message prematurely in bus_unit_method_freezer_generic().

Thanks to Frantisek Sumsal for reporting the issue.
2020-05-07 22:19:19 +02:00
Lennart Poettering c60bc8d4fb
Merge pull request #15745 from keszybz/one-more-specifier
Add %l as specifier for short hostname
2020-05-07 22:18:59 +02:00
Lennart Poettering 7c5137329d
Merge pull request #15713 from poettering/home-discard-when-offline
homed: optionally, issue FITRIM ioctl when logging out
2020-05-07 19:17:48 +02:00
Lennart Poettering bb5da6c385 meson: re-run ninja update-man-rules
Split out of #15703, because it has nothing to do with that.

Follow-up for: 4f07ddfa9b
2020-05-07 19:00:59 +02:00
Vito Caputo 5e55340ad4
Merge pull request #15681 from vcaputo/buslocator
*: switch to BusLocator-oriented helpers
2020-05-07 09:46:01 -07:00
Vito Caputo 43fe4f7613 timedate: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 8010c205dd systemctl: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 7ad61613de run: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo d96f9abc95 resolve: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo bf5c8177f8 portable: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo a63d7e7bf6 nss-resolve: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 7b38987880 nss-mymachines: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 1ecaac5c30 nspawn: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 8a048c8c42 network: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 92cb8ebcb4 mount: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:44 -07:00
Vito Caputo 14456f7607 machine: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:43 -07:00
Vito Caputo 5d990cc571 login: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:43 -07:00
Vito Caputo e3c8ec3b33 locale: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:43 -07:00
Vito Caputo de770b6042 analyze: switch to BusLocator-oriented helpers
Mechanical substitution reducing some verbosity
2020-05-07 08:46:43 -07:00
Vito Caputo 8a1596aab5 home: switch to shared bus_home_mgr
Largely mechanical change; s/&home_mgr/bus_home_mgr/g
2020-05-07 08:46:43 -07:00
Vito Caputo 54e27bb5c0 bus: introduce bus-locator.[ch]
Move BusLocator into its own header, introduce collection of
locators for use throughout the code.
2020-05-07 08:46:40 -07:00
Zbigniew Jędrzejewski-Szmek b6c93a5a44 test-specifier: add a simple test which prints "global" specifiers
...i.e. those which can be resolved without a context parameter.
2020-05-07 17:36:44 +02:00
Zbigniew Jędrzejewski-Szmek e97708fa3e Add %l as specifier for the hostname without any domain component
As described in #15603, it is a fairly common setup to use a fqdn as the
configured hostname. But it is often convenient to use just the actual
hostname, i.e. until the first dot. This adds support in tmpfiles, sysusers,
and unit files for %l which expands to that.

Fixes #15603.
2020-05-07 17:36:44 +02:00
Zbigniew Jędrzejewski-Szmek eef4b80033 Add a basic test that the configured fallback hostname is OK
Ideally, assert_cc() would be used for this, so that it is not possible to even
compile systemd with something like '-Dfallback-hostname=.foo'. But to do a
proper check we need to call hostname_is_valid(), and we cannot depend on being
able to run code (e.g. during cross-compilation). So let's do a very superficial
check in meson, and a proper on in test-util.
2020-05-07 17:35:26 +02:00
Lennart Poettering a00a78b84e tree-wide: port various bits over to locale_is_installed() 2020-05-07 17:24:22 +02:00
Lennart Poettering b45b0a69bb test: add test case for locale_is_installed() 2020-05-07 17:24:19 +02:00
Lennart Poettering 23fa786ca6 locale-util: add new helper locale_is_installed()
This new helper checks whether the specified locale is installed. It's
distinct from locale_is_valid() which just superficially checks if a
string looks like something that could be a valid locale.

Heavily inspired by @jsynacek's #13964.

Replaces: #13964
2020-05-07 17:23:23 +02:00