All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Help needed with man page conversions to asciidoc?
       [not found] ` <karelzak/util-linux/issues/1257/792670506@github.com>
@ 2021-03-08 20:10   ` Mario Blättermann
  2021-03-09  8:49     ` Karel Zak
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Blättermann @ 2021-03-08 20:10 UTC (permalink / raw)
  To: util-linux

[-- Attachment #1: Type: text/plain, Size: 3331 bytes --]

Hello Karel,

Am Mo., 8. März 2021 um 11:53 Uhr schrieb Karel Zak <notifications@github.com>:
>
> Oh, it's like reading a dream -- sure, go ahead :-)
>
OK. Sometimes dreams become true ;) I know about the peculiarities of
the ~50 years old *roff formats, and I'm happy to help a project to
get rid of this odd stuff...

> It would be probably good to move this discussion to util-linux@vger.kernel.org upstream mailing list to make it possible to others to contribute with ideas and objections.
>
> I like the idea with translated man pages maintained in the upstream tree, keep it all in one place is the only way how to keep it up to date. If I good understand then the result will be another template on translationproject.org to maintain man pages strings in po, right? What about in-tree .po files? I guess it should be separate from normal po files, po-docs/ directory?
>
Yes, it needs a separate .po file. It's not OK to mix UI and doc
translations. Well, it's theoretically possible to merge both .pot
files in one to force translators to work on both UI and man pages.
But I think the UI .pot file with more than 4000 gettext messages is
big enough, especially for newbies. So don't let's blow it up to more
than 10000.

I propose the following structure:

The asciidoc man pages will be stored where the *roff man pages reside
for ages: in their respective subdirectories (sys-utils, schedutils,
whatever). For the special asciidoc files footer.adoc,
translation.adoc and asciidoc.conf we need an extra directory, let's
name it "man-common".

For the man page translations, we can also use man-common. It's a good
place for files like po4a.conf or the TP sync script (if desired), and
the subdirectory "po".

> For now (as the first step) for me more important is ASCII to man pages conversion with some usable result. The translations should be the next logical step.
Yes, although I'm sure I need to always have a look at the
localizabililty while converting the man pages. Once all is OK, I need
some more time anyway to import existing .po files and provide some
help to the TP folks. As far as I can see, we have translations of
util-linux man pages in German, French, Spanish and Polish in
manpages-l10n. Some other teams, like Japanese, or even the abandoned
Hungarian and Turkish projects, also have such files. Sadly there are
no Czech translations known to me :(

> Is there any possibility to use some "style" template for conversion to the man pages (for example the same header/footer for all pages, generic sections like AVAILABILITY, etc.)?
>
Yes, see the attached tarball for an example footer.adoc. I could
extend it with a "Reporting bugs" section.

> Don't worry about Autotools, I'll do this task. All I need is some command-line examples of how to do the conversion.

Oh, very nice... Although I also use Autotools in manpages-l10n (but
haven't written all the Makefile* and related stuff), my knowledge is
poor, and I'm happy after each release without problems;)

Karel, I've already forked the util-linux project at Github; maybe it
is useful to create a branch for the Asciidoc stuff in your main repo,
which I can check out into the forked repo? This would be probably the
most painless way for a merge request.

Best Regards,
Mario

[-- Attachment #2: chrt-adoc-test.tar.xz --]
[-- Type: application/x-xz, Size: 2244 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-08 20:10   ` Help needed with man page conversions to asciidoc? Mario Blättermann
@ 2021-03-09  8:49     ` Karel Zak
  2021-03-19 22:50       ` Mario Blättermann
  0 siblings, 1 reply; 9+ messages in thread
From: Karel Zak @ 2021-03-09  8:49 UTC (permalink / raw)
  To: Mario Blättermann; +Cc: util-linux

On Mon, Mar 08, 2021 at 09:10:34PM +0100, Mario Blättermann wrote:
> >
> > I like the idea with translated man pages maintained in the
> > upstream tree, keep it all in one place is the only way how to
> > keep it up to date. If I good understand then the result will be
> > another template on translationproject.org to maintain man pages
> > strings in po, right? What about in-tree .po files? I guess it
> > should be separate from normal po files, po-docs/ directory?
> >
> Yes, it needs a separate .po file. It's not OK to mix UI and doc
> translations. Well, it's theoretically possible to merge both .pot
> files in one to force translators to work on both UI and man pages.
> But I think the UI .pot file with more than 4000 gettext messages is
> big enough, especially for newbies. So don't let's blow it up to more
> than 10000.

 I agree.

