Commit graph

60617 commits

Author SHA1 Message Date
Yu Watanabe 6625c39e70 network: simplify the logic of reading driver and permanent HW address
No functional changes, just refactoring and preparation for later
commits.

Note, `link->dev` should always exist when link state is initialized or
later.
2022-10-31 09:34:41 +09:00
Yu Watanabe 4faca0a361 network: allow to (automatically) reconfigure failed interface
We have already allowed to reconfigure failed interface manually, but
not allowed to do automatically, e.g. on carrier gain.
This makes that failed interfaces also reconfigured automatically.

Note, the condition is inversed to shorten the condition.
2022-10-28 04:55:20 +09:00
Yu Watanabe 081466bd57 network: drop redundant condition
The function `link_reconfigure_impl()` has the same condition at the
beginning.
2022-10-28 04:55:20 +09:00
Yu Watanabe 6fadf01cf3 wait-online: ignore -ENODATA from sd_network_link_get_required_for_online()
Follow-up for 778e3da95e.

These settings are saved only when a .network file is assigned to the
interface. Let's silence noisy logs for unmanaged interfaces.
2022-10-27 11:08:38 +02:00
Zbigniew Jędrzejewski-Szmek 7155a51e64
Merge pull request #25146 from keszybz/relicese-to-mit-0
Change license of code examples in docs to MIT-0
2022-10-27 07:31:56 +02:00
Zbigniew Jędrzejewski-Szmek 69ce8a7e5a
Merge pull request #25137 from yuwata/sd-device-drop-device-copy-properties
sd-device: drop unused device_copy_properties()
2022-10-27 07:28:22 +02:00
Lennart Poettering e8cb96ac86 update TODO 2022-10-26 11:09:18 +02:00
Yu Watanabe 403ca5b8b4 unit: also prioritize input devices when triggering devices
As in most cases, tty device without input devices is meaningless.

This also swaps the priority of tty and net:
- input devices are often connected under USB bus, hence may take
  slightly much time to be initialized. As, described in the above,
  in most cases it is allowed that tty devices are initialized just
  before input devices,
- network configuration usually requires much time, e.g. DHCP or RA,
  hence it is better that network interfaces initialized. Then,
  network services can start DHCP client or friends earlier.

Fixes #24026.
2022-10-26 10:49:09 +02:00
Zbigniew Jędrzejewski-Szmek 3fe96b6c32 network: change license of examples to MIT-0
Arguably, CC0 is just fine for examples since they are not code. But it's
easier to be consistent and just use MIT-0 for all "documentation". Thus,
the license is changed similarly code examples under man/.

Based on 'git shortlog -ns network/*' and 'git log -p', the following folks
should ack this:
  Zbigniew Jędrzejewski-Szmek
  Lennart Poettering
  Tom Gundersen
  Yu Watanabe
  Daan De Meyer
  Marc-André Lureau
2022-10-26 08:39:34 +02:00
Zbigniew Jędrzejewski-Szmek 58b415ae61 systemd-sysv-install: change license to MIT-0
See parent commit for explanation.

git blame shows Martin Pitt is the author of the code.

(I was considering whether we should instead drop this file, but it's still
useful for *distributions*. Eveen if we discourage people from using sysv
scripts, distributions will have to deal with them for a while yet.)
2022-10-26 08:39:34 +02:00
Zbigniew Jędrzejewski-Szmek 1fe6d37ea5 man: change license of examples to MIT-0
Quoting Richard Fontana in [1]:

  CC0 has been listed by Fedora as a 'good' license for code and content
  (corresponding to allowed and allowed-content under the new system). We plan
  to classify CC0 as allowed-content only, so that CC0 would no longer be
  allowed for code.

  Over a long period of time a consensus has been building in FOSS that
  licenses that preclude any form of patent licensing or patent forbearance
  cannot be considered FOSS. CC0 has a clause that says: "No trademark or
  patent rights held by Affirmer are waived, abandoned, surrendered, licensed
  or otherwise affected by this document." (The trademark side of that clause
  is nonproblematic from a FOSS licensing norms standpoint.) The regular
  Creative Commons licenses have similar clauses.

