Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic:  Wireguard unexpected dependency  (Read 4122 times)

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Wireguard unexpected dependency
« on: 2022/01/05, 22:34:09 »
Hello,

today Wireguard has a dependency with linux-image-rt-amd64. Never seen before and I can't believe it.

Code: [Select]
$ LANG=C sudo apt -V install wireguard
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   linux-image-5.15.0-2-rt-amd64 (5.15.5-2)
   linux-image-rt-amd64 (5.15.5-2)
   wireguard-tools (1.0.20210914-1)
Suggested packages:
   debian-kernel-handbook (1.0.19)
The following NEW packages will be installed:
   linux-image-5.15.0-2-rt-amd64 (5.15.5-2)
   linux-image-rt-amd64 (5.15.5-2)
   wireguard (1.0.20210914-1)
   wireguard-tools (1.0.20210914-1)
0 upgraded, 4 newly installed, 0 to remove and 139 not upgraded.
Need to get 63.8 MB of archives.
After this operation, 380 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Your opinion?

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.920
Re: Wireguard unexpected dependency
« Reply #1 on: 2022/01/06, 00:28:11 »
uname -a
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline dpanter

  • User
  • Posts: 61
Re: Wireguard unexpected dependency
« Reply #2 on: 2022/01/06, 09:27:01 »
Quote
This metapackage explicitly depends on both the kernel module and the userspace tooling.

Since Wireguard is in the kernel already, do you actually need this package?
<< insert signature here >>

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.920
Re: Wireguard unexpected dependency
« Reply #3 on: 2022/01/06, 10:17:57 »
No, wireguard is not in kernel, only the wireguard modules!
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline dpanter

  • User
  • Posts: 61
Re: Wireguard unexpected dependency
« Reply #4 on: 2022/01/06, 10:30:04 »
No, wireguard is not in kernel, only the wireguard modules!
Well yes, to be accurate.  ;)
The question remains, why would you need this or any other wireguard package? I'm using a VPN with wireguard and have no wireguard* packages installed.
<< insert signature here >>

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Wireguard unexpected dependency
« Reply #5 on: 2022/01/07, 22:03:52 »
uname -a

I was linux-image-5.15.11-5-siduction-amd64. Meanwhile it's
Code: [Select]
Linux jake 5.15.13-1-siduction-amd64 #1 SMP PREEMPT siduction 5.15-13 (2022-01-05) x86_64 GNU/Linux

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 2.920
Re: Wireguard unexpected dependency
« Reply #6 on: 2022/01/07, 22:23:03 »
Code: [Select]
~
towo:Defiant> LANG=C apt show linux-image-5.15.13-1-siduction-amd64
Package: linux-image-5.15.13-1-siduction-amd64
Version: 5.15-13
Priority: optional
Section: kernel
Source: linux-siduction
Maintainer: Torsten Wohlfarth <towo@siduction.org>
Installed-Size: 249 MB
Provides: wireguard-modules
Depends: kmod, linux-base (>= 4.3~), initramfs-tools (>= 0.121~) | linux-initramfs-tool
Recommends: firmware-linux-free, irqbalance
Suggests: linux-doc-5.15, crda, grub-pc | extlinux | grub-efi-amd64
Conflicts: hal, r8168-dkms, rtl8821ce-dkms
Breaks: initramfs-tools (<< 0.121~), xserver-xorg-input-vmmouse (<< 1:13.0.99)
Homepage: https://www.kernel.org/
Download-Size: 47,8 MB
APT-Sources: https://packages.siduction.org/extra unstable/main amd64 Packages
Description: Linux 5.15 for 64-bit PCs
 The Linux kernel 5.15 and modules for use on PCs with AMD64 or Intel 64
 processors.
 .
 This kernel also runs on a Xen hypervisor.  It supports both privileged
 (dom0) and unprivileged (domU) operation.

As you can see, Provides: wireguard-modules the kernel briings all, what's needed, so wireguard should not install any debian kernel.

Code: [Select]
~
towo:Defiant> LANG=C sudo apt -V install wireguard -s
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
   wireguard (1.0.20210914-1)
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Inst wireguard (1.0.20210914-1 Debian:unstable, Debian:testing [all])
Conf wireguard (1.0.20210914-1 Debian:unstable, Debian:testing [all])
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Wireguard unexpected dependency
« Reply #7 on: 2022/01/08, 17:44:11 »
Hello,

