discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml [CVS_2015_11_07] Installation Paths
@ 2015-11-07  6:08 Peter Bray
  2015-11-07 13:34 ` Ingo Schwarze
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Bray @ 2015-11-07  6:08 UTC (permalink / raw)
  To: discuss

Greetings,

Another couple of questions, yes I know, there have been a few already ;-)

I'm have been investigating manual page systems, and with multiple
systems on the same hosts, I didn't want any conflicts.

So I added to 'configure.local', some new variables: PROGRAM_PREFIX
and PROGRAM_SUFFIX, and defined the BINM_* and MANM_* variables in
terms of these variables. See the configure.local at the end of this
email.

Question: Could such behavior be the default? By this I mean the use
of the variables like PROGRAM_PREFIX and PROGRAM_SUFFIX in the default
computations in 'configure', but with 'configure.local', still
allowing other users to make personal overrides. Of course, both
variables should default to the empty string. Just asking :-)

On installation with the above in use, I noticed that soelim(1) is
installed without a requested prefix (and suffix) from BINM_SOELIM
(see the output of the find command below). The same is true of the
soelim manual page. And although 'config.h' defines 'BINM_SOELIM'
correctly (based on configure.local), nothing uses this definition.
It is even documented in configure.local.example, that BINM_SOELIM is
the name of the soelim command. Interestingly, in a recursive
case-insensitive search of the source code for "soelim", I could not
determine how man(1) invokes soelim(1), or tells a *roff
implementation to invokes its variant of soelim(1) (but I didn't look
very hard).

Also, the tbl.3 manual page is installed without a prefix or suffix.

Additionally, the 'install' pseudo-target creates
"${INSTALLATION_PREFIX}/share/examples/mandoc", but does not install
any example files into it. Question: Is it an obsolete directory or do
other packages expect this directory to exist? (and, if so, why)

Regards,

Peter Bray
Sydney, Australia

% cat > configure.local << __EOF__

MANPATH_DEFAULT="${MANPATH}"
PREFIX="${INSTALLATION_PREFIX}"
MANDIR="${INSTALLATION_PREFIX}/share/man"
WWWPREFIX="/var/www"
INSTALL="ginstall"
CC="${CC}"
CFLAGS="${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" # No support for CPPFLAGS / 
LDFLAGS
PROGRAM_PREFIX="mandoc_"
PROGRAM_SUFFIX=""
BINM_APROPOS="\${PROGRAM_PREFIX}apropos\${PROGRAM_SUFFIX}"
BINM_MAKEWHATIS="\${PROGRAM_PREFIX}makewhatis\${PROGRAM_SUFFIX}"
BINM_MAN="\${PROGRAM_PREFIX}man\${PROGRAM_SUFFIX}"
BINM_SOELIM="\${PROGRAM_PREFIX}soelim\${PROGRAM_SUFFIX}"
BINM_WHATIS="\${PROGRAM_PREFIX}whatis\${PROGRAM_SUFFIX}"
MANM_MAN="\${PROGRAM_PREFIX}man\${PROGRAM_SUFFIX}"
MANM_MANCONF="\${PROGRAM_PREFIX}man.conf\${PROGRAM_SUFFIX}"
MANM_MDOC="\${PROGRAM_PREFIX}mdoc\${PROGRAM_SUFFIX}"
MANM_ROFF="\${PROGRAM_PREFIX}roff\${PROGRAM_SUFFIX}"
MANM_EQN="\${PROGRAM_PREFIX}eqn\${PROGRAM_SUFFIX}"
MANM_TBL="\${PROGRAM_PREFIX}tbl\${PROGRAM_SUFFIX}"

__EOF__

% find ${INSTALLATION_PREFIX} \
     | sort \
     | gxargs gls -ld \
     | sed \
       -e 's|'${INSTALLATION_PREFIX}'|${PREFIX}|' \
       -e 's/software software//' \
       -e 's/Nov  7 02:18//'

drwxr-xr-x 7       7  ${PREFIX}
drwxr-xr-x 2       8  ${PREFIX}/bin
-r-xr-xr-x 1  239088  ${PREFIX}/bin/demandoc
-r-xr-xr-x 5  499784  ${PREFIX}/bin/mandoc
-r-xr-xr-x 5  499784  ${PREFIX}/bin/mandoc_apropos
-r-xr-xr-x 5  499784  ${PREFIX}/bin/mandoc_man
-r-xr-xr-x 5  499784  ${PREFIX}/bin/mandoc_whatis
-r-xr-xr-x 1   15704  ${PREFIX}/bin/soelim
drwxr-xr-x 3       3  ${PREFIX}/include
drwxr-xr-x 2       7  ${PREFIX}/include/mandoc
-r--r--r-- 1    1885  ${PREFIX}/include/mandoc/man.h
-r--r--r-- 1    1271  ${PREFIX}/include/mandoc/mandoc_aux.h
-r--r--r-- 1   16696  ${PREFIX}/include/mandoc/mandoc.h
-r--r--r-- 1    6717  ${PREFIX}/include/mandoc/mdoc.h
-r--r--r-- 1    5767  ${PREFIX}/include/mandoc/roff.h
drwxr-xr-x 3       3  ${PREFIX}/lib
drwxr-xr-x 2       3  ${PREFIX}/lib/mandoc
-r--r--r-- 1  401744  ${PREFIX}/lib/mandoc/libmandoc.a
drwxr-xr-x 2       3  ${PREFIX}/sbin
-r-xr-xr-x 5  499784  ${PREFIX}/sbin/mandoc_makewhatis
drwxr-xr-x 4       4  ${PREFIX}/share
drwxr-xr-x 3       3  ${PREFIX}/share/examples
drwxr-xr-x 2       2  ${PREFIX}/share/examples/mandoc
drwxr-xr-x 7       7  ${PREFIX}/share/man
drwxr-xr-x 2       8  ${PREFIX}/share/man/man1
-r--r--r-- 1    2707  ${PREFIX}/share/man/man1/demandoc.1
-r--r--r-- 2   10490  ${PREFIX}/share/man/man1/mandoc_apropos.1
-r--r--r-- 1    9343  ${PREFIX}/share/man/man1/mandoc_man.1
-r--r--r-- 2   10490  ${PREFIX}/share/man/man1/mandoc_whatis.1
-r--r--r-- 1   43092  ${PREFIX}/share/man/man1/mandoc.1
-r--r--r-- 1    2667  ${PREFIX}/share/man/man1/soelim.1
drwxr-xr-x 2       8  ${PREFIX}/share/man/man3
-r--r--r-- 1    9552  ${PREFIX}/share/man/man3/mandoc_escape.3
-r--r--r-- 1    4607  ${PREFIX}/share/man/man3/mandoc_malloc.3
-r--r--r-- 1   15084  ${PREFIX}/share/man/man3/mandoc.3
-r--r--r-- 1    6000  ${PREFIX}/share/man/man3/mansearch.3
-r--r--r-- 1    5346  ${PREFIX}/share/man/man3/mchars_alloc.3
-r--r--r-- 1    7107  ${PREFIX}/share/man/man3/tbl.3
drwxr-xr-x 2       4  ${PREFIX}/share/man/man5
-r--r--r-- 1    3802  ${PREFIX}/share/man/man5/mandoc_man.conf.5
-r--r--r-- 1    3880  ${PREFIX}/share/man/man5/mandoc.db.5
drwxr-xr-x 2       8  ${PREFIX}/share/man/man7
-r--r--r-- 1   26903  ${PREFIX}/share/man/man7/mandoc_char.7
-r--r--r-- 1   12350  ${PREFIX}/share/man/man7/mandoc_eqn.7
-r--r--r-- 1   23915  ${PREFIX}/share/man/man7/mandoc_man.7
-r--r--r-- 1   74622  ${PREFIX}/share/man/man7/mandoc_mdoc.7
-r--r--r-- 1   53393  ${PREFIX}/share/man/man7/mandoc_roff.7
-r--r--r-- 1    9222  ${PREFIX}/share/man/man7/mandoc_tbl.7
drwxr-xr-x 2       3  ${PREFIX}/share/man/man8
-r--r--r-- 1    4563  ${PREFIX}/share/man/man8/mandoc_makewhatis.8
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: mdocml [CVS_2015_11_07] Installation Paths
  2015-11-07  6:08 mdocml [CVS_2015_11_07] Installation Paths Peter Bray
@ 2015-11-07 13:34 ` Ingo Schwarze
  2015-11-07 23:13   ` Peter Bray
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Schwarze @ 2015-11-07 13:34 UTC (permalink / raw)
  To: Peter Bray; +Cc: discuss

Hi Peter,

Peter Bray wrote on Sat, Nov 07, 2015 at 05:08:46PM +1100:

> Another couple of questions, yes I know, there have been a few already ;-)

Thanks for looking at mandoc so thoroughly!

> I'm have been investigating manual page systems, and with multiple
> systems on the same hosts, I didn't want any conflicts.
> 
> So I added to 'configure.local', some new variables: PROGRAM_PREFIX
> and PROGRAM_SUFFIX, and defined the BINM_* and MANM_* variables in
> terms of these variables. See the configure.local at the end of this
> email.

No problem doing that locally if you want to.
Though personally, i find individual lines like

  BINM_APROPOS=mandoc_apropos

much easier to read, but that's maybe a matter of taste.

> Question: Could such behavior be the default?
> By this I mean the use of the variables like PROGRAM_PREFIX

No, i'd rather have people consider each program and manual
separately.  Renaming stuff is unwise unless you really
consider the implications for each single file.

> and PROGRAM_SUFFIX

I don't see any use for that.  Even you don't seem to use it.
In general, i dislike scaffolding and want to keep stuff simple.
Just because something can be done doesn't mean it should.

> in the default
> computations in 'configure', but with 'configure.local', still
> allowing other users to make personal overrides. Of course, both
> variables should default to the empty string. Just asking :-)

And then we need to talk about precedence and overriding in the
documentation, and people get confused?  No, i don't like that.

> On installation with the above in use, I noticed that soelim(1) is
> installed without a requested prefix (and suffix) from BINM_SOELIM
> (see the output of the find command below). The same is true of the
> soelim manual page. And although 'config.h' defines 'BINM_SOELIM'
> correctly (based on configure.local), nothing uses this definition.
> It is even documented in configure.local.example, that BINM_SOELIM is
> the name of the soelim command.

Here, you found a real bug.
Fixed in CVS!

> Interestingly, in a recursive
> case-insensitive search of the source code for "soelim", I could not
> determine how man(1) invokes soelim(1),

It never does.  The mandoc toolbox doesn't require soelim(1) for
any particular purpose.  It is just provided as an additional,
stand-alone tool in case anybody wants to call it manually for
whatever reasons.

> or tells a *roff implementation to invokes its variant
> of soelim(1) (but I didn't look very hard).

The mdoc version of man(1) never calls any external roff(7)
implementation, so it never needs to tell anybody about soelim(1).

> Also, the tbl.3 manual page is installed without a prefix or suffix.

Does that conflict with anything?  With what, specifically?

> Additionally, the 'install' pseudo-target creates
> "${INSTALLATION_PREFIX}/share/examples/mandoc", but does not install
> any example files into it. Question: Is it an obsolete directory or do
> other packages expect this directory to exist? (and, if so, why)

It is obsolete, and i just deleted it.

> % cat > configure.local << __EOF__
> 
> MANPATH_DEFAULT="${MANPATH}"

OUCH, don't do that, don't use data from the environment in
configure.local, use constant data instead.

Otherwise, you get erratic build results depending on whatever
the user happens to have set in their shell.

Thanks!
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: mdocml [CVS_2015_11_07] Installation Paths
  2015-11-07 13:34 ` Ingo Schwarze
