Skip to content

Commit

Permalink
tree-wide: add spdx header on all scripts and helpers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
keszybz committed Jan 28, 2021
1 parent cb1f01a commit 9ee0351
Show file tree
Hide file tree
Showing 57 changed files with 70 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

all:
ninja -C build

Expand Down
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e

cflags=CFLAGS="$CFLAGS"
Expand Down
2 changes: 2 additions & 0 deletions src/basic/af-to-name.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
print "static const char* const af_names[] = { "
}
Expand Down
2 changes: 2 additions & 0 deletions src/basic/arphrd-to-name.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
print "const char *arphrd_to_name(int id) {"
print " switch(id) {"
Expand Down
2 changes: 2 additions & 0 deletions src/basic/cap-to-name.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
print "static const char* const capability_names[] = { "
}
Expand Down
2 changes: 2 additions & 0 deletions src/basic/errno-to-name.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
print "static const char* const errno_names[] = { "
}
Expand Down
1 change: 1 addition & 0 deletions src/basic/generate-af-list.sh
Original file line number Diff line number Diff line change
@@ -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" - </dev/null | \
Expand Down
1 change: 1 addition & 0 deletions src/basic/generate-arphrd-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

$1 -dM -include linux/if_arp.h -include "$2" - </dev/null | \
Expand Down
1 change: 1 addition & 0 deletions src/basic/generate-cap-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

$1 -dM -include linux/capability.h -include "$2" -include "$3" - </dev/null | \
Expand Down
1 change: 1 addition & 0 deletions src/basic/generate-errno-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

$1 -dM -include errno.h - </dev/null | \
Expand Down
2 changes: 1 addition & 1 deletion src/basic/linux/update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

for i in *.h */*.h; do
Expand Down
1 change: 1 addition & 0 deletions src/boot/efi/no-undefined-symbols.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

if nm -D -u "$1" | grep ' U '; then
Expand Down
2 changes: 2 additions & 0 deletions src/core/load-fragment-gperf-nulstr.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
keywords=0 ; FS="," ;
print "extern const char load_fragment_gperf_nulstr[];" ;
Expand Down
1 change: 1 addition & 0 deletions src/core/load-fragment-gperf.gperf.m4
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
m4_dnl SPDX-License-Identifier: LGPL-2.1-or-later
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/home/homed-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
2 changes: 2 additions & 0 deletions src/journal-remote/log-generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later

import sys
import argparse

Expand Down
1 change: 1 addition & 0 deletions src/journal/journald-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
2 changes: 2 additions & 0 deletions src/libsystemd/sd-journal/audit_type-to-name.awk
Original file line number Diff line number Diff line change
@@ -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) {"
}
Expand Down
1 change: 1 addition & 0 deletions src/libsystemd/sd-journal/generate-audit_type-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cpp="$1"
Expand Down
1 change: 1 addition & 0 deletions src/login/logind-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/network/netdev/netdev-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/network/networkd-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/network/networkd-network-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/nspawn/nspawn-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/partition/test-repart.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -ex

[[ -f /dev/loop-control ]] || exit 77
Expand Down
2 changes: 2 additions & 0 deletions src/resolve/dns_type-to-name.awk
Original file line number Diff line number Diff line change
@@ -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) {"
}
Expand Down
1 change: 1 addition & 0 deletions src/resolve/generate-dns_type-gperf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later

"Generate %-from-name.gperf from %-list.txt"

Expand Down
1 change: 1 addition & 0 deletions src/resolve/generate-dns_type-list.sed
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
s/.* DNS_TYPE_(\w+).*/\1/p
1 change: 1 addition & 0 deletions src/resolve/resolved-dnssd-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#include <stddef.h>
#include "conf-parser.h"
Expand Down
1 change: 1 addition & 0 deletions src/resolve/resolved-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
2 changes: 2 additions & 0 deletions src/shared/generate-ip-protocol-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later

set -eu

$1 -dM -include netinet/in.h - </dev/null | \
Expand Down
2 changes: 2 additions & 0 deletions src/shared/generate-syscall-list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later

import sys
import os

Expand Down
2 changes: 2 additions & 0 deletions src/shared/ip-protocol-to-name.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

BEGIN{
print "static const char* const ip_protocol_names[] = { "
}
Expand Down
2 changes: 2 additions & 0 deletions src/test/generate-sym-test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1-or-later

import sys, re

print('#include <stdio.h>')
Expand Down
1 change: 1 addition & 0 deletions src/test/test-hashmap-ordered.awk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
BEGIN {
print "/* GENERATED FILE */";
print "#define ORDERED"
Expand Down
1 change: 1 addition & 0 deletions src/timesync/timesyncd-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions src/udev/generate-keyboard-keys-gperf.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

awk '
Expand Down
1 change: 1 addition & 0 deletions src/udev/generate-keyboard-keys-list.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

$1 -dM -include linux/input.h - </dev/null | awk '
Expand Down
1 change: 1 addition & 0 deletions src/udev/net/link-config-gperf.gperf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
%{
#if __GNUC__ >= 7
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
Expand Down
1 change: 1 addition & 0 deletions tools/add-git-hook.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cd "$MESON_SOURCE_ROOT"
Expand Down
1 change: 1 addition & 0 deletions tools/check-api-docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

sd_good=0
Expand Down
1 change: 1 addition & 0 deletions tools/check-compilation.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

"$@" '-' -o/dev/null </dev/null
1 change: 1 addition & 0 deletions tools/check-directives.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e

which perl &>/dev/null || exit 77
Expand Down
1 change: 1 addition & 0 deletions tools/check-help.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

export SYSTEMD_LOG_LEVEL=info
Expand Down
1 change: 1 addition & 0 deletions tools/choose-default-locale.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/coverity.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/find-build-dir.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e

# Try to guess the build directory:
Expand Down
1 change: 1 addition & 0 deletions tools/get-coverity.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later

# Download and extract coverity tool

Expand Down
1 change: 1 addition & 0 deletions tools/git-contrib.sh
Original file line number Diff line number Diff line change
@@ -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]'`.. | \
Expand Down
1 change: 1 addition & 0 deletions tools/meson-apply-m4.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

CONFIG=$1
Expand Down
1 change: 1 addition & 0 deletions tools/meson-build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux

src="$1"
Expand Down
1 change: 1 addition & 0 deletions tools/meson-make-symlink.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

if [ "${MESON_INSTALL_QUIET:-0}" = 1 ] ; then
Expand Down
1 change: 1 addition & 0 deletions tools/meson-vcs-tag.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later

set -eu
set -o pipefail
Expand Down
1 change: 1 addition & 0 deletions tools/syscall-table-update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cd "$1" && shift
Expand Down
1 change: 1 addition & 0 deletions tools/update-hwdb-autosuspend.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cd "$1"
Expand Down
1 change: 1 addition & 0 deletions tools/update-hwdb.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

cd "$1"
Expand Down
1 change: 1 addition & 0 deletions units/meson-add-wants.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu

i=1
Expand Down

0 comments on commit 9ee0351

Please sign in to comment.