1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB and others.
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: Mon, 21 Aug 2017 20:42:00 +0200
11 Subject: [PATCH] seedng: module: Add AArch64 repo
13 salt custom py module seedng.py should use custom repo arg
14 "-R linux.enea.com/saltstack" on AArch64 nodes.
16 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
18 mcp/patches/0009-seedng-module-Sync-salt-version.patch | 12 +++++++++---
19 1 file changed, 9 insertions(+), 3 deletions(-)
21 diff --git a/mcp/patches/0009-seedng-module-Sync-salt-version.patch b/mcp/patches/0009-seedng-module-Sync-salt-version.patch
22 index d116c81..20233a9 100644
23 --- a/mcp/patches/0009-seedng-module-Sync-salt-version.patch
24 +++ b/mcp/patches/0009-seedng-module-Sync-salt-version.patch
26 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
27 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
28 Date: Mon, 21 Aug 2017 02:03:01 +0200
29 -Subject: [PATCH] seedng: module: Sync salt version
30 +Subject: [PATCH] seedng: module: Sync salt version, AArch64 repo
32 salt custom py module seedng.py should use the same Salt version
33 when preinstalling minion for salt-controlled VMs via bootstrap
36 +While at it, add AArch64 repo. This used to be a separate patch, but
37 +we'll squash it in, so reverse-apply checks still work:
38 +- salt custom py module seedng.py should use custom repo arg
39 + "-R linux.enea.com/saltstack" on AArch64 nodes.
41 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
44 diff --git a/_modules/seedng.py b/_modules/seedng.py
45 --- a/_modules/seedng.py
46 +++ b/_modules/seedng.py
49 boot_, tmppath = (prep_bootstrap(mpt)
50 or salt.syspaths.BOOTSTRAP)
51 # Exec the chroot command
52 -+ arg = 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2]))
53 ++ arg = '-R linux.enea.com/saltstack ' if os.uname()[-1] == 'aarch64' else ''
54 ++ arg += 'stable {0}'.format('.'.join(salt.version.__version__.split('.')[:2]))
55 cmd = 'if type salt-minion; then exit 0; '
56 - cmd += 'else sh {0} -c /tmp; fi'.format(os.path.join(tmppath, 'bootstrap-salt.sh'))
57 + cmd += 'else sh {0} -c /tmp {1}; fi'.format(