1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

50958 Commits

Author SHA1 Message Date
наб
6a3fff75ba
bootctl: take --make-machine-id-directory=yes|no|auto and make/remove \$MACHINE_ID accordingly
auto resolves to yes if /etc/machine-id resides on non-tmpfs

This effectively reverts commit 31e57550b5
2021-05-05 14:35:00 +02:00
наб
2d94502724
meson: don't fail if latest tag's commit is signed
Today this is v248 with 938bdfc0fa, which,
if you don't know about the github webflow key fails to configure with
  meson.build:724:8: ERROR:  String "gpg: Signature made Tue 30 Mar 2021 22:59:02 CEST\ngpg:                using RSA key 4AEE18F83AFDEB23\ngpg: Can't check signature: No public key\n1617137942\n" cannot be converted to int
or, if you do, with
  meson.build:724:8: ERROR:  String 'gpg: Signature made Tue 30 Mar 2021 22:59:02 CEST\ngpg:                using RSA key 4AEE18F83AFDEB23\ngpg: Good signature from "GitHub (web-flow commit signing) <noreply@github.com>" [unknown]\ngpg: WARNING: This key is not certified with a trusted signature!\ngpg:          There is no indication that the signature belongs to the owner.\nPrimary key fingerprint: 5DE3 E050 9C47 EA3C F04A  42D3 4AEE 18F8 3AFD EB23\n1617137942\n' cannot be converted to int
2021-05-04 20:08:59 +02:00
Yu Watanabe
8fc1efa88f hostnamectl: fix hyperlink in "Operating System" field
This fixes a bug introduced by 822be62fb2.

Before this, if terminal width is not enough, the all subsequent lines
are included in the hyperlink.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1955475.
2021-05-04 15:27:20 +02:00
Yu Watanabe
296c13dec4 tree-wide: fix typo 2021-05-04 15:03:04 +02:00
imayoda
d7ffd4f334 Add correct rotation support for Mediacom Winpad 7.0 W700
this patch enables correct bios detection and matrix for the aforementioned tiny tablet (touchscreen support commit pending now in kernel) 
thnx
2021-05-03 20:19:36 +02:00
Jakub Warczarek
572c55ee3c hostnamectl: deprecate set-* methods and expose getters by only using nouns in commands 2021-05-03 20:19:19 +02:00
Ryan Hendrickson
c2503e359a core: apply LogLevelMax to messages about units
This commit applies the filtering imposed by LogLevelMax on a unit's
processes to messages logged by PID1 about the unit as well.

