From 6c27a5ccba05b088fbfcf8cd982c25649838298d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 29 Jun 2018 17:28:32 -0400 Subject: [PATCH] Cleanup: move scripts to subdirectory Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- Kbuild.common | 18 ++++++++++-------- README.md | 7 ++++--- .../abi-debian-version.sh | 1 + .../abi-fedora-version.sh | 1 + .../abi-rhel-version.sh | 1 + .../abi-sle-version.sh | 1 + built-in.sh => scripts/built-in.sh | 1 + .../extra-version-git.sh | 0 .../extra-version-name.sh | 0 .../extra-version-patches.sh | 0 .../rt-patch-version.sh | 1 + 11 files changed, 20 insertions(+), 11 deletions(-) rename abi-debian-version.sh => scripts/abi-debian-version.sh (97%) rename abi-fedora-version.sh => scripts/abi-fedora-version.sh (92%) rename abi-rhel-version.sh => scripts/abi-rhel-version.sh (94%) rename abi-sle-version.sh => scripts/abi-sle-version.sh (95%) rename built-in.sh => scripts/built-in.sh (92%) rename extra-version-git.sh => scripts/extra-version-git.sh (100%) rename extra-version-name.sh => scripts/extra-version-name.sh (100%) rename extra-version-patches.sh => scripts/extra-version-patches.sh (100%) rename rt-patch-version.sh => scripts/rt-patch-version.sh (90%) diff --git a/Kbuild.common b/Kbuild.common index bd24e801..c7cbd0b2 100644 --- a/Kbuild.common +++ b/Kbuild.common @@ -1,52 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) + # Work-around for distro-specific public modules ABI breakages. # Some distributions break the public module instrumentation ABI # compared to upstream stable kernels without providing other mean than # the kernel EXTRAVERSION to figure it out. Translate this information # into a define visible from the C preprocessor. -DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR)) +DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-debian-version.sh $(CURDIR)) ifneq ($(DEB_API_VERSION), 0) ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) endif -RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR)) +RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-rhel-version.sh $(CURDIR)) ifneq ($(RHEL_API_VERSION), 0) ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) endif -SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR)) +SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-sle-version.sh $(CURDIR)) ifneq ($(SLE_API_VERSION), 0) ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) endif -FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-fedora-version.sh $(CURDIR)) +FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-fedora-version.sh $(CURDIR)) ifneq ($(FEDORA_REVISION_VERSION), 0) ccflags-y += -DFEDORA_REVISION_VERSION=$(FEDORA_REVISION_VERSION) endif -RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) +RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/rt-patch-version.sh $(CURDIR)) ifneq ($(RT_PATCH_VERSION), 0) ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) endif -EXTRA_VERSION_NAME:=$(shell $(TOP_LTTNG_MODULES_DIR)/extra-version-name.sh $(TOP_LTTNG_MODULES_DIR)) +EXTRA_VERSION_NAME:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-name.sh $(TOP_LTTNG_MODULES_DIR)) ifneq ($(EXTRA_VERSION_NAME), 0) ccflags-y += -DLTTNG_EXTRA_VERSION_NAME='"$(EXTRA_VERSION_NAME)"' endif -EXTRA_VERSION_GIT:=$(shell $(TOP_LTTNG_MODULES_DIR)/extra-version-git.sh $(TOP_LTTNG_MODULES_DIR)) +EXTRA_VERSION_GIT:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-git.sh $(TOP_LTTNG_MODULES_DIR)) ifneq ($(EXTRA_VERSION_GIT), 0) ccflags-y += -DLTTNG_EXTRA_VERSION_GIT='"$(EXTRA_VERSION_GIT)"' endif -EXTRA_VERSION_PATCHES:=$(shell $(TOP_LTTNG_MODULES_DIR)/extra-version-patches.sh $(TOP_LTTNG_MODULES_DIR)) +EXTRA_VERSION_PATCHES:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-patches.sh $(TOP_LTTNG_MODULES_DIR)) # Starting with kernel 4.12, the ftrace header was moved to private headers # and as such is not available when building against distro headers instead diff --git a/README.md b/README.md index 93e2dd35..201a579c 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,10 @@ kernel, do: ### Kernel built-in support It is also possible to build these modules as part of a kernel image. Simply -run the [`built-in.sh`](built-in.sh) script with the path to your kernel -source directory as an argument. It will symlink the lttng-modules directory -in the kernel sources and add an include in the kernel Makefile. +run the [`scripts/built-in.sh`](scripts/built-in.sh) script with the path to +your kernel source directory as an argument. It will symlink the +lttng-modules directory in the kernel sources and add an include in the kernel +Makefile. Then configure your kernel as usual and enable the `CONFIG_LTTNG` option. diff --git a/abi-debian-version.sh b/scripts/abi-debian-version.sh similarity index 97% rename from abi-debian-version.sh rename to scripts/abi-debian-version.sh index 4f2c0886..ee8dbd80 100755 --- a/abi-debian-version.sh +++ b/scripts/abi-debian-version.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) # First argument is the path to the kernel headers. KPATH="$1" diff --git a/abi-fedora-version.sh b/scripts/abi-fedora-version.sh similarity index 92% rename from abi-fedora-version.sh rename to scripts/abi-fedora-version.sh index 52dd0446..41534821 100755 --- a/abi-fedora-version.sh +++ b/scripts/abi-fedora-version.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) # First argument is the path to the kernel headers. KPATH="$1" diff --git a/abi-rhel-version.sh b/scripts/abi-rhel-version.sh similarity index 94% rename from abi-rhel-version.sh rename to scripts/abi-rhel-version.sh index bd5328ac..0296d8c8 100755 --- a/abi-rhel-version.sh +++ b/scripts/abi-rhel-version.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) # First argument is the path to the kernel headers. KPATH="$1" diff --git a/abi-sle-version.sh b/scripts/abi-sle-version.sh similarity index 95% rename from abi-sle-version.sh rename to scripts/abi-sle-version.sh index 0bd65b15..bd6d5f1d 100755 --- a/abi-sle-version.sh +++ b/scripts/abi-sle-version.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) # First argument is the path to the kernel headers. KPATH=$1 diff --git a/built-in.sh b/scripts/built-in.sh similarity index 92% rename from built-in.sh rename to scripts/built-in.sh index 782985f9..5e57e934 100755 --- a/built-in.sh +++ b/scripts/built-in.sh @@ -1,4 +1,5 @@ #!/bin/bash +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) set -e diff --git a/extra-version-git.sh b/scripts/extra-version-git.sh similarity index 100% rename from extra-version-git.sh rename to scripts/extra-version-git.sh diff --git a/extra-version-name.sh b/scripts/extra-version-name.sh similarity index 100% rename from extra-version-name.sh rename to scripts/extra-version-name.sh diff --git a/extra-version-patches.sh b/scripts/extra-version-patches.sh similarity index 100% rename from extra-version-patches.sh rename to scripts/extra-version-patches.sh diff --git a/rt-patch-version.sh b/scripts/rt-patch-version.sh similarity index 90% rename from rt-patch-version.sh rename to scripts/rt-patch-version.sh index 6a00fef0..27049657 100755 --- a/rt-patch-version.sh +++ b/scripts/rt-patch-version.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) # First argument is the path to the kernel headers. KPATH="$1" -- 2.34.1