1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 01:55:32 +03:00
Commit Graph

53300 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
681cb84a63 meson: allow extra net naming schemes to be defined during configuration
In upstream, we have a linearly-growing list of net-naming-scheme defines;
we add a new one for every release where we make user-visible changes to the
naming scheme.

But the general idea was that downstream distributions could define their
own combinations (or even just their own names for existing combinations),
so provide stability for their users. So far this required patching of the
netif-naming-scheme.c and .h files to add the new lines.

With this patch, patching is not required:

$ meson configure build \
  -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash \
  -Ddefault-net-naming-scheme=gargoyle2

or even

$ meson configure build \
  -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash,latest=v249 \
  -Ddefault-net-naming-scheme=gargoyle2

The syntax is a comma-separated list of NAME=name+name+…
This syntax is a bit scary, but any typos result in compilation errors,
so I think it should be OK in practice.

With this approach, we don't allow users to define arbitrary combinations:
what is allowed is still defined at compilation time, so it's up to the
distribution maintainers to provide reasonable combinations. In this regard,
the only difference from status quo is that it's much easier to do (and harder
to do incorrectly, for example by forgetting to add a name to one of the
maps).
2021-09-28 14:22:40 +02:00
Zbigniew Jędrzejewski-Szmek
77faadfdd3 meson: drop the list of valid net naming schemes
We used 'combo' type for the scheme list. For a while we forgot to add
new names, and recently aa0a23ec86 added v241, v243, v245, and v247.
I want to allow defining new values during configuration, which means
that we can't use meson to verify the list of options. So any value is
allowed, but then two tests are added: one that will fail compilation if some
invalid name is given (other than "latest"), and one that converts
DEFAULT_NET_NAMING_SCHEME to a NamingScheme pointer.
2021-09-28 14:22:37 +02:00
Zbigniew Jędrzejewski-Szmek
acaa636866 netif-naming: inline one iterator variable 2021-09-28 12:26:09 +02:00
Yu Watanabe
07db7f6bb8
Merge pull request #20846 from yuwata/sd-lldp-tx
network: move LLDP transmission feature to libsystemd-network
2021-09-28 11:29:34 +09:00
Yu Watanabe
bed159888e
Merge pull request #20855 from dannf/update-net-name-schemes
Update net name schemes
2021-09-28 11:28:07 +09:00
Lennart Poettering
a50dadf2fd resolved: suppress writing DNS server info into /etc/resolv.conf for non-standard UDP ports
glibc doesn't support this, hence don#t generate it.

Fixes: #20836
2021-09-28 11:27:36 +09:00
Luca Boccassi
3542da2442 parse-util: prefix load average macros with LOAD_AVG_
Follow-up for #20839
2021-09-27 20:34:41 +02:00
dann frazier
c3138b46bc Remind developers to update the list of net naming schemes that can be selected as a build-time defaults. 2021-09-27 11:12:32 -06:00
dann frazier
aa0a23ec86 Add remaining supported schemes as options for default-net-naming-scheme 2021-09-27 11:12:22 -06:00
Yu Watanabe
c01b9b879c network: use sd-lldp-tx 2021-09-28 01:35:51 +09:00
Yu Watanabe
7df9656782 sd-lldp-tx: introduce sd-lldp-tx 2021-09-28 01:35:47 +09:00
Yu Watanabe
3daf701014 hostname-util: introduce get_pretty_hostname() 2021-09-28 01:34:02 +09:00
Yu Watanabe
3be1e84fe9 sd-lldp: introduce SD_LLDP_OUI_IANA_MUD macro 2021-09-28 01:34:00 +09:00
Yu Watanabe
19b68e9e96 sd-lldp: constify OUI 2021-09-28 01:32:40 +09:00
Yu Watanabe
910fd79e8e sd-lldp-rx: split out enum definitions 2021-09-27 23:55:11 +09:00
Yu Watanabe
35778343ab sd-lldp-rx: rename sd_lldp -> sd_lldp_rx 2021-09-27 23:55:11 +09:00
Yu Watanabe
94832e6e55 test: also rename {test,fuzz}-lldp.c 2021-09-27 23:55:11 +09:00
Yu Watanabe
3a2ee8554e sd-lldp: rename sd-lldp.[ch] -> sd-lldp-rx.[ch] 2021-09-27 23:55:11 +09:00
Yu Watanabe
82e0689cd8 meson: sort files 2021-09-27 23:55:11 +09:00
Lennart Poettering
49e9218ae3
Merge pull request #20768 from pdmorrow/shutdown_cgroup_ctrl
cgroups: apply StartupAllowedCPUs= and StartupAllowedMemoryNodes= during shutdown
2021-09-27 13:44:54 +02:00
Zbigniew Jędrzejewski-Szmek
66a0e22293
Merge pull request #20849 from keszybz/man-page-tags-and-links
Add license tags to doc pages, fixups and more internal links in man pages
2021-09-27 12:09:48 +02:00
Kay Siver Bø
75a36d7575 hwbd: 60-sensor.hwdb: Add Lenovo ThinkPad Yoga 11e 5th Gen (Type: 20LN, Gemini Lake) 2021-09-27 12:09:16 +02:00
Zbigniew Jędrzejewski-Szmek
d8e1613ed2 man: mention pages with more settings at end of each option list
For some unit types we have hundreds of options, and the reader may easily miss
that more options are described in other pages. We already mentioned this in
the introduction and then at the top of the option list, but it can't hurt to
repeat the information.

