Zbigniew Jędrzejewski-Szmek [Tue, 5 Feb 2019 16:05:56 +0000 (17:05 +0100)]
efivars: make sure that _packed_ structure members are actually aligned as expected
When looking for the terminating double-NUL, don't just read the memory
until the terminator is found, but use the information we got about the
buffer size.
The length parameter passed to utf16_to_utf8() would include the terminator, so
the converted string would end up with two terminators (the original one
converted to "utf8", still 0, and then the one that was always added anyway).
Instead let's pass just the length of the actual data to utf16_to_utf8().
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 17:43:41 +0000 (18:43 +0100)]
test-resolve: increase timeout to 120s
The test queries some domain names. If the DNS servers are unreachable,
e.g. in a rawhide container I get the total runtime of 24.5s usually, but
sometimes slightly longer, enough to reach the default timeout of 30s.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 17:04:22 +0000 (18:04 +0100)]
journal: drop _packed_ attribute in a few places
The justification is the safe as for the grandparent commit.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 16:13:42 +0000 (17:13 +0100)]
test-util: drop _packed_ attribute
gcc-9 warns:
../src/test/test-util.c:147:19: note: in expansion of macro ‘container_of’
147 | assert_se(container_of(&myval.v1, struct mytype, v1) == &myval);
| ^~~~~~~~~~~~
I don't think packing matters here for the test of container_of(), so let's
just remove it.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 16:09:21 +0000 (17:09 +0100)]
libsystemd-network: remove _packed_ attribute to appease the compiler
gcc-9 warns whenever the elements of a structure defined with _packed_ are used:
../src/network/networkd-dhcp6.c: In function ‘dhcp6_pd_prefix_assign’:
../src/network/networkd-dhcp6.c:92:53: warning: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Waddress-of-packed-member]
92 | r = manager_dhcp6_prefix_add(link->manager, &p->opt.in6_addr, link);
| ^~~~~~~~~~~~~~~~
And the compiler is right, because in principle the alignment could be wrong.
In this particular case it is not, because the structure is carefully defined
not to have holes. Let's remove _packed_ and use compile-time asserts to verify
that the offsets are not changed.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 08:37:26 +0000 (09:37 +0100)]
journal: avoid buffer overread when locale name is too long
We could potentially create an unterminated string and then call normal string
operations on it. Let's be more careful: first remove the suffix we ignore anyway,
then find if the string is of acceptable length, and possibly ignore it if it
is too long. The code rejects lengths above 31 bytes. Language names that are
actually used are much shorter, so this doesn't matter much.
Zbigniew Jędrzejewski-Szmek [Sun, 27 Jan 2019 08:35:36 +0000 (09:35 +0100)]
shared/dissect-image: make sure that we don't truncate device name
gcc-9 complains that the string may be truncated when written into the output
structure. This shouldn't happen, but if it did, in principle we could remove a
different structure (with a matching name prefix). Let's just refuse the
operation if the name doesn't fit.
Zbigniew Jędrzejewski-Szmek [Thu, 10 Jan 2019 21:29:01 +0000 (22:29 +0100)]
build-sys: bump package/library versions
We added sd_bus_close_unref().
Lennart Poettering [Sat, 26 Jan 2019 13:46:48 +0000 (14:46 +0100)]
Merge pull request #11562 from yuwata/fix-11558
core/mount: do not add Before=local-fs.target or remote-fs.target if nofail mount option is set
Lennart Poettering [Sat, 26 Jan 2019 13:42:02 +0000 (14:42 +0100)]
Merge pull request #11466 from keszybz/fix-loop-remounts
pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo
Zbigniew Jędrzejewski-Szmek [Thu, 17 Jan 2019 15:09:13 +0000 (16:09 +0100)]
pid1: fix cleanup of stale implicit deps based on /proc/self/mountinfo
The problem was introduced in
a37422045fbb68ad68f734e5dc00e0a5b1759773:
we have a unit which has a fragment, and when we'd update it based on
/proc/self/mountinfo, we'd say that e.g. What=/dev/loop8 has origin-fragment.
This commit changes two things:
- origin-fragment is changed to origin-mountinfo-implicit
- when we stop a unit, mountinfo information is flushed and all deps based
on it are dropped.
The second step is important, because when we restart the unit, we want to
notice that we have "fresh" mountinfo information. We could keep the old info
around and solve this in a different way, but keeping stale information seems
inelegant.
Fixes #11342.
Lennart Poettering [Sat, 26 Jan 2019 12:55:55 +0000 (13:55 +0100)]
Merge pull request #11530 from keszybz/journal-cache-trimming
Journal cache trimming
Lennart Poettering [Sat, 26 Jan 2019 12:55:32 +0000 (13:55 +0100)]
Merge pull request #11545 from xnox/ppc64el
test-functions: fixup PPC64 testing
Lennart Poettering [Sat, 26 Jan 2019 10:37:06 +0000 (11:37 +0100)]
units: drop conditionalization of systemd-tmpfiles-setup-dev.service
Currently, tmpfiles runs in two separate services at boot. /dev is
populated by systemd-tmpfiles-setup-dev.service and everything else by
systemd-tmpfiles-setup.service. The former was so far conditionalized by
CAP_SYS_MODULES. The reasoning was that the primary purpose of
populating /dev was to create device nodes based on the static device
node info exported in kernel modules through MODALIAS. And without the
privs to load kernel modules doing so is unnecessary. That thinking is
incomplete however, as there might be reason to create stuff in /dev
outside of the static modalias usecase. Thus, let's drop the
conditionalization to ensure that tmpfiles.d rules are always executed
at least once under all conditions.
Fixes: #11544
Lennart Poettering [Sat, 26 Jan 2019 11:18:16 +0000 (12:18 +0100)]
nspawn: ignore SIGPIPE for nspawn itself
Let's not abort due to a dead stdout.
Fixes: #11533
Michal Sekletar [Tue, 22 Jan 2019 13:29:50 +0000 (14:29 +0100)]
process-util: don't use overly large buffer to store process command line
Allocate new string as a return value and free our "scratch pad"
buffer that is potentially much larger than needed (up to
_SC_ARG_MAX).
Fixes #11502
Yu Watanabe [Sat, 26 Jan 2019 12:05:27 +0000 (13:05 +0100)]
man: update DefaultDependency= in systemd.mount(5)
Follow-up for
d54bab90e64f70c1ecf9b0683a98adb8485ed09e and the
previous commit.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 16:30:48 +0000 (17:30 +0100)]
journald: periodically drop cache for all dead PIDs
In normal use, this allow us to drop dead entries from the cache and reduces
the cache size so that we don't evict entries unnecessarily. The time limit is
there mostly to serve as a guard against malicious logging from many different
PIDs.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 15:12:52 +0000 (16:12 +0100)]
journal: limit the number of entries in the cache based on available memory
This is far from perfect, but should give mostly reasonable values. My
assumption is that if somebody has a few hundred MB of memory, they are
unlikely to have thousands of processes logging. A hundred would already be a
lot. So let's scale the cache size propritionally to the total memory size,
with clamping on both ends.
The formula gives 64 cache entries for each GB of RAM.
Zbigniew Jędrzejewski-Szmek [Sat, 26 Jan 2019 10:27:18 +0000 (11:27 +0100)]
basic/prioq: add prioq_peek_item()
zsergeant77 [Thu, 24 Jan 2019 21:03:30 +0000 (00:03 +0300)]
Update 60-sensor.hwdb
Added mount matrix for Digma CITI E203 hybrid
Yu Watanabe [Sat, 26 Jan 2019 11:00:04 +0000 (12:00 +0100)]
core/mount: do not add Before=local-fs.target or remote-fs.target if nofail mount option is set
Follow-up for
d54bab90e64f70c1ecf9b0683a98adb8485ed09e.
Fixes #11558.
Jonathan Roemer [Sat, 26 Jan 2019 00:46:15 +0000 (18:46 -0600)]
Add missing dash to --all option in the timedatectl man page
Dimitri John Ledkov [Tue, 20 Feb 2018 12:01:40 +0000 (12:01 +0000)]
test/test-functions: on PPC64 use hvc0 console
Dimitri John Ledkov [Mon, 19 Feb 2018 20:47:41 +0000 (20:47 +0000)]
test/test-functions: on PP64 use vmlinux
At least on Ubuntu, ppc64el uses vmlinux-, not vmlinuz. With this, it should be
possible to run qemu tests on ppc64el as part of Ubuntu autopkgtests.
Thomas Haller [Fri, 25 Jan 2019 10:24:06 +0000 (11:24 +0100)]
dhcp/trivial: fix spelling error in comment
Lennart Poettering [Thu, 24 Jan 2019 23:18:45 +0000 (00:18 +0100)]
Merge pull request #11547 from yuwata/network-cosmetic-fixes
network: trivial fix and cleanup
Niklas Hambüchen [Thu, 24 Jan 2019 19:52:01 +0000 (20:52 +0100)]
timesyncd: Improve sync log message. Fixes #11548.
This makes it clear that the user should not expect more log messages
each time the time is synchronised.
Lennart Poettering [Thu, 24 Jan 2019 09:19:33 +0000 (10:19 +0100)]
test-bpf: check if we can mlock() before trying bpf
Yu Watanabe [Thu, 24 Jan 2019 05:33:58 +0000 (14:33 +0900)]
network: fix an error log
Yu Watanabe [Thu, 24 Jan 2019 03:07:41 +0000 (12:07 +0900)]
network: make link_up() static
Lennart Poettering [Wed, 23 Jan 2019 22:35:38 +0000 (23:35 +0100)]
Merge pull request #11536 from yuwata/fix-11529
sd-device-monitor: use SO_DETACH_FILTER to remove BPF program
Chris Lamb [Wed, 23 Jan 2019 21:33:29 +0000 (22:33 +0100)]
Correct more spelling errors.
Ayman Bagabas [Tue, 22 Jan 2019 04:50:35 +0000 (23:50 -0500)]
hwdb: fix duplicate events on Huawei MACH-WX9
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Yu Watanabe [Wed, 23 Jan 2019 06:03:37 +0000 (15:03 +0900)]
test: add test for sd_device_monitor_filter_remove()
Yu Watanabe [Wed, 23 Jan 2019 05:27:17 +0000 (14:27 +0900)]
sd-device-monitor: use SO_DETACH_FILTER to remove BPF program
Fixes #11529.
Filipe Brandenburger [Tue, 22 Jan 2019 19:52:04 +0000 (11:52 -0800)]
README: remove Coverity Scan badge
The badge is currently serving a broken image, since Coverity Scan is currently
having an outage. See Issue #11185 for more details. We can restore the badge
by reverting this commit once their service is up again.
Chris Lamb [Mon, 21 Jan 2019 23:43:22 +0000 (23:43 +0000)]
hwdb: Add support for Purism Librem 13 V4 keyboards
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 14:43:07 +0000 (15:43 +0100)]
procfs-util: expose functionality to query total memory
procfs_memory_get_current is renamed to procfs_memory_get_used, because
"current" can mean anything, including total memory, used memory, and free
memory, as long as the value is up to date.
No functional change.
Louis Taylor [Mon, 21 Jan 2019 21:45:36 +0000 (21:45 +0000)]
meson: make version a dependency and use it in libbasic
This should hopefully ensure it gets generated before basic build
happens.
Fixes #11483.
Lennart Poettering [Tue, 22 Jan 2019 10:57:06 +0000 (11:57 +0100)]
Merge pull request #11501 from yuwata/fix-9426
sd-device: do not save e.g., DEVPATH or INTERFACE properties to udev database
Taro Yamada [Tue, 22 Jan 2019 02:47:45 +0000 (11:47 +0900)]
Fixes #11128
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 09:33:27 +0000 (10:33 +0100)]
hwdb: update
Looks to be additions and corrections again. It seems somebody removed
some whitespace in variuos places by mistake, let's hope this gets corrected
upstream. Doing such corrections downstream is not worth the trouble.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 09:07:52 +0000 (10:07 +0100)]
Merge pull request #11448 from poettering/rlimit-pid1-fixo
RLIMIT_MEMLOCK fixes
Lennart Poettering [Tue, 22 Jan 2019 08:57:49 +0000 (09:57 +0100)]
resolved: preferably route single-label lookups to unicast DNS scopes with search domains (#11485)
Fixes: #11391
Yu Watanabe [Tue, 22 Jan 2019 06:52:39 +0000 (15:52 +0900)]
man: udevadm: clarify the behavior when multiple matching rules are specified
Closes #2995.
Zbigniew Jędrzejewski-Szmek [Tue, 22 Jan 2019 07:30:26 +0000 (08:30 +0100)]
Merge pull request #11519 from yuwata/udevadm-info-2476
udevadm info: make -P imply -x and update man page
Michal Sekletar [Mon, 21 Jan 2019 22:05:46 +0000 (23:05 +0100)]
man: document db_persist udev rules OPTION
Fixes #1551
Yu Watanabe [Tue, 22 Jan 2019 06:05:55 +0000 (15:05 +0900)]
man: add more explanation about options for "udevadm test"
Closes #2476.
Yu Watanabe [Tue, 22 Jan 2019 06:00:33 +0000 (15:00 +0900)]
udevadm info: make --export-prefix imply --export
Setting --export without --export-prefix is meaningless.
Yu Watanabe [Tue, 22 Jan 2019 03:02:48 +0000 (12:02 +0900)]
core/device: fix log message
Yu Watanabe [Tue, 22 Jan 2019 02:45:40 +0000 (11:45 +0900)]
sd-device: do not save e.g., DEVPATH or INTERFACE properties to udev database
Previously, device_copy_properties() copies all properties to both
sd_device::properties and ::properties_db. Thus, on move uevent,
also tentative properties, e.g. DEVPATH or INTERFACE, are stored to
::properties_db, and saved to udev database.
This makes such tentative properties be copied to only ::properties,
and thus not saved to udev database.
Fixes #9426.
Yu Watanabe [Fri, 18 Jan 2019 22:59:17 +0000 (07:59 +0900)]
wait-online: do not fail if we receive invalid messages
Fixes #11486.
Yu Watanabe [Fri, 18 Jan 2019 03:55:15 +0000 (12:55 +0900)]
network: unset Network::manager when loading .network file fails
Otherwise, LIST_REMOVE() in network_free() fails.
This fixes the following assertion:
```
systemd-networkd[2595]: Bus bus-api-network: changing state UNSET → OPENING
systemd-networkd[2595]: Bus bus-api-network: changing state OPENING → AUTHENTICATING
systemd-networkd[2595]: timestamp of '/etc/systemd/network' changed
systemd-networkd[2595]: /etc/systemd/network/10-hoge.network:1: Invalid section header '[Network]Address=192.168.0.1'
systemd-networkd[2595]: /etc/systemd/network/10-hoge.network:1: Failed to parse file: Bad message
systemd-networkd[2595]: Assertion '*_head == _item' failed at ../../home/watanabe/git/systemd/src/network/networkd-network.c:378, function network_free(). Aborting.
valgrind[2595]: ==2595==
valgrind[2595]: ==2595== Process terminating with default action of signal 6 (SIGABRT): dumping core
valgrind[2595]: ==2595== at 0x4BCA53F: raise (in /usr/lib64/libc-2.28.so)
valgrind[2595]: ==2595== by 0x4BB4894: abort (in /usr/lib64/libc-2.28.so)
valgrind[2595]: ==2595== by 0x4955F09: log_assert_failed_realm (log.c:795)
valgrind[2595]: ==2595== by 0x417101: network_free (networkd-network.c:378)
valgrind[2595]: ==2595== by 0x415E99: network_freep (networkd-network.h:282)
valgrind[2595]: ==2595== by 0x416AB2: network_load_one (networkd-network.c:101)
valgrind[2595]: ==2595== by 0x416C39: network_load (networkd-network.c:293)
valgrind[2595]: ==2595== by 0x414031: manager_load_config (networkd-manager.c:1502)
valgrind[2595]: ==2595== by 0x40B258: run (networkd.c:82)
valgrind[2595]: ==2595== by 0x40B74A: main (networkd.c:117)
valgrind[2595]: ==2595==
valgrind[2595]: ==2595== HEAP SUMMARY:
valgrind[2595]: ==2595== in use at exit: 32,621 bytes in 201 blocks
valgrind[2595]: ==2595== total heap usage: 746 allocs, 545 frees, 241,027 bytes allocated
valgrind[2595]: ==2595==
valgrind[2595]: ==2595== LEAK SUMMARY:
valgrind[2595]: ==2595== definitely lost: 0 bytes in 0 blocks
valgrind[2595]: ==2595== indirectly lost: 0 bytes in 0 blocks
valgrind[2595]: ==2595== possibly lost: 0 bytes in 0 blocks
valgrind[2595]: ==2595== still reachable: 32,621 bytes in 201 blocks
valgrind[2595]: ==2595== suppressed: 0 bytes in 0 blocks
valgrind[2595]: ==2595== Reachable blocks (those to which a pointer was found) are not shown.
valgrind[2595]: ==2595== To see them, rerun with: --leak-check=full --show-leak-kinds=all
valgrind[2595]: ==2595==
valgrind[2595]: ==2595== For counts of detected and suppressed errors, rerun with: -v
valgrind[2595]: ==2595== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
systemd-coredump[2600]: Process 2595 (memcheck-amd64-) of user 192 dumped core.
```
Yu Watanabe [Wed, 16 Jan 2019 22:25:14 +0000 (07:25 +0900)]
man: mention that 'udevadm control --exit' restarts systemd-udevd.service
Closes #1802.
Mike Gilbert [Sun, 20 Jan 2019 16:32:45 +0000 (11:32 -0500)]
test-process-util: do not assume PID 1 has UID=0
Gentoo's Portage package manager uses a PID namespace for process
isolation and cleanup. In this namespace, PID 1 has UID=250 (portage).
Bug: https://bugs.gentoo.org/674458
Jonathon Kowalski [Thu, 17 Jan 2019 18:28:20 +0000 (18:28 +0000)]
Enable some more debug logging for transaction building
Topi Miettinen [Fri, 18 Jan 2019 21:32:28 +0000 (23:32 +0200)]
Document weaknesses with MDWE and suggest hardening
Closes #11473
Frantisek Sumsal [Fri, 18 Jan 2019 19:49:29 +0000 (20:49 +0100)]
test: mark plymouth as optional dependency
rescue.service pulls in /bin/plymouth, which doesn't exist on some
distributions (e.g. Arch Linux). Let's mark it as optional, as it's not
even required by the referencing unit and causes unwanted fails in the
integration testsuite.
Louis Taylor [Fri, 18 Jan 2019 19:40:52 +0000 (19:40 +0000)]
NEWS: add section about backslashes in EnvironmentFile
As a follow-up from #11427.
Frantisek Sumsal [Fri, 18 Jan 2019 21:32:42 +0000 (22:32 +0100)]
meson: bump timeout for test-udev to 180s
On some (mainly virtual) machines the last test takes more than 30
seconds, which causes unnecessary fails, as the test itself is working
properly.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Jan 2019 07:21:27 +0000 (08:21 +0100)]
Revert "hwdb: Fix secondary backslash on MSI GS65 laptop"
This reverts commit
e05c8b44622afe4256f3bb361cfb2c7db32fff8e.
The key in question is labeled as "|\" in the US version, and e.g. "<>" in
European version. In the US version there are two keys with the same label
and they are both mapped to the same keycode. Let's revert the patch, to unbreak
the non-US users.
US users should apply some local work-around, possibly simply keeping the
contents of the patch as a file in hwdb.d/.
Louis Taylor [Fri, 18 Jan 2019 21:41:15 +0000 (21:41 +0000)]
mkosi: add qrencode to arch package list
Before adding this, I got errors about the library being missing such
as:
journalctl: error while loading shared libraries: libqrencode.so.4: cannot open shared object file: No such file or directory
Fixes #7367.
Lennart Poettering [Fri, 18 Jan 2019 16:58:20 +0000 (17:58 +0100)]
Merge pull request #11424 from yuwata/fix-11420
timedate: refuse setting time when unit is in 'activating' or friends
Zbigniew Jędrzejewski-Szmek [Fri, 18 Jan 2019 16:41:00 +0000 (17:41 +0100)]
Merge pull request #11349 from yuwata/udevadm-control-ping
Add 'udevadm control --ping'
Lennart Poettering [Thu, 17 Jan 2019 11:24:14 +0000 (12:24 +0100)]
execute: make sure to call into PAM after initializing resource limits
We want that pam_limits takes precedence over our settings, after all.
Fixes: #11386
Lennart Poettering [Thu, 17 Jan 2019 11:23:21 +0000 (12:23 +0100)]
fd-util: rework how we determine highest possible fd
Lennart Poettering [Wed, 16 Jan 2019 17:06:18 +0000 (18:06 +0100)]
main: when generating the resource limit to pass to children, take FD_SETSIZE into consideration
When we synthesize a "struct rlimit" structure to pass on for
RLIMIT_NOFILE to our children, let's explicitly make sure that the soft
limit is not above FD_SETSIZE, for compat reason with select().
Note this only applies when we derive the "struct rlimit" from what we
inherited. If the user configures something explicitly it always takes
precedence.
Lennart Poettering [Wed, 16 Jan 2019 17:05:14 +0000 (18:05 +0100)]
main: don't bump resource limits if they are higher than we need them anyway
This matters in particular in the case of --user, since there we lack
the privs to bump the limits up again later on when invoking children.
Lennart Poettering [Wed, 16 Jan 2019 13:50:03 +0000 (14:50 +0100)]
main: add commenting, clean up handling of saved resource limits
This doesn't really change behaviour, but adds comments and uses more
symbolic names for everything, to make this more readable.
Lennart Poettering [Wed, 16 Jan 2019 13:47:09 +0000 (14:47 +0100)]
main: when bumping RLIMIT_MEMLOCK, save the previous value to pass to children
Let's make sure that the bumping of RLIMIT_MEMLOCK does not leak into
our children.
Yu Watanabe [Sat, 12 Jan 2019 23:14:17 +0000 (08:14 +0900)]
bash-completion: udevadm: support recently added options
Yu Watanabe [Sat, 12 Jan 2019 23:12:24 +0000 (08:12 +0900)]
udevd: rename control command SYNC -> PING in log message
Yu Watanabe [Sat, 12 Jan 2019 23:10:12 +0000 (08:10 +0900)]
udevadm: add --wait-daemon option to 'trigger' command
Yu Watanabe [Sat, 12 Jan 2019 22:44:38 +0000 (07:44 +0900)]
udevadm: add --ping option to 'control' command
This exposes `udev_ctrl_send_ping()`.
Zbigniew Jędrzejewski-Szmek [Thu, 17 Jan 2019 20:17:51 +0000 (21:17 +0100)]
core/mount: move static function earlier in file
No functional change.
Zbigniew Jędrzejewski-Szmek [Fri, 18 Jan 2019 12:45:10 +0000 (13:45 +0100)]
NEWS: retroactively describe .include deprecation
Closes #11479.
Yu Watanabe [Fri, 18 Jan 2019 06:16:22 +0000 (15:16 +0900)]
sd-event: introduce event_free_signal_data()
We already have event_free_inotify_data() and event_free_inode_data().
Lennart Poettering [Fri, 18 Jan 2019 12:51:15 +0000 (13:51 +0100)]
Merge pull request #11450 from keszybz/drop-nolegacy
Drop unused NOLEGACY define
Jonathon Kowalski [Thu, 17 Jan 2019 17:08:00 +0000 (17:08 +0000)]
Change job mode of manager triggered restarts to JOB_REPLACE
Fixes: #11305
Fixes: #3260
Related: #11456
So, here's what happens in the described scenario in #11305. A unit goes
down, and that triggeres stop jobs for the other two units as they were
bound to it. Now, the timer for manager triggered restarts kicks in and
schedules a restart job with the JOB_FAIL job mode. This means there is
a stop job installed on those units, and now due to them being bound to
us they also get a restart job enqueued. This however is a conflicts, as
neither stop can merge into restart, nor restart into stop. However,
restart should be able to replace stop in any case. If the stop
procedure is ongoing, it can cancel the stop job, install itself, and
then after reaching dead finish and convert itself to a start job.
However, if we increase the timer, then it can always take those units
from inactive -> auto-restart.
We change the job mode to JOB_REPLACE so the restart job cancels the
stop job and installs itself.
Also, the original bug could be worked around by bumping RestartSec= to
avoid the conflicting.
This doesn't seem to be something that is going to break uses. That is
because for those who already had it working, there must have never been
conflicting jobs, as that would result in a desctructive transaction by
virtue of the job mode used.
After this change, the test case is able to work nicely without issues.
Lennart Poettering [Fri, 18 Jan 2019 12:50:15 +0000 (13:50 +0100)]
Merge pull request #11427 from kragniz/10659-env-file-quotes
util-lib: follow shell syntax for escape in quotes
Mike Auty [Thu, 17 Jan 2019 18:06:09 +0000 (18:06 +0000)]
Add multiple initrd file support to kernel-install
Instead of having just a single INITRD field, add support for all
additional parameters being INITRD fields in order.
Signed-off-by: Mike Auty <mike.auty@gmail.com>
dcanuhe [Fri, 18 Jan 2019 12:49:30 +0000 (09:49 -0300)]
add hwdb rule for Bangho touchpad (#11475)
add hwdb rule for Bangho touchpad
Lennart Poettering [Fri, 18 Jan 2019 12:48:52 +0000 (13:48 +0100)]
Merge pull request #11465 from poettering/daemon-bus-flush
flush+close bus connections explicitly when our daemons go down
Lennart Poettering [Thu, 17 Jan 2019 19:06:55 +0000 (20:06 +0100)]
Merge pull request #11449 from keszybz/udev-link-naming-again
Make udev link re-renaming conditional
Lennart Poettering [Thu, 17 Jan 2019 18:47:19 +0000 (19:47 +0100)]
tree-wide: fix some trailing whitespace
@bl33pbl0p, please fix your editor
(Apparently you never configured the source tree? If you did, then the
git pre-commit hook would have been enabled which doesn't allow
commiting non-whitespace clean stuff...)
Lennart Poettering [Thu, 17 Jan 2019 17:36:01 +0000 (18:36 +0100)]
Merge pull request #11378 from keszybz/export-dbus-address-conditionally
Export dbus address conditionally
Lennart Poettering [Thu, 17 Jan 2019 17:08:01 +0000 (18:08 +0100)]
Merge pull request #11375 from daxtens/issue5882
network: Fix IPv6 PreferredSource routes
Jörg Thalheim [Mon, 14 Jan 2019 15:14:32 +0000 (15:14 +0000)]
tools/choose-default-locale.sh: set shebang to /bin/sh
The script does not use any bash features.
On NixOS we have /bin/sh and /usr/bin/env for posix compatibility
but not /bin/bash as it is stored in our nix store.
With this change one can run the `meson configure` without patching
which greatly helps, when working on upstream contributions.
Louis Taylor [Tue, 15 Jan 2019 18:51:31 +0000 (18:51 +0000)]
tree-wide: use '"' instead of '\"'
The escape used previously was redundant and made things more confusing.
Lennart Poettering [Thu, 17 Jan 2019 15:10:58 +0000 (16:10 +0100)]
core: shorten code by using new helper
Lennart Poettering [Thu, 17 Jan 2019 15:07:22 +0000 (16:07 +0100)]
tree-wide: whenever we allocate a new bus object, close it before dropping final ref
This doesn't really change much, but feels more correct to do, as it
ensures that all messages currently queued in the bus connections are
definitely unreffed and thus destryoing of the connection object will
follow immediately.
Strictly speaking this change is entirely unnecessary, since nothing
else could have acquired a ref to the connection and queued a message
in, however, now that we have the new sd_bus_close_unref() helper it
makes a lot of sense to use it here, to ensure that whatever happens
nothing that might have been queued fucks with us.
Lennart Poettering [Thu, 17 Jan 2019 14:54:37 +0000 (15:54 +0100)]
initctl: shorten and update code a bit
Lennart Poettering [Thu, 17 Jan 2019 14:53:15 +0000 (15:53 +0100)]
tree-wide: make sure to flush/close all bus connections when our daemons exit
Let's make sure everything is written out ebfore we exit, so that no
messages keep our bus connections referenced.
Fixes: #11462
Lennart Poettering [Thu, 17 Jan 2019 14:51:08 +0000 (15:51 +0100)]
sd-bus: add sd_bus_close_unref() helper
It's similar to sd_bus_flush_close_unref() but doesn't do the flushing.
This is useful since this will still discnnect the connection properly
but not synchronously wait for the peer to take our messages.
Primary usecase is within _cleanup_() expressions where synchronously
waiting on the peer is not OK.
Louis Taylor [Mon, 14 Jan 2019 21:35:10 +0000 (21:35 +0000)]
util-lib: follow shell syntax for escape in quotes
Fixes #10659.
This changes the behaviour of parsing environment files to more closely
follow POSIX shell standards.
This has the effect that these variables defined in a file:
VAR1='\value'
VAR2="\value"
Are now interpreted as `\value` instead of interpreting the `\`
character and interpreting them as `value`.
For more information about the behaviour followed, see:
http://pubs.opengroup.org/onlinepubs/
9699919799/utilities/V3_chap02.html#tag_18_02
Zbigniew Jędrzejewski-Szmek [Thu, 17 Jan 2019 12:53:00 +0000 (13:53 +0100)]
man: use <varname> and <option> instead of <literal> in systemd.link(5)
This looks better and allows those terms to be indexed in systemd.directives.
In particular, <literal></literal> is dropped from around section names
([Match] and others) because the parens are distinctive enough on their own.
The same style is used in systemd.unit(5) and other pages that describe
sections.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Jan 2019 21:38:22 +0000 (22:38 +0100)]
NEWS: describe the naming scheme updates
Zbigniew Jędrzejewski-Szmek [Wed, 16 Jan 2019 13:53:49 +0000 (14:53 +0100)]
link-config: default to "keep" policy if naming-scheme<=239 is used
This makes the new (>=240) behaviour conditional, restoring backwards compat, as least
as long as an old naming scheme is used.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Jan 2019 13:47:56 +0000 (14:47 +0100)]
udev: move naming-scheme bits into their own file