distro packaging, makefiles, deps, systemd, new tools
Hey Christian, Daniel, Dan, and other maintainers,
The next snapshot is going to have some improvements to the tooling, and along with this comes a more complicated Makefile. I wanted to run the changes by y'all (downstreams).
- The makefile now has a few WITH_{FEATURE}=yes|no environment flags, as well as auto-detection. Documentation is here:
https://git.zx2c4.com/WireGuard/plain/src/tools/INSTALL
And the Makefile itself is here:
https://git.zx2c4.com/WireGuard/tree/src/tools/Makefile
Question: does this propose a desirable situation for you as a downstream?
- The wg-config script is now called wg-quick and is quite simple and nice. Documentation:
https://git.zx2c4.com/WireGuard/about/src/tools/wg-quick.8
And source:
https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick.bash
OpenWRT should _not_ ship this. NixOS probably should not ship this. When systemd-networkd gets support for WireGuard, systemd-based distros should not ship this. But everybody else who just wants a simple rough script for quickly bringing up and down VPNs can ship this, as it's a big help to users. It's installed according to the documentation for the Makefile above.
- There's now an "upstream" systemd unit for wg-quick, called [email protected]. It's pretty simple:
https://git.zx2c4.com/WireGuard/tree/src/tools/[email protected]
Question: does this unit seem sane to you? Can you ship it downstream as is, or will you need modifications?
Thanks,
Jason
PATCH 1/1 tools: remove DESTDIR for autodetection
From: Christian Hesse <[email protected]>
DESTDIR is always empty, no need to check anything there. Check the main system instead.
--- src/tools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
src/tools/Makefile +3 -3
@@ -12,12 +12,12 @@ WITH_WGQUICK ?= WITH_SYSTEMDUNITS ?= ifeq ($(WITH_BASHCOMPLETION),) -ifneq ($(strip $(wildcard $(DESTDIR)$(BASHCOMPDIR))),) +ifneq ($(strip $(wildcard $(BASHCOMPDIR))),) WITH_BASHCOMPLETION := yes endif endif ifeq ($(WITH_WGQUICK),) -ifneq ($(strip $(wildcard $(DESTDIR)$(BINDIR)/bash)),) +ifneq ($(strip $(wildcard $(BINDIR)/bash)),) WITH_WGQUICK := yes endif ifneq ($(strip $(wildcard $(DESTDIR)/bin/bash)),)
@@ -25,7 +25,7 @@ WITH_WGQUICK := yes endif endif ifeq ($(WITH_SYSTEMDUNITS),) -ifneq ($(strip $(wildcard $(DESTDIR)$(SYSTEMDUNITDIR))),) +ifneq ($(strip $(wildcard $(SYSTEMDUNITDIR))),) WITH_SYSTEMDUNITS := yes endif endif
Signature · 1 line
2.11.0
Re: [PATCH 1/1] tools: remove DESTDIR for autodetection
Quoted 4 lines · Christian Hesse
From: Christian Hesse <[email protected]>
DESTDIR is always empty, no need to check anything there. Check the main system instead.
why are we checking either place? It's entirely possible that my dedicated build farm doesn't have any bash completion mechanisms installed, even if my development system does.
--dkg
Re: [PATCH 1/1] tools: remove DESTDIR for autodetection
Quoted 3 lines · Daniel Kahn Gillmor
why are we checking either place? It's entirely possible that my dedicated build farm doesn't have any bash completion mechanisms installed, even if my development system does.
Yes, the concept of auto-detection is "broken". But it's useful as a default, for people doing make && make install on their dev machines. Packagers should always set these types of flags explicitly, as with autotools.
Re: [PATCH 1/1] tools: remove DESTDIR for autodetection
For reference, the Gentoo 9999 ebuild does this:
https://gitweb.gentoo.org/repo/gentoo.git/tree/net-misc/wireguard/wireguard-9999.ebuild#n51
emake \
WITH_BASHCOMPLETION=yes \
WITH_SYSTEMDUNITS=yes \
WITH_WGQUICK=yes \
DESTDIR="${D}" \
BASHCOMPDIR="$(get_bashcompdir)" \
PREFIX="${EPREFIX}/usr" \
-C src/tools install
I imagine Debian and Arch will do something similar, perhaps leaving out explicitly setting BASHCOMPDIR if you use standard patches. I expect for OpenWRT to set all of these explicitly to "no". Etc.
Jason
Re: [PATCH 1/1] tools: remove DESTDIR for autodetection
In reply to Christian HesseHey Christian,
Seems reasonable to me.
Merged.
Jason
Quoted 6 lines · Jason A. Donenfeld
Hey Christian, Daniel, Dan, and other maintainers,
The next snapshot is going to have some improvements to the tooling, and along with this comes a more complicated
Makefile. I wanted to run the changes by y'all (downstreams).
Quoted 7 lines
- The makefile now has a few WITH_{FEATURE}=yes|no environment flags, as well as auto-detection. Documentation is here:
https://git.zx2c4.com/WireGuard/plain/src/tools/INSTALL
And theMakefileitself is here:
https://git.zx2c4.com/WireGuard/tree/src/tools/MakefileQuestion: does this propose a desirable situation for you as a downstream?
Reading through INSTALL, these parameters look reasonable to me as a downstream.
Quoted 6 lines
- The wg-config script is now called wg-quick and is quite simple and nice. Documentation:
https://git.zx2c4.com/WireGuard/about/src/tools/wg-quick.8
And source:
https://git.zx2c4.com/WireGuard/tree/src/tools/wg-quick.bash
Quoted 6 lines
OpenWRT should _not_ ship this. NixOS probably should not ship this. When systemd-networkd gets support for WireGuard, systemd-based distros should not ship this. But everybody else who just wants a simple rough script for quickly bringing up and down VPNs can ship this, as it's a big help to users. It's installed according to the documentation for the
Makefileabove.
this also looks good.
Quoted 6 lines
- There's now an "upstream" systemd unit for wg-quick, called [email protected]. It's pretty simple:
https://git.zx2c4.com/WireGuard/tree/src/tools/[email protected]Question: does this unit seem sane to you? Can you ship it downstream as is, or will you need modifications?
although i haven't tested it, a quick read through the .service file looks reasonable to me. Thanks for thinking about system integration stuff.
--dkg
Quoted 4 lines · Jason A. Donenfeld
=20
OpenWRT should _not_ ship this. =08=0D
Agreed.
Everything else looks good to me. Just had a brief look at it.
Let's see what buildbot says. Should all run smoothly!
Quoted 3 lines · Dan Lüdtke
On 4 Jan 2017, at 19:50, Jason A. Donenfeld <[email protected]> wrote:
OpenWRT should _not_ ship this.
Agreed.
Everything else looks good to me. Just had a brief look at it.
Let's see what buildbot says. Should all run smoothly!
I assume youre not shipping the bash completion stuff either, right? Since openwrt doesn't use bash.
Quoted 2 lines
I assume youre not shipping the bash completion stuff either, right? =
Since openwrt doesn't use bash.
We are not shipping it.
FYI: The topic is discussed right now in this PR:
https://github.com/openwrt/packages/pull/3816=