From: Peter van Dijk Date: Tue, 21 Mar 2023 14:32:06 +0000 (+0100) Subject: builder: add amazon-2023 target X-Git-Tag: dnsdist-1.8.0~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12684%2Fhead;p=thirdparty%2Fpdns.git builder: add amazon-2023 target --- diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index f457a22f7f..8823b25c22 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -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 index 0000000000..f47d6d712c --- /dev/null +++ b/builder-support/dockerfiles/Dockerfile.target.amazon-2023 @@ -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 diff --git a/builder-support/specs/dnsdist.spec b/builder-support/specs/dnsdist.spec index 68b3e0dab1..a60c611815 100644 --- a/builder-support/specs/dnsdist.spec +++ b/builder-support/specs/dnsdist.spec @@ -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* diff --git a/builder-support/specs/pdns-recursor.spec b/builder-support/specs/pdns-recursor.spec index ace97b0202..9916738a40 100644 --- a/builder-support/specs/pdns-recursor.spec +++ b/builder-support/specs/pdns-recursor.spec @@ -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} diff --git a/builder-support/specs/pdns.spec b/builder-support/specs/pdns.spec index 9493e6f45c..9f265eda1d 100644 --- a/builder-support/specs/pdns.spec +++ b/builder-support/specs/pdns.spec @@ -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