From f55e1e7ec1b2185a58911a0929c67ee158e50ed3 Mon Sep 17 00:00:00 2001 From: Packit Date: Thu, 29 Jun 2023 13:57:44 +0000 Subject: [PATCH] [packit] 1.7.0 upstream release Upstream tag: v1.7.0 Upstream commit: d27d3b39 --- .gitignore | 2 + .packit.yaml | 48 ++++++++++++++ README.packit | 3 + aardvark-dns.spec | 165 +++++++++++++++++----------------------------- sources | 4 +- 5 files changed, 114 insertions(+), 108 deletions(-) create mode 100644 .packit.yaml create mode 100644 README.packit diff --git a/.gitignore b/.gitignore index 0283e55..f6598e3 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ /v1.5.0.tar.gz /aardvark-dns-v1.6.0-vendor.tar.gz /v1.6.0.tar.gz +/v1.7.0.tar.gz +/aardvark-dns-v1.7.0-vendor.tar.gz diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..a4ed4b1 --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,48 @@ +--- +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +# COPR build targets can be found at: +# https://copr.fedorainfracloud.org/coprs/rhcontainerbot/packit-builds/ +# and +# https://copr.fedorainfracloud.org/coprs/rhcontainerbot/podman-next/ + +specfile_path: rpm/aardvark-dns.spec +upstream_tag_template: v{version} + +jobs: + - &copr + job: copr_build + trigger: pull_request + owner: rhcontainerbot + project: packit-builds + enable_net: true + srpm_build_deps: + - cargo + - make + - openssl-devel + + - <<: *copr + # Run on commit to main branch + trigger: commit + branch: main + project: podman-next + + - job: propose_downstream + trigger: release + update_release: false + dist_git_branches: + - fedora-all + actions: + pre-sync: + - "bash rpm/update-spec-provides.sh" + + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-all + + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-branched # rawhide updates are created automatically diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..101115f --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 0.77.0.post2+g06f877b. diff --git a/aardvark-dns.spec b/aardvark-dns.spec index c63f4ab..98dce4c 100644 --- a/aardvark-dns.spec +++ b/aardvark-dns.spec @@ -1,6 +1,14 @@ # trust-dns-{client,server} not available # using vendored deps +# 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 + %global with_debug 1 %if 0%{?with_debug} @@ -10,121 +18,63 @@ %global debug_package %{nil} %endif -%global built_tag v1.6.0 -%global built_tag_strip %(b=%{built_tag}; echo ${b:1}) -%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"}) +# 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 Name: aardvark-dns -Version: %{gen_version} +%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 License: Apache-2.0 and MIT and Zlib Release: %autorelease +%if %{with 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/%{built_tag}.tar.gz -Source1: %{url}/releases/download/%{built_tag}/%{name}-%{built_tag}-vendor.tar.gz +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} +BuildRequires: rust-toolset +%else BuildRequires: rust-packaging BuildRequires: rust-srpm-macros -# cargo tree --prefix none | awk '{print "Provides: bundled(crate("$1")) = "$2}' | sort | uniq -Provides: bundled(crate(anyhow)) = v1.0.70 -Provides: bundled(crate(async-broadcast)) = v0.5.1 -Provides: bundled(crate(async-trait)) = v0.1.56 -Provides: bundled(crate(atty)) = v0.2.14 -Provides: bundled(crate(autocfg)) = v1.1.0 -Provides: bundled(crate(bitflags)) = v1.3.2 -Provides: bundled(crate(bytes)) = v1.1.0 -Provides: bundled(crate(cfg-if)) = v1.0.0 -Provides: bundled(crate(chrono)) = v0.4.24 -Provides: bundled(crate(clap)) = v3.2.23 -Provides: bundled(crate(clap_derive)) = v3.2.18 -Provides: bundled(crate(clap_lex)) = v0.2.4 -Provides: bundled(crate(data-encoding)) = v2.3.2 -Provides: bundled(crate(endian-type)) = v0.1.2 -Provides: bundled(crate(enum-as-inner)) = v0.5.1 -Provides: bundled(crate(error-chain)) = v0.12.4 -Provides: bundled(crate(event-listener)) = v2.5.2 -Provides: bundled(crate(form_urlencoded)) = v1.0.1 -Provides: bundled(crate(futures-channel)) = v0.3.21 -Provides: bundled(crate(futures-core)) = v0.3.28 -Provides: bundled(crate(futures-executor)) = v0.3.21 -Provides: bundled(crate(futures-io)) = v0.3.21 -Provides: bundled(crate(futures-task)) = v0.3.28 -Provides: bundled(crate(futures-util)) = v0.3.28 -Provides: bundled(crate(getrandom)) = v0.2.7 -Provides: bundled(crate(hashbrown)) = v0.12.2 -Provides: bundled(crate(heck)) = v0.4.0 -Provides: bundled(crate(hostname)) = v0.3.1 -Provides: bundled(crate(iana-time-zone)) = v0.1.53 -Provides: bundled(crate(idna)) = v0.2.3 -Provides: bundled(crate(indexmap)) = v1.9.1 -Provides: bundled(crate(ipnet)) = v2.5.0 -Provides: bundled(crate(itoa)) = v1.0.2 -Provides: bundled(crate(lazy_static)) = v1.4.0 -Provides: bundled(crate(libc)) = v0.2.140 -Provides: bundled(crate(log)) = v0.4.17 -Provides: bundled(crate(match_cfg)) = v0.1.0 -Provides: bundled(crate(matches)) = v0.1.9 -Provides: bundled(crate(memoffset)) = v0.7.1 -Provides: bundled(crate(mio)) = v0.8.4 -Provides: bundled(crate(nibble_vec)) = v0.1.0 -Provides: bundled(crate(nix)) = v0.26.2 -Provides: bundled(crate(num-integer)) = v0.1.45 -Provides: bundled(crate(num-traits)) = v0.2.15 -Provides: bundled(crate(num_cpus)) = v1.13.1 -Provides: bundled(crate(num_threads)) = v0.1.6 -Provides: bundled(crate(once_cell)) = v1.13.0 -Provides: bundled(crate(os_str_bytes)) = v6.1.0 -Provides: bundled(crate(percent-encoding)) = v2.1.0 -Provides: bundled(crate(pin-project-lite)) = v0.2.9 -Provides: bundled(crate(pin-utils)) = v0.1.0 -Provides: bundled(crate(ppv-lite86)) = v0.2.16 -Provides: bundled(crate(proc-macro-error)) = v1.0.4 -Provides: bundled(crate(proc-macro-error-attr)) = v1.0.4 -Provides: bundled(crate(proc-macro2)) = v1.0.54 -Provides: bundled(crate(quick-error)) = v1.2.3 -Provides: bundled(crate(quote)) = v1.0.26 -Provides: bundled(crate(radix_trie)) = v0.2.1 -Provides: bundled(crate(rand)) = v0.8.5 -Provides: bundled(crate(rand_chacha)) = v0.3.1 -Provides: bundled(crate(rand_core)) = v0.6.3 -Provides: bundled(crate(resolv-conf)) = v0.7.0 -Provides: bundled(crate(serde)) = v1.0.139 -Provides: bundled(crate(serde_derive)) = v1.0.139 -Provides: bundled(crate(signal-hook)) = v0.3.15 -Provides: bundled(crate(signal-hook-registry)) = v1.4.0 -Provides: bundled(crate(slab)) = v0.4.6 -Provides: bundled(crate(smallvec)) = v1.9.0 -Provides: bundled(crate(socket2)) = v0.4.9 -Provides: bundled(crate(static_assertions)) = v1.1.0 -Provides: bundled(crate(strsim)) = v0.10.0 -Provides: bundled(crate(syn)) = v1.0.98 -Provides: bundled(crate(syn)) = v2.0.12 -Provides: bundled(crate(syslog)) = v6.0.1 -Provides: bundled(crate(termcolor)) = v1.1.3 -Provides: bundled(crate(textwrap)) = v0.16.0 -Provides: bundled(crate(thiserror)) = v1.0.31 -Provides: bundled(crate(thiserror-impl)) = v1.0.31 -Provides: bundled(crate(time)) = v0.3.11 -Provides: bundled(crate(tinyvec)) = v1.6.0 -Provides: bundled(crate(tinyvec_macros)) = v0.1.0 -Provides: bundled(crate(tokio)) = v1.27.0 -Provides: bundled(crate(tokio-macros)) = v2.0.0 -Provides: bundled(crate(toml)) = v0.5.9 -Provides: bundled(crate(tracing)) = v0.1.36 -Provides: bundled(crate(tracing-attributes)) = v0.1.22 -Provides: bundled(crate(tracing-core)) = v0.1.29 -Provides: bundled(crate(trust-dns-client)) = v0.22.0 -Provides: bundled(crate(trust-dns-proto)) = v0.22.0 -Provides: bundled(crate(trust-dns-server)) = v0.22.0 -Provides: bundled(crate(unicode-bidi)) = v0.3.8 -Provides: bundled(crate(unicode-ident)) = v1.0.1 -Provides: bundled(crate(unicode-normalization)) = v0.1.21 -Provides: bundled(crate(url)) = v2.2.2 -Provides: bundled(crate(version_check)) = v0.9.4 +%endif +# DO NOT DELETE BELOW LINE - used for updating downstream imports +# vendored libraries + %description %{summary} @@ -132,7 +82,11 @@ Forwards other request to configured resolvers. Read more about configuration in `src/backend/mod.rs`. %prep -%autosetup -Sgit %{name}-%{built_tag_strip} +%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} tar fx %{SOURCE1} mkdir -p .cargo @@ -143,11 +97,10 @@ replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" EOF +%endif %build -%{__cargo} build --release -mkdir -p bin -cp target/release/%{name} bin/ +%{__make} CARGO="%{__cargo}" build %install %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install diff --git a/sources b/sources index d84d5aa..3dd3bb8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (aardvark-dns-v1.6.0-vendor.tar.gz) = d852b794464c0597ea91a80779cde32dbc535366e9ab4c13e49d1e20f224fa6f1efe127af93bc21af49a0e11353f11d4d7b813a8415bfebd4cb609b1992c6359 -SHA512 (v1.6.0.tar.gz) = 699d65e426986204d9cddf04e88930ef59dca21ef5beb025dcad52e63a58421f8c8ee314d490b2f7b3f4a2d0df8444d4e706ca45b21153fc72f905b19e508090 +SHA512 (v1.7.0.tar.gz) = d829ac122f26f17ca44a41a48576ab8c4f9dd238bc52faee816833f63f9ff54e63f62610167e4619084263e61cdb1329c2e1d49f314c8b9e65e748df80fd5096 +SHA512 (aardvark-dns-v1.7.0-vendor.tar.gz) = 07d3ebc7504fc1e4c0fe9b5f3760bdbe9b4153678aae962c9e37a0097bee832b0e4e77fadfc475c82fa05ffaa1a04f53df8f92b63e23b09da05e5e2efaa07c94