udev: rework how we handle the return value from spawned programs
When running PROGRAM="...", we would log
systemd-udevd[447]: Failed to wait spawned command '...': Input/output error
no matter why the program actually failed, at error level.
The code wouldn't distinguish between an internal failure and a failure in the
program being called and run sd_event_exit(..., -EIO) on any kind of error. EIO
is rather misleading here, becuase it suggests a serious error.
on_spawn_sigchld is updated to set the return code to distinguish failure to
spawn, including the program being killed by a signal (a negative return value),
and the program failing (positive return value).
The logging levels are adjusted, so that for PROGRAM= calls, which are
essentially "if" statements, we only log at debug level (unless we get a
timeout or segfault or another unexpected error).
pam_systemd: set $DBUS_SESSION_BUS_ADDRESS unconditionally
There's very little lost if the variable is set for a socket that isn't
connectible, but a lot lost (races, ...) if it's not set but the socket exists.
Also, drop the FIXME note, since we don't plan to revert this revert any time
soon.
man: systemctl: document effect of --all on journal output
Based on the journalctl documentation of this option added in 23ad99b519
(#10527), but with the first reference to “fields” replaced by “journal
messages”, since I think it’s less common to show other fields with
`systemctl status` (though it’s possible with the `-o` option).
This should not be necessary anymore after previous commit.
I don't quite remember what sequence of steps was failing, but right now
"meson build -Dslow-tests=true && ninja -C build fuzzers" work fine.
Use c99 static array size declarations in exported functions too
It seems quite useful to provide this additional information in public exported
functions.
This is a c99 feature, not supported in C++. Without the check in _sd-common.h:
FAILED: test-bus-vtable-cc@exe/src_libsystemd_sd-bus_test-bus-vtable-cc.cc.o
...
In file included from ../src/libsystemd/sd-bus/test-bus-vtable-cc.cc:9:
In file included from ../src/systemd/sd-bus-vtable.h:26:
In file included from ../src/systemd/sd-bus.h:26:
../src/systemd/sd-id128.h:38:47: error: static array size is a C99 feature, not permitted in C++
char *sd_id128_to_string(sd_id128_t id, char s[static SD_ID128_STRING_MAX]);
^
In .c files, I opted to use the define for consistency, even though we don't support
compilation with a C++ compiler, so the unconditional keyword would work too.
Removing the environment variable causes problems, e.g. Xfce and Chromium and
... don't communicate with the running dbus instance. If they attempt to start their
own instance, things become even more confusing. Those packages could be fixed
one by one, but removing the variable right now is causing too many problems.
YunQiang Su [Tue, 25 Dec 2018 11:01:17 +0000 (19:01 +0800)]
Pass separate dev_t var to device_path_parse_major_minor
MIPS/O32's st_rdev member of struct stat is unsigned long, which
is 32bit, while dev_t is defined as 64bit, which make some problems
in device_path_parse_major_minor.
Don't pass st.st_rdev, st_mode to device_path_parse_major_minor,
while pass 2 seperate variables. The result of stat is alos copied
out into these 2 variables. Fixes: #11247
test-json: check absolute and relative difference in floating point test
The test fails under valgrind, so there was an exception for valgrind.
Unfortunately that check only works when valgrind-devel headers are
available during build. But it is possible to have just valgrind installed,
or simply install it after the build, and then "valgrind test-json" would
fail.
It also seems that even without valgrind, this fails on some arm32 CPUs.
Let's do the usual-style test for absolute and relative differences.
docs: add a "front matter" snippet to our markdown pages
It turns out Jekyll (the engine behind GitHub Pages) requires that pages
include a "Front Matter" snippet of YAML at the top for proper rendering.
Omitting it will still render the pages, but including it opens up new
possibilities, such as using a {% for %} loop to generate index.md instead of
requiring a separate script.
I'm hoping this will also fix the issue with some of the pages (notably
CODE_OF_CONDUCT.html) not being available under systemd.io
Tested locally by rendering the website with Jekyll. Before this change, the
*.md files were kept unchanged (so not sure how that even works?!), after this
commit, proper *.html files were generated from it.
Burt P [Sun, 30 Dec 2018 03:49:49 +0000 (21:49 -0600)]
hwdb/sdio.ids: add BCM43438 + minor rewording of class name
* BCM43438 is used in the Raspberry Pi 3 B and B+
https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
"BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board"
* With this minor change to "C 00", each class name could be prefixed
with "Is a" and still make sense.
ikelos [Sat, 29 Dec 2018 19:01:10 +0000 (19:01 +0000)]
Improve kernel-install support for initrd files. (#11281)
The current support in kernel-install for initrd images doesn't copy
over the initrd file or allow a means for it to be specified (it
requires a specific filename in a particular directory).
This patchset adds support for (optionally) providing the name of
initial ramdisk file to copied over and used by kernel-install.
Thomas Haller [Fri, 28 Dec 2018 16:14:01 +0000 (17:14 +0100)]
build: don't include shared's "serialize.h" in basic's "time-util.c"
"src/basic/time-util.c" is part of src/basic and should not include
"src/shared/serialize.h". It is one of the few cases where this
is done. Also, it's not even required.
Paul Seyfert [Tue, 25 Dec 2018 18:30:50 +0000 (19:30 +0100)]
zsh/coredumpctl: complete argument for --debugger=
This way external commands (i.e. executables in the PATH) are suggested
at --debugger=<TAB>. Upon starting a path (e.g. --debugger=/<TAB> or
--debugger=./<TAB>), filenames of executables are completed.