commit: e655226b6e68d8a2398d5186b3090942bc19166b Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> AuthorDate: Sun Jan 15 12:19:49 2017 +0000 Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org> CommitDate: Sun Jan 15 12:20:01 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e655226b
net-misc/wireguard: version bump and new USE flags Package-Manager: Portage-2.3.3, Repoman-2.3.1 net-misc/wireguard/Manifest | 2 +- net-misc/wireguard/metadata.xml | 4 +- net-misc/wireguard/wireguard-0.0.20170105.ebuild | 107 ---------------------- net-misc/wireguard/wireguard-0.0.20170115.ebuild | 111 +++++++++++++++++++++++ net-misc/wireguard/wireguard-9999.ebuild | 102 +++++++++++---------- 5 files changed, 168 insertions(+), 158 deletions(-) diff --git a/net-misc/wireguard/Manifest b/net-misc/wireguard/Manifest index 3854114..0a1b215 100644 --- a/net-misc/wireguard/Manifest +++ b/net-misc/wireguard/Manifest @@ -1 +1 @@ -DIST WireGuard-0.0.20170105.tar.xz 125280 SHA256 1bd990eeae6fbf599ccddde81caa92770f58623ad9705f875bcfab8254583896 SHA512 8e9cfd5d521c77766d870445e946aa934dbe933241a09776002492c8284a018c2cce615f92a873c6ee3448ef231fc91230cd973a682728db85f03cd82301150c WHIRLPOOL 19743cfee950c042fe0f190cf12af184b4bf3a24ab43338f85250ccaa806a2d3d6b757d1b666305474e699cfd15095d290c6235fb4d751b6e4080a48b19c43f1 +DIST WireGuard-0.0.20170115.tar.xz 129020 SHA256 7e5f9f4699a2d4ace90d0df5d81bf0f67205ee08c45b95e0acc379bedef5ffe8 SHA512 5d8bf7589f9813fe9122c322cf417850075c89f28f326cff3c36d2b661a8cce3a84bc8d5a80f4292578cecb847d704f352d5d9f9686f190b13a10903f8e433f7 WHIRLPOOL cdcd9d5ed6bed42e548093384773f62a87dfad40b33199f0151ff8becd1f06fe6017ffb82e420a76c3eea088610ed5bd542fb3d971174d43f72eb3c148da7ed7 diff --git a/net-misc/wireguard/metadata.xml b/net-misc/wireguard/metadata.xml index aa8747f..d5c30b1 100644 --- a/net-misc/wireguard/metadata.xml +++ b/net-misc/wireguard/metadata.xml @@ -6,7 +6,9 @@ <name>Jason A. Donenfeld</name> </maintainer> <use> - <flag name="kmod-src">Do not compile the kernel module. Instead install the kernel module source code to /usr/src/wireguard.</flag> + <flag name="tools">Compile the wg(8) tool and related helpers. You probably want this enabled.</flag> + <flag name="module">Compile the actual WireGuard kernel module. Most certainly you want this enabled, unless you're doing something strange.</flag> + <flag name="module-src">Install the module source code to /usr/src, in case you like building kernel modules yourself.</flag> <flag name="debug">Enable verbose debug reporting in dmesg of various WireGuard peer and device information.</flag> </use> </pkgmetadata> diff --git a/net-misc/wireguard/wireguard-0.0.20170105.ebuild b/net-misc/wireguard/wireguard-0.0.20170105.ebuild deleted file mode 100644 index db54269..00000000 --- a/net-misc/wireguard/wireguard-0.0.20170105.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit linux-mod bash-completion-r1 - -DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." -HOMEPAGE="https://www.wireguard.io/" - -if [[ ${PV} == 9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://git.zx2c4.com/WireGuard" - KEYWORDS="" -else - SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz" - S="${WORKDIR}/WireGuard-${PV}" - KEYWORDS="~amd64 ~x86 ~mips ~arm ~arm64" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="debug kmod-src" - -DEPEND="net-libs/libmnl" -RDEPEND="${DEPEND}" - -MODULE_NAMES="wireguard(net:src)" -BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1" -BUILD_TARGETS="module" -CONFIG_CHECK="NET INET NET_UDP_TUNNEL NF_CONNTRACK NETFILTER_XT_MATCH_HASHLIMIT CRYPTO_BLKCIPHER ~PADATA ~IP6_NF_IPTABLES" -WARNING_PADATA="If you're running a multicore system you likely should enable CONFIG_PADATA for improved performance and parallel crypto." -WARNING_IP6_NF_IPTABLES="If your kernel has CONFIG_IPV6, you need CONFIG_IP6_NF_IPTABLES; otherwise WireGuard will not insert." - -pkg_setup() { - use kmod-src && return - linux-mod_pkg_setup - kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1" -} - -src_compile() { - use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" - use kmod-src || linux-mod_src_compile - emake RUNSTATEDIR="${EPREFIX}/run" -C src/tools -} - -src_install() { - dodoc README.md - dodoc -r contrib/examples - emake \ - WITH_BASHCOMPLETION=yes \ - WITH_SYSTEMDUNITS=yes \ - WITH_WGQUICK=yes \ - DESTDIR="${D}" \ - BASHCOMPDIR="$(get_bashcompdir)" \ - PREFIX="${EPREFIX}/usr" \ - -C src/tools install - if use kmod-src; then - emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install - else - linux-mod_src_install - fi - insinto /$(get_libdir)/netifrc/net - newins "${FILESDIR}"/wireguard-openrc.sh wireguard.sh -} - -pkg_postinst() { - if use kmod-src; then - einfo - einfo "You have enabled the kmod-src USE flag. This means that sources" - einfo "are installed to ${ROOT}usr/src/wireguard instead of having the" - einfo "kernel module compiled. You will need to compile the module" - einfo "yourself. Most likely, you don't want this USE flag." - einfo - else - linux-mod_pkg_postinst - fi - ewarn - ewarn "This software is experimental and has not yet been released." - ewarn "As such, it may contain significant issues. Please do not file" - ewarn "bug reports with Gentoo, but rather direct them upstream to:" - ewarn - ewarn " t...@wireguard.io secur...@wireguard.io" - ewarn - - einfo - einfo "After installing WireGuard, if you'd like to try sending some packets through" - einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" - einfo "test example script:" - einfo - einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" - einfo - einfo "This will automatically setup interface wg0, through a very insecure transport" - einfo "that is only suitable for demonstration purposes. You can then try loading the" - einfo "hidden website or sending pings:" - einfo - einfo " \$ chromium http://192.168.4.1" - einfo " \$ ping 192.168.4.1" - einfo - einfo "If you'd like to redirect your internet traffic, you can run it with the" - einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" - einfo "purposes. It is for quick testing only." - einfo - einfo "More info on getting started can be found at: https://www.wireguard.io/quickstart/" - einfo -} diff --git a/net-misc/wireguard/wireguard-0.0.20170115.ebuild b/net-misc/wireguard/wireguard-0.0.20170115.ebuild new file mode 100644 index 00000000..950f0c9 --- /dev/null +++ b/net-misc/wireguard/wireguard-0.0.20170115.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit linux-mod bash-completion-r1 + +DESCRIPTION="Simple yet fast and modern VPN that utilizes state-of-the-art cryptography." +HOMEPAGE="https://www.wireguard.io/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.zx2c4.com/WireGuard" + KEYWORDS="" +else + SRC_URI="https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${PV}.tar.xz" + S="${WORKDIR}/WireGuard-${PV}" + KEYWORDS="~amd64 ~x86 ~mips ~arm ~arm64" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="debug +module +tools module-src" + +DEPEND="tools? ( net-libs/libmnl )" +RDEPEND="${DEPEND}" + +MODULE_NAMES="wireguard(net:src)" +BUILD_PARAMS="KERNELDIR=${KERNEL_DIR} V=1" +BUILD_TARGETS="module" +CONFIG_CHECK="NET INET NET_UDP_TUNNEL NF_CONNTRACK NETFILTER_XT_MATCH_HASHLIMIT CRYPTO_BLKCIPHER ~PADATA ~IP6_NF_IPTABLES" +WARNING_PADATA="If you're running a multicore system you likely should enable CONFIG_PADATA for improved performance and parallel crypto." +WARNING_IP6_NF_IPTABLES="If your kernel has CONFIG_IPV6, you need CONFIG_IP6_NF_IPTABLES; otherwise WireGuard will not insert." + +pkg_setup() { + if use module; then + linux-mod_pkg_setup + kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1" + fi +} + +src_compile() { + use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" + use module && linux-mod_src_compile + use tools && emake RUNSTATEDIR="${EPREFIX}/run" -C src/tools +} + +src_install() { + use module && linux-mod_src_install + if use tools; then + dodoc README.md + dodoc -r contrib/examples + emake \ + WITH_BASHCOMPLETION=yes \ + WITH_SYSTEMDUNITS=yes \ + WITH_WGQUICK=yes \ + DESTDIR="${D}" \ + BASHCOMPDIR="$(get_bashcompdir)" \ + PREFIX="${EPREFIX}/usr" \ + -C src/tools install + insinto /$(get_libdir)/netifrc/net + newins "${FILESDIR}"/wireguard-openrc.sh wireguard.sh + fi + use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install +} + +pkg_postinst() { + if use module-src && ! use module; then + einfo + einfo "You have enabled the module-src USE flag without the module USE" + einfo "flag. This means that sources are installed to" + einfo "${ROOT}usr/src/wireguard instead of having the" + einfo "kernel module compiled. You will need to compile the module" + einfo "yourself. Most likely, you don't want this USE flag, and should" + einfo "rather use USE=module" + einfo + fi + use module && linux-mod_pkg_postinst + + ewarn + ewarn "This software is experimental and has not yet been released." + ewarn "As such, it may contain significant issues. Please do not file" + ewarn "bug reports with Gentoo, but rather direct them upstream to:" + ewarn + ewarn " t...@wireguard.io secur...@wireguard.io" + ewarn + + if use tools; then + einfo + einfo "After installing WireGuard, if you'd like to try sending some packets through" + einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" + einfo "test example script:" + einfo + einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" + einfo + einfo "This will automatically setup interface wg0, through a very insecure transport" + einfo "that is only suitable for demonstration purposes. You can then try loading the" + einfo "hidden website or sending pings:" + einfo + einfo " \$ chromium http://192.168.4.1" + einfo " \$ ping 192.168.4.1" + einfo + einfo "If you'd like to redirect your internet traffic, you can run it with the" + einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" + einfo "purposes. It is for quick testing only." + einfo + einfo "More info on getting started can be found at: https://www.wireguard.io/quickstart/" + einfo + fi +} diff --git a/net-misc/wireguard/wireguard-9999.ebuild b/net-misc/wireguard/wireguard-9999.ebuild index db54269..950f0c9 100644 --- a/net-misc/wireguard/wireguard-9999.ebuild +++ b/net-misc/wireguard/wireguard-9999.ebuild @@ -21,9 +21,9 @@ fi LICENSE="GPL-2" SLOT="0" -IUSE="debug kmod-src" +IUSE="debug +module +tools module-src" -DEPEND="net-libs/libmnl" +DEPEND="tools? ( net-libs/libmnl )" RDEPEND="${DEPEND}" MODULE_NAMES="wireguard(net:src)" @@ -34,48 +34,50 @@ WARNING_PADATA="If you're running a multicore system you likely should enable CO WARNING_IP6_NF_IPTABLES="If your kernel has CONFIG_IPV6, you need CONFIG_IP6_NF_IPTABLES; otherwise WireGuard will not insert." pkg_setup() { - use kmod-src && return - linux-mod_pkg_setup - kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1" + if use module; then + linux-mod_pkg_setup + kernel_is -lt 4 1 0 && die "This version of ${PN} requires Linux >= 4.1" + fi } src_compile() { use debug && BUILD_PARAMS="CONFIG_WIREGUARD_DEBUG=y ${BUILD_PARAMS}" - use kmod-src || linux-mod_src_compile - emake RUNSTATEDIR="${EPREFIX}/run" -C src/tools + use module && linux-mod_src_compile + use tools && emake RUNSTATEDIR="${EPREFIX}/run" -C src/tools } src_install() { - dodoc README.md - dodoc -r contrib/examples - emake \ - WITH_BASHCOMPLETION=yes \ - WITH_SYSTEMDUNITS=yes \ - WITH_WGQUICK=yes \ - DESTDIR="${D}" \ - BASHCOMPDIR="$(get_bashcompdir)" \ - PREFIX="${EPREFIX}/usr" \ - -C src/tools install - if use kmod-src; then - emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install - else - linux-mod_src_install + use module && linux-mod_src_install + if use tools; then + dodoc README.md + dodoc -r contrib/examples + emake \ + WITH_BASHCOMPLETION=yes \ + WITH_SYSTEMDUNITS=yes \ + WITH_WGQUICK=yes \ + DESTDIR="${D}" \ + BASHCOMPDIR="$(get_bashcompdir)" \ + PREFIX="${EPREFIX}/usr" \ + -C src/tools install + insinto /$(get_libdir)/netifrc/net + newins "${FILESDIR}"/wireguard-openrc.sh wireguard.sh fi - insinto /$(get_libdir)/netifrc/net - newins "${FILESDIR}"/wireguard-openrc.sh wireguard.sh + use module-src && emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" -C src dkms-install } pkg_postinst() { - if use kmod-src; then + if use module-src && ! use module; then einfo - einfo "You have enabled the kmod-src USE flag. This means that sources" - einfo "are installed to ${ROOT}usr/src/wireguard instead of having the" + einfo "You have enabled the module-src USE flag without the module USE" + einfo "flag. This means that sources are installed to" + einfo "${ROOT}usr/src/wireguard instead of having the" einfo "kernel module compiled. You will need to compile the module" - einfo "yourself. Most likely, you don't want this USE flag." + einfo "yourself. Most likely, you don't want this USE flag, and should" + einfo "rather use USE=module" einfo - else - linux-mod_pkg_postinst fi + use module && linux-mod_pkg_postinst + ewarn ewarn "This software is experimental and has not yet been released." ewarn "As such, it may contain significant issues. Please do not file" @@ -84,24 +86,26 @@ pkg_postinst() { ewarn " t...@wireguard.io secur...@wireguard.io" ewarn - einfo - einfo "After installing WireGuard, if you'd like to try sending some packets through" - einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" - einfo "test example script:" - einfo - einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" - einfo - einfo "This will automatically setup interface wg0, through a very insecure transport" - einfo "that is only suitable for demonstration purposes. You can then try loading the" - einfo "hidden website or sending pings:" - einfo - einfo " \$ chromium http://192.168.4.1" - einfo " \$ ping 192.168.4.1" - einfo - einfo "If you'd like to redirect your internet traffic, you can run it with the" - einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" - einfo "purposes. It is for quick testing only." - einfo - einfo "More info on getting started can be found at: https://www.wireguard.io/quickstart/" - einfo + if use tools; then + einfo + einfo "After installing WireGuard, if you'd like to try sending some packets through" + einfo "WireGuard, you may use, for testing purposes only, the insecure client.sh" + einfo "test example script:" + einfo + einfo " \$ bzcat ${ROOT}usr/share/doc/${PF}/examples/ncat-client-server/client.sh.bz2 | sudo bash -" + einfo + einfo "This will automatically setup interface wg0, through a very insecure transport" + einfo "that is only suitable for demonstration purposes. You can then try loading the" + einfo "hidden website or sending pings:" + einfo + einfo " \$ chromium http://192.168.4.1" + einfo " \$ ping 192.168.4.1" + einfo + einfo "If you'd like to redirect your internet traffic, you can run it with the" + einfo "\"default-route\" argument. You may not use this server for any abusive or illegal" + einfo "purposes. It is for quick testing only." + einfo + einfo "More info on getting started can be found at: https://www.wireguard.io/quickstart/" + einfo + fi }