I understand that the meta-package wireguard isn't necessary for current kernals. But I see the same situation with the wireguard-tools package. And this is important to configure wireguard connections because it contains wg. As far as I understand the Wireguard Quick-Guide (https://www.wireguard.com/quickstart/) correctly.

Code: [Select]
$ LANG=C apt show -a wireguard-tools
Package: wireguard-tools
Version: 1.0.20210914-1
Priority: optional
Section: net
Source: wireguard
Maintainer: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Installed-Size: 328 kB
Depends: libc6 (>= 2.14)
Recommends: nftables | iptables, wireguard-modules (>= 0.0.20171001) | wireguard-dkms (>= 0.0.20191219)
Suggests: openresolv | resolvconf
Homepage: https://www.wireguard.com
Download-Size: 86.2 kB
APT-Sources: https://deb.debian.org/debian unstable/main amd64 Packages
Description: fast, modern, secure kernel VPN tunnel (userland utilities)
 WireGuard is a novel VPN that runs inside the Linux Kernel and uses
 state-of-the-art cryptography (the "Noise" protocol). 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.
 .
 This package contains command-line tools to interact with the
 WireGuard kernel module.  Currently, it provides only a single tool:
 .
 wg: set and retrieve configuration of WireGuard interfaces
Code: [Select]
$ LANG=C apt rdepends wireguard-tools
wireguard-tools
Reverse Depends:
  Recommends: wireguard-dkms (>= 0.0.20191219)
  Depends: wireguard (>= 1.0.20210914-1)
  Depends: mozillavpn (>= 1.0.20200513-1~18.04.2)
Code: [Select]
$ LANG=C apt -Vs install wireguard-tools
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   linux-image-5.15.0-2-rt-amd64 (5.15.5-2)
   linux-image-rt-amd64 (5.15.5-2)
Suggested packages:
   debian-kernel-handbook (1.0.19)
The following NEW packages will be installed:
   linux-image-5.15.0-2-rt-amd64 (5.15.5-2)
   linux-image-rt-amd64 (5.15.5-2)
   wireguard-tools (1.0.20210914-1)
0 upgraded, 3 newly installed, 0 to remove and 124 not upgraded.
Inst linux-image-5.15.0-2-rt-amd64 (5.15.5-2 Debian:unstable [amd64])
Inst linux-image-rt-amd64 (5.15.5-2 Debian:unstable [amd64])
Inst wireguard-tools (1.0.20210914-1 Debian:unstable [amd64])
Conf linux-image-5.15.0-2-rt-amd64 (5.15.5-2 Debian:unstable [amd64])
Conf linux-image-rt-amd64 (5.15.5-2 Debian:unstable [amd64])
Conf wireguard-tools (1.0.20210914-1 Debian:unstable [amd64])

I just want to understand why linux-image-rt-amd64 is a dependency that has to be fulfilled and linux-image-siduction-amd64 is not enough.

Offline michaa7

  • User
  • Posts: 2.295
Re: Wireguard unexpected dependency
« Reply #8 on: 2022/01/09, 14:39:24 »
Hi, I have no clue about wireguard. But if i simmulate an install, there is no dependency like on your system.
Code: [Select]
# apt -V install wireguard -s
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden zusätzlichen Pakete werden installiert:
   wireguard-tools (1.0.20210914-1)
Die folgenden NEUEN Pakete werden installiert:
   wireguard (1.0.20210914-1)
   wireguard-tools (1.0.20210914-1)
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
Inst wireguard-tools (1.0.20210914-1 Debian:unstable [amd64])
Inst wireguard (1.0.20210914-1 Debian:unstable [all])
Conf wireguard-tools (1.0.20210914-1 Debian:unstable [amd64])
Conf wireguard (1.0.20210914-1 Debian:unstable [all])

So it seems as if there is something *unusual* happening on your system:

Have you packages on hold?
What output gives you an "apt update && apt dist-upgrade" ? ( add "-s" if you want to simulate)


EDIT!

BUT ...

I have linux-image-amd64 installed (because I use a Debian Kernel when I write a Debian Bug report). If I purge linux-image-amd64 and then simulate a wireguard install I get the same dependency as you.
Note, the rt kernel has three possible dependencies:
Code: [Select]
# apt depends wireguard
wireguard
 |Hängt ab von: <wireguard-modules> (>= 0.0.20191219)
    linux-image-amd64
    linux-image-cloud-amd64
    linux-image-rt-amd64
  Hängt ab von: wireguard-dkms (>= 0.0.20200121-2)
  Hängt ab von: wireguard-tools (>= 1.0.20210914-1)
