patches/scripts: Fix whitespace in context
[fuel.git] / mcp / patches / scripts / 0001-salt-master-setup.sh-Allow-arm64-salt-bootstrap.patch
1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Fri, 1 Sep 2017 00:48:26 +0200
3 Subject: [PATCH] salt-master-setup.sh: Allow arm64 salt-bootstrap
4
5 Upstream commit [1] broke Salt bootstrap on AArch64, by
6 introducing an architecture condition that is too strict to allow
7 Debian package installation (even if we provide our own repo).
8
9 Add "arm64" to the list of supported architectures. This needs
10 to be done on the fly, as the bootstrap script is fetched using
11 `curl` from <salt-master-setup.sh>.
12
13 [1] https://github.com/saltstack/salt-bootstrap/commit/caa6d7d
14
15 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
16 ---
17  salt-master-setup.sh | 8 ++++----
18  1 file changed, 4 insertions(+), 4 deletions(-)
19
20 diff --git a/salt-master-setup.sh b/salt-master-setup.sh
21 index cba21fb..0dd3036 100755
22 --- a/salt-master-setup.sh
23 +++ b/salt-master-setup.sh
24 @@ -237,12 +237,12 @@ install_salt_master_pkg()
25        debian)
26            $SUDO apt-get install -y git
27           which reclass || $SUDO apt install -qqq -y reclass
28 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
29 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
30          ;;
31        rhel)
32            yum install -y git
33            which reclass || $SUDO yum install -y reclass
34 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
35 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
36          ;;
37      esac
38      
39 @@ -310,10 +310,10 @@ install_salt_minion_pkg()
40
41      case $PLATFORM_FAMILY in
42        debian)
43 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
44 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
45        ;;
46        rhel)
47 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
48 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
49        ;;
50      esac
51