Commit Graph
48704 Commits
Author SHA1 Message Date
Susant Sahani 8cb3465100 network: route - use ordered_set_ensure_put 2021-01-16 12:05:44 +00:00
Daan De Meyer ef1bd2349b mkosi: Allow setting version-tag option via VERSION_TAG env variable
With https://github.com/systemd/mkosi/pull/630, we can set environment
variables for the build script in mkosi. Let's modify the build script
so we can set the version-tag option via an environment variable of the
same name. The default is the empty string which causes meson to fall
back to the default behavior (git version).
2021-01-15 21:42:30 +01:00
Frantisek Sumsal 2e445f4fe5 ci: bump the Semaphore CI badge to the v2 instance 2021-01-15 20:31:20 +00:00
Zbigniew Jędrzejewski-Szmek 3bc66bfa01 rpm: expose $systemd_util_dir also as rpm macro
This variable (a.k.a. rootlibexecdir), was exposed through the .pc file, but
not as rpm macro.

The .pc file must be located in the package that provides libraries, which
pulls in a lot of dependencies. In Fedora, the macros are split out to a
separate package so that other packages which need to refer to some systemd
path but don't otherwise require it, can only pull in the (much smaller and
dependency-less) macros package. zram-generator uses the path to specify the
location of systemd-makefs, so by using the rpm macro we'll be able to use
a much smaller buildroot.
2021-01-15 19:54:43 +00:00
Frantisek Sumsal 01371e2cd8 ci: migrate to Semaphore CI 2.0 2021-01-15 20:18:29 +01:00
Lennart Poettering 41979f59d3 fs-util: make laccess() macro follow our usual error propagation
Functions defined by us are supposed to return negative errno-style
errors on errors. laccess() is for access() what lstat() is for stat(),
but defined by us as a macro. This led to some confusion regarding error
handling.

Let's return a negative errno code just in case. This means callers can
it use either way: like access(), i.e. checking for a negative return
value + looking at errno, or like our own code, i.e. using the negative
errno code it returns.
2021-01-15 19:14:10 +00:00
Daan De Meyer 064b8e2c99 meson: Use configure_file when version-tag is specified
vcs_tag() is slow. When the version-tag meson option is set,
we can use configure_file() directly to speed up incremental
builds.

Before (with version-tag set to v247):

```
‣ Running build script...
[1/418] Generating version.h with a custom command

real    0m0.521s
user    0m0.229s
sys     0m0.067s
```

After (with version-tag set to v247):

```
‣ Running build script...
ninja: no work to do.

real    0m0.094s
user    0m0.048s
sys     0m0.022s
```
2021-01-15 19:34:44 +01:00
Luca Boccassi bf1868c8d7 Merge pull request #18254 from keszybz/trivial-cleanups
Assorted small cleanups
2021-01-15 14:00:06 +00:00
Lennart Poettering 061e9fc5f1 Merge pull request #18214 from elmarco/vsock
udev: allow kvm group to access vhost net and vsock devices
2021-01-15 11:43:15 +01:00
Zbigniew Jędrzejewski-Szmek 0a219363bf Merge pull request #18197 from weblate/weblate-systemd-master
Translations update from Weblate
2021-01-15 11:10:43 +01:00
Zbigniew Jędrzejewski-Szmek 3b41c4dfbc Merge pull request #18244 from anitazha/systemctledit
systemctl-edit fixes
2021-01-15 11:07:02 +01:00
Zbigniew Jędrzejewski-Szmek 5b935a388c basic/env-util: modernization 2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek d2b99ed7c5 nspawn: minor modernization 2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek 0c659eb805 sysctl.d: shorten comment
The grammar was a bit suspect in a few places...
2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek 8b273a478d man: s/dash/mdash/ 2021-01-15 10:33:28 +01:00
Lennart Poettering f1c86dd9ab Merge pull request #18124 from ryncsn/initrd
initrd: add an env variable to accept non-ramfs rootfs
2021-01-15 09:58:17 +01:00
Lucas Werkmeister 8d7dab1fda Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and
StandardError=, similar to the existing append:PATH. The code is mostly
copied from the related append: code. Fixes #8983.
2021-01-15 09:54:50 +01:00
Anita Zhang e4d22a9f32 systemctl-edit: Add missing ret_dropin_paths argument in retry path
find_paths_to_edit() makes 2 calls to unit_find_paths(), one of which is
a retry client-side. ret_dropin_paths should be passed the same in
both cases.
2021-01-14 15:05:30 -08:00
Anita Zhang 98199724cb systemctl-edit: fix abort in find_paths_to_edit()
After 85c5d313b5, if you, for example,
create a drop-in for -.slice without a corresponding -.slice file, you will
get the following:

  # put some valid stuff in /etc/systemd/system/-.slice.d/override.conf

  [root@image ~]# systemctl daemon-reload
  [root@image ~]# systemctl edit -- -.slice
  Assertion 'path' failed at src/systemctl/systemctl-edit.c:425, function
  find_paths_to_edit(). Aborting.
  Aborted

