1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

66930 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
7abb0eef8f man/gpt-auto-generator: avoid saying "negative" for boolean
Fixes #28928.
2023-08-28 09:46:54 +01:00
Zbigniew Jędrzejewski-Szmek
6f420b5f75
Merge pull request #28968 from DaanDeMeyer/rlimit
Limit rlim_max in rlimit_nofile_safe() to nr_open
2023-08-27 16:06:58 +02:00
Alvin Alvarado
c766e05f29 man: Fix typo in config file example for ukify
or else it would output 'Unknown config setting [UKI] SecureBootCerificate=' or just an error outright if not overrode.
2023-08-27 15:03:49 +08:00
Juno Computers
8a76d3cc70
Update 60-sensor.hwdb (#28804)
Updated T11/Juno Tab 2.
2023-08-26 22:35:57 +09:00
Jan Janssen
c78b611e48 meson: Bring back use of vcs_tag
The use of vcs_tag was dropped in #28567, which results in builds having
stale version information once new commit are made.

This also fixes a case where CI builds would have no version information
because they are checked out without any tags for git-describe to use.

Additionally, use `--git-dir` now, as that particular issues seems to
have been fixed by now.
2023-08-26 13:53:42 +09:00
Mike Yuan
82007efa44 mount/mount-tool: return correct errno
Follow-up for 9269296df0
2023-08-26 09:27:23 +09:00
Zbigniew Jędrzejewski-Szmek
3b9b33a143
Merge pull request #28913 from keszybz/tmpfs-top-level-dir-mode
systemd-mount: do not create tmpfs mounts with sticky permission bit
2023-08-25 18:36:30 +02:00
Susant Sahani
1925f829ab network: sd-radv - Introduce pref64 support (RFC8781)
Implements: https://datatracker.ietf.org/doc/html/rfc8781

```

[IPv6PREF64Prefix]
Prefix=2003:da8:1:0::/64
ValidLifetimeSec=30m

Frame 16: 126 bytes on wire (1008 bits), 126 bytes captured (1008 bits) on interface veth99, id 0
Ethernet II, Src: 06:c7:41:95:1d:7f (06:c7:41:95:1d:7f), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Internet Protocol Version 6, Src: fe80::4c7:41ff:fe95:1d7f, Dst: ff02::1
Internet Control Message Protocol v6
    Type: Router Advertisement (134)
    Code: 0
    Checksum: 0x0ca0 [correct]
    [Checksum Status: Good]
    Cur hop limit: 0
    Flags: 0x00, Prf (Default Router Preference): Medium
    Router lifetime (s): 1800
    Reachable time (ms): 0
    Retrans timer (ms): 0
    ICMPv6 Option (Source link-layer address : 06:c7:41:95:1d:7f)
    ICMPv6 Option (Prefix information : 2002:da8:1::/64)
    ICMPv6 Option (PREF64 Option)
        Type: PREF64 Option (38)
        Length: 2 (16 bytes)
        0000 0111 0000 1... = Scaled Lifetime: 225
        .... .... .... .001 = PLC (Prefix Length Code): 64 bits prefix length (0x1)
        Prefix: 64:ff9b::

```
2023-08-25 15:13:06 +02:00
Daan De Meyer
f470dafddc Limit rlim_max in rlimit_nofile_safe() to nr_open
We might inherit a max rlim value that's larger than the kernel's
maximum (nr_open). This will cause setrlimit() to fail as the given
maximum is larger than the kernel's maximum. To get around this,
let's limit the max rlim we pass to rlimit() to the value of nr_open.

Should fix #28965
2023-08-25 14:26:11 +02:00
Daan De Meyer
fbc6a75571 mkfs-util: Set FORK_REOPEN_LOG
We set FORK_CLOSE_ALL_FDS, so we should also set FORK_REOPEN_LOG to
reopen the log in the child process so we don't miss any logging
messages.
2023-08-25 14:25:33 +02:00
Zbigniew Jędrzejewski-Szmek
ebbc92405b
Merge pull request #28917 from yuwata/network-address-pool
undefined
2023-08-24 15:58:31 +02:00
Yu Watanabe
927e20fa49 nspawn: check validity of the internal interface name only explicitly specified
Follow-up for 2f091b1b49.

Fixes #28844.
2023-08-24 15:55:32 +02:00
Zbigniew Jędrzejewski-Szmek
6d9829e724 man/repart: use <filename> and add missing <para> 2023-08-24 15:45:24 +02:00
Zbigniew Jędrzejewski-Szmek
12455d6e87
Merge pull request #28918 from yuwata/network-dhcp-custom-duid
network/dhcp: allow to specify custom duid type
2023-08-24 15:45:07 +02:00
Lennart Poettering
6b0651df60 gpt: move basic header/partition structure of GPT into common code
This way we can use it at other places too, not just when dissecting
images.
2023-08-24 15:25:38 +02:00
Lennart Poettering
24ae45cb65 alloc-util: add free_many() helper
We often free an array of things. Let's create a common helper for this,
and port some potential users over. (Not all, too lazy for that for
now).
2023-08-24 15:04:33 +02:00
Lennart Poettering
a16e19c61d
Merge pull request #28946 from poettering/json-variant-append-arrayb
add json_variant_append_arrayb() helper + more related
2023-08-24 13:37:10 +02:00
Lennart Poettering
f5fc7732b0 json: add json_variant_set_fieldb() helper
Let's a "b" helper for json_variant_set_field() that combines
json_build() with json_variant_set_field(), similar to the
json_variant_merge_objectb(), json_variant_append_arrayb().
2023-08-24 13:20:39 +02:00
Lennart Poettering
e931768eb4 json: rename json_append() → json_variant_merge_objectb()
json_append() is a useful wrapper around json_variant_merge(). However,
I think the naming sould be cleaned up a bit of both functions.

I thinker "merge" is the better word than "append", since it does
decidedly more than just append: it replaces existing fields of the same
name, hence "merge" sounds more appropriate. This is as opposed to the
similar operations for arrays, where no such override logic is applied
and we really just append, hence those functions are called "append"
already.

To make clearer that "merge" is about objects, and "append" about
arrays, also include "object" in the name.

Also, include "json_variant" in the name, like we do for almost all
other functions in the JSON API that take a JSON object as primary
input, and hence are kinda object methods.

Finally, let's follow the logic that helpers that combine json_build()
with some other operation get suffixed with "b" like we already have in
some cases.

Hence:

json_variant_merge() → json_variant_merge_object()
       json_append() → json_variant_merge_objectb()

This mirrors nicely the existing:
                       json_variant_append_array()
                       json_vairant_append_arrayb()

This also drops the variant of json_append() that takes a va_arg
parameter (i.e. json_appendv()). We have no user of that so far, and
given the nature as a helper function only I don#t see that happening,
and if it happens after all it's trivial to bring back.
2023-08-24 13:20:39 +02:00
Lennart Poettering
c91f581c47 tree-wide: use json_variant_append_arrayb() at many places 2023-08-24 13:19:52 +02:00
Lennart Poettering
3218794f1c json: add json_variant_append_arrayb() helper 2023-08-24 13:19:52 +02:00
Lennart Poettering
ba091282e5 utf8: automatically determine length of string if SIZE_MAX is specified
Let's make utf8_to_utf16() and utf16_to_utf8() a bit nicer to use by
adding shortcuts for common cases.

This is particularly relevant for utf16_to_utf8() since the
multiplication with 2 is easy to forget.
2023-08-24 13:19:12 +02:00
Susant Sahani
e448fcd01a test-network: re-add test for custom client identifier 2023-08-24 19:55:31 +09:00
Yu Watanabe
80500bb5d4 network/dhcp: make DUIDType= take an arbitrary integer
Closes #26745.
2023-08-24 19:55:27 +09:00
Yu Watanabe
2da796cabb dhcp: DUID-EN identifier has variable length
Also make `array[0]` -> `array[]`.

See RFC 8415, section 11.3.
2023-08-24 19:52:35 +09:00
Yu Watanabe
9291496011 network/dhcp: fix maximal DUID data size
The maximum DUID size is 128, but that includes type specified.
Hence, the maximal data size is 126.
2023-08-24 19:50:37 +09:00
Yu Watanabe
53488ea352 network: introduce per DUID type setters
No functional change, just refactoring.
2023-08-24 19:50:36 +09:00
Yu Watanabe
6ed69be98a Revert "network: DHCP6 client- Allow to send manual DUID"
This reverts commits 89e73ce86f and
543d2a4d45.

The commit assign "custom" to fixed DUID type 5. When making DUID fully
configurable, the type number should be also configurable. Also, the
fully custom DUID should be acceptable for DHCPv4.
2023-08-24 19:50:36 +09:00
Daan De Meyer
b56ee69233 hostname: Make sure we pass error to bus_verify_polkit_async()
Fixes #28943
2023-08-24 11:23:01 +02:00
Zbigniew Jędrzejewski-Szmek
c9c4e599fc
Merge pull request #24175 from medhefgo/meson-feature
meson: Use feature options
2023-08-24 11:19:55 +02:00
Zbigniew Jędrzejewski-Szmek
c31ba5cfe9 meson: use 'sh' variable everywhere
We went back-and-forth a bit on this. Very old meson would print a message
about detecting the program if a quoted argument was used, leading to a lot of
noise. So we started to convert various places to use the variable, but then it
turned out that meson < 0.56.2 doesn't handle this correctly and we reverted to
using strings everywhere in 7c22f07cbd. Then at
some point we stopped supporting old meson and over time we started using the
variable in various places again, somewhat inconsistently. Then most calls to
'sh' were removed in 9289e093ae when
install_emptydir() builtin started being used.

Now meson allows either the string or variable to be used, and doesn't print a
message if the string is used. Let's use the variable everywhere. For 'sh', we
could do either, but for other variables, we _do_ want the detection to happen,
for example for git, find, awk, which might not be installed and we want to
detect that early, before we start the build. It would be ugly to use quotes
for some programs, but not for others. Also, a string is still refused for
test(), so we couldn't use the string version even if we didn't care about
detection.
2023-08-24 11:17:50 +02:00
Daan De Meyer
799cd3100b repart: Make verity example more useful
Add Minimize= so the size gets calculated correctly and add a verity
signature partition as well for completeness.
2023-08-24 10:43:11 +02:00
Frantisek Sumsal
9541addff0 test: use the correct file name when restoring the original fstab 2023-08-24 07:54:13 +00:00
Daan De Meyer
1ffa5cfb38 repart: Add partno to output 2023-08-23 15:12:23 +02:00
Daan De Meyer
9f643be929 mkosi: Drop fedora workaround
Seems the key issues got resolved so let's drop the workaround.
2023-08-23 15:10:46 +02:00
Jan Janssen
2d7c857d9c meson: Simplify efi test/fuzz definitions 2023-08-23 14:58:04 +02:00
Jan Janssen
7f9a0d6d74 meson: Drop skip-deps option
Now that we use meson feature options for our dependencies, we can just
rely on '--auto-features=disabled' to do the same. One benefit of this
is that specific features can still be force-enabled by overriding it
with the appropriate '-Dfeature=enabled' flag.

The two remaining uses for skip-deps can simply rely on their default
logic that sets the value to 'no' when the dependency is disabled.
2023-08-23 14:57:49 +02:00
Jan Janssen
1e73a64a7a meson: Convert more options to meson features
The semantics for libidn2 and pwquality have changed slightly: We will
pick a preferred one if both are enabled instead of making it an error.
2023-08-23 14:45:02 +02:00
Jan Janssen
847e5585b6 meson: Convert bpf-framework to meson feature 2023-08-23 14:45:02 +02:00
Jan Janssen
40e9c4e45d meson: Convert options to meson features (require)
These options use requre() to conveniently express their dependency
requirements.
2023-08-23 14:45:02 +02:00
Jan Janssen
101b59433b meson: Convert dbus to meson feature
Also, there is no need to conditionalize the get_variable() calls
because not-found dependencies will just return the passed default value
if provided.
2023-08-23 14:45:02 +02:00
Jan Janssen
a0c9ac9ae4 meson: Convert options to meson features (find_library fallback)
This uses a two-step approach to make sure we can fall back to
find_library(), while also skipping the detection if the features are
explicitly disabled.
2023-08-23 14:45:02 +02:00
Jan Janssen
9ee80846f8 meson: Convert fidsk to meson feature
By making this a disabler dependency, we can slightly simplify the code
and it als fixes the build for -Dfdisk=disabled as we failed to create a
fallback empty libshared_fdisk variable.
2023-08-23 14:45:02 +02:00
Jan Janssen
43abc59a27 meson: Use feature options
By using meson features we can replace the handcrafted dependency
auto-detection by just passing the value from get_option directly to the
required arg for dependency, find_library etc.
'auto' features make the dependency optional, 'enabled' requires it
while 'disabled' features will skip detection entirely.

Any skipped or not found dependency will just be a no-op when passed to
build steps and therefore we can also skip the creation of empty vars.

The use of skip_deps for these is dropped here as meson provides a way
to disable all optional features in one go by passing
'-Dauto_features=disabled'.
2023-08-23 14:45:02 +02:00
Susant Sahani
b26c345279 network: radv - Allow to send hop limit 2023-08-23 14:06:14 +09:00
Yu Watanabe
244f518f1d
Merge pull request #28764 from yuwata/core-namespace
core/namespace: cleanups
2023-08-23 12:43:29 +09:00
Nandakumar Raghavan
a2fc6f2d59 networkd: Add T1 and T2 DHCPv6 options to expose in dbus API
Include T1 and T2 DHCPv6 options to expose in dbus API.
Introduced new field DHCPv6lease where these options are
added. This will be added to the JSON output when we query
org.freedesktop.network1.Manager object.
2023-08-23 12:43:09 +09:00
Yu Watanabe
856532ef01
Merge pull request #28926 from yuwata/bsod-cleanups
bsod: several cleanups
2023-08-23 12:41:53 +09:00
Susant Sahani
fdc4c67c2a
network/radv: allow to configure the time between retransmitted Neighbor Solicitation (#28888) 2023-08-23 12:37:44 +09:00
Yu Watanabe
14c5c43985
Merge pull request #28496 from ssahani/ndisc-28426
network: ndisc - Also fill router preference
2023-08-23 12:36:45 +09:00