The target use case for this feature is a service that runs on a timer
many times an hour, where the system administrator decides that writing
a generic success message to the journal every few minutes or seconds
adds no diagnostic value and isn't worth the clutter or disk I/O.
2021-05-03 17:48:41 +02:00
Lennart Poettering
16ecdf3c80
Merge pull request #19403 from nmeyerhans/dmi-entries
virt: differentiate Amazon EC2 bare-metal from VM instances using SMBIOS data
2021-05-03 17:48:13 +02:00
Luca Adrian L
19d25fdec1
Document the need to do journalctl --flush for persistent logging (#19481)
Document the need to do journalctl --flush for persistent logging. (fixes #19480)

Co-authored-by: Luca Lindhorst <l.lindhorst@wut.de>
2021-05-03 17:08:25 +02:00
Luca Boccassi
d4d7127d94 Revert "sysusers/firstboot: temporarily disable LoadCredential"
This reverts commit 7c20dd4b6e.

Debian has now been updated to patch the issue, so SemaphoreCI should
no longer fail. The fix has also been backported to the affected
stable branches.
2021-05-03 12:16:35 +09:00
Yu Watanabe
7afc8abdf3
Merge pull request #19487 from mrc0mmand/test-all-services-in-TEST-01
test: don't mask "supporting" services in TEST-01-BASIC
2021-05-03 12:15:29 +09:00
Frantisek Sumsal
d49b881eaf test: fix a yet another pipefail + pipe race
Basically the same scenario as in
a33e2692e1, where `awk` exits as soon
as it finds a match, thus sending SIGPIPE to `ldd` if it's not fast
enough. That, in combination with `set -o pipefail` causes random &
unexpected fails, like:

```
No journal files were found.
-rw-r----- 1 root root 16777216 Apr 30 10:31
/var/tmp/TEST-01-BASIC_sanitizers-nspawn/system.journal
TEST-01-BASIC RUN: Basic systemd setup [OK]
systemd is not linked against the ASan DSO
gcc does this by default, for clang compile with -shared-libasan
make: *** [Makefile:2: clean-again] Error 1
make: Leaving directory '/build/test/TEST-01-BASIC'
```
2021-05-01 15:05:16 +09:00
Yu Watanabe
0c9cdcb9d4
Merge pull request #19476 from yuwata/network-can
network: several CAN device related updates
2021-05-01 15:03:22 +09:00
Yu Watanabe
bff97a251d
Merge pull request #18904 from yuwata/udev-watch
udev: several inotify watch fixups
2021-05-01 15:02:43 +09:00
Frantisek Sumsal
0868f6d4e6 test: explicitly pull resolved/networkd in TEST-01-BASIC
to give them at least a basic coverage.
2021-04-30 22:21:29 +02:00
Noah Meyerhans
ce35037928 Use BIOS characteristics to distinguish EC2 bare-metal from VMs
DMI vendor information fields do not provide enough information for us to
distinguish between Amazon EC2 virtual machines and bare-metal instances.
SMBIOS provides a BIOS Information
table (https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf
Ch. 7) that provides a field to indicate that the current machine is a virtual
machine.  On EC2 virtual machine instances, this field is set, while bare-metal
instances leave this unset, so we inspect the field via the kernel's
/sys/firemware/dmi/entries interface.

Fixes #18929
2021-04-30 12:26:22 -07:00
Bertrand Jacquin
382a46d129 machine-id-setup: generate machine-id from DMI product ID on Amazon EC2
Amazon EC2 Nitro hypervisor is technically based on KVM[1].

[1] https://aws.amazon.com/ec2/faqs/
2021-04-30 12:26:22 -07:00
Frantisek Sumsal
7776b22521 test: don't mask "supporting" services in TEST-01-BASIC
This got lost during one of the code de-duplication attempts.
2021-04-30 21:02:41 +02:00
Bertrand Jacquin
b6eca3731d virt: detect Amazon EC2 Nitro instance
Amazon EC2 Nitro hypervisor is technically based on KVM[1], which
systemd-detect-virt identify propely from CPUID. However the lack of
CPUID on aarch64 (A1, T4 instance type) prevents a correct
identification, impacting hostnamectl and systemd-random-seed. Instead
it's possible to identify virtualization from DMI vendor ID.

Prior to this commit:
  # hostnamectl
     Static hostname: n/a
  Transient hostname: ip-10-97-8-12
           Icon name: computer
          Machine ID: 8e3772fbcfa3dd6f330a12ff5df5a63b
             Boot ID: b7b7e2fe0079448db664839df59f9817
    Operating System: Gentoo/Linux
              Kernel: Linux 5.4.69-longterm
        Architecture: arm64

After this commit:
  # hostnamectl
     Static hostname: n/a
  Transient hostname: ip-10-97-8-12
           Icon name: computer-vm
             Chassis: vm
          Machine ID: 8e3772fbcfa3dd6f330a12ff5df5a63b
             Boot ID: bd04da57084e41078f20541101867113
      Virtualization: amazon
    Operating System: Gentoo/Linux
              Kernel: Linux 5.4.69-longterm
        Architecture: arm64

[1] https://aws.amazon.com/ec2/faqs/
2021-04-30 09:31:34 -07:00
Yu Watanabe
c068a17f6a sd-bus: fix vtable named argument logic
Fixes #19468.
2021-04-30 17:06:29 +01:00
Yu Watanabe
b43669a4b1 test: add a simple test for udev watch 2021-04-30 19:42:09 +09:00
Yu Watanabe
e63916ab29 test: generate debugging logs for udev tests 2021-04-30 19:42:09 +09:00
Yu Watanabe
e1e56f3443 test: run udev tests after currently queued events are finished 2021-04-30 19:42:09 +09:00
Yu Watanabe
e7f781e473 udev,sd_device: also save map from device ID to watch handle in /run/udev/watch
Previously, watch handle is saved in the udev databse. But in most cases,
the handle saved in the database is not updated. Especially, when udevd
is restarted, the inotify watch is restarted, but the database is not
updated.

Moreover, it is not necessary to save watch handle in the database, as
the handle is only take a effect during udevd is running, and the value
is meaningless when udevd is restarted.

So, this makes the opposite map from device ID to watch handle is saved
in /run/udev/watch as a symbolic link, and the handle not saved in the
database anymore.

Fixes #18525.
2021-04-30 19:41:41 +09:00
Yu Watanabe
5e0d051067 udev: make udev_watch_end() noop when device does not have devname 2021-04-30 19:32:14 +09:00
Yu Watanabe
4956f220a1 sd-device: cleanup sd_device_get_subsystem() 2021-04-30 19:32:10 +09:00
Yu Watanabe
6e25642f8e sd-device: drop sysname_set flag
When device_set_sysname() succeeds, sysname is always set.
2021-04-30 19:21:18 +09:00
Yu Watanabe
ff7a8d2938 sd-device: minor optimization for sd_device_new_from_device_id() 2021-04-30 19:21:18 +09:00
Yu Watanabe
db2bad4368 sd-device: check the validity of device id
The device id is used as filename under /run/udev/data or
/run/udev/watch.
2021-04-30 19:21:18 +09:00
Yu Watanabe
fe7323815d sd-device: rename device_get_id_filename() -> device_get_device_id()
We have sd_device_new_from_device_id(), which takes device ID generated
from device_get_id_filename(). For consistency, let's rename the
function.
2021-04-30 19:21:18 +09:00
Yu Watanabe
0d77bc4a18 udev: refuse to enable inotify watch on remove event
Some udev rule may erroneously set inotify watch on remove event.
For safety, silently ignore such an inotify watch enablement.

This also moves inotify watch enablement code to udev-event.c.
2021-04-30 19:21:18 +09:00
Yu Watanabe
4cac2260c8 udev: also propagate error in udev_rules_apply_to_event() on remove event
When udev rules are not applied correctly, then run program lists is
not perfect. So, udev_event_execute_run() later in
worker_process_device() should not be called.
2021-04-30 19:21:18 +09:00
Yu Watanabe
75b4984638 udev: shorten code a bit 2021-04-30 19:21:18 +09:00
Yu Watanabe
fa5d8899aa udev: drop unused variable 2021-04-30 19:21:18 +09:00
Yu Watanabe
99e0c96f31 sd-device: drop doubled empty lines 2021-04-30 19:21:18 +09:00
Yu Watanabe
df7ee95913 udev: do not store inotify fd in a global variable
When manager_exit() or manager_free() is called, the global variable in
udev-watch.c is not set '-1'. Of course, that is safe, as the event source
for the inotify fd is unref()ed in manager_exit() and manager_free().
But let's not store fd globally.
2021-04-30 19:21:18 +09:00
Yu Watanabe
36161cba7c network: do not bring up CAN interface on configure 2021-04-30 19:16:15 +09:00
Yu Watanabe
d9fc3b0da9 network: make CAN device follow activation policy 2021-04-30 19:16:15 +09:00
Yu Watanabe
04952b25e8 network: introduce link_activate() 2021-04-30 19:16:15 +09:00
Yu Watanabe
600b7898e8 network: do not try to configure address or etc on can device 2021-04-30 19:16:02 +09:00
Yu Watanabe
e361398e48 network: can: shorten code a bit 2021-04-30 19:11:25 +09:00
Yu Watanabe
ed52cce33f network: can: do not warn if link does not exist anymore 2021-04-30 19:11:25 +09:00
Yu Watanabe
f282ce20aa network: drop duplicated link_up_can() 2021-04-30 19:11:25 +09:00
Steve Bonds
88c2c8a0ba Clarify that these values are in bytes
Similar to `ProcessSizeMax`. The defaults in percentages can be misunderstood to mean the values for these parameters will be in percentages.
2021-04-30 11:18:39 +02:00
Yu Watanabe
4bd7e99232 test-network: set DNS= and NTP= for DHCP server
Now, RoutesToDNS= and RoutesToNTP= are enabled by default on DHCPv4
client. So, if DHCP server picks up DNS or NTP servers from uplink,
then the routes may break CI environment.

Hopefully fixes #19463.
2021-04-30 10:57:17 +02:00
syyhao1994
96ae72ce1a
man: importd also provides the option of import-fs for machinectl (#19477) 2021-04-30 16:55:50 +09:00
Yu Watanabe
2ff739a6ac kernel-insteall: do not remove the first slash in $ENTRY_DIR
Follow-up for cd0d230e7b.

Fixes #19456.
2021-04-30 15:37:34 +09:00
Yu Watanabe
65a245c3ef
Merge pull request #19459 from yuwata/network-log-neighbor
network: introduce log_neighbor_debug()
2021-04-30 15:36:29 +09:00
Yu Watanabe
5aa87ec7ec network: neighbor: use sd_netlink_message_read_data() at one more place 2021-04-30 05:44:58 +09:00
Yu Watanabe
2775e1c578 network: introduce log_neighbor_debug() 2021-04-30 05:44:14 +09:00