[Openvpn-devel,v2,1/2] Move examples into openvpn-examples(5) man page

Message ID 20210520150932.2565217-1-arne@rfc2549.org
State Accepted
Headers show
Series
  • [Openvpn-devel,v2,1/2] Move examples into openvpn-examples(5) man page
Related show

Commit Message

Arne Schwabe May 20, 2021, 3:09 p.m.
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 .gitignore                 |  2 ++
 doc/Makefile.am            | 25 +++++++++++++++++++++----
 doc/openvpn-examples.5.rst | 17 +++++++++++++++++
 doc/openvpn.8.rst          |  2 +-
 4 files changed, 41 insertions(+), 5 deletions(-)
 create mode 100644 doc/openvpn-examples.5.rst

Comments

David Sommerseth June 30, 2021, 5:29 p.m. | #1
On 20/05/2021 17:09, Arne Schwabe wrote:
> Signed-off-by: Arne Schwabe <arne@rfc2549.org>
> ---
>   .gitignore                 |  2 ++
>   doc/Makefile.am            | 25 +++++++++++++++++++++----
>   doc/openvpn-examples.5.rst | 17 +++++++++++++++++
>   doc/openvpn.8.rst          |  2 +-
>   4 files changed, 41 insertions(+), 5 deletions(-)
>   create mode 100644 doc/openvpn-examples.5.rst
> 
> diff --git a/.gitignore b/.gitignore
> index 25d06235b..178076ede 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -49,6 +49,8 @@ version.sh
>   msvc-env-local.bat
>   config-msvc-local.h
>   config-msvc-version.h
> +doc/openvpn-examples.5
> +doc/openvpn-examples.5.html
>   doc/openvpn.8
>   doc/openvpn.8.html
>   /doc/doxygen/html/
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index e411f5f9d..1dbbddf58 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -20,6 +20,7 @@ dist_doc_DATA = \
>   dist_noinst_DATA = \
>   	README.plugins interactive-service-notes.rst \
>   	openvpn.8.rst \
> +    openvpn-examples.5.rst \

TAB vs spaces.  Makefile.am uses TABs.  This might not be a real issue 
anymore, but there are some older Make versions which will choke on spaces.

This can be fixed during commit.


[...snip...]

>   if HAVE_PYDOCUTILS
> -dist_noinst_DATA += openvpn.8
> -dist_html_DATA = openvpn.8.html
> +dist_noinst_DATA += openvpn.8 openvpn-examples.5
> +dist_html_DATA = openvpn.8.html openvpn-examples.5.html
>   
>   # Failsafe - do not delete these files unless we can recreate them
>   CLEANFILES = \
> -	 openvpn.8 openvpn.8.html
> +	 openvpn.8 openvpn.8.html openvpn-examples.5 openvpn-examples.5.html
>   
>   endif
>   
> @@ -74,4 +91,4 @@ else
>   dist_man_MANS = openvpn.8

You missed openvpn-examples.5 here.  But I do have a patch ready which 
avoids lots of the rule duplications.  Gert got a copy of a preliminary 
patch to test on some BSD hosts.  So we can ignore this for now.

Except of these two really minor things, this is good to go.

Acked-By: David Sommerseth <davids@openvpn.net>
Gert Doering July 2, 2021, 10:06 a.m. | #2
I have adjusted the tab, and added openvpn-examples.5 to dist_man_MANS,
as instructed.

I have run "make distcheck" on a machine with and without py-docutils
(with docutils, it creates the openvpn-examples.5 page and packs it,
without, it fails - at it must be) and verified that the generated 
.5/.5.html files make it to the tarball.

