Bug 247933 - devel/readline: inputrc is not read from LOCALBASE
Summary: devel/readline: inputrc is not read from LOCALBASE
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-12 16:59 UTC by Michael Osipov
Modified: 2020-07-12 16:59 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2020-07-12 16:59:41 UTC
libreadline's build setup does not pass sysconfdir down to rlconf.h. This lead to the fact that inputrc is NOT read from LOCALBASE/etc/inputrc, but from /etc/inputrc. Looking at the grep output:
> [root@bsd1srv /usr/ports/devel/readline/work/readline-8.0]# grep -ri /etc/inputrc .
> ./rlconf.h:#define SYS_INPUTRC "/etc/inputrc"
> ./doc/readline.0:       the  ultimate  default  is /etc/inputrc.  When a program which uses the
> ./doc/readline.0:              ing directive would read /etc/inputrc:
> ./doc/readline.0:              $include  /etc/inputrc
> ./doc/rluser.texi:@file{/etc/inputrc}.
> ./doc/rluser.texi:For example, the following directive reads from @file{/etc/inputrc}:
> ./doc/rluser.texi:$include /etc/inputrc
> ./doc/rluser.texi:# assignments from /etc/Inputrc
> ./doc/rluser.texi:$include /etc/Inputrc
> Binary file ./doc/readline.dvi matches
> ./doc/rluserman.info:ultimate default is '/etc/inputrc'.
> ./doc/rluserman.info:     directive reads from '/etc/inputrc':
> ./doc/rluserman.info:          $include /etc/inputrc
> ./doc/rluserman.info:     # assignments from /etc/Inputrc
> ./doc/rluserman.info:     $include /etc/Inputrc
> Binary file ./doc/rluserman.dvi matches
> ./doc/readline.ps:Fs(/etc/inputrc)p Ft(.)275 2483 y(When)e(a)h(program)f(whic)m(h)h(uses)
> ./doc/readline.ps:(from)630 2849 y Fs(/etc/inputrc)p Ft(:)870 2984 y Fs($include)46
> ./doc/readline.ps:b(/etc/inputrc)150 3183 y Fi(1.3.3)63 b(Sample)41 b(Init)g(File)150
> ./doc/readline.ps:(/etc/Inputrc)390 1395 y($include)f(/etc/Inputrc)390
> ./doc/readline.info:ultimate default is '/etc/inputrc'.
> ./doc/readline.info:     directive reads from '/etc/inputrc':
> ./doc/readline.info:          $include /etc/inputrc
> ./doc/readline.info:     # assignments from /etc/Inputrc
> ./doc/readline.info:     $include /etc/Inputrc
> ./doc/readline.html:<TT>`/etc/inputrc'</TT>.
> ./doc/readline.html:For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
> ./doc/readline.html:<TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
> ./doc/readline.html:# assignments from /etc/Inputrc
> ./doc/readline.html:$include /etc/Inputrc
> ./doc/readline.3:.IR /etc/inputrc .
> ./doc/readline.3:would read \fI/etc/inputrc\fP:
> ./doc/readline.3:\fB$include\fP \^ \fI/etc/inputrc\fP
> ./doc/rluserman.ps:Fn(/etc/inputrc)p Fo(.)275 2483 y(When)e(a)h(program)f(whic)m(h)h(uses)
> ./doc/rluserman.ps:(from)630 2849 y Fn(/etc/inputrc)p Fo(:)870 2984 y Fn($include)46
> ./doc/rluserman.ps:b(/etc/inputrc)150 3183 y Fd(1.3.3)63 b(Sample)41 b(Init)g(File)150
> ./doc/rluserman.ps:(/etc/Inputrc)390 1395 y($include)f(/etc/Inputrc)390
> ./doc/rluserman.html:<TT>`/etc/inputrc'</TT>.
> ./doc/rluserman.html:For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
> ./doc/rluserman.html:<TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
> ./doc/rluserman.html:# assignments from /etc/Inputrc
> ./doc/rluserman.html:$include /etc/Inputrc
> ./bind.c:     4. /etc/inputrc

The cheapest fix is to modify rlconf.h. The better one to fix docs too, of course.
As a smooth path of migration, one could apply the same scheme as ca_root_nss does. Symlink from /etc/inputrc to LOCALBASE/etc/inputrc and note this in UPDATING. This would completely decouple this port from base.