Skip to content

Commit

Permalink
app-admin/lnav: Add 0.11.0
Browse files Browse the repository at this point in the history
* Remove the unicode USE flag

lnav did not build successfully when this USE flag was disabled. Since
there are not many use cases for not using unicode today, this commit
fixes the issue by removing the USE flag and enabling unicode support
unconditionally.

* Depend on openssh[ssl]

See tstack/lnav#865.

* Conditionally build ssh keys

This commit patches lnav so that it only build ssh keys when tests are
run. This makes openssh a conditional dependency.

See tstack/lnav#1041.

* Filter LTO flags

Closes: #27130
Closes: https://bugs.gentoo.org/777981
Closes: https://bugs.gentoo.org/835636
Closes: https://bugs.gentoo.org/854123
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
bowlofeggs authored and thesamesam committed Sep 9, 2022
1 parent 337a2d6 commit f75f598
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-admin/lnav/Manifest
@@ -1 +1,2 @@
DIST lnav-0.10.1.tar.gz 5707151 BLAKE2B ae82b705830c6ea38e2fa4f3832a2fd1d8ce8b5ef00d6a3fe750e4f5e7080ae29fde845f2c5055e2684aad1959368ff90abdc130130f8d6f0152426487e7396c SHA512 fff9632c1acbef80ba9d4214fd3ef485727792353fe493cfa4f2e9412bb371f50f2e1a735ded3d7bd8b16df5e93e03b0f3def296770e7dd0ad2206fd9f94690d
DIST lnav-0.11.0.tar.gz 9586979 BLAKE2B fa333d2dbc3c2a5cb8b96ea4cbf84412be117b9d9ec999bab784e7aefab25cd01edcb65617468b8a1fbc46d554cf20a02bc901c9d75f2c5831359da37a19fd22 SHA512 f10938aacb1e170a6912090c5de8e85e9aae5bc456e57b49192a21020e7dfa20414d1f5b66fd25b3c1ea5a3d1fd3bd92af6fe7e0c6b73953688c3d861266fd97
34 changes: 34 additions & 0 deletions app-admin/lnav/files/lnav-0.11.0-conditional-ssh-keygen.patch
@@ -0,0 +1,34 @@
From b16833392b74826f8cd437675fc29e4a0b88efcd Mon Sep 17 00:00:00 2001
From: Randy Barlow <randy@electronsweatshop.com>
Date: Sun, 4 Sep 2022 00:03:33 -0400
Subject: [PATCH] Only build ssh keys when needed

I believe the test/remote folder only needs to be setup for
test/test_remote.sh. Prior to this commit, it was being built during
make, rather than just during make check. This commit adjusts things so
that the test/remote folder is only generated during make check, and
only when test/test_remote.sh is being executed.

Fixes #1040

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
---
test/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index fd09a656..457f3cb0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -478,7 +478,7 @@ DISTCLEANFILES = \
empty \
scripts-empty

-all-local: remote/ssh_host_dsa_key remote/ssh_host_rsa_key remote/id_rsa
+test_remote.sh.log: remote/ssh_host_dsa_key remote/ssh_host_rsa_key remote/id_rsa

distclean-local:
$(RM_V)rm -rf remote remote-tmp not:a:remote:dir
--
2.37.2

67 changes: 67 additions & 0 deletions app-admin/lnav/files/lnav-0.11.0-disable-tests.patch
@@ -0,0 +1,67 @@
From 70231dce88cf47f2f3e2b396fe0623ea74eeadfc Mon Sep 17 00:00:00 2001
From: Randy Barlow <randy@electronsweatshop.com>
Date: Sat, 3 Sep 2022 18:13:08 -0400
Subject: [PATCH] Disable some flaky tests

Certain tests commented out for stability reasons:
* listview: Fails when building inside sandbox
https://github.com/tstack/lnav/issues/1039
* mvattrline: Fails on some testers boxes. Documented here:
https://github.com/tstack/lnav/issues/911
* logfile: Flaky. Fails some times and not others. i.e. Race condition
* tui: Can hang the build

Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
---
test/Makefile.am | 8 --------
1 file changed, 8 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index fd09a656..07d6758e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -188,10 +188,7 @@ dist_noinst_SCRIPTS = \
test_grep_proc.sh \
test_json_format.sh \
test_line_buffer.sh \
- test_listview.sh \
- test_logfile.sh \
test_meta.sh \
- test_mvwattrline.sh \
test_regex101.sh \
test_remote.sh \
test_scripts.sh \
@@ -211,7 +208,6 @@ dist_noinst_SCRIPTS = \
test_sql_xml_func.sh \
test_sql_yaml_func.sh \
test_text_file.sh \
- test_tui.sh \
test_view_colors.sh \
test_vt52_curses.sh \
test_pretty_print.sh
@@ -391,14 +387,11 @@ TESTS = \
test_cmds.sh \
test_config.sh \
test_events.sh \
- test_listview.sh \
test_meta.sh \
- test_mvwattrline.sh \
test_grep_proc.sh \
test_grep_proc2 \
test_json_format.sh \
test_log_accel \
- test_logfile.sh \
test_reltime \
test_scripts.sh \
test_sessions.sh \
@@ -417,7 +410,6 @@ TESTS = \
test_sql_xml_func.sh \
test_sql_yaml_func.sh \
test_text_file.sh \
- test_tui.sh \
test_data_parser.sh \
test_pretty_print.sh \
test_view_colors.sh \
--
2.37.2

56 changes: 56 additions & 0 deletions app-admin/lnav/lnav-0.11.0.ebuild
@@ -0,0 +1,56 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools flag-o-matic

DESCRIPTION="A curses-based tool for viewing and analyzing log files"
HOMEPAGE="https://lnav.org"
SRC_URI="https://github.com/tstack/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="pcap test"
RESTRICT="!test? ( test )"

RDEPEND="
app-arch/bzip2:0=
app-arch/libarchive:=
>=dev-db/sqlite-3.9.0
dev-libs/libpcre[cxx]
>=net-misc/curl-7.23.0
sys-libs/ncurses:=
sys-libs/readline:=
sys-libs/zlib:=
pcap? ( net-analyzer/wireshark[tshark] )"
# The tests use ssh-keygen and use dsa and rsa keys (which is why ssl is required)
DEPEND="${RDEPEND}
test? (
net-misc/openssh[ssl]
dev-cpp/doctest
)"

DOCS=( AUTHORS NEWS README )

PATCHES=(
"${FILESDIR}"/${PN}-0.11.0-disable-tests.patch
# https://github.com/tstack/lnav/pull/1041
"${FILESDIR}"/${PN}-0.11.0-conditional-ssh-keygen.patch
)

src_prepare() {
default

eautoreconf
}

src_configure() {
filter-lto

econf \
--disable-static \
--with-ncurses \
$(use_with test system-doctest)
}
3 changes: 3 additions & 0 deletions app-admin/lnav/metadata.xml
Expand Up @@ -17,4 +17,7 @@
<upstream>
<remote-id type="github">tstack/lnav</remote-id>
</upstream>
<use>
<flag name="pcap">Enable support for pcap files.</flag>
</use>
</pkgmetadata>

0 comments on commit f75f598

Please sign in to comment.