nft: doc: fix make distcheck

Message ID 20180808051926.GA7142@arushi-HP-Laptop-15-bs1xx
State Accepted
Delegated to: Pablo Neira
Headers show
Series
  • nft: doc: fix make distcheck
Related show

Commit Message

Arushi Singhal Aug. 8, 2018, 5:19 a.m.
fix make distcheck for conversion to asciidoc.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
 doc/Makefile.am | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Máté Eckl Aug. 8, 2018, 6:36 a.m. | #1
On Wed, Aug 08, 2018 at 10:49:26AM +0530, Arushi Singhal wrote:
> fix make distcheck for conversion to asciidoc.
> 
> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> ---
>  doc/Makefile.am | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 291bcc8..4d8cd98 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -17,11 +17,11 @@ ASCIIDOCS = ${ASCIIDOC_MAIN} ${ASCIIDOC_INCLUDES}
>  
>  pdfdir=${docdir}/pdf
>  
> -nft.8: ${ASCIIDOCS}
> -	${AM_V_GEN}${A2X} --doctype manpage --format manpage ${ASCIIDOC_MAIN}
> +.txt.8: ${ASCIIDOCS}

Why is this .txt suffix good? I applied the patch and I didn't notice any change
in the output filename.
Nevertheless I don't see why one should include the input file extension in the
output file name.

> +	${AM_V_GEN}${A2X} --doctype manpage --format manpage $<
>  
> -nft.pdf: ${ASCIIDOCS}
> -	${AM_V_GEN}${A2X} --doctype manpage --format pdf ${ASCIIDOC_MAIN}
> +.txt.pdf: ${ASCIIDOCS}

Same question here.

> +	${AM_V_GEN}${A2X} --doctype manpage --format pdf $<
>  
>  .adoc.pdf:
>  	a2x --doctype manpage --format pdf -D ${builddir} $<
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Máté Eckl Aug. 12, 2018, 1:38 p.m. | #2
On Sat, Aug 11, 2018 at 12:58:25PM +0530, Arushi Singhal wrote:
> On Wed, Aug 8, 2018 at 12:06 PM, Máté Eckl <ecklm94@gmail.com> wrote:
> 
> > On Wed, Aug 08, 2018 at 10:49:26AM +0530, Arushi Singhal wrote:
> > > fix make distcheck for conversion to asciidoc.
> > >
> > > Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
> > > ---
> > >  doc/Makefile.am | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/doc/Makefile.am b/doc/Makefile.am
> > > index 291bcc8..4d8cd98 100644
> > > --- a/doc/Makefile.am
> > > +++ b/doc/Makefile.am
> > > @@ -17,11 +17,11 @@ ASCIIDOCS = ${ASCIIDOC_MAIN} ${ASCIIDOC_INCLUDES}
> > >
> > >  pdfdir=${docdir}/pdf
> > >
> > > -nft.8: ${ASCIIDOCS}
> > > -     ${AM_V_GEN}${A2X} --doctype manpage --format manpage
> > ${ASCIIDOC_MAIN}
> > > +.txt.8: ${ASCIIDOCS}
> >
> > Why is this .txt suffix good? I applied the patch and I didn't notice any
> > change
> > in the output filename.
> > Nevertheless I don't see why one should include the input file extension
> > in the
> > output file name.
> >
> > > +     ${AM_V_GEN}${A2X} --doctype manpage --format manpage $<
> > >
> > > -nft.pdf: ${ASCIIDOCS}
> > > -     ${AM_V_GEN}${A2X} --doctype manpage --format pdf ${ASCIIDOC_MAIN}
> > > +.txt.pdf: ${ASCIIDOCS}
> >
> > Same question here.
> >
> 
> Hello Máté
> 
> Yes writing .txt.8 instead of nft.8 will not change the outputfile name, I
> just wrote it to follow the similar patten followed for ".adoc.pdf"
> insteasd of writing it as "libnftables.pdf".
> 
> Thanks
> Arushi

Okay, thanks for explaining.

