Remove wireguard after I built it [SOLVED]

If none of the more specific forums is the right place to ask

Remove wireguard after I built it [SOLVED]

Postby Scorpion » 2019-01-06 16:18

I built wireguard from the source following the official instructions and the stable WireGuard-0.0.20181119 version.
If I use another kernel I have this problem:
Code: Select all
wg-quick up wg0
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

How can I remove it? I used make and after make install but make uninstall:
Code: Select all
make uninstall
make: *** No rule to make target 'uninstall'.  Stop.
Last edited by Scorpion on 2019-01-07 15:46, edited 1 time in total.
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Re: Remove wireguard after I built it

Postby Head_on_a_Stick » 2019-01-06 16:28

If you have a manifest.txt then try
Code: Select all
cat install_manifest.txt | xargs echo sudo rm | sh

If not then list the install steps with
Code: Select all
make -n install

then reverse them :)

EDIT: viewtopic.php?t=38976
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Remove wireguard after I built it

Postby Scorpion » 2019-01-06 18:58

I don't have any manifest.
Code: Select all
make -n install
make -C /lib/modules/4.19.0-13.1-liquorix-amd64/build M=/path/WireGuard-0.0.20181119/src modules_install
mkdir -p /lib/modules/4.19.0-13.1-liquorix-amd64/extra
make -f ./scripts/Makefile.modinst
:
echo '  DEPMOD  4.19.0-13.1-liquorix-amd64'; /bin/bash ./scripts/depmod.sh /sbin/depmod 4.19.0-13.1-liquorix-amd64
depmod -a
make -C tools install
install -v -d "/usr/bin" && install -v -m 0755 wg "/usr/bin/wg"
install -v -d "/usr/share/man/man8" && install -v -m 0644 man/wg.8 "/usr/share/man/man8/wg.8"
[ "yes" = "yes" ] || exit 0; \
install -v -d "/usr/share/bash-completion/completions" && install -v -m 0644 completion/wg.bash-completion "/usr/share/bash-completion/completions/wg"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0755 wg-quick/linux.bash "/usr/bin/wg-quick" && install -v -m 0700 -d "/etc/wireguard"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0644 man/wg-quick.8 "/usr/share/man/man8/wg-quick.8"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
install -v -m 0644 completion/wg-quick.bash-completion "/usr/share/bash-completion/completions/wg-quick"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \

The 4.19.0-13.1-liquorix-amd64 kernel doesn't work since I built it with another.
Is the link for build a wireguard .deb?
I think that I can install it from unstable. But how can I remove it now?
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Re: Remove wireguard after I built it

Postby Head_on_a_Stick » 2019-01-06 19:56

Scorpion wrote:how can I remove it now?

Look at all the "install" lines in your posted output — they tell you exactly where all of the components have been installed, all you have to do is delete them.
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Remove wireguard after I built it

Postby stevepusser » 2019-01-06 20:29

Scorpion wrote:I don't have any manifest.
Code: Select all
make -n install
make -C /lib/modules/4.19.0-13.1-liquorix-amd64/build M=/path/WireGuard-0.0.20181119/src modules_install
mkdir -p /lib/modules/4.19.0-13.1-liquorix-amd64/extra
make -f ./scripts/Makefile.modinst
:
echo '  DEPMOD  4.19.0-13.1-liquorix-amd64'; /bin/bash ./scripts/depmod.sh /sbin/depmod 4.19.0-13.1-liquorix-amd64
depmod -a
make -C tools install
install -v -d "/usr/bin" && install -v -m 0755 wg "/usr/bin/wg"
install -v -d "/usr/share/man/man8" && install -v -m 0644 man/wg.8 "/usr/share/man/man8/wg.8"
[ "yes" = "yes" ] || exit 0; \
install -v -d "/usr/share/bash-completion/completions" && install -v -m 0644 completion/wg.bash-completion "/usr/share/bash-completion/completions/wg"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0755 wg-quick/linux.bash "/usr/bin/wg-quick" && install -v -m 0700 -d "/etc/wireguard"
[ "yes" = "yes" ] || exit 0; \
install -v -m 0644 man/wg-quick.8 "/usr/share/man/man8/wg-quick.8"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \
install -v -m 0644 completion/wg-quick.bash-completion "/usr/share/bash-completion/completions/wg-quick"
[ "yes" = "yes" -a "yes" = "yes" ] || exit 0; \

