Skip to content
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

Closed
wants to merge 3 commits into from
Closed

testing/wireguard-grsec / wireguard-vanilla / wireguard-tools #948

wants to merge 3 commits into from

Conversation

itoffshore
Copy link
Contributor

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

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
@algitbot
Copy link

algitbot commented Mar 2, 2017

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.)

@algitbot algitbot closed this Mar 2, 2017
@itoffshore itoffshore deleted the wireguard branch March 2, 2017 06:27
Copy link
Contributor

@zx2c4 zx2c4 left a 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"
Copy link
Contributor

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.

Copy link
Contributor Author

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} \
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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/ \
Copy link
Contributor

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.

Copy link
Contributor Author

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"
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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"
Copy link
Contributor

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.

Copy link
Contributor Author

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} \
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@zx2c4 zx2c4 Mar 3, 2017

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
Copy link
Contributor

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?

Copy link
Contributor Author

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() {
Copy link
Contributor

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.

Copy link
Contributor Author

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

@itoffshore
Copy link
Contributor Author

itoffshore commented Mar 2, 2017

@zx2c4 - in summary:

At the moment wireguard is in the testing repo so you will need to pin the edge repo & apk add linux-grsec@edge or apk add linux-vanilla@edge.

NB: pinning the testing repo normally causes dependency problems particularly with perl & python packages. You probably want to set /etc/apk/repositories to:

http://nl.alpinelinux.org/alpine/v3.5/main
http://nl.alpinelinux.org/alpine/v3.5/community
@edge http://nl.alpinelinux.org/alpine/edge/main
@edgecom http://nl.alpinelinux.org/alpine/edge/community
http://nl.alpinelinux.org/alpine/edge/testing

@zx2c4
Copy link
Contributor

zx2c4 commented Mar 3, 2017

developer tools are contained in wireguards-tests not wireguard-tools

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.

running apk add wireguard-tools will also automatically install the appropriate kernel modules.

Awesome! That's super easy. I like the reverse dependency logic of apk; very nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants