diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
commit | deba8115d2c2af26df42966b91ef04ff4dd79cde (patch) | |
tree | 9a48f42594e1a9e6b2020d5535a784314434d7a7 /net-vpn/wireguard-tools | |
parent | 38423c67c8a23f6a1bc42038193182e2da3116eb (diff) |
gentoo resync : 14.05.2020
Diffstat (limited to 'net-vpn/wireguard-tools')
-rw-r--r-- | net-vpn/wireguard-tools/Manifest | 4 | ||||
-rw-r--r-- | net-vpn/wireguard-tools/wireguard-tools-1.0.20200319.ebuild | 4 | ||||
-rw-r--r-- | net-vpn/wireguard-tools/wireguard-tools-1.0.20200513.ebuild | 101 |
3 files changed, 104 insertions, 5 deletions
diff --git a/net-vpn/wireguard-tools/Manifest b/net-vpn/wireguard-tools/Manifest index dcc4afd3a370..a10f93aefc19 100644 --- a/net-vpn/wireguard-tools/Manifest +++ b/net-vpn/wireguard-tools/Manifest @@ -1,3 +1,5 @@ DIST wireguard-tools-1.0.20200319.tar.xz 92324 BLAKE2B 9f514748708ef6a5b7f5b043c9054c954d17bb77de7a354b5a9a4e63cfb5f441237e98b16b288426441a7e709e1874d396cf67b04b38bb0ebbe7822bb32ada57 SHA512 d5bcd153f9b10f184b9a1bf9a81f33a9713ab4863ab5aa190eac60e92919756c8fecbb0d3cfb83bae20ac78fc43fdd7168f37294cdd7c5ee21f2a1b2db5fdf41 -EBUILD wireguard-tools-1.0.20200319.ebuild 3457 BLAKE2B 13c8ba245677c71d0487b7e7752b2ea31d26644520227b5b2aea302b83e953152b9752a608d8b10d23ef1ade89a78b814a20c31136989b2a6ec0cd14d3b63515 SHA512 a50707ab26b9c81b435dbd0edbf08da7ab06674d332818b3f715142adfce4d1ca8f5deba9291ecda4c26e23bc6214cde38114238faee9295163bfa6625f82093 +DIST wireguard-tools-1.0.20200513.tar.xz 94500 BLAKE2B 34a39533018416df382d180da76d6494feec1d40208c9df427c1979817dbe138c217fe4c4f4cf5cecd3c4053e6f73f1863d1e0a9ed2cad41899dda5387c15844 SHA512 4d27b262350b6b47843a323c2e7ab8d2bdd48065c265778abdec85b3f6fc92aa9af77d76e368df9cc8e435eae1c0ce50fed52e1d78db54358c1884d34be08d2c +EBUILD wireguard-tools-1.0.20200319.ebuild 3227 BLAKE2B 28d1a50c5379f54153138c0cca1681cc2ef9c34833ccbb465b15b2cdf4e288235fc1a3beede3059d5c040ccbe1289be7a0c7250491b8fb714db5f158c129fcc1 SHA512 e1afcba37c0270e4e121fe26346314818e51b8fa8a627ec39c69e3014fbd1ea7cc7c44f47a4925ef3086ec60a2fd11b532f8af9102db825856ab34545770ffd2 +EBUILD wireguard-tools-1.0.20200513.ebuild 3234 BLAKE2B 0dcfc0ad5c8f7e893fc8fa7989da618b31025f2e7c28defd22278bf3f0228eb87014e8b32d6787ac257b94bb6ffdb2b2c34dadd06b0375d948a28685bb7698cd SHA512 f2a43c9a53144ef7a8fa7fb62a7fff5126f9422df3b946c54ec36c3637e846533df92e62dd2062ef2e405c44ee6440af5825f929d99779913bb55face199c383 MISC metadata.xml 362 BLAKE2B b6c8384cc5434b65a80b2326df412ca38a96bfd137feb34cea5124eebe13d383851b3ceea17cfc0b937555a0760608e0f3d0a7834da15271e65f669bfbfb8d2a SHA512 bf494cd4c95dbbbf783fc847cdf03f9a83b2673bf3a0a78fa12480abd1e2657f255019cf4f68db5143b11c5c63d6c16e9e18480800115751be9bc3cae910c8ea diff --git a/net-vpn/wireguard-tools/wireguard-tools-1.0.20200319.ebuild b/net-vpn/wireguard-tools/wireguard-tools-1.0.20200319.ebuild index 6d3ad039ded4..252d5e050c21 100644 --- a/net-vpn/wireguard-tools/wireguard-tools-1.0.20200319.ebuild +++ b/net-vpn/wireguard-tools/wireguard-tools-1.0.20200319.ebuild @@ -96,10 +96,6 @@ pkg_postinst() { 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.com/quickstart/" einfo } diff --git a/net-vpn/wireguard-tools/wireguard-tools-1.0.20200513.ebuild b/net-vpn/wireguard-tools/wireguard-tools-1.0.20200513.ebuild new file mode 100644 index 000000000000..ab890be7d847 --- /dev/null +++ b/net-vpn/wireguard-tools/wireguard-tools-1.0.20200513.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info bash-completion-r1 systemd toolchain-funcs + +DESCRIPTION="Required tools for WireGuard, such as wg(8) and wg-quick(8)" +HOMEPAGE="https://www.wireguard.com/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.zx2c4.com/wireguard-tools" + KEYWORDS="" +else + SRC_URI="https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${PV}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+wg-quick" + +BDEPEND="virtual/pkgconfig" +DEPEND="" +RDEPEND="${DEPEND} + wg-quick? ( + || ( net-firewall/nftables net-firewall/iptables ) + virtual/resolvconf + ) + !<virtual/wireguard-1 +" + +wg_quick_optional_config_nob() { + CONFIG_CHECK="$CONFIG_CHECK ~$1" + declare -g ERROR_$1="CONFIG_$1: This option is required for automatic routing of default routes inside of wg-quick(8), though it is not required for general WireGuard usage." +} + +pkg_setup() { + use wg-quick || return 0 + wg_quick_optional_config_nob IP_ADVANCED_ROUTER + wg_quick_optional_config_nob IP_MULTIPLE_TABLES + wg_quick_optional_config_nob IPV6_MULTIPLE_TABLES + if has_version net-firewall/nftables; then + wg_quick_optional_config_nob NF_TABLES + wg_quick_optional_config_nob NF_TABLES_IPV4 + wg_quick_optional_config_nob NF_TABLES_IPV6 + wg_quick_optional_config_nob NFT_CT + wg_quick_optional_config_nob NFT_FIB + wg_quick_optional_config_nob NFT_FIB_IPV4 + wg_quick_optional_config_nob NFT_FIB_IPV6 + wg_quick_optional_config_nob NF_CONNTRACK_MARK + elif has_version net-firewall/iptables; then + wg_quick_optional_config_nob NETFILTER_XTABLES + wg_quick_optional_config_nob NETFILTER_XT_MARK + wg_quick_optional_config_nob NETFILTER_XT_CONNMARK + wg_quick_optional_config_nob NETFILTER_XT_MATCH_COMMENT + wg_quick_optional_config_nob IP6_NF_RAW + wg_quick_optional_config_nob IP_NF_RAW + wg_quick_optional_config_nob IP6_NF_FILTER + wg_quick_optional_config_nob IP_NF_FILTER + fi + linux-info_pkg_setup +} + +src_compile() { + emake RUNSTATEDIR="${EPREFIX}/run" -C src CC="$(tc-getCC)" LD="$(tc-getLD)" +} + +src_install() { + dodoc README.md + dodoc -r contrib + emake \ + WITH_BASHCOMPLETION=yes \ + WITH_SYSTEMDUNITS=yes \ + WITH_WGQUICK=$(usex wg-quick) \ + DESTDIR="${D}" \ + BASHCOMPDIR="$(get_bashcompdir)" \ + SYSTEMDUNITDIR="$(systemd_get_systemunitdir)" \ + PREFIX="${EPREFIX}/usr" \ + -C src install +} + +pkg_postinst() { + 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}/contrib/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 "More info on getting started can be found at: https://www.wireguard.com/quickstart/" + einfo +} |