aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-main/0004-FIXME-cobbler-setup.sh-Keep-extra-RPM-repos.patch
blob: e3dceedaf4ccc82b8e8bef6210fb1fd0cc2e7c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Thu, 28 Apr 2016 01:41:45 +0200
Subject: [PATCH] FIXME: cobbler: setup.sh: Keep extra RPM repos.

cobbler-grub-aarch64 (arm64 specific loader) is currently
distributed and added to the cobbler docker container during
ISO build using EXTRA_RPM_REPOS envvar mechanism.

However, since this package installs files in a mounted location,
its contents are not persistent, requiring a test and eventual
forced reinstall during container start.

This, of course, requires the package to be available at that point,
which is not currently possible, as we remove the extra RPM repository
entry from yum config at the end of container build.

Hacky temporary workaround:
Re-add extra RPM yum config after container is set up, only for cobbler.

TODO: This patch should be dropped once cobbler-grub-aarch64 RPM
package gets upstreamed.
---
 docker/cobbler/setup.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/docker/cobbler/setup.sh b/docker/cobbler/setup.sh
index 90627a8..508eaa4 100644
--- a/docker/cobbler/setup.sh
+++ b/docker/cobbler/setup.sh
@@ -80,6 +80,20 @@ baseurl=file:/var/www/nailgun/mos-centos/x86_64
 gpgcheck=0
 EOF
 
+## FIXME(armband): Add extra RPM repository in Cobbler container
+# Normally, extra RPM repos are not re-added post-build, but we
+# need cobbler-grub-aarch64 during each container start.
+
+for repo in ${EXTRA_RPM_REPOS}; do
+  IFS=, read -a repo_args <<< "$repo"
+  cat << EOF >> /etc/yum.repos.d/nailgun.repo
+
+[extra-repo-${repo_args[0]}]
+name=MOS Extra Repo ${repo_args[0]}
+baseurl=file:/var/www/nailgun/extra-repos/${repo_args[0]}
+gpgcheck=0
+EOF
+done
 yum clean all