and it seems as if in absence of all three it picks the last one.

Would be interessting if towo has linux-image-amd64 installed as well. It seems as if the siduction kernel meta package should be included as one possible dependency to avoid this oddness.

« Last Edit: 2022/01/09, 19:46:18 by michaa7 »
Ok, you can't code, but you still might be able to write a bug report for Debian's sake

Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 927
Re: Wireguard unexpected dependency
« Reply #9 on: 2022/01/10, 14:08:37 »
Well, I was curious and took a look at it.
I have wireguard installed, never ask what comes with!

Code: [Select]
~$ LANG=C apt policy wireguard
wireguard:
  Installed: 1.0.20210914-1
  Candidate: 1.0.20210914-1
  Version table:
 *** 1.0.20210914-1 500
        500 http://deb.debian.org/debian unstable/main amd64 Packages
        500 http://deb.debian.org/debian testing/main amd64 Packages
        100 /var/lib/dpkg/status

Code: [Select]
~$ LANG=C apt depends wireguard
wireguard
 |Depends: <wireguard-modules> (>= 0.0.20191219)
    linux-image-amd64
    linux-image-cloud-amd64
    linux-image-rt-amd64
  Depends: wireguard-dkms (>= 0.0.20200121-2)
  Depends: wireguard-tools (>= 1.0.20210914-1)

Code: [Select]
~$ LANG=C dpkg -l linux-image*

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                       Version      Architecture Description
+++-==========================================-============-============-==============================================
rc  linux-image-5.10.19-towo.1-siduction-amd64 5.10-19      amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.10.19-towo.2-siduction-amd64 5.10-19.1    amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.10.20-towo.1-siduction-amd64 5.10-20.1    amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.11.4-towo.1-siduction-amd64  5.11-4       amd64        Linux 5.11 for 64-bit PCs
ii  linux-image-5.15.0-2-rt-amd64              5.15.5-2     amd64        Linux 5.15 for 64-bit PCs, PREEMPT_RT (signed)
un  linux-image-5.15.0-2-rt-amd64-unsigned     <none>       <none>       (no description available)
ii  linux-image-5.15.12-2-siduction-amd64      5.15-12.1    amd64        Linux 5.15 for 64-bit PCs
ii  linux-image-5.15.13-1-siduction-amd64      5.15-13      amd64        Linux 5.15 for 64-bit PCs
ii  linux-image-rt-amd64                       5.15.5-2     amd64        Linux for 64-bit PCs (meta-package)
ii  linux-image-siduction-amd64                5.15-13      amd64        Linux image for siduction on 64-bit PCs

So, the rt-image is installed.

Why?
Maybe I am totally wrong, our kernel image is named (correctly) "linux-image-siduction-amd64"
 but wireguard* depends on linux-image-[cloud, rt]amd64 but not "-siduction"!

And as long it depends on not recommends on, we/you can't change that behavior with like apt install --no-install-recommends.

I can be totally wrong!



Offline hendrikL

  • Administrator
  • User
  • *****
  • Gravatar
  • Posts: 927
Re: Wireguard unexpected dependency
« Reply #10 on: 2022/01/10, 14:36:43 »
Ps.:
Since the modules are in the kernel i tested this, I don't know if the wireguard-dkms package is needed.

Code: [Select]
~$ LANG=C apt -s purge linux-image-5.15.0-2-rt-amd64 linux-image-rt-amd64 wireguard- wireguard-tools+ wireguard-dkms+
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wireguard-tools is already the newest version (1.0.20210914-1).
wireguard-tools set to manually installed.
Recommended packages:
  wireguard
The following packages will be REMOVED:
  linux-image-5.15.0-2-rt-amd64* linux-image-rt-amd64* wireguard*
The following NEW packages will be installed:
  wireguard-dkms
0 upgraded, 1 newly installed, 3 to remove and 0 not upgraded.
Purg wireguard [1.0.20210914-1]
Purg linux-image-rt-amd64 [5.15.5-2]
Purg linux-image-5.15.0-2-rt-amd64 [5.15.5-2]
Inst wireguard-dkms (1.0.20210606-1 Debian:unstable, Debian:testing [all])
Conf wireguard-dkms (1.0.20210606-1 Debian:unstable, Debian:testing [all])

Conclusion, it should be possible to install wireguard-* without the debian-, rt- or cloud-kernel.

