@ -5,10 +5,10 @@ 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 \
RUN rpm -Uvh --force 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 \
&& rm -fv *.repo \
&& curl http://repo/repo/{ centos5,epel5,repoforge5} .repo >repos.repo \
&& rpm -e --nodeps --justdb libselinux \
&& yum -y update \
@ -29,57 +29,88 @@ RUN rpm -Uvh http://repo/trinity/archives/el5/tools/RPMS/{noarch/autoconf-2.63-5
RUN useradd -m -s /bin/bash -u 1000 trinity \
&& echo "trinity ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
# Fix sudo running in docker
RUN sed -i "/etc/sudoers" -e "/requiretty/ s|^|#|"
# Use GCC 4.4 by default
RUN rm -f /usr/bin/gcc && ln -sf /usr/bin/gcc44 /usr/bin/gcc \
&& rm -f /usr/bin/g++ && ln -sf /usr/bin/g++44 /usr/bin/g++ \
&& rm -f /usr/bin/c++ && ln -sf /usr/bin/g++44 /usr/bin/c++
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 \
# Build development tools
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/cmake-2.8.12.2-4.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/cmake-2.8.12.2-4.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/cmake.spec --without gui \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/cmake-2*.rpm \
&& rm -fv /tmp/*.src.rpm \
&& sudo sed -i "/usr/share/cmake/Modules/FindGTK2.cmake" -e "/GTK2_GIO/ s|^|#|"
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/binutils-2.20.51.0.2-5.48.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/binutils-2.20.51.0.2-5.48.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/binutils.spec --nodeps \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/binutils{ ,-devel} -2*.rpm \
&& rm -fv /tmp/*.src.rpm
# Build dependencies
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/file-5.04-30.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/file-5.04-30.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/file.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/file{ ,-libs,-devel} -5*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN wget -nv -P /tmp http://archives.fedoraproject.org/pub/archive/epel/6/SRPMS/Packages/p/pcsc-perl-1.4.14-2.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/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
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/pcsc-perl.spec --define "__isa_bits 64" \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/pcsc-perl-1*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/6/SRPMS/Packages/s/sword-1.7.3-2.el6.src.rpm \
RUN wget -nv -P /tmp http://archives.fedoraproject.org/pub/archive/epel/6/SRPMS/Packages/s/sword-1.7.3-2.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/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 \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/sword.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/sword{ ,-devel} -1*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/gnuchess-5.07-14.1.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/gnuchess-5.07-14.1.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/gnuchess.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/gnuchess-5*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN wget -nv -P /tmp http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-1.015-4.el7.src.rpm \
&& rpm -ivh --nomd5 /tmp/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
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/perl-PAR.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/perl-PAR-1*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN rpm -i --nomd5 http://vault.centos.org/7.7.1908/os/Source/SPackages/perl-Module-ScanDeps-1.10-3.el7.src.rpm \
RUN wget -nv -P /tmp http://vault.centos.org/7.7.1908/os/Source/SPackages/perl-Module-ScanDeps-1.10-3.el7.src.rpm \
&& rpm -ivh --nomd5 /tmp/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
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/perl-Module-ScanDeps.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/perl-Module-ScanDeps-*.rpm \
&& rm -fv /tmp/*.src.rpm
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-Packer-1.041-2.el7.src.rpm \
RUN wget -nv -P /tmp http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-Packer-1.041-2.el7.src.rpm \
&& rpm -ivh --nomd5 /tmp/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
&& setarch ${ ARCH } 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 \
&& rm -fv /tmp/*.src.rpm
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/exempi-2.1.0-5.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/exempi-2.1.0-5.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/exempi.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/exempi{ ,-devel} -2*.rpm \
&& rm -fv /tmp/*.src.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++
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/pilot-link-0.12.4-6.el6.src.rpm \
&& rpm -ivh --nomd5 /tmp/pilot-link-0.12.4-6.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/pilot-link.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/pilot-link{ ,-devel} -0*.rpm \
&& rm -fv /tmp/*.src.rpm