1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00
Commit Graph

54552 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
0ccc588c2f docs: document the partition UUID used by homed 2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
91f658cc03 shared/gpt: fix bit-flip in LoongArch root partition UUID
4e76715489 added a slightly different UUID
in the header and in the docs. This makes the code match the docs.

> As some downstream projects are already using the UUID as in the docs, most
> notably util-linux [1], we should adjust code to match doc; no shipping
> LoongArch systems are using upstream systemd, and no open-source distro is
> merging LoongArch support yet, so the change should break no one. This also
> matches the work being done by @yetist at loongarch64/systemd#7.

[1] 2d29fccaad
2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
00db9a114e docs: generate table from header using a script
This adds a helper script:
$ python3 tools/list-discoverable-partitions.py <src/shared/gpt.h
<!-- generated with tools/list-discoverable-partitions.py -->
| Partition Type UUID | Name | Allowed File Systems | Explanation |
|---------------------|------|----------------------|-------------|
| _Root Partition (Alpha)_ | `6523f8ae-3eb1-4e2a-a05a-18b695ae656f` | [Root Partition] | [Root Partition more] |
| _Root Partition (ARC)_ | `d27f46ed-2919-4cb8-bd25-9531f3c16534` | ditto | ditto |
...

The output can be pasted into the markdown file. I think this works better than
trying to match the two lists by hand.
2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
16bcaebcfa shared/gpt: ARM_64 → ARM64
"arm64" is generally written without the underscore.
2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
6b47cc9897 shared/gpt: add entries for a bunch of architectures
I don't think we want people to send us pull requests over the next two years.
Let's just make something up ourselves, this is going to have at least as good
results, and will be much quicker.

Note that this only includes architectures for which there's some indication
that they are in active use. In architecture.h there are some more esoteric
ones like ARC_BE. We can add those if there's some actual user demand.

In particular, I included everything on the Debian "List of official ports" [1]
and a few other arches that we have received patches for in recent times.

[1] https://www.debian.org/ports/#portlist-released
2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
a7f787d607 shared/gpt: add a macro to make the definitions a bit less onerous 2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek
086df29f35 shared/gpt: reorder arches alphabetically
It's just too annoying to add new ones otherwise.
2021-11-19 16:52:38 +01:00
Zbigniew Jędrzejewski-Szmek
1aeb03798a docs: switch the first two columns in partition uuid list
Readers are most likely to want to go from a partition id to the uuid,
so puts the uuid second
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
fe037986c8 shared/base-filesystem: add define for s390x
This is based on the information in #14311 and
https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-S390X/LSB-Core-S390X.pdf
and https://wiki.debian.org/Multiarch/Tuples.

Fixes #14311.
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
996eaea547 shared/base-filesystem: m68k is 32-bit only 2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
2db409ce22 shared/base-filesystem: add define for arm
$ ls -l /lib /lib64
ls: cannot access '/lib64': No such file or directory
lrwxrwxrwx. 1 root root 7 Jan 26  2021 /lib -> usr/lib
$ ldd /bin/sh|grep ld
	/lib/ld-linux-armhf.so.3 (0xb6f80000)
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
761e9382a0 shared/base-filesystem: add define for riscv64
https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the
linker paths. I used the linker path from Fedora.

$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Aug 13  2020 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Aug 13  2020 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
	/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fb8185000)
$ ls -l /lib/ld-linux-riscv64-lp64d.so.1
lrwxrwxrwx 1 root root 19 Aug  4 19:28 /lib/ld-linux-riscv64-lp64d.so.1 -> ../lib64/ld-2.32.so

$ uname -r
5.10.6+

So even though the canonical linker path uses /lib/, we need the /lib64 symlink
to be present.
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
e98157b975 shared/base-filesystem: add define for ppc64el
https://wiki.debian.org/ArchitectureSpecificsMemo shows the triplet, but no the
linker paths. I used the linker path from Fedora, but I can't look up the
linker paths for BE and 32 bit. At least the ifdef scaffolding is provided, so
it should be trivial to fill in if somebody has access to such a system.

$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Jan 26  2021 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jan 26  2021 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
	/lib64/ld64.so.2 (0x00007fffa0a90000)
$ uname -r
5.14.9-200.fc34.ppc64le

Note that the macro defines listed in the wiki page don't match what I get
on Fedora: __PPC64__ vs. __ppc64__.

$ cpp -dM < /dev/null |grep -iE '__(powerpc|ppc)'|sort
 #define __powerpc__ 1
 #define __powerpc64__ 1
 #define __PPC__ 1
 #define __PPC64__ 1

First half of the fix for #14311.
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
dcc87c6800 shared/base-filesystem: add define for arm64
https://wiki.debian.org/ArchitectureSpecificsMemo:
> arm64 aarch64-linux-gnu 64 AARCH64 /lib/ld-linux-aarch64.so.1 aarch64 aarch64

