Build tinyipa on focal
Use new ubuntu-focal nodeset to build tinyipa images. This is needed to prepare to build tinyipa images based on tinycore 11.x because we need the new kernel 5.x version to be able to chroot. Main changes: - patching tce-load to conform to new squashfs options in the new kernel - installing python3-pip instead of python-pip Story: 2007753 Task: 39943 Change-Id: I3d8a1ab84cae3c7185eb4f9bfefe239fab49a012
This commit is contained in:
parent
2a19fa368c
commit
82a1ba0c78
@ -16,6 +16,7 @@
|
||||
- job:
|
||||
name: ironic-python-agent-build-image-tinyipa
|
||||
parent: ironic-python-agent-build-image-base
|
||||
nodeset: ubuntu-focal
|
||||
vars:
|
||||
image_type: 'tinyipa'
|
||||
|
||||
@ -64,6 +65,7 @@
|
||||
- job:
|
||||
name: ironic-python-agent-check-image-tinyipa
|
||||
parent: ironic-python-agent-check-image-base
|
||||
nodeset: ubuntu-focal
|
||||
vars:
|
||||
image_type: 'tinyipa'
|
||||
|
||||
|
@ -22,6 +22,10 @@ setup_tce $DST_DIR
|
||||
# NOTE(rpittau) change ownership of the tce info dir to prevent writing issues
|
||||
sudo chown $TC:$STAFF $DST_DIR/usr/local/tce.installed
|
||||
|
||||
# NOTE(rpittau) patch tce-load to adapt to changes in squashfs module in
|
||||
# latest kernel
|
||||
sudo patch ${DST_DIR}/usr/bin/tce-load < patches/tce-load_squashfs.patch
|
||||
|
||||
$TC_CHROOT_CMD tce-load -wci grub2-multi.tcz
|
||||
|
||||
cleanup_tce $DST_DIR
|
||||
|
@ -170,6 +170,10 @@ fi
|
||||
# NOTE(rpittau) change ownership of the tce info dir to prevent writing issues
|
||||
sudo chown $TC:$STAFF $BUILDDIR/usr/local/tce.installed
|
||||
|
||||
# NOTE(rpittau) patch tce-load to adapt to changes in squashfs module in
|
||||
# latest kernel
|
||||
sudo patch ${BUILDDIR}/usr/bin/tce-load < patches/tce-load_squashfs.patch
|
||||
|
||||
while read line; do
|
||||
sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $line
|
||||
done < <(paste $WORKDIR/build_files/$PY_REQS $WORKDIR/build_files/buildreqs.lst)
|
||||
|
@ -102,6 +102,10 @@ fi
|
||||
# NOTE(rpittau) change ownership of the tce info dir to prevent writing issues
|
||||
sudo chown $TC:$STAFF $FINALDIR/usr/local/tce.installed
|
||||
|
||||
# NOTE(rpittau) patch tce-load to adapt to changes in squashfs module in
|
||||
# latest kernel
|
||||
sudo patch ${FINALDIR}/usr/bin/tce-load < patches/tce-load_squashfs.patch
|
||||
|
||||
while read line; do
|
||||
$TC_CHROOT_CMD tce-load -wic $line
|
||||
done < <(paste $WORKDIR/build_files/finalreqs.lst $WORKDIR/build_files/$PY_REQS)
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
COMMON_PACKAGES="wget python-pip unzip sudo gawk"
|
||||
APT_PACKAGES="${COMMON_PACKAGES} squashfs-tools"
|
||||
YUM_PACKAGES="${COMMON_PACKAGES} squashfs-tools"
|
||||
ZYPPER_PACKAGES="${COMMON_PACKAGES} squashfs"
|
||||
COMMON_PACKAGES="wget unzip sudo gawk"
|
||||
APT_PACKAGES="${COMMON_PACKAGES} python3-pip squashfs-tools"
|
||||
YUM_PACKAGES="${COMMON_PACKAGES} python-pip squashfs-tools"
|
||||
ZYPPER_PACKAGES="${COMMON_PACKAGES} python-pip squashfs"
|
||||
|
||||
echo "Installing dependencies:"
|
||||
|
||||
|
20
tinyipa/patches/tce-load_squashfs.patch
Normal file
20
tinyipa/patches/tce-load_squashfs.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- tce-load 2020-05-11 14:53:49.281851377 +0200
|
||||
+++ tce-load-new 2020-05-11 14:54:33.300890003 +0200
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
copyInstall() {
|
||||
[ -d /mnt/test ] || sudo /bin/mkdir -p /mnt/test
|
||||
- sudo /bin/mount $1 /mnt/test -t squashfs -o loop,ro,bs=4096
|
||||
+ sudo /bin/mount $1 /mnt/test -t squashfs -o loop,ro
|
||||
if [ "$?" == 0 ]; then
|
||||
if [ "$(ls -A /mnt/test)" ]; then
|
||||
yes "$FORCE" | sudo /bin/cp -ai /mnt/test/. / 2>/dev/null
|
||||
@@ -135,7 +135,7 @@
|
||||
else
|
||||
[ -d /tmp/tcloop/"$APPNAME" ] || sudo /bin/mkdir -p /tmp/tcloop/"$APPNAME"
|
||||
awk -v appname="/tmp/tcloop/$APPNAME" ' { if ( $2 == appname ) exit 1 }' /etc/mtab
|
||||
- [ "$?" == 1 ] || sudo /bin/mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1
|
||||
+ [ "$?" == 1 ] || sudo /bin/mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro 2>&1
|
||||
[ "$?" == 0 ] || abort_to_saved_dir
|
||||
[ "`find /tmp/tcloop/${APPNAME} -mindepth 1 -maxdepth 2 | wc -l`" -le 1 ] && EMPTYEXT=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user