- ubuntu-kinetic
- ubuntu-lunar
- debian-bookworm
+ - amazon-2023
fail-fast: false
steps:
- uses: actions/checkout@v3
--- /dev/null
+# 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
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
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
--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
--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
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
%{_mandir}/man1/*
%dir %{_sysconfdir}/dnsdist
%config(noreplace) %{_sysconfdir}/%{name}/dnsdist.conf
-/lib/systemd/system/dnsdist*
+%{_unitdir}/dnsdist*
Provides: powerdns-recursor = %{version}-%{release}
-%if 0%{?rhel} < 8
+%if 0%{?rhel} < 8 && 0%{?amzn} != 2023
BuildRequires: boost169-devel
%else
BuildRequires: boost-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
%configure \
--enable-option-checking=fatal \
--sysconfdir=%{_sysconfdir}/%{name} \
- --with-libsodium \
- --with-net-snmp \
--disable-silent-rules \
--disable-static \
--enable-unit-tests \
--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}
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
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
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
--with-lua=%{lua_implementation} \
--with-dynmodules='%{backends}' \
--enable-tools \
+%if 0%{?amzn} != 2023
--with-libsodium \
+%endif
%if 0%{?amzn} != 2
--enable-ixfrdist \
%endif