Having USB enabled seems useful enough, this wasn't doing anything
regardless because we already enable CONFIG_USB earlier in the kconfig
file so this just gets rid of warning.
Jan Janssen [Tue, 5 Sep 2023 10:07:01 +0000 (12:07 +0200)]
ci: Do not run build test as root
Although, this is CI, we can still do better. It also ensures that any
env var changes make it into the script, as things like PATH would not
survive a `sudo -E`.
The TEX Shinobi keyboard with trackpoint incorrectly identifies as a mouse instead of a pointing stick. This corrects it as suggested at https://gitlab.freedesktop.org/libinput/libinput/-/issues/932#note_2069967
Following the example of the Lite-On keyboard entry, this modalias specifies the mouse unit without tagging the device's other entries.
Also, this introduce sd_dhcp_lease_get_lifetime_timestamp() and friends,
which provides timestamp of the lifetime and so on, while
sd_dhcp_lease_get_lifetime() provides timestamp.
logind: give better error messages when failing to attach devices to seats
When the user tries to attach a device lacking ID_FOR_SEAT they
currently get a very cryptic error message. Let's improve the situation
a bit. Still a bit cryptic maybe, but much less so.
Configuration now takes priority over CLI options so we have to
configure the defaults for settings that we want to allow overriding
from the CLI. We also explicitly set some other settings so that they
can't be overridden from the CLI anymore. For example the base and
initrd image should never be made bootable so we set Bootable=no
explicitly for both.
Otherwise we'll get stuck waiting indefinitely if the test socket unit
fails to fail due the trigger limit, i.e.:
[ 111.104906] testsuite-07.sh[743]: + systemctl start issue2467.socket
[ OK ] Listening on issue2467.socket.
[ 111.746465] testsuite-07.sh[743]: + nc -w20 -U /run/test.ctl
Starting systemd-tmpfiles-clean.service...
[ OK ] Finished systemd-tmpfiles-clean.service.
qemu-system-x86_64: terminating on signal 15 from pid 565814 (timeout)
E: Test timed out after 1800s
With the idle timeout we should give up after 20 seconds, allowing the next
statement to properly fail:
In file included from ../src/basic/macro.h:455,
from ../src/basic/alloc-util.h:10,
from ../src/basic/hash-funcs.h:4,
from ../src/basic/hashmap.h:8,
from ../src/shared/dns-domain.h:10,
from ../src/network/networkd-radv.c:9:
../src/network/networkd-radv.c: In function ‘config_parse_router_home_agent_lifetime’:
../src/network/networkd-radv.c:1626:28: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 11 has type ‘long long unsigned int’ [-Werror=format=]
1626 | "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/basic/log.h:361:125: note: in definition of macro ‘log_syntax’
361 | ? log_syntax_internal(unit, _level, config_file, config_line, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
| ^~~~~~~~~~~
../src/network/networkd-radv.c:1626:68: note: format string is defined here
1626 | "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue,
| ~~^
| |
| long unsigned int
| %llu
cc1: all warnings being treated as errors
Addresses: https://github.com/systemd/systemd/pull/28964#issuecomment-1705550404
Follow-up to 6a6d27bc5b0.
- Rename the argument for storing the sender address,
- allow to call it with NULL for ret_xyz,
- reduce needless copy of timestamp when the message does not have
timestamp.
The mkosi Arch CI doesn't work as the keyring package is out
of date and cannot be built due to various build toolchain
issues. Disable the job as it always fails and confuses
submitters.
meson: disallow fuzz test names above 60 characters
The name is created as "systemd:fuzz / fuzz-<fuzzer_name>_<sample_name>"
and if that's very long, output gets wrapped when 'meson test' is run, and
this is rather annoying.
Disallow filenames above 45 characters, which leads a 60 char names.
test: shorten sample names, drop numerical prefixes
We don't care about the ordering, so we may just as well drop the numerical
prefixes that we normally use for sorting. Also rename some other samples
to keep width of output down to reasonable width.
This commit doesn't look right to me. We have to unmount everything
recursively *before* we MS_MOVE because the MS_MOVE will not get rid of
it for us, and we simply cannot access these mounts after the MS_MOVE is
complete anymore.
This is a fundamental difference between MS_MOVE and pivot_root(). The
latter repivots the entire mount table getting rid of anything outside
of the new root. MS_MOVE otoh just mounts a bunch of mount points to the
top, leaving in place whatever might be underneath it.
Thus, if we go through the MS_MOVE codepath we must unmount everything
explicitly before doing so because otherwise the mounts will be pinned
forever, but be entirely invisble to userspace.
switch-root: when pivot_root() fails, but old root shall be mounted, do so
If pivot_root() fails, we'll fall back to switching root via MS_MOVE.
Unlike pivot_root() that won't place the old root fs anyway, but just
hide it. That's problematic during shutdown for example, since after all
we might still want to access it from the exitrd, to disassemble it
properly.
Hence let's make things somewhat systematic: regardless if pivot_root()
or MS_MOVE is used, always make the old root fs show up in the selected
new dir.
switch-root: rework SWITCH_ROOT_SKIP_RECURSIVE_RUN flag
Negative flags always raise eyebrows. Let's normalize
SWITCH_ROOT_SKIP_RECURSIVE_RUN to become SWITCH_ROOT_RECURSIVE_RUN, i.e.
make recursive behaviour opt-in, rather than opt-out. We only want it
for the initrd→host transition, and in all other cases we'd prefer to
avoid it.
This allows us to simplify some code. Also, normalize the mount point
table in switch_root() a bit, to be static const, and then just select
between two mount flag sets via SWITCH_ROOT_RECURSIVE_RUN, where the
mount flag without MS_BIND (i.e. zero) just means "skip this entry".
This does not actually change anything in behaviour, it's just
refactoring.
I'm keeping this as a separate commit. It is the first time version
information is manually added after 6a73a4f7c466887a03c9939300ba6864203b1b3f
and we might want to revert this later.
This is not good, because it breaks our promise that the base (usually either
machine-id or boot-id) cannot be derived from the result. Some application
using the library could use a null app id, inadvertently exposing the machine
or boot id. (This could happen because of forgotten initialization, or maybe
because the app id is configurable, and the user configures it wrongly.)
No functional change. In config_parse_address_generation_type() we would set
the output parameter and then say it's ignored, so it _looked_ like an error in
the code, but the variable was always initialized to SD_ID128_NULL anyway, so
the code was actually fine.
From RFC 4861 section 4.2.
> The Router Lifetime applies only to the router's usefulness as a default
> router; it does not apply to information contained in other message fields
> or options. Options that need time limits for their information include
> their own lifetime fields.
Hence, based on the lifetime field of the message header, we should not
drop any other information.
Note that, in ndisc_router_process_default(), we have already dropp the
default gateway when the lifetime is zero. Hence, we can safely drop the
change.