commit a1f3d9bb1006a12658c37d68a1fb36b057da9b3a Author: Jan Palus <at...@pld-linux.org> Date: Thu Feb 2 17:36:21 2023 +0100
new docs.patch | 45 +++++++++++++++++++++++++++++++++++ netavark.spec | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) --- diff --git a/netavark.spec b/netavark.spec new file mode 100644 index 0000000..89a0b0c --- /dev/null +++ b/netavark.spec @@ -0,0 +1,76 @@ +Summary: Container network stack +Name: netavark +Version: 1.4.0 +Release: 1 +License: Apache v2.0 +Group: Applications/System +Source0: https://github.com/containers/netavark/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: b818749229983952abfcc5c172636609 +Source1: https://github.com/containers/netavark/releases/download/v%{version}/%{name}-v%{version}-vendor.tar.gz +# Source1-md5: 6f4d384c90c043cd9eff063b44d15ce9 +Patch0: docs.patch +URL: https://github.com/containers/netavark +BuildRequires: cargo +BuildRequires: mandown +BuildRequires: rpmbuild(macros) >= 2.004 +BuildRequires: rust +Suggests: aardvark-dns +ExclusiveArch: %{rust_arches} +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Netavark is a tool for configuring networking for Linux containers. +Its features include: +- Configuration of container networks via JSON configuration file +- Creation and management of required network interfaces, including + MACVLAN networks +- All required firewall configuration to perform NAT and port + forwarding as required for containers +- Support for iptables and firewalld at present, with support for + nftables planned in a future release +- Support for rootless containers +- Support for IPv4 and IPv6 +- Support for container DNS resolution via the aardvark-dns project + +%prep +%setup -q -a1 +%patch0 -p1 + +# use our offline registry +export CARGO_HOME="$(pwd)/.cargo" + +mkdir -p "$CARGO_HOME" +cat >.cargo/config <<EOF +[source.crates-io] +registry = 'https://github.com/rust-lang/crates.io-index' +replace-with = 'vendored-sources' + +[source.vendored-sources] +directory = '$PWD/vendor' +EOF + +%build +export CARGO_HOME="$(pwd)/.cargo" + +%cargo_build + +%{__make} -C docs + +%install +rm -rf $RPM_BUILD_ROOT +export CARGO_HOME="$(pwd)/.cargo" + +install -D %cargo_objdir/netavark $RPM_BUILD_ROOT%{_libexecdir}/podman/netavark + +%{__make} -C docs install \ + DESTDIR=$RPM_BUILD_ROOT \ + MANDIR="%{_mandir}" + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc README.md RELEASE_NOTES.md SECURITY.md +%attr(755,root,root) %{_libexecdir}/podman/netavark +%{_mandir}/man1/netavark.1* diff --git a/docs.patch b/docs.patch new file mode 100644 index 0000000..c94f9eb --- /dev/null +++ b/docs.patch @@ -0,0 +1,45 @@ +From 97e90a303051d19469ac474b8877620b1354168f Mon Sep 17 00:00:00 2001 +From: Paul Holzinger <pholz...@redhat.com> +Date: Wed, 14 Dec 2022 16:06:29 +0100 +Subject: [PATCH] fix make docs + +Regression caused by 011f899919c9. We only want to build actual man +pages of course and not general docs. +This commit fixes the wildcard target to only use the `.1.md` files +instead of all markdown files. +Also add the step to the validate target to make sure CI tests this +target. + +Fixes #524 + +Signed-off-by: Paul Holzinger <pholz...@redhat.com> +--- + Makefile | 1 + + docs/Makefile | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 93f1258e..abf61c0e 100644 +--- a/Makefile ++++ b/Makefile +@@ -101,6 +101,7 @@ integration: $(CARGO_TARGET_DIR) + validate: $(CARGO_TARGET_DIR) + cargo fmt --all -- --check + cargo clippy -p netavark -- -D warnings ++ $(MAKE) docs + + .PHONY: vendor-tarball + vendor-tarball: build install.cargo-vendor-filterer +diff --git a/docs/Makefile b/docs/Makefile +index 29a15131..112e0ab2 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -3,7 +3,7 @@ DATADIR ?= ${PREFIX}/share + MANDIR ?= $(DATADIR)/man + MANDOWN ?= $(shell export PATH; command -v mandown) + +-docs: $(patsubst %.md,%,$(wildcard *.md)) ++docs: $(patsubst %.md,%,$(wildcard *.1.md)) + + %.1: %.1.md + $(MANDOWN) $< > $@ ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/netavark.git/commitdiff/a1f3d9bb1006a12658c37d68a1fb36b057da9b3a _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit