From ed8f5cf44b2e6002c849fcdabe7373d8d17dfdf4 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 18 Oct 2026 09:11:50 +0200 Subject: T9477: remove no longer needed executable bit from migration scripts Migration scripts are loaded as modules by the migration runner and are no longer executed individually. Drop the executable bit and make the build abort if any migration script is executable. --- Makefile | 10 ++-------- src/migration-scripts/firewall/17-to-18 | 0 src/migration-scripts/reverse-proxy/1-to-2 | 0 src/migration-scripts/reverse-proxy/2-to-3 | 0 4 files changed, 2 insertions(+), 8 deletions(-) mode change 100755 => 100644 src/migration-scripts/firewall/17-to-18 mode change 100755 => 100644 src/migration-scripts/reverse-proxy/1-to-2 mode change 100755 => 100644 src/migration-scripts/reverse-proxy/2-to-3 diff --git a/Makefile b/Makefile index 588ba91ad..8dbb9ae3d 100644 --- a/Makefile +++ b/Makefile @@ -109,16 +109,10 @@ test: generate-configd-include-json set -e; python3 -m compileall -q -x '/vmware-tools/scripts/' . PYTHONPATH=python/ python3 -m nose2 -v -.PHONY: check_migration_scripts_executable -.ONESHELL: -check_migration_scripts_executable: - @echo "Checking if migration scripts have executable bit set..." - find src/migration-scripts -type f -not -executable -print -exec false {} + || sh -c 'echo "Found files that are not executable! Add permissions." && exit 1' - .PHONY: check_scripts_not_executable check_scripts_not_executable: - @echo "Checking that conf_mode scripts have no executable bit set..." - @find src/conf_mode -type f -perm /111 -print -exec false {} + || sh -c 'echo "Found executable files! Remove executable bit." && exit 1' + @echo "Checking that conf_mode and migration scripts have no executable bit set..." + @find src/conf_mode src/migration-scripts -type f -perm /111 -print -exec false {} + || sh -c 'echo "Found executable files! Remove executable bit." && exit 1' .PHONY: pylint pylint: interface_definitions diff --git a/src/migration-scripts/firewall/17-to-18 b/src/migration-scripts/firewall/17-to-18 old mode 100755 new mode 100644 diff --git a/src/migration-scripts/reverse-proxy/1-to-2 b/src/migration-scripts/reverse-proxy/1-to-2 old mode 100755 new mode 100644 diff --git a/src/migration-scripts/reverse-proxy/2-to-3 b/src/migration-scripts/reverse-proxy/2-to-3 old mode 100755 new mode 100644 -- cgit v1.2.3