@ -5,10 +5,10 @@ ARG ARCH=x86_64
# Add local repositories
# Add local repositories
COPY packages /packages
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 \
&& echo "multilib_policy=best" >>/etc/yum.conf \
&& cd /etc/yum.repos.d \
&& cd /etc/yum.repos.d \
&& rm -f *.repo \
&& rm -fv *.repo \
&& curl http://repo/repo/{ centos5,epel5,repoforge5} .repo >repos.repo \
&& curl http://repo/repo/{ centos5,epel5,repoforge5} .repo >repos.repo \
&& rpm -e --nodeps --justdb libselinux \
&& rpm -e --nodeps --justdb libselinux \
&& yum -y update \
&& 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 \
RUN useradd -m -s /bin/bash -u 1000 trinity \
&& echo "trinity ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
&& 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
USER trinity
COPY rpmmacros /home/trinity/.rpmmacros
COPY rpmmacros /home/trinity/.rpmmacros
RUN mkdir -p ${ HOME } /rpmbuild/{ BUILD,BUILDROOT,SOURCES,SPECS,RPMS/noarch,RPMS/${ ARCH } ,SRPMS}
RUN mkdir -p ${ HOME } /rpmbuild/{ BUILD,BUILDROOT,SOURCES,SPECS,RPMS/noarch,RPMS/${ ARCH } ,SRPMS}
# Build development packages
# Build development tools
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/file-5.04-30.el6.src.rpm \
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/cmake-2.8.12.2-4.el6.src.rpm \
&& rpmbuild -ba ${ HOME } /rpmbuild/SPECS/file.spec \
&& rpm -ivh --nomd5 /tmp/cmake-2.8.12.2-4.el6.src.rpm \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/file{ ,-libs,-devel} -5*.rpm
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/cmake.spec --without gui \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/cmake-2*.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 \
&& rm -fv /tmp/*.src.rpm \
&& rpmbuild -ba ${ HOME } /rpmbuild/SPECS/binutils.spec --nodeps \
&& sudo sed -i "/usr/share/cmake/Modules/FindGTK2.cmake" -e "/GTK2_GIO/ s|^|#|"
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/binutils{ ,-devel} -2*.rpm
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 \
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/6/SRPMS/Packages/p/pcsc-perl-1.4.14-2.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)| " \
&& 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" \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/pcsc-perl.spec --define "__isa_bits 64" \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/pcsc-perl-1*.rpm
&& 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)| " \
&& 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 \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/sword.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/sword{ ,-devel} -1*.rpm
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/sword{ ,-devel} -1*.rpm \
&& rm -fv /tmp/*.src.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 \
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/gnuchess-5.07-14.1.el6.src.rpm \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/gnuchess-5*.rpm
&& rpm -ivh --nomd5 /tmp/gnuchess-5.07-14.1.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/gnuchess.spec \
RUN rpm -i --nomd5 http://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-1.015-4.el7.src.rpm \
&& 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|^|#|" \
&& 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 \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/perl-PAR.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/perl-PAR-1*.rpm
&& 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|^|#|" \
&& 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 \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/perl-Module-ScanDeps.spec \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/perl-Module-ScanDeps-*.rpm
&& 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=''|" \
&& 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" \
&& 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
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/perl-PAR-Packer-1*.rpm --nodeps \
&& rm -fv /tmp/*.src.rpm
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 \
RUN wget -nv -P /tmp http://vault.centos.org/6.10/os/Source/SPackages/exempi-2.1.0-5.el6.src.rpm \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/exempi{ ,-devel} -2*.rpm
&& rpm -ivh --nomd5 /tmp/exempi-2.1.0-5.el6.src.rpm \
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/exempi.spec \
RUN rpm -i --nomd5 http://vault.centos.org/6.10/os/Source/SPackages/pilot-link-0.12.4-6.el6.src .rpm \
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/exempi{ ,-devel} -2* .rpm \
&& rpmbuild -ba ${ HOME } /rpmbuild/SPECS/pilot-link.spec \
&& rm -fv /tmp/*.src.rpm
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/pilot-link{ ,-devel} -0*.rpm
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 \
# sudo rm -f /usr/bin/gcc && sudo ln -sf /usr/bin/gcc44 /usr/bin/gcc
&& setarch ${ ARCH } rpmbuild -ba ${ HOME } /rpmbuild/SPECS/pilot-link.spec \
# sudo rm -f /usr/bin/g++ && sudo ln -sf /usr/bin/g++44 /usr/bin/g++
&& sudo rpm -Uvh ${ HOME } /rpmbuild/RPMS/*/pilot-link{ ,-devel} -0*.rpm \
# sudo rm -f /usr/bin/c++ && sudo ln -sf /usr/bin/g++44 /usr/bin/c++
&& rm -fv /tmp/*.src.rpm