blob: 51953f91645f86c4d4d320ee902db698465b4929 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
FROM centos:6
ARG TDE_VERSION=14.0.7
ARG ARCH=x86_64
RUN echo "proxy=http://proxy:3128" >>/etc/yum.conf
# Add EPEL repository
RUN yum -y install epel-release
# Add NUX repository
RUN rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
# Install Trinity build dependencies
ADD packages.trinity /packages
RUN yum -y update
RUN yum -y install $(</packages)
# Distro-specific patches
RUN 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 YUM repository for locally built packages
WORKDIR /etc/yum.repos.d
ADD rpmbuild.repo rpmbuild.repo
RUN sed -i "rpmbuild.repo" -e "s|\${ARCH}|${ARCH}|g" -e "s|\${TDE_VERSION}|${TDE_VERSION}|g"
# Add non-root user to build packages
RUN useradd -m -s /bin/bash -u 1000 trinity
RUN echo "trinity ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
USER trinity
ADD rpmmacros /home/trinity/.rpmmacros
# Build supplementary development tools
RUN rpmbuild --rebuild http://vault.centos.org/7.7.1908/os/Source/SPackages/m4-1.4.16-10.el7.src.rpm
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/m4-1*.rpm
RUN rpmbuild --rebuild http://vault.centos.org/7.7.1908/os/Source/SPackages/autoconf-2.69-11.el7.src.rpm
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/autoconf-2*.rpm
RUN rpmbuild --rebuild http://vault.centos.org/7.7.1908/os/Source/SPackages/perl-Module-Install-1.06-4.el7.src.rpm
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-Module-Install-*.rpm
RUN rpmbuild --rebuild http://vault.centos.org/7.7.1908/os/Source/SPackages/perl-Module-ScanDeps-1.10-3.el7.src.rpm
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-Module-ScanDeps-*.rpm
RUN rpm -i https://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-1.015-4.el7.src.rpm
RUN sed -i ${HOME}/rpmbuild/SPECS/perl-PAR.spec -e "s|%license|%doc|"
RUN rpmbuild -ba ${HOME}/rpmbuild/SPECS/perl-PAR.spec
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-1*.rpm
RUN rpm -i https://fr2.rpmfind.net/linux/epel/7/SRPMS/Packages/p/perl-PAR-Packer-1.041-2.el7.src.rpm
RUN sed -i ${HOME}/rpmbuild/SPECS/perl-PAR-Packer.spec -e "s|%license|%doc|"
RUN rpmbuild -ba ${HOME}/rpmbuild/SPECS/perl-PAR-Packer.spec
RUN sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-Packer-1*.rpm --nodeps
|