Nnn: Port nnn to OpenBSD

Created on 5 Mar 2018  Â·  22Comments  Â·  Source: jarun/nnn

Hello,

It is an announcement rather than an issue or feature request.

I have started work on porting _nnn_ to OpenBSD. Good news is that it compiles (done manually both from _master_ and release tarball) and runs. I'm pretty sure that there will be few bumps to navigate so I'll keep you posted on progress and (possible) issues.

Cheers

Most helpful comment

nlay now uses #!/usr/bin/env bash which should work on OpenBSD without modification.

All 22 comments

Thanks!

While you are at it (and if you can kindly spare the time), could you please consider porting the following of my utilities to OpenBSD -

All of them are officially available on Ubuntu, Debian and under review on Fedora.

Sorry for the delay. OpenBSD port of nnn is created and submitted for testing and review (http://bit.ly/2IbcvnG). There were no mac-study jor issues, needed to patch two files though:

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,7 +1,7 @@
 VERSION = 1.7

 PREFIX ?= /usr/local
-MANPREFIX ?= $(PREFIX)/share/man
+MANPREFIX ?= $(PREFIX)/man
 STRIP ?= strip
 PKG_CONFIG ?= pkg-config

@@ -32,15 +32,16 @@ debug: $(SRC)
        $(CC) -DDEBUGMODE -g $(CFLAGS) $(LDFLAGS) -o $(BIN) $^ $(LDLIBS)

 install: all
-       install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
-       install -m 0755 -t $(DESTDIR)$(PREFIX)/bin $(BIN) $(PLAYER)
-       install -m 0755 -d $(DESTDIR)$(MANPREFIX)/man1
-       install -m 0644 -t $(DESTDIR)$(MANPREFIX)/man1 $(BIN).1
+       install -m 0755 -d $(PREFIX)/bin
+       install -m 0755 -d $(MANPREFIX)/man1
+       install -m 0755 $(BIN) $(PREFIX)/bin/
+       install -m 0755 $(PLAYER) $(PREFIX)/bin/
+       install -m 0644 $(BIN).1 $(MANPREFIX)/man1/

 uninstall:
-       $(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN)
-       $(RM) $(DESTDIR)$(PREFIX)/bin/$(PLAYER)
-       $(RM) $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
+       $(RM) $(PREFIX)/bin/$(BIN)
+       $(RM) $(PREFIX)/bin/$(PLAYER)
+       $(RM) $(MANPREFIX)/man1/$(BIN).1

 strip: $(BIN)
        $(STRIP) $^

and

Index: nlay
--- nlay.orig
+++ nlay
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash

 # #############################################################################
 # nlay: a customizable script to play files in different apps by file type

Also there was a warning regarding usage of sprintf() as opposed snprintf() later being considered safer.

As for the porting of above listed utilities, I'll take a look at them and let you know.

needed to patch two files though

Should be fine as long as they are patched downstream

Also there was a warning regarding usage of sprintf()

I can work on this and use snprintf() everywhere

I'll take a look at them and let you know

Thank you so much!

All-snprintf() committed at 460984c15455335f15fb5a6200495d8609f9ffe1.

nlay now uses #!/usr/bin/env bash which should work on OpenBSD without modification.

@jolpaz any update on this? Did you find some time to check the other utilities as well?

On 14.03, Arun Prakash Jana wrote:

@jolpaz any update on this? Did you find some time to check the other utilities as well?

@jarun, work on OpenBSD port of nnn-1.7 is done and it is in the pipeline.
I'll let you know as soon as it makes into repositories and made available
in binary form as well.

As for the other utils, I do use ddgr, so I'll probably start porting it
first, as time allows -- quite busy at the moment. Other utils are also
on my todo list for review so I'll keep you posted.

I saw that most of the portability issues are resolved through several latest
commits -- good job!

Finally, I'd like to kindly ask you to consider releasing source code tarballs
the same way linux/freebsd tarballs are released, i.e.

https://github.com/jarun/nnn/releases/download/v1.7/nnn-1.7.tar.gz as opposed
to https://github.com/jarun/nnn/archive/v1.7.tar.gz

That would make initial porting and, more importantly, upgrades to latest
versions of any of your utilities, much easier.

Happy hacking :)