The aforementioned commit sets the ret_dropin_paths argument for
unit_find_paths(). Thus, unit_find_paths() returns 1 in the example above
because it finds a relevant drop-in. However find_paths_to_edit() was written
to expect 1 only if the unit file itself exists (it does not in this example).

To make this behave more like the version of `systemctl edit` prior to
this commit, add an additional check so the code enters the
"unit file not found" code branch.
2021-01-14 15:05:27 -08:00
Daan De Meyer e2ebc406ac mkosi: Only reset file permissions when $SRCDIR is not a mountpoint
If $SRCDIR is mounted into the build image (via mkosi overrides),
let's not reset the permissions fo the source tree so as to not
modify the original files on the host.
2021-01-14 20:08:20 +01:00
Luca Boccassi d8434c523c Merge pull request #18245 from poettering/unit-file-install-fixes
minor unit file install fixes
2021-01-14 18:46:48 +00:00
Lennart Poettering b420e6f0ce systemctl: unit_file_find_fragment() doesn't log about errors, hence do it in the caller 2021-01-14 15:03:57 +01:00
Lennart Poettering 1842c1b2ab systemctl: explicitly comment two cases where we don't log on error cases, on purpose 2021-01-14 15:02:27 +01:00
Lennart Poettering d5427dd297 systemctl: properly initialize return params in all success cases 2021-01-14 15:01:55 +01:00
Lennart Poettering 98fac96c10 unit-file: downgrade log message to debug
In the other error paths unit_file_find_fragment() doesn't log beyond
debug level, i.e. is of the non-logging library-like kind. Make sure
this error path is handled the same, so that the caller can log.
2021-01-14 15:00:48 +01:00
Lennart Poettering f60671860e unit-file: fix indentation 2021-01-14 15:00:29 +01:00
Kairui Song b562b9c68c initrd: do a debug log if /etc/initrd-release doesn't take effect
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-14 21:51:12 +08:00
Lennart Poettering 14f7d087cc update TODO 2021-01-14 14:15:48 +01:00
krissgjeng 081d8706de hwdb: add Cube Mix Plus (i18B) rotation info
Added Cube Mix Plus (i18B) Rotation information.
Also Combined the sensor lines with the different Cube i7 stylus models because they use the same ACCEL_MOUNT_MATRIX
2021-01-14 11:01:42 +01:00
Luca Boccassi c17b2155e5 Merge pull request #18226 from mrc0mmand/actions-flake-workarounds
ci: assorted workarounds for recent flakes
2021-01-14 10:00:24 +00:00
Julien Humbert c42b6ec4d7 Translated using Weblate (French)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Julien Humbert <julroy67@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fr/
Translation: systemd/master
2021-01-14 07:37:59 +01:00
Vlad a61d1201c7 Translated using Weblate (Romanian)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Vlad <milovlad@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ro/
Translation: systemd/master
2021-01-14 07:37:59 +01:00
Weblate 081c63c99e Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/
Translation: systemd/master
2021-01-14 07:37:59 +01:00
Zmicer Turok fe04aa94c6 Translated using Weblate (Belarusian)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Zmicer Turok <nashtlumach@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/be/
Translation: systemd/master
2021-01-14 07:37:59 +01:00
Josh Triplett 225d08b879 Add install-sysconfdir=no-samples option for (non-)installation of sample configs
By default, systemd installs various sample configuration files
containing commented-out defaults. Systems seeking to minimize the
number of files in /etc may wish to install directories and
configuration files that have semantic effects, but not install not
commented-out sample configuration files.

