From 0a4c143d86813f7628bcb7d45e3bc46bf517f0f8 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 21 Mar 2017 10:40:26 +0100 Subject: Improve unix permissions fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It now removes exec permissions for files which don't require them. It prevents from modifying files in functest_venv too. Change-Id: I3c88817713711a0009a7392f19fe5ccc63ba98cd Signed-off-by: Cédric Ollivier --- docker/Dockerfile | 16 ++++++++++++++-- docker/Dockerfile.aarch64 | 16 ++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 30c31dad..176c109e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -120,8 +120,20 @@ RUN cd ${REPOS_DIR}/barometer \ && pip install . RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ - -not -path "*tests/unit*" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \ - && find ${FUNCTEST_REPO_DIR} -name "*.sh" |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644 + +RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR} RUN ${REPOS_DIR}/rally/install_rally.sh --yes diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index 15f0bdc3..60f72a29 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -112,8 +112,20 @@ RUN cd ${RELENG_MODULE_DIR} \ && pip install -e . RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ - -not -path "*tests/unit*" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \ - && find ${FUNCTEST_REPO_DIR} -name "*.sh" |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644 + +RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR} RUN ${REPOS_DIR}/rally/install_rally.sh --yes -- cgit 1.2.3-korg From 5a011b40ff772271a6f7055ce8005ea6c9f331a0 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 21 Mar 2017 11:38:08 +0100 Subject: Change execute bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It applies the rules proposed by "Improve unix permissions fixes" [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/31171/ Change-Id: If5142befb74165a982f9281e8770289b303d483d Signed-off-by: Cédric Ollivier --- functest/ci/__init__.py | 0 functest/ci/tier_builder.py | 0 functest/ci/tier_handler.py | 0 functest/opnfv_tests/features/copper.py | 0 functest/opnfv_tests/features/doctor.py | 0 functest/opnfv_tests/features/domino.py | 0 functest/opnfv_tests/features/promise.py | 0 functest/opnfv_tests/features/sdnvpn.py | 0 functest/opnfv_tests/features/security_scan.py | 0 functest/opnfv_tests/mano/orchestra.py | 0 functest/opnfv_tests/openstack/healthcheck/healthcheck.sh | 0 functest/opnfv_tests/vnf/router/__init__.py | 0 functest/opnfv_tests/vnf/router/vyos_vrouter.py | 0 functest/utils/functest_logger.py | 0 functest/utils/openstack_utils.py | 0 15 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 functest/ci/__init__.py mode change 100755 => 100644 functest/ci/tier_builder.py mode change 100755 => 100644 functest/ci/tier_handler.py mode change 100755 => 100644 functest/opnfv_tests/features/copper.py mode change 100755 => 100644 functest/opnfv_tests/features/doctor.py mode change 100755 => 100644 functest/opnfv_tests/features/domino.py mode change 100755 => 100644 functest/opnfv_tests/features/promise.py mode change 100755 => 100644 functest/opnfv_tests/features/sdnvpn.py mode change 100755 => 100644 functest/opnfv_tests/features/security_scan.py mode change 100755 => 100644 functest/opnfv_tests/mano/orchestra.py mode change 100755 => 100644 functest/opnfv_tests/openstack/healthcheck/healthcheck.sh mode change 100755 => 100644 functest/opnfv_tests/vnf/router/__init__.py mode change 100755 => 100644 functest/opnfv_tests/vnf/router/vyos_vrouter.py mode change 100755 => 100644 functest/utils/functest_logger.py mode change 100755 => 100644 functest/utils/openstack_utils.py diff --git a/functest/ci/__init__.py b/functest/ci/__init__.py old mode 100755 new mode 100644 diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py old mode 100755 new mode 100644 diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/copper.py b/functest/opnfv_tests/features/copper.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/doctor.py b/functest/opnfv_tests/features/doctor.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/domino.py b/functest/opnfv_tests/features/domino.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/promise.py b/functest/opnfv_tests/features/promise.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/sdnvpn.py b/functest/opnfv_tests/features/sdnvpn.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/features/security_scan.py b/functest/opnfv_tests/features/security_scan.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/mano/orchestra.py b/functest/opnfv_tests/mano/orchestra.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/vnf/router/__init__.py b/functest/opnfv_tests/vnf/router/__init__.py old mode 100755 new mode 100644 diff --git a/functest/opnfv_tests/vnf/router/vyos_vrouter.py b/functest/opnfv_tests/vnf/router/vyos_vrouter.py old mode 100755 new mode 100644 diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py old mode 100755 new mode 100644 diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py old mode 100755 new mode 100644 -- cgit 1.2.3-korg