@ 2015-11-07 23:13   ` Peter Bray
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Bray @ 2015-11-07 23:13 UTC (permalink / raw)
  To: Ingo Schwarze; +Cc: discuss

On  8/11/15 12:34 AM, Ingo Schwarze wrote:
> Hi Peter,
>
> Peter Bray wrote on Sat, Nov 07, 2015 at 05:08:46PM +1100:
>
>> Another couple of questions, yes I know, there have been a few already ;-)
>
> Thanks for looking at mandoc so thoroughly!

No Problem, I'm just glad that it helps.

>> I'm have been investigating manual page systems, and with multiple
>> systems on the same hosts, I didn't want any conflicts.
>>
>> So I added to 'configure.local', some new variables: PROGRAM_PREFIX
>> and PROGRAM_SUFFIX, and defined the BINM_* and MANM_* variables in
>> terms of these variables. See the configure.local at the end of this
>> email.
>
> No problem doing that locally if you want to.
> Though personally, i find individual lines like

No Problem, it was a only a suggestion after all.

[snip]

>> Also, the tbl.3 manual page is installed without a prefix or suffix.
>
> Does that conflict with anything?  With what, specifically?

No it was merely a consistence observation, no conflict observed.

[snip]

>> % cat > configure.local << __EOF__
>>
>> MANPATH_DEFAULT="${MANPATH}"
>
> OUCH, don't do that, don't use data from the environment in
> configure.local, use constant data instead.
>
> Otherwise, you get erratic build results depending on whatever
> the user happens to have set in their shell.

Don't worry the build environment 'pkgs_build' (yet to be released), 
controls the environment very tightly (and deliberately), in order to 
provide reproducible Build Procedures (and several specific goals, that 
extend the ideas in current build practices for FLOSS projects).

Better get on and test the changes ;-)

Peter
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2015-11-07 23:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07  6:08 mdocml [CVS_2015_11_07] Installation Paths Peter Bray
2015-11-07 13:34 ` Ingo Schwarze
2015-11-07 23:13   ` Peter Bray

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).