]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agonetwork,udev: move TransmitQueues=/ReceiveQueues= from .network to .link 18319/head
Yu Watanabe [Wed, 20 Jan 2021 06:50:01 +0000 (15:50 +0900)] 
network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link

As the settings are mostly hardware setup, and merely see from network
layer.

See also discussions in
https://github.com/systemd/systemd/pull/18170#issuecomment-758807497
https://github.com/orgs/systemd/teams/systemd/discussions/1

4 years agoudev: rename TxQueueLength= -> TransmitQueueLength=
Yu Watanabe [Wed, 20 Jan 2021 06:29:56 +0000 (15:29 +0900)] 
udev: rename TxQueueLength= -> TransmitQueueLength=

As we usually (unfortunately not always though) do not use abbreviations.

Tx may be standard abbreviation, but we already have e.g.
TransmitChecksumOffload=. So, let's use Transmit instead of Tx.

Follow-up for ef4a91a7e8d8337a9d65177b09eb7580b25b8f5d.

4 years agoci: build with -Werror on Fedora
Frantisek Sumsal [Tue, 2 Feb 2021 16:02:12 +0000 (17:02 +0100)] 
ci: build with -Werror on Fedora

Prompted by: https://github.com/systemd/systemd/pull/18400#issuecomment-771602705

4 years agopath-util: tighten path_extract_filename()
Lennart Poettering [Mon, 25 Jan 2021 18:50:47 +0000 (19:50 +0100)] 
path-util: tighten path_extract_filename()

Let's tighten the logic behind path_extract_filename() a bit: first of
all, refuse all cases of invalid paths with -EINVAL. More importantly
though return a recognizable error when a valid path is specified that
does not contain any filename. Specifically, "/" will now result in
-EADDRNOTAVAIL.

This changes API, but none of the existing callers care about the return
value, hence the change should be fine.

4 years agoMerge pull request #18435 from keszybz/oomd-readiness-and-other-tweaks
Luca Boccassi [Tue, 2 Feb 2021 23:15:19 +0000 (23:15 +0000)] 
Merge pull request #18435 from keszybz/oomd-readiness-and-other-tweaks

Mark oomd as supported and other tweaks

4 years agoMerge pull request #18432 from yuwata/libude-list-cleanups
Lennart Poettering [Tue, 2 Feb 2021 14:05:46 +0000 (15:05 +0100)] 
Merge pull request #18432 from yuwata/libude-list-cleanups

libudev: cleanups for libudev-list

4 years agomeson: use ellipses for ranges 18435/head
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:39:48 +0000 (14:39 +0100)] 
meson: use ellipses for ranges

C.f. 1d3a473b4a0a4a0c49963297103af16ff6d841fa.

4 years agomeson: take oomd out of the doghouse
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:38:19 +0000 (14:38 +0100)] 
meson: take oomd out of the doghouse

It's on by default in Fedora 34 [1], so we can't say it's just a preview.

[1] https://fedoraproject.org/wiki/Changes/EnableSystemdOomd

4 years agoman: move content from the wiki to systemd.preset(5)
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2021 15:48:44 +0000 (16:48 +0100)] 
man: move content from the wiki to systemd.preset(5)

The wiki was slightly stale, and almost all the information there
was already present in the man page. I moved the remaing part (discussion)
into the man page and adjusted all links to point to the man page instead.

daemon(7) has a some examples of packaging scriptlets… I don't think it fits
there very well. Most likely they should be moved to systemd.preset(5) or maybe
even removed, but I'm leaving that for later.

4 years agomeson: remove one more instance of install_dir:bindir
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:19:59 +0000 (14:19 +0100)] 
meson: remove one more instance of install_dir:bindir

bindir is the default, c.f. a1fd722b5df83e526cb5feb3fb271ffe1d903472.

4 years agologind: Introduce RebootWithFlags and others
Deepak Rawat [Mon, 25 Jan 2021 17:14:08 +0000 (09:14 -0800)] 
logind: Introduce RebootWithFlags and others

