Compare commits

...

No commits in common. "c8-beta" and "c10s" have entirely different histories.

14 changed files with 390 additions and 95 deletions

View File

@ -1,2 +0,0 @@
bb8ff7cbd83800f0043d7320a70f20d1cbde8a1a SOURCES/aardvark-dns-v1.1.0-vendor.tar.gz
9971b328f307ecf11ba8a42c0988219565aa135a SOURCES/v1.1.0.tar.gz

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/aardvark-dns-v1.1.0-vendor.tar.gz
SOURCES/v1.1.0.tar.gz
/*.tar.*

158
.packit.yaml Normal file
View File

@ -0,0 +1,158 @@
---
# See the documentation for more information:
# https://packit.dev/docs/configuration/
downstream_package_name: aardvark-dns
upstream_tag_template: v{version}
# These files get synced from upstream to downstream (Fedora / CentOS Stream) on every
# propose-downstream job. This is done so tests maintained upstream can be run
# downstream in Zuul CI and Bodhi.
# Ref: https://packit.dev/docs/configuration#files_to_sync
files_to_sync:
- src: rpm/gating.yaml
dest: gating.yaml
delete: true
- src: plans/
dest: plans/
delete: true
- src: .fmf/
dest: .fmf/
delete: true
- .packit.yaml
packages:
aardvark-dns-fedora:
pkg_tool: fedpkg
specfile_path: rpm/aardvark-dns.spec
aardvark-dns-centos:
pkg_tool: centpkg
specfile_path: rpm/aardvark-dns.spec
aardvark-dns-rhel:
specfile_path: rpm/aardvark-dns.spec
srpm_build_deps:
- cargo
- make
- openssl-devel
jobs:
- job: copr_build
trigger: pull_request
packages: [aardvark-dns-fedora]
notifications: &copr_build_failure_notification
failure_comment:
message: "Ephemeral COPR build failed. @containers/packit-build please check."
targets:
fedora-all-x86_64: {}
fedora-all-aarch64: {}
fedora-eln-x86_64:
additional_repos:
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/x86_64/"
fedora-eln-aarch64:
additional_repos:
- "https://kojipkgs.fedoraproject.org/repos/eln-build/latest/aarch64/"
enable_net: true
- job: copr_build
trigger: pull_request
packages: [aardvark-dns-centos]
notifications: *copr_build_failure_notification
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10-x86_64
- centos-stream-10-aarch64
enable_net: true
- job: copr_build
trigger: pull_request
packages: [aardvark-dns-rhel]
notifications: *copr_build_failure_notification
targets:
- epel-9-x86_64
- epel-9-aarch64
enable_net: true
# Run on commit to main branch
- job: copr_build
trigger: commit
packages: [aardvark-dns-fedora]
notifications:
failure_comment:
message: "podman-next COPR build failed. @containers/packit-build please check."
branch: main
owner: rhcontainerbot
project: podman-next
enable_net: true
# Unit tests on Fedora
- job: tests
trigger: pull_request
packages: [aardvark-dns-fedora]
notifications: &test_failure_notification
failure_comment:
message: "Tests failed. @containers/packit-build please check."
targets:
- fedora-all-x86_64
- fedora-all-aarch64
# Unit tests on CentOS Stream
- job: tests
trigger: pull_request
packages: [aardvark-dns-centos]
notifications: *test_failure_notification
targets:
- centos-stream-9-x86_64
- centos-stream-9-aarch64
- centos-stream-10-x86_64
- centos-stream-10-aarch64
# Unit tests on RHEL
- job: tests
trigger: pull_request
packages: [aardvark-dns-rhel]
notifications: *test_failure_notification
use_internal_tf: true
targets:
epel-9-aarch64:
distros: [RHEL-9-Nightly,RHEL-9.4.0-Nightly]
epel-9-x86_64:
distros: [RHEL-9-Nightly,RHEL-9.4.0-Nightly]
# NOTE: Need to use centos-stream-10 until RHEL-10/EPEL-10 copr targets
# are available
# TODO: iptables kernel module is not available on rhel10.
# Enable these after netavark default is switched to nftables.
#centos-stream-10-aarch64:
# distros: [RHEL-10-Beta-Nightly]
#centos-stream-10-x86_64:
# distros: [RHEL-10-Beta-Nightly]
# Sync to Fedora
- job: propose_downstream
trigger: release
packages: [aardvark-dns-fedora]
update_release: false
dist_git_branches:
- fedora-all
# Sync to CentOS Stream
- job: propose_downstream
trigger: release
packages: [aardvark-dns-centos]
update_release: false
dist_git_branches:
- c10s
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
# NOTE: Bodhi update tasks are disabled to allow netavark and aardvark-dns X.Y
# builds in a single manual bodhi update. Leaving this commented out
# but not deleted so it's not forgotten.
#- job: bodhi_update
#trigger: commit
#dist_git_branches:
#- fedora-branched # rawhide updates are created automatically

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# aardvark-dns
The aardvark-dns package

3
README.packit Normal file
View File

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.100.2.

View File

@ -1,26 +0,0 @@
From a34a32a9faea832f378f67d5121f430d0b96a925 Mon Sep 17 00:00:00 2001
From: Aditya R <arajan@redhat.com>
Date: Tue, 23 Aug 2022 22:23:48 +0530
Subject: [PATCH] makefile: remove windows specific libaries from vendor
Modify `vendor-rm-windows` to remove windows specific libaries from
vendor directory
Signed-off-by: Aditya R <arajan@redhat.com>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 411203a..75ba52d 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,8 @@ vendor: ## vendor everything into vendor/
vendor-rm-windows:
if [ -d "vendor/winapi" ]; then \
rm -fr vendor/winapi*gnu*/lib/*.a; \
+ rm -fr vendor/windows*/lib/*.a; \
+ rm -fr vendor/windows*/lib/*.lib; \
fi
.PHONY: vendor-tarball

View File

@ -1,65 +0,0 @@
# debuginfo doesn't work yet
%global debug_package %{nil}
Epoch: 2
Name: aardvark-dns
Version: 1.1.0
License: ASL 2.0 and BSD and MIT
Release: 4%{?dist}
ExclusiveArch: %{rust_arches}
Summary: Authoritative DNS server for A/AAAA container records
URL: https://github.com/containers/aardvark-dns
Patch0: https://patch-diff.githubusercontent.com/raw/containers/aardvark-dns/pull/201.patch
Source0: %{url}/archive/v%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
BuildRequires: cargo
BuildRequires: git-core
BuildRequires: make
BuildRequires: rust-srpm-macros
%description
%{summary}
Forwards other request to configured resolvers.
Read more about configuration in `src/backend/mod.rs`.
%prep
%autosetup -Sgit
tar fx %{SOURCE1}
mkdir -p .cargo
cat >.cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build
%{__make} build
%install
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
%files
%license LICENSE
%dir %{_libexecdir}/podman
%{_libexecdir}/podman/%{name}
%changelog
* Wed Aug 24 2022 Jindrich Novy <jnovy@redhat.com> - 2:1.1.0-4
- remove windows binaries and regenerate vendor tarball
- Related: #2061390
* Tue Aug 09 2022 Jindrich Novy <jnovy@redhat.com> - 2:1.1.0-3
- add gating.yaml
- Related: #2061390
* Thu Aug 04 2022 Jindrich Novy <jnovy@redhat.com> - 2:1.1.0-2
- bump Epoch to preserve upgrade path
- Related: #2061390
* Wed Aug 3 2022 Jindrich Novy <jnovy@redhat.com> 1.1.0-1
- initial import
- Related: #2061390

139
aardvark-dns.spec Normal file
View File

@ -0,0 +1,139 @@
# trust-dns-{client,server} not available
# using vendored deps
%global with_debug 1
%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
Name: aardvark-dns
%if %{defined copr_username}
Epoch: 102
%else
Epoch: 2
%endif
# DO NOT TOUCH the Version string!
# The TRUE source of this specfile is:
# https://github.com/containers/podman/blob/main/rpm/podman.spec
# If that's what you're reading, Version must be 0, and will be updated by Packit for
# copr and koji builds.
# If you're reading this on dist-git, the version is automatically filled in by Packit.
Version: 1.14.0
# The `AND` needs to be uppercase in the License for SPDX compatibility
License: Apache-2.0 AND MIT AND Zlib
Release: 2%{?dist}
%if %{defined golang_arches_future}
ExclusiveArch: %{golang_arches_future}
%else
ExclusiveArch: aarch64 ppc64le s390x x86_64
%endif
Summary: Authoritative DNS server for A/AAAA container records
URL: https://github.com/containers/%{name}
# Tarballs fetched from upstream's release page
Source0: %{url}/archive/v%{version}.tar.gz
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
BuildRequires: cargo
BuildRequires: git-core
BuildRequires: make
%if %{defined rhel}
# rust-toolset requires the `local` repo enabled on non-koji ELN build environments
BuildRequires: rust-toolset
%else
BuildRequires: rust-packaging
BuildRequires: rust-srpm-macros
%endif
%description
%{summary}
Forwards other request to configured resolvers.
Read more about configuration in `src/backend/mod.rs`.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: bats
Requires: bind-utils
Requires: iptables
Requires: jq
Requires: make
Requires: netavark
Requires: nftables
Requires: nmap-ncat
Requires: dnsmasq
%description tests
%{summary}
This package contains system tests for %{name}. This is only intended to be
used for distro gating tests. End user / customer usecases not supported.
%prep
%autosetup -Sgit %{name}-%{version}
# Following steps are only required on environments like koji which have no
# network access and thus depend on the vendored tarball. Copr pulls
# dependencies directly from the network.
%if !%{defined copr_username}
tar fx %{SOURCE1}
%if 0%{?fedora} || 0%{?rhel} >= 10
%cargo_prep -v vendor
%else
%cargo_prep -V 1
%endif
%endif
%build
%{__make} CARGO="%{__cargo}" build
%if (0%{?fedora} || 0%{?rhel} >= 10) && !%{defined copr_username}
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
%cargo_vendor_manifest
%endif
%install
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
%{__install} -d -p %{buildroot}%{_datadir}/%{name}/test
%{__cp} -rp test/* %{buildroot}%{_datadir}/%{name}/test/
%{__rm} -rf %{buildroot}%{_datadir}/%{name}/test/tmt/
# Placeholder check to silence rpmlint warning
%check
%files
%license LICENSE
%if (0%{?fedora} || 0%{?rhel} >= 10) && !%{defined copr_username}
%license LICENSE.dependencies
%license cargo-vendor.txt
%endif
%dir %{_libexecdir}/podman
%{_libexecdir}/podman/%{name}
%files tests
%{_datadir}/%{name}/test
%changelog
* Thu Feb 27 2025 Lokesh Mandvekar <lsm5@fedoraproject.org> - 2:1.14.0-2
- rebuilt to try TMT tests in osci
- Resolves: RHEL-80817
* Mon Feb 10 2025 Jindrich Novy <jnovy@redhat.com> - 2:1.14.0-1
- update to https://github.com/containers/aardvark-dns/releases/tag/v1.14.0
- Related: RHEL-58990
* Wed Nov 13 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.13.1-1
- update to https://github.com/containers/aardvark-dns/releases/tag/v1.13.1
- Related: RHEL-58990
* Wed Oct 30 2024 Jindrich Novy <jnovy@redhat.com> - 2:1.13.0-1
- update to https://github.com/containers/aardvark-dns/releases/tag/v1.13.0
- Resolves: RHEL-65320
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2:1.12.2-2
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018

16
gating.yaml Normal file
View File

@ -0,0 +1,16 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_stable
- bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

33
plans/main.fmf Normal file
View File

@ -0,0 +1,33 @@
discover:
how: fmf
execute:
how: tmt
prepare:
- when: distro == centos-stream or distro == rhel
how: shell
script: |
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm --eval '%{?rhel}').noarch.rpm
dnf -y config-manager --set-enabled epel
order: 10
- when: initiator == packit
how: shell
script: |
COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo"
if compgen -G $COPR_REPO_FILE > /dev/null; then
sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE
fi
dnf -y upgrade --allowerasing
order: 20
/no-rpm:
summary: Run tests independent of rpm
discover+:
filter: tag:no-rpm
adjust+:
- enabled: false
when: initiator is not defined or initiator != packit
/rpm:
summary: Run tests on the rpm
discover+:
filter: tag:rpm

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (v1.14.0.tar.gz) = 0300c474bb748063bf96488c06920df15ade525a8ee288446d3f30c3cffdccd687744efbb76e54a6b2213c38c02b00400ad79459bd78e8721556ff8dcdc1df8e
SHA512 (aardvark-dns-v1.14.0-vendor.tar.gz) = 0d738d0a737bfc9b6b2fe728de343a6a91c6e197d888fd37c0859b831b05f8c92efce13c268fc8f31a09bb78d43f4330230a0454744523df5a4fa96498ca3dac

26
test/tmt/main.fmf Normal file
View File

@ -0,0 +1,26 @@
/validate:
tag: [ no-rpm, validate ]
summary: Validate test
test: make -C ../.. validate
require:
- clippy
- rustfmt
/unit:
tag: [ no-rpm, unit ]
summary: Unit tests
test: make -C ../.. unit
require:
- cargo
/integration:
tag: [ rpm, integration ]
summary: Integration tests
test: bash test_integration.sh
environment:
AARDVARK: /usr/libexec/podman/aardvark-dns
require:
- aardvark-dns-tests
adjust:
duration: 10m
when: arch == aarch64

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -exo pipefail
rpm -q aardvark-dns aardvark-dns-tests netavark
cd /usr/share/aardvark-dns/
bats test/