FS#74559 - [miniupnpd] cannot build with nftables installed

Attached to Project: Community Packages
Opened by Yun Dou (dixyes) - Tuesday, 26 April 2022, 04:34 GMT
Last edited by Toolybird (Toolybird) - Monday, 01 May 2023, 22:21 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
miniupnpd cannot be built when nftables is installed (nft command exists) in the system.

see

- https://github.com/miniupnp/miniupnp/blob/6576eb611b670c4841cc65095914275d6be008b2/miniupnpd/configure#L379
- https://github.com/miniupnp/miniupnp/blob/6576eb611b670c4841cc65095914275d6be008b2/miniupnpd/netfilter/iptcrdr.c#L25
- https://github.com/archlinux/svntogit-community/blob/4aef5bd084cdc626c49f305cde6997bff40ea15d/trunk/PKGBUILD#L39

for reason

Additional info:
Version: miniupnpd 2.3.0-1, this may also affects versions before

Tons of errors like

netfilter/iptcrdr.c:55:33: error: unknown type name ‘iptc_handle_t’; did you mean ‘iptc_handle’?
55 | #define IPTC_HANDLE iptc_handle_t
| ^~~~~~~~~~~~~
netfilter/iptcrdr.c:144:9: note: in expansion of macro ‘IPTC_HANDLE’
144 | IPTC_HANDLE h;
| ^~~~~~~~~~~

will be dumped.

This fixes it:

--- PKGBUILD 2022-04-26 12:22:18.394028847 +0800
+++ PKGBUILD.new 2022-04-26 12:22:52.360694248 +0800
@@ -34,7 +34,8 @@
cd ${pkgname}-${pkgver}
./configure \
--ipv6 \
- --leasefile
+ --leasefile \
+ --firewall=iptables
CONFIG_OPTIONS="--ipv6 --leasefile" make -f Makefile.linux config.h
make -f Makefile.linux
}

by the way:

1. shall we add `--vendorcfg --igd2 --pcp-peer` options in configure?
2. shall we split miniupnpd into miniupnpd legacy and miniupnpd nft?

* link to upstream bug report, if any

Steps to reproduce:
pacman -S nftables
(at build dir) makepkg -Cf
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 01 May 2023, 22:21 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Toolybird (Toolybird) - Tuesday, 04 April 2023, 03:31 GMT
Upstream supply `Makefile.linux_nft' which builds fine with nft installed. We only support building in a clean chroot so this ticket seems somewhat bogus.

Loading...