[salt.sh] Armband extra repo for forked reclass
[fuel.git] / mcp / patches / scripts / 0001-salt-master-setup.sh-Allow-arm64-salt-bootstrap.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Fri, 1 Sep 2017 00:48:26 +0200
11 Subject: [PATCH] salt-master-setup.sh: Allow arm64 salt-bootstrap
12
13 Upstream commit [1] broke Salt bootstrap on AArch64, by
14 introducing an architecture condition that is too strict to allow
15 Debian package installation (even if we provide our own repo).
16
17 Add "arm64" to the list of supported architectures. This needs
18 to be done on the fly, as the bootstrap script is fetched using
19 `curl` from <salt-master-setup.sh>.
20
21 [1] https://github.com/saltstack/salt-bootstrap/commit/caa6d7d
22
23 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
24 ---
25  salt-master-setup.sh | 8 ++++----
26  1 file changed, 4 insertions(+), 4 deletions(-)
27
28 diff --git a/salt-master-setup.sh b/salt-master-setup.sh
29 index cba21fb..0dd3036 100755
30 --- a/salt-master-setup.sh
31 +++ b/salt-master-setup.sh
32 @@ -237,12 +237,12 @@ install_salt_master_pkg()
33        debian)
34            $SUDO apt-get install -y git
35           which reclass || $SUDO apt install -qqq -y reclass
36 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
37 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
38          ;;
39        rhel)
40            yum install -y git
41            which reclass || $SUDO yum install -y reclass
42 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
43 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- -M ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
44          ;;
45      esac
46      
47 @@ -310,10 +310,10 @@ install_salt_minion_pkg()
48
49      case $PLATFORM_FAMILY in
50        debian)
51 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
52 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
53        ;;
54        rhel)
55 -          curl -L https://bootstrap.saltstack.com | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
56 +          curl -L https://bootstrap.saltstack.com | sed 's@"amd64")@"amd64"|"arm64")@g' | $SUDO sh -s -- ${BOOTSTRAP_SALTSTACK_OPTS} &>/dev/null || true
57        ;;
58      esac
59