Commit graph

44040 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek d32014a5bb test-sd-path: basic test for the sd-path API 2020-03-27 20:12:44 +01:00
Zbigniew Jędrzejewski-Szmek 4908de44b0 {systemd,udev}.pc: add names with underscores, deprecate the old ones
The names with multiple lowercase words run together are hard to read.  We
started that way with very short names like rootprefix, but then same pattern
was applied to longer and longer names. Looking at the body of .pc files
available on my machine, many packages use underscores; let's do the same. Old
names are kept for compatiblity, so this is backwards compatible.
2020-03-27 20:12:44 +01:00
Zbigniew Jędrzejewski-Szmek 009b80a48d path: align columns
Without that it's really hard to see what items are in the table...
2020-03-27 20:12:44 +01:00
Sean-StarLabs b642dfcdc2
hwdb: add Star Lite Mk II and Star LabTop Mk III (#14621) 2020-03-27 20:07:58 +01:00
Tom 90c40df0a6 Add Lenovo IdeaPad Miix 300 ACCEL_MOUNT_MATRIX 2020-03-27 19:32:29 +01:00
Balint Reczey 93c23c9297 user-util: Allow names starting with a digit
In 1a29610f5f the change inadvertedly
disabled names with digit as the first character. This follow-up change
allows a digit as the first character in compat mode.

Fixes: #15141
2020-03-27 19:06:36 +01:00
Wen Yang acd1987a18 core/unit: print info when unit_add_name failed
When there are hundreds of mounts on the server, it will take a long
time to analyze the failure of a certain mount unit. So it is useful
to print the reason why unit_add_name() failed.
2020-03-27 18:46:13 +01:00
Zhu Li 9520a0308d Remove stale doc about PrivateNetwork and type 2020-03-27 18:40:31 +01:00
Franck Bui e730db6c90 systemd-network-generator.service: network-pre.target is a passive target unit 2020-03-27 18:30:57 +01:00
Pieter Lexis 72e1c0b308 Add shell to machinectl ZSH completion 2020-03-27 18:15:15 +01:00
Anita Zhang 4047a411f4
Merge pull request #15186 from DaanDeMeyer/clangd-fix-wstring-plus-int
Silence Wstring-plus-int warning when using clangd with GCC.
2020-03-26 16:45:01 -07:00
Anita Zhang c08323dcd1
Merge pull request #15236 from ssahani/br-follow-up
shared- bride util allign bridge_state_table
2020-03-26 16:27:33 -07:00
Susant Sahani 4c6a4a5bfe shared- bride util allign bridge_state_table 2020-03-26 19:43:58 +01:00
Susant Sahani c30ffcee9b networkctl: Add support to set link up and down 2020-03-26 19:42:03 +01:00
Yuri Chornoivan 6281c6e56c
po: update Ukrainian translation (#15228) 2020-03-26 18:45:41 +01:00
Zbigniew Jędrzejewski-Szmek 1ab2033804
Merge pull request #15224 from ssahani/geneve
networkctl: Display more geneve properties
2020-03-26 18:30:37 +01:00
David Edmundson f0d0698f0b path-lookup: Use default value for XDG_CONFIG_DIRS if environment is not set
If XDG_CONFIG_DIRS is unset, the specification says we should assume
/etc/xdg.
2020-03-26 18:25:41 +01:00
Zbigniew Jędrzejewski-Szmek a879b6d22f
Merge pull request #15214 from ssahani/networkctl-br1
network: Introduce bridge util
2020-03-26 17:51:29 +01:00
Zbigniew Jędrzejewski-Szmek 272a8864da
Merge pull request #15170 from keszybz/sd-bus-resolve-magic
sd-bus: resolve SD_BUS_DEFAULT_* in more places
2020-03-26 17:08:09 +01:00
Zbigniew Jędrzejewski-Szmek ce4c73eb5d
Merge pull request #15209 from anitazha/moar-cgroup-utils
cgroup-utils: convenience helpers
2020-03-26 16:54:08 +01:00
Anita Zhang a22e8850a8
Merge pull request #15191 from GiedriusS/feature/list-unit-files-return-1
systemctl: exit with 1 if no unit files found
2020-03-25 16:50:30 -07:00
Giedrius Statkevičius eeb1542b5e systemctl: exit with 1 if no unit files found
Add a simple check on the number of unit files that were found: return
`-ENOENT` when none is found from the function and thus `systemctl`
consequently exits with `1` (`EXIT_FAILURE`) if none were found.

Verification:
```bash
root@image:~# systemctl list-unit-files dbus-nonexistant.service; echo
$?
UNIT FILE STATE VENDOR PRESET

0 unit files listed.
1
root@image:~# systemctl list-unit-files dbus.service; echo $?
UNIT FILE    STATE  VENDOR PRESET
dbus.service static enabled

1 unit files listed.
0
```

Fixes #15082.
2020-03-25 22:20:58 +02:00
Susant Sahani e7b38d7d5c networkctl: Display more geneve preperties 2020-03-25 14:52:52 +01:00
Susant Sahani 3039cc0281 network: Introduce geneve util 2020-03-25 14:52:31 +01:00
Anita Zhang baa358df32 cgroup-util: cg_get_xattr_malloc helper
`cg_get_xattr_malloc` to read a cgroup xattr value and allocate space
to hold said value (simple helper combining existing functions).
2020-03-24 16:06:32 -07:00
Anita Zhang 613328c3e2 cgroup-util: helper to cg_get_attribute and convert to uint64_t
A common pattern in the codebase is reading a cgroup memory value
and converting it to a uint64_t. Let's make it a helper and refactor a
few places to use it so it's more concise.
2020-03-24 16:05:16 -07:00
Dan Streetman 1b43e24602 network: attach sd-event in link_load() when creating link dhcp_client or ipv4ll
Commit 08c588d18b moved attachment of the
sd-event into creation of the dhcp_client or ipv4ll in dhcp4_configure()
or ipv4ll_configure(), but these can also be created in link_load(),
so that creation needs to also perform sd-event attachment.

Without this, dhcp_client or ipv4ll created in link_load() will not have
an ->event and will fail assertion, causing networkd to fail, e.g.:

Assertion 'client->event' failed at src/libsystemd-network/sd-dhcp-client.c:1283, function client_start_delayed(). Ignoring.
ens2: Could not acquire DHCPv4 lease: Invalid argument
ens2: Failed
2020-03-24 17:49:08 +01:00
Susant Sahani a8389a3307 networkctl: Use string table for bridge state 2020-03-24 14:22:59 +01:00
Susant Sahani af94bb24b5 shared: Introduce bridge util 2020-03-24 14:22:50 +01:00
Susant Sahani 12ef8fb6f1 networkctl: Add more bridge properties 2020-03-24 10:08:48 +01:00
Zbigniew Jędrzejewski-Szmek 2e7d6d1d32
Merge pull request #15185 from ssahani/fix-sip-copy-paste
network: DHCP lease load SIP copy paste error
2020-03-24 10:03:57 +01:00
pelzvieh 137d448751 davfs is a network file system 2020-03-24 10:01:25 +01:00
Arusekk 71180f8e57 Fall back to kexec when no kexec binary exists
This may be not a popular setup, but in case kexec resides somewhere different
than the default location for KEXEC (`/usr/sbin/kexec`), don't just reboot and
try doing `reboot(RB_KEXEC)` instead, just like what `kexec -e` normally does.
2020-03-24 09:50:11 +01:00
Kevin Kuehler 50dfca2eaf import: Only keep RO copy if ETag header is set
We fix the case when the webserver servers container images without
setting the ETag header in the response.  When an image is downloaded to
image root, a read only copy is stored alongside it.  The filename has
the following form:
    .raw-<encoded-url-of-image>.\x22<ETAG-header>\22.raw.
This is so, if the same resource is fetched multiple times, importd can
avoid extra downloads by creating the new image using the local read-only copy.

The current code assumes the ETag header is set because, if the server
does not set the ETag header, the file is stored without the ETag value
in the filename. When importd fetches a duplicate image, it will run
rename_noreplace and fail:

  Failed to rename raw file to /var/lib/machines/.raw-http:\x2f\x2flocalhost:8000\x2fwalkthroughd.raw: File exists

This patch makes importd only store a read-only image if the webserver
has set the ETag header.
2020-03-23 21:39:59 -07:00
Balint Reczey cdc6c95737 units: Don't mount tracefs in LXC
Mounting tracefs fails in unprivileged LXC containers and latest LXD
(3.23) bind mounts tracefs already.

Fixes https://github.com/lxc/lxd/issues/7059
2020-03-23 08:34:48 +01:00
Vito Caputo d4a3494e65 swap: check p->what for NULL
Commit 61f9cf4e4c introduced swap_get_parameters(s) but only
checked its return for NULL and not its ->what.

Fixes https://github.com/systemd/systemd/issues/15070
2020-03-23 08:30:32 +01:00
ml 992622c428 man: fix typo in loader.conf(5) 2020-03-22 20:22:03 +01:00
Daan De Meyer b0f4c02e2d sd-bus: Add sd_bus_send docs + cleanups. 2020-03-22 20:21:11 +01:00
Susant Sahani 1f807af6de networkctl: Add support to display SIP servers
```
❯ build/networkctl status veth99                                                                                                                                                           ─╯
● 17: veth99
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /usr/lib/systemd/network/veth99.network
                          Type: ether
                         State: routable (configured)
                        Driver: veth
                    HW Address: 1e:04:f8:b8:2f:d4
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 192.168.5.35 (DHCP4)
                                fe80::1c04:f8ff:feb8:2fd4
                       Gateway: 192.168.5.1
                           DNS: 192.168.5.1
                           NTP: 192.168.5.1
                           SIP: 192.168.5.4
                                192.168.5.5
                     Time Zone: Europe/Berlin

Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:25:36 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:29:14 Zeus systemd-networkd[671]: veth99: Gained IPv6LL

```
2020-03-22 15:59:05 +01:00
Susant Sahani eb46288cca sd-network: Provice APIs to access SIP servers given by DHCP4 server 2020-03-22 10:39:23 +01:00
Zbigniew Jędrzejewski-Szmek 5f28f3ddaf test: allow overriding EFI_MOUNT like other variables 2020-03-22 10:22:42 +01:00
Zbigniew Jędrzejewski-Szmek b6261be84d meson: report -Dinstall-tests in summary 2020-03-22 10:22:42 +01:00
Zbigniew Jędrzejewski-Szmek 80769cb66c meson: use install_subdir() to install files
This gives us slightly less control, but we don't need to update the
file list...
2020-03-22 10:22:42 +01:00
Zbigniew Jędrzejewski-Szmek f55198f034 test: replace symlinks with actual unit files
During installation, meson complains:
> Installing /home/zbyszek/src/systemd-work/test/units/sysinit.target to /var/tmp/systemd-test.Q1FSuj/root/usr/lib/systemd/tests/testdata/units
> Warning: trying to copy a symlink that points to a file. This will copy the file,
> but this will be changed in a future version of Meson to copy the symlink as is. Please update your
> build definitions so that it will not break when the change happens.

It *is* convenient to have those files as symlinks, but it is also confusing,
because symlinks create aliases, and it seems that in those cases we actually
don't want aliases (at least in the case of loopy*.service that'd make the test
pointless).
2020-03-22 10:22:42 +01:00
Daan De Meyer f455f8633e Silence Wstring-plus-int warning when using clangd with GCC. 2020-03-21 22:30:59 +01:00
Susant Sahani be1af90585 network: DHCP lease load SIP copy paste error 2020-03-21 18:34:46 +01:00
Zbigniew Jędrzejewski-Szmek f41df6954c sd-bus: whitespace adjustments 2020-03-19 21:38:46 +01:00
Zbigniew Jędrzejewski-Szmek 70bc558cc1 sd-bus: support SD_BUS_DEFAULT* and don't crash in functions where bus is optional
In those functions where bus defaults to the m->bus, we should also
resolve the magic parameters. And if neither called with bus=NULL
and an unattached message, return properly instead of crashing in assert
later.
2020-03-19 21:38:46 +01:00
Zbigniew Jędrzejewski-Szmek 501ecd670c sd-bus: make sure SD_BUS_DEFAULT* works everywhere
I'm not sure why those functions were not touched in
45b1f410ba. Anyway, it seems easier
to just support the magic parameters everywhere.
2020-03-19 21:38:46 +01:00
Daan De Meyer 60ef094297 sd-bus: Add sd_bus_reply_method_return docs + cleanups 2020-03-19 20:51:17 +01:00