2022-01-27 19:46:43 +00:00
|
|
|
# trust-dns-{client,server} not available
|
|
|
|
# using vendored deps
|
|
|
|
|
2023-06-29 13:57:44 +00:00
|
|
|
# RHEL doesn't include the package rust-packaging which provides %%__cargo macro, but EPEL
|
|
|
|
# does. So we set it separately here and skip rust-packaging dependency for RHEL.
|
|
|
|
# Buildability without EPEL is essential for packit builds.
|
|
|
|
# ELN doesn't need this.
|
|
|
|
%if %{defined rhel} && 0%{?rhel} < 10
|
|
|
|
%define __cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' %{_bindir}/cargo
|
|
|
|
%endif
|
|
|
|
|
2023-02-07 11:46:43 +00:00
|
|
|
%global with_debug 1
|
|
|
|
|
|
|
|
%if 0%{?with_debug}
|
|
|
|
%global _find_debuginfo_dwz_opts %{nil}
|
|
|
|
%global _dwz_low_mem_die_limit 0
|
|
|
|
%else
|
2022-01-27 19:46:43 +00:00
|
|
|
%global debug_package %{nil}
|
2023-02-07 11:46:43 +00:00
|
|
|
%endif
|
2022-02-03 15:13:41 +00:00
|
|
|
|
2023-06-29 13:57:44 +00:00
|
|
|
# copr_username is only set on copr environments owned by rhcontainerbot,
|
|
|
|
# not on other coprs or environments like koji.
|
|
|
|
%if %{defined copr_username} && "%{?copr_username}" == "rhcontainerbot"
|
|
|
|
%bcond_without copr
|
|
|
|
%else
|
|
|
|
%bcond_with copr
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# rhel 8 does not support %%autochangelog
|
|
|
|
%if %{defined rhel} && 0%{?rhel} <= 8
|
|
|
|
%bcond_without manual_changelog
|
|
|
|
%else
|
|
|
|
%bcond_with manual_changelog
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# rhel does not define %%{golang_arches_future}
|
|
|
|
%if %{defined fedora}
|
|
|
|
%bcond_without golang_arches_future
|
|
|
|
%else
|
|
|
|
%bcond_with golang_arches_future
|
|
|
|
%endif
|
2022-01-27 19:46:43 +00:00
|
|
|
|
|
|
|
Name: aardvark-dns
|
2023-06-29 13:57:44 +00:00
|
|
|
%if %{with copr}
|
|
|
|
Epoch: 102
|
|
|
|
%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.7.0
|
2023-08-22 13:10:59 +00:00
|
|
|
License: Apache-2.0 AND MIT AND Zlib
|
2022-02-03 15:13:41 +00:00
|
|
|
Release: %autorelease
|
2023-06-29 13:57:44 +00:00
|
|
|
%if %{with golang_arches_future}
|
2023-03-06 12:19:09 +00:00
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2023-06-29 13:57:44 +00:00
|
|
|
%else
|
|
|
|
ExclusiveArch: aarch64 ppc64le s390x x86_64
|
|
|
|
%endif
|
2022-01-27 19:46:43 +00:00
|
|
|
Summary: Authoritative DNS server for A/AAAA container records
|
|
|
|
URL: https://github.com/containers/%{name}
|
2022-10-04 14:34:23 +00:00
|
|
|
# Tarballs fetched from upstream's release page
|
2023-06-29 13:57:44 +00:00
|
|
|
Source0: %{url}/archive/v%{version}.tar.gz
|
|
|
|
Source1: %{url}/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz
|
2022-01-27 19:46:43 +00:00
|
|
|
BuildRequires: cargo
|
2022-02-03 15:13:41 +00:00
|
|
|
BuildRequires: git-core
|
2022-01-27 19:46:43 +00:00
|
|
|
BuildRequires: make
|
2023-06-29 13:57:44 +00:00
|
|
|
%if %{defined rhel}
|
|
|
|
BuildRequires: rust-toolset
|
|
|
|
%else
|
2023-02-07 11:56:00 +00:00
|
|
|
BuildRequires: rust-packaging
|
2022-01-27 19:46:43 +00:00
|
|
|
BuildRequires: rust-srpm-macros
|
2023-06-29 13:57:44 +00:00
|
|
|
%endif
|
|
|
|
# DO NOT DELETE BELOW LINE - used for updating downstream imports
|
|
|
|
# vendored libraries
|
|
|
|
|
2022-01-27 19:46:43 +00:00
|
|
|
%description
|
|
|
|
%{summary}
|
|
|
|
|
|
|
|
Forwards other request to configured resolvers.
|
|
|
|
Read more about configuration in `src/backend/mod.rs`.
|
|
|
|
|
|
|
|
%prep
|
2023-06-29 13:57:44 +00:00
|
|
|
%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 %{without copr}
|
2022-02-25 14:57:22 +00:00
|
|
|
tar fx %{SOURCE1}
|
|
|
|
mkdir -p .cargo
|
|
|
|
|
|
|
|
cat >.cargo/config << EOF
|
|
|
|
[source.crates-io]
|
|
|
|
replace-with = "vendored-sources"
|
|
|
|
|
|
|
|
[source.vendored-sources]
|
|
|
|
directory = "vendor"
|
|
|
|
EOF
|
2023-06-29 13:57:44 +00:00
|
|
|
%endif
|
2022-01-27 19:46:43 +00:00
|
|
|
|
|
|
|
%build
|
2023-06-29 13:57:44 +00:00
|
|
|
%{__make} CARGO="%{__cargo}" build
|
2022-01-27 19:46:43 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSE
|
|
|
|
%dir %{_libexecdir}/podman
|
|
|
|
%{_libexecdir}/podman/%{name}
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%autochangelog
|