Skip to content

Commit 5d2410a

Browse files
committed
Include must-have packages in ostree commit and install other RPMs as extensions
1 parent 5be497a commit 5d2410a

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

entrypoint.sh

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ REPOS=()
55
STREAM="next-devel"
66
REF="fedora/x86_64/coreos/${STREAM}"
77

8-
# openshift-hyperkube and openshift-clients would already be placed in /tmp/rpms
9-
PACKAGES=(
10-
cri-o
11-
cri-tools
8+
# additional RPMs to install via os-extensions
9+
EXTENSION_RPMS=(
1210
attr
1311
glusterfs
1412
glusterfs-client-xlators
@@ -66,9 +64,29 @@ done
6664

6765
# download extension RPMs
6866
mkdir -p /extensions/okd
69-
yumdownloader --archlist=x86_64 --disablerepo='*' --destdir=/extensions/okd ${REPOLIST} ${PACKAGES[*]}
70-
cp -rvf /tmp/rpms/* /extensions/okd
67+
yumdownloader --archlist=x86_64 --disablerepo='*' --destdir=/extensions/okd ${REPOLIST} ${EXTENSION_RPMS[*]}
7168

7269
# build rpmostree repo
73-
cd /extensions
74-
createrepo_c --no-database .
70+
pushd /extensions
71+
createrepo_c --no-database .
72+
popd
73+
74+
# inject cri-o, hyperkube RPMs and MCD binary in the ostree commit
75+
mkdir /tmp/working
76+
pushd /tmp/working
77+
for i in $(find /tmp/rpms/ -iname *.rpm); do
78+
echo "Extracting $i ..."
79+
rpm2cpio $i | cpio -div
80+
done
81+
mv etc usr/
82+
# /sbin is a symlink to /usr/sbin
83+
mv sbin/* usr/sbin/
84+
rm -rf sbin
85+
popd
86+
87+
# add binaries (MCD) from /srv/addons
88+
mkdir -p /tmp/working/usr/bin
89+
cp -rvf /srv/addons/* /tmp/working/
90+
91+
# Add binaries to the tree
92+
coreos-assembler dev-overlay --repo /srv/repo --rev "${REF}" --add-tree /tmp/working --output-ref "${REF}"

0 commit comments

Comments
 (0)