Add new systemd-logind WithFlags version for Reboot and others. These
methods add a unit64 parameter, with which can send additional control flags.

4 years agolibudev: add one more assertion 18432/head
Yu Watanabe [Mon, 1 Feb 2021 18:23:31 +0000 (03:23 +0900)] 
libudev: add one more assertion

4 years agolibudev: unset uptodate flag before free()ing entries
Yu Watanabe [Mon, 1 Feb 2021 17:34:20 +0000 (02:34 +0900)] 
libudev: unset uptodate flag before free()ing entries

udev_list_entry_free() also removes the entry from LIST if the flag is
set. This slightly optimizes the cleanup logic.

4 years agolibudev: also drop the entry from LIST even if unique flag is set
Yu Watanabe [Mon, 1 Feb 2021 17:16:01 +0000 (02:16 +0900)] 
libudev: also drop the entry from LIST even if unique flag is set

Otherwise, the list becomes dirty when an entry is freed.

This also remove the entry from the hashmap only when its name is set.
The name should be always set, so that does not change anything. But
just for safety.

4 years agolibudev: set entry->list after the entry is stored in the list
Yu Watanabe [Mon, 1 Feb 2021 17:18:49 +0000 (02:18 +0900)] 
libudev: set entry->list after the entry is stored in the list

This should not change anything. As hashmap_remove() is called before
hashmap_ensure_put(). So, even if hashmap_ensure_put() fails, a wrong
entry will not removed from the hashmap by udev_list_entry_free().
But anyway, just for safety.

4 years agolibudev: use hashmap_ensure_put()
Yu Watanabe [Mon, 1 Feb 2021 17:16:42 +0000 (02:16 +0900)] 
libudev: use hashmap_ensure_put()

4 years agooss-fuzz: show meson logs
Evgeny Vereshchagin [Mon, 1 Feb 2021 12:40:57 +0000 (12:40 +0000)] 
oss-fuzz: show meson logs

It should help to make it more clear what causes issues like
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30140
and https://github.com/google/oss-fuzz/pull/5084

4 years agotools: make update-dbus-docs compatible with Python 3.6
Anita Zhang [Mon, 1 Feb 2021 03:04:34 +0000 (19:04 -0800)] 
tools: make update-dbus-docs compatible with Python 3.6

668b3a42fe9e250912bd3efa4460ed691452d9bf allowed update-dbus-docs.py to start
running on Cent OS 8 (instead of skipping). But subprocess.check_output()'s
text argument didn't exist until Python 3.7 and C8 is still running
Python 3.6. Use universal_newlines instead for backwards compatibility.

4 years agohwdb: Add evdev for Huawei EUL-XW9
Simonas Kazlauskas [Sat, 30 Jan 2021 13:52:32 +0000 (15:52 +0200)] 
hwdb: Add evdev for Huawei EUL-XW9

The device is very similar to MACH-WX9 in many ways, including this
particular one. Adding these rules gets rid of evdev warnings as buttons
are being pressed on this device.

4 years agonetwork: drop one more link_dirty()
Yu Watanabe [Sun, 31 Jan 2021 13:31:32 +0000 (22:31 +0900)] 
network: drop one more link_dirty()

Follow-up for 9092113d93f61d67605f7c4a824b65a56b33fa59.

link_dirty() will be called later in this function when a DNS or domain
is dropped.

4 years agoMerge pull request #18417 from DaanDeMeyer/sd-boot-no-include
Yu Watanabe [Sun, 31 Jan 2021 13:26:59 +0000 (22:26 +0900)] 
Merge pull request #18417 from DaanDeMeyer/sd-boot-no-include

sd-boot fixes

4 years agosd-boot: Add missing includes 18417/head
Daan De Meyer [Sat, 30 Jan 2021 17:21:48 +0000 (17:21 +0000)] 
sd-boot: Add missing includes

Let's make all headers self-sufficient by including the necessary
EFI headers in the headers themselves.

