1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

48926 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
7975857079 tree-wide: use curl --fail
curl will save the 404 response page (or another error) if the page
download fails, which we never want. Let it error out instead.
2021-01-15 18:35:02 +01:00
Zbigniew Jędrzejewski-Szmek
cfe01f7e0f syscalls: update tables
$ ninja -C build update-syscall-tables
2021-01-15 18:35:02 +01:00
Zbigniew Jędrzejewski-Szmek
9a6da617db meson: download full syscall tables from hrw/syscalls-table
The target is renamed to 'update-syscall-tables'. (Other targets
with similar names will be added later.)
2021-01-15 18:35:02 +01:00
Zbigniew Jędrzejewski-Szmek
e363b0e4fc systemctl: avoid warning about signed-unsigned compare on 32 bits
../src/systemctl/systemctl-list-units.c: In function ‘output_units_list’:
../src/systemctl/systemctl-list-units.c:112:75: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
  112 |         for (const UnitInfo *u = unit_infos; unit_infos && u - unit_infos < c; u++) {
      |                                                                           ^

The pointer difference is signed. I don't know why gcc warns on 32bits, but
not otherwise.

gcc-10.2.1-9.fc33.x86_64, -m32
2021-01-15 18:35:02 +01:00
Gaël PORTAY
3ceb6913c7 man/systemd-veritysetup-generator: fix trailing space 2021-01-15 11:06:11 -05:00
Gaël PORTAY
371c8b5d05 veritysetup: remove unused globals
This removes the three global variables arg_root_hash, arg_data_what and
arg_hash_what which were presents since the beginning but were never
being used.
2021-01-15 11:06:11 -05:00
Gaël PORTAY
08b04ec7e7 veritysetup-generator: add support for veritytab
This adds the support for veritytab.

The veritytab file contains at most five fields, the first four are
mandatory, the last one is optional:
 - The first field contains the name of the resulting verity volume; its
   block device is set up /dev/mapper/</filename>.
 - The second field contains a path to the underlying block data device,
   or a specification of a block device via UUID= followed by the UUID.
 - The third field contains a path to the underlying block hash device,
   or a specification of a block device via UUID= followed by the UUID.
 - The fourth field is the roothash in hexadecimal.
 - The fifth field, if present, is a comma-delimited list of options.
   The following options are recognized only: ignore-corruption,
   restart-on-corruption, panic-on-corruption, ignore-zero-blocks,
   check-at-most-once and root-hash-signature. The others options will
   be implemented later.

Also, this adds support for the new kernel verity command line boolean
option "veritytab" which enables the read for veritytab, and the new
environment variable SYSTEMD_VERITYTAB which sets the path to the file
veritytab to read.
2021-01-15 11:06:11 -05:00
Luca Boccassi
bf1868c8d7
Merge pull request #18254 from keszybz/trivial-cleanups
Assorted small cleanups
2021-01-15 14:00:06 +00:00
Susant Sahani
92a74c4744 udevd: Use hashmap_ensure_put 2021-01-15 14:32:22 +01:00
Susant Sahani
4f38ba3889 network: online - use hashmap_ensure_put 2021-01-15 14:32:16 +01:00
Susant Sahani
7a0c0e0e41 network: routing policy rule - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
ecd80ce26c network: route - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
b9eea0a753 network: radv - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
700661ed75 network: neighbor - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
f222165e3d network: mdb - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
190b3b5c30 network: link - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
967d72ed93 network: link - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
03d2d9e18f network: fdb - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
c75165cade network: dhcp6 - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
fb8ac4cf3e network: address label - use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
b77071b898 network: wireguard - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
c26f9a9d8c network: netdev - Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
c6194e8825 generator: Use hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
1346c36d5a basic: introuce hashmap_ensure_put 2021-01-15 14:29:42 +01:00
Susant Sahani
65ca9b5343 homed: use ordered_set_ensure_put 2021-01-15 14:29:42 +01:00
Lennart Poettering
061e9fc5f1
Merge pull request #18214 from elmarco/vsock
udev: allow kvm group to access vhost net and vsock devices
2021-01-15 11:43:15 +01:00
Zbigniew Jędrzejewski-Szmek
0a219363bf
Merge pull request #18197 from weblate/weblate-systemd-master
Translations update from Weblate
2021-01-15 11:10:43 +01:00
Zbigniew Jędrzejewski-Szmek
3b41c4dfbc
Merge pull request #18244 from anitazha/systemctledit
systemctl-edit fixes
2021-01-15 11:07:02 +01:00
Zbigniew Jędrzejewski-Szmek
5b935a388c basic/env-util: modernization 2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek
d2b99ed7c5 nspawn: minor modernization 2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek
0c659eb805 sysctl.d: shorten comment
The grammar was a bit suspect in a few places...
2021-01-15 10:33:29 +01:00
Zbigniew Jędrzejewski-Szmek
8b273a478d man: s/dash/mdash/ 2021-01-15 10:33:28 +01:00
Lennart Poettering
f1c86dd9ab
Merge pull request #18124 from ryncsn/initrd
initrd: add an env variable to accept non-ramfs rootfs
2021-01-15 09:58:17 +01:00
Lucas Werkmeister
8d7dab1fda Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and
StandardError=, similar to the existing append:PATH. The code is mostly
copied from the related append: code. Fixes #8983.
2021-01-15 09:54:50 +01:00
Gaël PORTAY
0141102f10 veritysetup-generator: add support for verity root options
This adds support for a new kernel root verity command line option
"verity_root_options=" which controls the behaviour of dm-verity by
forwarding options directly to systemd-veritysetup.

See `veritysetup(8)` for more details.
2021-01-14 19:41:41 -05:00
Gaël PORTAY
cb0198a13c veritysetup: add support for dm-verity options
This patch allows controlling the behaviour of dm-verity by reusing the
fifth argument that was used to set the roothash signature.

That argument is now a comma-separated list of dm-verity options in the
given format: option[=value]. The option is the name of the long option
in the world of veritysetup.

See `veritysetup(8)` for more details.

Note: The former ROOTHASHSIG the positional argument is now deprecated
in favour of the option root-hash-signature=(base64:SIG|FILE). However,
the previous format is maintained and a warning is logged.
2021-01-14 19:23:37 -05:00
Anita Zhang
e4d22a9f32 systemctl-edit: Add missing ret_dropin_paths argument in retry path
find_paths_to_edit() makes 2 calls to unit_find_paths(), one of which is
a retry client-side. ret_dropin_paths should be passed the same in
both cases.
2021-01-14 15:05:30 -08:00
Anita Zhang
98199724cb systemctl-edit: fix abort in find_paths_to_edit()
After 85c5d313b5, if you, for example,
create a drop-in for -.slice without a corresponding -.slice file, you will
get the following:

  # put some valid stuff in /etc/systemd/system/-.slice.d/override.conf

  [root@image ~]# systemctl daemon-reload
  [root@image ~]# systemctl edit -- -.slice
  Assertion 'path' failed at src/systemctl/systemctl-edit.c:425, function
  find_paths_to_edit(). Aborting.
  Aborted

The aforementioned commit sets the ret_dropin_paths argument for
unit_find_paths(). Thus, unit_find_paths() returns 1 in the example above
because it finds a relevant drop-in. However find_paths_to_edit() was written
to expect 1 only if the unit file itself exists (it does not in this example).

To make this behave more like the version of `systemctl edit` prior to
this commit, add an additional check so the code enters the
"unit file not found" code branch.
2021-01-14 15:05:27 -08:00
Daan De Meyer
e2ebc406ac mkosi: Only reset file permissions when $SRCDIR is not a mountpoint
If $SRCDIR is mounted into the build image (via mkosi overrides),
let's not reset the permissions fo the source tree so as to not
modify the original files on the host.
2021-01-14 20:08:20 +01:00
Luca Boccassi
d8434c523c
Merge pull request #18245 from poettering/unit-file-install-fixes
minor unit file install fixes
2021-01-14 18:46:48 +00:00
Lennart Poettering
b420e6f0ce systemctl: unit_file_find_fragment() doesn't log about errors, hence do it in the caller 2021-01-14 15:03:57 +01:00
Lennart Poettering
1842c1b2ab systemctl: explicitly comment two cases where we don't log on error cases, on purpose 2021-01-14 15:02:27 +01:00
Lennart Poettering
d5427dd297 systemctl: properly initialize return params in all success cases 2021-01-14 15:01:55 +01:00
Lennart Poettering
98fac96c10 unit-file: downgrade log message to debug
In the other error paths unit_file_find_fragment() doesn't log beyond
debug level, i.e. is of the non-logging library-like kind. Make sure
this error path is handled the same, so that the caller can log.
2021-01-14 15:00:48 +01:00
Lennart Poettering
f60671860e unit-file: fix indentation 2021-01-14 15:00:29 +01:00
Kairui Song
b562b9c68c initrd: do a debug log if /etc/initrd-release doesn't take effect
Signed-off-by: Kairui Song <kasong@redhat.com>
2021-01-14 21:51:12 +08:00
Lennart Poettering
14f7d087cc update TODO 2021-01-14 14:15:48 +01:00
Susant Sahani
7e27a7458c sd-netlink: mcvlan - add new attributes 2021-01-14 14:01:58 +01:00
Susant Sahani
c9b31b1750 sd-netlink: Supprt netlink types bitfield and reject 2021-01-14 14:01:56 +01:00
Susant Sahani
60e49cf9e1 basic: Add macvlan netlink attributes 2021-01-14 14:01:38 +01:00