]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
builder: add amazon-2023 target 12684/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 21 Mar 2023 14:32:06 +0000 (15:32 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 24 Mar 2023 13:54:04 +0000 (14:54 +0100)
.github/workflows/builder.yml
builder-support/dockerfiles/Dockerfile.target.amazon-2023 [new file with mode: 0644]
builder-support/specs/dnsdist.spec
builder-support/specs/pdns-recursor.spec
builder-support/specs/pdns.spec

index f457a22f7ffb571037fa23e4b72b0614283b6aa3..8823b25c22db4be73814ac814c772fc8255b3309 100644 (file)
@@ -26,6 +26,7 @@ jobs:
           - ubuntu-kinetic
           - ubuntu-lunar
           - debian-bookworm
+          - amazon-2023
       fail-fast: false
     steps:
       - uses: actions/checkout@v3
diff --git a/builder-support/dockerfiles/Dockerfile.target.amazon-2023 b/builder-support/dockerfiles/Dockerfile.target.amazon-2023
new file mode 100644 (file)
index 0000000..f47d6d7
--- /dev/null
@@ -0,0 +1,14 @@
+# First do the source builds
+@INCLUDE Dockerfile.target.sdist
+
+# This defines the distribution base layer
+# Put only the bare minimum of common commands here, without dev tools
+FROM amazonlinux:2023 as dist-base
+ARG BUILDER_CACHE_BUSTER=
+
+# 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
index 68b3e0dab1f28047273d4f4ea0570f9416af114f..a60c6118153a58519a429a7f0d43a66bd4e60196 100644 (file)
@@ -17,18 +17,17 @@ BuildRequires: systemd-units
 BuildRequires: systemd-devel
 %endif
 
-%if 0%{?rhel} < 8
+%if 0%{?rhel} < 8 && 0%{?amzn} != 2023
 BuildRequires: boost169-devel
 %else
 BuildRequires: boost-devel
 %endif
 
-%if 0%{?rhel} >= 7
+%if 0%{?rhel} >= 7 || 0%{?amzn} == 2023
 BuildRequires: gnutls-devel
 BuildRequires: libcap-devel
 BuildRequires: libnghttp2-devel
 BuildRequires: lmdb-devel
-BuildRequires: libsodium-devel
 %ifarch aarch64
 BuildRequires: lua-devel
 %define lua_implementation lua
@@ -36,19 +35,22 @@ BuildRequires: lua-devel
 BuildRequires: luajit-devel
 %define lua_implementation luajit
 %endif
-BuildRequires: net-snmp-devel
 BuildRequires: re2-devel
 BuildRequires: systemd
 BuildRequires: systemd-devel
 BuildRequires: systemd-units
 BuildRequires: tinycdb-devel
+%if 0%{?amzn} != 2023
+BuildRequires: libsodium-devel
+BuildRequires: net-snmp-devel
+%endif
 %endif
 
 %if 0%{?suse_version}
 Requires(pre): shadow
 %systemd_requires
 %endif
-%if 0%{?rhel} >= 7
+%if 0%{?rhel} >= 7 || 0%{?amzn} == 2023
 Requires(pre): shadow-utils
 BuildRequires: fstrm-devel
 %systemd_requires
@@ -85,7 +87,7 @@ export RANLIB=gcc-ranlib
   --disable-dnscrypt \
   --without-libsodium \
   --without-re2 \
-  --enable-systemd --with-systemd=/lib/systemd/system \
+  --enable-systemd --with-systemd=%{_unitdir} \
   --without-net-snmp
 %endif
 %if 0%{?rhel} >= 7
@@ -96,7 +98,7 @@ export RANLIB=gcc-ranlib
   --with-libsodium \
   --enable-dnscrypt \
   --enable-dns-over-https \
-  --enable-systemd --with-systemd=/lib/systemd/system \
+  --enable-systemd --with-systemd=%{_unitdir} \
   --with-re2 \
   --with-net-snmp \
   PKG_CONFIG_PATH=/opt/lib64/pkgconfig
@@ -112,8 +114,8 @@ make %{?_smp_mflags} check || (cat test-suite.log && false)
 install -d %{buildroot}/%{_sysconfdir}/dnsdist
 %{__mv} %{buildroot}%{_sysconfdir}/dnsdist/dnsdist.conf-dist %{buildroot}%{_sysconfdir}/dnsdist/dnsdist.conf
 chmod 0640 %{buildroot}/%{_sysconfdir}/dnsdist/dnsdist.conf
-sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/lib/systemd/system/dnsdist.service
-sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/lib/systemd/system/dnsdist@.service
+sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/%{_unitdir}/dnsdist.service
+sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/%{_unitdir}/dnsdist@.service
 
 %pre
 getent group dnsdist >/dev/null || groupadd -r dnsdist
@@ -154,4 +156,4 @@ systemctl daemon-reload ||:
 %{_mandir}/man1/*
 %dir %{_sysconfdir}/dnsdist
 %config(noreplace) %{_sysconfdir}/%{name}/dnsdist.conf
-/lib/systemd/system/dnsdist*
+%{_unitdir}/dnsdist*
index ace97b02029e82d0369dcf53230e663d6c0388c7..9916738a402e428e248e0a02cbcc39a183e6e27f 100644 (file)
@@ -9,7 +9,7 @@ Source0: %{name}-%{getenv:BUILDER_VERSION}.tar.bz2
 
 Provides: powerdns-recursor = %{version}-%{release}
 
-%if 0%{?rhel} < 8
+%if 0%{?rhel} < 8 && 0%{?amzn} != 2023
 BuildRequires: boost169-devel
 %else
 BuildRequires: boost-devel
@@ -18,11 +18,14 @@ BuildRequires: libcap-devel
 BuildRequires: systemd
 BuildRequires: systemd-devel
 BuildRequires: openssl-devel
-BuildRequires: net-snmp-devel
-BuildRequires: libsodium-devel
 BuildRequires: fstrm-devel
 BuildRequires: libcurl-devel
 
+%if 0%{?amzn} != 2023
+BuildRequires: net-snmp-devel
+BuildRequires: libsodium-devel
+%endif
+
 %ifarch aarch64
 BuildRequires: lua-devel
 %define lua_implementation lua
@@ -55,8 +58,6 @@ export LDFLAGS=-L/usr/lib64/boost169
 %configure \
     --enable-option-checking=fatal \
     --sysconfdir=%{_sysconfdir}/%{name} \
-    --with-libsodium \
-    --with-net-snmp \
     --disable-silent-rules \
     --disable-static \
     --enable-unit-tests \
@@ -64,6 +65,10 @@ export LDFLAGS=-L/usr/lib64/boost169
     --enable-dnstap \
     --with-libcap \
     --with-lua=%{lua_implementation} \
+%if 0%{?amzn} != 2023
+    --with-libsodium \
+    --with-net-snmp \
+%endif
     --enable-systemd --with-systemd=%{_unitdir}
 
 make %{?_smp_mflags}
index 9493e6f45cb2507ec2e1e16b28a128cd687c9f48..9f265eda1d543b040e40aa13cb45315941d6dd7a 100644 (file)
@@ -20,15 +20,18 @@ BuildRequires: systemd-devel
 BuildRequires: krb5-devel
 BuildRequires: p11-kit-devel
 BuildRequires: libcurl-devel
-%if 0%{?rhel} < 8
+%if 0%{?rhel} < 8 && 0%{?amzn} != 2023
 BuildRequires: boost169-devel
 %else
 BuildRequires: boost-devel
 %endif
-BuildRequires: libsodium-devel
 BuildRequires: bison
 BuildRequires: openssl-devel
 
+%if 0%{?amzn} != 2023
+BuildRequires: libsodium-devel
+%endif
+
 Requires(pre): shadow-utils
 
 %ifarch aarch64
@@ -59,7 +62,7 @@ This package contains the extra tools for %{name}
 Summary: MySQL backend for %{name}
 Group: System Environment/Daemons
 Requires: %{name}%{?_isa} = %{version}-%{release}
-%if 0%{?rhel} < 8
+%if 0%{?rhel} < 8 && 0%{?amzn} != 2023
 BuildRequires: mysql-devel
 %else
 BuildRequires: mariadb-connector-c-devel
@@ -141,7 +144,7 @@ Summary: Geo backend for %{name}
 Group: System Environment/Daemons
 Requires: %{name}%{?_isa} = %{version}-%{release}
 BuildRequires: yaml-cpp-devel
-%if 0%{?rhel} < 9
+%if 0%{?rhel} < 9 && 0%{?amzn} != 2023
 BuildRequires: geoip-devel
 %endif
 BuildRequires: libmaxminddb-devel
@@ -203,7 +206,9 @@ export LDFLAGS=-L/usr/lib64/boost169
   --with-lua=%{lua_implementation} \
   --with-dynmodules='%{backends}' \
   --enable-tools \
+%if 0%{?amzn} != 2023
   --with-libsodium \
+%endif
 %if 0%{?amzn} != 2
   --enable-ixfrdist \
 %endif