4 years agosd-boot: Make internal functions static
Daan De Meyer [Sat, 30 Jan 2021 17:10:29 +0000 (17:10 +0000)] 
sd-boot: Make internal functions static

4 years agotree-wide: Drop custom formatting for print() help messages
Daan De Meyer [Sat, 30 Jan 2021 14:13:04 +0000 (14:13 +0000)] 
tree-wide: Drop custom formatting for print() help messages

I think this formatting was originally used because it simplified
adding new options to the help messages. However, these days, most
tools their help message end with "\nSee the %s for details.\n" so
the final line almost never has to be edited which eliminates the
benefit of the custom formatting used for printf() help messages.
Let's make things more consistent and use the same formatting for
printf() help messages that we use everywhere else.

Prompted by https://github.com/systemd/systemd/pull/18355#discussion_r567241580

4 years agoman: fix small issue in AllowedMemoryNodes description
Pavel Hrdina [Sat, 30 Jan 2021 17:03:40 +0000 (18:03 +0100)] 
man: fix small issue in AllowedMemoryNodes description

It should not mention "CPU" but "NUMA nodes".

4 years agoMerge pull request #18320 from yuwata/network-reduce-trigger-network-events
Zbigniew Jędrzejewski-Szmek [Sat, 30 Jan 2021 14:30:17 +0000 (15:30 +0100)] 
Merge pull request #18320 from yuwata/network-reduce-trigger-network-events

network: do not trigger unnecessary network events

4 years agoman: make it clear how systemd calculate the DefaultTasksMax.
Einsler Lee [Sat, 30 Jan 2021 03:14:35 +0000 (11:14 +0800)] 
man: make it clear how systemd calculate the DefaultTasksMax.

Actually, systemd takes the minimum of
* a) the maximum tasks value the kernel allows on this architecture
* b) the cgroups pids_max attribute for the system
* c) the kernel's configured maximum PID value
to calculate the DefaultTasksMax. Here, kernel.thread-max should also be methioned.

4 years agoMerge pull request #18407 from keszybz/resolved-reference-counting-again
Daan De Meyer [Fri, 29 Jan 2021 23:04:46 +0000 (23:04 +0000)] 
Merge pull request #18407 from keszybz/resolved-reference-counting-again

Use reference counting for DnsQueryCandidate

4 years agoMerge pull request #18399 from keszybz/man-proofreading
Lennart Poettering [Fri, 29 Jan 2021 19:04:07 +0000 (20:04 +0100)] 
Merge pull request #18399 from keszybz/man-proofreading

Various man page cleanups

4 years agoMerge pull request #18408 from poettering/import-fixlets3
Lennart Poettering [Fri, 29 Jan 2021 18:01:50 +0000 (19:01 +0100)] 
Merge pull request #18408 from poettering/import-fixlets3

5 more small fixes to importd

4 years agohwdb: check for the right set of MOUSE_WHEEL_CLICK_ properties
Peter Hutterer [Fri, 29 Jan 2021 04:57:30 +0000 (14:57 +1000)] 
hwdb: check for the right set of MOUSE_WHEEL_CLICK_ properties

As documented at the top of the file we require the normal property if we have
the horizontal property, and we require the CLICK_ANGLE property if the
CLICK_COUNT property is present. Codify this into the hwdb parser so we can
pick up on it.

4 years agoresolved: use reference counting for DnsQueryCandidate objects 18407/head
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2021 15:21:08 +0000 (16:21 +0100)] 
resolved: use reference counting for DnsQueryCandidate objects

Follow-up for 4ea8b443de. The logic that manages DnsQueryCandidate is rather
complicated: a calls to dns_query_complete() that wants to destroy a
DnsQueryCandidate can be nested inside a deep chain of calls. Using reference
counts seems like the simplest approach.

DnsSearchDomain already uses reference counting.

This patch effectively brings dns_query_candidate_go() to the state before
4ea8b443de, but wraps the iteration over DnsQueryCandidate.transactions in
dns_query_candidate_ref+dns_query_candidate_unref.

