scripts: Group source maintenance helpers under source/

Keep source inventory, cleanup and shell lint helpers together. Update the
Makefile, Debian packaging, scstadmin and the kernel, release and existing
checkpatch callers in the same commit so each consumer uses a valid path.

Keep run-shellcheck rooted at scripts/ after the move, preserving its
coverage of all tracked Bash helpers. Source selection and the existing
checkpatch exclusions are unchanged.
This commit is contained in:
Gleb Chesnokov
2026-10-19 10:31:32 +03:00
parent a6167625b0
commit 88b5653b06
13 changed files with 15 additions and 14 deletions
+4 -4
View File
@@ -130,8 +130,8 @@ DOCKER_RPM_KERNEL_REPOSITORY ?= $(shell bash scripts/kernel-matrix rpm-field \
RPM_ARTIFACT_SOURCE_DIR ?= $(CURDIR)
RPM_ARTIFACT_OUTPUT_DIR ?= $(CURDIR)/rpm-artifacts
RPM_ARTIFACT_KERNEL_DEVEL_PACKAGE ?= kernel-devel
SCST_SOURCE_FILES = $(shell if [ -e scripts/list-source-files ]; then \
scripts/list-source-files; \
SCST_SOURCE_FILES = $(shell if [ -e scripts/source/list-source-files ]; then \
scripts/source/list-source-files; \
else \
echo scripts-source-files-is-missing; \
fi)
@@ -256,7 +256,7 @@ cov-build:
done
shellcheck:
scripts/run-shellcheck
scripts/source/run-shellcheck
all clean extraclean install uninstall:
if [ $@ = extraclean ]; then rm -f TAGS tags cscope.out; fi
@@ -419,7 +419,7 @@ make-scst-dist = \
mkdir "$${name}-$(3)" && \
{ \
{ \
scripts/list-source-files | grep -v '/\.gitignore' && \
scripts/source/list-source-files | grep -v '/\.gitignore' && \
if [ -e debian/changelog ]; then echo debian/changelog; fi; \
if [ -e debian/compat ]; then echo debian/compat; fi; \
} | \
+1 -1
View File
@@ -21,7 +21,7 @@ Files: Makefile
scripts/generate-kernel-patch
scripts/generate-patched-kernel
scripts/generate-scst-patch
scripts/list-double-blank-lines
scripts/source/list-double-blank-lines
scripts/monitor-memory-usage
scripts/run-regression-tests
scripts/specialize-patch
+2 -2
View File
@@ -60,7 +60,7 @@ VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/')
clean:
dh_testdir && \
dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \
scripts/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \
scripts/source/clean-source-tree -x debian/changelog -x debian/compat -x debian/scst.preinst \
-x debian/scst.postinst
build:
@@ -108,7 +108,7 @@ install:
done && \
cp debian/scst.dkms \
$(DESTDIR)/usr/src/scst-$(VERSION)/dkms.conf && \
scripts/list-source-files | \
scripts/source/list-source-files | \
grep -E '^Makefile$$|^(fcst|iscsi-scst|$(QLA_INI_DIR)|scst|$(SCST_LOCAL)|$(SCST_SRPT))/'|\
tar -T- -cf- | \
tar -C $(DESTDIR)/usr/src/scst-$(VERSION) -xf- && \
+1 -1
View File
@@ -7,7 +7,7 @@ scriptsdir="${rootdir}/scripts"
outputfile="checkpatch.out"
mapfile -t src_files < <(
"${scriptsdir}/list-source-files" "${rootdir}" | \
"${scriptsdir}/source/list-source-files" "${rootdir}" | \
grep -vE '^debian/|^fcst/linux-patches|patch$|pdf$|png$|^iscsi-scst/usr|^qla|^scripts/|^scstadmin/|^usr/|^www/' | \
while read -r filename; do echo "${rootdir}/$filename"; done)
+1 -1
View File
@@ -46,7 +46,7 @@ download_and_extract_kernel_tree "$1" || exit $?
cd "${target}" || exit $?
"${script_dir}/list-source-files" "${scst_dir}" |
"${script_dir}/source/list-source-files" "${scst_dir}" |
grep -- "-${kernel_version}.*.patch$" |
grep -v /in-tree/ |
while read -r p; do
+1 -1
View File
@@ -16,7 +16,7 @@ name="$1"; shift
version="$1"; shift
files=("$@")
if [ "${#files[@]}" -eq 0 ]; then
file_list="$("$scriptdir/list-source-files")" || exit $?
file_list="$("$scriptdir/source/list-source-files")" || exit $?
if [ -z "$file_list" ]; then
echo "Error: no source files found." >&2
exit 1
+1 -1
View File
@@ -117,7 +117,7 @@ function test_scst_tree_patches {
function duplicate_scst_source_tree {
if [ -e "$1/AskingQuestions" ]; then
( set -o pipefail
"${scriptsdir}"/list-source-files "$1" |
"${scriptsdir}"/source/list-source-files "$1" |
tar -C "$1" --files-from=- -c -f - |
tar -x -f -
)
@@ -9,9 +9,10 @@ if ! command -v shellcheck >/dev/null 2>&1; then
exit 1
fi
source_files="$("$script_dir/list-source-files" "$script_dir")"
scripts_root="$(dirname -- "$script_dir")"
source_files="$("$script_dir/list-source-files" "$scripts_root")"
cd "$script_dir"
cd "$scripts_root"
bash_scripts=()
while IFS= read -r file; do
+1 -1
View File
@@ -151,7 +151,7 @@ test:
dist-gzip:
name=$(shell basename $$PWD) && \
mkdir $${name}-$(VERSION) && \
{ ../scripts/list-source-files | tar -T- -cf- | \
{ ../scripts/source/list-source-files | tar -T- -cf- | \
tar -C $${name}-$(VERSION) -xf-; } && \
rm -f $${name}-$(VERSION).tar.bz2 && \
tar -cjf $${name}-$(VERSION).tar.bz2 $${name}-$(VERSION) && \