> I propose the following structure:
> 
> The asciidoc man pages will be stored where the *roff man pages reside
> for ages: in their respective subdirectories (sys-utils, schedutils,
> whatever). For the special asciidoc files footer.adoc,
> translation.adoc and asciidoc.conf we need an extra directory, let's
> name it "man-common".

 OK.

> For the man page translations, we can also use man-common. It's a good
> place for files like po4a.conf or the TP sync script (if desired), and
> the subdirectory "po".

 OK. For scripts, see also tools/ directory where we have some
 checkers, simple script to commit po/ changes to git (git-tp-sync)
 etc.

...
> > Is there any possibility to use some "style" template for
> > conversion to the man pages (for example the same header/footer
> > for all pages, generic sections like AVAILABILITY, etc.)?
> >
> Yes, see the attached tarball for an example footer.adoc. I could
> extend it with a "Reporting bugs" section.

 I see, it looks pretty cool and readable.

> > Don't worry about Autotools, I'll do this task. All I need is some
> > command-line examples of how to do the conversion.
> 
> Oh, very nice... Although I also use Autotools in manpages-l10n (but
> haven't written all the Makefile* and related stuff), my knowledge is
> poor, and I'm happy after each release without problems;)
>
> Karel, I've already forked the util-linux project at Github; maybe it
> is useful to create a branch for the Asciidoc stuff in your main repo,
> which I can check out into the forked repo? This would be probably the
> most painless way for a merge request.

 OK, I have created a new branch "topic/asciidoc" on github.

   Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-09  8:49     ` Karel Zak
@ 2021-03-19 22:50       ` Mario Blättermann
  2021-03-20 17:46         ` Mario Blättermann
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Blättermann @ 2021-03-19 22:50 UTC (permalink / raw)
  To: util-linux

Hello,

Am Di., 9. März 2021 um 09:49 Uhr schrieb Karel Zak <kzak@redhat.com>:
>
> On Mon, Mar 08, 2021 at 09:10:34PM +0100, Mario Blättermann wrote:
> > >
> > > I like the idea with translated man pages maintained in the
> > > upstream tree, keep it all in one place is the only way how to
> > > keep it up to date. If I good understand then the result will be
> > > another template on translationproject.org to maintain man pages
> > > strings in po, right? What about in-tree .po files? I guess it
> > > should be separate from normal po files, po-docs/ directory?
> > >
> > Yes, it needs a separate .po file. It's not OK to mix UI and doc
> > translations. Well, it's theoretically possible to merge both .pot
> > files in one to force translators to work on both UI and man pages.
> > But I think the UI .pot file with more than 4000 gettext messages is
> > big enough, especially for newbies. So don't let's blow it up to more
> > than 10000.
>
>  I agree.
>
> > I propose the following structure:
> >
> > The asciidoc man pages will be stored where the *roff man pages reside
> > for ages: in their respective subdirectories (sys-utils, schedutils,
> > whatever). For the special asciidoc files footer.adoc,
> > translation.adoc and asciidoc.conf we need an extra directory, let's
> > name it "man-common".
>
>  OK.
>
> > For the man page translations, we can also use man-common. It's a good
> > place for files like po4a.conf or the TP sync script (if desired), and
> > the subdirectory "po".
>
>  OK. For scripts, see also tools/ directory where we have some
>  checkers, simple script to commit po/ changes to git (git-tp-sync)
>  etc.
>
> ...
> > > Is there any possibility to use some "style" template for
> > > conversion to the man pages (for example the same header/footer
> > > for all pages, generic sections like AVAILABILITY, etc.)?
> > >
> > Yes, see the attached tarball for an example footer.adoc. I could
> > extend it with a "Reporting bugs" section.
>
>  I see, it looks pretty cool and readable.
>
> > > Don't worry about Autotools, I'll do this task. All I need is some
> > > command-line examples of how to do the conversion.
> >
> > Oh, very nice... Although I also use Autotools in manpages-l10n (but
> > haven't written all the Makefile* and related stuff), my knowledge is
> > poor, and I'm happy after each release without problems;)
> >
> > Karel, I've already forked the util-linux project at Github; maybe it
> > is useful to create a branch for the Asciidoc stuff in your main repo,
> > which I can check out into the forked repo? This would be probably the
> > most painless way for a merge request.
>
>  OK, I have created a new branch "topic/asciidoc" on github.
>

Just FYI: I'm finished with the import, but I stumbled upon some
peculiarity in Asciidoc. Many of the current util-linux man pages use
"mailto:" links as follows:

.MT johndoe@example.com
John Doe
.ME

This leads to properly clickable links in the online man page
collections of certain Linux distributions, such as Archlinux [1] or
Debian [2]. But the *roff conversion engine of Asciidoctor produces a
slightly different code:

.MTO "johndoe\(atexample.com" "John Doe" ""

Which renders to ...

John Doe <johndoe@example.com>

... in the HTML output generated by man2html which is used by the
mentioned online collections. The link is not clickable. Because I
consider the online collections as the second most important way to
view man pages, a non-clickable "mailto:" link would be a step back,
which I don't want. I've posted this issue in the Asciidoctor forum
[3]. Maybe it is possible to create the desired custom code using a
macro... I hope so. Or the Asciidoctor developers change it upstream -
which would be the better solution.

BTW, the same applies to weblinks, but first let's find out how to get
proper mail links.

[1] https://man.archlinux.org/
[2] https://manpages.debian.org/
[3] https://discuss.asciidoctor.org/How-to-change-rendering-of-links-in-man-pages-tt8575.html

Best Regards,
Mario

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-19 22:50       ` Mario Blättermann
@ 2021-03-20 17:46         ` Mario Blättermann
  2021-03-23  9:27           ` Karel Zak
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Blättermann @ 2021-03-20 17:46 UTC (permalink / raw)
  To: util-linux

Hello,

Am Fr., 19. März 2021 um 23:50 Uhr schrieb Mario Blättermann
<mario.blaettermann@gmail.com>:
>
> Hello,
>
> Am Di., 9. März 2021 um 09:49 Uhr schrieb Karel Zak <kzak@redhat.com>:
> >
> > On Mon, Mar 08, 2021 at 09:10:34PM +0100, Mario Blättermann wrote:
> > > >
> > > > I like the idea with translated man pages maintained in the
> > > > upstream tree, keep it all in one place is the only way how to
> > > > keep it up to date. If I good understand then the result will be
> > > > another template on translationproject.org to maintain man pages
> > > > strings in po, right? What about in-tree .po files? I guess it
> > > > should be separate from normal po files, po-docs/ directory?
> > > >
> > > Yes, it needs a separate .po file. It's not OK to mix UI and doc
> > > translations. Well, it's theoretically possible to merge both .pot
> > > files in one to force translators to work on both UI and man pages.
> > > But I think the UI .pot file with more than 4000 gettext messages is
> > > big enough, especially for newbies. So don't let's blow it up to more
> > > than 10000.
> >
> >  I agree.
> >
> > > I propose the following structure:
> > >
> > > The asciidoc man pages will be stored where the *roff man pages reside
> > > for ages: in their respective subdirectories (sys-utils, schedutils,
> > > whatever). For the special asciidoc files footer.adoc,
> > > translation.adoc and asciidoc.conf we need an extra directory, let's
> > > name it "man-common".
> >
> >  OK.
> >
> > > For the man page translations, we can also use man-common. It's a good
> > > place for files like po4a.conf or the TP sync script (if desired), and
> > > the subdirectory "po".
> >
> >  OK. For scripts, see also tools/ directory where we have some
> >  checkers, simple script to commit po/ changes to git (git-tp-sync)
> >  etc.
> >
> > ...
> > > > Is there any possibility to use some "style" template for
> > > > conversion to the man pages (for example the same header/footer
> > > > for all pages, generic sections like AVAILABILITY, etc.)?
> > > >
> > > Yes, see the attached tarball for an example footer.adoc. I could
> > > extend it with a "Reporting bugs" section.
> >
> >  I see, it looks pretty cool and readable.
> >
> > > > Don't worry about Autotools, I'll do this task. All I need is some
> > > > command-line examples of how to do the conversion.
> > >
> > > Oh, very nice... Although I also use Autotools in manpages-l10n (but
> > > haven't written all the Makefile* and related stuff), my knowledge is
> > > poor, and I'm happy after each release without problems;)
> > >
> > > Karel, I've already forked the util-linux project at Github; maybe it
> > > is useful to create a branch for the Asciidoc stuff in your main repo,
> > > which I can check out into the forked repo? This would be probably the
> > > most painless way for a merge request.
> >
> >  OK, I have created a new branch "topic/asciidoc" on github.
> >
>
> Just FYI: I'm finished with the import, but I stumbled upon some
> peculiarity in Asciidoc. Many of the current util-linux man pages use
> "mailto:" links as follows:
>
> .MT johndoe@example.com
> John Doe
> .ME
>
> This leads to properly clickable links in the online man page
> collections of certain Linux distributions, such as Archlinux [1] or
> Debian [2]. But the *roff conversion engine of Asciidoctor produces a
> slightly different code:
>
> .MTO "johndoe\(atexample.com" "John Doe" ""
>
> Which renders to ...
>
> John Doe <johndoe@example.com>
>
> ... in the HTML output generated by man2html which is used by the
> mentioned online collections. The link is not clickable. Because I
> consider the online collections as the second most important way to
> view man pages, a non-clickable "mailto:" link would be a step back,
> which I don't want. I've posted this issue in the Asciidoctor forum
> [3]. Maybe it is possible to create the desired custom code using a
> macro... I hope so. Or the Asciidoctor developers change it upstream -
> which would be the better solution.
>
> BTW, the same applies to weblinks, but first let's find out how to get
> proper mail links.
>
> [1] https://man.archlinux.org/
> [2] https://manpages.debian.org/
> [3] https://discuss.asciidoctor.org/How-to-change-rendering-of-links-in-man-pages-tt8575.html
>

Just found another problem: After applying the Makefile patches [1]
and running "autogen.sh" and "configure", the command »make gen-man«
fails:

[mariob@t450 util-linux-mariobl]$ make gen-man
Makefile:15938: warning: overriding recipe for target 'misc-utils/uuidd.8'
Makefile:15927: warning: ignoring old recipe for target 'misc-utils/uuidd.8'
Makefile:15938: warning: overriding recipe for target 'misc-utils/getopt.1'
Makefile:15927: warning: ignoring old recipe for target 'misc-utils/getopt.1'
 GEN      lib/terminal-colors.d.5
/bin/sh: line 3: lib/terminal-colors.d.5.adoc: Permission denied
make: *** [Makefile:15940: lib/terminal-colors.d.5] Error 126

Don't know what permissions are really needed here:

[mariob@t450 util-linux-mariobl]$ ls -l lib/terminal-colors.d.5.adoc
-rw-r--r-- 1 mariob mariob 4947 Mar 20 16:34 lib/terminal-colors.d.5.adoc

I cannot imagine that lib/terminal-colors.d.5.adoc needs to be
executable... However, after chmod +x, the error message is even
stranger than before:

[mariob@t450 util-linux-mariobl]$ make gen-man
Makefile:15938: warning: overriding recipe for target 'misc-utils/uuidd.8'
Makefile:15927: warning: ignoring old recipe for target 'misc-utils/uuidd.8'
Makefile:15938: warning: overriding recipe for target 'misc-utils/getopt.1'
Makefile:15927: warning: ignoring old recipe for target 'misc-utils/getopt.1'
 GEN      lib/terminal-colors.d.5
lib/terminal-colors.d.5.adoc: line 1: //po4a:: No such file or directory
lib/terminal-colors.d.5.adoc: line 2: ////: Is a directory
lib/terminal-colors.d.5.adoc: line 3: terminal-colors.d.5: command not found
lib/terminal-colors.d.5.adoc: line 4: syntax error near unexpected
token `newline'
lib/terminal-colors.d.5.adoc: line 4: `Copyright 2014 Ondrej Oprala <ooprala@red
hat.com>'
make: *** [Makefile:15940: lib/terminal-colors.d.5] Error 2

Obviously the script cannot handle the comment lines at all.

I noticed the following line in the Makefile generated by the configure script:

asciidoc_man_cmd = $(ASCIIDOCTOR)

This seems to be the pure "asciidoctor" command without any options,
as far as I can tell, given my poor knowledge about GNU Autotools.

[1] https://github.com/mariobl/util-linux/commit/34455501de74c405b56daa438ee3e839e92fbc17

Best Regards,
Mario

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-20 17:46         ` Mario Blättermann
@ 2021-03-23  9:27           ` Karel Zak
  2021-03-23 20:07             ` Mario Blättermann
  0 siblings, 1 reply; 9+ messages in thread
From: Karel Zak @ 2021-03-23  9:27 UTC (permalink / raw)
  To: Mario Blättermann; +Cc: util-linux

On Sat, Mar 20, 2021 at 06:46:24PM +0100, Mario Blättermann wrote:
> Just found another problem: After applying the Makefile patches [1]
> and running "autogen.sh" and "configure", the command »make gen-man«
> fails:
> 
> [mariob@t450 util-linux-mariobl]$ make gen-man
> Makefile:15938: warning: overriding recipe for target 'misc-utils/uuidd.8'
> Makefile:15927: warning: ignoring old recipe for target 'misc-utils/uuidd.8'
> Makefile:15938: warning: overriding recipe for target 'misc-utils/getopt.1'
> Makefile:15927: warning: ignoring old recipe for target 'misc-utils/getopt.1'
>  GEN      lib/terminal-colors.d.5
> /bin/sh: line 3: lib/terminal-colors.d.5.adoc: Permission denied
> make: *** [Makefile:15940: lib/terminal-colors.d.5] Error 126

It sounds like $asciidoc_man_cmd is empty. This is my mistake.

> [1] https://github.com/mariobl/util-linux/commit/34455501de74c405b56daa438ee3e839e92fbc17

You also need to define $ASCIIDOCTOR variable in ./configure.ac.
Please add the patch below. I have probably forgot it in my
suggestion.

 Karel


diff --git a/configure.ac b/configure.ac
index 7f59604bd..946222676 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,6 +232,7 @@ PKG_INSTALLDIR(['${usrlib_execdir}/pkgconfig'])
 
 GTK_DOC_CHECK([1.10])
 AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_PATH_PROG([ASCIIDOCTOR], [asciidoctor])
 
 linux_os=no
 bsd_os=no


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-23  9:27           ` Karel Zak
@ 2021-03-23 20:07             ` Mario Blättermann
  2021-03-24 19:37               ` Mario Blättermann
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Blättermann @ 2021-03-23 20:07 UTC (permalink / raw)
  To: util-linux

Hello Karel,

Am Di., 23. März 2021 um 10:27 Uhr schrieb Karel Zak <kzak@redhat.com>:
>
> On Sat, Mar 20, 2021 at 06:46:24PM +0100, Mario Blättermann wrote:
> > Just found another problem: After applying the Makefile patches [1]
> > and running "autogen.sh" and "configure", the command »make gen-man«
> > fails:
> >
> > [mariob@t450 util-linux-mariobl]$ make gen-man
> > Makefile:15938: warning: overriding recipe for target 'misc-utils/uuidd.8'
> > Makefile:15927: warning: ignoring old recipe for target 'misc-utils/uuidd.8'
> > Makefile:15938: warning: overriding recipe for target 'misc-utils/getopt.1'
> > Makefile:15927: warning: ignoring old recipe for target 'misc-utils/getopt.1'
> >  GEN      lib/terminal-colors.d.5
> > /bin/sh: line 3: lib/terminal-colors.d.5.adoc: Permission denied
> > make: *** [Makefile:15940: lib/terminal-colors.d.5] Error 126
>
> It sounds like $asciidoc_man_cmd is empty. This is my mistake.
>
> > [1] https://github.com/mariobl/util-linux/commit/34455501de74c405b56daa438ee3e839e92fbc17
>
> You also need to define $ASCIIDOCTOR variable in ./configure.ac.
> Please add the patch below. I have probably forgot it in my
> suggestion.
>
>  Karel
>
>
> diff --git a/configure.ac b/configure.ac
> index 7f59604bd..946222676 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -232,6 +232,7 @@ PKG_INSTALLDIR(['${usrlib_execdir}/pkgconfig'])
>
>  GTK_DOC_CHECK([1.10])
>  AC_PATH_PROG([XSLTPROC], [xsltproc])
> +AC_PATH_PROG([ASCIIDOCTOR], [asciidoctor])
>
>  linux_os=no
>  bsd_os=no
>
It works until it reaches the first man page link:

  GEN      lib/terminal-colors.d.5
 GEN      libuuid/man/uuid.3
 GEN      libuuid/man/uuid_clear.3
 GEN      libuuid/man/uuid_compare.3
 GEN      libuuid/man/uuid_copy.3
 GEN      libuuid/man/uuid_generate.3
 GEN      libuuid/man/uuid_is_null.3
 GEN      libuuid/man/uuid_parse.3
 GEN      libuuid/man/uuid_time.3
 GEN      libuuid/man/uuid_unparse.3
 GEN      libuuid/man/uuid_generate_random.3
asciidoctor: FAILED: input file ./libuuid/man/uuid_generate_random.3.adoc is mis
sing

BTW, it also produces HTML versions of the man pages, which are not in
.gitignore. Is it intended to also install HTML versions?

Best Regards,
Mario

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-23 20:07             ` Mario Blättermann
@ 2021-03-24 19:37               ` Mario Blättermann
  2021-03-26 10:25                 ` Karel Zak
  0 siblings, 1 reply; 9+ messages in thread
From: Mario Blättermann @ 2021-03-24 19:37 UTC (permalink / raw)
  To: util-linux

Hello Karel,

Am Di., 23. März 2021 um 21:07 Uhr schrieb Mario Blättermann
<mario.blaettermann@gmail.com>:
>
> [...]
> It works until it reaches the first man page link:
>
>   GEN      lib/terminal-colors.d.5
>  GEN      libuuid/man/uuid.3
>  GEN      libuuid/man/uuid_clear.3
>  GEN      libuuid/man/uuid_compare.3
>  GEN      libuuid/man/uuid_copy.3
>  GEN      libuuid/man/uuid_generate.3
>  GEN      libuuid/man/uuid_is_null.3
>  GEN      libuuid/man/uuid_parse.3
>  GEN      libuuid/man/uuid_time.3
>  GEN      libuuid/man/uuid_unparse.3
>  GEN      libuuid/man/uuid_generate_random.3
> asciidoctor: FAILED: input file ./libuuid/man/uuid_generate_random.3.adoc is mis
> sing
>
> BTW, it also produces HTML versions of the man pages, which are not in
> .gitignore. Is it intended to also install HTML versions?
>
I found the problem, at least partially. A backslash was missing in
Makefile.am, and now "make gen-man" creates *roff man pages, as
expected. However, it stops here:

  GEN      sys-utils/swapoff.8
asciidoctor: FAILED: input file ./sys-utils/swapoff.8.adoc is missing
make: *** [Makefile:15942: sys-utils/swapoff.8] Fehler 1

But I'm wondering why it doesn't complain about the other symlinks in
libuuid etc, and it didn't stop until the sys-utils directory has been
reached.

Best Regards,
Mario

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-24 19:37               ` Mario Blättermann
@ 2021-03-26 10:25                 ` Karel Zak
  2021-03-26 10:38                   ` Karel Zak
  0 siblings, 1 reply; 9+ messages in thread
From: Karel Zak @ 2021-03-26 10:25 UTC (permalink / raw)
  To: Mario Blättermann; +Cc: util-linux

On Wed, Mar 24, 2021 at 08:37:35PM +0100, Mario Blättermann wrote:
> I found the problem, at least partially. A backslash was missing in
> Makefile.am, and now "make gen-man" creates *roff man pages, as
> expected. However, it stops here:

OK.

>   GEN      sys-utils/swapoff.8
> asciidoctor: FAILED: input file ./sys-utils/swapoff.8.adoc is missing
> make: *** [Makefile:15942: sys-utils/swapoff.8] Fehler 1
> 
> But I'm wondering why it doesn't complain about the other symlinks in
> libuuid etc, and it didn't stop until the sys-utils directory has been
> reached.

It seems asciidoctor generates also the man page links (see below for
more details). It's safe to remove the man page link files from the
tree at all.

The issue is that we have the link pages in the dist_man_MANS=
and 'make' tries to verify the link file *before* the  original 
man page. It means  

  dist_man_MANS += sys-utils/swapon.8 sys-utils/swapoff.8

is no problem, but:

  dist_man_MANS += sys-utils/swapoff.8 sys-utils/swapon.8

ends with error ;-)

I'll send you pull request to your topic/asciidoc do fix this (and
some others minor) issue.

 Karel



 $ git checkout -f
 $ make clean
 $ git status 
