From 7b3aa5e9383b3a8cf71340ce617f1f30fb8a8716 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Sat, 27 Apr 2019 10:05:34 -0700 Subject: [PATCH] busybox: improvements to less and ash applets less: set MAXLINES to the default value ash: - add to xbps-alternatives - register the shell in /etc/shells - enable autocompletion with $HOME and ~ --- srcpkgs/busybox/files/dotconfig | 4 ++-- srcpkgs/busybox/template | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/srcpkgs/busybox/files/dotconfig b/srcpkgs/busybox/files/dotconfig index ecdb5854853..0cbd021404e 100644 --- a/srcpkgs/busybox/files/dotconfig +++ b/srcpkgs/busybox/files/dotconfig @@ -103,7 +103,7 @@ CONFIG_FEATURE_EDITING_HISTORY=15 # CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set CONFIG_FEATURE_REVERSE_SEARCH=y CONFIG_FEATURE_TAB_COMPLETION=y -# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_USERNAME_COMPLETION=y # CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set CONFIG_FEATURE_EDITING_WINCH=y # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set @@ -783,7 +783,7 @@ CONFIG_I2CDUMP=y CONFIG_I2CDETECT=y # CONFIG_INOTIFYD is not set CONFIG_LESS=y -CONFIG_FEATURE_LESS_MAXLINES=0 +CONFIG_FEATURE_LESS_MAXLINES=9999999 CONFIG_FEATURE_LESS_BRACKETS=y CONFIG_FEATURE_LESS_FLAGS=y CONFIG_FEATURE_LESS_TRUNCATE=y diff --git a/srcpkgs/busybox/template b/srcpkgs/busybox/template index d3b9d45bb23..d0312a6b01c 100644 --- a/srcpkgs/busybox/template +++ b/srcpkgs/busybox/template @@ -1,7 +1,7 @@ # Template file for 'busybox' pkgname=busybox version=1.30.1 -revision=1 +revision=2 hostmakedepends="perl" checkdepends="zip" short_desc="Swiss Army Knife of Embedded Linux" @@ -11,18 +11,22 @@ homepage="http://www.busybox.net" distfiles="${homepage}/downloads/busybox-${version}.tar.bz2" checksum=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc -_alternatives_common=" +_alternatives_core=" + ash:ash:/usr/bin/busybox awk:awk:/usr/bin/busybox hostname:hostname:/usr/bin/busybox sh:sh:/usr/bin/busybox vi:vi:/usr/bin/busybox logger:logger:/usr/bin/busybox" -alternatives=" - ${_alternatives_common} +_alternatives=" + ${_alternatives_core} ntpd:ntpd:/usr/bin/busybox ntpd:ntpd:/etc/sv/busybox-ntpd" +alternatives="${_alternatives}" +register_shell="/usr/bin/ash" + _patch_config() { local t="$1" shift @@ -99,7 +103,8 @@ do_install() { busybox-core_package() { short_desc+=" (essential applets)" conflicts="busybox>=0 busybox-huge>=0" - alternatives="${_alternatives_common}" + alternatives="${_alternatives_core}" + register_shell="/usr/bin/ash" pkg_install() { vbin busybox-core/busybox_unstripped busybox vman busybox-core/docs/busybox.1 @@ -116,6 +121,8 @@ busybox-static_package() { busybox-huge_package() { short_desc+=" (extra applets)" conflicts="busybox>=0 busybox-core>=0" + alternatives="${_alternatives}" + register_shell="/usr/bin/ash" pkg_install() { vbin busybox-huge/busybox_unstripped busybox vman busybox-huge/docs/busybox.1