From c22341e6b5edee95c12ff0d30ea35e34878a73cf Mon Sep 17 00:00:00 2001
From: Bernardo Dal Seno <bdalseno@google.com>
Date: Fri, 9 Dec 2011 16:26:15 +0100
Subject: [PATCH] Makefile.am: fix permissions for Python scripts on install

Some Python scripts in /usr/lib/ganeti/ were getting the wrong permissions
(their 'x' bit was cleared).  This patch fixes that behavior.

This patch renames the variable 'dist_tools_PYTHON' to 'python_scripts'.
Some Python scripts were listed in the 'dist_tools_PYTHON' variable, but as
said scripts have no .py extension in their names, Automake treated the scripts
as data files, and hence no 'x' bit.  Now the Python scripts are processed
by the rules created for the 'dist_tools_SCRIPTS' variable, and such rules
don't depend on file name extensions.

Signed-off-by: Bernardo Dal Seno <bdalseno@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
(cherry picked from commit cc120286c3d811d48722379d1d6b44d52fda7517)
---
 Makefile.am | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index bef1a3075..d35c1559e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -503,7 +503,7 @@ nodist_sbin_SCRIPTS = \
 	$(PYTHON_BOOTSTRAP_SBIN) \
 	daemons/ganeti-cleaner
 
-dist_tools_PYTHON = \
+python_scripts = \
 	tools/burnin \
 	tools/cfgshell \
 	tools/cfgupgrade \
@@ -515,7 +515,7 @@ dist_tools_PYTHON = \
 	tools/sanitize-config
 
 dist_tools_SCRIPTS = \
-	$(dist_tools_PYTHON) \
+	$(python_scripts) \
 	tools/kvm-console-wrapper \
 	tools/xm-console-wrapper
 
@@ -729,7 +729,7 @@ TESTS_ENVIRONMENT = \
 
 all_python_code = \
 	$(dist_sbin_SCRIPTS) \
-	$(dist_tools_PYTHON) \
+	$(python_scripts) \
 	$(pkglib_python_scripts) \
 	$(nodist_pkglib_python_scripts) \
 	$(python_tests) \
@@ -766,7 +766,7 @@ lint_python_code = \
 	ganeti \
 	ganeti/http/server.py \
 	$(dist_sbin_SCRIPTS) \
-	$(dist_tools_PYTHON) \
+	$(python_scripts) \
 	$(pkglib_python_scripts) \
 	$(BUILD_BASH_COMPLETION) \
 	$(DOCPP) \
@@ -776,7 +776,7 @@ pep8_python_code = \
 	ganeti \
 	ganeti/http/server.py \
 	$(dist_sbin_SCRIPTS) \
-	$(dist_tools_PYTHON) \
+	$(python_scripts) \
 	$(pkglib_python_scripts) \
 	$(BUILD_BASH_COMPLETION) \
 	$(DOCPP) \
-- 
GitLab