Bug 247933

Summary: devel/readline: inputrc is not read from LOCALBASE
Product: Ports & Packages Reporter: Michael Osipov <michael.osipov>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (sunpoet)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

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.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-01-03 20:30:33 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Jan  3 20:29:54 UTC 2021
New revision: 560241
URL: https://svnweb.freebsd.org/changeset/ports/560241

Log:
  Read inputrc from LOCALBASE/etc/inputrc rather than /etc/inputrc

  - Bump PORTREVISION for package change

  PR:		247933
  Reported by:	Michael Osipov <michael.osipov@siemens.com>

Changes:
  head/devel/readline/Makefile
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2021-01-03 20:45:43 UTC
Committed. Thanks!