diff options
author | François Andriot <albator78@libertysurf.fr> | 2023-05-09 12:14:41 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2023-05-09 12:14:41 +0200 |
commit | 6783a326d4d2fe5d801183a16243d9f82489f26a (patch) | |
tree | 2ec26a212dcd5634097d5a0e8f84db875859d000 /redhat/docker | |
parent | 8ab4d3920b6da379f4d14ff3b78d088a45df7cb8 (diff) | |
download | tde-packaging-6783a326d4d2fe5d801183a16243d9f82489f26a.tar.gz tde-packaging-6783a326d4d2fe5d801183a16243d9f82489f26a.zip |
RPM: update build scripts for opensuse tumbleweed
Signed-off-by: François Andriot <albator78@libertysurf.fr>
Diffstat (limited to 'redhat/docker')
-rwxr-xr-x | redhat/docker/opensuse32.sh | 52 | ||||
-rw-r--r-- | redhat/docker/osstw/Dockerfile.i686 | 22 | ||||
-rw-r--r-- | redhat/docker/osstw/Dockerfile.x86_64 | 15 | ||||
-rw-r--r-- | redhat/docker/osstw/packages | 5 | ||||
-rw-r--r-- | redhat/docker/osstw/rpmmacros | 2 |
5 files changed, 64 insertions, 32 deletions
diff --git a/redhat/docker/opensuse32.sh b/redhat/docker/opensuse32.sh index 1a78e6340..82d315ed9 100755 --- a/redhat/docker/opensuse32.sh +++ b/redhat/docker/opensuse32.sh @@ -1,9 +1,13 @@ #!/bin/bash -e +if [ "$(whoami)" != "root" ]; then + sudo exec $0 $@ +fi + VERSION="$1" # E.g: '42.3' if [ "${VERSION}" = "tumbleweed" ]; then - URL="http://download.opensuse.org/tumbleweed" + URL="https://download.opensuse.org/ports/i586/tumbleweed" NAME="opensuse32/tumbleweed" else URL="http://download.opensuse.org/distribution/leap/${VERSION}" @@ -13,25 +17,38 @@ fi IMAGE="${NAME}:latest" INSTALLROOT="/dev/shm/${IMAGE}" -sudo rm -rf "${INSTALLROOT}" -sudo mkdir -p "${INSTALLROOT}" +for dir in dev proc sys; do + if [ -d "${INSTALLROOT}/${dir}" ]; then + umount "${INSTALLROOT}/${dir}" + fi +done + +rm -rf "${INSTALLROOT}" +mkdir -p "${INSTALLROOT}" -sudo zypper --root "${INSTALLROOT}" \ +for dir in dev proc sys; do + mkdir -p "${INSTALLROOT}/${dir}" + mount --bind "/${dir}" "${INSTALLROOT}/${dir}" +done + +zypper --root "${INSTALLROOT}" \ ar "${URL}/repo/oss/" "oss" -sudo zypper --root "${INSTALLROOT}" \ +zypper --root "${INSTALLROOT}" \ ar "${URL}/repo/non-oss/" "non-oss" if [ "${VERSION}" != "tumbleweed" ]; then - sudo zypper --root "${INSTALLROOT}" \ + zypper --root "${INSTALLROOT}" \ ar "http://download.opensuse.org/update/leap/${VERSION}/oss/" "update-oss" - sudo zypper --root "${INSTALLROOT}" \ + zypper --root "${INSTALLROOT}" \ ar "http://download.opensuse.org/update/leap/${VERSION}/non-oss/" "update-non-oss" fi -sudo zypper --root "${INSTALLROOT}" \ +zypper --root "${INSTALLROOT}" \ --gpg-auto-import-keys ref -sudo setarch i686 zypper --root "${INSTALLROOT}" \ +setarch i686 zypper --root "${INSTALLROOT}" \ install --download-only -y \ bash \ + ca-certificates \ + curl \ docbook-utils \ filesystem \ gawk \ @@ -47,16 +64,23 @@ sudo setarch i686 zypper --root "${INSTALLROOT}" \ xz \ zlib \ zypper -sudo rpm -Uvh --root "${INSTALLROOT}" "${INSTALLROOT}/var/cache/zypp/packages/oss/"*"/"*".rpm" +rpm -Uvh --root "${INSTALLROOT}" "${INSTALLROOT}/var/cache/zypp/packages/oss/"*"/"*".rpm" + +chroot "${INSTALLROOT}" rpmdb --rebuilddb + +for dir in dev proc sys; do + umount "${INSTALLROOT}/${dir}" +done -sudo chroot "${INSTALLROOT}" rpmdb --rebuilddb +rm -rfv "${INSTALLROOT}//var/cache/zypp/packages/"* FILE="${IMAGE//\//_}.tar" -sudo tar -C "${INSTALLROOT}" -c . >"${FILE}" -sudo rm -rf "${INSTALLROOT}" +tar -C "${INSTALLROOT}" -c . >"${FILE}" +rm -rf "${INSTALLROOT}" docker rmi -f "${IMAGE}" docker import "${FILE}" "${IMAGE}" pigz "${FILE}" -mv -fv "${FILE}.gz" "${HOME}/tde/docker" +mkdir -p "/home/${SUDO_USER}/tde/docker" +mv -fv "${FILE}.gz" "/home/${SUDO_USER}/tde/docker" diff --git a/redhat/docker/osstw/Dockerfile.i686 b/redhat/docker/osstw/Dockerfile.i686 index ec076eabd..9a0593c0d 100644 --- a/redhat/docker/osstw/Dockerfile.i686 +++ b/redhat/docker/osstw/Dockerfile.i686 @@ -5,20 +5,17 @@ ARG ARCH=i686 # Add PACKMAN repository COPY packages /packages -RUN zypper ar -f -G -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman \ - && zypper ar -f -G -n gnome http://ftp.lysator.liu.se/pub/opensuse/repositories/GNOME:/Next/openSUSE_Factory gnome \ +RUN set -x \ + && zypper ar -f -G -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman \ && setarch ${ARCH} zypper -n refresh \ - && setarch ${ARCH} zypper -n dup \ && setarch ${ARCH} zypper -n update \ + && setarch ${ARCH} zypper -n dup \ && setarch ${ARCH} zypper -n install --allow-vendor-change $(</packages) # Add non-root user to build packages RUN useradd -m -s /bin/bash -u 1000 trinity \ && echo "trinity ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers -# Fix postgresql -RUN ln -sfv /usr/lib/postgresql10/bin/pg_config /usr/bin/pg_config - USER trinity COPY rpmmacros /home/trinity/.rpmmacros @@ -28,12 +25,15 @@ RUN mkdir -p /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/${ARCH} \ && mkdir -p /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch \ && sudo zypper ar -C -G /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch rpmbuild.noarch -# Add GeoIP -RUN setarch ${ARCH} rpmbuild --rebuild https://ftp.lysator.liu.se/pub/opensuse/source/distribution/leap/15.3/repo/oss/src/GeoIP-1.6.12-6.3.1.src.rpm \ - && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/*GeoIP*.rpm +# Install heimdal development files +RUN rpm -Uvh https://ftp.lysator.liu.se/pub/opensuse/source/tumbleweed/repo/oss/src/libheimdal-7.8.0-3.1.src.rpm \ + && wget -nv -O "${HOME}/rpmbuild/SOURCES/heimdal-7.8.0.tar.gz" "https://github.com/heimdal/heimdal/releases/download/heimdal-7.8.0/heimdal-7.8.0.tar.gz" \ + && sed -i "${HOME}/rpmbuild/SPECS/libheimdal.spec" -e "/^Source0:/ s|.*|Source0: heimdal-7.8.0.tar.gz|" -e "/^Patch0/ s|^|#|" \ + && setarch ${ARCH} rpmbuild -bc ${HOME}/rpmbuild/SPECS/libheimdal.spec \ + && sudo make -C ${HOME}/rpmbuild/BUILD/heimdal-7.8.0/tools/ install # Add lilypond (i686 only) -RUN rpm -Uvh https://ftp.lysator.liu.se/pub/opensuse/source/tumbleweed/repo/oss/src/lilypond-2.23.3-3.9.src.rpm \ +RUN rpm -Uvh https://ftp.lysator.liu.se/pub/opensuse/source/tumbleweed/repo/oss/src/lilypond-2.24.1-2.2.src.rpm \ && sed -i "${HOME}/rpmbuild/SPECS/lilypond.spec" -e "/^ExcludeArch/d" \ && setarch ${ARCH} rpmbuild -ba "${HOME}/rpmbuild/SPECS/lilypond.spec" \ - && sudo rpm -Uvh "${HOME}/rpmbuild/RPMS/"*"/lilypond"{,-fonts-common,-texgy-fonts,-emmentaler-fonts}"-2"*".rpm" + && sudo rpm -Uvh "${HOME}/rpmbuild/RPMS/"*"/lilypond"{,-fonts-common,-emmentaler-fonts}"-2"*".rpm" diff --git a/redhat/docker/osstw/Dockerfile.x86_64 b/redhat/docker/osstw/Dockerfile.x86_64 index d708590cd..1e9205626 100644 --- a/redhat/docker/osstw/Dockerfile.x86_64 +++ b/redhat/docker/osstw/Dockerfile.x86_64 @@ -5,12 +5,12 @@ ARG ARCH=x86_64 # Add PACKMAN repository COPY packages /packages -RUN zypper ar -f -G -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman \ +RUN set -x \ + && zypper ar -f -G -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman \ && zypper -n refresh \ - && zypper -n install busybox perl shadow \ && zypper -n dup \ && zypper -n update \ - && zypper -n install $(</packages) + && zypper -n install --allow-vendor-change $(</packages) # Add non-root user to build packages RUN useradd -m -s /bin/bash -u 1000 trinity \ @@ -25,6 +25,9 @@ RUN mkdir -p /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/${ARCH} \ && mkdir -p /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch \ && sudo zypper ar -C -G /home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch rpmbuild.noarch -# Add GeoIP -RUN rpmbuild --rebuild https://ftp.lysator.liu.se/pub/opensuse/source/distribution/leap/15.3/repo/oss/src/GeoIP-1.6.12-6.3.1.src.rpm \ - && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/*GeoIP*.rpm +# Install heimdal development files +RUN rpm -Uvh https://ftp.lysator.liu.se/pub/opensuse/source/tumbleweed/repo/oss/src/libheimdal-7.8.0-3.1.src.rpm \ + && wget -nv -O "${HOME}/rpmbuild/SOURCES/heimdal-7.8.0.tar.gz" "https://github.com/heimdal/heimdal/releases/download/heimdal-7.8.0/heimdal-7.8.0.tar.gz" \ + && sed -i "${HOME}/rpmbuild/SPECS/libheimdal.spec" -e "/^Source0:/ s|.*|Source0: heimdal-7.8.0.tar.gz|" -e "/^Patch0/ s|^|#|" \ + && rpmbuild -bc ${HOME}/rpmbuild/SPECS/libheimdal.spec \ + && sudo make -C ${HOME}/rpmbuild/BUILD/heimdal-7.8.0/tools/ install diff --git a/redhat/docker/osstw/packages b/redhat/docker/osstw/packages index 263bd6947..b1abbed8b 100644 --- a/redhat/docker/osstw/packages +++ b/redhat/docker/osstw/packages @@ -33,6 +33,7 @@ docbook-xsl-stylesheets doxygen GraphicsMagick docbook2x dssi-devel +extractpdfmark fdupes ffmpeg-4-libavcodec-devel ffmpeg-4-libavdevice-devel @@ -158,6 +159,7 @@ libyaz-devel lirc-devel make makeinfo +mc meanwhile-devel Mesa-devel Mesa-libGL-devel @@ -178,10 +180,13 @@ patch pciutils-devel pcre-devel pcsc-lite-devel +perl-JSON perl-PAR-Packer perl-pcsc pkcs11-helper-devel +pkgconfig(bdw-gc) pkgconfig(guile-1.8) +pkgconfig(guile-3.0) polkit-devel postgresql postgresql-devel diff --git a/redhat/docker/osstw/rpmmacros b/redhat/docker/osstw/rpmmacros index cb1ceaa06..174b79fb3 100644 --- a/redhat/docker/osstw/rpmmacros +++ b/redhat/docker/osstw/rpmmacros @@ -1,4 +1,4 @@ %dist .osstw %_smp_mflags -j8 %jobs 8 -%__python %__python2 +%__python %__python3 |