1 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2 Date: Mon, 21 Aug 2017 20:42:00 +0200
3 Subject: [PATCH] seedng: module: Add AArch64 repo
5 salt custom py module seedng.py should use custom repo arg
6 "-R linux.enea.com/saltstack" on AArch64 nodes.
8 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 .../0105-seedng-module-Add-AArch64-repo.patch | 25 ++++++++++++++++++++++
11 mcp/patches/patches.list | 1 +
12 2 files changed, 26 insertions(+)
13 create mode 100644 mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
15 diff --git a/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
17 index 0000000..e191421
19 +++ b/mcp/patches/0105-seedng-module-Add-AArch64-repo.patch
21 +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
22 +Date: Mon, 21 Aug 2017 02:03:01 +0200
23 +Subject: [PATCH] seedng: module: Add AArch64 repo
25 +salt custom py module seedng.py should use custom repo arg
26 +"-R linux.enea.com/saltstack" on AArch64 nodes.
28 +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
31 +diff --git a/_modules/seedng.py b/_modules/seedng.py
32 +--- a/_modules/seedng.py
33 ++++ b/_modules/seedng.py
35 + boot_, tmppath = (prep_bootstrap(mpt)
36 + or salt.syspaths.BOOTSTRAP)
37 + # Exec the chroot command
38 ++ cmdR = '-R linux.enea.com/saltstack' if os.uname()[-1] == 'aarch64' else ''
39 + cmd = 'if type salt-minion; then exit 0; '
40 +- cmd += 'else sh {0} -c /tmp; fi'.format(os.path.join(tmppath, 'bootstrap-salt.sh'))
41 ++ cmd += 'else sh {0} {1} -c /tmp; fi'.format(
42 ++ os.path.join(tmppath, 'bootstrap-salt.sh'), cmdR)
43 + return not __salt__['cmd.run_chroot'](mpt, cmd, python_shell=True)['retcode']
46 diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
47 index 67b9c82..b4b2b30 100644
48 --- a/mcp/patches/patches.list
49 +++ b/mcp/patches/patches.list
51 /usr/share/salt-formulas/env: 0102-libvirt-unix_sock_group-s-libvirtd-libvirt.patch
52 /usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch
53 /usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch
54 +/usr/share/salt-formulas/env: 0105-seedng-module-Add-AArch64-repo.patch