I'll let you know as soon as it makes into repositories

Thanks for the update

Other utils are also on my todo list for review so I'll keep you posted.

Sure! Just wanted to ensure you have checked them out.

consider releasing source code tarballs the same way linux/freebsd tarballs are released

How do I do that? I am only using github default. Is there a way to change it?

@jolpaz You can have github autogenerate the tar in the format you're looking for (for any git ref) by constructing a URL like this: https://github.com/jarun/nnn/archive/v1.7/nnn-1.7.tar.gz

On 15.03, Michael Fenn wrote:

@jolpaz You can have github autogenerate the tar in the format you're looking for (for any git ref) by constructing a URL like this: https://github.com/jarun/nnn/archive/v1.7/nnn-1.7.tar.gz

Yes, that is the automatic github thingy that puts generated tarball in
https://github.com///archive//tarball.tar.gz.
https://github.com///releases/download//tarball.tar.gz is
what I was looking for.

How do you guys usually release debian, centos, suse and other packages?

is what I was looking for

OK. Then you have found what you wanted. I didn't know this one! ;) Thanks @fennm!

How do you guys usually release debian, centos, suse and other packages?

We use PackageCore to auto-generate them on Travis CI.

On Mar 15, 2018, at 9:18 AM, Arun Prakash Jana notifications@github.com wrote:

is what I was looking for

OK. Then you have found what you wanted. I didn't know this one! ;) Thanks @fennm https://github.com/fennm!

Sure, no problem!

How do you guys usually release debian, centos, suse and other packages?

We use PackageCore to auto-generate them on Travis CI.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jarun/nnn/issues/92#issuecomment-373372640, or mute the thread https://github.com/notifications/unsubscribe-auth/ADzesqrMuQnC9nnDHk0C_8o5fuqRmtgQks5tempDgaJpZM4ScFxm.

@jolpaz please update when the porting is done and we will add openBSD to the list of packagers.

I'm happy to announce that nnn made it to OpenBSD ports repository -- http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nnn/. As of few hours ago it is available for anyone to build it using OpenBSD's ports system. I will announce availability of binary package as soon it hits the mirrors.

Thank you for the great tool and support during porting effort.

Thanks @jolpaz!

Please let us know the command to install. pkg_add nnn maybe?

@jarun, that would be the correct command, but not yet. Port made it to OpenBSD's ports CVS repository and is not yet available as a binary package. It will become available as a binary package with the next round of bulk builds -- I'll let you know. When that happens, OpenBSD -current users will be able to install it with the above command. As for the -stable and -release OpenBSD users nnn will not be available for them as a binary package till the next release, some time in October. There are ways of installing -current binary package on -stable or -release systems -- I'll let you know that as well when first binary is available.

In the meantime _any_ OpenBSD user can install nnn using ports.

Thanks! Once you update I will add it to the list of packagers.

I'm happy to announce the availability of nnn binary package for OpenBSD-current users. Such users with up to date systems can install it with pkg_add nnn as root.

For users of -stable and -release OpenBSD systems, nnn can be installed with:

pkg_add https://ftp2.eu.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/nnn-1.8.tgz

again, as root.

Please note that ftp2.eu.openbsd.org can be replaced with any mirror listed at mirrors list

Happy hacking!

On Mon, May 14, 2018 at 03:29:57PM -0700, Ljuba Nedeljkovic wrote:

I'm happy to announce the availability of nnn binary package for
OpenBSD-current users. Such users with up to date systems can install it with
pkg_add nnn as root.

For users of -stable and -release OpenBSD systems, nnn can be installed with:

pkg_add https://ftp2.eu.openbsd.org/pub/OpenBSD/snapshots/packages/amd64/nnn-1.8.tgz

again, as root.

Please note that ftp2.eu.openbsd.org can be replaced with any mirror listed at
mirrors list

Happy hacking!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.*

congrats.

Thanks @jolpaz!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kuntau picture kuntau  Â·  3Comments

leovilok picture leovilok  Â·  3Comments

z0rc picture z0rc  Â·  7Comments

alexx-oo picture alexx-oo  Â·  3Comments

harriott picture harriott  Â·  6Comments