4 years agoresolved: minor cleanups
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2021 15:18:12 +0000 (16:18 +0100)] 
resolved: minor cleanups

4 years agoman: use ellipses for ranges in range descriptions 18399/head
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 19:42:37 +0000 (20:42 +0100)] 
man: use ellipses for ranges in range descriptions

… and in few other places ;)

4 years agoimport: properly verify roothash_signature + verity download, too 18408/head
Lennart Poettering [Fri, 29 Jan 2021 15:24:14 +0000 (16:24 +0100)] 
import: properly verify roothash_signature + verity download, too

Follow-up for 133b34f69a72dc90d4e336837d699245390c9f50 where this was
forgotten.

While we are at it, bring the parameters into the same order as we
declare them in the PullRaw/PullTar objects, i.e. match them to the
canonical order.

4 years agoimport: make sure we can import empty files
Lennart Poettering [Thu, 28 Jan 2021 17:20:11 +0000 (18:20 +0100)] 
import: make sure we can import empty files

4 years agoimport: don't invoke compress callbacks with empty data
Lennart Poettering [Thu, 28 Jan 2021 17:16:01 +0000 (18:16 +0100)] 
import: don't invoke compress callbacks with empty data

It's pointless if no data was generated. (This happens if an empty file
is compressed)

4 years agoimport: use unlink_and_free() + rm_rf_subvolume_and_free() more
Lennart Poettering [Thu, 28 Jan 2021 15:02:13 +0000 (16:02 +0100)] 
import: use unlink_and_free() + rm_rf_subvolume_and_free() more

4 years agoimport: fix typo in help text
Lennart Poettering [Tue, 26 Jan 2021 21:32:21 +0000 (22:32 +0100)] 
import: fix typo in help text

4 years agoMerge pull request #18395 from bluca/make_docs_img_clean
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2021 13:07:54 +0000 (14:07 +0100)] 
Merge pull request #18395 from bluca/make_docs_img_clean

Add Python 3.7 compat in update-dbus-docs and fix regression in integration tests 'make clean'

4 years agoNew directives NoExecPaths= ExecPaths=
Topi Miettinen [Sat, 16 Jan 2021 11:49:32 +0000 (13:49 +0200)] 
New directives NoExecPaths= ExecPaths=

Implement directives `NoExecPaths=` and `ExecPaths=` to control `MS_NOEXEC`
mount flag for the file system tree. This can be used to implement file system
W^X policies, and for example with allow-listing mode (NoExecPaths=/) a
compromised service would not be able to execute a shell, if that was not
explicitly allowed.

Example:
[Service]
NoExecPaths=/
ExecPaths=/usr/bin/daemon /usr/lib64 /usr/lib

Closes: #17942.
4 years agotest: fix 'make clean' not removing shared image 18395/head
Luca Boccassi [Thu, 28 Jan 2021 13:26:35 +0000 (13:26 +0000)] 
test: fix 'make clean' not removing shared image

4 years agotools: make update-dbus-docs compatible with Python 3.7
Luca Boccassi [Tue, 19 Jan 2021 11:57:46 +0000 (11:57 +0000)] 
tools: make update-dbus-docs compatible with Python 3.7

Debian Stable uses Python 3.7, but there are a couple of 3.8 features used
in the script. Add fallbacks.

4 years agoman: various typos and other small issues
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 19:38:27 +0000 (20:38 +0100)] 
man: various typos and other small issues

Fixes #18397.

4 years agoci: build the Fedora RPMs with -Werror
Frantisek Sumsal [Thu, 28 Jan 2021 21:27:18 +0000 (22:27 +0100)] 
ci: build the Fedora RPMs with -Werror

4 years agoman: rework description of --timestamp
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 18:37:28 +0000 (19:37 +0100)] 
man: rework description of --timestamp

Existing markup would be rendered improperly by groff. For #18397.

4 years agodocs: add missing plural in title reference
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 18:14:57 +0000 (19:14 +0100)] 
docs: add missing plural in title reference

