diff options
author | François Andriot <[email protected]> | 2023-05-10 21:35:26 +0200 |
---|---|---|
committer | François Andriot <[email protected]> | 2023-05-10 21:35:26 +0200 |
commit | 7919e63aaf97f638d59961ca54a87f975f9c436e (patch) | |
tree | f3aaa2c7f456aa2c66470049a206adb6433a18bb /redhat/docker/mageia.sh | |
parent | 6783a326d4d2fe5d801183a16243d9f82489f26a (diff) | |
download | tde-packaging-7919e63aaf97f638d59961ca54a87f975f9c436e.tar.gz tde-packaging-7919e63aaf97f638d59961ca54a87f975f9c436e.zip |
RPM: add build scripts for Mageia 9
Signed-off-by: François Andriot <[email protected]>
Diffstat (limited to 'redhat/docker/mageia.sh')
-rwxr-xr-x | redhat/docker/mageia.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/redhat/docker/mageia.sh b/redhat/docker/mageia.sh new file mode 100755 index 000000000..e0a84588a --- /dev/null +++ b/redhat/docker/mageia.sh @@ -0,0 +1,34 @@ +#!/bin/bash -e + +NAME="mageia" +VERSION="${1:-9}" # E.g: '9' +IMAGE="${NAME}:${VERSION}" +INSTALLROOT="/dev/shm/${IMAGE}" +ARCH="x86_64" + +sudo rm -rf "${INSTALLROOT}" +sudo mkdir -p "${INSTALLROOT}" +sudo dnf -y \ + --disablerepo="*" \ + --enablerepo="mageia-${ARCH},updates-${ARCH}" \ + --installroot="${INSTALLROOT}" \ + --releasever="${VERSION}" \ + install \ + \ + bash \ + mageia-release-common \ + urpmi \ + vim + +sudo chroot "${INSTALLROOT}" rpmdb --rebuilddb + +FILE="${IMAGE//\//_}.tar" +sudo tar -C "${INSTALLROOT}" -c . >"${FILE}" +sudo rm -rf "${INSTALLROOT}" + +docker rmi -f "${IMAGE}" +docker import "${FILE}" "${IMAGE}" + +pigz "${FILE}" +mkdir -p "${HOME}/tde/docker" +mv -fv "${FILE}.gz" "${HOME}/tde/docker" |