Turn install-sysconfdir into a multi-valued option, with a "no-samples"
value to skip installing sample-only configuration files.
2021-01-14 15:22:06 +09:00
Frantisek Sumsal e8fd7c9ed4 ci: introduce a watchdog for the sanitized unit test run 2021-01-13 22:32:30 +01:00
Frantisek Sumsal f1a8fed286 ci: skip test-execute on GH Actions under ASan
It seems to suffer from the same issue as on Travis CI, where the test
randomly fails due to timeouts in its subtests.

See: https://github.com/systemd/systemd/issues/10696#issuecomment-758501797
2021-01-13 21:59:48 +01:00
Yu Watanabe 983cbd91a8 udev: add missing short option name
Follow-up for 4fcc033b54.

Fixes CID#1442307.
2021-01-13 21:53:13 +01:00
Lennart Poettering ce0079d75e Merge pull request #18227 from yuwata/network-dhcp6-pd-manage-temporary-address
network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
2021-01-13 21:52:44 +01:00
krissgjeng 984aaaa3c6 hwdb: add Linx Vision 8 rotation information (#18228) 2021-01-13 21:52:11 +01:00
Frantisek Sumsal 56a017cb0d ci: optimize the sanitized build under gcc as well 2021-01-13 21:51:44 +01:00
Kairui Song 3b9b916968 initrd: do a debug log if failed to detect rootfs type 2021-01-14 01:24:56 +08:00
Kairui Song 1f22621ba3 initrd: extend SYSTEMD_IN_INITRD to accept non-ramfs rootfs
Sometimes, non-ramfs initrd root are useful. Eg, for kdump, because
initramfs is memory consuming, so mount a compressed image in earlier
initrd, chroot into it then let systemd do the rest of job is a good
solution.

But systemd doesn't recognize the initrd environment if rootfs is not a
temporary fs. This is a reasonable check, because switch-root in initrd
will wipe the whole rootfs, will be a disaster if there are any
misdetect.

So extend SYSTEMD_IN_INITRD environment variable, now it accepts boolean
value and two extra keyword, "auto" and "lenient". "auto" is same as
before, and it's the default value. "lenient" will let systemd bypass
the rootfs check.
2021-01-14 01:19:09 +08:00
Yu Watanabe 414cbc3c73 Merge pull request #9864 from ximion/master
localed: Run locale-gen if available to generate missing locale
2021-01-14 00:20:04 +09:00
Yu Watanabe cb2ae9f8b9 Merge pull request #18170 from OnkelUlla/udev_introduce_TxQueueLen=_setting
udev: introduce TxQueueLength= setting
2021-01-14 00:19:29 +09:00
Yu Watanabe fec1b650ad network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
The setting is enabled by default, as NDisc also enabled the flag by
default.

Closes #18208.
2021-01-14 00:17:05 +09:00
Yu Watanabe 8b76ee89d7 network: drop a function argument which is always constant 2021-01-14 00:16:10 +09:00
Felix Stupp 4327574fc1 Added option --check-inhibitors for non-tty usage
As described in #2680, systemctl did ignore inhibitors if it is not
attached to a tty to allow scripts to ignore inhibitors automatically.
This pull request preserves this behavior but allows scripts to
explicit check inhibitors if required.

The new parameter '--check-inhibitors=yes' enables this feature.
The old parameter '-i'/'--ignore-inhibitors' was deprecated in favor
of '--check-inhibitors=no', the default behaviour can be specified
with '--check-inhibitors=auto'.
The new parameter is also described in the documentations and shell
completions found here.
2021-01-13 16:07:36 +01:00
Marc-André Lureau f65efddd1c udev: allow kvm group to access vhost-net device
/dev/vhost-net is a host accelerator for virtio net devices. It has been
long available and used, thus should be safe to all KVM users.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-01-13 13:12:26 +04:00
Marc-André Lureau c78939d565 udev: allow kvm group to access vhost-vsock device
/dev/vhost-vsock allows to setup a guest CID and running
state (VHOST_VSOCK_SET_GUEST_CID, VHOST_VSOCK_SET_RUNNING)

All this should be legitimate and safe for KVM users.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-01-13 13:10:19 +04:00