-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing/wireguard-grsec / wireguard-vanilla / wireguard-tools #948
Conversation
grsecurity kernel module only for wireguard
vanilla kernel module only for wireguard
WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes **state-of-the-art cryptography**. It aims to be faster, simpler, leaner, and more useful than IPSec, while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. It runs over UDP. https://www.wireguard.io
Merged in 302e07d, 9b2a721, bb1bb8e by @kaniini. Thanks for your contribution! (This pull request has been closed automatically by GitHub PR Closer. If you think that it’s not resolved yet, please add a comment.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this package contribution! In the future, please give me a mention in any PRs or issues, so I can review before merging. This is wonderful work nonetheless, and I'm quite happy to see this in alpine. This review has a few little nits to cleanup in the next commit.
arch='all' | ||
url='https://www.wireguard.io' | ||
license="GPLv2" | ||
makedepends="linux-grsec-dev=$_kpkgver libmnl-dev sparse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably do not need to depend on sparse, unless you're actually doing development. It's not the "test suite" that you think it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have removed make check
& changed the makedepends
|
||
local module= | ||
for module in *.ko; do | ||
install -v -D -m644 ${module} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not instead run make -C src/ .... module-install
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module-install
tries to install into /lib
& does not obey DESTDIR="$pkgdir"
passed to make
for module in *.ko; do | ||
install -v -D -m644 ${module} \ | ||
"$pkgdir/lib/modules/$_abi_release/extra/${module}" | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to run depmod after installing kernel modules, or does some higher level alpine layer already do that for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the kernel modules should install themselves automatically when wireguard-tools
is installed - fixing in #954
return 0 | ||
# currently failing: attribute 'nocapture': unknown attribute | ||
# not part of musl libc ? | ||
make -C src/ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this section. It doesn't do what you want in the first place. It's for development, not for usage by packagers. If this confusion becomes widespread, I'll just remove it from the package I distribute and keep the shortcut locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
arch='all' | ||
url='https://www.wireguard.io' | ||
license="GPLv2" | ||
makedepends="libmnl-dev sparse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sparse has nothing to do with the tools and is not needed. Remove this dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was never a hard dependency to the userspace tools (only a build time depends)
removed in #954
} | ||
|
||
check() { | ||
return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has no business at all of being in the -tools package, and doesn't do what you'd hope it does anyway. Please remove this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alpine Linux's apkbuild
runs check()
on every single package in the repo now. If available it should run the software's built in unit tests.
Have removed make check
as requested in #954
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how this would work for you, but the WireGuard module actually has built-in selftests when built in DEBUG mode. When enabled, either the module inserts and everything is fine, or it fails to insert, which implies the tests have failed (and you get something in dmesg). This probably is too difficult to do in a package though...
arch='all' | ||
url='https://www.wireguard.io' | ||
license="GPLv2" | ||
makedepends="linux-vanilla-dev=$_kpkgver libmnl-dev sparse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sparse is not a requirement. Please remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #954
|
||
local module= | ||
for module in *.ko; do | ||
install -v -D -m644 ${module} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not instead run make -C src/ .... module-install?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module-install
tries to install into /lib
& does not obey DESTDIR="$pkgdir"
passed to make
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module-install will respond to INSTALL_MOD_PATH
being set, actually. So this is the right way to do it. In the next WireGuard release, I'll investigate wiring DESTDIR
up to INSTALL_MOD_PATH
, so that these can be unified. Thanks for pointing out the shortcomings to me.
for module in *.ko; do | ||
install -v -D -m644 ${module} \ | ||
"$pkgdir/lib/modules/$_abi_release/extra/${module}" | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to run depmod after installing kernel modules, or does some higher level alpine layer already do that for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the kernel modules should install themselves automatically when wireguard-tools
is installed - fixing in #954
done | ||
} | ||
|
||
check() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this section. It doesn't do what you want in the first place. It's for development, not for usage by packagers. If this confusion becomes widespread, I'll just remove it from the package I distribute and keep the shortcut locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alpine Linux's apkbuild
runs check()
on every single package in the repo now. If available it should run the software's built in unit tests.
Have removed make check
as requested in #954
@zx2c4 - in summary:
At the moment NB: pinning the
|
That tests package is bogus and will never work. It should not ever be distributed as a package by distributions. As written elsewhere, if other people make this same confusion, then I'll just remove that code from the tree.
Awesome! That's super easy. I like the reverse dependency logic of apk; very nice. |
WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes
state-of-the-art cryptography.
It aims to be faster, simpler, leaner, and more useful than IPSec, while
avoiding the massive headache. It intends to be considerably more performant
than OpenVPN.
WireGuard is designed as a general purpose VPN for running on embedded
interfaces and super computers alike, fit for many different circumstances.
It runs over UDP.
https://www.wireguard.io