Bug 242560 - devel/unibilium: Switch to active upstream fork
Summary: devel/unibilium: Switch to active upstream fork
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-10 22:40 UTC by Conrad Meyer
Modified: 2022-10-16 15:51 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (chuck)


Attachments
Switch upstream (1.23 KB, patch)
2019-12-14 13:42 UTC, Adam Weinberger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer freebsd_triage 2019-12-10 22:40:10 UTC
The creator of unibilium seems to have abandoned it.  However, neovim depends on it and in particular there are bugfixes for terminal input handling that impact neovim inside tmux or screen only present in the active fork.

So:
Please update the port to the active fork, https://github.com/neovim/unibilium

Suggested patch:
Index: Makefile
===================================================================
--- Makefile	(revision 519781)
+++ Makefile	(working copy)
@@ -4,6 +4,7 @@
 PORTNAME=	unibilium
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.0.0
+PORTREVISION=	1
 CATEGORIES=	devel
 
 MAINTAINER=	chuck@tuffli.net
@@ -14,7 +15,7 @@
 
 USES=		gmake libtool:build pathfix perl5 pkgconfig
 USE_GITHUB=	yes
-GH_ACCOUNT=	mauke
+GH_ACCOUNT=	neovim
 PATHFIX_MAKEFILEIN=	Makefile
 USE_PERL5=	build
 USE_LDCONFIG=	yes


For context, please see:
* https://github.com/mauke?tab=overview&from=2018-12-01&to=2018-12-31 (mauke hasn't been active on Github since 2018-02-08)
* https://github.com/neovim/neovim/issues/10302
* https://github.com/mauke/unibilium/issues/36
* https://github.com/mauke/unibilium/pull/39
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2019-12-10 22:43:42 UTC
CC'ing neovim maintainer, who might also have interest.
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2019-12-11 00:32:49 UTC
This is a definite +1 from me.
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2019-12-11 01:13:08 UTC
Thanks Adam!
Comment 4 chuck 2019-12-11 14:09:30 UTC
Works for me. I picked up unibilium maintenance because of the neovim dependency. If the neovim folks are going to make updates, we should absolutely switch.
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2019-12-11 15:00:45 UTC
So the problem with the patch is that the neovim/unibilium 2.0.0 release is the same as mauke/unibilium. All the fixes have been committed after that.

So, I wanted to check with you first, Chuck and Conrad. I can commit the switch now, which only sets the new upstream (and I think the PORTREVISION bump becomes unnecessary then). Or, I can point it at the most recent commit. Or, we can wait until (if) neovim actually cuts a new release (they don't always cut releases from their deps).
Comment 6 Conrad Meyer freebsd_committer freebsd_triage 2019-12-11 16:29:15 UTC
Ah, in that case please make the appropriate changes to point the port at something post-2.0.0 :-).  I neglected to do so in my patch above, sorry.

I'm trying to switch to nvim at the moment and my workflow is usually vim/nvim under screen.  And for better or worse, I am in the habit of using Home/End keys.  So I find it very frustrating :-).

My use case only needs up to https://github.com/neovim/unibilium/commit/7fba99c8876968982f5217eaf9f3474d7ed59d98 , if we want to pick an arbitrary commit between 2.0.0 and master.  But I would also be fine just taking the master branch.
Comment 7 Conrad Meyer freebsd_committer freebsd_triage 2019-12-11 16:30:07 UTC
We could also (orthogonal, I think, unless they're extremely quick about it) ask the neovim folks to cut a 2.0.1.
Comment 8 Adam Weinberger freebsd_committer freebsd_triage 2019-12-12 15:41:11 UTC
Well, certainly having them cut a release is the pedantically best option. But there's really no harm in just updating unibilium to a GitHub commit release.

Also, just FTR, Conrad: Home/End works fine in neovim under tmux.
Comment 9 Conrad Meyer freebsd_committer freebsd_triage 2019-12-12 20:37:47 UTC
(In reply to Adam Weinberger from comment #8)
> Also, just FTR, Conrad: Home/End works fine in neovim under tmux.

Sure; they have different terminfo profiles and it's possible screen's trips the bug in unibilium while tmux's does not.  screen is just the one I happen to use. :-)  I think theoretically a weird enough real terminal or terminal emulator other than wrappers like tmux and screen could trip this, although in practice this doesn't seem to happen.
Comment 10 Adam Weinberger freebsd_committer freebsd_triage 2019-12-13 13:01:28 UTC
Chuck, what would you like to do here?

I think Conrad and I are both advocating for updating the unibilium port to a GH commit snapshot (whatever the latest commit hash is).
Comment 11 chuck 2019-12-13 15:15:10 UTC
Yup, I agree with Adam and Conrad that the GH snapshot is the best approach. Thank you both for doing this!
Comment 12 Adam Weinberger freebsd_committer freebsd_triage 2019-12-14 13:42:08 UTC
Created attachment 209940 [details]
Switch upstream

Conrad,

I'm attaching a diff to switch unibilium to the latest neovim commit. Please give it a try and let me know if it works.

I was wrong about home/end working for me in nvim under tmux on FreeBSD. They do not work for me, and they don't work after this patch either. Something else is up.
Comment 13 commit-hook freebsd_committer freebsd_triage 2019-12-30 18:16:40 UTC
A commit references this bug:

Author: adamw
Date: Mon Dec 30 18:16:09 UTC 2019
New revision: 521560
URL: https://svnweb.freebsd.org/changeset/ports/521560

Log:
  unibilium: Switch to neovim fork

  github/mauke/unibilium has been abandoned by the developer. As possibly
  the only project that actually uses it, neovim has forked it and
  continues development of it. This commit switches our port to that fork.

  The original intent is to fix home/end keys in neovim under screen. Those
  keys do not work in tmux even after this commit, so that will need some
  attention.

  PR:		242560
  Submitted by:	cem
  Approved by:	maintainer (chuck tuffli net)

Changes:
  head/devel/unibilium/Makefile
  head/devel/unibilium/distinfo
Comment 14 Adam Weinberger freebsd_committer freebsd_triage 2019-12-30 18:28:36 UTC
OK. So, I've committed the patch, but I don't know that that'll fix anything.

Unibilium loads its terminal database from terminfo dirs, which AFAIK FreeBSD does not use. Take a look at the TERMINFO_DIRS stuff in https://github.com/neovim/unibilium. I suspect that we'll need to do something else to get it working.

Can either of you speak to this?
Comment 15 Conrad Meyer freebsd_committer freebsd_triage 2020-01-04 20:27:46 UTC
I updated unibilium, libtermkey, and neovim from pkg and HOME/END don't work under screen for me, either :-/.
Comment 16 mindmix 2021-07-10 16:46:03 UTC
Change the USES line
from
USES=           gmake libtool:build pathfix perl5 pkgconfig

to
USES=           gmake libtool:build pathfix perl5 pkgconfig terminfo-db

Then recompile unibilium and ship it
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2022-08-07 23:11:59 UTC
Ping
Comment 18 Adam Weinberger freebsd_committer freebsd_triage 2022-08-10 14:45:04 UTC
Thanks for the ping, Daniel.

Folks, is this still an issue? I don't have any terminal issues at this time.
Comment 19 Adam Weinberger freebsd_committer freebsd_triage 2022-10-16 15:51:54 UTC
I'm closing this issue. I assume from the lack of responses that everything is working as intended now.