Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 637598 - app-misc/vlock-2.2.3 has bashism (with dash as sh)
Summary: app-misc/vlock-2.2.3 has bashism (with dash as sh)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Shell Tools Herd Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: nonbash
  Show dependency tree
 
Reported: 2017-11-15 16:36 UTC by samurai.no.dojo
Modified: 2020-06-22 10:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description samurai.no.dojo 2017-11-15 16:36:05 UTC
app-misc/vlock-2.2.3 has CLEAR_SCREEN="`echo -e '\033[H\033[J'`" on line 20, which is not compatible with app-shells/dash-0.5.8.2 used as /bin/sh eselect.
It emits " -e '\033[H\033[J'" just before locking prompt (This TTY is now locked.)
 

Reproducible: Always

Steps to Reproduce:
1.Emerge app-misc/vlock, app-shells/dash and app-eselect/eselect-sh
2.Set dash as /bin/sh alternative "eselect sh set dash"
3.Run vlock
Actual Results:  
vlock output "-e \033[H\033[JThis TTY is now locked.

Please press [ENTER] to unlock."
And all previous input and output of terminal is visible!



Expected Results:  
vlock output "This TTY is now locked.

Please press [ENTER] to unlock."
And terminal "cleared".
Comment 1 samurai.no.dojo 2017-11-15 16:39:31 UTC
Proposed patch:

20c20
< CLEAR_SCREEN="`echo -e '\033[H\033[J'`"
---
> CLEAR_SCREEN="`printf '\033[H\033[J'`"
Comment 2 samurai.no.dojo 2017-11-15 16:40:35 UTC
Let me know if $(emerge --info) is needed. (I doubt it ;-) )
Comment 3 Larry the Git Cow gentoo-dev 2020-06-22 10:09:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c9c4bb93ca357ee64c8e040cc9f079ed3261e16

commit 7c9c4bb93ca357ee64c8e040cc9f079ed3261e16
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2020-06-22 10:08:40 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2020-06-22 10:09:37 +0000

    app-misc/vlock: patch vlock shell script.
    
    replace echo with printf.
    
    Closes: https://bugs.gentoo.org/637598
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>

 app-misc/vlock/files/vlock-2.2.3-echo-printf.patch | 11 +++++++++++
 app-misc/vlock/vlock-2.2.3-r1.ebuild               |  4 ++++
 2 files changed, 15 insertions(+)