On branch ad
nothing to commit, working tree clean

make the man page (V=1 for verbose output):

 $  make libuuid/man/uuid_generate.3 V=1
 /usr/bin/mkdir -p $(dirname libuuid/man/uuid_generate.3)
 srcdir=''; \
	test -f ./libuuid/man/uuid_generate.3.adoc || srcdir=./; \
	/usr/bin/asciidoctor -b manpage -a 'VERSION=2.36.689-bdda0' -a 'ADJTIME_PATH=/etc/adjtime' ${srcdir}libuuid/man/uuid_generate.3.adoc

now see that asciidoctor also updated the uuid_generate_*.3 man pages:

 $ git diff
diff --git a/libuuid/man/uuid_generate_random.3 b/libuuid/man/uuid_generate_random.3
index 8405486e9..1e51c4e6e 100644
--- a/libuuid/man/uuid_generate_random.3
+++ b/libuuid/man/uuid_generate_random.3
@@ -1 +1 @@
-.so man3/uuid_generate.3
+.so uuid_generate.3
\ No newline at end of file
diff --git a/libuuid/man/uuid_generate_time.3 b/libuuid/man/uuid_generate_time.3
index 8405486e9..1e51c4e6e 100644
--- a/libuuid/man/uuid_generate_time.3
+++ b/libuuid/man/uuid_generate_time.3
@@ -1 +1 @@
-.so man3/uuid_generate.3
+.so uuid_generate.3
\ No newline at end of file
diff --git a/libuuid/man/uuid_generate_time_safe.3 b/libuuid/man/uuid_generate_time_safe.3
index 8405486e9..1e51c4e6e 100644
--- a/libuuid/man/uuid_generate_time_safe.3
+++ b/libuuid/man/uuid_generate_time_safe.3
@@ -1 +1 @@
-.so man3/uuid_generate.3
+.so uuid_generate.3
\ No newline at end of file

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: Help needed with man page conversions to asciidoc?
  2021-03-26 10:25                 ` Karel Zak
@ 2021-03-26 10:38                   ` Karel Zak
  0 siblings, 0 replies; 9+ messages in thread
