* [PATCH nft 1/2] update INSTALL file
@ 2023-07-18 12:01 Pablo Neira Ayuso
2023-07-18 12:01 ` [PATCH nft 2/2] py: remove setup.py integration with autotools Pablo Neira Ayuso
2023-07-28 14:10 ` [PATCH nft 1/2] update INSTALL file Phil Sutter
0 siblings, 2 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2023-07-18 12:01 UTC (permalink / raw)
To: netfilter-devel; +Cc: arturo, jengelh
Update it to current library dependencies and existing options.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
INSTALL | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/INSTALL b/INSTALL
index a3f10c372d14..9a597057ae3e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installation instructions for nftables
Prerequisites
=============
- - standard glibc headers, gcc etc.
+ - build tooling: glibc headers, gcc, autotools, automake, libtool, pkg-config.
- libmnl: git://git.netfilter.org/libmnl.git
@@ -14,17 +14,15 @@ Installation instructions for nftables
- bison
- - libgmp
+ - libgmp: alternatively, see mini-gmp support below.
- - libreadline
-
- - pkg-config
-
- - libtool
+ - libreadline or libedit or linenoise: required by interactive command line
- optional: libxtables: required to interact with iptables-compat
- - optional: docbook2x: required for building man-page
+ - optional: libjansson: required to build JSON support
+
+ - optional: asciidoc: required for building man-page
Configuring and compiling
=========================
@@ -60,17 +58,36 @@ Installation instructions for nftables
For libxtables support to interact with the iptables-compat
utility.
- Suggested configuration options: --prefix=/ --datarootdir=/usr/share
+ --without-cli
+
+ To disable interactive command line support, ie. -i/--interactive.
+
+ --with-cli=readline
+
+ To enable interactive command line support with libreadline.
+
+ --with-cli=linenoise
+
+ To enable interactive command line support with linenoise.
+
+ --with-cli=editline
+
+ To enable interactive command line support with libedit.
+
+ --with-json
+
+ To enable JSON support, this requires libjansson.
Run "make" to compile nftables, "make install" to install it in the
configured paths.
- Other notes
+ Source code
===========
- The nftables kernel tree can be found at:
+ Netfilter's Linux kernel tree can be found at:
- git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nftables.git
+ git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git/
+ https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
The latest version of this code can be found at:
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH nft 2/2] py: remove setup.py integration with autotools
2023-07-18 12:01 [PATCH nft 1/2] update INSTALL file Pablo Neira Ayuso
@ 2023-07-18 12:01 ` Pablo Neira Ayuso
2023-07-28 13:02 ` Arturo Borrero Gonzalez
2023-07-28 14:10 ` Phil Sutter
2023-07-28 14:10 ` [PATCH nft 1/2] update INSTALL file Phil Sutter
1 sibling, 2 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2023-07-18 12:01 UTC (permalink / raw)
To: netfilter-devel; +Cc: arturo, jengelh
With Python distutils and setuptools going deprecated, remove
integration with autotools. This integration is causing issues
in modern environments.
Note that setup.py is still left in place under the py/ folder.
Update INSTALL file to refer to Python support and setup.py.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
INSTALL | 7 +++++++
Makefile.am | 6 ++----
configure.ac | 26 --------------------------
py/Makefile.am | 27 ---------------------------
4 files changed, 9 insertions(+), 57 deletions(-)
diff --git a/INSTALL b/INSTALL
index 9a597057ae3e..9b626745d7a4 100644
--- a/INSTALL
+++ b/INSTALL
@@ -81,6 +81,13 @@ Installation instructions for nftables
Run "make" to compile nftables, "make install" to install it in the
configured paths.
+ Python support
+ ==============
+
+ CPython bindings are available for nftables under the py/ folder.
+
+ setup.py is provided to install it.
+
Source code
===========
diff --git a/Makefile.am b/Makefile.am
index 72fb4e88012d..84c3c366b86a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,10 +4,8 @@ SUBDIRS = src \
include \
files \
doc \
- examples
-if HAVE_PYTHON
-SUBDIRS += py
-endif
+ examples\
+ py
EXTRA_DIST = tests \
files
diff --git a/configure.ac b/configure.ac
index adb782667438..b0201ac3528e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,25 +108,6 @@ AC_DEFINE([HAVE_LIBJANSSON], [1], [Define if you have libjansson])
])
AM_CONDITIONAL([BUILD_JSON], [test "x$with_json" != xno])
-AC_ARG_ENABLE(python,
- AS_HELP_STRING([--enable-python], [Enable python]),,[enable_python=check]
- )
-
-AC_ARG_WITH([python_bin],
- [AS_HELP_STRING([--with-python-bin], [Specify Python binary to use])],
- [PYTHON_BIN="$withval"], [AC_PATH_PROGS(PYTHON_BIN, python python2 python2.7 python3)]
- )
-
-AS_IF([test "x$PYTHON_BIN" = "x"], [
- AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])],
- [test "x$enable_python" = "xcheck"], [
- AC_MSG_WARN([Python not found, continuing anyway])
- enable_python=no
- ])
-])
-
-AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" != "no"])
-
AC_CONFIG_FILES([ \
Makefile \
libnftables.pc \
@@ -157,10 +138,3 @@ nft configuration:
enable man page: ${enable_man_doc}
libxtables support: ${with_xtables}
json output support: ${with_json}"
-
-AS_IF([test "$enable_python" != "no"], [
- echo " enable Python: yes (with $PYTHON_BIN)"
- ], [
- echo " enable Python: no"
- ]
- )
diff --git a/py/Makefile.am b/py/Makefile.am
index 215ecd9e4751..f10ae360599f 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -1,28 +1 @@
EXTRA_DIST = setup.py __init__.py nftables.py schema.json
-
-all-local:
- cd $(srcdir) && \
- $(PYTHON_BIN) setup.py build --build-base $(abs_builddir)
-
-install-exec-local:
- cd $(srcdir) && \
- $(PYTHON_BIN) setup.py build --build-base $(abs_builddir) \
- install --prefix $(DESTDIR)$(prefix)
-
-uninstall-local:
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables-[0-9]*.egg-info
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables-[0-9]*.egg-info
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/site-packages/nftables-[0-9]*.egg
- rm -rf $(DESTDIR)$(prefix)/lib*/python*/dist-packages/nftables-[0-9]*.egg
-
-clean-local:
- cd $(srcdir) && \
- $(PYTHON_BIN) setup.py clean \
- --build-base $(abs_builddir)
- rm -rf scripts-* lib* build dist bdist.* nftables.egg-info
- find . -name \*.pyc -delete
-
-distclean-local:
- rm -f version
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH nft 2/2] py: remove setup.py integration with autotools
2023-07-18 12:01 ` [PATCH nft 2/2] py: remove setup.py integration with autotools Pablo Neira Ayuso
@ 2023-07-28 13:02 ` Arturo Borrero Gonzalez
2023-07-28 14:10 ` Phil Sutter
1 sibling, 0 replies; 5+ messages in thread
From: Arturo Borrero Gonzalez @ 2023-07-28 13:02 UTC (permalink / raw)
To: Pablo Neira Ayuso, netfilter-devel; +Cc: jengelh
On 7/18/23 14:01, Pablo Neira Ayuso wrote:
> With Python distutils and setuptools going deprecated, remove
> integration with autotools. This integration is causing issues
> in modern environments.
>
> Note that setup.py is still left in place under the py/ folder.
>
> Update INSTALL file to refer to Python support and setup.py.
>
> Signed-off-by: Pablo Neira Ayuso<pablo@netfilter.org>
> ---
> INSTALL | 7 +++++++
> Makefile.am | 6 ++----
> configure.ac | 26 --------------------------
> py/Makefile.am | 27 ---------------------------
> 4 files changed, 9 insertions(+), 57 deletions(-)
I think this patch can be merged.
regards.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft 1/2] update INSTALL file
2023-07-18 12:01 [PATCH nft 1/2] update INSTALL file Pablo Neira Ayuso
2023-07-18 12:01 ` [PATCH nft 2/2] py: remove setup.py integration with autotools Pablo Neira Ayuso
@ 2023-07-28 14:10 ` Phil Sutter
1 sibling, 0 replies; 5+ messages in thread
From: Phil Sutter @ 2023-07-28 14:10 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, arturo, jengelh
On Tue, Jul 18, 2023 at 02:01:18PM +0200, Pablo Neira Ayuso wrote:
> Update it to current library dependencies and existing options.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH nft 2/2] py: remove setup.py integration with autotools
2023-07-18 12:01 ` [PATCH nft 2/2] py: remove setup.py integration with autotools Pablo Neira Ayuso
2023-07-28 13:02 ` Arturo Borrero Gonzalez
@ 2023-07-28 14:10 ` Phil Sutter
1 sibling, 0 replies; 5+ messages in thread
From: Phil Sutter @ 2023-07-28 14:10 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, arturo, jengelh
On Tue, Jul 18, 2023 at 02:01:19PM +0200, Pablo Neira Ayuso wrote:
> With Python distutils and setuptools going deprecated, remove
> integration with autotools. This integration is causing issues
> in modern environments.
>
> Note that setup.py is still left in place under the py/ folder.
>
> Update INSTALL file to refer to Python support and setup.py.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-28 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 12:01 [PATCH nft 1/2] update INSTALL file Pablo Neira Ayuso
2023-07-18 12:01 ` [PATCH nft 2/2] py: remove setup.py integration with autotools Pablo Neira Ayuso
2023-07-28 13:02 ` Arturo Borrero Gonzalez
2023-07-28 14:10 ` Phil Sutter
2023-07-28 14:10 ` [PATCH nft 1/2] update INSTALL file Phil Sutter
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).