* [PATCH 0/3] autotools conversion: forgotten Makefile.am, 'doc' and 'files'
@ 2014-11-12 16:41 Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/' Giorgio Dal Molin
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Giorgio Dal Molin @ 2014-11-12 16:41 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio Dal Molin
Here the reworked version of the autotools conversion patches:
- added a forgotten Makefile.am under 'include/linux/netfilter';
- autotools support for the 'doc' subdir;
- autotools support for the 'files' subdir;
Giorgio Dal Molin (3):
autotools conversion: added a missing 'Makefile.am' under
'include/linux/netfilter/'.
autotools conversion: added autotools support for the 'doc' subdir.
autotools conversion: added autotools support for the 'files' subdir.
Makefile.am | 4 +++-
configure.ac | 40 ++++++++++++++++++-------------------
doc/Makefile.am | 19 ++++++++++++++++++
doc/Makefile.in | 20 -------------------
files/Makefile.am | 1 +
files/Makefile.in | 5 -----
files/nftables/Makefile.am | 13 ++++++++++++
files/nftables/bridge-filter | 2 +-
files/nftables/inet-filter | 2 +-
files/nftables/ipv4-filter | 2 +-
files/nftables/ipv4-mangle | 2 +-
files/nftables/ipv4-nat | 2 +-
files/nftables/ipv6-filter | 2 +-
files/nftables/ipv6-mangle | 2 +-
files/nftables/ipv6-nat | 2 +-
include/linux/netfilter/Makefile.am | 5 +++++
16 files changed, 68 insertions(+), 55 deletions(-)
create mode 100644 doc/Makefile.am
delete mode 100644 doc/Makefile.in
create mode 100644 files/Makefile.am
delete mode 100644 files/Makefile.in
create mode 100644 files/nftables/Makefile.am
create mode 100644 include/linux/netfilter/Makefile.am
--
2.1.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/'.
2014-11-12 16:41 [PATCH 0/3] autotools conversion: forgotten Makefile.am, 'doc' and 'files' Giorgio Dal Molin
@ 2014-11-12 16:41 ` Giorgio Dal Molin
2014-11-12 20:40 ` Pablo Neira Ayuso
2014-11-12 16:41 ` [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir Giorgio Dal Molin
2 siblings, 1 reply; 7+ messages in thread
From: Giorgio Dal Molin @ 2014-11-12 16:41 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio Dal Molin
This was forgotten in the commit id: 85035b6c6a1618e7ba726fe6306c804fc1b6c4e8
Signed-off-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
---
include/linux/netfilter/Makefile.am | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 include/linux/netfilter/Makefile.am
diff --git a/include/linux/netfilter/Makefile.am b/include/linux/netfilter/Makefile.am
new file mode 100644
index 0000000..54b59b5
--- /dev/null
+++ b/include/linux/netfilter/Makefile.am
@@ -0,0 +1,5 @@
+noinst_HEADERS = nf_conntrack_common.h \
+ nf_conntrack_tuple_common.h \
+ nf_nat.h \
+ nf_tables.h \
+ nfnetlink.h
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir.
2014-11-12 16:41 [PATCH 0/3] autotools conversion: forgotten Makefile.am, 'doc' and 'files' Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/' Giorgio Dal Molin
@ 2014-11-12 16:41 ` Giorgio Dal Molin
2014-11-12 21:00 ` Pablo Neira Ayuso
2014-11-12 16:41 ` [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir Giorgio Dal Molin
2 siblings, 1 reply; 7+ messages in thread
From: Giorgio Dal Molin @ 2014-11-12 16:41 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio Dal Molin
'nft' documentation is originally contained in the XML file 'doc/nft.xml'.
Processing this file with the proper tools we can obtain a PDF document,
'nft.pdf', and a unix man page, 'nft.8'.
To produce the PDF we need the tool 'dblatex' (current release pypi.python.org/pypi/dblatex/0.3.5).
To produce the man page we use the tool 'docbook2man'; it is part of the
package 'docbook2X' (docbook2x.sourceforge.net). On some linux distributions
the tool can have slightly different names as 'docbook2x-man' or
'db2x_docbook2man' so we search for all three names and use the first
one found and issue the command:
# ${DB2MAN} --xinclude $<
Signed-off-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
---
Makefile.am | 3 ++-
configure.ac | 38 +++++++++++++++++---------------------
doc/Makefile.am | 19 +++++++++++++++++++
doc/Makefile.in | 20 --------------------
4 files changed, 38 insertions(+), 42 deletions(-)
create mode 100644 doc/Makefile.am
delete mode 100644 doc/Makefile.in
diff --git a/Makefile.am b/Makefile.am
index 8d301f6..b7fdc42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src \
- include
+ include \
+ doc
diff --git a/configure.ac b/configure.ac
index e71dced..7bbd86e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,29 +49,24 @@ then
exit 1
fi
-AC_CHECK_PROG(CONFIG_MAN1, [docbook2x-man], [y], [n])
-if test "$CONFIG_MAN1" == "y"
-then
- CONFIG_MAN=y
- DB2MAN=docbook2x-man
-else
- AC_CHECK_PROG(CONFIG_MAN2, [db2x_docbook2man], [y], [n])
- if test "$CONFIG_MAN2" == "y"
- then
- CONFIG_MAN=y
- DB2MAN=db2x_docbook2man
- else
- AC_MSG_WARN([docbookx2-man/db2x_docbook2man not found, no manpages will be built])
- fi
-fi
-AC_SUBST(CONFIG_MAN)
+AC_CHECK_PROG(DOCBOOK2X_MAN, [docbook2x-man], [docbook2x-man], [no])
+AC_CHECK_PROG(DOCBOOK2MAN, [docbook2man], [docbook2man], [no])
+AC_CHECK_PROG(DB2X_DOCBOOK2MAN, [db2x_docbook2man], [db2x_docbook2man], [no])
+AS_IF([test "$DOCBOOK2X_MAN" != "no"], [DB2MAN="$DOCBOOK2X_MAN"],
+ [AS_IF([test "$DOCBOOK2MAN" != "no"], [DB2MAN="$DOCBOOK2MAN"],
+ [AS_IF([test "$DB2X_DOCBOOK2MAN" != "no"], [DB2MAN="$DB2X_DOCBOOK2MAN"],
+ [AC_MSG_WARN([docbookx2-man/db2x_docbook2man not found, no manpages will be built])]
+ )]
+ )]
+)
AC_SUBST(DB2MAN)
+AM_CONDITIONAL([BUILD_MAN], [test -n "$DB2MAN"])
-AC_CHECK_PROG(CONFIG_PDF, dblatex, y, n)
-if test "$CONFIG_PDF" != "y"
-then
- AC_MSG_WARN([dblatex not found, no PDF manpages will be built])
-fi
+AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
+AS_IF([test "$DBLATEX" == "no"],
+ [AC_MSG_WARN([dblatex not found, no PDF manpages will be built])]
+)
+AM_CONDITIONAL([BUILD_PDF], [test "$DBLATEX" == "found"])
# Checks for libraries.
PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
@@ -125,6 +120,7 @@ AC_CONFIG_FILES([ \
include/Makefile \
include/linux/Makefile \
include/linux/netfilter/Makefile \
+ doc/Makefile \
])
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..a92de7f
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,19 @@
+if BUILD_MAN
+man_MANS = nft.8
+endif
+
+if BUILD_PDF
+pdf_DATA = nft.pdf
+endif
+
+pdfdir=${docdir}/pdf
+
+.xml.pdf:
+ ${AM_V_GEN}dblatex -q -t pdf -o $@ $<
+
+.xml.8:
+ ${AM_V_GEN}${DB2MAN} --xinclude $<
+
+EXTRA_DIST = nft.xml
+
+CLEANFILES = nft.pdf nft.8 *~
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644
index 1ec856c..0000000
--- a/doc/Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
-mandocs-@CONFIG_MAN@ += doc/nft.8
-pdfdocs-@CONFIG_PDF@ += doc/nft.pdf
-
-all: $(mandocs-y) $(pdfdocs-y)
-clean:
- @echo -e " CLEAN\t\tdoc"
- $(RM) $(mandocs-y) $(pdfdocs-y)
-
-install: $(mandocs-y) $(pdfdocs-y)
- @echo -e " INSTALL\tdoc"
- if test -n "$(mandocs-y)"; then \
- $(MKDIR_P) $(DESTDIR)/${mandir}/man8 ;\
- $(INSTALL) -m 755 -p $(mandocs-y) \
- $(DESTDIR)/${mandir}/man8/ ;\
- fi
- if test -n "$(pdfdocs-y)"; then \
- $(MKDIR_P) $(DESTDIR)/${pdfdir} ;\
- $(INSTALL) -m 755 -p $(pdfdocs-y) \
- $(DESTDIR)/${pdfdir}/ ;\
- fi
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir.
2014-11-12 16:41 [PATCH 0/3] autotools conversion: forgotten Makefile.am, 'doc' and 'files' Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/' Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
@ 2014-11-12 16:41 ` Giorgio Dal Molin
2014-11-12 21:01 ` Pablo Neira Ayuso
2 siblings, 1 reply; 7+ messages in thread
From: Giorgio Dal Molin @ 2014-11-12 16:41 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio Dal Molin
Added support to install some 'nft' scripts under '${sysconfdir}/nftables',
typically '/etc/nftables'.
Signed-off-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
---
Makefile.am | 3 ++-
configure.ac | 2 ++
files/Makefile.am | 1 +
files/Makefile.in | 5 -----
files/nftables/Makefile.am | 13 +++++++++++++
files/nftables/bridge-filter | 2 +-
files/nftables/inet-filter | 2 +-
files/nftables/ipv4-filter | 2 +-
files/nftables/ipv4-mangle | 2 +-
files/nftables/ipv4-nat | 2 +-
files/nftables/ipv6-filter | 2 +-
files/nftables/ipv6-mangle | 2 +-
files/nftables/ipv6-nat | 2 +-
13 files changed, 26 insertions(+), 14 deletions(-)
create mode 100644 files/Makefile.am
delete mode 100644 files/Makefile.in
create mode 100644 files/nftables/Makefile.am
diff --git a/Makefile.am b/Makefile.am
index b7fdc42..068009b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,4 +2,5 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src \
include \
- doc
+ doc \
+ files
diff --git a/configure.ac b/configure.ac
index 7bbd86e..1525ac4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,8 @@ AC_CONFIG_FILES([ \
include/linux/Makefile \
include/linux/netfilter/Makefile \
doc/Makefile \
+ files/Makefile \
+ files/nftables/Makefile \
])
AC_OUTPUT
diff --git a/files/Makefile.am b/files/Makefile.am
new file mode 100644
index 0000000..a8394c0
--- /dev/null
+++ b/files/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = nftables
diff --git a/files/Makefile.in b/files/Makefile.in
deleted file mode 100644
index dc237e2..0000000
--- a/files/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-install:
- @echo -e " INSTALL\tfiles"
- $(MKDIR_P) $(DESTDIR)/$(confdir)
- $(INSTALL) -m 755 -p $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/
- $(SED) -i "s~#\! nft~#\!@sbindir@/nft~" $(DESTDIR)/$(confdir)/*
diff --git a/files/nftables/Makefile.am b/files/nftables/Makefile.am
new file mode 100644
index 0000000..1378e2b
--- /dev/null
+++ b/files/nftables/Makefile.am
@@ -0,0 +1,13 @@
+
+pkgsysconfdir = ${sysconfdir}/nftables
+dist_pkgsysconf_DATA = bridge-filter \
+ inet-filter \
+ ipv4-filter \
+ ipv4-mangle \
+ ipv4-nat \
+ ipv6-filter \
+ ipv6-mangle \
+ ipv6-nat
+
+install-data-hook:
+ ${SED} -i 's|@sbindir[@]|${sbindir}/|g' ${DESTDIR}${pkgsysconfdir}/*
diff --git a/files/nftables/bridge-filter b/files/nftables/bridge-filter
index 54779c4..2add455 100644
--- a/files/nftables/bridge-filter
+++ b/files/nftables/bridge-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table bridge filter {
chain input { type filter hook input priority -200; }
diff --git a/files/nftables/inet-filter b/files/nftables/inet-filter
index 9f3108f..f572db5 100644
--- a/files/nftables/inet-filter
+++ b/files/nftables/inet-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table inet filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv4-filter b/files/nftables/ipv4-filter
index 3174e7a..a4ca7f2 100644
--- a/files/nftables/ipv4-filter
+++ b/files/nftables/ipv4-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv4-mangle b/files/nftables/ipv4-mangle
index 27327d3..be564a5 100644
--- a/files/nftables/ipv4-mangle
+++ b/files/nftables/ipv4-mangle
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table mangle {
chain output { type route hook output priority -150; }
diff --git a/files/nftables/ipv4-nat b/files/nftables/ipv4-nat
index 99d6951..01c6c3d 100644
--- a/files/nftables/ipv4-nat
+++ b/files/nftables/ipv4-nat
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table nat {
chain prerouting { type nat hook prerouting priority -150; }
diff --git a/files/nftables/ipv6-filter b/files/nftables/ipv6-filter
index 98fce02..ce4d7de 100644
--- a/files/nftables/ipv6-filter
+++ b/files/nftables/ipv6-filter
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 filter {
chain input { type filter hook input priority 0; }
diff --git a/files/nftables/ipv6-mangle b/files/nftables/ipv6-mangle
index 7274353..fa32402 100644
--- a/files/nftables/ipv6-mangle
+++ b/files/nftables/ipv6-mangle
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 mangle {
chain output { type route hook output priority -150; }
diff --git a/files/nftables/ipv6-nat b/files/nftables/ipv6-nat
index 33ecf9b..3f57c56 100644
--- a/files/nftables/ipv6-nat
+++ b/files/nftables/ipv6-nat
@@ -1,4 +1,4 @@
-#! nft -f
+#! @sbindir@nft -f
table ip6 nat {
chain prerouting { type nat hook prerouting priority -150; }
--
2.1.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/'.
2014-11-12 16:41 ` [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/' Giorgio Dal Molin
@ 2014-11-12 20:40 ` Pablo Neira Ayuso
0 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-12 20:40 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: netfilter-devel
On Wed, Nov 12, 2014 at 05:41:04PM +0100, Giorgio Dal Molin wrote:
> This was forgotten in the commit id: 85035b6c6a1618e7ba726fe6306c804fc1b6c4e8
I merged this missing chunk into the autotools chunk, thanks Jan.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir.
2014-11-12 16:41 ` [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
@ 2014-11-12 21:00 ` Pablo Neira Ayuso
0 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-12 21:00 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: netfilter-devel
On Wed, Nov 12, 2014 at 05:41:05PM +0100, Giorgio Dal Molin wrote:
> 'nft' documentation is originally contained in the XML file 'doc/nft.xml'.
> Processing this file with the proper tools we can obtain a PDF document,
> 'nft.pdf', and a unix man page, 'nft.8'.
>
> To produce the PDF we need the tool 'dblatex' (current release pypi.python.org/pypi/dblatex/0.3.5).
>
> To produce the man page we use the tool 'docbook2man'; it is part of the
> package 'docbook2X' (docbook2x.sourceforge.net). On some linux distributions
> the tool can have slightly different names as 'docbook2x-man' or
> 'db2x_docbook2man' so we search for all three names and use the first
> one found and issue the command:
>
> # ${DB2MAN} --xinclude $<
Applied to the autotools branch. Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir.
2014-11-12 16:41 ` [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir Giorgio Dal Molin
@ 2014-11-12 21:01 ` Pablo Neira Ayuso
0 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-12 21:01 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: netfilter-devel
On Wed, Nov 12, 2014 at 05:41:06PM +0100, Giorgio Dal Molin wrote:
> Added support to install some 'nft' scripts under '${sysconfdir}/nftables',
> typically '/etc/nftables'.
Also applied to the autotools branch. Will merge this into master by
tomorrow.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-12 20:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-12 16:41 [PATCH 0/3] autotools conversion: forgotten Makefile.am, 'doc' and 'files' Giorgio Dal Molin
2014-11-12 16:41 ` [PATCH 1/3] autotools conversion: added a missing 'Makefile.am' under 'include/linux/netfilter/' Giorgio Dal Molin
2014-11-12 20:40 ` Pablo Neira Ayuso
2014-11-12 16:41 ` [PATCH 2/3] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
2014-11-12 21:00 ` Pablo Neira Ayuso
2014-11-12 16:41 ` [PATCH 3/3] autotools conversion: added autotools support for the 'files' subdir Giorgio Dal Molin
2014-11-12 21:01 ` Pablo Neira Ayuso
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).