Martin Wilck [Wed, 25 Apr 2018 15:21:49 +0000 (17:21 +0200)]
test/sd-script.py: new helper script for udev testing
Script for generating LOTS of SCSI disk and partition devices in
the fake sysfs we use for udev testing.
This script is supposed to be run after sys-script.py. It uses
code from sys-script.py as template to generate additional SCSI disk data
structures. Together with the "generator" code in udev-test.pl
added in the previous patch, it allows to run udev tests with almost
arbitrarily many devices, and thus to do performance scaling tests.
Martin Wilck [Wed, 25 Apr 2018 07:54:26 +0000 (09:54 +0200)]
test/udev-test.pl: generator for large list of block devices
Manually listing all devices in the test definition becomes cumbersome with
lots of devices. Add a function that scans on all block devices in
the test sysfs and generates a list of devices to test.
Martin Wilck [Tue, 24 Apr 2018 20:24:43 +0000 (22:24 +0200)]
test/udev-test.pl: add repeat count
for easier reproduction of sporadic test failures.
Martin Wilck [Tue, 24 Apr 2018 20:04:55 +0000 (22:04 +0200)]
tests/udev-test.pl: add multiple device test
Add 4 new tests using multiple devices. Number 2-4 use many
devices claiming the same symlink, where only one device has
a higher priority thatn the others. They fail sporadically with
the current code, if a race condition causes the symlink to point
to the wrong device. Test 4 is like test 2 with sleeps in between,
it's much less likely to fail.
Martin Wilck [Tue, 24 Apr 2018 18:55:01 +0000 (20:55 +0200)]
test/udev-test.pl: count "good" results
This is helpful to catch possible regressions in the test.
Also, don't count wait() errors, they are likely not udev errors.
Martin Wilck [Tue, 24 Apr 2018 16:30:09 +0000 (18:30 +0200)]
test/udev-test.pl: merge import parent tests into one
As we can test multiple devices and multiple links per device
in one test now, these two tests can be merged into one.
Martin Wilck [Tue, 24 Apr 2018 16:27:25 +0000 (18:27 +0200)]
test/udev-test.pl: merge "space and var with space" tests
As we can check multiple links in a single test now, these 3
tests can be merged into one.
Martin Wilck [Tue, 24 Apr 2018 16:16:59 +0000 (18:16 +0200)]
test/udev-test.pl: remove bogus rules from magic subsys test
These rules have survived from an ancient version of the code
and save no purpose any more.
Martin Wilck [Tue, 24 Apr 2018 16:09:50 +0000 (18:09 +0200)]
test/udev-test.pl: Make some tests a little harder
Add some rules that make it a bit harder to pass, mainly the
non-existence checks.
Martin Wilck [Tue, 24 Apr 2018 16:08:18 +0000 (18:08 +0200)]
test/udev-test.pl: last_rule is unsupported
the "last_rule" option hasn't been supported for some time.
Therefore this test fails if a "not_exp_links" attribute is added,
as it should be. Mark it appropriately.
Martin Wilck [Tue, 24 Apr 2018 15:57:47 +0000 (17:57 +0200)]
test/udev-test.pl: fix wrong test descriptions
udev hasn't supported renaming device nodes for some time.
Martin Wilck [Tue, 24 Apr 2018 15:15:58 +0000 (17:15 +0200)]
test/udev-test.pl: allow checking multiple symlinks
Instead of testing the existence or non-exisitence of just a single
symlink, allow testing of several links per device.
Change the test definitions accordingly.
Martin Wilck [Tue, 24 Apr 2018 08:50:24 +0000 (10:50 +0200)]
test/udev-test.pl: test correctness of symlink targets
Test if symlinks are created correctly by comparing the symlink
targets to the devnode path. This implies (for the symlink) that
major/minor numbers and permissions are correct, as we have tested
that on the devnode already.
Martin Wilck [Tue, 24 Apr 2018 07:38:26 +0000 (09:38 +0200)]
test/udev-test.pl: use computed devnode name
More often than not, the created devnode is the basename of the
sysfs entry. The "devnode" device may be used to override the
auto-detected node name.
Permissions and major/minor number are now verified on the devnode
itself, not on symlinks.
For those tests where exp_name is set to the computed devnode name,
the explicit "exp_name" can be removed. "exp_name" is only required for
symlinks.
This allows separate testing for devnodes and symlinks an a follow-up
patch.
Martin Wilck [Mon, 23 Apr 2018 19:59:05 +0000 (21:59 +0200)]
test/udev-test.pl: allow concurrent additions and removals
Allow testing cases where multiple devices are added and removed
simultaneously. Tests are started as synchronously as possible using a
semaphore, in order to test possible race conditions. If this isn't desired,
the test parameter "sleep_us" can be set to the number of microseconds to wait
between udev invocations.
Martin Wilck [Mon, 23 Apr 2018 19:58:12 +0000 (21:58 +0200)]
test/udev-test.pl: create rules only once
It's not necessary to write the rules for every udev run, as we
now may have many (rather than just 2) per test.
Martin Wilck [Fri, 20 Apr 2018 20:38:30 +0000 (22:38 +0200)]
test/udev-test.pl: allow multiple devices per test
Allow testing cases where multiple devices are added and removed.
This implies a change of the data structure: every test allows
for multiple devices to be added, and "exp_name" etc. are now properties
of the device, not of the test.
Purushottam choudhary [Wed, 28 Oct 2020 16:41:49 +0000 (22:11 +0530)]
network: selinux hook handling to enumerate nexthop
When selinux is enabled, the call of
manager_rtnl_enumerate_nexthop() fails.
This fix is to facilitate selinux hook handling for enumerating
nexthop.
In manager_rtnl_enumerate_nexthop() there is a check
if "Not supported" is returned by the send_netlink() call.
This check expects that -EOPNOTSUPP is returned,
the selinux hook seems to return -EINVAL instead.
This happens in kernel older than 5.3
(more specificallytorvalds/linux@
65ee00a) as it does not support
nexthop handling through netlink.
And if SELinux is enforced in the order kernel, callingRTM_GETNEXTHOP
returns -EINVAL.
Thus adding a call in the manager_rtnl_enumerate_nexthop for the
extra return -EINVAL.
Sorin Ionescu [Sat, 31 Oct 2020 08:07:27 +0000 (04:07 -0400)]
Fix typo
Lennart Poettering [Tue, 27 Oct 2020 08:56:08 +0000 (09:56 +0100)]
automount: make user unmounting for automount units more debuggable
Let's add an explicit log message plus an error state for automount
units, if users explicitly unmounted our autofs mount.
Prompted by: #17448
Lennart Poettering [Tue, 27 Oct 2020 08:57:28 +0000 (09:57 +0100)]
pid1: various minor watchdog modernizations
Just some clean-ups.
Yu Watanabe [Fri, 30 Oct 2020 00:52:45 +0000 (09:52 +0900)]
Merge pull request #17399 from afq984/udev-escaped-string
Allow escaped string in udev rules
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 18:27:29 +0000 (19:27 +0100)]
Merge pull request #17444 from BtbN/fix_ib_dhcp4
networkd: fix DHCP on InfiniBand interfaces
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 18:05:05 +0000 (19:05 +0100)]
Merge pull request #17472 from keszybz/spdx-license-headers
More SPDX license headers
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 17:58:56 +0000 (18:58 +0100)]
Merge pull request #17476 from poettering/resolved-tweaks
three small resolved cleanups
Hans de Goede [Thu, 29 Oct 2020 10:29:41 +0000 (11:29 +0100)]
hwdb: Add accel orientation quirk for Predia Basic tablet
Add a quirk to fix the accelerometer orientation on the
Predia Basic tablet.
Yu, Li-Yu [Thu, 29 Oct 2020 12:58:16 +0000 (20:58 +0800)]
document udev escaped string in udev(7)
Yu, Li-Yu [Sat, 24 Oct 2020 18:01:29 +0000 (02:01 +0800)]
udev: add fuzzer for udev_rule_parse_value
Yu, Li-Yu [Tue, 20 Oct 2020 16:38:44 +0000 (00:38 +0800)]
udev: test udev_rule_parse_value()
Yu, Li-Yu [Tue, 20 Oct 2020 16:38:21 +0000 (00:38 +0800)]
udev: escaped string syntax e"..." in rule files
* Existing valid rule files written with KEY="value" are not affected
* Now, KEY=e"value\n" becomes valid. Where `\n` is a newline character
* Escape sequences supported by src/basic/escape.h:cunescape() is
supported
Zbigniew Jędrzejewski-Szmek [Thu, 29 Oct 2020 09:54:38 +0000 (10:54 +0100)]
headers: use custom LicenseRef- spdx tag for various "public domain" files
There is no spdx tag defined for those versions of "public domain", but we can
add a custom tag, see
https://spdx.github.io/spdx-spec/6-other-licensing-information-detected/.
crc32.h is updated to match crc32.c.
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:32:27 +0000 (18:32 +0100)]
headers: add spdx tags to imported files with a known license
I added the header in the cases where the license text is present and it is
easy to find the appropriate SPDX header.
For "public domain" stuff: SDPX treats each "public domain" license as unique [1],
but luckily the one in siphash24.c is one of the identified variants. There are
some other cases which specify "public domain" but there doesn't seem to be a
SPDX identifier.
[1] https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files
gunicode.[ch] are imported from glib, which is licensed as LGPL2.1+,
see https://gitlab.gnome.org/GNOME/glib/-/blob/master/glib/gunicode.h.
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:18:57 +0000 (18:18 +0100)]
time-wait-sync: drop gpl snail mail boilerplate
No idea why this chunk was left when we removed the other copies.
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:18:20 +0000 (18:18 +0100)]
tree-wide: use the usual SPDX header for our own files
Yu Watanabe [Thu, 29 Oct 2020 07:11:40 +0000 (16:11 +0900)]
journalctl: drop format_journal_url() if gcrypt is not used
Follow-up for
f1b823596f8a4dc6b1f76206b7473bac71e3840b.
Luca Weiss [Wed, 28 Oct 2020 21:11:23 +0000 (22:11 +0100)]
Update org.freedesktop.hostname1 documentation
This documents the polkit actions for `SetDeployment()` and `SetLocation()` which previously were undocumented.
Zbigniew Jędrzejewski-Szmek [Wed, 28 Oct 2020 17:21:13 +0000 (18:21 +0100)]
Merge pull request #17435 from poettering/event-shuffle-refactor
sd-event: split up sd_event_source_set_enable() function
Zbigniew Jędrzejewski-Szmek [Wed, 28 Oct 2020 17:20:27 +0000 (18:20 +0100)]
Merge pull request #17454 from keszybz/journal-dlopen-cleanup
Journal dlopen cleanup and qrcode printing test
Zbigniew Jędrzejewski-Szmek [Wed, 28 Oct 2020 17:00:04 +0000 (18:00 +0100)]
Merge pull request #17467 from keszybz/unconditionally-pull-in-cryptsetup-remote
Unconditionally pull in cryptsetup-remote.target in the initramfs
Timo Rothenpieler [Wed, 28 Oct 2020 12:34:28 +0000 (13:34 +0100)]
networkctl: use and print full hardware address
Intentionally not checking the iftype for the ieee_oui lookup to support
other ethernet-like devices.
Timo Rothenpieler [Mon, 26 Oct 2020 13:09:13 +0000 (14:09 +0100)]
dhcp4: fix DHCP on InfiniBand interfaces
With these patches applied, networkd is successfully able to get an
address from a DHCP server on an IPoIB interface.
1)
Makes networkd pass the actual interface type to the dhcp client,
instead of hardcoding it to Ethernet.
2)
Fixes some issues in handling the larger (20 Byte) IB MAC addresses in
the dhcp code.
3)
Add a new field to networkds Link struct, which holds the interface
broadcast address.
3.1)
Modify the DHCP code to also expect the broadcast address as parameter.
On an Ethernet-Interface the Broadcast address never changes and is always
all 6 bytes set to 0xFF.
On an IB one however it is not neccesarily always the same, thus
fetching the actual address from the interface is neccesary.
4)
Only the last 8 bytes of an IB MAC are stable, so when using an IB MAC to
generate a client ID, only pass those 8 bytes.
Timo Rothenpieler [Mon, 26 Oct 2020 17:07:49 +0000 (18:07 +0100)]
network: store full hardware address in Link struct
This passes the legacy ethernet address to functions in a lot of places,
which all will need migrated to handle arbitrary size hardware addresses
eventually.
Timo Rothenpieler [Mon, 26 Oct 2020 15:22:13 +0000 (16:22 +0100)]
sd-netlink: introduce netlink_message_{read,append}_hw_addr
Hardware addresses come in various shapes and sizes, these new functions
and accomapying data structures account for that instead of hard-coding
a hardware address to the 6 bytes of an ethernet MAC.
Lennart Poettering [Wed, 28 Oct 2020 09:09:12 +0000 (10:09 +0100)]
Merge pull request #17471 from keszybz/man-update-fedora-version
Update fedora version in man pages
Lennart Poettering [Wed, 28 Oct 2020 08:57:46 +0000 (09:57 +0100)]
resolved: advertise smaller UDP datagram size on extra stubs
Lennart Poettering [Tue, 27 Oct 2020 17:00:33 +0000 (18:00 +0100)]
resolved: remove redundant conditionalization
If all protocols are listed there's no point in having the if check.
Follow-up for
8b4198373b976035e0dfc347f50b61eab40c8e00
Lennart Poettering [Tue, 27 Oct 2020 13:28:25 +0000 (14:28 +0100)]
resolved: use structured initialization everywhere
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 19:20:57 +0000 (20:20 +0100)]
Merge pull request #17455 from poettering/packet-auxdata
add Timestamping= to socket units and some other .socket unit tweaks
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:43:34 +0000 (18:43 +0100)]
Merge pull request #17438 from anitazha/systoomd_quick
Additional fix ups from #17417
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 09:19:15 +0000 (10:19 +0100)]
meson: fix setting of ENABLE_OOMD
-Doomd=auto (the default) didn't work as intended because the initial correct
value was overwritten later by logic that didn't check for 'auto'.
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2020 11:20:38 +0000 (12:20 +0100)]
test: add a simple test for the qr printing code
Ideally, we'd read back what we wrote, but that would have been
much more complicated. But just writing stuff is useful to test under
valgrind or manually.
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2020 11:11:21 +0000 (12:11 +0100)]
journal,homectl: unify implementations of libqrencode loading and fss key printing
We had two of each: both homectl and journalctl had the whole dlopen()
wrapper, and journalctl had two implementations (slightly different) of the
code to print the fss:// pattern.
print_qrcode() now returns -EOPNOTSUPP when compiled with qrcode support. Both
callers ignore the return value, so this changes nothing.
No functional change.
Timo Rothenpieler [Tue, 27 Oct 2020 09:55:41 +0000 (10:55 +0100)]
network: actually update radv mac
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 15:01:56 +0000 (16:01 +0100)]
man: update fedora version
F33 was released today!
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 15:01:16 +0000 (16:01 +0100)]
man/machinectl: fix pull-raw example
We do not allow machine names with "_", so the command would fail as written.
Share the example with the systemd-nspawn page instead.
Lennart Poettering [Mon, 26 Oct 2020 16:41:06 +0000 (17:41 +0100)]
units: turn on timestamping for journald sockets
To make things simple and robust when debugging journald, we'll leave
the SO_TIMESTAMP invocations in the C code in place, even if they are
now typically redundant, given that the sockets are already passed into
the process with SO_TIMESTAMP turned on now.
Lennart Poettering [Mon, 26 Oct 2020 16:40:55 +0000 (17:40 +0100)]
man: document the new Timestamping= option
Lennart Poettering [Mon, 26 Oct 2020 16:39:14 +0000 (17:39 +0100)]
core: add Timestamping= option for socket units
This adds a way to control SO_TIMESTAMP/SO_TIMESTAMPNS socket options
for sockets PID 1 binds to.
This is useful in journald so that we get proper timestamps even for
ingress log messages that are submitted before journald is running.
We recently turned on packet info metadata from PID 1 for these sockets,
but the timestamping info was still missing. Let's correct that.
Lennart Poettering [Mon, 26 Oct 2020 16:38:55 +0000 (17:38 +0100)]
conf-parser: add a flavour of DEFINE_CONFIG_PARSE_ENUM() that allows specifiying the precie from_string() function to call
Lennart Poettering [Mon, 26 Oct 2020 15:31:07 +0000 (16:31 +0100)]
journald: remove pointless conditionalization
Let's not have #ifdeffery both in the consumers and the providers of the
selinux glue code. Unless the code is particularly complex, let's do the
ifdeffery only in the provider of the selinux glue code, and let's keep
the consumers simple and just invoke it.
Lennart Poettering [Mon, 26 Oct 2020 15:19:24 +0000 (16:19 +0100)]
socket-util: make socket_set_recvpktinfo control PACKET_AUXDATA sockopt on AF_PACKET
Just for the sake of completness.
Lennart Poettering [Mon, 26 Oct 2020 15:19:10 +0000 (16:19 +0100)]
man: add references to fifo(7) and mq_overview(7) man pages
Lennart Poettering [Tue, 27 Oct 2020 08:55:59 +0000 (09:55 +0100)]
tree-wide: cast result of get_process_comm() to (void) where we ignore it
Lennart Poettering [Fri, 23 Oct 2020 19:21:58 +0000 (21:21 +0200)]
sd-event: split out enable and disable codepaths from sd_event_source_set_enabled()
So far half of sd_event_source_set_enabled() was doing enabling, the
other half was doing disabling. Let's split that into two separate
calls.
(This also adds a new shortcut to sd_event_source_set_enabled(): if the
caller toggles between "ON" and "ONESHOT" we'll now shortcut this, since
the event source is already enabled in that case and shall remain
enabled.)
This heavily borrows and is inspired from Michal Sekletár's #17284
refactoring.
Michal Sekletár [Fri, 23 Oct 2020 16:29:27 +0000 (18:29 +0200)]
sd-event: split out helper functions for reshuffling prioqs
We typically don't just reshuffle a single prioq at once, but always
two. Let's add two helper functions that do this, and reuse them
everywhere.
(Note that this drops one minor optimization:
sd_event_source_set_time_accuracy() previously only reshuffled the
"latest" prioq, since changing the accuracy has no effect on the
earliest time of an event source, just the latest time an event source
can run. This optimization is removed to simplify things, given that
it's not really worth the effort as prioq_reshuffle() on properly
ordered prioqs has practically zero cost O(1)).
(Slightly generalized, commented and split out of #17284 by Lennart)
Jonathan Lebon [Tue, 27 Oct 2020 12:29:38 +0000 (13:29 +0100)]
units: unconditionally pull in remote-cryptsetup.target in the initramfs
[zjs: Replaces #17149.
I took half of the patch in
https://github.com/systemd/systemd/pull/17149#issuecomment-
698399194,
hence I'm keeping Jonathan's authorship.
The original reasoning for
6c5496c492a8d74e54d22bf8824160cab1e63c10 was that we
enable remote-cryptsetup.target via presets, and since presets are not used for
the initrd, we need a different target. But since parts of the unit and target
tree are shared between the initramfs and the main system, we can't just create
a separate target for the initramfs. All the targets that depend on this one
would need to be split also. That condition is true for initrd-fs.target, but
not for sysinit.target.
So let's instead just uncoditionally pull in remote-cryptsetup.target in the
initramfs. It should normally be empty, so there should be no impact on boots
that don't have units in the target.
Jonathan's patch used initrd-root-fs.target, this version instead uses
initrd-root-device.target. initrd-root-device.target is ordered before
sysroot.mount, which means that the decrypted devices will be available earlier
too.]
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 12:26:01 +0000 (13:26 +0100)]
Revert "units: add initrd-cryptsetup.target"
This reverts commit
6c5496c492a8d74e54d22bf8824160cab1e63c10.
sysinit.target is shared between the initrd and the host system. Pulling in
initrd-cryptsetup.target into sysinit.target causes the following warning at
boot:
Oct 27 10:42:30 workstation-uefi systemd[1]: initrd-cryptsetup.target: Starting requested but asserts failed.
Oct 27 10:42:30 workstation-uefi systemd[1]: Assertion failed for initrd-cryptsetup.target.
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 09:49:11 +0000 (10:49 +0100)]
meson: simplify with_runlevels ternany op usage
Anita Zhang [Fri, 23 Oct 2020 05:44:22 +0000 (22:44 -0700)]
core: clean up inactive/failed {service|scope}'s cgroups when the last process exits
If processes remain in the unit's cgroup after the final SIGKILL is
sent and the unit has exceeded stop timeout, don't release the unit's
cgroup information. Pid1 will have failed to `rmdir` the cgroup path due
to processes remaining in the cgroup and releasing would leave the cgroup
path on the file system with no tracking for pid1 to clean it up.
Instead, keep the information around until the last process exits and pid1
sends the cgroup empty notification. The service/scope can then prune
the cgroup if the unit is inactive/failed.
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2020 12:54:20 +0000 (13:54 +0100)]
syscall-names: add process_madvise which is planned for 5.10
It was added in
v5.9-11793-gecb8ac8b1f and is still present in v5.10-rc1, so it
seems likely that it'll be in 5.10 too.
AsciiWolf [Mon, 26 Oct 2020 21:48:34 +0000 (22:48 +0100)]
l10n: update Czech Translation
Anita Zhang [Tue, 27 Oct 2020 07:16:25 +0000 (00:16 -0700)]
docs: update coding style for `return (void) func(...)`
Seems that people think it's useful for brevity so make it explicit in
the CODING_STYLE.
Josh Brobst [Mon, 26 Oct 2020 22:45:51 +0000 (18:45 -0400)]
man: correct xdg-autostart-generator path
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:43:18 +0000 (20:43 +0100)]
NEWS: v247-rc1
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:41:36 +0000 (20:41 +0100)]
NEWS: update contributors list for v247-rc1
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:27:41 +0000 (20:27 +0100)]
NEWS: mention IPv6PrefixDelegation→IPv6SendRA renaming
Pat Coulthard [Sun, 25 Oct 2020 21:45:13 +0000 (16:45 -0500)]
tmpfiles: Handle filesystems without ACL support in more cases.
Elias Probst [Sat, 24 Oct 2020 13:42:27 +0000 (15:42 +0200)]
NEWS: fix typo (`systemd-userdb` > `systemd-userdbd`)
Yu Watanabe [Sat, 24 Oct 2020 03:46:27 +0000 (12:46 +0900)]
test-network: add a test case for DNSSL in RA
Closes #4590.
Zbigniew Jędrzejewski-Szmek [Sat, 24 Oct 2020 11:44:10 +0000 (13:44 +0200)]
Merge pull request #17430 from yuwata/network-drop-foreign-routes-managed-by-manager
network: drop routes managed by Manager when they are not requested
Dan Streetman [Fri, 23 Oct 2020 19:50:28 +0000 (15:50 -0400)]
test: ignore ENOMEDIUM error from sd_pid_get_cgroup()
Ubuntu builds on the Launchpad infrastructure run inside a chroot that does
not have the sysfs cgroup dirs mounted, so this call will return ENOMEDIUM
from cg_unified_cached() during the build-time testing, for example when
building the package in a Launchpad PPA.
Yu Watanabe [Sat, 24 Oct 2020 03:07:19 +0000 (12:07 +0900)]
tree-wide: fix typos found by Fossies codespell report
Yu Watanabe [Tue, 13 Oct 2020 12:11:36 +0000 (21:11 +0900)]
Revert "sd-dhcp-client: use asynchronous_close()"
This effectively reverts the commit
22fc2420b2a7220addcee33c2fa17ada44d87f9c.
The function `asynchronous_close()` confuses valgrind. Before this commit,
valgrind may report the following:
```
HEAP SUMMARY:
in use at exit: 384 bytes in 1 blocks
total heap usage: 4,787 allocs, 4,786 frees, 1,379,191 bytes allocated
384 bytes in 1 blocks are possibly lost in loss record 1 of 1
at 0x483CAE9: calloc (vg_replace_malloc.c:760)
by 0x401456A: _dl_allocate_tls (in /usr/lib64/ld-2.31.so)
by 0x4BD212E: pthread_create@@GLIBC_2.2.5 (in /usr/lib64/libpthread-2.31.so)
by 0x499B662: asynchronous_job (async.c:47)
by 0x499B7DC: asynchronous_close (async.c:102)
by 0x4CFA8B: client_initialize (sd-dhcp-client.c:696)
by 0x4CFC5E: client_stop (sd-dhcp-client.c:725)
by 0x4D4589: sd_dhcp_client_stop (sd-dhcp-client.c:2134)
by 0x493C2F: link_stop_clients (networkd-link.c:620)
by 0x4126DB: manager_free (networkd-manager.c:867)
by 0x40D193: manager_freep (networkd-manager.h:97)
by 0x40DAFC: run (networkd.c:20)
LEAK SUMMARY:
definitely lost: 0 bytes in 0 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 384 bytes in 1 blocks
still reachable: 0 bytes in 0 blocks
suppressed: 0 bytes in 0 blocks
For lists of detected and suppressed errors, rerun with: -s
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
```
Yu Watanabe [Sat, 24 Oct 2020 03:16:44 +0000 (12:16 +0900)]
Merge pull request #17429 from keszybz/revert-17188
Revert the change to allow arbitrary environment variable names
Anita Zhang [Fri, 23 Oct 2020 22:47:07 +0000 (15:47 -0700)]
test: make TEST-56-OOMD service unit files static
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 18:35:47 +0000 (20:35 +0200)]
shared/qrcode-util: reduce scope of iterator variables
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 18:19:05 +0000 (20:19 +0200)]
meson: sort include dirs
Our headers should have unique names, so the sort order shouldn't matter.
Lennart Poettering [Fri, 23 Oct 2020 15:50:04 +0000 (17:50 +0200)]
Merge pull request #17427 from poettering/v247-bump
preparation for v247-rc1
Yu Watanabe [Fri, 23 Oct 2020 14:06:13 +0000 (23:06 +0900)]
test-network: add tests for routes managed by Manager
Yu Watanabe [Fri, 23 Oct 2020 08:01:30 +0000 (17:01 +0900)]
network: drop routes managed by Manager when link is removed
Also, foreign routes managed by Manager are dropped in
link_drop_foreign_routes().
Yu Watanabe [Fri, 23 Oct 2020 13:40:57 +0000 (22:40 +0900)]
network: specify route type in route_remove()
This factors out the common netlink message handling in route_remote()
and route_configure() to route_set_netlink_message().
Yu Watanabe [Fri, 23 Oct 2020 13:19:16 +0000 (22:19 +0900)]
network: link may be NULL
Yu Watanabe [Fri, 23 Oct 2020 08:32:19 +0000 (17:32 +0900)]
network: ignore error in writing proxy_ndp
This partially reverts the commit
fd773a11d8e2b01e9e6d234ca5693417c0101fca.
As, IPv6 may be disabled by kernel.
Yu Watanabe [Fri, 23 Oct 2020 08:29:49 +0000 (17:29 +0900)]
network: fix typo
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 13:47:33 +0000 (15:47 +0200)]
man: document what variables are allowed
Lennart Poettering [Fri, 23 Oct 2020 13:45:17 +0000 (15:45 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 12:24:32 +0000 (14:24 +0200)]
Revert "basic/env-util: (mostly) follow POSIX for what variable names are allowed"
This reverts commit
b45c068dd8fac7661a15e99e7cf699ff06010b13.
I think the idea was generally sound, but didn't take into account the
limitations of show-environment and how it is used. People expect to be able to
eval systemctl show-environment output in bash, and no escaping syntax is
defined for environment *names* (we only do escaping for *values*). We could
skip such problematic variables in 'systemctl show-environment', and only allow
them to be inherited directly. But this would be confusing and ugly.
The original motivation for this change was that various import operations
would fail.
a4ccce22d9552dc74b6916cc5ec57f2a0b686b4f changed systemctl to filter
invalid variables in import-environment.
https://gitlab.gnome.org/GNOME/gnome-session/-/issues/71 does a similar change
in GNOME. So those problematic variables should not cause failures, but just
be silently ignored.
Finally, the environment block is becoming a dumping ground. In my gnome
session 'systemctl show-environment --user' includes stuff like PWD, FPATH
(from zsh), SHLVL=0 (no idea what that is). This is not directly related to
variable names (since all those are allowed under the stricter rules too), but
I think we should start pushing people away from running import-environment and
towards importing only select variables.
https://github.com/systemd/systemd/pull/17188#issuecomment-
708676511
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 11:49:05 +0000 (13:49 +0200)]
basic/env-util: make function shorter
Lennart Poettering [Fri, 23 Oct 2020 11:39:24 +0000 (13:39 +0200)]
build-sys: prepare 247-rc1
Interestingly, the libudev so version was already bumped.
Lennart Poettering [Fri, 23 Oct 2020 11:44:16 +0000 (13:44 +0200)]
update hwdb