summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/Makefile105
-rw-r--r--release/README.md4
-rw-r--r--release/lnav-screenshot.terminal453
-rw-r--r--release/lnav.spec.in93
-rwxr-xr-xrelease/loggen.py225
-rwxr-xr-xrelease/makespec.sh13
-rwxr-xr-xrelease/spectrolog.py114
-rwxr-xr-xrelease/tail-demo.sh19
-rw-r--r--release/vagrant-static/Vagrantfile110
-rwxr-xr-xrelease/vagrant-static/build-pkg.sh30
-rwxr-xr-xrelease/vagrant-static/build.sh84
-rw-r--r--release/vagrant-static/musl-pkg.sh24
-rwxr-xr-xrelease/vagrant-static/pkg.sh22
-rw-r--r--release/vagrant-static/provision-pkg.sh7
-rwxr-xr-xrelease/vagrant-static/provision.sh152
15 files changed, 1455 insertions, 0 deletions
diff --git a/release/Makefile b/release/Makefile
new file mode 100644
index 0000000..f141740
--- /dev/null
+++ b/release/Makefile
@@ -0,0 +1,105 @@
+
+VERSION=0.11.2
+
+VERSION_TAG=v$(VERSION)
+
+SRC_VERSION=master
+
+outbox:
+ mkdir -p $@
+
+clean-outbox: outbox
+ rm -f outbox/*
+
+PACKAGE_URLS = \
+ https://www.libarchive.org/downloads/libarchive-3.6.2.tar.gz \
+ https://ftp.gnu.org/gnu/make/make-4.2.1.tar.gz \
+ ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.4.tar.gz \
+ https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.gz \
+ https://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz \
+ https://zlib.net/zlib-1.2.13.tar.gz \
+ https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz \
+ https://www.sqlite.org/2023/sqlite-autoconf-3420000.tar.gz \
+ https://www.openssl.org/source/openssl-1.0.2n.tar.gz \
+ https://www.libssh2.org/download/libssh2-1.11.0.tar.gz \
+ https://curl.se/download/curl-8.1.2.tar.gz \
+ https://tukaani.org/xz/xz-5.4.3.tar.gz
+
+.PHONY: linux freebsd pkger download-pkgs musl
+
+%-vm: %
+ cd vagrant-static && vagrant up $<
+
+download-pkgs:
+ mkdir -p vagrant-static/pkgs && cd vagrant-static/pkgs && \
+ for pkg in $(PACKAGE_URLS); do \
+ if ! wget -N $${pkg}; then \
+ exit 1; \
+ fi \
+ done
+
+%-build: % %-vm
+ cd vagrant-static && vagrant ssh $< -c "/vagrant/build.sh ${SRC_VERSION}"
+
+%-package: % clean-outbox %-build
+ mkdir -p $<-pkg/lnav-${VERSION}
+ cp ../README ../NEWS.md $<-pkg/lnav-${VERSION}
+ mv vagrant-static/lnav $<-pkg/lnav-${VERSION}
+ cd $<-pkg && zip -r ../outbox/lnav-${VERSION}-x86_64-linux-$<.zip lnav-${VERSION}
+ rm -rf $<-pkg
+
+linux-ospkg: pkger-vm linux-package
+ rm -f vagrant-static/lnav\*.deb vagrant-static/lnav\*.rpm
+ cd vagrant-static && vagrant ssh pkger -c "/vagrant/build-pkg.sh ${VERSION}"
+ mv vagrant-static/lnav*.deb vagrant-static/lnav*.rpm outbox/
+
+osx-build:
+ rm -rf osx-build-dir
+ mkdir -p osx-build-dir
+ cd ../ && ./autogen.sh
+ cd osx-build-dir && \
+ ../../configure --enable-static \
+ --with-readline=/usr/local/opt/readline \
+ --with-sqlite3=/usr/local/opt/sqlite \
+ --with-libarchive=/usr/local/opt/libarchive \
+ "CXXFLAGS=-I/usr/local/opt/ncurses/include -g1 -O2" \
+ "CFLAGS=-I/usr/local/opt/ncurses/include -g1 -O2" \
+ "LDFLAGS=-L/usr/local/opt/ncurses/lib -L/usr/local/opt/xz/lib" \
+ "LIBS=-llzma -lzstd -lbrotlidec-static -liconv -llz4" \
+ && make -j8 && make dist -j8 && make dist-bzip2
+
+osx-package: clean-outbox osx-build
+ mkdir -p osx-pkg/lnav-${VERSION}
+ git pull --rebase
+ cp ../README ../NEWS.md osx-pkg/lnav-${VERSION}
+ cp osx-build-dir/src/lnav osx-pkg/lnav-${VERSION}
+ cp osx-build-dir/lnav-${VERSION}.tar.gz outbox/
+ cp osx-build-dir/lnav-${VERSION}.tar.bz2 outbox/
+ cd osx-pkg && zip -r ../outbox/lnav-${VERSION}-x86_64-macos.zip lnav-${VERSION}
+ rm -rf osx-pkg
+
+release-NEWS.md: ../NEWS.md
+ sed -n "/^## lnav v${VERSION}/,/^## /p" $< | sed '$$d' > $@
+
+release-tag: release-NEWS.md
+ gh release create ${VERSION_TAG} \
+ -d \
+ -t "lnav v${VERSION}" \
+ --notes-file release-NEWS.md
+
+release: osx-package musl-package release-NEWS.md
+ gh release edit ${VERSION_TAG} \
+ -t "lnav v${VERSION}" \
+ --notes-file release-NEWS.md
+ gh release upload ${VERSION_TAG} outbox/*
+
+push:
+ env LANG=UTF-8 package_cloud push tstack/lnav/ubuntu/lucid outbox/lnav*.deb
+ env LANG=UTF-8 package_cloud push tstack/lnav/el/5 outbox/lnav-0.11.2-1.x86_64.rpm
+
+clean:
+ cd vagrant-static && vagrant destroy -f
+ rm -rf vagrant-static/pkgs
+
+lnav.spec: lnav.spec.in makespec.sh
+ ./makespec.sh < lnav.spec.in > $@
diff --git a/release/README.md b/release/README.md
new file mode 100644
index 0000000..1832b2a
--- /dev/null
+++ b/release/README.md
@@ -0,0 +1,4 @@
+# Release
+
+This directory contains the [Makefile](Makefile) and scripts used to build the
+binaries for a release.
diff --git a/release/lnav-screenshot.terminal b/release/lnav-screenshot.terminal
new file mode 100644
index 0000000..c22cbf4
--- /dev/null
+++ b/release/lnav-screenshot.terminal
@@ -0,0 +1,453 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>WindowList</key>
+ <array>
+ <dict>
+ <key>Origin</key>
+ <string>{2361, 836}</string>
+ <key>ShowsTabBar</key>
+ <false/>
+ <key>ShowsTabBarInFullScreen</key>
+ <false/>
+ <key>Window Settings</key>
+ <array>
+ <dict>
+ <key>Tab Column Count</key>
+ <integer>114</integer>
+ <key>Tab Row Count</key>
+ <integer>35</integer>
+ <key>Tab Scrollback Restorable</key>
+ <true/>
+ <key>Tab Session Class ID</key>
+ <string>E5A9F716-7408-4C2C-8F6D-F626F389C346</string>
+ <key>Tab Settings</key>
+ <dict>
+ <key>ANSIBlueColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OVU5TUkdCXE5TQ29s
+ b3JTcGFjZVYkY2xhc3NPECowLjAw
+ MDUwNTEyMTkyOTggMC40NTMwNDQz
+ ODc3IDAuODI4MjczNjA3MwAQAYAC
+ 0hAREhNaJGNsYXNzbmFtZVgkY2xh
+ c3Nlc1dOU0NvbG9yohIUWE5TT2Jq
+ ZWN0XxAPTlNLZXllZEFyY2hpdmVy
+ 0RcYVHJvb3SAAQgRGiMtMjc7QUhO
+ W2KPkZOYo6y0t8DS1doAAAAAAAAB
+ AQAAAAAAAAAZAAAAAAAAAAAAAAAA
+ AAAA3A==
+ </data>
+ <key>ANSIBrightBlueColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OVU5TUkdCXE5TQ29s
+ b3JTcGFjZVYkY2xhc3NPEBwwIDAu
+ NTk4MzQyOTQ5MSAwLjk5ODE4ODk3
+ MjUAEAGAAtIQERITWiRjbGFzc25h
+ bWVYJGNsYXNzZXNXTlNDb2xvcqIS
+ FFhOU09iamVjdF8QD05TS2V5ZWRB
+ cmNoaXZlctEXGFRyb290gAEIERoj
+ LTI3O0FITltigYOFipWepqmyxMfM
+ AAAAAAAAAQEAAAAAAAAAGQAAAAAA
+ AAAAAAAAAAAAAM4=
+ </data>
+ <key>ANSIRedColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OVU5TUkdCXE5TQ29s
+ b3JTcGFjZVYkY2xhc3NPECkwLjc0
+ MzAzNjY4NDggMC4wMzYwNjI5Mjkw
+ OSAwLjA5ODYwMDQ3MDg0ABABgALS
+ EBESE1okY2xhc3NuYW1lWCRjbGFz
+ c2VzV05TQ29sb3KiEhRYTlNPYmpl
+ Y3RfEA9OU0tleWVkQXJjaGl2ZXLR
+ FxhUcm9vdIABCBEaIy0yNztBSE5b
+ Yo6Qkpeiq7O2v9HU2QAAAAAAAAEB
+ AAAAAAAAABkAAAAAAAAAAAAAAAAA
+ AADb
+ </data>
+ <key>ANSIYellowColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OVU5TUkdCXE5TQ29s
+ b3JTcGFjZVYkY2xhc3NPECcwLjU5
+ MzYzNjA0OSAwLjYwMTM3MTQzMzQg
+ MC4wMjMwMzQ5ODc5OAAQAYAC0hAR
+ EhNaJGNsYXNzbmFtZVgkY2xhc3Nl
+ c1dOU0NvbG9yohIUWE5TT2JqZWN0
+ XxAPTlNLZXllZEFyY2hpdmVy0RcY
+ VHJvb3SAAQgRGiMtMjc7QUhOW2KM
+ jpCVoKmxtL3P0tcAAAAAAAABAQAA
+ AAAAAAAZAAAAAAAAAAAAAAAAAAAA
+ 2Q==
+ </data>
+ <key>BackgroundBlur</key>
+ <real>0.10492684248554913</real>
+ <key>BackgroundColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OV05TV2hpdGVcTlND
+ b2xvclNwYWNlViRjbGFzc00wIDAu
+ ODUwMDAwMDIAEAOAAtIQERITWiRj
+ bGFzc25hbWVYJGNsYXNzZXNXTlND
+ b2xvcqISFFhOU09iamVjdF8QD05T
+ S2V5ZWRBcmNoaXZlctEXGFRyb290
+ gAEIERojLTI3O0FIUF1kcnR2e4aP
+ l5qjtbi9AAAAAAAAAQEAAAAAAAAA
+ GQAAAAAAAAAAAAAAAAAAAL8=
+ </data>
+ <key>Bell</key>
+ <false/>
+ <key>CursorColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OVU5TUkdCXE5TQ29s
+ b3JTcGFjZVYkY2xhc3NPECcwLjgy
+ MjYwNTI5ODkgMC4yMTIxNjI2MDU5
+ IDAuNTc2NDI4NDQzMgAQAYAC0hAR
+ EhNaJGNsYXNzbmFtZVgkY2xhc3Nl
+ c1dOU0NvbG9yohIUWE5TT2JqZWN0
+ XxAPTlNLZXllZEFyY2hpdmVy0RcY
+ VHJvb3SAAQgRGiMtMjc7QUhOW2KM
+ jpCVoKmxtL3P0tcAAAAAAAABAQAA
+ AAAAAAAZAAAAAAAAAAAAAAAAAAAA
+ 2Q==
+ </data>
+ <key>DisableANSIColor</key>
+ <false/>
+ <key>Font</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGGBlYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKQHCBESVSRu
+ dWxs1AkKCwwNDg8QVk5TU2l6ZVhO
+ U2ZGbGFnc1ZOU05hbWVWJGNsYXNz
+ I0AkAAAAAAAAEBCAAoADVk1vbmFj
+ b9ITFBUWWiRjbGFzc25hbWVYJGNs
+ YXNzZXNWTlNGb250ohUXWE5TT2Jq
+ ZWN0XxAPTlNLZXllZEFyY2hpdmVy
+ 0RobVHJvb3SAAQgRGiMtMjc8QktS
+ W2JpcnR2eH+Ej5ifoqu9wMUAAAAA
+ AAABAQAAAAAAAAAcAAAAAAAAAAAA
+ AAAAAAAAxw==
+ </data>
+ <key>FontAntialias</key>
+ <true/>
+ <key>FontHeightSpacing</key>
+ <integer>1</integer>
+ <key>FontWidthSpacing</key>
+ <integer>1</integer>
+ <key>Linewrap</key>
+ <true/>
+ <key>ProfileCurrentVersion</key>
+ <real>2.02</real>
+ <key>SelectionColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OV05TV2hpdGVcTlND
+ b2xvclNwYWNlViRjbGFzc0swLjI1
+ NDAzMjI1ABADgALSEBESE1okY2xh
+ c3NuYW1lWCRjbGFzc2VzV05TQ29s
+ b3KiEhRYTlNPYmplY3RfEA9OU0tl
+ eWVkQXJjaGl2ZXLRFxhUcm9vdIAB
+ CBEaIy0yNztBSFBdZHBydHmEjZWY
+ obO2uwAAAAAAAAEBAAAAAAAAABkA
+ AAAAAAAAAAAAAAAAAAC9
+ </data>
+ <key>ShowWindowSettingsNameInTitle</key>
+ <false/>
+ <key>TerminalType</key>
+ <string>xterm-256color</string>
+ <key>TextBoldColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OV05TV2hpdGVcTlND
+ b2xvclNwYWNlViRjbGFzc0IxABAD
+ gALSEBESE1okY2xhc3NuYW1lWCRj
+ bGFzc2VzV05TQ29sb3KiEhRYTlNP
+ YmplY3RfEA9OU0tleWVkQXJjaGl2
+ ZXLRFxhUcm9vdIABCBEaIy0yNztB
+ SFBdZGdpa3B7hIyPmKqtsgAAAAAA
+ AAEBAAAAAAAAABkAAAAAAAAAAAAA
+ AAAAAAC0
+ </data>
+ <key>TextColor</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGFRZYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKMHCA9VJG51
+ bGzTCQoLDA0OV05TV2hpdGVcTlND
+ b2xvclNwYWNlViRjbGFzc0swLjk0
+ NzU4MDY0ABADgALSEBESE1okY2xh
+ c3NuYW1lWCRjbGFzc2VzV05TQ29s
+ b3KiEhRYTlNPYmplY3RfEA9OU0tl
+ eWVkQXJjaGl2ZXLRFxhUcm9vdIAB
+ CBEaIy0yNztBSFBdZHBydHmEjZWY
+ obO2uwAAAAAAAAEBAAAAAAAAABkA
+ AAAAAAAAAAAAAAAAAAC9
+ </data>
+ <key>UseBoldFonts</key>
+ <true/>
+ <key>UseBrightBold</key>
+ <false/>
+ <key>WindowTitle</key>
+ <string>Terminal</string>
+ <key>columnCount</key>
+ <integer>156</integer>
+ <key>deleteSendsBackspace</key>
+ <false/>
+ <key>keyMapBoundKeys</key>
+ <dict>
+ <key>$F700</key>
+ <string>Oa</string>
+ <key>$F701</key>
+ <string>Ob</string>
+ <key>$F708</key>
+ <string>[25~</string>
+ <key>$F709</key>
+ <string>[26~</string>
+ <key>$F70A</key>
+ <string>[28~</string>
+ <key>$F70B</key>
+ <string>[29~</string>
+ <key>$F70C</key>
+ <string>[31~</string>
+ <key>$F70D</key>
+ <string>[22~</string>
+ <key>$F70E</key>
+ <string>[33~</string>
+ <key>$F70F</key>
+ <string>[34~</string>
+ <key>$F729</key>
+ <string>scrollToBeginningOfDocument:</string>
+ <key>$F72B</key>
+ <string></string>
+ <key>$F72C</key>
+ <string>scrollPageUp:</string>
+ <key>$F72D</key>
+ <string>scrollPageDown:</string>
+ <key>F704</key>
+ <string>OP</string>
+ <key>F705</key>
+ <string>OQ</string>
+ <key>F706</key>
+ <string>OR</string>
+ <key>F707</key>
+ <string>OS</string>
+ <key>F708</key>
+ <string>[15~</string>
+ <key>F709</key>
+ <string>[17~</string>
+ <key>F70A</key>
+ <string>[18~</string>
+ <key>F70B</key>
+ <string>[19~</string>
+ <key>F70C</key>
+ <string>[20~</string>
+ <key>F70D</key>
+ <string>[21~</string>
+ <key>F70E</key>
+ <string>[23~</string>
+ <key>F70F</key>
+ <string>[24~</string>
+ <key>F710</key>
+ <string>[25~</string>
+ <key>F711</key>
+ <string>[26~</string>
+ <key>F712</key>
+ <string>[28~</string>
+ <key>F713</key>
+ <string>[29~</string>
+ <key>F714</key>
+ <string>[31~</string>
+ <key>F715</key>
+ <string>[32~</string>
+ <key>F716</key>
+ <string>[33~</string>
+ <key>F717</key>
+ <string>[34~</string>
+ <key>F728</key>
+ <string>[3~</string>
+ <key>F729</key>
+ <string>OH</string>
+ <key>F72B</key>
+ <string>OF</string>
+ <key>F72C</key>
+ <string>[5~</string>
+ <key>F72D</key>
+ <string>[6~</string>
+ <key>^F702</key>
+ <string>Od</string>
+ <key>^F703</key>
+ <string>Oc</string>
+ <key>~F702</key>
+ <string>b</string>
+ <key>~F703</key>
+ <string>f</string>
+ <key>~F704</key>
+ <string>[17~</string>
+ <key>~F705</key>
+ <string>[18~</string>
+ <key>~F706</key>
+ <string>[19~</string>
+ <key>~F707</key>
+ <string>[20~</string>
+ <key>~F708</key>
+ <string>[21~</string>
+ <key>~F709</key>
+ <string>[23~</string>
+ <key>~F70A</key>
+ <string>[24~</string>
+ <key>~F70B</key>
+ <string>[25~</string>
+ <key>~F70C</key>
+ <string>[26~</string>
+ <key>~F70D</key>
+ <string>[28~</string>
+ <key>~F70E</key>
+ <string>[29~</string>
+ <key>~F70F</key>
+ <string>[31~</string>
+ <key>~F710</key>
+ <string>[32~</string>
+ <key>~F711</key>
+ <string>[33~</string>
+ <key>~F712</key>
+ <string>[34~</string>
+ </dict>
+ <key>mouseLeftClick</key>
+ <data>
+ BAtzdHJlYW10eXBlZIHoA4QBQISE
+ hAhOU051bWJlcgCEhAdOU1ZhbHVl
+ AISECE5TT2JqZWN0AIWEASqEhAFj
+ lwGG
+ </data>
+ <key>mouseMiddleClick</key>
+ <data>
+ BAtzdHJlYW10eXBlZIHoA4QBQISE
+ hAhOU051bWJlcgCEhAdOU1ZhbHVl
+ AISECE5TT2JqZWN0AIWEASqEhAFj
+ lwGG
+ </data>
+ <key>mouseRightClick</key>
+ <data>
+ BAtzdHJlYW10eXBlZIHoA4QBQISE
+ hAhOU051bWJlcgCEhAdOU1ZhbHVl
+ AISECE5TT2JqZWN0AIWEASqEhAFj
+ lwGG
+ </data>
+ <key>mouseWheel</key>
+ <data>
+ BAtzdHJlYW10eXBlZIHoA4QBQISE
+ hAhOU051bWJlcgCEhAdOU1ZhbHVl
+ AISECE5TT2JqZWN0AIWEASqEhAFj
+ lwGG
+ </data>
+ <key>mouseWheelEmulation</key>
+ <data>
+ BAtzdHJlYW10eXBlZIHoA4QBQISE
+ hAhOU051bWJlcgCEhAdOU1ZhbHVl
+ AISECE5TT2JqZWN0AIWEASqEhAFj
+ lwGG
+ </data>
+ <key>name</key>
+ <string>ProTerminalLatest</string>
+ <key>rowCount</key>
+ <integer>49</integer>
+ <key>shellExitAction</key>
+ <integer>0</integer>
+ <key>type</key>
+ <string>Window Settings</string>
+ <key>useOptionAsMetaKey</key>
+ <true/>
+ </dict>
+ <key>Tab Settings Name</key>
+ <string>ProTerminalLatest</string>
+ <key>TabSelected</key>
+ <true/>
+ </dict>
+ </array>
+ <key>WindowNumber</key>
+ <integer>5</integer>
+ </dict>
+ <dict>
+ <key>Origin</key>
+ <string>{2106, 1046}</string>
+ <key>ShowsTabBar</key>
+ <false/>
+ <key>ShowsTabBarInFullScreen</key>
+ <false/>
+ <key>Window Settings</key>
+ <array>
+ <dict>
+ <key>Tab Column Count</key>
+ <integer>171</integer>
+ <key>Tab Row Count</key>
+ <integer>63</integer>
+ <key>Tab Scrollback Restorable</key>
+ <true/>
+ <key>Tab Session Class ID</key>
+ <string>6DC31F6C-EFF7-4364-93B8-EBD258566CB7</string>
+ <key>Tab Settings</key>
+ <dict>
+ <key>Font</key>
+ <data>
+ YnBsaXN0MDDUAQIDBAUGGBlYJHZl
+ cnNpb25YJG9iamVjdHNZJGFyY2hp
+ dmVyVCR0b3ASAAGGoKQHCBESVSRu
+ dWxs1AkKCwwNDg8QVk5TU2l6ZVhO
+ U2ZGbGFnc1ZOU05hbWVWJGNsYXNz
+ I0AmAAAAAAAAEBCAAoADXU1lbmxv
+ LVJlZ3VsYXLSExQVFlokY2xhc3Nu
+ YW1lWCRjbGFzc2VzVk5TRm9udKIV
+ F1hOU09iamVjdF8QD05TS2V5ZWRB
+ cmNoaXZlctEaG1Ryb290gAEIERoj
+ LTI3PEJLUltiaXJ0dniGi5afpqmy
+ xMfMAAAAAAAAAQEAAAAAAAAAHAAA
+ AAAAAAAAAAAAAAAAAM4=
+ </data>
+ <key>FontAntialias</key>
+ <true/>
+ <key>FontWidthSpacing</key>
+ <real>1.004032258064516</real>
+ <key>ProfileCurrentVersion</key>
+ <real>2.02</real>
+ <key>name</key>
+ <string>Basic</string>
+ <key>type</key>
+ <string>Window Settings</string>
+ </dict>
+ <key>Tab Settings Name</key>
+ <string>Basic</string>
+ <key>TabSelected</key>
+ <true/>
+ </dict>
+ </array>
+ <key>WindowNumber</key>
+ <integer>1</integer>
+ </dict>
+ </array>
+ <key>name</key>
+ <string>lnav-screenshot</string>
+ <key>type</key>
+ <string>Window Group</string>
+</dict>
+</plist>
diff --git a/release/lnav.spec.in b/release/lnav.spec.in
new file mode 100644
index 0000000..3e4e299
--- /dev/null
+++ b/release/lnav.spec.in
@@ -0,0 +1,93 @@
+# vim: set ts=4 sw=4 et:
+#
+# spec file for package lnav
+#
+# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2010-2013 Pascal Bleser <pascal.bleser@opensuse.org>
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+Name: lnav
+Version: @@LNAV_VERSION_NUMBER@@
+Release: 0
+Summary: Logfile Navigator
+License: BSD-2-Clause
+Group: System/Monitoring
+URL: https://lnav.org
+# Git-Clone: https://github.com/tstack/lnav.git
+# Source: https://github.com/tstack/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source: /github/home/rpmbuild/SOURCES/%{name}-%{version}.tar.gz
+# Source1: lnav.desktop
+BuildRequires: gcc-toolset-12
+BuildRequires: gcc-toolset-12-annobin-plugin-gcc
+BuildRequires: gcc-toolset-12-annobin-annocheck
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libarchive-devel
+BuildRequires: libcurl-devel
+BuildRequires: ncurses-devel
+# Only needed for the tests to run
+BuildRequires: openssh
+BuildRequires: bzip2-devel
+BuildRequires: pcre2-devel
+BuildRequires: readline-devel
+BuildRequires: zlib-devel
+%if 0%{?suse_version}
+BuildRequires: sqlite3-devel >= 3.9.0
+%else
+BuildRequires: sqlite-devel >= 3.9.0
+%endif
+%if 0%{?suse_version} > 0
+BuildRequires: update-desktop-files
+%endif
+
+%description
+The Logfile Navigator, lnav for short, is a curses-based tool for viewing and
+analyzing log files. The value added by lnav over text viewers or editors is
+that it takes advantage of any semantic information that can be gleaned from
+the log file, such as timestamps and log levels. Using this extra semantic
+information, lnav can do things like interleaving messages from different
+files, generate histograms of messages over time, and provide hotkeys for
+navigating through the file. These features are meant to allow the user to
+quickly and efficiently focus on problems.
+
+%prep
+%autosetup -p1
+
+%build
+source /opt/rh/gcc-toolset-12/enable
+(cd /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/plugin/ && ln -s annobin.so gcc-annobin.so)
+autoreconf -fiv
+%configure \
+ --disable-silent-rules \
+ --disable-static \
+ --with-ncurses \
+ --with-readline || cat config.log
+
+%make_build
+
+%install
+%make_install
+
+%if %{defined suse_version}
+install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
+%suse_update_desktop_file -r "%{name}" System Monitor
+%endif
+
+%files
+%license LICENSE
+%doc AUTHORS NEWS.md README
+%{_bindir}/lnav
+%{_mandir}/man1/lnav.1.gz
+%if %{defined suse_version}
+%{_datadir}/applications/%{name}.desktop
+%endif
+
+%changelog
diff --git a/release/loggen.py b/release/loggen.py
new file mode 100755
index 0000000..5e0bbbb
--- /dev/null
+++ b/release/loggen.py
@@ -0,0 +1,225 @@
+#! /usr/bin/env python3
+
+import os
+import sys
+import time
+import uuid
+import shutil
+import random
+import datetime
+
+SYSLOG_DATE_FMT = "%b %d %H:%M:%S"
+ACCESS_LOG_DATE_FMT = "%d/%b/%Y:%H:%M:%S"
+GENERIC_DATE_FMT = "%Y-%m-%dT%H:%M:%S.%%s"
+
+TEST_ADDRESSES = (
+ ["192.0.2.55"] * 20 +
+ ["192.0.2.44"] * 20 +
+ ["192.0.2.3"] * 40 +
+ ["192.0.2.100"] * 10 +
+ ["192.0.2.122"] * 30 +
+ ["192.0.2.42"] * 100
+)
+
+TEST_USERNAMES = [
+ "bob@example.com",
+ "bob@example.com",
+ "bob@example.com",
+ "combatcarl@example.com",
+ "combatcarl@example.com",
+ "combatcarl@example.com",
+ "combatcarl@example.com",
+ "combatcarl@example.com",
+ "combatcarl@example.com",
+ "-",
+ "-",
+ "-",
+ "-",
+ "-",
+ "-",
+]
+
+TEST_METHODS = [
+ "GET",
+ "GET",
+ "GET",
+ "GET",
+ "GET",
+ "GET",
+ "PUT",
+]
+
+PATH_COMPS = "Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua".split()
+
+TEST_URLS = [
+ "/index.html",
+ "/index.html",
+ "/index.html",
+ "/features.html",
+ "/images/compass.jpg",
+ "/obj/1234",
+ "/obj/1235?foo=bar",
+ "/obj/1236?search=demo&start=1",
+]
+
+for index in range(0, 50):
+ path_list = []
+ for count in range(random.randint(2, 8)):
+ path_list.append(random.choice(PATH_COMPS))
+ TEST_URLS.append("/".join(path_list))
+
+TEST_VERSIONS = [
+ "HTTP/1.0",
+ "HTTP/1.0",
+ "HTTP/1.1",
+]
+
+TEST_STATUS = [
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 200,
+ 404,
+ 404,
+ 404,
+ 404,
+ 403,
+ 403,
+ 403,
+ 500
+]
+
+TEST_REFERRERS = [
+ "-",
+ "-",
+ "-",
+ "-",
+ "-",
+ "-",
+ "http://lnav.org/download.html",
+]
+
+TEST_AGENTS = [
+ "-",
+ "-",
+ "-",
+ "-",
+ "Apache-HttpClient/4.2.3 (java 1.5)",
+ "Apache-HttpClient/4.2.3 (java 1.5)",
+ "Apache-HttpClient/4.2.3 (java 1.5)",
+ "Apache-HttpClient/4.2.3 (java 1.5)",
+ "Apache-HttpClient/4.2.3 (java 1.5)",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
+ "Roku4640X/DVP-7.70 (297.70E04154A)",
+ "Roku4640X/DVP-7.70 (297.70E04154A)",
+ "Roku4640X/DVP-7.70 (297.70E04154A)",
+]
+
+START_TIME = datetime.datetime.fromtimestamp(1641898727)
+ACCESS_LOG_CURR_TIME = START_TIME
+SYSLOG_LOG_CURR_TIME = START_TIME
+
+
+def access_log_msgs():
+ global ACCESS_LOG_CURR_TIME
+ while True:
+ ACCESS_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 3))
+ yield '%s - %s [%s +0000] "%s %s %s" %s %s "%s" "%s"\n' % (
+ random.choice(TEST_ADDRESSES),
+ random.choice(TEST_USERNAMES),
+ ACCESS_LOG_CURR_TIME.strftime(ACCESS_LOG_DATE_FMT),
+ random.choice(TEST_METHODS),
+ random.choice(TEST_URLS),
+ random.choice(TEST_VERSIONS),
+ random.choice(TEST_STATUS),
+ int(random.lognormvariate(1, 1) * 1000),
+ random.choice(TEST_REFERRERS),
+ random.choice(TEST_AGENTS)
+ )
+
+
+TEST_PROCS = [
+ "server[123]",
+ "server[123]",
+ "server[123]",
+ "server[121]",
+ "server[124]",
+ "server[123]",
+ "worker[61456]",
+ "worker[61456]",
+ "worker[61457]",
+]
+
+TEST_MSGS = [
+ "Handling request %s" % uuid.uuid4(),
+ "Handling request %s" % uuid.uuid4(),
+ "Handling request %s" % uuid.uuid4(),
+ "Successfully started helper",
+ "Reading from device: /dev/hda",
+ "Received packet from %s" % random.choice(TEST_ADDRESSES),
+ "Received packet from %s" % random.choice(TEST_ADDRESSES),
+ "Received packet from %s" % random.choice(TEST_ADDRESSES),
+]
+
+
+def syslog_msgs():
+ global SYSLOG_LOG_CURR_TIME
+ while True:
+ SYSLOG_LOG_CURR_TIME += datetime.timedelta(seconds=random.randrange(1, 3))
+ yield '%s frontend3 %s: %s\n' % (
+ SYSLOG_LOG_CURR_TIME.strftime(SYSLOG_DATE_FMT),
+ random.choice(TEST_PROCS),
+ random.choice(TEST_MSGS),
+ )
+
+
+try:
+ shutil.rmtree("/tmp/demo")
+ os.makedirs("/tmp/demo")
+except OSError:
+ pass
+
+FILES = [
+ ("/tmp/demo/access_log", access_log_msgs()),
+ ("/tmp/demo/messages", syslog_msgs()),
+]
+
+COUNTER = 0
+while COUNTER < 5000:
+ loop_inc = datetime.timedelta(seconds=random.weibullvariate(1, 1.5) * 500)
+ ACCESS_LOG_CURR_TIME += loop_inc
+ SYSLOG_LOG_CURR_TIME += loop_inc
+ for fname, gen in FILES:
+ for i in range(random.randrange(4, 8)):
+ COUNTER += 1
+ with open(fname, "a+") as fp:
+ if random.uniform(0.0, 1.0) < 0.01:
+ line = next(gen)
+ prefix = line[:50]
+ suffix = line[50:]
+ fp.write(prefix)
+ # time.sleep(random.uniform(0.5, 0.6))
+ fp.write(suffix)
+ else:
+ fp.write(next(gen))
+ # if random.uniform(0.0, 1.0) < 0.010:
+ # fp.truncate(0)
+ time.sleep(random.uniform(0.01, 0.02))
+ # if random.uniform(0.0, 1.0) < 0.001:
+ # os.remove(fname)
diff --git a/release/makespec.sh b/release/makespec.sh
new file mode 100755
index 0000000..98d06da
--- /dev/null
+++ b/release/makespec.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+DEFAULT_VERSION=$(grep AC_INIT ../configure.ac | cut -d, -f2)
+DEFAULT_VERSION=${DEFAULT_VERSION#[}
+DEFAULT_VERSION=${DEFAULT_VERSION%]}
+
+if [ "$GITHUB_REF_TYPE" == 'tag' ]; then
+ export LNAV_VERSION_NUMBER=$(echo ${GITHUB_REF#refs/tags/v} | sed -e 's/-/~/g')
+else
+ export LNAV_VERSION_NUMBER="${DEFAULT_VERSION}^"$(date +%Y%m%d).git$(git rev-parse --short HEAD)
+fi
+
+sed -e "s/@@LNAV_VERSION_NUMBER@@/${LNAV_VERSION_NUMBER}/g"
diff --git a/release/spectrolog.py b/release/spectrolog.py
new file mode 100755
index 0000000..df08a12
--- /dev/null
+++ b/release/spectrolog.py
@@ -0,0 +1,114 @@
+#! /usr/bin/env python
+
+import sys
+import time
+import datetime
+import random
+
+DATE_FMT = "%a %b %d %H:%M:%S %Y"
+
+duration = [] + [80] * 10 + [100] * 10 + [40] * 10
+
+diter = iter(duration)
+
+DURATIONS = (
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 40,
+ 50,
+ 50,
+ 50,
+ 50,
+ 75,
+ 75,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+ 100,
+)
+
+DURATION_FUZZ = (
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -2,
+ -2,
+ -2
+)
+
+while True:
+ print ("[pid: 88186|app: 0|req: 5/19] 127.0.0.1 () {38 vars in 696 bytes} "
+ "[%s] POST /update_metrics => generated 47 bytes "
+ "in %s msecs (HTTP/1.1 200) 9 headers in 378 bytes (1 switches on core 60)" %
+ (datetime.datetime.utcnow().strftime(DATE_FMT),
+ random.choice(DURATIONS) + random.choice(DURATION_FUZZ)))
+ # diter.next()))
+ sys.stdout.flush()
+
+ time.sleep(0.01)
diff --git a/release/tail-demo.sh b/release/tail-demo.sh
new file mode 100755
index 0000000..a9a5998
--- /dev/null
+++ b/release/tail-demo.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+PAUSE_TIME=0.5
+
+while true; do
+ logger "lnav is always looking for new log messages"
+ sleep ${PAUSE_TIME}
+ logger " and files in directories"
+ sleep ${PAUSE_TIME}
+ logger "Filters are always applied as new data is loaded in"
+ logger " which is indicated by the 'Not Shown' count"
+ logger "bad-message-to-filter"
+ sleep ${PAUSE_TIME}
+ logger ""
+ sleep ${PAUSE_TIME}
+ logger "Scroll up to lock the view in place"
+ sleep 3
+ logger "Data is still being read in the meantime"
+done
diff --git a/release/vagrant-static/Vagrantfile b/release/vagrant-static/Vagrantfile
new file mode 100644
index 0000000..98df560
--- /dev/null
+++ b/release/vagrant-static/Vagrantfile
@@ -0,0 +1,110 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# All Vagrant configuration is done below. The "2" in Vagrant.configure
+# configures the configuration version (we support older styles for
+# backwards compatibility). Please don't change it unless you know what
+# you're doing.
+Vagrant.configure(2) do |config|
+ # The most common configuration options are documented and commented below.
+ # For a complete reference, please see the online documentation at
+ # https://docs.vagrantup.com.
+
+ # Every Vagrant development environment requires a box. You can search for
+ # boxes at https://atlas.hashicorp.com/search.
+ config.vm.provider "virtualbox" do |v|
+ v.memory = 2048
+ v.cpus = 4
+ end
+
+ config.vm.synced_folder ".", "/vagrant", type: "nfs"
+ config.vm.define :freebsd do |freebsd|
+ freebsd.vm.network "private_network", :type => 'dhcp'
+ freebsd.vm.provision "shell", path:"pkg.sh"
+ freebsd.vm.provision "shell", path:"provision.sh"
+ freebsd.vm.box = "freebsd/FreeBSD-12.1-RELEASE"
+ freebsd.vm.box_version = "2019.11.01"
+ freebsd.vm.synced_folder ".", "/vagrant", type: "nfs"
+ freebsd.ssh.shell = "sh"
+ freebsd.vm.base_mac = "080027D14C66"
+ freebsd.vm.boot_timeout = 1200
+ end
+
+ config.vm.define :musl do |musl|
+ musl.vbguest.auto_update = false
+ musl.vm.synced_folder ".", "/vagrant", type: "virtualbox"
+ musl.vm.network "private_network", ip: "192.168.56.16"
+ musl.vm.provision "shell", path:"musl-pkg.sh"
+ musl.vm.provision "shell", path:"provision.sh"
+ musl.vm.box = "generic/alpine315"
+ end
+
+ config.vm.define :linux do |linux|
+ linux.vm.network :private_network, ip: "192.168.56.14"
+ linux.vm.provision "shell", path:"pkg.sh"
+ linux.vm.provision "shell", path:"provision.sh"
+ linux.vm.box = "centos/7"
+ end
+
+ config.vm.define :pkger do |pkger|
+ # config.vm.synced_folder ".", "/vagrant", type: "nfs"
+ pkger.vm.network :private_network, ip: "192.168.56.15"
+ pkger.vm.provision "shell", path:"provision-pkg.sh"
+ pkger.vm.box = "ubuntu/xenial64"
+ end
+
+ # Disable automatic box update checking. If you disable this, then
+ # boxes will only be checked for updates when the user runs
+ # `vagrant box outdated`. This is not recommended.
+ # config.vm.box_check_update = false
+
+ # Create a forwarded port mapping which allows access to a specific port
+ # within the machine from a port on the host machine. In the example below,
+ # accessing "localhost:8080" will access port 80 on the guest machine.
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
+
+ # Create a private network, which allows host-only access to the machine
+ # using a specific IP.
+ # config.vm.network "private_network", ip: "192.168.33.10"
+
+ # Create a public network, which generally matched to bridged network.
+ # Bridged networks make the machine appear as another physical device on
+ # your network.
+ # config.vm.network "public_network"
+
+ # Share an additional folder to the guest VM. The first argument is
+ # the path on the host to the actual folder. The second argument is
+ # the path on the guest to mount the folder. And the optional third
+ # argument is a set of non-required options.
+ # config.vm.synced_folder "../data", "/vagrant_data"
+
+ # Provider-specific configuration so you can fine-tune various
+ # backing providers for Vagrant. These expose provider-specific options.
+ # Example for VirtualBox:
+ #
+ # config.vm.provider "virtualbox" do |vb|
+ # # Display the VirtualBox GUI when booting the machine
+ # vb.gui = true
+ #
+ # # Customize the amount of memory on the VM:
+ # vb.memory = "1024"
+ # end
+ #
+ # View the documentation for the provider you are using for more
+ # information on available options.
+
+ # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
+ # such as FTP and Heroku are also available. See the documentation at
+ # https://docs.vagrantup.com/v2/push/atlas.html for more information.
+ # config.push.define "atlas" do |push|
+ # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
+ # end
+
+ # Enable provisioning with a shell script. Additional provisioners such as
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
+ # documentation for more information about their specific syntax and use.
+ # config.vm.provision "shell", inline: <<-SHELL
+ # sudo apt-get update
+ # sudo apt-get install -y apache2
+ # SHELL
+end
diff --git a/release/vagrant-static/build-pkg.sh b/release/vagrant-static/build-pkg.sh
new file mode 100755
index 0000000..232abd5
--- /dev/null
+++ b/release/vagrant-static/build-pkg.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+VERSION=$1
+
+fpm --verbose \
+ -s zip \
+ -t rpm \
+ -n "lnav" \
+ -v "$VERSION" \
+ -p /vagrant/ \
+ -a native \
+ --url https://lnav.org \
+ -m 'timothyshanestack@gmail.com' \
+ --description 'A log file viewer and analyzer for the terminal' \
+ --license BSD-2-Clause \
+ --category 'System/Monitoring' \
+ /vagrant/lnav-linux.zip
+
+fpm --verbose \
+ -s zip \
+ -t deb \
+ -n "lnav" \
+ -v "$VERSION" \
+ -p /vagrant/ \
+ -a native \
+ --url https://lnav.org \
+ -m 'timothyshanestack@gmail.com' \
+ --description 'A log file viewer and analyzer for the terminal' \
+ --license BSD-2-Clause \
+ /vagrant/lnav-linux.zip
diff --git a/release/vagrant-static/build.sh b/release/vagrant-static/build.sh
new file mode 100755
index 0000000..aa0491b
--- /dev/null
+++ b/release/vagrant-static/build.sh
@@ -0,0 +1,84 @@
+#!/usr/bin/env bash
+
+OS=$(uname -s)
+if test x"${OS}" != x"FreeBSD"; then
+ source scl_source enable devtoolset-9
+fi
+
+if test x"${OS}" != x"FreeBSD"; then
+ MAKE=make
+else
+ MAKE=gmake
+fi
+
+FAKE_ROOT=/home/vagrant/fake.root
+
+SRC_VERSION=$1
+
+mkdir -p ~/github
+
+cd ~/github
+if ! test -d lnav; then
+ git clone https://github.com/tstack/lnav.git
+fi
+
+cd ~/github/lnav
+git restore .
+git pull --rebase
+
+if test -n "$SRC_VERSION"; then
+ git checkout "$SRC_VERSION"
+fi
+
+saved_PATH=${PATH}
+export PATH=${FAKE_ROOT}/bin:${PATH}
+saved_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${FAKE_ROOT}/lib
+if test ! -f "configure"; then
+ ./autogen.sh
+ rm -rf ~/github/lbuild
+ mkdir -p ~/github/lbuild
+fi
+cd ~/github/lbuild
+
+TARGET_FILE='/vagrant/lnav-linux.zip'
+if test x"${OS}" != x"FreeBSD"; then
+ if test x"$(lsb_release | awk '{print $3}')" == x"Alpine"; then
+ TARGET_FILE='/vagrant/lnav-musl.zip'
+ ../lnav/configure \
+ --with-libarchive=${FAKE_ROOT} \
+ CFLAGS='-static -g1 -gz=zlib -no-pie -O2' \
+ CXXFLAGS='-static -g1 -gz=zlib -U__unused -no-pie -O2' \
+ LDFLAGS="-L${FAKE_ROOT}/lib" \
+ CPPFLAGS="-I${FAKE_ROOT}/include" \
+ LIBS="-L${FAKE_ROOT}/lib -lexecinfo -lssh2 -llzma -lssl -lcrypto -lz" \
+ --enable-static
+ PATH="${FAKE_ROOT}/bin:${PATH}"
+ else
+ ../lnav/configure \
+ --enable-static \
+ --with-libarchive=${FAKE_ROOT} \
+ LDFLAGS="-L${FAKE_ROOT}/lib" \
+ CPPFLAGS="-I${FAKE_ROOT}/include -O2" \
+ LIBS="-L${FAKE_ROOT}/lib -lssh2 -llzma -lssl -lcrypto -lz" \
+ PATH="${FAKE_ROOT}/bin:${PATH}"
+ fi
+else
+ ../lnav/configure \
+ --enable-static \
+ LDFLAGS="-L${FAKE_ROOT}/lib -static" \
+ LIBS="-lm -lelf" \
+ CPPFLAGS="-I${FAKE_ROOT}/include -O2" \
+ PATH="${FAKE_ROOT}/bin:${PATH}"
+fi
+
+${MAKE} -j2 && cp src/lnav /vagrant/lnav
+
+if test x"${OS}" != x"FreeBSD"; then
+ mkdir instdir
+ make install DESTDIR=$PWD/instdir
+ (cd instdir/ && zip -r "${TARGET_FILE}" .)
+fi
+
+export PATH=${saved_PATH}
+export LD_LIBRARY_PATH=${saved_LD_LIBRARY_PATH}
diff --git a/release/vagrant-static/musl-pkg.sh b/release/vagrant-static/musl-pkg.sh
new file mode 100644
index 0000000..fea8308
--- /dev/null
+++ b/release/vagrant-static/musl-pkg.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+sudo apk update && sudo apk upgrade
+sudo apk add \
+ build-base \
+ binutils \
+ m4 \
+ git \
+ zip \
+ perl \
+ ncurses \
+ ncurses-dev \
+ autoconf \
+ automake \
+ elfutils \
+ elfutils-dev \
+ libelf-static \
+ libexecinfo-dev \
+ libexecinfo-static \
+ libtool \
+ libunwind \
+ libunwind-dev \
+ libunwind-static \
+ linux-headers
diff --git a/release/vagrant-static/pkg.sh b/release/vagrant-static/pkg.sh
new file mode 100755
index 0000000..931dc33
--- /dev/null
+++ b/release/vagrant-static/pkg.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+OS=$(uname -s)
+if test x"${OS}" != x"FreeBSD"; then
+ sudo yum install -y \
+ zip \
+ unzip \
+ m4 \
+ autoconf \
+ automake \
+ ncurses \
+ ncurses-devel \
+ ncurses-static \
+ git \
+ centos-release-scl \
+ perl-Data-Dumper \
+ patch \
+ wget
+ sudo yum install -y "devtoolset-9-gcc*"
+else
+ pkg install -y wget git m4 bash autoconf automake sqlite3 gmake
+fi
diff --git a/release/vagrant-static/provision-pkg.sh b/release/vagrant-static/provision-pkg.sh
new file mode 100644
index 0000000..bb1991d
--- /dev/null
+++ b/release/vagrant-static/provision-pkg.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# Installs dependencies for running fpm
+
+sudo apt-get update
+sudo apt-get install -y ruby2.3 ruby-dev gcc make zip unzip rpm
+sudo gem install fpm
diff --git a/release/vagrant-static/provision.sh b/release/vagrant-static/provision.sh
new file mode 100755
index 0000000..3b98103
--- /dev/null
+++ b/release/vagrant-static/provision.sh
@@ -0,0 +1,152 @@
+#!/usr/bin/env bash
+
+OS=$(uname -s)
+if test x"${OS}" != x"FreeBSD"; then
+ source scl_source enable devtoolset-9
+fi
+
+FAKE_ROOT=/home/vagrant/fake.root
+
+rm -rf ~/extract
+mkdir -p ${FAKE_ROOT} ~/packages ~/extract ~/github
+
+export PATH=${FAKE_ROOT}/bin:${PATH}
+
+cd ~/github
+
+SQLITE_CFLAGS="\
+ -DSQLITE_ENABLE_COLUMN_METADATA \
+ -DSQLITE_SOUNDEX \
+ -DSQLITE_ENABLE_DBSTAT_VTAB \
+ -DSQLITE_ENABLE_API_ARMOR \
+ -DSQLITE_ENABLE_JSON1 \
+ -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \
+ "
+
+NCURSES_FALLBACKS="\
+ansi,\
+cygwin,\
+Eterm,\
+Eterm-256color,\
+gnome,\
+gnome-256color,\
+konsole,\
+konsole-256color,\
+linux,\
+putty,\
+rxvt,\
+rxvt-256color,\
+screen,\
+screen-16color,\
+screen-256color,\
+tmux,\
+tmux-256color,\
+vt100,\
+vt220,\
+xterm,\
+xterm-256color\
+"
+
+cd ~/extract
+
+for pkg in /vagrant/pkgs/*.tar.gz; do
+ tar xfz "$pkg"
+done
+
+(cd make-4.2.1 && ./configure --prefix=${FAKE_ROOT} && make && make install)
+
+OS=$(uname -s)
+
+
+(cd readline-6.3 && ./configure --prefix=${FAKE_ROOT} && make && make install)
+
+(cd bzip2-1.0.8 && make install PREFIX=${FAKE_ROOT})
+
+(cd sqlite-* &&
+ ./configure --disable-editline --prefix=${FAKE_ROOT} \
+ CFLAGS="${SQLITE_CFLAGS}" \
+ && \
+ make && make install)
+
+(cd openssl-* &&
+ ./config --prefix=${FAKE_ROOT} -fPIC &&
+ make &&
+ make install)
+
+(cd ncurses-6.3 && \
+ ./configure --prefix=${FAKE_ROOT} \
+ --enable-ext-mouse \
+ --enable-sigwinch \
+ --with-default-terminfo-dir=/usr/share/terminfo \
+ --enable-ext-colors \
+ --enable-widec \
+ --enable-termcap \
+ --with-fallbacks=$NCURSES_FALLBACKS \
+ && \
+ make && make install)
+
+(cd pcre2-* && \
+ ./configure --prefix=${FAKE_ROOT} \
+ --enable-jit \
+ && \
+ make && make install)
+
+if test x"${OS}" != x"FreeBSD"; then
+ (cd zlib-1.2.12 && ./configure --prefix=${FAKE_ROOT} && make && make install)
+
+ (cd libssh2-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --with-libssl-prefix=${FAKE_ROOT} \
+ --with-libz-prefix=${FAKE_ROOT} \
+ "CPPFLAGS=-I${FAKE_ROOT}/include" \
+ "LDFLAGS=-ldl -L${FAKE_ROOT}/lib" &&
+ make &&
+ make install)
+
+ (cd curl-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --with-libssh2=${FAKE_ROOT} \
+ --with-ssl=${FAKE_ROOT} \
+ --with-zlib=${FAKE_ROOT} \
+ "LDFLAGS=-ldl" &&
+ make &&
+ make install)
+else
+ (cd zlib-1.2.12 && ./configure --prefix=${FAKE_ROOT} "CFLAGS=-fPIC" \
+ && make && make install)
+
+ (cd libssh2-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --with-libssl-prefix=${FAKE_ROOT} \
+ --with-libz-prefix=${FAKE_ROOT} \
+ &&
+ make &&
+ make install)
+
+ (cd curl-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --with-libssh2=${FAKE_ROOT} \
+ --with-ssl=${FAKE_ROOT} \
+ --with-zlib=${FAKE_ROOT} \
+ "CFLAGS=-fPIC" &&
+ make &&
+ make install)
+fi
+
+(cd xz-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --disable-shared \
+ "LDFLAGS=-L${FAKE_ROOT}/lib" \
+ "CPPFLAGS=-I${FAKE_ROOT}/include" \
+ &&
+ make &&
+ make install)
+
+(cd libarchive-* &&
+ ./configure --prefix=${FAKE_ROOT} \
+ --disable-shared \
+ "LDFLAGS=-L${FAKE_ROOT}/lib" \
+ "CPPFLAGS=-I${FAKE_ROOT}/include" \
+ &&
+ make &&
+ make install)