--- /dev/null
+# First do the source builds
+@INCLUDE Dockerfile.target.sdist
+
+# This defines the dstribution base layer
+# Put only the bare minimum of common commands here, without dev tools
+FROM centos:8 as dist-base
+ARG BUILDER_CACHE_BUSTER=
+RUN yum install -y epel-release && \
+ dnf install -y 'dnf-command(config-manager)' && \
+ dnf config-manager --set-enabled PowerTools
+
+# Do the actual rpm build
+@INCLUDE Dockerfile.rpmbuild
+
+# Do a test install and verify
+# Can be skipped with skiptests=1 in the environment
+# @EXEC [ "$skiptests" = "" ] && include Dockerfile.rpmtest
%endif
%if 0%{?rhel} >= 7
Requires(pre): shadow-utils
+%if 0%{?rhel} == 7
+# No fstrm in EPEL 8 (yet) https://bugzilla.redhat.com/show_bug.cgi?id=1760298
BuildRequires: fstrm-devel
+%endif
%systemd_requires
%endif
--without-protobuf \
--without-net-snmp
%endif
-%if 0%{?rhel} >= 7
+%if 0%{?rhel} == 7
--enable-dnstap \
+%endif
+%if 0%{?rhel} >= 7
--with-gnutls \
--with-protobuf \
--with-lua=%{lua_implementation} \
%if 0%{?rhel} >= 7
BuildRequires: protobuf-compiler
BuildRequires: protobuf-devel
+
+%if 0%{?rhel} == 7
+# No fstrm in EPEL 8 yet
+BuildRequires: fstrm-devel
+%endif
%endif
BuildRequires: openssl-devel
Group: System Environment/Daemons
Requires: %{name}%{?_isa} = %{version}-%{release}
BuildRequires: yaml-cpp-devel
+%if 0%{?rhel} <= 7
BuildRequires: geoip-devel
+%endif
BuildRequires: libmaxminddb-devel
%global backends %{backends} geoip