4 years agomeson: fix indentation in one spot
Zbigniew Jędrzejewski-Szmek [Tue, 19 Jan 2021 18:13:09 +0000 (19:13 +0100)] 
meson: fix indentation in one spot

4 years agoMerge pull request #18392 from keszybz/update-target-rename
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 18:06:14 +0000 (19:06 +0100)] 
Merge pull request #18392 from keszybz/update-target-rename

Add various missing license headers and rename meson targets for consistency

4 years agoci: enable Packit integration
Frantisek Sumsal [Thu, 19 Mar 2020 10:37:41 +0000 (11:37 +0100)] 
ci: enable Packit integration

Let's enable the Packit integration and see if it's a viable option for
us. This configuration builds systemd on Fedora (on x86_64, i386, and
aarch64) and runs the unit test suite. To do that, it uses the specfile
from Fedora Rawhide[0] with some minor modifications, thus dropping the
need to have a specfile in the upstream repository.

So far the builds took around 25 minutes each, so speed-wise it's pretty
good. The two remaining supported architectures (s390x and armhfp) are
excluded, for now, since they're emulated and build there takes a really
long time (~4 hours).

[0] https://src.fedoraproject.org/rpms/systemd/

4 years agopo: specify LGPL-2.1+ for all translation files 18392/head
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 08:54:36 +0000 (09:54 +0100)] 
po: specify LGPL-2.1+ for all translation files

4 years agonetworkd: add header to distributed "config" files
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 13:31:59 +0000 (14:31 +0100)] 
networkd: add header to distributed "config" files

4 years agolicense: LGPL-2.1+ -> LGPL-2.1-or-later
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 13:16:14 +0000 (14:16 +0100)] 
license: LGPL-2.1+ -> LGPL-2.1-or-later

Follow-up for db9ecf050165fd1033c6f81485917e229c4be537 and
faa73d4e0c8095fedd98ff29851b9634810ff97e.

4 years agokernel-install: add boilerplate on installed .install files
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 13:10:25 +0000 (14:10 +0100)] 
kernel-install: add boilerplate on installed .install files

Those files distribured, so they should have the same header as
kernel-install itself. Let's fix indentation while at it.

4 years agotools: rename helper to match target name
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 13:04:14 +0000 (14:04 +0100)] 
tools: rename helper to match target name

The target is update-syscall-tables, so let's call the script
update-syscall-tables.sh to reduce the cognitive overhead when
trying to find the right file.

4 years agoUse .txt as the extension of arch syscall lists
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 13:00:07 +0000 (14:00 +0100)] 
Use .txt as the extension of arch syscall lists

This makes it easier to filter those files and tells editors that they should
be treated as plain text.

4 years agoUse .txt as the extension for syscall list file
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:56:12 +0000 (13:56 +0100)] 
Use .txt as the extension for syscall list file

Upstream uses .text, but this is rather unusual. Let's use .txt as the usual
suffix for text files. This tells various editors and such that the file should
be treated as plain text. I also want to a script to summarize license status,
and having an easy-to-recognize suffix makes this easier.

4 years agodocs: expose GVARIANT-SERIALIZATION as markdown
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:44:05 +0000 (13:44 +0100)] 
docs: expose GVARIANT-SERIALIZATION as markdown

4 years agotimesync: add header to distributed file
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:41:43 +0000 (13:41 +0100)] 
timesync: add header to distributed file

We don't include a license header in .conf and similar files,
but we should include a header that tells the user that this is
our file and points to some docs.

4 years agotree-wide: add spdx header on source files
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:38:40 +0000 (13:38 +0100)] 
tree-wide: add spdx header on source files

version.h is tiny, but the other two certainly deserve a license header.

4 years agotree-wide: add spdx header on all scripts and helpers
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:37:10 +0000 (13:37 +0100)] 
tree-wide: add spdx header on all scripts and helpers

Even though many of those scripts are very simple, it is easier to include
the header than to try to say whether each of those files is trivial enough
not to require one.

