summaryrefslogtreecommitdiffstats
path: root/redhat/docker/opensuse32.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2020-06-01 19:01:43 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2020-06-01 19:02:06 +0200
commit191dbe0c32b56e88be8e5253f65833470e2eee0a (patch)
treed72ef16536e261dae673c3049a20eb3eeeca18ac /redhat/docker/opensuse32.sh
parent1c0f7ee5ef66d92c671fbeaac96faeffb1a8992d (diff)
downloadtde-packaging-191dbe0c32b56e88be8e5253f65833470e2eee0a.tar.gz
tde-packaging-191dbe0c32b56e88be8e5253f65833470e2eee0a.zip
RPM: update build scripts
Diffstat (limited to 'redhat/docker/opensuse32.sh')
-rwxr-xr-xredhat/docker/opensuse32.sh33
1 files changed, 25 insertions, 8 deletions
diff --git a/redhat/docker/opensuse32.sh b/redhat/docker/opensuse32.sh
index 3a3a6c2b2..f2d686df5 100755
--- a/redhat/docker/opensuse32.sh
+++ b/redhat/docker/opensuse32.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -e
VERSION="$1" # E.g: '42.3'
@@ -10,7 +10,7 @@ else
NAME="opensuse32/leap"
fi
-IMAGE="${NAME}:${VERSION}"
+IMAGE="${NAME}:latest"
INSTALLROOT="/dev/shm/${IMAGE}"
sudo rm -rf "${INSTALLROOT}"
@@ -27,13 +27,30 @@ if [ "${VERSION}" != "tumbleweed" ]; then
sudo zypper --root "${INSTALLROOT}" \
ar "http://download.opensuse.org/update/leap/${VERSION}/non-oss/" "update-non-oss"
fi
-setarch i686 sudo zypper --root "${INSTALLROOT}" \
+sudo zypper --root "${INSTALLROOT}" \
--gpg-auto-import-keys ref
-setarch i686 sudo zypper --root "${INSTALLROOT}" \
- install -y bash vim zypper openSUSE-release
-
-sudo tar -C "${INSTALLROOT}" -c . >"${IMAGE}.tar"
+sudo setarch i686 zypper --root "${INSTALLROOT}" \
+ install --download-only -y \
+ bash \
+ filesystem \
+ glibc \
+ glibc-extra \
+ libpcre1 \
+ libselinux1 \
+ openSUSE-release \
+ system-user-root \
+ util-linux vim \
+ zypper
+sudo rpm -Uvh --root "${INSTALLROOT}" "${INSTALLROOT}/var/cache/zypp/packages/oss/"*"/"*".rpm"
+
+sudo chroot "${INSTALLROOT}" rpmdb --rebuilddb
+
+FILE="${IMAGE//\//_}.tar"
+sudo tar -C "${INSTALLROOT}" -c . >"${FILE}"
sudo rm -rf "${INSTALLROOT}"
docker rmi -f "${IMAGE}"
-docker import "${IMAGE}.tar" "${IMAGE}"
+docker import "${FILE}" "${IMAGE}"
+
+pigz "${FILE}"
+mv -fv "${FILE}.gz" "${HOME}/tde/docker"