]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add el-8, needed a nweer boost to build with clang
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 26 May 2025 10:08:43 +0000 (12:08 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 2 Jun 2025 10:17:37 +0000 (12:17 +0200)
builder-support/dockerfiles/Dockerfile.target.oraclelinux-8
builder-support/post-build
builder-support/specs/pdns-recursor.spec

index e364952f01079f6595bf36c6ed43bc5f3a75dbde..2d7807bd81cde0438554afd2348081300fe08289 100644 (file)
@@ -3,10 +3,11 @@
 
 # This defines the distribution base layer
 # Put only the bare minimum of common commands here, without dev tools
-FROM oraclelinux:8 as dist-base
+FROM oraclelinux:8 AS dist-base
 
 ARG BUILDER_CACHE_BUSTER=
 RUN touch /var/lib/rpm/* && dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
+    dnf install -y epel-release && \
     dnf install -y 'dnf-command(config-manager)' yum && \
     dnf config-manager --set-enabled ol8_codeready_builder && \
     dnf install gcc-toolset-13
index bd416455dfed1be9e7f6508a1e2fb81f679933e2..c6fa584eb462a5676890008578296e415f0467c1 100755 (executable)
@@ -22,10 +22,7 @@ fi
 # with a find condition for pdns to exclude accidentally matching pdns-recursor*.
 for prog in pdns-recursor dnsdist; do
   if [ $(find ${SRCDIR}/dist -name "${prog}*" 2>/dev/null | wc -l) -ne 0 ]; then
-    extension="tar.bz2"
-    if [ "$prog" = "dnsdist" ]; then
-      extension="tar.xz"
-    fi
+    extension="tar.xz"
     dst=${DESTDIR}/${prog}/${BUILDER_VERSION}
     mkdir -p ${dst}
     cp ${BUILDER_TMP}/${BUILDER_VERSION}/sdist/${prog}*.${extension} ${dst}
index 19986238c618c77ce1f99fcd4fb3d28dcdfe6d66..885e05d25839759a8cb33879875e4e6ed8641d06 100644 (file)
@@ -12,15 +12,19 @@ Provides: powerdns-recursor = %{version}-%{release}
 
 BuildRequires: clang
 BuildRequires: lld
+BuildRequires: ninja-build
 
+%if 0%{?rhel} < 9
+BuildRequires: boost1.78-devel
+%else
 BuildRequires: boost-devel
+%endif
 BuildRequires: fstrm-devel
 BuildRequires: hostname
 BuildRequires: libcap-devel
 BuildRequires: libcurl-devel
 BuildRequires: libsodium-devel
 BuildRequires: net-snmp-devel
-BuildRequires: ninja-build
 BuildRequires: openssl-devel
 BuildRequires: systemd
 BuildRequires: systemd-devel
@@ -44,7 +48,6 @@ Requires(pre): shadow-utils
 PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
 package if you need a dns cache for your network.
 
-
 %prep
 %autosetup -p1 -n %{name}-%{getenv:BUILDER_VERSION}
 
@@ -56,6 +59,10 @@ package if you need a dns cache for your network.
 %endif
 
 %build
+%if 0%{?rhel} < 9
+export BOOST_INCLUDEDIR=/usr/include/boost1.78
+export BOOST_LIBRARYDIR=/usr/lib64/boost1.78
+%endif
 # We need to build with LLVM/clang to be able to use LTO, since we are linking against a static Rust library built with LLVM
 export CC=clang
 export CXX=clang++
@@ -74,8 +81,8 @@ export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1"
 %else
 %define stack_clash_protection -fstack-clash-protection
 %endif
-export CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -gdwarf-4"
-export CXXFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -gdwarf-4"
+export CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables %{stack_clash_protection} %{cf_protection} -gdwarf-4"
+export CXXFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables %{stack_clash_protection} %{cf_protection} -gdwarf-4"
 %endif
 
 # Note that the RPM meson macro "helpfully" sets