4 years agomissing-syscalls: add license header in the version-controlled generated file
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 12:14:51 +0000 (13:14 +0100)] 
missing-syscalls: add license header in the version-controlled generated file

If the file was always generated on the fly, the header would be pointless.
But since we distribute it, it should be there. C.f.
a0e150b2f4933ae7546fce9a2773b0208b2dc269.
This was forgotten in 35b42e560039fd87d4ae4d99cd54d1d4e89710b1.

4 years agoudev.pc: add license header
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:57:16 +0000 (12:57 +0100)] 
udev.pc: add license header

All other .pc files have the same header. Not sure why this one
was forgotten.

4 years agosysv-install.skeleton: use CC0 as the license
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:55:02 +0000 (12:55 +0100)] 
sysv-install.skeleton: use CC0 as the license

We didn't specify any license, which made the script awkward to use. Let's be
maximally permissive. CC0 is used for other documentation-code already.

4 years agogenerate-dns_type-gperf: modernize python syntax
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:16:40 +0000 (12:16 +0100)] 
generate-dns_type-gperf: modernize python syntax

4 years agogenerate-sys-test: modernize Python and C code
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 11:03:57 +0000 (12:03 +0100)] 
generate-sys-test: modernize Python and C code

Meson itself requires Python 3.6, which has f-strings. So I think it's fine to
use them here too. I wanted to use walrus for 'if m:= re.search(...)', but that'd
require 3.8.

4 years agoseccomp_restrict_sxid: return ENOSYS for openat2()
Mike Gilbert [Thu, 21 Jan 2021 20:23:32 +0000 (15:23 -0500)] 
seccomp_restrict_sxid: return ENOSYS for openat2()

We reject all openat2() calls because it is currently not possible to
inspect its flags parameter via seccomp.

Fallback code is more likely to look for ENOSYS than EPERM.

4 years agoDrop obsolete vimrc file
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 10:49:11 +0000 (11:49 +0100)] 
Drop obsolete vimrc file

We have another .vimrc in the root of the repo that has a superset of the
content of this file.

4 years agoMerge pull request #18388 from keszybz/update-target-rename
Lennart Poettering [Wed, 27 Jan 2021 13:28:24 +0000 (14:28 +0100)] 
Merge pull request #18388 from keszybz/update-target-rename

meson: rename update targets for consistency

4 years agomeson: rename target to update-hwdb-autosuspend 18388/head
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:23:02 +0000 (09:23 +0100)] 
meson: rename target to update-hwdb-autosuspend

The script is renamed to match.

Now all targets are named uniformly in a tab-completion-friendly fashion, with
the exception of systemd-update-po which is generated by the i18n module
automatically:

$ ninja -C build -t targets | grep update
systemd-update-po: phony
update-syscall-tables: phony
update-syscall-header: phony
update-hwdb: phony
update-hwdb-autosuspend: phony
update-dbus-docs: CUSTOM_COMMAND
update-man-rules: CUSTOM_COMMAND

4 years agomeson: rename target to update-hwdb
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:17:26 +0000 (09:17 +0100)] 
meson: rename target to update-hwdb

The goal is to have all "update-*" targets named uniformly so that
tab-completion works. The script is renamed to match.

4 years agomeson: rename target to update-man-rules
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 08:10:25 +0000 (09:10 +0100)] 
meson: rename target to update-man-rules

Same justification as for update-dbus-docs.

4 years agomeson: rename target to update-dbus-docs
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 07:46:42 +0000 (08:46 +0100)] 
meson: rename target to update-dbus-docs

Very old versions of meson did not include the subdirectory name in the
target name, so we started adding various "top-level" custom targets in
subdirectories. This was nice because the main meson.build file wasn't
as cluttered. But then meson started including the subdir name in the
target name. So let's move the definition to the root so we can have all
targets named uniformly.

