Opened 11 months ago

Last modified 9 months ago

#2774 new enhancement

Compatibility for OpenBSD

Reported by: nickel Owned by:
Priority: minor Milestone: undecided
Component: installer Version: 0.9.47
Keywords: Cc: idk, mikalv
Parent Tickets: Sensitive: no


Currently the installer doesn't work for OpenBSD, wrapper used for starting up is incompatible. Hence a separate tanukiwrapper (3.5.43) package has to be compiled and installed. This has been tested on x86_64 cpu, would probably work for x86 but I don't have a cpu with that instruction set, or could I just test on x86_64?

We could approach this from the wrapper which is vital then to jbigi and jcpuid which are just optimizations. Let me know, how to help


Attachments (2)

tanukiwrapper.tar.gz (4.1 KB) - added by nickel 11 months ago.
diff (873 bytes) - added by nickel 11 months ago. patch

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 months ago by zzz

please provide:

  • build instructions for the wrapper on openbsd, if there's anything special required
  • patch to installer/resources/

Changed 11 months ago by nickel

Attachment: tanukiwrapper.tar.gz added


comment:2 Changed 11 months ago by nickel

Wrapper is still not part of the repository, so you need to
build from source on OpenBSD using the ports system

Install the ports system as root:
# usermod -G wsrc 'exampleuser'
# cd /usr
# mkdir -p ports
# chgrp wsrc ports
# chmod 775 ports
# cvs -qd anoncvs@…:/cvs checkout -P ports

Instructions to install wrapper as user(attachment):
$ cd /usr/ports
$ mkdir -p mystuff/java
$ cd mystuff/java
$ tar zxf <tanukiwrapper.tar.gz>
$ cd tanukiwrapper
$ make install

Based on your cpu, the ports system will choose to build
32 or 64 bit, or else give explicit value in BITS within
the Makefile, see line 29.


Give me a little while for the, I've installed
i2p using the port system itself, so the script never comes
into picture. I'll test and come up with diff.

comment:3 Changed 11 months ago by nickel

diff as required

--- installer/resources/
+++ installer/resources/
@@ -82,7 +82,17 @@ case $HOST_OS in
         cp ${wrapperpath}/ ./lib/
-    netbsd|openbsd|kfreebsd)
+    openbsd )
+        if [ ! `echo $OS_ARCH | grep amd64` ]; then
+            wrapperpath="./lib/wrapper/openbsd"
+        else
+            wrapperpath="./lib/wrapper/openbsd64"
+            # the 32bit will be needed if a 32 bit jvm is used
+            cp ./lib/wrapper/openbsd/ ./lib/
+        fi
+        cp ${wrapperpath}/ ./lib/
+        ;;
+    netbsd|kfreebsd)
         # FIXME
         # This isn't displayed when installing, but if we fall back to the "*)"
         # choice, no cleanup happens and users are advised to copy the wrapper
Last edited 11 months ago by zzz (previous) (diff)

Changed 11 months ago by nickel

Attachment: diff added patch

comment:4 Changed 11 months ago by zzz

Cc: idk mikalv added

Thanks for the contribution.

We don't know much about the ports system. Mikalv was working on it for i2pd last year; that work appears to be stalled, see for the info. I believe he was going to do java i2p after that, but doesn't look like it's going to happen.

If you would like to get it into ports as a 'downstream' package, you should do that, I don't think we have the time or knowledge to support it.

What we can do, if we can find the time, is to build the wrapper following your instructions, and apply and test the patch, and check it all in as a one-time project, so we have support in the standard installer.

cc'ing idk mikalv

comment:5 Changed 11 months ago by zzz

I checked our jbigi and jcpuid java code, we do have support in the code to load openbsd libs if present, so we'd just have to build and test the libs and check them in to be bundled in the installer.

I don't know if freebsd ports is anything like openbsd ports, but we've had a downstream freebsd port for many many years, perhaps there's something to be learned from it:

comment:6 Changed 10 months ago by nickel

My intention wasn't to divert towards building an i2p "port", since it is already done. It lies among the ports mailing list right now, and would probably be committed to the repo. Since there exist already support downstream, the only next step was to push the support upstream. All the jbigi, jcpuid optimizations and plugins have already been tested. I believe only work required will be to include the compiled files and then configure and test the installer.

I think Mikal Villa has really let go of the i2pd port since it has been committed, he's probably busy and pushing new ports and updates through the mailing list is sluggish due to the small number of OpenBSD devs.

comment:7 Changed 10 months ago by zzz

OK, good, we're on the same page.

I didn't know that the i2pd port of mikal's got accepted, but I found it here:
When the java i2p port gets accepted, please let us know.

Our preference is to find or setup our own openbsd build and test platform so we can do the support ourselves, but that may take some time.

comment:8 Changed 9 months ago by zzz

Reported complete by OP
No immediate need for us to apply the patch in comment 3 and the wrapper/jbigi binaries, as we expect users to install via ports.

Note: See TracTickets for help on using tickets.