From: lethedata <lethedata@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] New package: miniupnpd-nftables
Date: Fri, 25 Oct 2024 06:11:36 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-52770@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
There is a new pull request by lethedata against master on the void-packages repository
https://github.com/lethedata/void-packages miniupnpd-nftables
https://github.com/void-linux/void-packages/pull/52770
New package: miniupnpd-nftables
Builds miniupnpd with nftables support rather than iptables
#### Testing the changes
- I tested the changes in this PR: **YES - Currently Testing**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
A patch file from https://github.com/void-linux/void-packages/pull/52770.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-miniupnpd-nftables-52770.patch --]
[-- Type: text/x-diff, Size: 5059 bytes --]
From 1f2ffe90ed65a2ab51fdb7ba395d99323f95b6cd Mon Sep 17 00:00:00 2001
From: Echo Nar <echo@lethedata.com>
Date: Thu, 24 Oct 2024 22:49:54 -0500
Subject: [PATCH] New package: miniupnpd-nftables
Builds miniupnpd with nftables support rather than iptables
---
.../miniupnpd-nftables/files/README.voidlinux | 3 ++
.../miniupnpd-nftables/files/miniupnpd/run | 4 ++
.../patches/fix-configure-script.patch | 11 ++++
srcpkgs/miniupnpd-nftables/template | 53 +++++++++++++++++++
srcpkgs/miniupnpd-nftables/update | 1 +
srcpkgs/miniupnpd/template | 1 +
6 files changed, 73 insertions(+)
create mode 100644 srcpkgs/miniupnpd-nftables/files/README.voidlinux
create mode 100644 srcpkgs/miniupnpd-nftables/files/miniupnpd/run
create mode 100644 srcpkgs/miniupnpd-nftables/patches/fix-configure-script.patch
create mode 100644 srcpkgs/miniupnpd-nftables/template
create mode 100644 srcpkgs/miniupnpd-nftables/update
diff --git a/srcpkgs/miniupnpd-nftables/files/README.voidlinux b/srcpkgs/miniupnpd-nftables/files/README.voidlinux
new file mode 100644
index 00000000000000..33e436a87d762f
--- /dev/null
+++ b/srcpkgs/miniupnpd-nftables/files/README.voidlinux
@@ -0,0 +1,3 @@
+Before running miniupnpd edit the scripts and configuration files in /etc/miniupnpd/.
+Load the iptables rules by executing /etc/miniupnpd/iptables_init.sh and/or
+/etc/miniupnpd/ip6tables_init.sh manually or adding them to /etc/sv/minidlnad/run.
diff --git a/srcpkgs/miniupnpd-nftables/files/miniupnpd/run b/srcpkgs/miniupnpd-nftables/files/miniupnpd/run
new file mode 100644
index 00000000000000..9634ae5d57610f
--- /dev/null
+++ b/srcpkgs/miniupnpd-nftables/files/miniupnpd/run
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec 2>&1
+exec miniupnpd ${OPTS:=-f /etc/miniupnpd/miniupnpd.conf}
diff --git a/srcpkgs/miniupnpd-nftables/patches/fix-configure-script.patch b/srcpkgs/miniupnpd-nftables/patches/fix-configure-script.patch
new file mode 100644
index 00000000000000..3836c3b1844141
--- /dev/null
+++ b/srcpkgs/miniupnpd-nftables/patches/fix-configure-script.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -49,7 +49,7 @@
+ --iptablespath=*)
+ IPTABLESPATH=$(echo $argv | cut -d= -f2) ;;
+ --getifaddrs) GETIFADDRS=1 ;;
+- --v6sockets-v6only) V6SOCKETS_ARE_V6ONLY="0"
++ --v6sockets-v6only) V6SOCKETS_ARE_V6ONLY="0" ;;
+ --host-os=*)
+ OS_NAME=$(echo $argv | cut -d= -f2) ;;
+ --host-os-version=*)
diff --git a/srcpkgs/miniupnpd-nftables/template b/srcpkgs/miniupnpd-nftables/template
new file mode 100644
index 00000000000000..54ec33405e16ef
--- /dev/null
+++ b/srcpkgs/miniupnpd-nftables/template
@@ -0,0 +1,53 @@
+# Template file for 'miniupnpd-nftables'
+pkgname=miniupnpd-nftables
+version=2.3.7
+revision=1
+build_style=configure
+configure_args="
+ --disable-fork
+ --ipv6
+ --igd2
+ --leasefile
+ --firewall=nftables"
+make_install_args="
+ INSTALLPREFIX=/usr
+ SBININSTALLDIR=/usr/bin"
+conf_files="
+ /etc/miniupnpd/*.conf
+ /etc/miniupnpd/*.sh"
+hostmakedepends="pkg-config"
+makedepends="libnfnetlink-devel libnftnl-devel openssl-devel"
+checkdepends="iproute2 nftables which"
+short_desc="Lightweight UPnP IGD daemon with nftables support"
+maintainer="Echo Nar <echo@lethedata.com>"
+license="BSD-3-Clause"
+homepage="http://miniupnp.free.fr"
+changelog="http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-${version}.tar.gz"
+distfiles="http://miniupnp.free.fr/files/miniupnpd-${version}.tar.gz"
+checksum=fbdd5501039730f04a8420ea2f8f54b7df63f9f04cde2dc67fa7371e80477bbe
+conflicts="miniupnpd"
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ makedepends+=" musl-legacy-compat"
+fi
+
+post_extract() {
+ vsed -i "${wrksrc}/configure" \
+ -e 's|LSB_RELEASE=.*|LSB_RELEASE=$(false)|' \
+ -e 's|V6SOCKETS_ARE_V6ONLY=.*|V6SOCKETS_ARE_V6ONLY="0"|'
+}
+
+
+post_configure() {
+ vsed -i "${wrksrc}/config.h" \
+ -e 's|^#define OS_URL.*$|#define OS_URL "https://voidlinux.org/"|g' \
+ -e 's|^#define OS_NAME.*$|#define OS_NAME "Void"|g' \
+ -e 's|^#define OS_VERSION.*$|#define OS_VERSION "Void"|g'
+}
+
+post_install() {
+ rm -rf "${DESTDIR}/etc/init.d"
+ vsv miniupnpd
+ vlicense LICENSE
+ vdoc "${FILESDIR}/README.voidlinux"
+}
diff --git a/srcpkgs/miniupnpd-nftables/update b/srcpkgs/miniupnpd-nftables/update
new file mode 100644
index 00000000000000..7096d869ff8a82
--- /dev/null
+++ b/srcpkgs/miniupnpd-nftables/update
@@ -0,0 +1 @@
+ignore="*.???????? 20[0123456789][0123456789]????"
diff --git a/srcpkgs/miniupnpd/template b/srcpkgs/miniupnpd/template
index aed8b309471986..dc865960291543 100644
--- a/srcpkgs/miniupnpd/template
+++ b/srcpkgs/miniupnpd/template
@@ -24,6 +24,7 @@ homepage="http://miniupnp.free.fr"
changelog="http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-${version}.tar.gz"
distfiles="http://miniupnp.free.fr/files/miniupnpd-${version}.tar.gz"
checksum=fbdd5501039730f04a8420ea2f8f54b7df63f9f04cde2dc67fa7371e80477bbe
+conflicts="miniupnpd-nftables"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
next reply other threads:[~2024-10-25 4:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 4:11 lethedata [this message]
2024-10-25 4:18 ` lethedata
2024-10-25 4:18 ` lethedata
2024-10-25 4:19 ` lethedata
2024-10-26 0:24 ` [PR PATCH] [Updated] " lethedata
2025-01-24 1:57 ` github-actions
2025-02-07 1:59 ` [PR PATCH] [Closed]: " github-actions
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-52770@inbox.vuxu.org \
--to=lethedata@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).