1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00
Commit Graph

49109 Commits

Author SHA1 Message Date
Yu Watanabe
dc4e2940e8 core: set $SYSTEMD_EXEC_PID= environment variable for executed commands
It may be useful to detect a command is directly executed by systemd
manager, or indirectly as a child of another process.
2021-02-01 01:13:44 +09:00
Yu Watanabe
d2acb93dc5 tree-wide: enable colorized logging for daemons when run in console
It may be useful when debugging daemons.
2021-02-01 01:13:44 +09:00
Yu Watanabe
74189020eb log: make tools also read the kernel command line when run as a service
This effectively reverts 41d1f469cf.

Before this, e.g., `networkctl reload` invoked by `systemctl reload systemd-networkd.service`
does not produce debugging logs even if systemd.log-level=debug is set. This fixes
the issue.
2021-02-01 01:13:44 +09:00
Yu Watanabe
8ccc31d498 network: drop one more link_dirty()
Follow-up for 9092113d93.

link_dirty() will be called later in this function when a DNS or domain
is dropped.
2021-02-01 01:11:44 +09:00
Yu Watanabe
5caac53adb
Merge pull request #18417 from DaanDeMeyer/sd-boot-no-include
sd-boot fixes
2021-01-31 22:26:59 +09:00
Daan De Meyer
47381f8f64 sd-boot: Add missing includes
Let's make all headers self-sufficient by including the necessary
EFI headers in the headers themselves.
2021-01-31 10:38:59 +00:00
Daan De Meyer
9a383acadd sd-boot: Make internal functions static 2021-01-31 10:38:59 +00:00
Daan De Meyer
bc556335b1 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
2021-01-31 13:14:02 +09:00
Pavel Hrdina
16455ee2b1 man: fix small issue in AllowedMemoryNodes description
It should not mention "CPU" but "NUMA nodes".
2021-01-30 18:19:17 +01:00
Zbigniew Jędrzejewski-Szmek
ea3640ac96
Merge pull request #18320 from yuwata/network-reduce-trigger-network-events
network: do not trigger unnecessary network events
2021-01-30 15:30:17 +01:00
Einsler Lee
9c587d6618 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.
2021-01-30 12:48:15 +01:00
Daan De Meyer
7a1fed85d7
Merge pull request #18407 from keszybz/resolved-reference-counting-again
Use reference counting for DnsQueryCandidate
2021-01-29 23:04:46 +00:00
Lennart Poettering
82446c66cc
Merge pull request #18399 from keszybz/man-proofreading
Various man page cleanups
2021-01-29 20:04:07 +01:00
Lennart Poettering
e01b47a500
Merge pull request #18408 from poettering/import-fixlets3
5 more small fixes to importd
2021-01-29 19:01:50 +01:00
Peter Hutterer
9fc168cd1e 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.
2021-01-29 17:17:52 +01:00
Zbigniew Jędrzejewski-Szmek
0e0fd08fc8 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.
2021-01-29 17:14:15 +01:00
Zbigniew Jędrzejewski-Szmek
c805014a35 resolved: minor cleanups 2021-01-29 17:12:48 +01:00
Zbigniew Jędrzejewski-Szmek
1d3a473b4a man: use ellipses for ranges in range descriptions
… and in few other places ;)
2021-01-29 17:02:23 +01:00
Lennart Poettering
ff2f779758 import: properly verify roothash_signature + verity download, too
Follow-up for 133b34f69a 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.
2021-01-29 16:40:20 +01:00
Lennart Poettering
c9b6ebef8c import: make sure we can import empty files 2021-01-29 16:40:20 +01:00
Lennart Poettering
9f0b5640bd 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)
2021-01-29 16:40:20 +01:00
Lennart Poettering
0dfb650387 import: use unlink_and_free() + rm_rf_subvolume_and_free() more 2021-01-29 16:40:20 +01:00
Lennart Poettering
be7c98c240 import: fix typo in help text 2021-01-29 16:40:20 +01:00
Zbigniew Jędrzejewski-Szmek
0c3c9a4096
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'
2021-01-29 14:07:54 +01:00
Topi Miettinen
ddc155b2fd 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.
2021-01-29 12:40:52 +00:00
Luca Boccassi
21be71eefb test: fix 'make clean' not removing shared image 2021-01-29 09:56:45 +00:00
Luca Boccassi
668b3a42fe 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.
2021-01-29 09:53:34 +00:00
Zbigniew Jędrzejewski-Szmek
75909cc7e4 man: various typos and other small issues
Fixes #18397.
2021-01-29 08:42:39 +01:00
Frantisek Sumsal
78dff3f3d7 ci: build the Fedora RPMs with -Werror 2021-01-29 11:02:54 +09:00
Zbigniew Jędrzejewski-Szmek
d13f2617c9 man: rework description of --timestamp
Existing markup would be rendered improperly by groff. For #18397.
2021-01-28 20:43:42 +01:00
Zbigniew Jędrzejewski-Szmek
cf3ce0545c docs: add missing plural in title reference 2021-01-28 20:43:09 +01:00
Zbigniew Jędrzejewski-Szmek
85c755941f meson: fix indentation in one spot 2021-01-28 20:43:09 +01:00
Zbigniew Jędrzejewski-Szmek
183d5168cf
Merge pull request #18392 from keszybz/update-target-rename
Add various missing license headers and rename meson targets for consistency
2021-01-28 19:06:14 +01:00
Frantisek Sumsal
64f2c3b22d 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/
2021-01-28 18:57:24 +01:00
Zbigniew Jędrzejewski-Szmek
c69479d34f po: specify LGPL-2.1+ for all translation files 2021-01-28 09:55:36 +01:00
Zbigniew Jędrzejewski-Szmek
4c30eb573c networkd: add header to distributed "config" files 2021-01-28 09:55:36 +01:00
Zbigniew Jędrzejewski-Szmek
7a6eb60bd5 license: LGPL-2.1+ -> LGPL-2.1-or-later
Follow-up for db9ecf0501 and
faa73d4e0c.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
9c08f7d516 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
d3821a339e 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
1f6f8cc803 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
984b529684 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
2bc48bbdd7 docs: expose GVARIANT-SERIALIZATION as markdown 2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
8a7c7868a7 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
30e31503bd tree-wide: add spdx header on source files
version.h is tiny, but the other two certainly deserve a license header.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
9ee03516df 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.
2021-01-28 09:55:35 +01:00
Zbigniew Jędrzejewski-Szmek
cb1f01a5f8 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.
a0e150b2f4.
This was forgotten in 35b42e5600.
2021-01-27 21:57:35 +01:00
Zbigniew Jędrzejewski-Szmek
7058df3593 udev.pc: add license header
All other .pc files have the same header. Not sure why this one
was forgotten.
2021-01-27 21:57:35 +01:00
Zbigniew Jędrzejewski-Szmek
2df21b7ab0 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.
2021-01-27 21:57:35 +01:00
Zbigniew Jędrzejewski-Szmek
b0a336a669 generate-dns_type-gperf: modernize python syntax 2021-01-27 21:57:35 +01:00
Zbigniew Jędrzejewski-Szmek
7857b6e838 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.
2021-01-27 21:57:35 +01:00