Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686510 - net-vpn/wireguard: properly install examples with USE=tools
Summary: net-vpn/wireguard: properly install examples with USE=tools
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason A. Donenfeld
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-05-21 20:55 UTC by Kalin KOZHUHAROV
Modified: 2019-12-28 07:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
wireguard-0.0.20190406.patch (wireguard-0.0.20190406.patch,345 bytes, patch)
2019-05-21 20:55 UTC, Kalin KOZHUHAROV
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kalin KOZHUHAROV 2019-05-21 20:55:56 UTC
Created attachment 577532 [details, diff]
wireguard-0.0.20190406.patch

Some of the contrib/examples require compilation and that is not possible the way they are installed on gentoo due to missing sources. For example:

# cd /usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/
2019-05-21 22:46 sky extract-handshakes $ make
make -C /lib/modules/4.19.40-r11/build M=/usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes offset-finder.o
make[1]: Entering directory '/usr/src/linux-4.19.40'
/usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/Makefile:27: /usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/../../../src/crypto/Kbuild.include: No such file or directory
make[2]: *** No rule to make target '/usr/share/doc/wireguard-0.0.20190406/examples/extract-handshakes/../../../src/crypto/Kbuild.include'.  Stop.
make[1]: *** [Makefile:1677: offset-finder.o] Error 2
make[1]: Leaving directory '/usr/src/linux-4.19.40'
make: *** [Makefile:14: offset-finder.o] Error 2

They are missing a few files from the src directory. By just uncompressing WireGuard-0.0.20190406.tar.xz and building, all is fine.

There are 2 ways to solve it:
* [quick] by installing all in src as well, see the attached patch (it is really dirty hack and installs a lot more than needed, e.g. object files

* [proper] USE=tools should compile the tools that need that during src_compile, so that they can be used directly
Comment 1 Jason A. Donenfeld gentoo-dev 2019-12-28 07:56:09 UTC
This is example *code*, not example programs to be used directly.