Fedora:
$ ls -l /lib /lib64
lrwxrwxrwx. 1 root root 7 Jul 27  2020 /lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Jul 27  2020 /lib64 -> usr/lib64
$ ldd /bin/sh|grep ld
/lib/ld-linux-aarch64.so.1 (0x0000ffff8c905000)
$ ls -l /lib/ld-linux-aarch64.so.1 /lib64/ld-2.32.so
lrwxrwxrwx. 1 root root     19 Jul 13 07:28 /lib/ld-linux-aarch64.so.1 -> ../lib64/ld-2.32.so
-rwxr-xr-x. 1 root root 961248 Jul 13 07:56 /lib64/ld-2.32.so

$ uname -r
5.14.16-101.fc33.aarch64

So we need both /lib and /lib64 to be present, even though the canonical linker
path uses /lib.
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
6f32005fd1 shared/base-filesystem: add (empty) iffdery for the table
I think this is going to be very annoying for our downstream maintainers.
Let's at least provide the ifdef scaffolding so that only filling in the
actual entries remains. The structure is copied from missing_syscall.h.
2021-11-19 15:30:08 +01:00
Zbigniew Jędrzejewski-Szmek
60106de05a shared/gpt: drop outdated comment
C.f. 1fb2d8fcb6.
2021-11-19 15:30:08 +01:00
Lennart Poettering
14efbfd96d docs: clarify the assumption on numeric values of JSON parsers we make
Prompted by:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/
2021-11-19 15:10:37 +01:00
Zbigniew Jędrzejewski-Szmek
e55ed6aa85
Merge pull request #21444 from poettering/gpt-test
tests: dump table of archs + wether gpt partition type exists
2021-11-19 15:08:36 +01:00
Daniel Maixner
324b410341 removed copyright 2021-11-19 13:39:01 +00:00
Lennart Poettering
bab5077098 test-gpt: add test that shows for which archs we have GPT partition types 2021-11-19 11:23:36 +01:00
Lennart Poettering
f6ec896bc1 gpt: make gpt_partition_type_uuid_from_string() return parameter optional 2021-11-19 11:23:36 +01:00
Lennart Poettering
f85b12d6fd strv: make sure FOREACH_STRING() can be nested 2021-11-19 11:23:36 +01:00
Evgeny Vereshchagin
2fd1beb3e2 oss-fuzz: move apt-gets and pips to the systemd repository
to be able to control our dependencies right here without
sending PRs like https://github.com/google/oss-fuzz/pull/5199 and
https://github.com/google/oss-fuzz/pull/5601.

It should also allow us to pin meson to let Dependabot keep track of
it and jump from one version to another without breaking anything
2021-11-19 08:52:28 +00:00
Zbigniew Jędrzejewski-Szmek
39c37ca2d2
Merge pull request #21436 from yuwata/network-bus-introspect
network: add --bus-introspect option
2021-11-19 09:42:46 +01:00
Thomas Blume
6e8791a042 systemd-coredump: allow setting external core size to infinity
Make it compatible to the ulimit setting: unlimited
2021-11-19 09:23:52 +01:00
Lennart Poettering
548614cc9a
Merge pull request #21420 from DaanDeMeyer/journal-enumerate-skip
journal: Skip over corrupt entry items in enumerate_data()
2021-11-19 09:23:17 +01:00
Lennart Poettering
5c9da90d1d
Merge pull request #21411 from poettering/homed-maximize
homed: add concept for "maximizing" home dirs
2021-11-19 09:22:11 +01:00
Yu Watanabe
cc0f820960
Merge pull request #21435 from yuwata/network-cleanups-for-alternative-names
network: cleanups for alternative names
2021-11-19 12:05:04 +09:00
Yu Watanabe
a72d2a7bca network: always try to reconfigure when carrier gained
When networkd detects a wlan interface, the interface may not be
connected to any access point, and may enter the unmanaged state.
After the interface connected to an access point, previously networkd
did not reconfigure the interface. This fixes the issue.
2021-11-19 12:04:42 +09:00
Lennart Poettering
9f5827e01c homectl: parse "min" and "max" as special disk size values 2021-11-19 00:05:53 +01:00
Lennart Poettering
41caad6fcc test: extend homed test to test home dir "maximization"
This moves the backing store to a separate tmpfs which we can nicely put
a size limit on to make sure we can test maximization sanely: if we ask
for the home dir to be grown really large it should effectively only be
grown until the size of the backing tmpfs.