4 years agoMerge pull request #18340 from ddstreet/integration-tests-no-build
Zbigniew Jędrzejewski-Szmek [Wed, 27 Jan 2021 07:23:38 +0000 (08:23 +0100)] 
Merge pull request #18340 from ddstreet/integration-tests-no-build

allow test/run-integration-tests.sh to work without a local build

4 years agotreewide: tighten variable scope in loops (#18372)
Susant Sahani [Wed, 27 Jan 2021 07:19:39 +0000 (08:19 +0100)] 
treewide: tighten variable scope in loops (#18372)

Also use _cleanup_free_ in one more place.

4 years agoMerge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp
Yu Watanabe [Wed, 27 Jan 2021 01:47:36 +0000 (10:47 +0900)] 
Merge pull request #18380 from yuwata/test-network-ipv6-proxy-ndp

test-network: add tests for IPv6ProxyNDPAddress=

4 years agotest/TEST-01-BASIC: also install testsuite.target 18340/head
Dan Streetman [Wed, 18 Nov 2020 14:39:50 +0000 (09:39 -0500)] 
test/TEST-01-BASIC: also install testsuite.target

This test doesn't require the tests to be installed, so it must manually
install required test services and targets itself, including the default
target of testsuite.target

Also use $TEST_UNITS_DIR which is set by test-functions instead of
calculating the path

4 years agotest/run-integration-tests.sh: adjust arg processing
Dan Streetman [Wed, 18 Nov 2020 12:30:11 +0000 (07:30 -0500)] 
test/run-integration-tests.sh: adjust arg processing

The script currently parses either 'clean' or 'clean-again' as wanting
to clean both before and after running tests. This fixes that to split
the action up; clean runs before tests, clean-again after; and also
verifies the parameter(s) before passing them to make.

4 years agotest: allow run-integration-tests.sh to run without build
Dan Streetman [Tue, 17 Nov 2020 20:55:47 +0000 (15:55 -0500)] 
test: allow run-integration-tests.sh to run without build

4 years agotest/test-functions: allow installing systemd files from local system
Dan Streetman [Tue, 17 Nov 2020 22:20:22 +0000 (17:20 -0500)] 
test/test-functions: allow installing systemd files from local system

Add NO_BUILD var to allow testing with no local build, by installing
local systemd files into the image.

This only works for debian-like distros currently, that use the
tools 'apt' and 'dpkg' for package management.

4 years agotest: find $BUILD_DIR in test-functions, remove from other scripts
Dan Streetman [Tue, 17 Nov 2020 20:39:37 +0000 (15:39 -0500)] 
test: find $BUILD_DIR in test-functions, remove from other scripts

The $BUILD_DIR is only used in test-functions, and doesn't need to
be specified in any other scripts. Additionally, to be able to allow
the integration test suite to be run against locally installed binaries,
instead of built binaries, moving BUILD_DIR logic completely into
test-functions allows later patches to be simpler.

4 years agotest/test-functions: add variables for several dir locations
Dan Streetman [Tue, 26 Jan 2021 21:46:10 +0000 (16:46 -0500)] 
test/test-functions: add variables for several dir locations

4 years agotest/test-functions: move var assignment
Dan Streetman [Tue, 17 Nov 2020 21:02:14 +0000 (16:02 -0500)] 
test/test-functions: move var assignment

This makes no code change, only moves a small block of vars higher in the
file. This makes the next commit a bit easier to read.

4 years agotest: remove unused 'basedir' var from integration test makefiles
Dan Streetman [Tue, 17 Nov 2020 21:10:29 +0000 (16:10 -0500)] 
test: remove unused 'basedir' var from integration test makefiles

4 years agoMerge pull request #18384 from poettering/mangle-os-fix
Luca Boccassi [Tue, 26 Jan 2021 20:23:52 +0000 (20:23 +0000)] 
Merge pull request #18384 from poettering/mangle-os-fix

import: two fixes to OS mangling logic

4 years agotest-network: retry several times if expected LLDP info is not obtained
Yu Watanabe [Tue, 26 Jan 2021 12:06:36 +0000 (21:06 +0900)] 
test-network: retry several times if expected LLDP info is not obtained

As LLDP thing does not get involved in the link status, `networkctl lldp`
may not provide an expected information even if the link is in
'configured' state.

Fixes #17360.

4 years agoMerge pull request #18377 from yuwata/sd-device-cleanups
Lennart Poettering [Tue, 26 Jan 2021 16:39:54 +0000 (17:39 +0100)] 
Merge pull request #18377 from yuwata/sd-device-cleanups

sd-device: several tiny cleanups

4 years agoMerge pull request #18382 from yuwata/fix-downgrade-to-bool
Lennart Poettering [Tue, 26 Jan 2021 16:38:19 +0000 (17:38 +0100)] 
Merge pull request #18382 from yuwata/fix-downgrade-to-bool

sd-device,sd-netlink: trivial cleanups

4 years agoimport-common: when mangling OS trees, propagate ownership/mode from subdir to parent 18384/head
Lennart Poettering [Tue, 26 Jan 2021 14:06:28 +0000 (15:06 +0100)] 
import-common: when mangling OS trees, propagate ownership/mode from subdir to parent

After all we want to remove the top-level dir, and make it look like the
only subdir, hence propagate the attributes from the subdir to the
top-level dir.

4 years agoimport-common: fix log message string
Lennart Poettering [Tue, 26 Jan 2021 14:05:25 +0000 (15:05 +0100)] 
import-common: fix log message string

The trees do look like directory trees, obviously. But they don't like
OS trees.

4 years agonetwork: drop unnecessary condition in error path 18380/head
Yu Watanabe [Tue, 26 Jan 2021 16:20:50 +0000 (01:20 +0900)] 
network: drop unnecessary condition in error path

See neigh_add() in kernel. It does not return EEXIST.

4 years agonetwork: drop wrong flag for neighbor entry
Yu Watanabe [Tue, 26 Jan 2021 16:19:24 +0000 (01:19 +0900)] 
network: drop wrong flag for neighbor entry

NLM_F_REQUEST is a nlmsg flag, not a neighbor flag.

4 years agotest-network: add tests for IPv6ProxyNDPAddress=
Yu Watanabe [Tue, 26 Jan 2021 12:36:25 +0000 (21:36 +0900)] 
test-network: add tests for IPv6ProxyNDPAddress=

4 years agosd-device: do not use downgrade-to-bool feature 18382/head
Yu Watanabe [Tue, 26 Jan 2021 14:57:33 +0000 (23:57 +0900)] 
sd-device: do not use downgrade-to-bool feature

4 years agosd-netlink: fix indentation
Yu Watanabe [Tue, 26 Jan 2021 14:55:37 +0000 (23:55 +0900)] 
sd-netlink: fix indentation

4 years agosd-netlink: do not use downgrade-to-bool feature
Yu Watanabe [Tue, 26 Jan 2021 14:54:32 +0000 (23:54 +0900)] 
sd-netlink: do not use downgrade-to-bool feature

4 years agodocs/ENVIRONMENT: move entry for systemd-udevd
Yu Watanabe [Tue, 26 Jan 2021 12:52:12 +0000 (21:52 +0900)] 
docs/ENVIRONMENT: move entry for systemd-udevd

`$SYSTEMD_REBOOT_TO_FIRMWARE_SETUP=` or friends are for logind.

4 years agosd-device: use size_t for index in the loop 18377/head
Yu Watanabe [Tue, 26 Jan 2021 11:35:53 +0000 (20:35 +0900)] 
sd-device: use size_t for index in the loop

4 years agosd-device: use string_hash_ops_free_free
Yu Watanabe [Tue, 26 Jan 2021 11:26:33 +0000 (20:26 +0900)] 
sd-device: use string_hash_ops_free_free

4 years agosd-device: add a short comment why we simply return negative errno here on failure
Yu Watanabe [Tue, 26 Jan 2021 11:07:38 +0000 (20:07 +0900)] 
sd-device: add a short comment why we simply return negative errno here on failure