From: Karel Zak @ 2021-03-26 10:38 UTC (permalink / raw)
  To: Mario Blättermann; +Cc: util-linux

On Fri, Mar 26, 2021 at 11:25:22AM +0100, Karel Zak wrote:
> The issue is that we have the link pages in the dist_man_MANS=
> and 'make' tries to verify the link file *before* the  original 
> man page. It means  
> 
>   dist_man_MANS += sys-utils/swapon.8 sys-utils/swapoff.8
> 
> is no problem, but:
> 
>   dist_man_MANS += sys-utils/swapoff.8 sys-utils/swapon.8
> 
> ends with error ;-)
> 
> I'll send you pull request to your topic/asciidoc do fix this (and
> some others minor) issue.

Note that fix it by "right order" in $dist_man_MANS is a poor solution,
because for "make -j" it does not follow the order. The solution we
need is split man pages and man page links to two variables. I'll do
fix it.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-26 10:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <karelzak/util-linux/issues/1257@github.com>
     [not found] ` <karelzak/util-linux/issues/1257/792670506@github.com>
2021-03-08 20:10   ` Help needed with man page conversions to asciidoc? Mario Blättermann
2021-03-09  8:49     ` Karel Zak
2021-03-19 22:50       ` Mario Blättermann
2021-03-20 17:46         ` Mario Blättermann
2021-03-23  9:27           ` Karel Zak
2021-03-23 20:07             ` Mario Blättermann
2021-03-24 19:37               ` Mario Blättermann
2021-03-26 10:25                 ` Karel Zak
2021-03-26 10:38                   ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.