Also, add an (almost empty) Options section for the unit types which don't have
any custom options. It is nicer to have the same page structure in all cases,
so people can jump between pages for different types more easily.
2021-09-27 09:19:02 +02:00
Zbigniew Jędrzejewski-Szmek
18c7a1eb6c man: refresh description of sysvinit compat for services
The existing text must have been written before systemd-sysv-generator was
created. We don't create the wrappers dynamically since a long time.

Also add more links and make the description conditional on "if compat
is enabled".
2021-09-27 09:19:02 +02:00
Zbigniew Jędrzejewski-Szmek
880e1e0729 man: minor grammar fixups in systemd-cryptenroll 2021-09-27 09:19:02 +02:00
Zbigniew Jędrzejewski-Szmek
0aff7b7584 docs: add spdx tags to all .md files
I have no idea if this is going to cause rendering problems, and it is fairly
hard to check. So let's just merge this, and if it github markdown processor
doesn't like it, revert.
2021-09-27 09:19:02 +02:00
Zbigniew Jędrzejewski-Szmek
a14e028e86 man: cross-reference DeviceAllow= and PrivateDevices=
They are somewhat similar, but not easy to discover, esp. considering that
they are described in different pages.

For PrivateDevices=, split out the first paragraph that gives the high-level
overview. (The giant second paragraph could also use some heavy editing to break
it up into more digestible chunks, alas.)
2021-09-27 09:19:02 +02:00
Yu Watanabe
ebbb1e364b meson: refuse implicit int <-> pointer conversion
Before:
```
Compiling C object src/libsystemd-network/libsystemd-network.a.p/dhcp6-option.c.o
../src/libsystemd-network/dhcp6-option.c: In function ‘dhcp6_option_parse_ia’:
../src/libsystemd-network/dhcp6-option.c:633:70: warning: passing argument 3 of ‘dhcp6_option_parse’ makes pointer from integer without a cast [-Wint-conversion]
  633 |                 r = dhcp6_option_parse(option_data, option_data_len, offset, &subopt, &subdata_len, &subdata);
      |                                                                      ^~~~~~
      |                                                                      |
      |                                                                      size_t {aka long unsigned int}
../src/libsystemd-network/dhcp6-option.c:358:25: note: expected ‘size_t *’ {aka ‘long unsigned int *’} but argument is of type ‘size_t’ {aka ‘long unsigned int’}
  358 |                 size_t *offset,
      |                 ~~~~~~~~^~~~~~
```

After:
```
../src/libsystemd-network/dhcp6-option.c: In function ‘dhcp6_option_parse_ia’:
../src/libsystemd-network/dhcp6-option.c:633:70: error: passing argument 3 of ‘dhcp6_option_parse’ makes pointer from integer without a cast [-Werror=int-conversion]
  633 |                 r = dhcp6_option_parse(option_data, option_data_len, offset, &subopt, &subdata_len, &subdata);
      |                                                                      ^~~~~~
      |                                                                      |
      |                                                                      size_t {aka long unsigned int}
../src/libsystemd-network/dhcp6-option.c:358:25: note: expected ‘size_t *’ {aka ‘long unsigned int *’} but argument is of type ‘size_t’ {aka ‘long unsigned int’}
  358 |                 size_t *offset,
      |                 ~~~~~~~~^~~~~~
cc1: some warnings being treated as errors
```
2021-09-25 07:11:13 +09:00
Luca Boccassi
f0e2cfc6dc basic: delete loadavg.h copy
loadavg.h is an internal header of the Linux source repository, and as
such it is licensed as GPLv2-only, without syscall exception.

We use it only for 4 macros, which are simply doing some math calculations
that cannot thus be subject to copyright.
Reimplement the same calculations in another internal header and delete
loadavg.h from our tree.
2021-09-25 07:10:44 +09:00
nl6720
3f67dccca0 user-record: switch the default LUKS PBKDF to argon2id to match cryptsetup
cryptsetup 2.4.0 changed the default LUKS2 PBKDF to argon2id.
See db77541790.
2021-09-24 21:02:21 +01:00
Anssi Hannula
9376b2aab3 man: fix a reference in timedatectl man page
timedatectl(1) says the synchronization service list generation is
described "below", but in reality it is documented in
systemd-timedated.service(8).