> 
> >
> > > +     ${AM_V_GEN}${A2X} --doctype manpage --format pdf $<
> > >
> > >  .adoc.pdf:
> > >       a2x --doctype manpage --format pdf -D ${builddir} $<
> > > --
> > > 2.7.4
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe
> > netfilter-devel" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
Pablo Neira Ayuso Aug. 13, 2018, 12:15 p.m. | #3
If I apply this patch, when I run `make distcheck', asciidoc tries to
write into the read-only automake unpacked dist tree here.

"/usr/bin/asciidoc" --backend docbook -a "a2x-format=manpage" --doctype manpage  --out-file
"/home/git/nftables/nftables-0.9.0/doc/nft.xml"
"/home/git/nftables/nftables-0.9.0/doc/nft.txt"
asciidoc: FAILED: nft.txt: line 2: unexpected error:
asciidoc: ------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/bin/asciidoc", line 6021, in asciidoc
    writer.open(outfile, reader.bom)
  File "/usr/bin/asciidoc", line 4432, in open
    self.f = open(fname,'wb+')
IOError: [Errno 13] Permission denied:
'/home/git/nftables/nftables-0.9.0/doc/nft.xml

/home/git/nftables/nftables-0.9.0# ls -la
total 652
dr-xr-xr-x 12 git git   4096 ago 13 14:02 .
drwxr-xr-x 15 git git   4096 ago 13 14:01 ..
-r--r--r--  1 git git  56124 ago 13 13:57 aclocal.m4
drwxr-xr-x  3 git git   4096 ago 13 14:02 _build
dr-xr-xr-x  2 git git   4096 ago 13 14:01 build-aux
-r--r--r--  1 git git   2025 ago 13 13:57 config.h.in
-r-xr-xr-x  1 git git 472525 ago 13 13:57 configure
-r--r--r--  1 git git   5251 ago 13 13:32 configure.ac
-r--r--r--  1 git git  18260 jun 22  2016 COPYING
dr-xr-xr-x  2 git git   4096 ago 13 14:01 doc
dr-xr-xr-x  4 git git   4096 ago 13 13:57 files
dr-xr-xr-x  4 git git   4096 ago 13 14:01 include
drwxr-xr-x  2 git git   4096 ago 13 14:02 _inst
-r--r--r--  1 git git   1708 jun  6 18:46 INSTALL
-r--r--r--  1 git git    316 jun  6 18:46 libnftables.pc.in
dr-xr-xr-x  2 git git   4096 ago 13 14:01 m4
-r--r--r--  1 git git    176 jun 20 13:51 Makefile.am
-r--r--r--  1 git git  28775 ago 13 13:57 Makefile.in
-r--r--r--  1 git git   1007 jun 18 11:29 Make_global.am
dr-xr-xr-x  2 git git   4096 ago 13 14:01 py
dr-xr-xr-x  2 git git   4096 ago 13 14:01 src
dr-xr-xr-x  6 git git   4096 jun  6 18:46 tests

instead of placing these autogenerated files
nftables-0.9.0/_build/sub/doc/ where all autogenerated build files are
located.

Is this also going on there?

Thanks.
Duncan Roe Aug. 13, 2018, 12:58 p.m. | #4
On Mon, Aug 13, 2018 at 02:15:07PM +0200, Pablo Neira Ayuso wrote:
> If I apply this patch, when I run `make distcheck', asciidoc tries to
> write into the read-only automake unpacked dist tree here.
>
> "/usr/bin/asciidoc" --backend docbook -a "a2x-format=manpage" --doctype manpage  --out-file
> "/home/git/nftables/nftables-0.9.0/doc/nft.xml"
> "/home/git/nftables/nftables-0.9.0/doc/nft.txt"
> asciidoc: FAILED: nft.txt: line 2: unexpected error:
> asciidoc: ------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/bin/asciidoc", line 6021, in asciidoc
>     writer.open(outfile, reader.bom)
>   File "/usr/bin/asciidoc", line 4432, in open
>     self.f = open(fname,'wb+')
> IOError: [Errno 13] Permission denied:
> '/home/git/nftables/nftables-0.9.0/doc/nft.xml
>
> /home/git/nftables/nftables-0.9.0# ls -la
> total 652
> dr-xr-xr-x 12 git git   4096 ago 13 14:02 .
> drwxr-xr-x 15 git git   4096 ago 13 14:01 ..
> -r--r--r--  1 git git  56124 ago 13 13:57 aclocal.m4
> drwxr-xr-x  3 git git   4096 ago 13 14:02 _build
> dr-xr-xr-x  2 git git   4096 ago 13 14:01 build-aux
> -r--r--r--  1 git git   2025 ago 13 13:57 config.h.in
> -r-xr-xr-x  1 git git 472525 ago 13 13:57 configure
> -r--r--r--  1 git git   5251 ago 13 13:32 configure.ac
> -r--r--r--  1 git git  18260 jun 22  2016 COPYING
> dr-xr-xr-x  2 git git   4096 ago 13 14:01 doc
> dr-xr-xr-x  4 git git   4096 ago 13 13:57 files
> dr-xr-xr-x  4 git git   4096 ago 13 14:01 include
> drwxr-xr-x  2 git git   4096 ago 13 14:02 _inst
> -r--r--r--  1 git git   1708 jun  6 18:46 INSTALL
> -r--r--r--  1 git git    316 jun  6 18:46 libnftables.pc.in
> dr-xr-xr-x  2 git git   4096 ago 13 14:01 m4
> -r--r--r--  1 git git    176 jun 20 13:51 Makefile.am
> -r--r--r--  1 git git  28775 ago 13 13:57 Makefile.in
> -r--r--r--  1 git git   1007 jun 18 11:29 Make_global.am
> dr-xr-xr-x  2 git git   4096 ago 13 14:01 py
> dr-xr-xr-x  2 git git   4096 ago 13 14:01 src
> dr-xr-xr-x  6 git git   4096 jun  6 18:46 tests
>
> instead of placing these autogenerated files
> nftables-0.9.0/_build/sub/doc/ where all autogenerated build files are
> located.
>
> Is this also going on there?
>
> Thanks.

There shouldn't be an nft.xml any more, so it looks like that part of the
Makefile didn't get updated with the change to .txt files.

The patch wouldn't apply for me: kept getting "Hunk #1 FAILED at 17". So I
didn't try `make distcheck'.

Cheers ... Duncan.

Patch

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 291bcc8..4d8cd98 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,11 +17,11 @@  ASCIIDOCS = ${ASCIIDOC_MAIN} ${ASCIIDOC_INCLUDES}
 
 pdfdir=${docdir}/pdf
 
-nft.8: ${ASCIIDOCS}
-	${AM_V_GEN}${A2X} --doctype manpage --format manpage ${ASCIIDOC_MAIN}
+.txt.8: ${ASCIIDOCS}
+	${AM_V_GEN}${A2X} --doctype manpage --format manpage $<
 
-nft.pdf: ${ASCIIDOCS}
-	${AM_V_GEN}${A2X} --doctype manpage --format pdf ${ASCIIDOC_MAIN}
+.txt.pdf: ${ASCIIDOCS}
+	${AM_V_GEN}${A2X} --doctype manpage --format pdf $<
 
 .adoc.pdf:
 	a2x --doctype manpage --format pdf -D ${builddir} $<