(While we are at it, also set a cheaper KDF so that we don't waste CI
cycles for password hashing that aren#t secure anyway.)
2021-11-19 00:05:53 +01:00
Lennart Poettering
2b02eb0591 homework: also add logic for "maximizing" size of home 2021-11-19 00:05:53 +01:00
Lennart Poettering
34081f6be7 homework: make it safe to invoke home_setup_luks() twice in a row
Being able to invoke the call twice on the same HomeSetup object will
simplify auto-growing/auto-shrinking since we can issue a resize
operatio directly from activate/deactivate
2021-11-19 00:05:53 +01:00
Lennart Poettering
5813fca61f homework: make destroying of HomeSetup optional when resizing
This will be useful when we want to issue a resize operation right when
activating, where the HomeSetup object should be destroyed only after
both activation is done.
2021-11-19 00:05:53 +01:00
Yu Watanabe
558434a4aa man: add new man page org.freedesktop.network1 2021-11-19 07:23:40 +09:00
Yu Watanabe
6b4c1c9f3c network: support --bus-introspect option 2021-11-19 06:50:02 +09:00
Yu Watanabe
6e194652b8 network: use BusObjectImplementation 2021-11-19 06:49:25 +09:00
Daan De Meyer
8a799bed4c journal: Skip corrupt Data objects in sd_journal_get_data()
Similar to the change we made for sd_journal_enumerate_data(), let's
skip corrupt entry items and data objects in sd_journal_get_data().
2021-11-18 21:43:17 +00:00
Daan De Meyer
847c7ee8c3 journal: Use separate variable for Data object in sd_journal_get_data()
A little cleanup to make the next change easier. We're not moving to a
new Entry object in the for loop so there's no danger of changing the
Entry object window.
2021-11-18 21:43:17 +00:00
Daan De Meyer
5a94a2bf2b journal: Skip over corrupt entry items in enumerate_data()
Similar to sd_journal_next(), if trying to access an entry item
offset's data results in EBADMSG, skip to the next entry item so
we handle corruption better.

Fixes #21407
2021-11-18 21:43:15 +00:00
Yu Watanabe
1b345c1e3b network: skip re-generating map from alternative names to link 2021-11-19 06:13:02 +09:00
Yu Watanabe
50df02a705 network: do not clear map from alternative names to link when IFLA_PROP_LIST attribute is not contained
No IFLA_PROP_LIST attribute contained does not means the interface
has no alternative name.
E.g. the message created by inet6_fill_ifinfo() in net/ipv6/addrconf.c
does not contain IFLA_PROP_LIST.
2021-11-19 06:13:02 +09:00
Frantisek Sumsal
1285252823 test: make the diff regex BRE-compatible
Since the GNU `diff` utility uses grep-style regular expressions[0], which
use the BRE style, we need to tweak the regex to make it work properly
(most notably - in BRE the meta characters need to be escaped).

```
$ diff a b
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
25c25
< Disk Ceiling: 323.2M
---
> Disk Ceiling: 323.1M

$ diff -I '^\s*Disk (Size|Free|Floor|Ceiling):' a b
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
25c25
< Disk Ceiling: 323.2M
---
> Disk Ceiling: 323.1M

$ diff -I '^\s*Disk \(Size\|Free\|Floor\|Ceiling\):' a b && echo OK
21c21
<   Volume Key: 256bit
---
>   Volume Key: 257bit
```

Caught in one of the nightly CentOS CI cron jobs.

[0] https://www.gnu.org/software/diffutils/manual/html_node/Specified-Lines.html
2021-11-18 21:06:04 +00:00
Daan De Meyer
9c41618008 journal: Don't discard kmsg messages coming from journald itself
Previously, we discarded any kmsg messages coming from journald
itself to avoid infinite loops where potentially the processing
of a kmsg message causes journald to log one or more messages to
kmsg which then get read again by the kmsg handler, ...

However, if we completely disable logging whenever we're processing
a kmsg message coming from journald itself, we also prevent any
infinite loops as we can be sure that journald won't accidentally
generate logging messages while processing a kmsg log message.

This change allows us to store all journald logs generated during
the processing of log messages from other services in the system
journal. Previously these could only be found in kmsg which has
low retention, can't be queried using journalctl and whose logs
don't survive reboots.
2021-11-18 19:37:17 +00:00
Franck Bui
86bd939d7f TEST-12: make sure 'adm' group exist
'adm' group is not available on openSUSE.
2021-11-18 19:13:17 +00:00
Luca Boccassi
21d00e52db man/kernel-command-line: add reference to getty_auto variable
Follow-up for #21422
2021-11-18 15:29:43 +00:00
Luca Boccassi
26b2832992
Merge pull request #21424 from keszybz/json-double
Use double and int64_t types in json
2021-11-18 13:37:20 +00:00
Luca Boccassi
ee3fddcc8a getty-generator: add kernel cmdline and env vars to disable it
systemd.getty_auto/rd.systemd.getty_auto/SYSTEMD_GETTY_AUTO can be used
to disable the generator. Enabled by default.
2021-11-18 10:38:48 +00:00
Lennart Poettering
3510cef8fa
Merge pull request #21401 from poettering/open-mkdir-at
add open_mkdir_at() helper and use it
2021-11-18 10:13:26 +01:00
Zbigniew Jędrzejewski-Szmek
e92777d275 meson: add check:true/false to all run_command() invocations
meson-0.59.4-1.fc35.noarch says:
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
2021-11-18 09:19:23 +01:00