From 0edc1511e1134e66172a80f8d69389f246ff867e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sat, 6 May 2023 10:11:37 +0200 Subject: [PATCH] RPM: add docker script for fedora38 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot --- redhat/build/build_rpm_package.sh | 8 +- redhat/docker/f38/Dockerfile.x86_64 | 43 +++++ redhat/docker/f38/packages | 240 ++++++++++++++++++++++++++++ redhat/docker/f38/rpmbuild.repo | 11 ++ redhat/docker/f38/rpmmacros | 9 ++ 5 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 redhat/docker/f38/Dockerfile.x86_64 create mode 100644 redhat/docker/f38/packages create mode 100644 redhat/docker/f38/rpmbuild.repo create mode 100644 redhat/docker/f38/rpmmacros diff --git a/redhat/build/build_rpm_package.sh b/redhat/build/build_rpm_package.sh index 3e4699cd6..fa5439b2c 100755 --- a/redhat/build/build_rpm_package.sh +++ b/redhat/build/build_rpm_package.sh @@ -13,10 +13,14 @@ SPECFILE=$(get_specfile.sh ${PKGNAME} ${TDE_VERSION}) VERSION=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION} || :) case "${VERSION}" in *~pre*) PREVERSION="${VERSION#*~}";; esac +ARCH="$(uname -i)" +if [ "${ARCH}" = "unknown" ]; then + ARCH="$(uname -m)" +fi DIST="$(rpmdist.sh --dist)" [ -z "${TMPPATH}" ] && TMPPATH="/dev/shm" -BUILDDIR="${TMPPATH}/BUILD${DIST}.$(uname -i)" -BUILDROOTDIR="${TMPPATH}/BUILDROOT${DIST}.$(uname -i)" +BUILDDIR="${TMPPATH}/BUILD${DIST}.${ARCH}" +BUILDROOTDIR="${TMPPATH}/BUILDROOT${DIST}.${ARCH}" LOGFILE="${TMPPATH}/log.${COMP##*/}" export TEMPDIR="$(mktemp -d)" diff --git a/redhat/docker/f38/Dockerfile.x86_64 b/redhat/docker/f38/Dockerfile.x86_64 new file mode 100644 index 000000000..9663eb000 --- /dev/null +++ b/redhat/docker/f38/Dockerfile.x86_64 @@ -0,0 +1,43 @@ +FROM fedora:38 + +ARG TDE_VERSION=14.1.0 +ARG ARCH=x86_64 + +# Fix DNF database corruption +# Add RPMFUSION repository +# Install Trinity build dependencies +COPY packages /packages +RUN echo "proxy=http://proxy:3128" >>"/etc/dnf.conf" \ + && rm -fv /etc/yum.repos.d/*{rawhide,testing}* \ + && sed -i /etc/yum.repos.d/fedora{,-modular,-updates,-updates-modular}.repo -e "1,12s|enabled=0|enabled=1|" -e "s|\$releasever|38|g" \ + && dnf -y install dnf-plugin-ovl findutils \ + && dnf -y --enableplugin=ovl install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-38.noarch.rpm \ + && dnf -y --enableplugin=ovl update \ + && dnf -y --enableplugin=ovl install --skip-broken $(>/etc/sudoers \ + && echo "export QA_RPATHS=\$(( 0x0001|0x0002 ))" >>/home/trinity/.bashrc + +USER trinity +COPY rpmmacros /home/trinity/.rpmmacros + +RUN sudo rpm -Uvh https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/34/Everything/aarch64/os/Packages/p/python2-setuptools-41.2.0-4.fc34.noarch.rpm + +RUN rpm -i https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/35/Everything/source/tree/Packages/w/wireless-tools-29-28.fc35.src.rpm \ + && rpmbuild -ba ${HOME}/rpmbuild/SPECS/wireless-tools.spec \ + && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/wireless-tools{,-devel}-29* + +RUN rpm -i http://ftp.free.fr/mirrors/fedora.redhat.com/fedora/linux/releases/36/Everything/source/tree/Packages/l/libnjb-2.2.7-24.fc36.src.rpm \ + && sed -i ${HOME}/rpmbuild/SPECS/libnjb.spec -e "s|libusb-devel|libusb1-devel|" \ + && rpmbuild -ba ${HOME}/rpmbuild/SPECS/libnjb.spec \ + && sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/libnjb{,-devel}-2* diff --git a/redhat/docker/f38/packages b/redhat/docker/f38/packages new file mode 100644 index 000000000..1a1beca2a --- /dev/null +++ b/redhat/docker/f38/packages @@ -0,0 +1,240 @@ +alsa-lib-devel +aspell +aspell-devel +audiofile-devel +autotrace +avahi-devel +bdftopcf +bind-devel +binutils-devel +bison +boost-devel +boost-python3-devel +byacc +bzip2-devel +ccache +cdparanoia +cdparanoia-devel +chmlib-devel +chrpath +clamav +clamav-devel +clucene-core-devel +cmake +cpp +cppunit-devel +crda +createrepo_c +cryptsetup-devel +cups-devel +dbus-glib-devel +djvulibre +djvulibre-devel +dnf-plugin-ovl +docbook2X +doxygen +dssi-devel +esound-devel +exempi-devel +exiv2-devel +fdupes +fedora-rpm-macros +ffmpeg-devel +fftw-devel +file-devel +flac-devel +flex-static +fontpackages-devel +fribidi-devel +gcc +gcc-c++ +geoip-devel +gettext-devel +giflib-devel +glib-devel +gmime-devel +gmp-devel +gnokii-devel +gperf +gpgme-devel +gphoto2-devel +GraphicsMagick-devel +graphviz +gsl-devel +gstreamer1-devel +gstreamer1-plugins-base-devel +gtk2-devel +gtk3-devel +gtk+-devel +gtk-doc +guile-devel +harfbuzz-devel +heimdal-devel +hspell-devel +htdig +html2ps +iceauth +icu +ImageMagick-devel +imake +imlib2-devel +intltool +jack-audio-connection-kit-devel +jasper-devel +java-1.8.0-openjdk-devel +java-devel +java-openjdk +lame-devel +lcms-devel +less +libacl-devel +libblkid-devel +libcap-devel +libcdio-devel +libcdio-paranoia-devel +libconfig-devel +libcurl-devel +libdb-cxx-devel +libdb-devel +libdvdread-devel +libfontenc-devel +libgadu-devel +libgpod-devel +libgsf-devel +libical-devel +libidn-devel +libifp-devel +liblo-devel +liblrdf-devel +libmad-devel +libmng-devel +libmp4v2-devel +libmpcdec-devel +libmtp-devel +libmusicbrainz5-devel +libnjb-devel +libnsl2-devel +libofx-devel +libogg-devel +libotr-devel +libpaper-devel +libqalculate-devel +libraw1394-devel +librsvg2 +librsvg2-tools +libsamplerate-devel +libsmbclient-devel +libsndfile-devel +libssh-devel +libssh2-devel +libtheora-devel +libtiff-devel +libtirpc-devel +libtool +libtool-ltdl-devel +libudev-devel +libudisks2-devel +libusb-compat-0.1-devel +libusb1-devel +libutempter-devel +libuuid-devel +libv4l-devel +libvisual-devel +libvncserver-devel +libvorbis-devel +libwmf-devel +libwpd-devel +libXaw-devel +libXcomposite-devel +libXdamage-devel +libXdmcp-devel +libxkbfile-devel +libXScrnSaver-devel +libxslt-devel +libXtst-devel +libXv-devel +libXxf86dga-devel +libXxf86vm-devel +libyaz-devel +libzrtpcpp-devel +lirc-devel +lm_sensors-devel +meanwhile-devel +mesa-libGL-devel +mftrace +mysql-devel +nas-devel +neon-devel +netpbm-progs +NetworkManager-libnm-devel +net-snmp-devel +net-tools +nspr-devel +ocaml +ocaml(compiler) +ocaml-facile-devel +OpenEXR-devel +openldap-devel +opensc +openslp-devel +opensp-devel +ortp-devel +pam-devel +pciutils-devel +pcre-devel +pcsc-lite-devel +pcsc-perl +perl +perl-devel +perl(ExtUtils::MakeMaker) +perl(PAR::Packer) +perl(XML::Parser) +pilot-link-devel +pkcs11-helper-devel +pkgconfig(pygtk-2.0) +polkit-devel +poppler-devel +postgresql +postgresql-private-devel +postgresql-server-devel +ppp +pulseaudio-libs-devel +python +python3-devel +qt4-devel +recode +redhat-rpm-config +rpcgen +rpm-build +ruby +ruby-devel +sane-backends-devel +scons +SDL-devel +selinux-policy-devel +speex-devel +sqlite-devel +subversion-devel +sudo +swig +sword-devel +t1lib-devel +t1utils +taglib-devel +texinfo +texlive-newunicodechar +torsocks +transfig +udisks-devel +unixODBC-devel +usbutils +valgrind +xbase-devel +xine-lib-devel +xmedcon +xmedcon-devel +xmlto +xorg-x11-font-utils +xscreensaver +xscreensaver-extras +xz-devel diff --git a/redhat/docker/f38/rpmbuild.repo b/redhat/docker/f38/rpmbuild.repo new file mode 100644 index 000000000..750290651 --- /dev/null +++ b/redhat/docker/f38/rpmbuild.repo @@ -0,0 +1,11 @@ +[rpmbuild.${ARCH}] +name=rpmbuild.${ARCH} +baseurl=file:///home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/${ARCH} +enabled=1 +gpgcheck=0 + +[rpmbuild.noarch] +name=rpmbuild.noarch +baseurl=file:///home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION}/noarch +enabled=1 +gpgcheck=0 diff --git a/redhat/docker/f38/rpmmacros b/redhat/docker/f38/rpmmacros new file mode 100644 index 000000000..6c116b15a --- /dev/null +++ b/redhat/docker/f38/rpmmacros @@ -0,0 +1,9 @@ +%dist .fc38 +%_smp_mflags -j8 +%jobs 8 +%__brp_remove_la_files %nil +%__cmake_builddir %nil +%__cmake_in_source_build 1 +%_debugsource_packages %nil +%_debugsource_template %nil +%source_date_epoch_from_changelog 0