For the case of our documentation snippets, patent issues do not matter much.
But it is always nicer to have a license that is considerred acceptable without
any further considerations. So let's change the license to the (now recommended
replacement) MIT-0.

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/NO7KGDNL5GX3KCB7T3XTGFA3QPSUJA6R/

Using 'git blame -b' and 'git log -p --follow', I identified the following
folks as having made non-trivial changes to those snippets:

  Lennart Poettering
  Tom Gundersen
  Luca Bocassi
  Zbigniew Jędrzejewski-Szmek
  Thomas Mühlbacher
  Daan De Meyer

I'll ask for confirmation in the pull request.
2022-10-26 08:39:34 +02:00
Zbigniew Jędrzejewski-Szmek b484bb5f9d licenses: add a copy of MIT-0
Taken from https://spdx.org/licenses/MIT-0.html.
2022-10-26 08:39:34 +02:00
Zbigniew Jędrzejewski-Szmek bdc84a6fc9
Merge pull request #25120 from bluca/test_machineid
unit tests: do not fail when machine-id is missing
2022-10-26 07:43:48 +02:00
Yu Watanabe 5e577da5f8 hwdb: drop model specifier from general entries
Fixes #25029.
2022-10-26 12:58:13 +09:00
Temuri Doghonadze 4a7b90f8a2 po: Translated using Weblate (Georgian)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ka/
Translation: systemd/main
2022-10-26 00:51:42 +02:00
Yu Watanabe 389954987a sd-device: make device_shallow_clone() static 2022-10-26 05:12:54 +09:00
Yu Watanabe 53354d370e sd-device: drop unused device_copy_properties() 2022-10-26 05:05:30 +09:00
Yu Watanabe a505d7e7f8
Merge pull request #25133 from poettering/ddi-dissect
mention "DDIs" in systemd-dissect tool --help text/man page
2022-10-26 03:37:44 +09:00
Yu Watanabe bcf04e9b27 tree-wide: fix typo 2022-10-26 03:24:45 +09:00
Yu Watanabe d0f69be793
Merge pull request #25131 from poettering/image-root-help-text-fix
analyze/coredumpctl: add --image=/--root= to --help texts
2022-10-26 03:17:17 +09:00
Lennart Poettering 2781f7b43b man: also use DDIs in systemd-dissect man page 2022-10-25 18:59:10 +02:00
Lennart Poettering a94a199cff dissect: mention DDI moniker in --help text 2022-10-25 18:57:59 +02:00
xiaoyang 02c0d656b4
Revert "core: drop non-default value for DefaultLimitMEMLOCK=" (#25058)
This reverts commit 606104bcdb.
2022-10-26 01:49:07 +09:00
Yu Watanabe 9918dfb98b test: rewrite tests for renaming network interface
- use `udevadm wait` instead of `udevadm info --wait-initialized`,
- use `timeout` command instead of the fixed time sleep,
- add basic tests for #25106,
- add brief comment about #25115.
2022-10-26 01:47:18 +09:00
Jacek Migacz c89d0c3b05 core: give a nicer error message on invalid aliases 2022-10-25 18:18:57 +02:00
Lennart Poettering 2d15dc86ca coredumpctl: add --root= + --image= to --help text 2022-10-25 17:47:52 +02:00
Lennart Poettering 9f5b68d6b7 analyze: add --image= + --root= to --help text 2022-10-25 17:47:52 +02:00
Lennart Poettering 0cdb1a2fa3 update TODO 2022-10-25 17:46:18 +02:00
Luca Boccassi 035dc08bea gh actions: run a unit test iteration without machine-id 2022-10-25 16:00:26 +01:00
Luca Boccassi f028957745 udev-test: use passwd instead of machine-id for checks
Much more likely to be present
2022-10-25 16:00:26 +01:00
Luca Boccassi b2d896f059 test/test-systemd-tmpfiles.py: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 5416d04875 test-load-fragment: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 345a809f21 test-execute: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 4200134c85 test-unit-name: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 0011d68627 test-specifier: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 0baddbebe5 test-id128: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi 92ebf1773a test-fs-util: do not fail if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 16:00:26 +01:00
Luca Boccassi b7af9b43a5 test-condition: skip test if machine-id is missing
When building in a chroot there might not be any machine-id
2022-10-25 15:10:15 +01:00
Luca Boccassi 6cae57d9ad test-sd-device: check if /run/udev/ exists
When running the tests in a chroot /sys/ might be writable, but it
doesn't mean udev will be running

Assertion 'sd_event_add_inotify(event, NULL, "/run/udev" , IN_DELETE, on_inotify, NULL) >= 0' failed at src/libsystemd/sd-device/test-sd-device.c:352, function test_sd_device_enumerator_filter_subsystem(). Aborting.
2022-10-25 15:10:15 +01:00
Daan De Meyer bb6a971cca man: Mention that journal file size is capped to 4G in compact mode 2022-10-25 21:23:01 +09:00
Zbigniew Jędrzejewski-Szmek aa314c87c5 Report version string as in the Boot Loader Spec, fix boot loader upgrades
We generate a "version string" that is reported by various tools. This patch
changes this version string to use the characters specified for the version
string in the Boot Loader Specification. We start using the special characters
we have in the spec for this exact purpose and thus fix version comparisons.
We also stop using '+' which is not part of the allowed charset and is used for
boot attempt counting and should not be part of the version string.

The version string is (among other places) used in sd-boot and the comparison
result is used by 'bootctl update' to decide whether to install a new binary.
Before, because 'nn-rc1' compares higher than 'nn', we would refuse to upgrade
pre-release versions.

The boot loader is the primary motivation. I'm not aware of programatic version
comparisons in other places, but it makes sense to use the same versions string
everywhere.

(This patch effectively only matters for non-distro builds, because distro
builds presumably use -Dversion-tag to set something meaningful. Ideally, those
version strings are compatible with our version strings, but this is outside of
our control.)
2022-10-25 13:23:57 +02:00
Yu Watanabe 4117366a28 btrfs-util: move btrfs_defrag_fd() from fd-util.[ch]
After d71ece3f0b, the function is not used
in libbasic or libsystemd anymore. Let's move it to more appropriate
place.
2022-10-25 16:25:46 +09:00
Luca Boccassi 876d7e0b4f
Merge pull request #25118 from bluca/rc2
hwdb/news for rc3
2022-10-24 23:02:58 +02:00
Luca Boccassi a5683afba8 Update autosuspend hwdb
ninja -C build update-hwdb-autosuspend
2022-10-24 20:26:22 +01:00
Luca Boccassi 3203190130 Update hwdb
ninja -C build update-hwdb
2022-10-24 20:25:58 +01:00
Luca Boccassi fa9b3a5f81 NEWS: update contributors list 2022-10-24 20:14:12 +01:00
Yu Watanabe 8cf144c3f6
Merge pull request #25052 from yuwata/resolvconf-compat
resolvconf-compat: first try to use the specified interface name as is
2022-10-25 04:08:41 +09:00
Frantisek Sumsal f5dfbdd014 udev: fix the errno check if a couple of places
Follow-up to 691a596da1.
2022-10-25 04:08:17 +09:00
Luca Boccassi 022684221e mkosi: libbpf0 -> libbpf1 2022-10-24 20:40:07 +02:00
Yu Watanabe 8207ec4b49
Merge pull request #25080 from keszybz/search-paths
Refusing linking files underneath our hierarchy, improve error messages
2022-10-25 01:57:41 +09:00