Since *this* patch is only about splitting the man pages (and does not
concern itself with actual content which might depend on "is only in
master") it makes sense to have it in 2.5 as well -> done.

Your patch has been applied to the master branch.

commit 0c5380e906116b61ce9ed5310181291941b75227 (master)
commit 11fe49e31afd9b05da751d60680e8d2254fd9cd6 (release/2.5)
Author: Arne Schwabe
Date:   Thu May 20 17:09:31 2021 +0200

     Move examples into openvpn-examples(5) man page

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: David Sommerseth <davids@openvpn.net>
     Message-Id: <20210520150932.2565217-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22414.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/.gitignore b/.gitignore
index 25d06235b..178076ede 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,8 @@  version.sh
 msvc-env-local.bat
 config-msvc-local.h
 config-msvc-version.h
+doc/openvpn-examples.5
+doc/openvpn-examples.5.html
 doc/openvpn.8
 doc/openvpn.8.html
 /doc/doxygen/html/
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e411f5f9d..1dbbddf58 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -20,6 +20,7 @@  dist_doc_DATA = \
 dist_noinst_DATA = \
 	README.plugins interactive-service-notes.rst \
 	openvpn.8.rst \
+    openvpn-examples.5.rst \
 	man-sections/advanced-options.rst \
 	man-sections/client-options.rst \
 	man-sections/connection-profiles.rst \
@@ -52,6 +53,14 @@  else
 	@echo "Missing python-docutils - skipping man page generation"
 endif
 
+openvpn-examples.5 :
+if HAVE_PYDOCUTILS
+	$(RST2MAN) $(srcdir)/$@.rst > $@
+else
+	@echo "Missing python-docutils - skipping man page generation"
+endif
+
+
 openvpn.8.html:
 if HAVE_PYDOCUTILS
 	$(RST2HTML) $(srcdir)/openvpn.8.rst > $@
@@ -59,13 +68,21 @@  else
 	@echo "Missing python-docutils - skipping man/html page generation"
 endif
 
+openvpn-examples.5.html:
+if HAVE_PYDOCUTILS
+	$(RST2HTML) $(srcdir)/openvpn-examples.5.rst > $@
+else
+	@echo "Missing python-docutils - skipping man/html page generation"
+endif
+
+
 if HAVE_PYDOCUTILS
-dist_noinst_DATA += openvpn.8
-dist_html_DATA = openvpn.8.html
+dist_noinst_DATA += openvpn.8 openvpn-examples.5
+dist_html_DATA = openvpn.8.html openvpn-examples.5.html
 
 # Failsafe - do not delete these files unless we can recreate them
 CLEANFILES = \
-	 openvpn.8 openvpn.8.html
+	 openvpn.8 openvpn.8.html openvpn-examples.5 openvpn-examples.5.html
 
 endif
 
@@ -74,4 +91,4 @@  else
 dist_man_MANS = openvpn.8
 endif
 
-dist-hook : openvpn.8 openvpn.8.html
+dist-hook : openvpn.8 openvpn.8.html openvpn-examples.5 openvpn-examples.5.html
diff --git a/doc/openvpn-examples.5.rst b/doc/openvpn-examples.5.rst
new file mode 100644
index 000000000..988b6027b
--- /dev/null
+++ b/doc/openvpn-examples.5.rst
@@ -0,0 +1,17 @@ 
+===============================
+ openvpn examples
+===============================
+-------------------------
+ Secure IP tunnel daemon
+-------------------------
+
+:Manual section: 5
+:Manual group: Configuration files
+
+
+INTRODUCTION
+============
+
+This man page gives a few simple examples to create OpenVPN setups and configuration files.
+
+.. include:: man-sections/examples.rst
diff --git a/doc/openvpn.8.rst b/doc/openvpn.8.rst
index db81274fa..995467478 100644
--- a/doc/openvpn.8.rst
+++ b/doc/openvpn.8.rst
@@ -86,7 +86,6 @@  placed in a configuration file.
 .. include:: man-sections/connection-profiles.rst
 .. include:: man-sections/inline-files.rst
 .. include:: man-sections/signals.rst
-.. include:: man-sections/examples.rst
 
 
 FAQ
@@ -134,6 +133,7 @@  Report all bugs to the OpenVPN team info@openvpn.net
 SEE ALSO
 ========
 
+``openvpn-examples``\(5),
 ``dhcpcd``\(8),
 ``ifconfig``\(8),
 ``openssl``\(1),