The 4.19.0-13.1-liquorix-amd64 kernel doesn't work since I built it with another.
Is the link for build a wireguard .deb?
I think that I can install it from unstable. But how can I remove it now?


You're going to be much better off backporting a proper Debian package if you're running Stretch, though that is getting trickier now that upstream has started using debhelper 12 and debhelper-compat, though updating debhelper from backports probably will help.

I'll take a look at backporting wireguard, though your problems with different kernels hint that it needs a kernel module rebuilt for every kernel you have installed.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11022
Joined: 2009-10-06 05:53

Re: Remove wireguard after I built it

Postby stevepusser » 2019-01-06 21:07

Yes, the Debian version includes a dkms package. I suppose a manually-built version would require a reinstall on every kernel in order to build the kernel modules.

It looks like a pretty straightforward backport.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11022
Joined: 2009-10-06 05:53

Re: Remove wireguard after I built it

Postby stevepusser » 2019-01-06 21:20

I backported it from Sid on a vanilla Stretch pbuilder platform for MX 17,and the dkms package builds on the 4.19 and 4.20 kernel. It's a 1 MiB download: https://drive.google.com/open?id=16VEqI ... ZsNIbp6Hlq and I'll leave it up for a few days at least.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11022
Joined: 2009-10-06 05:53

Re: Remove wireguard after I built it

Postby xepan » 2019-01-07 04:50

Head_on_a_Stick wrote:
Code: Select all
cat install_manifest.txt | xargs echo sudo rm | sh


jesus. "read", not cat. xargs -0, best not at all.
http://mywiki.wooledge.org/BashFAQ/001
xepan
 
Posts: 89
Joined: 2018-11-28 06:38

Re: Remove wireguard after I built it

Postby Head_on_a_Stick » 2019-01-07 06:04

xepan wrote:jesus. "read", not cat. xargs -0, best not at all.

Thanks for the advice but that was a pure copy&paste exercise, I didn't bother expending any thought on that at all :D
User avatar
Head_on_a_Stick
 
Posts: 10346
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Remove wireguard after I built it

Postby Scorpion » 2019-01-07 09:00

stevepusser wrote:I backported it from Sid on a vanilla Stretch pbuilder platform for MX 17,and the dkms package builds on the 4.19 and 4.20 kernel. It's a 1 MiB download: https://drive.google.com/open?id=16VEqI ... ZsNIbp6Hlq and I'll leave it up for a few days at least.

Awesome, but I' m not sure what to do. I' m running Stretch amd64 (with gnome) and backports a galore :D
Should I install the "wireguard_0.0.20181218-1~mx17+1_all.deb"?
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Re: Remove wireguard after I built it [SOLVED]

Postby Scorpion » 2019-01-07 15:47

I rebuilt it
Code: Select all
cd src
make clean
make
make install

And now works so you have to do it for every kernel.
User avatar
Scorpion
 
Posts: 123
Joined: 2018-10-17 11:38

Re: Remove wireguard after I built it [SOLVED]

Postby stevepusser » 2019-01-07 23:47

You install the "all" packages plus the ones for your architecture from my zip. One neat trick is to install local-apt-repository and put the debs in /srv/local-apt-repository, then they become part of your apt system for good, until you remove them. Then you just "apt install wireguard".

You should not have to rebuild your own version from source for every kernel, unless that also builds the modules. Most of the time, just running "make install" on a new kernel will work. But the dkms package in my builds does that automatically, and is the better choice.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Foliate 1.5.3, Minitube 3.1, wine-staging 4.12, Virtual Box 5.2.32 & 6.0.10, Pale Moon 28.6.1, Waterfox 56.2.12
User avatar
stevepusser
 
Posts: 11022
Joined: 2009-10-06 05:53


Return to General Questions

Who is online

Users browsing this forum: No registered users and 16 guests

fashionable