Merge pull request #3192 from mglae/le9_ncurses_stools110

ncurses: improvements / system-tools 110: update mc and efibootmgr
This commit is contained in:
CvH 2018-12-30 22:48:42 +01:00 committed by GitHub
commit 33a1db063f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 102 additions and 70 deletions

View File

@ -2,22 +2,21 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="efivar"
PKG_VERSION="70e63d4"
# 0.15 # Todo: later versions with buildproblems
PKG_SHA256="2638f1faa22e67bf99b4c537f7c21c336a5851a8c91c8dc09555da946a1b84c9"
PKG_VERSION="3e687d8072f3ed53ae727ec2cb99ae56dbcdf02b"
PKG_SHA256="810d386c9f4dafc160c721ef73e491c933c311e3df768e27eec50c28ac0f4d97"
PKG_ARCH="x86_64"
PKG_LICENSE="LGPL"
PKG_SITE="https://github.com/vathpela/efivar"
PKG_URL="https://github.com/vathpela/efivar-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efivar"
PKG_URL="https://github.com/rhboot/efivar/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar:host"
PKG_LONGDESC="Tools and library to manipulate EFI variables."
make_host() {
make -C src/ makeguids
make -C src/ include/efivar/efivar-guids.h
}
make_target() {
make -C src/ libefivar.a efivar-guids.h efivar.h
make -C src/ libefivar.a libefiboot.a efivar.h efivar
}
makeinstall_host() {
@ -26,9 +25,8 @@ makeinstall_host() {
makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -P src/libefivar.a $SYSROOT_PREFIX/usr/lib/
cp -P src/libefivar.a src/libefiboot.a $SYSROOT_PREFIX/usr/lib/
mkdir -p $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar-guids.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/include/efivar/*.h $SYSROOT_PREFIX/usr/include/efivar
}

View File

@ -0,0 +1,11 @@
--- a/src/Makefile 2018-10-01 21:30:06.000000000 +0200
+++ b/src/Makefile 2018-10-17 14:16:46.000000000 +0200
@@ -69,7 +69,7 @@ libefivar.so : | $(GENERATED_SOURCES) li
libefivar.so : LIBS=dl
libefivar.so : MAP=libefivar.map
-efivar : efivar.c | libefivar.so
+efivar : efivar.c | libefivar.a
efivar : LIBS=efivar dl
efivar-static : efivar.c $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))

View File

@ -1,32 +0,0 @@
fix for
./makeguids guids.txt guids.bin names.bin guid-symbols.S efivar-guids.h
makeguids: malloc.c:2395: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
--- a/src/makeguids.c 2014-10-15 06:48:49.000000000 -0700
+++ b/src/makeguids.c 2016-05-05 05:40:35.964612900 -0700
@@ -99,10 +99,8 @@
if (rc < 0)
err(1, "makeguids: could not read \"%s\"", argv[1]);
- /* strictly speaking, this *has* to be too large. */
- struct guidname *outbuf = calloc(inlen, sizeof (char));
- if (!outbuf)
- err(1, "makeguids");
+ /* reallocate later to required size */
+ struct guidname *outbuf = NULL;
char *guidstr = inbuf;
unsigned int line;
@@ -133,6 +131,11 @@
err(1, "makeguids: \"%s\": 4 invalid data on line %d",
argv[1], line);
+ outbuf = realloc(outbuf, line * sizeof (struct guidname));
+ if (!outbuf)
+ err(1, "makeguids");
+
+ bzero(&outbuf[line-1], sizeof (struct guidname));
memcpy(&outbuf[line-1].guid, &guid, sizeof(guid));
strcpy(outbuf[line-1].symbol, "efi_guid_");
strncat(outbuf[line-1].symbol, symbol,

View File

@ -2,18 +2,22 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="efibootmgr"
PKG_VERSION="95f7a63"
PKG_SHA256="a6f936508c5b50b6fb5693dd2f0db911da298da0f72ffc0e2e74b09b22592fd1"
PKG_VERSION="99b578501643377e0b1994b2a068b790d189d5ad"
PKG_SHA256="04bc45dc8a841985d78d8df87b3475eb6e1122f993fae975197bf3adbc6e3341"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/vathpela/efibootmgr"
PKG_URL="https://github.com/vathpela/efibootmgr-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efibootmgr"
PKG_URL="https://github.com/rhboot/efibootmgr/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar pciutils zlib"
PKG_LONGDESC="Tool to modify UEFI Firmware Boot Manager Variables."
pre_make_target() {
export EXTRA_CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
make_target() {
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -ludev -ldl"
make EFIDIR=BOOT EFI_LOADER=bootx64.efi PKG_CONFIG=true \
LDLIBS="-lefiboot -lefivar" \
efibootmgr
}
makeinstall_target() {

View File

@ -1,12 +0,0 @@
diff -Naur efibootmgr-ceb177a/src/lib/scsi_ioctls.c efibootmgr-ceb177a.patch/src/lib/scsi_ioctls.c
--- efibootmgr-ceb177a/src/lib/scsi_ioctls.c 2014-10-21 22:17:27.000000000 +0200
+++ efibootmgr-ceb177a.patch/src/lib/scsi_ioctls.c 2016-03-26 13:49:59.119669675 +0100
@@ -24,7 +24,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/nvme.h>
+#include <linux/nvme_ioctl.h>
#include "scsi_ioctls.h"
int

View File

@ -3,8 +3,8 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="mc"
PKG_VERSION="4.8.20"
PKG_SHA256="017ee7f4f8ae420a04f4d6fcebaabe5b494661075c75442c76e9c8b1923d501c"
PKG_VERSION="4.8.21"
PKG_SHA256="8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c"
PKG_LICENSE="GPL"
PKG_SITE="http://www.midnight-commander.org"
PKG_URL="http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz"
@ -13,7 +13,8 @@ PKG_LONGDESC="Midnight Commander is a text based filemanager that emulates Norto
PKG_CONFIGURE_OPTS_TARGET=" \
--datadir=/storage/.kodi/addons/virtual.system-tools/data \
--libdir=/storage/.kodi/addons/virtual.system-tools/mclib \
--libexecdir=/storage/.kodi/addons/virtual.system-tools/mclib \
--with-homedir=/storage/.kodi/userdata/addon_data/virtual.system-tools \
--sysconfdir=/storage/.kodi/addons/virtual.system-tools/etc \
--with-screen=ncurses \
--with-sysroot=$SYSROOT_PREFIX \
@ -41,4 +42,7 @@ pre_configure_target() {
post_makeinstall_target() {
rm -rf $INSTALL/storage/.kodi/addons/virtual.system-tools/data/locale
rm -rf $INSTALL/storage/.kodi/addons/virtual.system-tools/data/mc/help/mc.hlp.*
mv $INSTALL/usr/bin/mc $INSTALL/usr/bin/mc-bin
rm -f $INSTALL/usr/bin/{mcedit,mcview}
cp $PKG_DIR/wrapper/* $INSTALL/usr/bin
}

View File

@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin "$@"

View File

@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin -e "$@"

View File

@ -0,0 +1,4 @@
#!/bin/sh
HISTFILE="/run/mc_histfile"
export HISTFILE
exec mc-bin -v "$@"

View File

@ -1,3 +1,9 @@
110
- updated and improved mc (4.8.21)
- using more compatible "xterm" TERM definition
- updated efibootmgr to 17
- fixed screen
109
- added stress-ng

View File

@ -3,7 +3,7 @@
PKG_NAME="system-tools"
PKG_VERSION="1.0"
PKG_REV="109"
PKG_REV="110"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://libreelec.tv"
@ -72,7 +72,7 @@ addon() {
cp -P $(get_build_dir dtach)/.$TARGET_NAME/dtach $ADDON_BUILD/$PKG_ADDON_ID/bin
# efibootmgr
cp -P $(get_build_dir efibootmgr)/src/efibootmgr/efibootmgr $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :
cp -P $(get_build_dir efibootmgr)/src/efibootmgr $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :
# encfs
cp -P $(get_build_dir encfs)/.$TARGET_NAME/encfs $ADDON_BUILD/$PKG_ADDON_ID/bin

View File

@ -6,5 +6,5 @@ import subprocess
yes = xbmcgui.Dialog().yesno('', 'This is a console-only addon','','Open a terminal window?','No','Yes')
if yes:
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;exec mrxvt"], shell=False, close_fds=True)
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec mrxvt -ls"], shell=False, close_fds=True)

View File

@ -2,12 +2,12 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ncurses"
PKG_VERSION="6.1-20180203"
PKG_SHA256="fac9db9460f271ee632af386a5b502d43a25d7cf14138e3d3166d4bedc4f6cb0"
PKG_VERSION="6.1-20181215"
PKG_SHA256="08b07c3e792961f300829512c283d5fefc0b1c421a57b76922c3d13303ed677d"
PKG_LICENSE="MIT"
PKG_SITE="http://www.gnu.org/software/ncurses/"
PKG_URL="http://invisible-mirror.net/archives/ncurses/current/ncurses-$PKG_VERSION.tgz"
PKG_DEPENDS_TARGET="toolchain zlib"
PKG_DEPENDS_TARGET="toolchain zlib ncurses:host"
PKG_LONGDESC="A library is a free software emulation of curses in System V Release 4.0, and more."
# causes some segmentation fault's (dialog) when compiled with gcc's link time optimization.
PKG_BUILD_FLAGS="+pic"
@ -31,10 +31,11 @@ PKG_CONFIGURE_OPTS_TARGET="--without-ada \
--disable-rpath \
--disable-database \
--with-fallbacks=linux,screen,xterm,xterm-color \
--with-termpath=/storage/.config/termcap \
--disable-big-core \
--enable-termcap \
--enable-getcap \
--enable-getcap-cache \
--disable-getcap-cache \
--enable-symlinks \
--disable-bsdpad \
--without-rcs-ids \

View File

@ -0,0 +1,16 @@
Remove recent xterm terminfo features to be compatible with other emulations
--- a/misc/terminfo.src 2018-12-21 18:53:11.000000000 +0100
+++ a/misc/terminfo.src 2018-12-22 22:56:47.000000000 +0100
@@ -4335,8 +4335,8 @@ xterm-xfree86|xterm terminal emulator (X
xterm-new|modern xterm terminal emulator,
npc,
indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
- rin=\E[%p1%dT, use=ansi+rep, use=ecma+strikeout,
- use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
+ rin=\E[%p1%dT, use=ecma+strikeout,
+ use=xterm+sm+1005, use=xterm+pcfkeys, use=xterm+tmux,
use=xterm-basic,
# This fragment is for people who cannot agree on what the backspace key

View File

@ -0,0 +1,24 @@
Fix freeing not allocated fallback entries by allocating a copy.
--- a/ncurses/tinfo/lib_setup.c 2018-11-24 23:13:16.000000000 +0100
+++ b/ncurses/tinfo/lib_setup.c 2018-12-29 10:31:01.000000000 +0100
@@ -756,6 +756,8 @@ TINFO_SETUP_TERM(TERMINAL **tp,
if (status != TGETENT_YES) {
const TERMTYPE2 *fallback = _nc_fallback2(tname);
+ if (fallback)
+ fallback = _nc_copy_entry(fallback);
if (fallback) {
T(("found fallback entry"));
TerminalType(termp) = *fallback;
--- a/ncurses/tinfo/tinfo_driver.c 2018-11-24 23:17:03.000000000 +0100
+++ b/ncurses/tinfo/tinfo_driver.c 2018-12-29 10:27:19.000000000 +0100
@@ -172,6 +172,8 @@ drv_CanHandle(TERMINAL_CONTROL_BLOCK * T
if (status != TGETENT_YES) {
const TERMTYPE2 *fallback = _nc_fallback2(tname);
+ if (fallback)
+ fallback = _nc_copy_entry(fallback);
if (fallback) {
T(("found fallback entry"));
TerminalType(termp) = *fallback;