diff --git a/.gitignore b/.gitignore index 3f944ba34..bf3d0c7d1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ pylint.out __pycache__/ build/ testing/unit_test/temp/ -*.deb \ No newline at end of file +*.deb + +make/DEBIAN/postinst \ No newline at end of file diff --git a/cmd/install b/cmd/install index 0b6ac92de..c4f53b905 100755 --- a/cmd/install +++ b/cmd/install @@ -28,6 +28,13 @@ pip3 install -r framework/requirements.txt # Copy the default configuration cp -n local/system.json.example local/system.json +# Set file permissions +# This does not work on GitHub actions +if logname ; then + USER_NAME=$(logname) + sudo chown "$USER_NAME" local/system.json +fi + deactivate # Build docker images diff --git a/make/DEBIAN/postinst b/make/DEBIAN/postinst deleted file mode 100755 index 0b6ac92de..000000000 --- a/make/DEBIAN/postinst +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -e - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -echo Installing application dependencies - -TESTRUN_DIR=/usr/local/testrun -cd $TESTRUN_DIR - -python3 -m venv venv - -source venv/bin/activate - -pip3 install -r framework/requirements.txt - -# Copy the default configuration -cp -n local/system.json.example local/system.json - -deactivate - -# Build docker images -sudo cmd/build - -echo Finished installing Testrun