FS#36346 - [dash] Should use --with-libedit in .configure

Attached to Project: Arch Linux
Opened by Maurício CA (mauricioca) - Wednesday, 31 July 2013, 17:56 GMT
Last edited by Levente Polyak (anthraxx) - Wednesday, 13 January 2021, 20:44 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description: currently, dash package builds dash without command line
editing. Just adding --with-libedit (and adding libedit package to the list of
dependencies) solves the problem.

The reason why I believe this is a bug and not a feature request is
that dash package description states its intention of Posix compliance.
Command line editing is demanded by Posix, and is not marked as an
optional feature.

Reference: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html

Additional info:
* package version(s): dash 0.5.7-4

Steps to reproduce: just start dash, use 'set -o vi' to enable command
line editing, and press ESC to ask for command mode. It just shows '^['.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Wednesday, 13 January 2021, 20:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.5.11.3-1
Comment by Doug Newgard (Scimmia) - Monday, 06 July 2015, 04:48 GMT
Ping toofishes...
Comment by Alad Wenter (Alad) - Friday, 29 April 2016, 07:55 GMT
--with-libedit is already included, however, libedit is missing in the depends array (as libedit is not in the base group, it wouldn't be installed in the clean chroot).
Comment by Alif (alive4ever) - Monday, 03 April 2017, 10:11 GMT
$ ldd $(which dash)
linux-vdso.so.1 (0x00007ffcaab97000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f56af263000)
/lib64/ld-linux-x86-64.so.2 (0x00007f56af607000)

It's clear here that dash isn't linked with libedit
$ dash
$ echo $0
dash
$ set -o emacs
Pressing Ctrl-A, which moves the cursor to the beginning of the line
$ ls^A
Ctrl-A is interpreted literally.

Manually compiled dash after adding libedit in the depends array
$ ldd $(find ./src/ -name dash)
linux-vdso.so.1 (0x00007ffd94d86000)
libedit.so.0 => /usr/lib/libedit.so.0 (0x00007fb3a2462000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fb3a20be000)
libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007fb3a1e52000)
/lib64/ld-linux-x86-64.so.2 (0x00007fb3a269a000)
$ set -o emacs
Pressing Ctrl-A moves the text to the beginning of the line as expected.

Note that libedit only enables command editing when emacs or vi is set. It *doesn't* enable tab completion for commands and path.
Comment by Alif (alive4ever) - Monday, 03 April 2017, 10:22 GMT
 FS#53426  is blocking this issue since a rebuild can't be done without upstream source.
Comment by Alif (alive4ever) - Thursday, 15 June 2017, 00:09 GMT
Since dash upstream is back online, it is possible to fix this.
Comment by Stefan Schick (pommes_) - Sunday, 21 July 2019, 17:57 GMT
Confirmed, that a rebuild with the current PKGBUILD fixes the issue.

Unfortunately this rebuild didn't happen yet (i.e. the current package in core still has the described error).
Comment by loqs (loqs) - Sunday, 13 September 2020, 15:23 GMT
Add libedit to depends.
Comment by Kylie McClain (somasis) - Wednesday, 23 December 2020, 01:10 GMT
There's also been a relevant patched submitted upstream to make sure that ./configure fails properly if libedit isn't detected with --with-libedit passed.

<a href='https://www.mail-archive.com/dash@vger.kernel.org/msg02019.html'>https://www.mail-archive.com/dash@vger.kernel.org/msg02019.html</a>

Loading...