Edit: Typing that while I am connected via a wireguard-tunnel,

Code: [Select]
+++-==========================================-============-============-=======================================
rc  linux-image-5.10.19-towo.1-siduction-amd64 5.10-19      amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.10.19-towo.2-siduction-amd64 5.10-19.1    amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.10.20-towo.1-siduction-amd64 5.10-20.1    amd64        Linux 5.10 for 64-bit PCs
rc  linux-image-5.11.4-towo.1-siduction-amd64  5.11-4       amd64        Linux 5.11 for 64-bit PCs
ii  linux-image-5.15.12-2-siduction-amd64      5.15-12.1    amd64        Linux 5.15 for 64-bit PCs
ii  linux-image-5.15.13-1-siduction-amd64      5.15-13      amd64        Linux 5.15 for 64-bit PCs
ii  linux-image-siduction-amd64                5.15-13      amd64        Linux image for siduction on 64-bit PCs

Code: [Select]
LANG=C apt policy wireguard* | grep Installed -B 1

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

wireguard-tools-dbgsym:
  Installed: (none)
--
wireguard-dkms:
  Installed: (none)
--
wireguard-tools:
  Installed: 1.0.20210914-1
--
wireguard-modules:
  Installed: (none)
--
wireguard:
  Installed: (none

So wireguard works like a charme for me™, without having another kernel installed than the -siduction one!

Don't know how it is with a server setup, but as client it works.

« Last Edit: 2022/01/10, 14:56:10 by hendrikL »

Offline Mister00X

  • User
  • Posts: 198
Re: Wireguard unexpected dependency
« Reply #11 on: 2022/01/10, 14:46:22 »
I think I know the cause of this problem.
Code: [Select]
$ LANG=C apt depends wireguard
wireguard
 |Depends: <wireguard-modules> (>= 0.0.20191219)

<...snip...>

According to apt show linux-image-5.15.13-1-siduction-amd64 the siduction kernel provides
Code: [Select]
<...snip...>
Provides: wireguard-modules
<...snip...>
whereas debians stock kernel has
Code: [Select]
$ apt show linux-image-amd64
<...snip...>
Provides: linux-image-generic, linux-latest-modules-5.15.0-2-amd64, virtualbox-guest-modules, wireguard-modules (= 1.0.0)
<...snip...>

Debians stock kernel clearly provides a module with a version number greater than 0.0.20191219 where siductions kernel do not specify a wireguard-modules version number. Assuming that if a version number is not present apt defaults to pretend that it is 0 the problems can be explained.
Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say. – Edward Snowden

Offline orinoco

  • User
  • Posts: 233
  • Bullshit artist
Re: Wireguard unexpected dependency
« Reply #12 on: 2022/01/11, 01:54:23 »
Hello,

thanks to everyone for the interesting input on this topic. I did some more testing on my own and installed wireguard-tools and allowed apt to pull the Debian rt-image, too.

After that I uninstalled the kernel again and wireguard-tools remains on the disk. But now "apt update" gives a warning:

Quote
W: Ignoring non-equal Provides for package wireguard-modules in linux-image-5.15.13-2-siduction-amd64:amd64=5.15-13.1

I guess that matches to the posting of Mister00X.

Offline samoht

  • User
  • Posts: 478
Re: Wireguard unexpected dependency
« Reply #13 on: 2022/01/11, 06:58:41 »
Quote
W: Ignoring non-equal Provides for package wireguard-modules in linux-image-5.15.13-2-siduction-amd64:amd64=5.15-13.1

Here this warning also appears recently,

Code: [Select]
# dpkg -l *wireguard* | grep ^ii
# uname -a
Linux tuxxy2-sid 5.15.13-3-siduction-amd64 #1 SMP PREEMPT siduction 5.15-13.2 (2022-01-10) x86_64 GNU/Linux

UPDATE [20220112]:
Warning disappeared
« Last Edit: 2022/01/14, 10:05:02 by samoht »

Offline Mister00X

  • User
  • Posts: 198
Re: Wireguard unexpected dependency
« Reply #14 on: 2022/01/11, 16:35:46 »
I can confirm. 
It's happening here too
Code: [Select]
# LANG=C apt update
<...snip...>
W: Ignoring non-equal Provides for package wireguard-modules in linux-image-5.15.13-2-siduction-amd64:amd64=5.15-13.1

Note I do not have wireguard installed on this particular system.
Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say. – Edward Snowden