From 0fcd9f213e6946a6e566a6c5550700208e731189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 11:49:11 +0100 Subject: [PATCH 01/17] Drop obsolete vimrc file We have another .vimrc in the root of the repo that has a superset of the content of this file. --- src/udev/.vimrc | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/udev/.vimrc diff --git a/src/udev/.vimrc b/src/udev/.vimrc deleted file mode 100644 index 366fbdca4b..0000000000 --- a/src/udev/.vimrc +++ /dev/null @@ -1,4 +0,0 @@ -" 'set exrc' in ~/.vimrc will read .vimrc from the current directory -set tabstop=8 -set shiftwidth=8 -set expandtab From 7857b6e8383f5debab9544ef3abb15a27830fafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 12:03:57 +0100 Subject: [PATCH 02/17] generate-sys-test: modernize Python and C code Meson itself requires Python 3.6, which has f-strings. So I think it's fine to use them here too. I wanted to use walrus for 'if m:= re.search(...)', but that'd require 3.8. --- src/test/generate-sym-test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/generate-sym-test.py b/src/test/generate-sym-test.py index fdb9e3ecb7..b391646af6 100755 --- a/src/test/generate-sym-test.py +++ b/src/test/generate-sym-test.py @@ -16,15 +16,14 @@ for line in open(sys.argv[1]): if match: s = match.group(1) if s == 'sd_bus_object_vtable_format': - print(' &{},'.format(s)) + print(f' &{s},') else: - print(' {},'.format(s)) + print(f' {s},') print('''}; int main(void) { - unsigned i; - for (i = 0; i < sizeof(symbols)/sizeof(void*); i++) + for (size_t i = 0; i < sizeof(symbols)/sizeof(void*); i++) printf("%p\\n", symbols[i]); return 0; }''') From b0a336a66929ed2a146888178157bf1af5c8598c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 12:16:40 +0100 Subject: [PATCH 03/17] generate-dns_type-gperf: modernize python syntax --- src/resolve/generate-dns_type-gperf.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/resolve/generate-dns_type-gperf.py b/src/resolve/generate-dns_type-gperf.py index d4f7b94738..861d6230ea 100755 --- a/src/resolve/generate-dns_type-gperf.py +++ b/src/resolve/generate-dns_type-gperf.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 -"""Generate %-from-name.gperf from %-list.txt -""" +"Generate %-from-name.gperf from %-list.txt" import sys @@ -13,12 +12,12 @@ print("""\ _Pragma("GCC diagnostic ignored \\"-Wimplicit-fallthrough\\"") #endif %}""") -print("""\ -struct {}_name {{ const char* name; int id; }}; +print(f"""\ +struct {name}_name {{ const char* name; int id; }}; %null-strings -%%""".format(name)) +%%""") for line in open(input): line = line.rstrip() s = line.replace('_', '-') - print("{}, {}{}".format(s, prefix, line)) + print(f'{s}, {prefix}{line}') From 2df21b7ab00cf561a03fd86f1adb890bb5c20893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 12:55:02 +0100 Subject: [PATCH 04/17] sysv-install.skeleton: use CC0 as the license We didn't specify any license, which made the script awkward to use. Let's be maximally permissive. CC0 is used for other documentation-code already. --- src/systemctl/systemd-sysv-install.SKELETON | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON index 8c16cf9991..a2a0059fef 100755 --- a/src/systemctl/systemd-sysv-install.SKELETON +++ b/src/systemctl/systemd-sysv-install.SKELETON @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: CC0-1.0 +# # This script is called by "systemctl enable/disable" when the given unit is a # SysV init.d script. It needs to call the distribution's mechanism for # enabling/disabling those, such as chkconfig, update-rc.d, or similar. This From 7058df3593fbd72d843b2c23d4c0595b4969bce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 12:57:16 +0100 Subject: [PATCH 05/17] udev.pc: add license header All other .pc files have the same header. Not sure why this one was forgotten. --- src/udev/udev.pc.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/udev/udev.pc.in b/src/udev/udev.pc.in index 7b4f4006b5..05caca0ca9 100644 --- a/src/udev/udev.pc.in +++ b/src/udev/udev.pc.in @@ -1,3 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + Name: udev Description: udev Version: @PROJECT_VERSION@ From cb1f01a5f80663b2b2975f753ba578bb20349c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:14:51 +0100 Subject: [PATCH 06/17] missing-syscalls: add license header in the version-controlled generated file If the file was always generated on the fly, the header would be pointless. But since we distribute it, it should be there. C.f. a0e150b2f4933ae7546fce9a2773b0208b2dc269. This was forgotten in 35b42e560039fd87d4ae4d99cd54d1d4e89710b1. --- src/basic/missing_syscall_def.h | 3 ++- src/basic/missing_syscalls.py | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/basic/missing_syscall_def.h b/src/basic/missing_syscall_def.h index 5117075c4d..d87a6a7193 100644 --- a/src/basic/missing_syscall_def.h +++ b/src/basic/missing_syscall_def.h @@ -1,4 +1,5 @@ -/* This file is generated. Do not edit! */ +/* SPDX-License-Identifier: LGPL-2.1-or-later + * This file is generated. Do not edit! */ #ifndef __IGNORE_bpf # if defined(__aarch64__) diff --git a/src/basic/missing_syscalls.py b/src/basic/missing_syscalls.py index eb0dbd9787..d1991f0de3 100644 --- a/src/basic/missing_syscalls.py +++ b/src/basic/missing_syscalls.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1-or-later + import sys import functools @@ -99,7 +101,10 @@ def print_syscall_def(syscall, tables, out): file=out) def print_syscall_defs(syscalls, tables, out): - print('/* This file is generated. Do not edit! */\n', file=out) + print('''\ +/* SPDX-License-Identifier: LGPL-2.1-or-later + * This file is generated. Do not edit! */ +''' , file=out) for syscall in syscalls: print_syscall_def(syscall, tables, out) From 9ee03516df30e068c22a9d86beaf4875b320170e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:37:10 +0100 Subject: [PATCH 07/17] tree-wide: add spdx header on all scripts and helpers Even though many of those scripts are very simple, it is easier to include the header than to try to say whether each of those files is trivial enough not to require one. --- Makefile | 2 ++ configure | 1 + src/basic/af-to-name.awk | 2 ++ src/basic/arphrd-to-name.awk | 2 ++ src/basic/cap-to-name.awk | 2 ++ src/basic/errno-to-name.awk | 2 ++ src/basic/generate-af-list.sh | 1 + src/basic/generate-arphrd-list.sh | 1 + src/basic/generate-cap-list.sh | 1 + src/basic/generate-errno-list.sh | 1 + src/basic/linux/update.sh | 2 +- src/boot/efi/no-undefined-symbols.sh | 1 + src/core/load-fragment-gperf-nulstr.awk | 2 ++ src/core/load-fragment-gperf.gperf.m4 | 1 + src/home/homed-gperf.gperf | 1 + src/journal-remote/log-generator.py | 2 ++ src/journal/journald-gperf.gperf | 1 + src/libsystemd/sd-journal/audit_type-to-name.awk | 2 ++ src/libsystemd/sd-journal/generate-audit_type-list.sh | 1 + src/login/logind-gperf.gperf | 1 + src/network/netdev/netdev-gperf.gperf | 1 + src/network/networkd-gperf.gperf | 1 + src/network/networkd-network-gperf.gperf | 1 + src/nspawn/nspawn-gperf.gperf | 1 + src/partition/test-repart.sh | 1 + src/resolve/dns_type-to-name.awk | 2 ++ src/resolve/generate-dns_type-gperf.py | 1 + src/resolve/generate-dns_type-list.sed | 1 + src/resolve/resolved-dnssd-gperf.gperf | 1 + src/resolve/resolved-gperf.gperf | 1 + src/shared/generate-ip-protocol-list.sh | 2 ++ src/shared/generate-syscall-list.py | 2 ++ src/shared/ip-protocol-to-name.awk | 2 ++ src/test/generate-sym-test.py | 2 ++ src/test/test-hashmap-ordered.awk | 1 + src/timesync/timesyncd-gperf.gperf | 1 + src/udev/generate-keyboard-keys-gperf.sh | 1 + src/udev/generate-keyboard-keys-list.sh | 1 + src/udev/net/link-config-gperf.gperf | 1 + tools/add-git-hook.sh | 1 + tools/check-api-docs.sh | 1 + tools/check-compilation.sh | 1 + tools/check-directives.sh | 1 + tools/check-help.sh | 1 + tools/choose-default-locale.sh | 1 + tools/coverity.sh | 1 + tools/find-build-dir.sh | 1 + tools/get-coverity.sh | 1 + tools/git-contrib.sh | 1 + tools/meson-apply-m4.sh | 1 + tools/meson-build.sh | 1 + tools/meson-make-symlink.sh | 1 + tools/meson-vcs-tag.sh | 1 + tools/syscall-table-update.sh | 1 + tools/update-hwdb-autosuspend.sh | 1 + tools/update-hwdb.sh | 1 + units/meson-add-wants.sh | 1 + 57 files changed, 70 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b7e13fba2e..eeb0dbc62f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + all: ninja -C build diff --git a/configure b/configure index 5247074b6d..fb9d01e1a7 100755 --- a/configure +++ b/configure @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later set -e cflags=CFLAGS="$CFLAGS" diff --git a/src/basic/af-to-name.awk b/src/basic/af-to-name.awk index 18d0a89728..b9cfbb7e37 100644 --- a/src/basic/af-to-name.awk +++ b/src/basic/af-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "static const char* const af_names[] = { " } diff --git a/src/basic/arphrd-to-name.awk b/src/basic/arphrd-to-name.awk index db1c739abb..d25a4e9bcb 100644 --- a/src/basic/arphrd-to-name.awk +++ b/src/basic/arphrd-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "const char *arphrd_to_name(int id) {" print " switch(id) {" diff --git a/src/basic/cap-to-name.awk b/src/basic/cap-to-name.awk index 402a782024..bd8a28c2fe 100644 --- a/src/basic/cap-to-name.awk +++ b/src/basic/cap-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "static const char* const capability_names[] = { " } diff --git a/src/basic/errno-to-name.awk b/src/basic/errno-to-name.awk index 0878abacbd..6b18a90e13 100644 --- a/src/basic/errno-to-name.awk +++ b/src/basic/errno-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "static const char* const errno_names[] = { " } diff --git a/src/basic/generate-af-list.sh b/src/basic/generate-af-list.sh index 6987877ebf..0a5c5c4cd7 100755 --- a/src/basic/generate-af-list.sh +++ b/src/basic/generate-af-list.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu $1 -E -dM -include sys/socket.h -include "$2" -include "$3" - = 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/home/homed-gperf.gperf b/src/home/homed-gperf.gperf index 970da5f790..39aca35b08 100644 --- a/src/home/homed-gperf.gperf +++ b/src/home/homed-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/journal-remote/log-generator.py b/src/journal-remote/log-generator.py index e1725b1a71..6e42d8a8b4 100755 --- a/src/journal-remote/log-generator.py +++ b/src/journal-remote/log-generator.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1-or-later + import sys import argparse diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf index c70ac9a5b6..9076597628 100644 --- a/src/journal/journald-gperf.gperf +++ b/src/journal/journald-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/libsystemd/sd-journal/audit_type-to-name.awk b/src/libsystemd/sd-journal/audit_type-to-name.awk index 44fc702eb3..1657866a6a 100644 --- a/src/libsystemd/sd-journal/audit_type-to-name.awk +++ b/src/libsystemd/sd-journal/audit_type-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } diff --git a/src/libsystemd/sd-journal/generate-audit_type-list.sh b/src/libsystemd/sd-journal/generate-audit_type-list.sh index 912d0c9905..d5b145f31d 100755 --- a/src/libsystemd/sd-journal/generate-audit_type-list.sh +++ b/src/libsystemd/sd-journal/generate-audit_type-list.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu cpp="$1" diff --git a/src/login/logind-gperf.gperf b/src/login/logind-gperf.gperf index 2c152d2ce6..25e429c5a3 100644 --- a/src/login/logind-gperf.gperf +++ b/src/login/logind-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf index 680063eb3b..fd02c6689b 100644 --- a/src/network/netdev/netdev-gperf.gperf +++ b/src/network/netdev/netdev-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/network/networkd-gperf.gperf b/src/network/networkd-gperf.gperf index 2860875a0f..4bfb0fe088 100644 --- a/src/network/networkd-gperf.gperf +++ b/src/network/networkd-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 5152868f78..f1344c0fcc 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/nspawn/nspawn-gperf.gperf b/src/nspawn/nspawn-gperf.gperf index 7751c3c062..315bf33155 100644 --- a/src/nspawn/nspawn-gperf.gperf +++ b/src/nspawn/nspawn-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/partition/test-repart.sh b/src/partition/test-repart.sh index 9af3049b6b..0910d68078 100755 --- a/src/partition/test-repart.sh +++ b/src/partition/test-repart.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later set -ex [[ -f /dev/loop-control ]] || exit 77 diff --git a/src/resolve/dns_type-to-name.awk b/src/resolve/dns_type-to-name.awk index badb1824b5..2d9794b761 100644 --- a/src/resolve/dns_type-to-name.awk +++ b/src/resolve/dns_type-to-name.awk @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } diff --git a/src/resolve/generate-dns_type-gperf.py b/src/resolve/generate-dns_type-gperf.py index 861d6230ea..7243d3605a 100755 --- a/src/resolve/generate-dns_type-gperf.py +++ b/src/resolve/generate-dns_type-gperf.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: LGPL-2.1-or-later "Generate %-from-name.gperf from %-list.txt" diff --git a/src/resolve/generate-dns_type-list.sed b/src/resolve/generate-dns_type-list.sed index b7bc30f1f2..32af08c371 100644 --- a/src/resolve/generate-dns_type-list.sed +++ b/src/resolve/generate-dns_type-list.sed @@ -1 +1,2 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later s/.* DNS_TYPE_(\w+).*/\1/p diff --git a/src/resolve/resolved-dnssd-gperf.gperf b/src/resolve/resolved-dnssd-gperf.gperf index 2780b856bf..f10eae3cee 100644 --- a/src/resolve/resolved-dnssd-gperf.gperf +++ b/src/resolve/resolved-dnssd-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #include #include "conf-parser.h" diff --git a/src/resolve/resolved-gperf.gperf b/src/resolve/resolved-gperf.gperf index 2da273ab1e..eab4c7ee14 100644 --- a/src/resolve/resolved-gperf.gperf +++ b/src/resolve/resolved-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/shared/generate-ip-protocol-list.sh b/src/shared/generate-ip-protocol-list.sh index 3f9197949f..749a1305c1 100755 --- a/src/shared/generate-ip-protocol-list.sh +++ b/src/shared/generate-ip-protocol-list.sh @@ -1,4 +1,6 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later + set -eu $1 -dM -include netinet/in.h - ') diff --git a/src/test/test-hashmap-ordered.awk b/src/test/test-hashmap-ordered.awk index 10f4386fa4..88ffc2562b 100644 --- a/src/test/test-hashmap-ordered.awk +++ b/src/test/test-hashmap-ordered.awk @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later BEGIN { print "/* GENERATED FILE */"; print "#define ORDERED" diff --git a/src/timesync/timesyncd-gperf.gperf b/src/timesync/timesyncd-gperf.gperf index 76e4f63277..1a26995751 100644 --- a/src/timesync/timesyncd-gperf.gperf +++ b/src/timesync/timesyncd-gperf.gperf @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ %{ #if __GNUC__ >= 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/src/udev/generate-keyboard-keys-gperf.sh b/src/udev/generate-keyboard-keys-gperf.sh index c78652a8e9..d417da22fd 100755 --- a/src/udev/generate-keyboard-keys-gperf.sh +++ b/src/udev/generate-keyboard-keys-gperf.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu awk ' diff --git a/src/udev/generate-keyboard-keys-list.sh b/src/udev/generate-keyboard-keys-list.sh index aa00c15c16..b40368467b 100755 --- a/src/udev/generate-keyboard-keys-list.sh +++ b/src/udev/generate-keyboard-keys-list.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu $1 -dM -include linux/input.h - = 7 _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") diff --git a/tools/add-git-hook.sh b/tools/add-git-hook.sh index 5b1bf17219..66bbcd64ea 100755 --- a/tools/add-git-hook.sh +++ b/tools/add-git-hook.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu cd "$MESON_SOURCE_ROOT" diff --git a/tools/check-api-docs.sh b/tools/check-api-docs.sh index 1094101e08..283e7a64d7 100755 --- a/tools/check-api-docs.sh +++ b/tools/check-api-docs.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu sd_good=0 diff --git a/tools/check-compilation.sh b/tools/check-compilation.sh index ce39e1684b..c2fe3aa5c1 100755 --- a/tools/check-compilation.sh +++ b/tools/check-compilation.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu "$@" '-' -o/dev/null /dev/null || exit 77 diff --git a/tools/check-help.sh b/tools/check-help.sh index efe7ed4e56..721dec4c64 100755 --- a/tools/check-help.sh +++ b/tools/check-help.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu export SYSTEMD_LOG_LEVEL=info diff --git a/tools/choose-default-locale.sh b/tools/choose-default-locale.sh index da9768ad7c..a5158cf7c5 100755 --- a/tools/choose-default-locale.sh +++ b/tools/choose-default-locale.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -e # Fedora uses C.utf8 but Debian uses C.UTF-8 diff --git a/tools/coverity.sh b/tools/coverity.sh index 8aa0544466..f140b78174 100755 --- a/tools/coverity.sh +++ b/tools/coverity.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later # The official unmodified version of the script can be found at # https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh diff --git a/tools/find-build-dir.sh b/tools/find-build-dir.sh index fb8a1c17a3..e449b6e865 100755 --- a/tools/find-build-dir.sh +++ b/tools/find-build-dir.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -e # Try to guess the build directory: diff --git a/tools/get-coverity.sh b/tools/get-coverity.sh index 3634e57ad6..8f84aec80e 100755 --- a/tools/get-coverity.sh +++ b/tools/get-coverity.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: LGPL-2.1-or-later # Download and extract coverity tool diff --git a/tools/git-contrib.sh b/tools/git-contrib.sh index f6fccd6046..fdae898551 100755 --- a/tools/git-contrib.sh +++ b/tools/git-contrib.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu git shortlog -s `git describe --abbrev=0 --match 'v[0-9][0-9][0-9]'`.. | \ diff --git a/tools/meson-apply-m4.sh b/tools/meson-apply-m4.sh index 5fad8cd94f..7b4801ff94 100755 --- a/tools/meson-apply-m4.sh +++ b/tools/meson-apply-m4.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu CONFIG=$1 diff --git a/tools/meson-build.sh b/tools/meson-build.sh index dea554177d..26f995dfc1 100755 --- a/tools/meson-build.sh +++ b/tools/meson-build.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eux src="$1" diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh index 8c7e887f51..96f5892281 100755 --- a/tools/meson-make-symlink.sh +++ b/tools/meson-make-symlink.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then diff --git a/tools/meson-vcs-tag.sh b/tools/meson-vcs-tag.sh index a285210f96..1ec04c76b7 100755 --- a/tools/meson-vcs-tag.sh +++ b/tools/meson-vcs-tag.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu set -o pipefail diff --git a/tools/syscall-table-update.sh b/tools/syscall-table-update.sh index e270246202..a6d7d14732 100755 --- a/tools/syscall-table-update.sh +++ b/tools/syscall-table-update.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu cd "$1" && shift diff --git a/tools/update-hwdb-autosuspend.sh b/tools/update-hwdb-autosuspend.sh index b037dd8d5a..7d5a9a8cf5 100755 --- a/tools/update-hwdb-autosuspend.sh +++ b/tools/update-hwdb-autosuspend.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu cd "$1" diff --git a/tools/update-hwdb.sh b/tools/update-hwdb.sh index 42251612dd..773a959dcf 100755 --- a/tools/update-hwdb.sh +++ b/tools/update-hwdb.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu cd "$1" diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh index b7f57a5e2c..f6424fe29f 100755 --- a/units/meson-add-wants.sh +++ b/units/meson-add-wants.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later set -eu i=1 From 30e31503bd49f69b80e59d32bdc795f50ad96f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:38:40 +0100 Subject: [PATCH 08/17] tree-wide: add spdx header on source files version.h is tiny, but the other two certainly deserve a license header. --- src/journal-remote/browse.html | 1 + src/shared/openssl-util.c | 2 ++ src/version/version.h.in | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/journal-remote/browse.html b/src/journal-remote/browse.html index 9a5ae803fc..4fe2cd84ea 100644 --- a/src/journal-remote/browse.html +++ b/src/journal-remote/browse.html @@ -1,4 +1,5 @@ + Journal diff --git a/src/shared/openssl-util.c b/src/shared/openssl-util.c index 895539f436..4ea72a8b2b 100644 --- a/src/shared/openssl-util.c +++ b/src/shared/openssl-util.c @@ -1,3 +1,5 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + #include "openssl-util.h" #include "alloc-util.h" diff --git a/src/version/version.h.in b/src/version/version.h.in index 7b0bf8e264..083779aab0 100644 --- a/src/version/version.h.in +++ b/src/version/version.h.in @@ -1,4 +1,6 @@ -/* Detailed project version that includes git commit when not built from a release. +/* SPDX-License-Identifier: LGPL-2.1-or-later + * + * Detailed project version that includes git commit when not built from a release. * Use this in preference to PROJECT_VERSION, with the following exceptions: * - where a simplified form is expected for compatibility, for example * 'udevadm version', From 8a7c7868a7a499f5fd59037049b89f38298b6618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:41:43 +0100 Subject: [PATCH 09/17] timesync: add header to distributed file We don't include a license header in .conf and similar files, but we should include a header that tells the user that this is our file and points to some docs. --- src/timesync/80-systemd-timesync.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/timesync/80-systemd-timesync.list b/src/timesync/80-systemd-timesync.list index d5959ade89..95e15f786a 100644 --- a/src/timesync/80-systemd-timesync.list +++ b/src/timesync/80-systemd-timesync.list @@ -1 +1,4 @@ +# This file is part of systemd. +# See systemd-timedated.service(8) for more information. + systemd-timesyncd.service From 2bc48bbdd717c3d4fa1345218cf4c2f5d131152e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:44:05 +0100 Subject: [PATCH 10/17] docs: expose GVARIANT-SERIALIZATION as markdown --- .../GVARIANT-SERIALIZATION.md | 9 +++++++-- meson.build | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) rename src/libsystemd/sd-bus/GVARIANT-SERIALIZATION => docs/GVARIANT-SERIALIZATION.md (96%) diff --git a/src/libsystemd/sd-bus/GVARIANT-SERIALIZATION b/docs/GVARIANT-SERIALIZATION.md similarity index 96% rename from src/libsystemd/sd-bus/GVARIANT-SERIALIZATION rename to docs/GVARIANT-SERIALIZATION.md index 973a063761..54e3705ba2 100644 --- a/src/libsystemd/sd-bus/GVARIANT-SERIALIZATION +++ b/docs/GVARIANT-SERIALIZATION.md @@ -1,5 +1,10 @@ -How we use GVariant for serializing D-Bus messages --------------------------------------------------- +--- +title: GVariant D-Bus Message Serialization +category: Interfaces +layout: default +--- + +# GVariant D-Bus Message Serialization We stay close to the original dbus1 framing as possible, but make certain changes to adapt for GVariant. dbus1 has the following diff --git a/meson.build b/meson.build index 60d8dc7abc..179c3174c8 100644 --- a/meson.build +++ b/meson.build @@ -3476,7 +3476,7 @@ install_data('LICENSE.GPL2', 'docs/TRANSIENT-SETTINGS.md', 'docs/TRANSLATORS.md', 'docs/UIDS-GIDS.md', - 'src/libsystemd/sd-bus/GVARIANT-SERIALIZATION', + 'docs/GVARIANT-SERIALIZATION.md', install_dir : docdir) meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir)) From 984b529684bf5597984b8d7ed8317b7d239b8dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 13:56:12 +0100 Subject: [PATCH 11/17] Use .txt as the extension for syscall list file Upstream uses .text, but this is rather unusual. Let's use .txt as the usual suffix for text files. This tells various editors and such that the file should be treated as plain text. I also want to a script to summarize license status, and having an easy-to-recognize suffix makes this easier. --- src/basic/meson.build | 2 +- src/basic/{syscall-names.text => syscall-list.txt} | 0 src/shared/meson.build | 2 +- tools/syscall-table-update.sh | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/basic/{syscall-names.text => syscall-list.txt} (100%) diff --git a/src/basic/meson.build b/src/basic/meson.build index c801251e30..8978e81600 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -361,7 +361,7 @@ run_target( 'update-syscall-tables', command : [syscall_table_update_sh, meson.current_source_dir()] + arch_list) -syscall_names_text = files('syscall-names.text') +syscall_list_txt = files('syscall-list.txt') syscall_lists = [] foreach arch: arch_list diff --git a/src/basic/syscall-names.text b/src/basic/syscall-list.txt similarity index 100% rename from src/basic/syscall-names.text rename to src/basic/syscall-list.txt diff --git a/src/shared/meson.build b/src/shared/meson.build index 0f50522b6a..f301a9f610 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -292,7 +292,7 @@ generate_syscall_list = find_program('generate-syscall-list.py') fname = 'syscall-list.h' syscall_list_h = custom_target( fname, - input : syscall_names_text, + input : syscall_list_txt, output : fname, command : [generate_syscall_list, '@INPUT@'], diff --git a/tools/syscall-table-update.sh b/tools/syscall-table-update.sh index a6d7d14732..410b20c5d9 100755 --- a/tools/syscall-table-update.sh +++ b/tools/syscall-table-update.sh @@ -4,7 +4,7 @@ set -eu cd "$1" && shift -curl --fail -L -o syscall-names.text 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text' +curl --fail -L -o syscall-list.txt 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text' for arch in "$@"; do curl --fail -L -o syscalls-$arch "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch" From 1f6f8cc8039a204609ddab79791ef22ee6340da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 14:00:07 +0100 Subject: [PATCH 12/17] Use .txt as the extension of arch syscall lists This makes it easier to filter those files and tells editors that they should be treated as plain text. --- src/basic/meson.build | 2 +- src/basic/{syscalls-alpha => syscalls-alpha.txt} | 0 src/basic/{syscalls-arc => syscalls-arc.txt} | 0 src/basic/{syscalls-arm => syscalls-arm.txt} | 0 src/basic/{syscalls-arm64 => syscalls-arm64.txt} | 0 src/basic/{syscalls-i386 => syscalls-i386.txt} | 0 src/basic/{syscalls-ia64 => syscalls-ia64.txt} | 0 src/basic/{syscalls-m68k => syscalls-m68k.txt} | 0 src/basic/{syscalls-mips64 => syscalls-mips64.txt} | 0 src/basic/{syscalls-mips64n32 => syscalls-mips64n32.txt} | 0 src/basic/{syscalls-mipso32 => syscalls-mipso32.txt} | 0 src/basic/{syscalls-powerpc => syscalls-powerpc.txt} | 0 src/basic/{syscalls-powerpc64 => syscalls-powerpc64.txt} | 0 src/basic/{syscalls-s390 => syscalls-s390.txt} | 0 src/basic/{syscalls-s390x => syscalls-s390x.txt} | 0 src/basic/{syscalls-sparc => syscalls-sparc.txt} | 0 src/basic/{syscalls-x86_64 => syscalls-x86_64.txt} | 0 tools/syscall-table-update.sh | 2 +- 18 files changed, 2 insertions(+), 2 deletions(-) rename src/basic/{syscalls-alpha => syscalls-alpha.txt} (100%) rename src/basic/{syscalls-arc => syscalls-arc.txt} (100%) rename src/basic/{syscalls-arm => syscalls-arm.txt} (100%) rename src/basic/{syscalls-arm64 => syscalls-arm64.txt} (100%) rename src/basic/{syscalls-i386 => syscalls-i386.txt} (100%) rename src/basic/{syscalls-ia64 => syscalls-ia64.txt} (100%) rename src/basic/{syscalls-m68k => syscalls-m68k.txt} (100%) rename src/basic/{syscalls-mips64 => syscalls-mips64.txt} (100%) rename src/basic/{syscalls-mips64n32 => syscalls-mips64n32.txt} (100%) rename src/basic/{syscalls-mipso32 => syscalls-mipso32.txt} (100%) rename src/basic/{syscalls-powerpc => syscalls-powerpc.txt} (100%) rename src/basic/{syscalls-powerpc64 => syscalls-powerpc64.txt} (100%) rename src/basic/{syscalls-s390 => syscalls-s390.txt} (100%) rename src/basic/{syscalls-s390x => syscalls-s390x.txt} (100%) rename src/basic/{syscalls-sparc => syscalls-sparc.txt} (100%) rename src/basic/{syscalls-x86_64 => syscalls-x86_64.txt} (100%) diff --git a/src/basic/meson.build b/src/basic/meson.build index 8978e81600..d6ef5eb28b 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -365,7 +365,7 @@ syscall_list_txt = files('syscall-list.txt') syscall_lists = [] foreach arch: arch_list - syscall_lists += files('syscalls-@0@'.format(arch)) + syscall_lists += files('syscalls-@0@.txt'.format(arch)) endforeach missing_syscalls_py = find_program('missing_syscalls.py') diff --git a/src/basic/syscalls-alpha b/src/basic/syscalls-alpha.txt similarity index 100% rename from src/basic/syscalls-alpha rename to src/basic/syscalls-alpha.txt diff --git a/src/basic/syscalls-arc b/src/basic/syscalls-arc.txt similarity index 100% rename from src/basic/syscalls-arc rename to src/basic/syscalls-arc.txt diff --git a/src/basic/syscalls-arm b/src/basic/syscalls-arm.txt similarity index 100% rename from src/basic/syscalls-arm rename to src/basic/syscalls-arm.txt diff --git a/src/basic/syscalls-arm64 b/src/basic/syscalls-arm64.txt similarity index 100% rename from src/basic/syscalls-arm64 rename to src/basic/syscalls-arm64.txt diff --git a/src/basic/syscalls-i386 b/src/basic/syscalls-i386.txt similarity index 100% rename from src/basic/syscalls-i386 rename to src/basic/syscalls-i386.txt diff --git a/src/basic/syscalls-ia64 b/src/basic/syscalls-ia64.txt similarity index 100% rename from src/basic/syscalls-ia64 rename to src/basic/syscalls-ia64.txt diff --git a/src/basic/syscalls-m68k b/src/basic/syscalls-m68k.txt similarity index 100% rename from src/basic/syscalls-m68k rename to src/basic/syscalls-m68k.txt diff --git a/src/basic/syscalls-mips64 b/src/basic/syscalls-mips64.txt similarity index 100% rename from src/basic/syscalls-mips64 rename to src/basic/syscalls-mips64.txt diff --git a/src/basic/syscalls-mips64n32 b/src/basic/syscalls-mips64n32.txt similarity index 100% rename from src/basic/syscalls-mips64n32 rename to src/basic/syscalls-mips64n32.txt diff --git a/src/basic/syscalls-mipso32 b/src/basic/syscalls-mipso32.txt similarity index 100% rename from src/basic/syscalls-mipso32 rename to src/basic/syscalls-mipso32.txt diff --git a/src/basic/syscalls-powerpc b/src/basic/syscalls-powerpc.txt similarity index 100% rename from src/basic/syscalls-powerpc rename to src/basic/syscalls-powerpc.txt diff --git a/src/basic/syscalls-powerpc64 b/src/basic/syscalls-powerpc64.txt similarity index 100% rename from src/basic/syscalls-powerpc64 rename to src/basic/syscalls-powerpc64.txt diff --git a/src/basic/syscalls-s390 b/src/basic/syscalls-s390.txt similarity index 100% rename from src/basic/syscalls-s390 rename to src/basic/syscalls-s390.txt diff --git a/src/basic/syscalls-s390x b/src/basic/syscalls-s390x.txt similarity index 100% rename from src/basic/syscalls-s390x rename to src/basic/syscalls-s390x.txt diff --git a/src/basic/syscalls-sparc b/src/basic/syscalls-sparc.txt similarity index 100% rename from src/basic/syscalls-sparc rename to src/basic/syscalls-sparc.txt diff --git a/src/basic/syscalls-x86_64 b/src/basic/syscalls-x86_64.txt similarity index 100% rename from src/basic/syscalls-x86_64 rename to src/basic/syscalls-x86_64.txt diff --git a/tools/syscall-table-update.sh b/tools/syscall-table-update.sh index 410b20c5d9..4f56aecedd 100755 --- a/tools/syscall-table-update.sh +++ b/tools/syscall-table-update.sh @@ -7,5 +7,5 @@ cd "$1" && shift curl --fail -L -o syscall-list.txt 'https://raw.githubusercontent.com/hrw/syscalls-table/master/syscall-names.text' for arch in "$@"; do - curl --fail -L -o syscalls-$arch "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch" + curl --fail -L -o syscalls-$arch.txt "https://raw.githubusercontent.com/hrw/syscalls-table/master/tables/syscalls-$arch" done From d3821a339e75a8589304c9ef1b6654ac52319102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 14:04:14 +0100 Subject: [PATCH 13/17] tools: rename helper to match target name The target is update-syscall-tables, so let's call the script update-syscall-tables.sh to reduce the cognitive overhead when trying to find the right file. --- meson.build | 12 ++++++------ src/basic/meson.build | 2 +- ...call-table-update.sh => update-syscall-tables.sh} | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename tools/{syscall-table-update.sh => update-syscall-tables.sh} (100%) diff --git a/meson.build b/meson.build index 179c3174c8..0af0cce8b8 100644 --- a/meson.build +++ b/meson.build @@ -1589,16 +1589,16 @@ conf.set10('ENABLE_EFI', have) ############################################################ -update_hwdb_sh = find_program('tools/update-hwdb.sh') -update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh') +generate_gperfs = find_program('tools/generate-gperfs.py') make_autosuspend_rules_py = find_program('tools/make-autosuspend-rules.py') make_directive_index_py = find_program('tools/make-directive-index.py') make_man_index_py = find_program('tools/make-man-index.py') -syscall_table_update_sh = find_program('tools/syscall-table-update.sh') -xml_helper_py = find_program('tools/xml_helper.py') -update_dbus_docs_py = find_program('tools/update-dbus-docs.py') meson_apply_m4 = find_program('tools/meson-apply-m4.sh') -generate_gperfs = find_program('tools/generate-gperfs.py') +update_dbus_docs_py = find_program('tools/update-dbus-docs.py') +update_hwdb_sh = find_program('tools/update-hwdb.sh') +update_hwdb_autosuspend_sh = find_program('tools/update-hwdb-autosuspend.sh') +update_syscall_tables_sh = find_program('tools/update-syscall-tables.sh') +xml_helper_py = find_program('tools/xml_helper.py') ##################################################################### diff --git a/src/basic/meson.build b/src/basic/meson.build index d6ef5eb28b..b3040f5cfe 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -359,7 +359,7 @@ arch_list = [ run_target( 'update-syscall-tables', - command : [syscall_table_update_sh, meson.current_source_dir()] + arch_list) + command : [update_syscall_tables_sh, meson.current_source_dir()] + arch_list) syscall_list_txt = files('syscall-list.txt') diff --git a/tools/syscall-table-update.sh b/tools/update-syscall-tables.sh similarity index 100% rename from tools/syscall-table-update.sh rename to tools/update-syscall-tables.sh From 9c08f7d51696a750b58aa8a8c5ff51c94adbf0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 14:10:25 +0100 Subject: [PATCH 14/17] kernel-install: add boilerplate on installed .install files Those files distribured, so they should have the same header as kernel-install itself. Let's fix indentation while at it. --- src/kernel-install/00-entry-directory.install | 18 ++++++++++- src/kernel-install/50-depmod.install | 16 ++++++++++ src/kernel-install/90-loaderentry.install | 32 ++++++++++++++----- 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/src/kernel-install/00-entry-directory.install b/src/kernel-install/00-entry-directory.install index 21c09fa691..ab616b2823 100644 --- a/src/kernel-install/00-entry-directory.install +++ b/src/kernel-install/00-entry-directory.install @@ -1,6 +1,22 @@ #!/usr/bin/env bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . COMMAND="$1" KERNEL_VERSION="$2" @@ -13,7 +29,7 @@ if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then fi if [[ $COMMAND != add ]]; then - exit 0 + exit 0 fi # If the boot dir exists (e.g. $ESP/), diff --git a/src/kernel-install/50-depmod.install b/src/kernel-install/50-depmod.install index 3850eacef5..2fd959865f 100644 --- a/src/kernel-install/50-depmod.install +++ b/src/kernel-install/50-depmod.install @@ -1,6 +1,22 @@ #!/usr/bin/env bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . COMMAND="$1" KERNEL_VERSION="$2" diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index d096745382..e6c7e99e65 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -1,6 +1,22 @@ #!/usr/bin/env bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see . COMMAND="$1" KERNEL_VERSION="$2" @@ -73,11 +89,11 @@ else fi cp "$KERNEL_IMAGE" "$ENTRY_DIR_ABS/linux" && - chown root:root "$ENTRY_DIR_ABS/linux" && - chmod 0644 "$ENTRY_DIR_ABS/linux" || { - echo "Could not copy '$KERNEL_IMAGE to '$ENTRY_DIR_ABS/linux'." >&2 - exit 1 -} + chown root:root "$ENTRY_DIR_ABS/linux" && + chmod 0644 "$ENTRY_DIR_ABS/linux" || { + echo "Could not copy '$KERNEL_IMAGE to '$ENTRY_DIR_ABS/linux'." >&2 + exit 1 + } INITRD_OPTIONS=( "${@:${INITRD_OPTIONS_START}}" ) @@ -89,9 +105,9 @@ for initrd in "${INITRD_OPTIONS[@]}"; do cp "${initrd}" "$ENTRY_DIR_ABS/${initrd_basename}" && chown root:root "$ENTRY_DIR_ABS/${initrd_basename}" && chmod 0644 "$ENTRY_DIR_ABS/${initrd_basename}" || { - echo "Could not copy '${initrd}' to '$ENTRY_DIR_ABS/${initrd_basename}'." >&2 - exit 1 - } + echo "Could not copy '${initrd}' to '$ENTRY_DIR_ABS/${initrd_basename}'." >&2 + exit 1 + } fi done From 7a6eb60bd524a221f891c5c50a9be77d4f245a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 14:16:14 +0100 Subject: [PATCH 15/17] license: LGPL-2.1+ -> LGPL-2.1-or-later Follow-up for db9ecf050165fd1033c6f81485917e229c4be537 and faa73d4e0c8095fedd98ff29851b9634810ff97e. --- src/libsystemd/sd-netlink/nfnl-message.c | 2 +- src/shared/firewall-util-iptables.c | 2 +- src/shared/firewall-util-nft.c | 2 +- src/shared/firewall-util-private.h | 2 +- src/systemctl/systemctl-mount.c | 2 +- src/systemctl/systemctl-mount.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsystemd/sd-netlink/nfnl-message.c b/src/libsystemd/sd-netlink/nfnl-message.c index 6c11ae6ee5..47e107a313 100644 --- a/src/libsystemd/sd-netlink/nfnl-message.c +++ b/src/libsystemd/sd-netlink/nfnl-message.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include diff --git a/src/shared/firewall-util-iptables.c b/src/shared/firewall-util-iptables.c index ab3438843b..fec3000e75 100644 --- a/src/shared/firewall-util-iptables.c +++ b/src/shared/firewall-util-iptables.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* Temporary work-around for broken glibc vs. linux kernel header definitions * This is already fixed upstream, remove this when distributions have updated. diff --git a/src/shared/firewall-util-nft.c b/src/shared/firewall-util-nft.c index d48811a58a..98dd7ff3b4 100644 --- a/src/shared/firewall-util-nft.c +++ b/src/shared/firewall-util-nft.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include diff --git a/src/shared/firewall-util-private.h b/src/shared/firewall-util-private.h index f034af180e..59e1e502fd 100644 --- a/src/shared/firewall-util-private.h +++ b/src/shared/firewall-util-private.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once #include diff --git a/src/systemctl/systemctl-mount.c b/src/systemctl/systemctl-mount.c index 646f9b77df..04e626550d 100644 --- a/src/systemctl/systemctl-mount.c +++ b/src/systemctl/systemctl-mount.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bus-error.h" #include "bus-locator.h" diff --git a/src/systemctl/systemctl-mount.h b/src/systemctl/systemctl-mount.h index db0343f831..60d6875d82 100644 --- a/src/systemctl/systemctl-mount.h +++ b/src/systemctl/systemctl-mount.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: LGPL-2.1+ */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once int mount_bind(int argc, char *argv[], void *userdata); From 4c30eb573c2ba3cda0827fbd2480c5ff9ec971a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 27 Jan 2021 14:31:59 +0100 Subject: [PATCH 16/17] networkd: add header to distributed "config" files --- src/network/systemd-networkd.pkla | 3 +++ src/network/systemd-networkd.rules | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/network/systemd-networkd.pkla b/src/network/systemd-networkd.pkla index 4d1bb4585e..c56ea1b54d 100644 --- a/src/network/systemd-networkd.pkla +++ b/src/network/systemd-networkd.pkla @@ -1,3 +1,6 @@ +# This file is part of systemd. +# See systemd-networkd.service(8) and polkit(8) for more information. + [Allow systemd-networkd to set timezone and transient hostname] Identity=unix-user:systemd-network Action=org.freedesktop.hostname1.set-hostname;org.freedesktop.hostname1.get-product-uuid;org.freedesktop.timedate1.set-timezone; diff --git a/src/network/systemd-networkd.rules b/src/network/systemd-networkd.rules index b9077c1ea2..86cc849908 100644 --- a/src/network/systemd-networkd.rules +++ b/src/network/systemd-networkd.rules @@ -1,3 +1,6 @@ +// This file is part of systemd. +// See systemd-networkd.service(8) and polkit(8) for more information. + // Allow systemd-networkd to set timezone, get product UUID, // and transient hostname polkit.addRule(function(action, subject) { From c69479d34f750e38c71db38d677923b362b6bcdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 28 Jan 2021 09:54:36 +0100 Subject: [PATCH 17/17] po: specify LGPL-2.1+ for all translation files --- po/its/polkit.its | 1 + po/its/polkit.loc | 1 + po/lt.po | 2 ++ po/pa.po | 5 ++--- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/po/its/polkit.its b/po/its/polkit.its index 1c37e6bee7..d9799dc7fe 100644 --- a/po/its/polkit.its +++ b/po/its/polkit.its @@ -1,4 +1,5 @@ + diff --git a/po/its/polkit.loc b/po/its/polkit.loc index c7427ec672..82bac66978 100644 --- a/po/its/polkit.loc +++ b/po/its/polkit.loc @@ -1,4 +1,5 @@ + diff --git a/po/lt.po b/po/lt.po index b558ebd5c0..c8eac85909 100644 --- a/po/lt.po +++ b/po/lt.po @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# # Moo, 2018. #zanata msgid "" msgstr "" diff --git a/po/pa.po b/po/pa.po index 8acde2202c..892a8e105b 100644 --- a/po/pa.po +++ b/po/pa.po @@ -1,6 +1,5 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the systemd package. +# SPDX-License-Identifier: LGPL-2.1-or-later +# # A S Alam , 2020, 2021. msgid "" msgstr ""