f_repobuild: Fixup missing OPNFV plugin deps
[armband.git] / patches / opnfv-fuel / upstream-backports / 0001-deploy.sh-Remove-check-for-root-rm-umask-0000.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Fri, 6 May 2016 03:07:40 +0200
3 Subject: [PATCH] deploy.sh: Remove check for root (rm umask 0000)
4
5 Patch(es) by Josep, signed by Alex only for upstreaming.
6
7 [Alexandru Avadanii]
8 Squashed two atomic commits into one change.
9
10 Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
11 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
12 ---
13  ci/deploy.sh                        | 11 -----------
14  deploy/deploy-config.py             |  1 -
15  deploy/deploy.py                    |  2 --
16  deploy/environments/virtual_fuel.py |  2 --
17  4 files changed, 16 deletions(-)
18
19 diff --git a/ci/deploy.sh b/ci/deploy.sh
20 index 8411714..081806c 100755
21 --- a/ci/deploy.sh
22 +++ b/ci/deploy.sh
23 @@ -84,9 +84,6 @@ Input parameters to the build script is:
24  -i .iso image to be deployed (needs to be provided in a URI
25     style, it can be a local resource: file:// or a remote resource http(s)://)
26
27 -NOTE: Root priviledges are needed for this script to run
28 -
29 -
30  Examples:
31  sudo `basename $0` -b file:///home/jenkins/lab-config -l lf -p pod1 -s ha_odl-l3_heat_ceilometer -i file:///home/jenkins/myiso.iso
32  EOF
33 @@ -212,11 +209,6 @@ do
34      esac
35  done
36
37 -if [[ $EUID -ne 0 ]]; then
38 -    echo "This script must be run as root" 1>&2
39 -    exit 1
40 -fi
41 -
42  if [ -z $BASE_CONFIG_URI ] || [ -z $TARGET_LAB ] || \
43     [ -z $TARGET_POD ] || [ -z $DEPLOY_SCENARIO ] || \
44     [ -z $ISO ]; then
45 @@ -231,9 +223,6 @@ fi
46  # Enable the automatic exit trap
47  trap do_exit SIGINT SIGTERM EXIT
48
49 -# Set no restrictive umask so that Jenkins can removeeee any residuals
50 -umask 0000
51 -
52  clean
53
54  pushd ${DEPLOY_DIR} > /dev/null
55 diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
56 index 2a09aa3..02debe2 100644
57 --- a/deploy/deploy-config.py
58 +++ b/deploy/deploy-config.py
59 @@ -41,7 +41,6 @@ from common import (
60      check_file_exists,
61      create_dir_if_not_exists,
62      delete,
63 -    check_if_root,
64      ArgParser,
65  )
66
67 diff --git a/deploy/deploy.py b/deploy/deploy.py
68 index fe213e5..08702d2 100755
69 --- a/deploy/deploy.py
70 +++ b/deploy/deploy.py
71 @@ -34,7 +34,6 @@ from common import (
72      check_dir_exists,
73      create_dir_if_not_exists,
74      delete,
75 -    check_if_root,
76      ArgParser,
77  )
78
79 @@ -252,7 +251,6 @@ class AutoDeploy(object):
80          return 0
81
82      def run(self):
83 -        check_if_root()
84          if self.cleanup_only:
85              self.cleanup_execution_environment()
86          else:
87 diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
88 index b1a76e4..4ff68f6 100644
89 --- a/deploy/environments/virtual_fuel.py
90 +++ b/deploy/environments/virtual_fuel.py
91 @@ -18,7 +18,6 @@ import time
92  from common import (
93      exec_cmd,
94      check_file_exists,
95 -    check_if_root,
96      delete,
97      log,
98  )
99 @@ -135,7 +134,6 @@ class VirtualFuel(ExecutionEnvironment):
100                         vm_definition_overwrite)
101
102      def setup_environment(self):
103 -        check_if_root()
104          self.cleanup_environment()
105          self.create_vm()
106