All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Joe Doss <joe@solidadmin.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [WireGuard] Fedora WireGuard RPMs
Date: Wed, 17 Aug 2016 16:38:20 +0200	[thread overview]
Message-ID: <CAHmME9oA9CeFr30WJwkEgamrFJrWX-rT3-NSsDLwcyybM7JbMw@mail.gmail.com> (raw)
In-Reply-To: <919f5c60-4f1e-0f12-012b-021bce9aca5d@solidadmin.com>

Hey Joe,

This is great news! Thanks for doing that. Are you a Fedora developer
per chance?

A few notes for fixing this:

1) http://copr-dist-git.fedorainfracloud.org/cgit/jdoss/wireguard/wireguard-tools.git/tree/wireguard-tools.spec

a)
> BuildRequires:  libmnl-devel, kernel-devel, systemd
> Requires:       wireguard-dkms, systemd

Remove the systemd requirement.

b)
> install -p -D -m 0644 %{_builddir}/WireGuard-experimental-%{version}/contrib/examples/systemd/wgserver.service \
>    %{buildroot}%{_unitdir}/wgserver.service
> %attr(0644, root, root) %{_unitdir}/wgserver.service

Remove these lines. Do not install this systemd unit. It's in the
examples directory; thus it is an EXAMPLE. It is not meant to be
installed. When we write a unit that's meant to be installed, `make
install` will do it automatically.

Instead, copy all of contrib/examples to /usr/share/{pkg}/examples or
wherever the default Fedora examples directory is.

c)
> BuildRequires:  libmnl-devel, kernel-devel, systemd

Are you sure that the tools package requires kernel-devel? Did you
double check this?

d)
> install -Z -s -m 0755 -v %{_builddir}/WireGuard-experimental-%{version}/src/tools/wg \
>    %{buildroot}%{_bindir}/wg
> install -p -D -m 0644 %{_builddir}/WireGuard-experimental-%{version}/contrib/examples/systemd/wgserver.service \
>    %{buildroot}%{_unitdir}/wgserver.service
> install -p -D -m 0644 %{_builddir}/WireGuard-experimental-%{version}/src/tools/wg.8 \
>    %{buildroot}%{_mandir}/man8/wg.8
> %defattr(-,root,root,-)
> %attr(0755, root, root) %{_bindir}/wg
> %attr(0644, root, root) %{_unitdir}/wgserver.service
> %attr(0644, root, root) %{_mandir}/man8/wg.8*

All of this is garbage. Instead, use `make install` and set the
environment variables appropriately. By default they are:
PREFIX ?= /usr
DESTDIR ?=
BINDIR ?= $(PREFIX)/bin
LIBDIR ?= $(PREFIX)/lib
MANDIR ?= $(PREFIX)/share/man
RUNSTATEDIR ?= /var/run

I imagine here you'll want to roll with something like:

DESTDIR=%{buildroot} BINDIR=%{_bindir} MANDIR=%{_mandir}
RUNSTATEDIR=/run make install


2) http://copr-dist-git.fedorainfracloud.org/cgit/jdoss/wireguard/wireguard-dkms.git/tree/wireguard-dkms.conf

I recommend you use Debian's as a starting point:
https://anonscm.debian.org/git/collab-maint/wireguard.git/tree/debian/wireguard-dkms.dkms

In particular DEST_MODULE_LOCATION="/kernel/net" and
BUILD_EXCLUSIVE_KERNEL="^(4\.[^0]|[5-9])".

3) http://copr-dist-git.fedorainfracloud.org/cgit/jdoss/wireguard/wireguard-dkms.git/tree/wireguard-dkms.spec

a)
> BuildRequires:  libmnl-devel, kernel-devel, sed

The kernel module does not require libmnl-devel.

b)
> cp -fr %{_builddir}/WireGuard-experimental-%{version}/* %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/

You might consider instead only copying src/.


Please let me know when you've addressed 1a, 1b, 1c, 1d, 2, 3a, and
3b, and then I'll add your instructions to the wireguard.io website.

Thanks for your hard work on this. Much appreciated.

Jason

  reply	other threads:[~2016-08-17 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  3:24 [WireGuard] Fedora WireGuard RPMs Joe Doss
2016-08-17 14:38 ` Jason A. Donenfeld [this message]
2016-08-17 14:44   ` David Woodhouse
2016-08-17 14:57     ` Jason A. Donenfeld
2016-08-17 19:39   ` Joe Doss
2016-08-17 20:17     ` Bruno Wolff III
2016-08-18  0:13     ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHmME9oA9CeFr30WJwkEgamrFJrWX-rT3-NSsDLwcyybM7JbMw@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=joe@solidadmin.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.