Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => STMP1 => Topic started by: Gaël on March 30, 2022, 12:25:50 PM

Title: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on March 30, 2022, 12:25:50 PM
Hi Olimex!

I need to use WireGuard on my STMP157-OLinuXino-LIME2 boards.

The Olimex linux kernel includes the WireGuard module but the linux-image-olimex package don't provide the virtual package wireguard-modules as linux-image-armmp (or linux-image-rt-armmp) do.

So when we install the wireguard package which depends on wireguard-modules, apt wants to install linux-image-rt-armmp package.

$ apt show linux-image-armmp
Package: linux-image-armmp
Version: 5.10.106-1
Priority: optional
Section: kernel
Source: linux
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Installed-Size: 13,3 kB
Provides: linux-image-generic, linux-latest-modules-5.10.0-13-armmp, wireguard-modules (= 1.0.0)
Depends: linux-image-5.10.0-13-armmp (= 5.10.106-1)

$ apt show linux-image-olimex
Package: linux-image-olimex
Version: 5.10.105-20220321-191943
Priority: optional
Section: kernel
Source: linux-5.10.105-olimex
Maintainer: root <root@runner-cpbkaozn-project-1-concurrent-0>
Installed-Size: 9 216 B
Depends: linux-image-5.10.105-olimex

Would it be possible to update the linux-image-olimex to include the linux-image-olimex virtual package as linux-image-armmp?

Thank you.

Gaël
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on March 30, 2022, 11:46:34 PM
Just a temporary solution to allow installation of WireGuard:

Edit /var/lib/apt/lists/repository.olimex.com_dists_bullseye_main_binary-armhf_Packages
Add a line after the section :
Package: linux-image-olimex
Source: linux-5.10.105-olimex
Version: 5.10.105-20220321-191943
Architecture: armhf
Maintainer: root <root@runner-cpbkaozn-project-1-concurrent-0>
Installed-Size: 9

And add :
Provides: linux-image-generic, linux-latest-modules-5.10.105-olimex, wireguard-modules (= 1.0.0)
Then you can install wireguard.

Edit : this modification must also be done in /var/lib/dpkg/status
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on March 31, 2022, 12:23:16 PM
Hi Olimex!

Can you transfer my problem to the linux-image-olimex packager at Olimex?

Thanks.
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: LubOlimex on April 01, 2022, 01:01:13 PM
I've relayed your complaint but can't say if these will be enabled and when. The problem is that there are many packages in the Linux kernel. Enabling all of them would cause issues and slow load times.

My advice is to re-build the kernel with the modules that you want enabled. Rebuilding is explained at the end of the document (11.2. How to build Linux Kernel for Olimage):

https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on April 01, 2022, 03:40:40 PM
Hi,

It's not a problem with the kernel, the module I need is already included.
It's just a problem with the metadata in the package (.deb).
To make it work, I have just tweak metadata in files /var/lib/dpkg/status and /var/lib/apt/lists/repository.olimex.com_dists_bullseye_main_binary-armhf_Packages as explained in my post.

Thanks.

Gaël
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: LubOlimex on April 04, 2022, 11:37:24 AM
The Linux maintainers had been notified and acknowledged the lack of metadata, we will see what can be done to improve the image in next release. Thank you for the report.
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on April 04, 2022, 12:07:33 PM
Thank-you Olimex for your prompt response!
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on April 04, 2022, 05:22:05 PM
Just another thing.

The /etc/apt/sources.list contains :
deb http://httpredir.debian.org/debian bullseye main contrib non-free
The http://httpredir.debian.org (http://httpredir.debian.org) is tagged as discontinued and had to be replaced by http://deb.debian.org (http://deb.debian.org).
See https://wiki.debian.org/DebianGeoMirror (https://wiki.debian.org/DebianGeoMirror) and Dropping httpredir.debian.org service (https://lists.debian.org/debian-mirrors/2017/02/msg00000.html).

Thanks.
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: JohnS on April 05, 2022, 01:19:56 AM
Quote from: Gaël on April 04, 2022, 05:22:05 PMJust another thing.

The /etc/apt/sources.list contains :
deb http://httpredir.debian.org/debian bullseye main contrib non-free
The http://httpredir.debian.org (http://httpredir.debian.org) is tagged as discontinued and had to be replaced by http://deb.debian.org (http://deb.debian.org).
See https://wiki.debian.org/DebianGeoMirror (https://wiki.debian.org/DebianGeoMirror) and Dropping httpredir.debian.org service (https://lists.debian.org/debian-mirrors/2017/02/msg00000.html).

Thanks.
If all they've done is tag it, rather than actively contacting people like Olimex, that is stupid and inevitably going to cause grief.

You would think they could have just redirected the URL to the new one and thus broken nothing.

John
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on April 05, 2022, 10:29:42 AM
I've observe that httpredir is used in sources.list and I've just inform Olimex that this domain is tagged discontinued. And effectively, now it redirects to deb.debian.org.
It's not a big deal, just an information, it doesn't allow you to be insulting!
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: JohnS on April 05, 2022, 12:50:35 PM
Quote from: Gaël on April 05, 2022, 10:29:42 AMI've observe that httpredir is used in sources.list and I've just inform Olimex that this domain is tagged discontinued. And effectively, now it redirects to deb.debian.org.
It's not a big deal, just an information, it doesn't allow you to be insulting!
Please read more carefully, I was not insulting in the situation you say is the case!

John
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on April 05, 2022, 02:34:17 PM
I don't understand your messages. May be you want to prove something?
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on September 29, 2022, 09:51:16 PM
Quote from: LubOlimex on April 04, 2022, 11:37:24 AMThe Linux maintainers had been notified and acknowledged the lack of metadata, we will see what can be done to improve the image in next release. Thank you for the report.

Hi Olimex,

Can you add the missing metadata please?

I have to manually edit
/var/lib/apt/lists/repository.olimex.com_dists_bullseye_main_binary-armhf_Packages at each http://repository.olimex.com/dists/bullseye/main/binary-armhf/Packages (http://repository.olimex.com/dists/bullseye/main/binary-armhf/Packages) update to add the missing metadata. And I have to do that on 16 STMP157-OLinuXino-LIME2 in production.

Thanks,
Title: Re: OLinuXino linux-image-olimex package and WireGuard
Post by: Gaël on November 07, 2022, 06:34:37 PM
To conclude,

Olimex Linux maintainers don't want to add the missing "Provides: wireguard-modules" metadata on the linux-image-olimex package.

But Olimex support have a solution to install WireGuard without the problems due to the missing metadata:
sudo apt install --no-install-recommends wireguard-tools