blob: 18e5dceea2ca969166f313bd34d5db01d791d3be (
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
57
58
59
60
61
62
63
64
65
66
67
|
FROM rockylinux:8
ARG TDE_VERSION=14.1.3
ARG ARCH=x86_64
# Enable custom repository
COPY centos-devel.repo /etc/yum.repos.d/centos-devel.repo
# Enable proxy
# Install OVL plugin for DNF
# Update distribution packages
# Add EPEL repository
# Add RPMFUSION repository
# Enable supplementary repositories
# Install Trinity build dependencies
COPY packages /packages
RUN set -x \
&& echo "proxy=http://proxy:3128" >>"/etc/dnf/dnf.conf" \
&& curl -o /usr/lib/python3.6/site-packages/dnf-plugins/ovl.py https://raw.githubusercontent.com/FlorianLudwig/dnf-plugin-ovl/master/ovl.py \
&& dnf -y update \
&& dnf -y install epel-release \
&& dnf -y install https://download1.rpmfusion.org/free/el/updates/8/x86_64/r/rpmfusion-free-release-8-0.1.noarch.rpm \
&& dnf -y install dnf-plugins-core \
&& dnf config-manager --enable powertools \
&& dnf -y --enableplugin=ovl install $(</packages)
# Add YUM repository for locally built packages
WORKDIR /etc/yum.repos.d
COPY rpmbuild.repo rpmbuild.repo
RUN sed -i "rpmbuild.repo" -e "s|\${ARCH}|${ARCH}|g" -e "s|\${TDE_VERSION}|${TDE_VERSION}|g"
# Fix utempter detection
# Fix python3.6 detection (tdebindings; kvirc)
RUN chmod a+r /usr/libexec/utempter/utempter \
&& ln -sfv python3.6m /usr/include/python3.6 \
&& ln -sfv python3 /usr/bin/python
# 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
# Build supplementary development tools
RUN rpmbuild --rebuild https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/g/gnuchess-6.2.9-3.fc36.src.rpm \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/gnuchess-6*.rpm
RUN rpmbuild --rebuild https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/p/pilot-link-0.12.5-50.fc36.src.rpm \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/pilot-link-{devel,libs}-0*.rpm
RUN sudo rpm -Uvh http://rpms.remirepo.net/enterprise/8/remi/x86_64/hiredis-0.13.3-9.el8.remi.x86_64.rpm http://rpms.remirepo.net/enterprise/8/remi/x86_64/libyaz{,-devel}-5.14.11-14.el8.remi.x86_64.rpm
RUN rpmbuild --rebuild https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/p/perl-PAR-1.017-5.fc36.src.rpm \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-1*.rpm
RUN rpmbuild --rebuild https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/p/perl-Getopt-ArgvFile-1.11-37.fc36.src.rpm \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-Getopt-ArgvFile-1*.rpm
RUN rpmbuild --rebuild https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/36/Everything/source/tree/Packages/p/perl-PAR-Packer-1.054-3.fc36.src.rpm --nocheck \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/perl-PAR-Packer-1*.rpm
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/10/Everything/source/tree/Packages/l/libunibreak-6.1-2.el10_0.src.rpm \
&& sed -i ${HOME}/rpmbuild/SPECS/libunibreak.spec -e "/^Patch:.*offline_files.patch/ s/^Patch:/Patch1:/" -e "/^Patch:.*remove_unused_var.patch/ s/^Patch:/Patch2:/" \
&& rpmbuild -ba ${HOME}/rpmbuild/SPECS/libunibreak.spec \
&& sudo rpm -Uvh ${HOME}/rpmbuild/RPMS/*/libunibreak-{6,devel}*.rpm
|