You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
5.0 KiB
86 lines
5.0 KiB
FROM centos:5
|
|
|
|
ARG TDE_VERSION=14.1.0
|
|
ARG ARCH=x86_64
|
|
|
|
# Add local repositories
|
|
COPY packages /packages
|
|
RUN rpm -Uvh http://repo/repo/archives/centos/5/os/x86_64/CentOS/{curl-7.15.5-17.el5_9,libidn-0.6.5-1.1}.x86_64.rpm \
|
|
&& echo "multilib_policy=best" >>/etc/yum.conf \
|
|
&& cd /etc/yum.repos.d \
|
|
&& rm -f *.repo \
|
|
&& curl http://repo/repo/{centos5,epel5,repoforge5}.repo >repos.repo \
|
|
&& rpm -e --nodeps --justdb libselinux \
|
|
&& yum -y update \
|
|
&& yum -y install $(</packages) || :
|
|
|
|
# Avoid conflict with gnome-screensaver
|
|
RUN setarch ${ARCH} yum -y remove gnome-screensaver \
|
|
&& setarch ${ARCH} yum -y install --disablerepo="*" --enablerepo="centos-extras" xscreensaver
|
|
|
|
# Updated build tools (not provided in centos5)
|
|
# Distro-specific patches
|
|
RUN rpm -Uvh http://repo/trinity/archives/el5/tools/RPMS/{noarch/autoconf-2.63-5.el5.noarch,noarch/automake-1.11.1-4.el5.noarch,x86_64/m4-1.4.13-5.el5.x86_64}.rpm \
|
|
&& rpm -Uvh http://repo/trinity/archives/el5/trinity-14.0.4/RPMS/x86_64/trinity-poppler{,-devel}-0.12.4-1.el5.x86_64.rpm \
|
|
&& chmod a+r /usr/libexec/utempter/utempter \
|
|
&& sed -i "/usr/include/jasper/jas_math.h" -e "/#include <stdint.h>/ s|$|\n#ifndef SIZE_MAX\n#define SIZE_MAX ((size_t) -1)\n#endif\n|"
|
|
|
|
# Add non-root user to build packages
|
|
RUN useradd -m -s /bin/bash -u 1000 trinity \
|
|
&& echo "trinity ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
|
|
|
|
USER trinity
|
|
COPY rpmmacros /home/trinity/.rpmmacros
|
|
RUN mkdir -p ${HOME}/rpmbuild/{BUILD,BUILDROOT,SOURCES,SPECS,RPMS/noarch,RPMS/${ARCH},SRPMS}
|
|
|
|
# Build development packages
|
|
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/file-5.04-30.el6.src.rpm \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/file.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/file{,-libs,-devel}-5*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/binutils-2.20.51.0.2-5.48.el6.src.rpm \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/binutils.spec --nodeps \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/binutils{,-devel}-2*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/6/SRPMS/Packages/p/pcsc-perl-1.4.14-2.el6.src.rpm \
|
|
&& sed -i ${HOME}/rpmbuild/SPECS/pcsc-perl.spec -e "s|%license|%doc|" -e "/URL:/ s|$|\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)|" \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/pcsc-perl.spec --define "__isa_bits 64" \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/pcsc-perl-1*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/6/SRPMS/Packages/s/sword-1.7.3-2.el6.src.rpm \
|
|
&& sed -i ${HOME}/rpmbuild/SPECS/sword.spec -e "/URL:/ s|$|\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)|" \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/sword.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/sword{,-devel}-1*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/gnuchess-5.07-14.1.el6.src.rpm \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/gnuchess.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/gnuchess-5*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-1.015-4.el7.src.rpm \
|
|
&& sed -i ${HOME}/rpmbuild/SPECS/perl-PAR.spec -e "s|%license|%doc|" -e "/perl(AutoLoader)/ s|^|#|" -e "/URL:/ s|$|\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)|" -e "/^make test/ s|^|#|" \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/perl-PAR.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-1*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://vault.centos.org/7.7.1908/os/Source/SPackages/perl-Module-ScanDeps-1.10-3.el7.src.rpm \
|
|
&& sed -i ${HOME}/rpmbuild/SPECS/perl-Module-ScanDeps.spec -e "/URL:/ s|$|\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)|" -e "/^make test/ s|^|#|" \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/perl-Module-ScanDeps.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-Module-ScanDeps-*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-Packer-1.041-2.el7.src.rpm \
|
|
&& sed -i ${HOME}/rpmbuild/SPECS/perl-PAR-Packer.spec -e "s|%license|%doc|" -e "/^make test/ s|^|#|" -e "/^Summary:/ s|$|\nGroup: Development/Languages|" -e "/URL:/ s|$|\nBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)|" -e "s|desktop-file-install|desktop-file-install --vendor=''|" \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/perl-PAR-Packer.spec --define "_unpackaged_files_terminate_build 0" \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-Packer-1*.rpm --nodeps
|
|
|
|
RPM rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/exempi-2.1.0-5.el6.src.rpm \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/exempi.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/exempi{,-devel}-2*.rpm
|
|
|
|
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/pilot-link-0.12.4-6.el6.src.rpm \
|
|
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/pilot-link.spec \
|
|
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/pilot-link{,-devel}-0*.rpm
|
|
|
|
|
|
# sudo rm -f /usr/bin/gcc && sudo ln -sf /usr/bin/gcc44 /usr/bin/gcc
|
|
# sudo rm -f /usr/bin/g++ && sudo ln -sf /usr/bin/g++44 /usr/bin/g++
|
|
# sudo rm -f /usr/bin/c++ && sudo ln -sf /usr/bin/g++44 /usr/bin/c++
|