summaryrefslogtreecommitdiffstats
path: root/redhat/docker/pclinuxos.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2023-05-03 23:02:51 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2023-05-03 23:05:36 +0200
commitae2a5ca1f263a80fb1cb8f82d54c0251ff1efabe (patch)
treee3167c3ebb114c1f33d6f6b045c3e418f9d24440 /redhat/docker/pclinuxos.sh
parente0663918336a27443c9deb5d6cfee4e5283d6ed9 (diff)
downloadtde-packaging-ae2a5ca1f263a80fb1cb8f82d54c0251ff1efabe.tar.gz
tde-packaging-ae2a5ca1f263a80fb1cb8f82d54c0251ff1efabe.zip
RPM: update build scripts for pclinuxos
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/docker/pclinuxos.sh')
-rwxr-xr-xredhat/docker/pclinuxos.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/redhat/docker/pclinuxos.sh b/redhat/docker/pclinuxos.sh
index cd7689569..1b428daf0 100755
--- a/redhat/docker/pclinuxos.sh
+++ b/redhat/docker/pclinuxos.sh
@@ -1,7 +1,7 @@
#!/bin/bash -ex
NAME="pclinuxos"
-VERSION="${1:-2021}" # E.g: '2020'
+VERSION="${1:-2023}" # E.g: '2020'
IMAGE="${NAME}:${VERSION}"
INSTALLROOT="/dev/shm/${IMAGE}"
@@ -29,19 +29,17 @@ sudo mount --bind "/dev" "${INSTALLROOT}/dev"
sudo mkdir -p "${INSTALLROOT}/var/lib/rpm"
sudo rpmdb --initdb --root="${INSTALLROOT}"
-sudo rpm -Uvh --noscripts --root="${INSTALLROOT}" "/dev/shm/packages/"*".rpm"
-
-# Fix lzma library location
-sudo mv "${INSTALLROOT}/lib/liblzma."* "${INSTALLROOT}/lib64"
+sudo rpm -Uvh --noscripts --nodeps --root="${INSTALLROOT}" "/dev/shm/packages/"*".rpm"
# Réinstall distro from inside chroot
sudo mount --bind "/dev/shm" "${INSTALLROOT}/dev/shm"
sudo rm -rf "${INSTALLROOT}/var/lib/rpm"
sudo chroot "${INSTALLROOT}" rpmdb --initdb
-sudo chroot "${INSTALLROOT}" rpm -Uvh "/dev/shm/packages/"*".rpm"
+sudo chroot "${INSTALLROOT}" rpm -Uvh --nodeps "/dev/shm/packages/"*".rpm"
sudo cp "/etc/resolv.conf" "${INSTALLROOT}/etc/resolv.conf"
sudo chroot "${INSTALLROOT}" apt-get -y update
+sudo chroot "${INSTALLROOT}" apt-get -y --fix-broken install
sudo chroot "${INSTALLROOT}" apt-get -y upgrade
sudo umount "${INSTALLROOT}/dev/shm"
@@ -52,7 +50,4 @@ sudo tar -C "${INSTALLROOT}" -c . | docker import - "${IMAGE}"
docker run -ti --rm "${IMAGE}" ls -l
sudo rm -rf "${INSTALLROOT}"
-docker image save "${IMAGE}" >"${IMAGE}.tar"
-rm -f "${IMAGE}.tar.gz"
-pigz -9 "${IMAGE}.tar"
-mv -vf "${IMAGE}.tar.gz" "${HOME}/tde/obs"
+docker image save "${IMAGE}" | pigz -9 >"${HOME}/tde/docker/${IMAGE}.tar.gz"