Development discussion of WireGuard
 help / color / mirror / Atom feed
* WireGuard for OpenBSD
@ 2018-05-22 15:50 Jason A. Donenfeld
  2018-05-23  8:55 ` Anthony J. Bentley
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2018-05-22 15:50 UTC (permalink / raw)
  To: ports; +Cc: WireGuard mailing list

[cross-posted to the WireGuard mailing list]

Hello OpenBSD Ports List,

I sent a very similar email [0] to the FreeBSD ports list yesterday.

I'm the author of WireGuard [1], a secure network tunnel protocol [2]
and a set of implementations of it. It was originally designed for the
Linux kernel, but we're now beginning to have implementations for
other platforms. Recently, parts of the Internet got excited [3] when
we put a Darwin version in Homebrew. We've been working on getting an
implementation running for OpenBSD, and things are coming along pretty
smoothly.

The ultimate goal in OpenBSD land is, of course, having this properly
in the kernel like it is on Linux, but that's a long ways off, so I
thought we should get rolling with this, since it's here now.

I'm not entirely familiar with the ports/pkg adding process, and so I
was hoping to find somebody who is part of the OpenBSD community to
adopt WireGuard and help maintain packages for it. We currently have
packages for many Linux distros [4], but not yet BSD ports. There are
two packages to add:

1. wireguard-tools, providing wg(8) and wg-quick(8)
Runtime dependencies: bash, wireguard-go, libc
Buildtime dependencies: gmake, c compiler, libc
Fixup: sed -i 's/ -v / /g' src/tools/Makefile
Build: gmake -C src/tools WITH_WGQUICK=yes
Install: gmake -C src/tools PREFIX=/usr/local install
URL template: https://git.zx2c4.com/WireGuard/snapshot/WireGuard-VERSION.tar.xz

2. wireguard-go
Runtime dependencies: none
Buildtime dependencies: gmake, go
Fixup: sed -i 's/ -v / /g' Makefile
Build: export GOPATH=$(pwd)/gopath; go get -d; gmake
Install: gmake PREFIX=/usr/local install
URL template: https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-VERSION.tar.xz

For reference, these two packages in Homebrew look like this:
https://github.com/Homebrew/homebrew-core/blob/master/Formula/wireguard-tools.rb
https://github.com/Homebrew/homebrew-core/blob/master/Formula/wireguard-go.rb

And for your horror, I've made a please-dont-pipe-like-that
copy-and-paste install script:
# curl https://xn--4db.cc/IKuBc62Z | sh

That script won't work as-is at the moment, since I haven't yet tagged
tarballs with OpenBSD support, but in the coming days, I'll tag one
that has this latest OpenBSD code in it. (In the meantime, you can run
`# curl https://xn--4db.cc/IKuBc62Z | sh /dev/stdin --master` to get
it from git master. See demo.wireguard.com for another script for a
little test server.) I was hoping that in the time between now and
then, we might find somebody willing and interested in packaging this
properly.

Does this sound fun to anyone?

Best regards,
Jason

[0] https://docs.freebsd.org/cgi/getmsg.cgi?fetch=116808+0+current/freebsd-ports
[1] https://www.wireguard.com/
[2] https://www.wireguard.com/papers/wireguard.pdf
[3] http://latacora.singles/2018/05/16/there-will-be.html
[4] https://www.wireguard.com/install/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WireGuard for OpenBSD
  2018-05-22 15:50 WireGuard for OpenBSD Jason A. Donenfeld
@ 2018-05-23  8:55 ` Anthony J. Bentley
  2018-05-23 12:28   ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony J. Bentley @ 2018-05-23  8:55 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: ports, WireGuard mailing list

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

Jason A. Donenfeld writes:
> 1. wireguard-tools, providing wg(8) and wg-quick(8)
> Runtime dependencies: bash, wireguard-go, libc
> Buildtime dependencies: gmake, c compiler, libc
> Fixup: sed -i 's/ -v / /g' src/tools/Makefile
> Build: gmake -C src/tools WITH_WGQUICK=yes
> Install: gmake -C src/tools PREFIX=/usr/local install
> URL template: https://git.zx2c4.com/WireGuard/snapshot/WireGuard-VERSION.tar.
> xz

Attached is one. It will need to be updated to use the next tag once
it's released.

Is there a way that I'm missing to display the actual compile commands
during build, rather than the "CC blah.o" output?

> 2. wireguard-go
> Runtime dependencies: none
> Buildtime dependencies: gmake, go
> Fixup: sed -i 's/ -v / /g' Makefile
> Build: export GOPATH=$(pwd)/gopath; go get -d; gmake
> Install: gmake PREFIX=/usr/local install
> URL template: https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-VERSIO
> N.tar.xz

I don't know anything about Go ports, so my attempt at this didn't get
very far and hasn't built yet.

[-- Attachment #2: wireguard-tools.tar.gz --]
[-- Type: application/x-gzip, Size: 6010 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: WireGuard for OpenBSD
  2018-05-23  8:55 ` Anthony J. Bentley
@ 2018-05-23 12:28   ` Jason A. Donenfeld
  0 siblings, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2018-05-23 12:28 UTC (permalink / raw)
  To: Anthony J. Bentley; +Cc: ports, WireGuard mailing list

On Wed, May 23, 2018 at 10:55 AM, Anthony J. Bentley <anthony@anjbe.name> w=
rote:
> Attached is one. It will need to be updated to use the next tag once
> it's released.

Looks good to me. Indeed I don't like this manually carrying files
from the next release in ${FILES}, but that problem goes away entirely
when I do actually tag that next release.

I've also moved all the usages of install's -v switch in the Makefile
to be the first switch, so now you can simply run: sed -i 's/install
-v/install/g;s/@install/install/g' src/tools/Makefile

>
> Is there a way that I'm missing to display the actual compile commands
> during build, rather than the "CC blah.o" output?

Yes -- pass "V=3D1" in MAKE_FLAGS.

>
>> 2. wireguard-go
>> Runtime dependencies: none
>> Buildtime dependencies: gmake, go
>> Fixup: sed -i 's/ -v / /g' Makefile
>> Build: export GOPATH=3D$(pwd)/gopath; go get -d; gmake
>> Install: gmake PREFIX=3D/usr/local install
>> URL template: https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-V=
ERSIO
>> N.tar.xz
>
> I don't know anything about Go ports, so my attempt at this didn't get
> very far and hasn't built yet.

I simplified it quite a bit last night, so hopefully it's easier now:

Runtime dependencies: none
Buildtime dependencies: gmake, go
Fixup: sed -i 's/install -v/install/g;s/@install/install/g' Makefile
Build: gmake
Install: gmake PREFIX=3D/usr/local install
URL template: https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-VERS=
ION.tar.xz

The installer curl|sh disaster has also been updated: https://=D7=90.cc/IKu=
Bc62Z

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-23 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22 15:50 WireGuard for OpenBSD Jason A. Donenfeld
2018-05-23  8:55 ` Anthony J. Bentley
2018-05-23 12:28   ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).