terminfo updates
This commit is contained in:
16
.SRCINFO
16
.SRCINFO
@@ -1,19 +1,21 @@
|
||||
pkgbase = st-git
|
||||
pkgdesc = Simple virtual terminal emulator for X
|
||||
pkgver = 0.8.2.r20.g8386642
|
||||
pkgdesc = A simple virtual terminal emulator for X.
|
||||
pkgver = 0.8.3.r6.g914fb82
|
||||
pkgrel = 1
|
||||
url = https://st.suckless.org/
|
||||
url = https://st.suckless.org
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
arch = armv7h
|
||||
license = MIT
|
||||
makedepends = ncurses
|
||||
makedepends = libxext
|
||||
makedepends = git
|
||||
depends = libxft
|
||||
provides = st
|
||||
conflicts = st
|
||||
source = git://git.suckless.org/st
|
||||
sha1sums = SKIP
|
||||
source = terminfo.patch
|
||||
source = README.terminfo.rst
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = st-git
|
||||
|
||||
|
||||
90
PKGBUILD
90
PKGBUILD
@@ -1,22 +1,28 @@
|
||||
# Maintainer: Tarmo Heiskanen <turskii@gmail.com>
|
||||
# Contributor: mar77i <mar77i at mar77i dot ch>
|
||||
# Contributor: Gaetan Bisson <bisson@archlinux.org>
|
||||
# Contributor: Scytrin dai Kinthra <scytrin@gmail.com>
|
||||
# Maintainer: Vincent Grande <shoober420@gmail.com>
|
||||
# Contributor: Jose Riha <jose1711 gmail com>
|
||||
# Contributor: Sebastian J. Bronner <waschtl@sbronner.com>
|
||||
# Contributor: Patrick Jackson <PatrickSJackson gmail com>
|
||||
# Contributor: Christoph Vigano <mail@cvigano.de>
|
||||
|
||||
pkgname=st-git
|
||||
pkgver=0.8.2.r20.g8386642
|
||||
pkgver=0.8.3.r6.g914fb82
|
||||
pkgrel=1
|
||||
pkgdesc='Simple virtual terminal emulator for X'
|
||||
url='https://st.suckless.org/'
|
||||
arch=('i686' 'x86_64')
|
||||
pkgdesc='A simple virtual terminal emulator for X.'
|
||||
arch=('i686' 'x86_64' 'armv7h')
|
||||
license=('MIT')
|
||||
depends=('libxft')
|
||||
makedepends=('ncurses' 'libxext' 'git')
|
||||
source=('git://git.suckless.org/st')
|
||||
sha1sums=('SKIP')
|
||||
provides=("st")
|
||||
conflicts=("st")
|
||||
|
||||
depends=(libxft)
|
||||
provides=(st)
|
||||
conflicts=(st)
|
||||
url=https://st.suckless.org
|
||||
source=(git://git.suckless.org/st
|
||||
terminfo.patch
|
||||
README.terminfo.rst)
|
||||
sha256sums=(SKIP
|
||||
SKIP
|
||||
SKIP)
|
||||
_gitname="st"
|
||||
_sourcedir="$_gitname"
|
||||
_makeopts="--directory=$_sourcedir"
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/st"
|
||||
@@ -24,25 +30,51 @@ pkgver() {
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/st"
|
||||
|
||||
echo 'Copying config.def.h to $startdir...'
|
||||
cp config.def.h "${startdir}/"
|
||||
|
||||
echo 'Copying config.h from $startdir if it exists...'
|
||||
[ -f "${startdir}/config.h" ] && cp "${startdir}/config.h" . || true
|
||||
# This package provides a mechanism to provide a custom config.h. Multiple
|
||||
# configuration states are determined by the presence of two files in
|
||||
# $BUILDDIR:
|
||||
#
|
||||
# config.h config.def.h state
|
||||
# ======== ============ =====
|
||||
# absent absent Initial state. The user receives a message on how
|
||||
# to configure this package.
|
||||
# absent present The user was previously made aware of the
|
||||
# configuration options and has not made any
|
||||
# configuration changes. The package is built using
|
||||
# default values.
|
||||
# present The user has supplied his or her configuration. The
|
||||
# file will be copied to $srcdir and used during
|
||||
# build.
|
||||
#
|
||||
# After this test, config.def.h is copied from $srcdir to $BUILDDIR to
|
||||
# provide an up to date template for the user.
|
||||
if [ -e "$BUILDDIR/config.h" ]
|
||||
then
|
||||
cp "$BUILDDIR/config.h" "$_sourcedir"
|
||||
elif [ ! -e "$BUILDDIR/config.def.h" ]
|
||||
then
|
||||
msg='This package can be configured in config.h. Copy the config.def.h '
|
||||
msg+='that was just placed into the package directory to config.h and '
|
||||
msg+='modify it to change the configuration. Or just leave it alone to '
|
||||
msg+='continue to use default values.'
|
||||
warning "$msg"
|
||||
fi
|
||||
cp "$_sourcedir/config.def.h" "$BUILDDIR"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/st"
|
||||
|
||||
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
|
||||
make $_makeopts X11INC=/usr/include/X11 X11LIB=/usr/lib/X11
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/st"
|
||||
|
||||
make PREFIX=/usr DESTDIR="${pkgdir}" TERMINFO="/dev/null" install
|
||||
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README"
|
||||
local installopts='--mode 0644 -D --target-directory'
|
||||
local shrdir="$pkgdir/usr/share"
|
||||
local licdir="$shrdir/licenses/$pkgname"
|
||||
local docdir="$shrdir/doc/$pkgname"
|
||||
make $_makeopts PREFIX=/usr DESTDIR="$pkgdir" install
|
||||
install $installopts "$licdir" "$_sourcedir/LICENSE"
|
||||
install $installopts "$docdir" "$_sourcedir/README"
|
||||
install $installopts "$docdir" README.terminfo.rst
|
||||
install $installopts "$shrdir/$pkgname" "$_sourcedir/st.info"
|
||||
}
|
||||
|
||||
90
README.terminfo.rst
Executable file
90
README.terminfo.rst
Executable file
@@ -0,0 +1,90 @@
|
||||
Terminfo Entries
|
||||
================
|
||||
|
||||
:Author: Sebastian J. Bronner <waschtl@sbronner.com>
|
||||
:Date: 2019-11-06
|
||||
:URL: https://aur.archlinux.org/packages/st
|
||||
|
||||
The Problem
|
||||
-----------
|
||||
|
||||
Most Linux-based distributions will have their terminfo entries in the
|
||||
``ncurses`` package. These live in ``/usr/share/terminfo``. There you will find
|
||||
several entries for ``st``. As of ``ncurses-6.1`` as packaged in ArchLinux,
|
||||
these, do not work well with current versions of ``st``.
|
||||
|
||||
Specifically, I have observed the following issues when using the terminfo
|
||||
entries supplied with ``ncurses``:
|
||||
|
||||
* Start ``st``.
|
||||
* Run ``tmux`` in the ``st`` window.
|
||||
* Run ``nvim`` in ``tmux``.
|
||||
|
||||
* ``tmux`` will crash immediately with the following message:
|
||||
|
||||
.. code:: console
|
||||
|
||||
[lost server]
|
||||
%
|
||||
|
||||
* Run ``w3m`` with any URL in ``tmux``.
|
||||
|
||||
* ``w3m`` will not react to any key presses (most notably the arrow keys and
|
||||
``q``) and must be terminated with ``killall w3m``.
|
||||
* The command line returned where ``w3m`` was running will show all the
|
||||
missing keypresses.
|
||||
|
||||
For reference, I performed these tests using the following software versions:
|
||||
``st`` 0.8.2, ``tmux`` 2.9_a, ``neovim`` 0.4.2, and ``w3m``
|
||||
0.5.3.git20190105-1.
|
||||
|
||||
A couple of issues have been filed against ``tmux`` for this. Although it is
|
||||
not a problem with ``tmux`` the issues remain for reference:
|
||||
|
||||
| https://github.com/tmux/tmux/issues/1264
|
||||
| https://github.com/tmux/tmux/issues/1593
|
||||
|
||||
Complications
|
||||
-------------
|
||||
|
||||
While it may be tempting to use the terminfo files shipped with ``st``, that
|
||||
would be a bad idea from a packaging standpoint. There are two reasons for
|
||||
this: (1) As of ``st-0.8.2`` they have errors in them. This has been fixed and
|
||||
will roll out in the next release, though.
|
||||
|
||||
| https://lists.gnu.org/archive/html/bug-ncurses/2019-10/msg00071.html
|
||||
| https://lists.suckless.org/hackers/1911/17006.html
|
||||
|
||||
(2) It is vital that remote terminals connecting via ``ssh`` are known. That is
|
||||
accomplished by having all terminfo files in one package (like ``ncurses``).
|
||||
|
||||
``ncurses`` has released updated terminfo entries. The problem as described
|
||||
above is fixed. However, the updated terminfo entries are not installed on
|
||||
ArchLinux because they were released as a standalone file without a new release
|
||||
of the rest of ``ncurses``.
|
||||
|
||||
The Solution
|
||||
------------
|
||||
|
||||
The solution must be to get the updated terminfo entries packaged for
|
||||
ArchLinux. I believe that the ``ncurses`` package should be updated to that
|
||||
effect.
|
||||
|
||||
https://bugs.archlinux.org/task/57596
|
||||
|
||||
The Workaround
|
||||
--------------
|
||||
|
||||
A somewhat painful, albeit pragmatic, workaround is as follows: A user that
|
||||
encounters issues that are due to mismatched terminfo entries, such as those
|
||||
above, can populate a user-level terminfo database from the terminfo entries
|
||||
supplied by ``st``. The following command will do this:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
tic -sx /usr/share/st/st.info
|
||||
|
||||
The generated terminfo database will most likely be placed in ``~/.terminfo``.
|
||||
The command will print the actual location used. Unfortunately, these files
|
||||
need to be kept up to date by hand. Actually they should probably be removed as
|
||||
soon as a new version of ``ncurses`` is released.
|
||||
10
terminfo.patch
Executable file
10
terminfo.patch
Executable file
@@ -0,0 +1,10 @@
|
||||
--- Makefile.old 2019-02-09 12:50:41.000000000 +0100
|
||||
+++ Makefile 2019-11-07 00:00:24.487953923 +0100
|
||||
@@ -47,7 +47,6 @@
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
|
||||
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
|
||||
- tic -sx st.info
|
||||
@echo Please see the README file regarding the terminfo entry of st.
|
||||
|
||||
uninstall:
|
||||
Reference in New Issue
Block a user