diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-03-21 10:40:26 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-03-21 11:27:49 +0100 |
commit | 0a4c143d86813f7628bcb7d45e3bc46bf517f0f8 (patch) | |
tree | bc1ddbbf58030c68894eafc7c798ac27b3ac59d3 | |
parent | 340cf9330af728dac334de7b391c3ea3971fd125 (diff) |
Improve unix permissions fixes
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 <cedric.ollivier@orange.com>
-rw-r--r-- | docker/Dockerfile | 16 | ||||
-rw-r--r-- | 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 |