Fix the sentence to reference the correct man page.
2021-09-24 18:35:42 +01:00
Peter Morrow
058a2d8f13 man: Startup* updates for systemd.resource-control
All Startup*= directives now also apply to the shutdown phase as well as
boot phase.
2021-09-24 15:09:54 +01:00
Peter Morrow
1b75e5f343 fuzz: list directives in alphabetical order 2021-09-24 14:43:01 +01:00
Peter Morrow
9dfb6a3a8e cgroup: re-evaluate startup units during shutdown as well
Apply startup cgroup configuration options to the shutdown phase as
well. I.e. all directives prefixed with Startup are applied during
boot and shutdown. For example:

StartupAllowedCPU= applies during boot and shutdown.
AllowedCPUs= applies during normal runtime.
2021-09-24 14:43:01 +01:00
Lennart Poettering
c7e445abd5 Revert "mkosi: turn off qemu headless mode"
This reverts commit a02c1239cc.

(Sorry, I pushed this directly to 'main' by accident)
2021-09-24 14:20:40 +02:00
Lennart Poettering
074f0f0587 main: use strv_extendf() where appropriate 2021-09-24 20:42:54 +09:00
Andika Triwidada
f71f76bb97 po: Translated using Weblate (Indonesian)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/id/
Translation: systemd/main
2021-09-24 20:41:09 +09:00
Anita Zhang
2b33e41aaf link: connect 5 more properties to ethtool features
Sets up the follow properties and their corresponding ethtool feature:
- ReceiveVLANCTAGHardwareAcceleration == rx-vlan-hw-parse (or rxvlan)
- TransmitVLANCTAGHardwareAcceleration == tx-vlan-hw-insert (or txvlan)
- ReceiveVLANCTAGFilter == rx-vlan-filter
- TransmitVLANSTAGHardwareAcceleration == tx-vlan-stag-hw-insert
- NTupleFilter == rx-ntuple-filter (or ntuple)
2021-09-24 20:40:23 +09:00
Lennart Poettering
4c0115c76d
Merge pull request #20826 from yuwata/network-sd-event-source-disable-unref
network: disable event sources before unref them
2021-09-24 13:25:31 +02:00
Yu Watanabe
eb2f750242 libsystemd-network: disable event sources before unref them
Fixes #20825.
2021-09-24 17:26:41 +09:00
Yu Watanabe
d105befc97 network: disable event sources before unref them 2021-09-24 17:26:10 +09:00
Lennart Poettering
37eb7108fb
Merge pull request #20789 from poettering/initrd-cpio
efi-stub: when booting a kernel foo.efi then pack foo.efi.extra.d/*.{cred,raw} as an initrd
2021-09-23 21:17:05 +02:00
Lennart Poettering
f7c9ade22f smack-util: tiny simplification 2021-09-23 21:15:46 +02:00
Lennart Poettering
8e8415e0d5 boot: prefer IMAGE_VERSION from os-release as version string
If the field exists it's probably the best version we have for sorting,
since it will change on every single OS image update.
2021-09-23 17:48:26 +02:00
Lennart Poettering
99d51ed939 man: document the new systemd-boot drop-in driver dir logic 2021-09-23 17:24:28 +02:00
Lennart Poettering
b8cdb66279 man: the sd-boot menu is probably more "textual" then "graphical", hence don't lie
(also, most communication happens between boot loader and OS, only
seldom stuff goes the other way, hence mention that the boot loader
first)
2021-09-23 17:24:28 +02:00
Lennart Poettering
3f9a615dcf man: add man page for the systemd UEFI stub
Fixes: #17215
2021-09-23 17:24:28 +02:00
Lennart Poettering
3a6249127e boot: add get_os_indications_supported() helper
We inquire the EFI var for this at two places, let's add a helper that
queries it and gracefully handles it if we can't get it, by returning a
zero mask, i.e. no features supported.
2021-09-23 17:24:28 +02:00
Lennart Poettering
0d43ce5266 stub: various modernizations to linux.c
Let's make some stuff const. Most importanly call AllocatePages() with
a pointer to an EFI_PHYSICAL_ADDRESS instead of a pointer to a
pointer. On 64bit this makes no difference, but on i386 this is simply
not correct, since EFI_PHYSICAL_ADDRESS is 64bit there, even though
pointers are 32bit.
2021-09-23 17:24:28 +02:00
Lennart Poettering
a0a644be70 boot: add helper for converting EFI_PHYSICAL_ADDRESS to a pointer
This isn't trivial when trying to be compatible with 32bit archs, hence
add a set of helper macro-like functions that make the conversion safe.
2021-09-23 17:24:28 +02:00