add(root/iptables): new package
This commit is contained in:
parent
86a2faa6a6
commit
39b9dbc92f
|
@ -0,0 +1,16 @@
|
|||
TERMUX_PKG_HOMEPAGE=https://www.netfilter.org/projects/iptables
|
||||
TERMUX_PKG_DESCRIPTION="Program used to configure the Linux 2.4 and later kernel packet filtering ruleset"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.8.8
|
||||
TERMUX_PKG_SRCURL=https://www.netfilter.org/projects/iptables/files/iptables-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=71c75889dc710676631553eb1511da0177bbaaf1b551265b912d236c3f51859f
|
||||
TERMUX_PKG_DEPENDS="libmnl, libnftnl, libandroid-spawn"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--with-xt-lock-name=$TERMUX_PREFIX/var/run/xtables.lock
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export CFLAGS+=" -Dindex=strchr -Drindex=strrchr -D__STDC_FORMAT_MACROS=1"
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
--- ./extensions/libxt_cgroup.c.orig 2022-06-07 16:47:06.815050633 +0200
|
||||
+++ ./extensions/libxt_cgroup.c 2022-06-07 16:47:20.575322792 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
enum {
|
||||
O_CLASSID = 0,
|
||||
- O_PATH = 1,
|
||||
+ _O_PATH = 1,
|
||||
};
|
||||
|
||||
static void cgroup_help_v0(void)
|
||||
@@ -36,7 +36,7 @@
|
||||
static const struct xt_option_entry cgroup_opts_v1[] = {
|
||||
{
|
||||
.name = "path",
|
||||
- .id = O_PATH,
|
||||
+ .id = _O_PATH,
|
||||
.type = XTTYPE_STRING,
|
||||
.flags = XTOPT_INVERT | XTOPT_PUT,
|
||||
XTOPT_POINTER(struct xt_cgroup_info_v1, path)
|
||||
@@ -54,7 +54,7 @@
|
||||
static const struct xt_option_entry cgroup_opts_v2[] = {
|
||||
{
|
||||
.name = "path",
|
||||
- .id = O_PATH,
|
||||
+ .id = _O_PATH,
|
||||
.type = XTTYPE_STRING,
|
||||
.flags = XTOPT_INVERT | XTOPT_PUT,
|
||||
XTOPT_POINTER(struct xt_cgroup_info_v2, path)
|
||||
@@ -85,7 +85,7 @@
|
||||
xtables_option_parse(cb);
|
||||
|
||||
switch (cb->entry->id) {
|
||||
- case O_PATH:
|
||||
+ case _O_PATH:
|
||||
info->has_path = true;
|
||||
if (cb->invert)
|
||||
info->invert_path = true;
|
||||
@@ -105,7 +105,7 @@
|
||||
xtables_option_parse(cb);
|
||||
|
||||
switch (cb->entry->id) {
|
||||
- case O_PATH:
|
||||
+ case _O_PATH:
|
||||
info->has_path = true;
|
||||
if (cb->invert)
|
||||
info->invert_path = true;
|
|
@ -0,0 +1,10 @@
|
|||
--- ./iptables/Makefile.in.orig 2022-06-07 17:03:53.776982817 +0200
|
||||
+++ ./iptables/Makefile.in 2022-06-07 17:03:58.407070989 +0200
|
||||
@@ -1597,7 +1597,6 @@
|
||||
|
||||
# Using if..fi avoids an ugly "error (ignored)" message :)
|
||||
install-exec-hook:
|
||||
- -if test -z "${DESTDIR}"; then /sbin/ldconfig; fi;
|
||||
${INSTALL} -dm0755 "${DESTDIR}${bindir}";
|
||||
for i in ${vx_bin_links}; do ${LN_S} -f "${sbindir}/xtables-legacy-multi" "${DESTDIR}${bindir}/$$i"; done;
|
||||
for i in ${v4_sbin_links}; do ${LN_S} -f xtables-legacy-multi "${DESTDIR}${sbindir}/$$i"; done;
|
|
@ -0,0 +1,11 @@
|
|||
--- ./iptables/xtables-monitor.c.orig 2022-06-07 16:59:29.101977262 +0200
|
||||
+++ ./iptables/xtables-monitor.c 2022-06-07 16:59:18.748449786 +0200
|
||||
@@ -10,6 +10,8 @@
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
+#include <inttypes.h>
|
||||
+
|
||||
#include "config.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
Loading…
Reference in New Issue