Bug 21554

Summary: would add support for DisplayLink adapters to mageia
Product: Mageia Reporter: Christian Müller <chmos>
Component: New RPM package requestAssignee: Kernel and Drivers maintainers <kernel>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Normal CC: chb0, doktor5000, ezequiel_partida, fri, ghibomgx, j.alberto.vc, joelp, marja11, ngompa13, yvesbrungard
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/displaylink-rpm/displaylink-rpm/releases
Whiteboard:
Source RPM: displaylink CVE:
Status comment:
Attachments: displaylink spec
Alternative conf file
evdi spec
Patch for pyevdvi
New dsiplaylink spec without dkms-evdi in x86_64
New version of evdi spec
displaylink spec for kernels with or without native evdi
Latest versionof evdi spec

Description Christian Müller 2017-08-17 19:34:49 CEST
Description of problem:

DisplayLink USB port replicators do not work ooB in mageia. 
Installing fedora rpms from above url basically gets them working.
Comment 1 Marja Van Waes 2017-08-17 19:38:53 CEST
Assigning this package request to all packagers collectively. On a voluntary basis, one of them might, if there are no license or other legal issues, want to integrate it to the distribution and maintain it for bug and security fixes.

You might also want to join the packager team to maintain this piece of software: see https://wiki.mageia.org/en/Becoming_a_Mageia_Packager

(Btw, new packages always need to be added to cauldron, first. Once they are in cauldron, a backport request can be made to add them to Stable Mageia)

Severity: normal => enhancement
Source RPM: (none) => displaylink
Assignee: bugsquad => pkg-bugs
Version: 6 => Cauldron
CC: (none) => marja11

Comment 2 Christian Müller 2017-08-17 19:45:27 CEST
Thank you. I forgot to mention: USB, Sound, NIC *do* work ooB, graphics *not*. The above package adds evdi dkms kernel module.
Comment 3 Marja Van Waes 2017-08-17 19:48:03 CEST
(In reply to Christian Müller from comment #2)
> Thank you. I forgot to mention: USB, Sound, NIC *do* work ooB, graphics
> *not*. The above package adds evdi dkms kernel module.

I should have assigned to the kernel and driver maintainers, then.

Re-assigning

Assignee: pkg-bugs => kernel

Luděk Janča 2019-11-13 10:19:51 CET

CC: (none) => joelp

Comment 4 papoteur 2019-12-21 17:49:13 CET
Hello,
This feature seems to be asked more and more frequently.
https://www.mageialinux-online.org/forum/topic-26887-1+double-ecran-displayport-et-displaylink.php

CC: (none) => yves.brungard_mageia

Florian Hubold 2021-02-08 17:27:48 CET

CC: (none) => doktor5000

Comment 5 Ezequiel Partida 2022-12-07 19:56:27 CET
Hello everyone

I once open a bug report on this asking the same.

https://bugs.mageia.org/show_bug.cgi?id=30823


Displaylink already has a driver on this but only for ubuntu, this is an .sh file that can be extracted and I worked on making it work with dnf instead of apt but I got stuck while creating the dkms stuff since I am not an expert on doing this.

There is an rpm creation script from https://github.com/displaylink-rpm/displaylink-rpm

This script creates a fedora, centos and other similar distros, I already changed the .spec and changed it to the mageia depenency names and the rpm file is created with out any problem both i586 and x64.

Now the problem is that the created packages use fedora systemd scriplets (What luigi told me on dev irc chat) and this systemd scriplets do not work on mageia.

I already tried this in fedora on my laptop and it works great, this downloads the original displaylink driver and changes it from that .sh file to an installable rpm file. 

It would be great that someone with dev experience to help change this from systemd scriplets to mageia working metod or create a patch for to make it work.

If someone would help and guide me on this I can become a maintainer for this package... but I need a mentor and I haven´t been able to find it.

I have 3 type of display link docks at work to test.  Both Gen 1 and Gen 2 Lenovo branded and 1 HP branded... They all work with fedora and linux mint.

Please Help,

Regards,

CC: (none) => ezequiel_partida

Comment 6 David GEIGER 2023-05-14 22:45:37 CEST
*** Bug 30823 has been marked as a duplicate of this bug. ***
Comment 7 papoteur 2023-05-15 17:19:34 CEST
(In reply to Ezequiel Partida from comment #5)

> 
> If someone would help and guide me on this I can become a maintainer for
> this package... 
Hi,
Do you mean to join the drafted spec file ?
Comment 8 Ezequiel Partida 2023-10-21 22:35:52 CEST
Yes,

I tried to work on this spec file before but it has systemd scriptlets not supported by mageia AFAIK.

This dock stations are getting more common.

The closes mandriva fork distro that supports it is OMV and it does work and I guess distro is closer to mageia than fedora is.

They added evdi patch to the kernel.

https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/main/release/kernel-rc-6.6.0-0.rc3.1.src.rpm

I am actually working on the next pagkages but I am not familiar with kernel stuff.

https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/non-free/release/displaylink-5.8-2.src.rpm

https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/main/release/evdi-1.14.1-1.src.rpm

This is a lenovo dock with displaylink chipset.
https://m.media-amazon.com/images/G/33/apparel/rcxgs/tile._CB483369929_.gif

Regards
ZekeMX
Comment 9 christian barranco 2023-10-22 10:31:53 CEST
Hi ZekeMX
I will have a quick look.
/squidf

CC: (none) => chb0

Comment 10 Giuseppe Ghibò 2023-10-22 12:00:35 CEST
The lenovo gif URL link posted is basically "empty".

For the evdi kernel module, since its a completely off-tree module and doesn't require kernel patches, the best way is probably to add it as a dkms-evdi external kernel module, which is built on the fly. At most providing something like kmod-evdi in case we want to provide precompiled modules.

Even better, the dkms-evdi can be generated as a subpackage from the same package used to build the libraries and the other tools required to get it working properly. In this way you have to upgrade only one package and not two. You might look at other dkms-* packages to inspire the SPEC file.

We can keep this bug open to monitor the progress in this subject, including testing the final versions on real hardware.

CC: (none) => ghibomgx

Comment 11 Ezequiel Partida 2023-10-25 02:39:29 CEST
(In reply to christian barranco from comment #9)
> Hi ZekeMX
> I will have a quick look.
> /squidf

Hi Squidf!

Any Ideas?

I am checking on making it dkms but to be honest I am not skilled yet on that.

Regards
Comment 12 Giuseppe Ghibò 2023-10-25 10:55:22 CEST
(In reply to Ezequiel Partida from comment #11)
> (In reply to christian barranco from comment #9)
> > Hi ZekeMX
> > I will have a quick look.
> > /squidf
> 
> Hi Squidf!
> 
> Any Ideas?
> 
> I am checking on making it dkms but to be honest I am not skilled yet on
> that.

You'll become skilled about that. It's not that difficult.

Get one of the dkms-* mageia source package. E.g. dkms-rtl8192eu or dkms-vhba, among the latests, rename to dkms-evdi. Take the archive evdi-1.14.1.tar.gz upstream.

In the spec file, in the %install section copy the content of the "module" subdir of the evdi-1.14.1.tar.gz tarball into the %{_usrsrc}%{module}-%{version}-%{release}/.

Adjust the dkms.conf accordingly so that PACKAGE_NAME, PACKAGE_VERSION and BUILT_MODULE_NAME[0], and DEST_MODULE_LOCATION[0] would reflect the newer module names and version, e.g.:

PACKAGE_NAME="evdi"
PACKAGE_VERSION="1.14.1"
...
BUILT_MODULE_NAME[0]="evdi"
DEST_MODULE_LOCATION[0]="/kernel/drivers/drm/gpu/evdi"

Adjust the %files list, and %description, and it's almost there.
Comment 13 Ezequiel Partida 2023-11-05 04:12:59 CET
Oh MAN! :D :D

I've been trying it for 12hrs with out success... I better jump a cliff.. LOL

evdi package does create lib64evdi, lib64evdi-devel python-evdi.

But Displaylink is giving me a headache and dkms-evdi even worst.


The kernel link change since it was updated.

https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/main/release/kernel-rc-6.6.0-0.rc7.1.src.rpm


Dock Station Image
https://i.ebayimg.com/images/g/59YAAOSwFU1jWPmt/s-l1600.jpg
Comment 14 Giuseppe Ghibò 2023-11-05 09:32:23 CET
(In reply to Ezequiel Partida from comment #13)
> Oh MAN! :D :D
> 
> I've been trying it for 12hrs with out success... I better jump a cliff.. LOL
> 
> evdi package does create lib64evdi, lib64evdi-devel python-evdi.
> 
> But Displaylink is giving me a headache and dkms-evdi even worst.
> 
> 
> The kernel link change since it was updated.
> 
> https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/main/release/
> kernel-rc-6.6.0-0.rc7.1.src.rpm
> 
> 
> Dock Station Image
> https://i.ebayimg.com/images/g/59YAAOSwFU1jWPmt/s-l1600.jpg


welcome to the devel world... ;-)

Well don't give up. First ensure you have all the pieces. Then try to configure X or Wayland to display something beside standard display. It could be even happen that your displaylink device is not even well supported...

E.g. you need the kernel evdi modules. Note that in first attempts those can be built even outside packaging (you have just to execute the upstream make scripts). Of course once you do a make install there it will pollute your root / filesystem with files and kernel modules outside RPM packaging DB, which might be then difficult to track files when you have to remove them or when it maybe overlaps from those produced by packaging. For attempts maybe you could use a 2nd installation in a 2nd external disk.

Once you have something that might work, you might refine the packages (libraries, utils and dkms modules).
Comment 15 Ezequiel Partida 2023-11-12 13:07:17 CET
(In reply to Giuseppe Ghibò from comment #14)
> (In reply to Ezequiel Partida from comment #13)
> > Oh MAN! :D :D
> > 
> > I've been trying it for 12hrs with out success... I better jump a cliff.. LOL
> > 
> > evdi package does create lib64evdi, lib64evdi-devel python-evdi.
> > 
> > But Displaylink is giving me a headache and dkms-evdi even worst.
> > 
> > 
> > The kernel link change since it was updated.
> > 
> > https://abf-downloads.openmandriva.org/rolling/repository/SRPMS/main/release/
> > kernel-rc-6.6.0-0.rc7.1.src.rpm
> > 
> > 
> > Dock Station Image
> > https://i.ebayimg.com/images/g/59YAAOSwFU1jWPmt/s-l1600.jpg
> 
> 
> welcome to the devel world... ;-)
> 
> Well don't give up. First ensure you have all the pieces. Then try to
> configure X or Wayland to display something beside standard display. It
> could be even happen that your displaylink device is not even well
> supported...

I won't give up.. Believe me... LOL I need this driver to make it easier for me to work with mageia at work and use my two external monitors, the idea is to have mageia as main OS and windows on the other on a virtual machine like Qemu to do windows stuff when needed and invest more time on packaging. Most of my work can be done using teamviewer on mageia giving support to 2 or even more remote users at te same time and windows for some Active Directory things I am working once and a while.

So I am working on it slowly analyzing the details.


> E.g. you need the kernel evdi modules. Note that in first attempts those can
> be built even outside packaging (you have just to execute the upstream make
> scripts). Of course once you do a make install there it will pollute your
> root / filesystem with files and kernel modules outside RPM packaging DB,
> which might be then difficult to track files when you have to remove them or
> when it maybe overlaps from those produced by packaging. For attempts maybe
> you could use a 2nd installation in a 2nd external disk.
> 
> Once you have something that might work, you might refine the packages
> (libraries, utils and dkms modules).

I wonder if this is what is causing me problems with Displaylink package.I am leaving dkms-evdi as the last packager. I first focused on evdi-1.14.1-1.src.rpm with seems to build fine and I was able to install them (lib64evdi, lib64evdi-devel and python-evdi), I am now working with displaylink-5.8-2.src.rpm but I am getting an rpath error.

</>
bm -l displaylink
creating package list
processing package displaylink-5.8-%mkrel 1
building source and binary packages
Executing(%prep): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.5Bpzkw
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ rm -rf displaylink-5.8
+ /usr/bin/mkdir -p displaylink-5.8
+ cd displaylink-5.8
+ /usr/lib/rpm/rpmuncompress -x /home/ezequiel/.mgarepo/displaylink/SOURCES/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu5.8-EXE.zip
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ chmod +x displaylink-driver-5.8.0-63.33.run
+ ./displaylink-driver-5.8.0-63.33.run --noexec --keep
Creating directory displaylink-driver-5.8.0-63.33
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing DisplayLink Linux Driver 5.8.0-63.33  100%  
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.TXKqHu
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ cd displaylink-5.8
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ '[' 1 -eq 1 ']'
+ '[' /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64 '!=' / ']'
+ rm -rf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
++ dirname /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT
+ mkdir /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
+ cd displaylink-5.8
+ '[' 1 -eq 1 ']'
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ cp -a displaylink-driver-5.8.0-63.33/x64-ubuntu-1604/DisplayLinkManager /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ cd displaylink-driver-5.8.0-63.33
+ cp ella-dock-release.spkg firefly-monitor-release.spkg navarro-dock-release.spkg ridge-dock-release.spkg /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/udev/rules.d /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d
+ sed -i -e s,/opt/displaylink,/usr/libexec/displaylink,g displaylink-installer.sh service-installer.sh udev-installer.sh
+ sed -i -e 's, /lib/systemd,/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd,g' -e 's, /etc/pm, /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm,g' service-installer.sh
+ chmod +x displaylink-installer.sh service-installer.sh udev-installer.sh
+ ./udev-installer.sh systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/udev/rules.d/99-displaylink.rules /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/udev.sh
+ . ./service-installer.sh
+ create_dl_service systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local install_prefix=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ case $init in
+ add_systemd_service /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ local service_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ service_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system
+ local service_path=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system/displaylink-driver.service
+ cat
+ chmod 0644 /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system/displaylink-driver.service
+ create_pm_script systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local suspend=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ cat
+ case $init in
+ cat
+ chmod 0755 /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ link_pm_scripts systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local suspend=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ case $init in
+ ln -sf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-sleep/displaylink.sh
+ [[ -d /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d ]]
+ ln -sf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ rm /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ ln -s ../../../usr/libexec/displaylink/suspend.sh /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/modprobe.d
+ echo 'options evdi initial_device_count=4'
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/share/X11/xorg.conf.d
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/20-displaylink.conf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/share/X11/xorg.conf.d/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/var/log/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/logrotate.d
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/displaylink.logrotate /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/logrotate.d/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-preset
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/95-displaylink.preset /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-preset/
+ /usr/bin/find-debuginfo -j4 --strict-build-id -m -i --build-id-seed 5.8-1.mga9 --unique-debug-suffix -5.8-1.mga9.x86_64 --unique-debug-src-base displaylink-5.8-1.mga9.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/ezequiel/.mgarepo/displaylink/BUILD/displaylink-5.8

+ /usr/lib/rpm/check-buildroot
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/compress_files .xz
+ '[' -n '' ']'
+ /usr/share/spec-helper/relink_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_perl
+ '[' -n '' ']'
+ /usr/share/spec-helper/lib_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/gprintify
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_mo
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_pamd
+ '[' -n '' ']'
+ /usr/share/spec-helper/remove_info_dir
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_eol
+ '[' -n '' ']'
+ /usr/share/spec-helper/check_desktop_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/check_elf_files
Warning: unused libraries in /usr/libexec/displaylink/DisplayLinkManager: librt.so.1
 libdl.so.2
 libpthread.so.0

+ /usr/lib/rpm/check-rpaths
*******************************************************************************
*
* WARNING: 'check-rpaths' detected a broken RPATH OR RUNPATH and will cause
*          'rpmbuild' to fail. To ignore these errors, you can set the
*          '$QA_RPATHS' environment variable which is a bitmask allowing the
*          values below. The current value of QA_RPATHS is 0x0000.
*
*    0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor
*               issue but are introducing redundant searchpaths without
*               providing a benefit. They can also cause errors in multilib
*               environments.
*    0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute
*               nor relative filenames and can therefore be a SECURITY risk
*    0x0004 ... insecure RPATHs; these are relative RPATHs which are a
*               SECURITY risk
*    0x0008 ... the special '$ORIGIN' RPATHs are appearing after other
*               RPATHs; this is just a minor issue but usually unwanted
*    0x0010 ... the RPATH is empty; there is no reason for such RPATHs
*               and they cause unneeded work while loading libraries
*    0x0020 ... an RPATH references '..' of an absolute path; this will break
*               the functionality when the path before '..' is a symlink
*          
*
* Examples:
* - to ignore standard and empty RPATHs, execute 'rpmbuild' like
*   $ QA_RPATHS=$(( 0x0001|0x0010 )) rpmbuild my-package.src.rpm
* - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like
*   $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths
*  
*******************************************************************************
ERROR   0004: file '/usr/libexec/displaylink/DisplayLinkManager' contains an insecure runpath '.' in [.]
error: Bad exit status from /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm (%install)

RPM build errors:
    Bad exit status from /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm (%install)
error: failed!

</>

bm -l displaylink
creating package list
processing package displaylink-5.8-%mkrel 1
building source and binary packages
Executing(%prep): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.5Bpzkw
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ rm -rf displaylink-5.8
+ /usr/bin/mkdir -p displaylink-5.8
+ cd displaylink-5.8
+ /usr/lib/rpm/rpmuncompress -x /home/ezequiel/.mgarepo/displaylink/SOURCES/DisplayLink%20USB%20Graphics%20Software%20for%20Ubuntu5.8-EXE.zip
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ chmod +x displaylink-driver-5.8.0-63.33.run
+ ./displaylink-driver-5.8.0-63.33.run --noexec --keep
Creating directory displaylink-driver-5.8.0-63.33
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing DisplayLink Linux Driver 5.8.0-63.33  100%  
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.TXKqHu
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ cd displaylink-5.8
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm
+ umask 022
+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ '[' 1 -eq 1 ']'
+ '[' /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64 '!=' / ']'
+ rm -rf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
++ dirname /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT
+ mkdir /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64
+ cd displaylink-5.8
+ '[' 1 -eq 1 ']'
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ cp -a displaylink-driver-5.8.0-63.33/x64-ubuntu-1604/DisplayLinkManager /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ cd displaylink-driver-5.8.0-63.33
+ cp ella-dock-release.spkg firefly-monitor-release.spkg navarro-dock-release.spkg ridge-dock-release.spkg /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/udev/rules.d /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d
+ sed -i -e s,/opt/displaylink,/usr/libexec/displaylink,g displaylink-installer.sh service-installer.sh udev-installer.sh
+ sed -i -e 's, /lib/systemd,/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd,g' -e 's, /etc/pm, /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm,g' service-installer.sh
+ chmod +x displaylink-installer.sh service-installer.sh udev-installer.sh
+ ./udev-installer.sh systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/udev/rules.d/99-displaylink.rules /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/udev.sh
+ . ./service-installer.sh
+ create_dl_service systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local install_prefix=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ case $init in
+ add_systemd_service /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ local service_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr
+ service_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system
+ local service_path=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system/displaylink-driver.service
+ cat
+ chmod 0644 /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system/displaylink-driver.service
+ create_pm_script systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local suspend=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ cat
+ case $init in
+ cat
+ chmod 0755 /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ link_pm_scripts systemd /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local init=systemd
+ local displaylink_dir=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink
+ local suspend=/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh
+ case $init in
+ ln -sf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh/home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-sleep/displaylink.sh
+ [[ -d /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d ]]
+ ln -sf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/libexec/displaylink/suspend.sh /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ rm /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ ln -s ../../../usr/libexec/displaylink/suspend.sh /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/pm/sleep.d/10_displaylink
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/modprobe.d
+ echo 'options evdi initial_device_count=4'
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/share/X11/xorg.conf.d
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/20-displaylink.conf /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/share/X11/xorg.conf.d/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/var/log/displaylink /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/logrotate.d
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/displaylink.logrotate /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/etc/logrotate.d/
+ mkdir -p /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-preset
+ cp /home/ezequiel/.mgarepo/displaylink/SOURCES/95-displaylink.preset /home/ezequiel/.mgarepo/displaylink/BUILDROOT/displaylink-5.8-1.mga9.x86_64/usr/lib/systemd/system-preset/
+ /usr/bin/find-debuginfo -j4 --strict-build-id -m -i --build-id-seed 5.8-1.mga9 --unique-debug-suffix -5.8-1.mga9.x86_64 --unique-debug-src-base displaylink-5.8-1.mga9.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/ezequiel/.mgarepo/displaylink/BUILD/displaylink-5.8

+ /usr/lib/rpm/check-buildroot
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/compress_files .xz
+ '[' -n '' ']'
+ /usr/share/spec-helper/relink_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_perl
+ '[' -n '' ']'
+ /usr/share/spec-helper/lib_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/gprintify
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_mo
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_pamd
+ '[' -n '' ']'
+ /usr/share/spec-helper/remove_info_dir
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_eol
+ '[' -n '' ']'
+ /usr/share/spec-helper/check_desktop_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/check_elf_files
Warning: unused libraries in /usr/libexec/displaylink/DisplayLinkManager: librt.so.1
 libdl.so.2
 libpthread.so.0

+ /usr/lib/rpm/check-rpaths
*******************************************************************************
*
* WARNING: 'check-rpaths' detected a broken RPATH OR RUNPATH and will cause
*          'rpmbuild' to fail. To ignore these errors, you can set the
*          '$QA_RPATHS' environment variable which is a bitmask allowing the
*          values below. The current value of QA_RPATHS is 0x0000.
*
*    0x0001 ... standard RPATHs (e.g. /usr/lib); such RPATHs are a minor
*               issue but are introducing redundant searchpaths without
*               providing a benefit. They can also cause errors in multilib
*               environments.
*    0x0002 ... invalid RPATHs; these are RPATHs which are neither absolute
*               nor relative filenames and can therefore be a SECURITY risk
*    0x0004 ... insecure RPATHs; these are relative RPATHs which are a
*               SECURITY risk
*    0x0008 ... the special '$ORIGIN' RPATHs are appearing after other
*               RPATHs; this is just a minor issue but usually unwanted
*    0x0010 ... the RPATH is empty; there is no reason for such RPATHs
*               and they cause unneeded work while loading libraries
*    0x0020 ... an RPATH references '..' of an absolute path; this will break
*               the functionality when the path before '..' is a symlink
*          
*
* Examples:
* - to ignore standard and empty RPATHs, execute 'rpmbuild' like
*   $ QA_RPATHS=$(( 0x0001|0x0010 )) rpmbuild my-package.src.rpm
* - to check existing files, set $RPM_BUILD_ROOT and execute check-rpaths like
*   $ RPM_BUILD_ROOT=<top-dir> /usr/lib/rpm/check-rpaths
*  
*******************************************************************************
ERROR   0004: file '/usr/libexec/displaylink/DisplayLinkManager' contains an insecure runpath '.' in [.]
error: Bad exit status from /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm (%install)

RPM build errors:
    Bad exit status from /home/ezequiel/.mgarepo/displaylink/BUILDROOT/rpm-tmp.heq5Vm (%install)
error: failed!
</>



So I am still working to solve this.
Comment 16 Giuseppe Ghibò 2023-11-12 13:50:31 CET
(In reply to Ezequiel Partida from comment #15)

> I wonder if this is what is causing me problems with Displaylink package.I
> am leaving dkms-evdi as the last packager. I first focused on
> evdi-1.14.1-1.src.rpm with seems to build fine and I was able to install
> them (lib64evdi, lib64evdi-devel and python-evdi), I am now working with
> displaylink-5.8-2.src.rpm but I am getting an rpath error.
> 

Indeed dkms-evdi should be the first to start from not the last... ;-)

Anyway the QA_RPATHS warnings tell you that there is some binaries using runpath which is usually considered unsafe. In first instance you might ignore it providing
export QA_RPATHS=0x0001 (or the corresponding suggested code) in the last stage of %install; then later you might dig with %configure and cmake stuff and makefiles to check what is causing them. In case of 3rd party binaries you might just strip the offending rpath from executable using "chrpath -d" in the last stages of %install.
Comment 17 Ezequiel Partida 2023-11-12 21:34:20 CET
(In reply to Giuseppe Ghibò from comment #16)
> (In reply to Ezequiel Partida from comment #15)
> 
> > I wonder if this is what is causing me problems with Displaylink package.I
> > am leaving dkms-evdi as the last packager. I first focused on
> > evdi-1.14.1-1.src.rpm with seems to build fine and I was able to install
> > them (lib64evdi, lib64evdi-devel and python-evdi), I am now working with
> > displaylink-5.8-2.src.rpm but I am getting an rpath error.
> > 
> 
> Indeed dkms-evdi should be the first to start from not the last... ;-)

Ahhhhh!! ok then...


> Anyway the QA_RPATHS warnings tell you that there is some binaries using
> runpath which is usually considered unsafe. In first instance you might
> ignore it providing
> export QA_RPATHS=0x0001 (or the corresponding suggested code) in the last
> stage of %install; then later you might dig with %configure and cmake stuff
> and makefiles to check what is causing them. In case of 3rd party binaries
> you might just strip the offending rpath from executable using "chrpath -d"
> in the last stages of %install.

I will check on this..

One thing I notice today.. it's an error that says:

+ /usr/share/spec-helper/check_elf_files
Warning: unused libraries in /usr/libexec/displaylink/DisplayLinkManager: librt.so.1
 libdl.so.2
 libpthread.so.0

I wonder if it has to do with this:


ExclusiveArch: x86_64 aarch64 ix86 arm

%install
mkdir -p %{buildroot}%{_libexecdir}/%{name}

# DisplayLinkManager binary...
%ifarch x86_64
cp -a displaylink-driver-*/x64-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch ix86
cp -a displaylink-driver-*/x86-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch aarch64
cp -a displaylink-driver-*/aarch64-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch arm
cp -a displaylink-driver-*/arm-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
echo "Unsupported architecture"
exit 1
%endif
%endif
%endif
%endif


In the original spec file it comes as:

ExclusiveArch: %{x86_64} %{aarch64} %{ix86} %{arm}


# DisplayLinkManager binary...
%ifarch %{x86_64}
cp -a displaylink-driver-*/x64-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch %{ix86}
cp -a displaylink-driver-*/x86-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch %{aarch64}
cp -a displaylink-driver-*/aarch64-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
%ifarch %{arm}
cp -a displaylink-driver-*/arm-*/DisplayLinkManager %{buildroot}%{_libexecdir}/%{name}
%else
echo "Unsupported architecture"
exit 1
%endif
%endif
%endif
%endif



If I use the original spec file I get error:

+ cd /home/ezequiel/.mgarepo/displaylink/BUILD
+ cd displaylink-5.8
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ echo 'Unsupported architecture'
Unsupported architecture
+ exit 1
Comment 18 Ezequiel Partida 2023-11-13 07:08:41 CET
Package created and installs correctly

I removed the next line from spec file

ExclusiveArch: x86_64 aarch64 ix86 arm

Once this was removed and the package was created.

Now moving to dkms-evdi.
Comment 19 Ezequiel Partida 2023-11-13 13:44:42 CET
dkms-evdi creates

but once installed I get:


¨
urpmi dkms-evdi-1.14.1-2.mga9.noarch.rpm


SECURITY: The following package is _NOT_ signed (OK ((none))): dkms-evdi-1.14.1-2.mga9.noarch.rpm
installing dkms-evdi-1.14.1-2.mga9.noarch.rpm
Preparing...                     ####################################################################################
      1/1: dkms-evdi             ####################################################################################

Creating symlink /var/lib/dkms/evdi/1.14.1-2.mga9/source ->
                 /usr/src/evdi-1.14.1-2.mga9

DKMS: add Completed.

Preparing kernel 6.5.10-desktop-2.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
/sbin/dkms: line 939: warning: command substitution: ignored null byte in input
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j4 KERNELRELEASE=6.5.10-desktop-2.mga9 KDIR=/lib/modules/6.5.10-desktop-2.mga9/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 6.5.10-desktop-2.mga9 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/evdi/1.14.1-2.mga9/build/ for more information.


========
make.log below.


DKMS make.log for evdi-1.14.1-1.mga9 for kernel 6.5.10-desktop-2.mga9 (x86_64)
Sun Nov 12 11:43:27 PM PST 2023
CFLAGS="-isystem./include -isystem./include/uapi -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes =discarded-qualifiers " make -C module -j4 --jobserver-auth=fifo:/tmp/GMfifo1351
make[1]: Entering directory '/var/lib/dkms/evdi/1.14.1-1.mga9/build/module'
make[1]: warning: -j4 forced in submake: resetting jobserver mode.
make[1]: *** No targets.  Stop.
make[1]: Leaving directory '/var/lib/dkms/evdi/1.14.1-1.mga9/build/module'
make: *** [Makefile:10: all] Error 2

=====
Comment 20 Giuseppe Ghibò 2023-11-13 18:35:16 CET
Have you installed kernel-devel? If you build outside the dkms with just make, the modules are built?
Comment 21 Ezequiel Partida 2023-11-17 05:30:57 CET
Yes,

Kernel-desktop-devel is installed

At reboot it says it is installing but it does the same everytime I reboot.
Comment 22 Ezequiel Partida 2023-11-22 18:08:01 CET
Hello again,

I wonder what I'm doing wrong.


Installing dkms-evdi from console I get the next error.

"
$sudo urpmi dkms-evdi*


SECURITY: The following package is _NOT_ signed (OK ((none))): dkms-evdi-1.14.1-1.mga9.noarch.rpm
installing dkms-evdi-1.14.1-1.mga9.noarch.rpm
Preparing...                     ################################################
      1/1: dkms-evdi             ################################################

Creating symlink /var/lib/dkms/evdi/1.14.1-1.mga9/source ->
                 /usr/src/evdi-1.14.1-1.mga9

DKMS: add Completed.

Preparing kernel 6.5.10-desktop-2.mga9 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
/sbin/dkms: line 939: warning: command substitution: ignored null byte in input
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /proc/config.gz
make oldconfig....
make prepare....

Building module:
cleaning build area....
make -j4 KERNELRELEASE=6.5.10-desktop-2.mga9 KDIR=/lib/modules/6.5.10-desktop-2.mga9/build....(bad exit status: 2)

Error! Bad return status for module build on kernel: 6.5.10-desktop-2.mga9 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/evdi/1.14.1-1.mga9/build/ for more information.
¨

Checking at the build.log ....

"
DKMS make.log for evdi-1.14.1-1.mga9 for kernel 6.5.10-desktop-2.mga9 (x86_64)
Wed Nov 22 08:00:58 AM PST 2023
CFLAGS="-isystem./include -isystem./include/uapi -Wextra -Wall -Wno-error=missing-field-initializers -Werror=sign-compare -Wmissing-prototypes -Wstrict-prototypes =discarded-qualifiers " make -C module -j4 --jobserver-auth=fifo:/tmp/GMfifo47022
make[1]: Entering directory '/var/lib/dkms/evdi/1.14.1-1.mga9/build/module'
make[1]: warning: -j4 forced in submake: resetting jobserver mode.
make[1]: *** No targets.  Stop.
make[1]: Leaving directory '/var/lib/dkms/evdi/1.14.1-1.mga9/build/module'
make: *** [Makefile:10: all] Error 2
"

This is the spec below.. I've been checking with detail and still not managed to detect the problem.

"
# upstream release tarball is a snapshot-style one
%define snapshot 0
%define rel	1

# REV=$(svn info https://cdemu.svn.sourceforge.net/svnroot/cdemu/trunk/vhba-module| sed -ne 's/^Last Changed Rev: //p')
# svn export -r $REV https://cdemu.svn.sourceforge.net/svnroot/cdemu/trunk/vhba-module vhba-module-$REV
# tar -cJf vhba-module-$REV.tar.xz vhba-module-$REV

Summary:	Extensible Virtual Display Interface kernel module
%define module	evdi
Name:       dkms-%{module}
Version:	1.14.1
Release:	%mkrel %{rel}
Group:		System/Kernel and hardware
License:	MIT
URL:		https://github.com/evdi/evdi
Source0:	https://github.com/DisplayLink/evdi/archive/refs/tags/%{module}-%{version}.tar.gz
Patch0: pyevdi-detect-python-3.10+.patch
BuildArch:	noarch
Provides:	kmod(evdi.ko) = %{version}
Requires:	dkms
Requires: %mklibname evdi
Requires(post):	dkms
Requires(preun): dkms

%description
The Extensible Virtual Display Interface (EVDI) is a Linux kernel module that
enables management of multiple screens, allowing user-space programs to take
control over what happens with the image. It is essentially a virtual display
you can add, remove and receive screen updates for, in an application that
uses the libevdi library.

It is needed primarily for DisplayLink driver


%prep
%autosetup -n evdi-1.14.1 -p1

%build

%install
install -d -m755 %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}
cp -r * %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}

cat > %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/dkms.conf <<EOF
PACKAGE_NAME="%{module}"
PACKAGE_VERSION="%{version}-%{release}"
DEST_MODULE_LOCATION[0]="/kernel/%{module}"
BUILT_MODULE_NAME[0]="%{module}"
MAKE[0]="make KDIR=\${kernel_source_dir}"
AUTOINSTALL="yes"
EOF
sed -i 's/-Werror//' %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/Makefile

%post
dkms add	-m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms build	-m %{module} -v %{version}-%{release} --rpm_safe_upgrade &&
dkms install -m %{module} -v %{version}-%{release} --rpm_safe_upgrade
true

%preun
dkms remove  -m %{module} -v %{version}-%{release} --all --rpm_safe_upgrade
true

%files
%{_usrsrc}/%{module}-%{version}-%{release}/*

"

Any guidance would be appreciated.
Comment 23 Giuseppe Ghibò 2023-11-22 18:25:21 CET
(In reply to Ezequiel Partida from comment #22)

> cat > %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/dkms.conf <<EOF
> PACKAGE_NAME="%{module}"
> PACKAGE_VERSION="%{version}-%{release}"
> DEST_MODULE_LOCATION[0]="/kernel/%{module}"
> BUILT_MODULE_NAME[0]="%{module}"
> MAKE[0]="make KDIR=\${kernel_source_dir}"
> AUTOINSTALL="yes"
> EOF
> sed -i 's/-Werror//'
> %{buildroot}%{_usrsrc}/%{module}-%{version}-%{release}/Makefile

With the sed command like that you corrupted the Makefile, which then passes option that gcc doesn't like. Try to simplify using a patch if can't provide a regexp that works for all the wanted options.

Then jump to:

/var/lib/dkms/evdi/1.14.1-1.mga9/build

and manually edit the Makefile until running make directly there you get the compilation successful.
Comment 24 Giuseppe Ghibò 2023-12-14 21:32:00 CET
any progress?
Comment 25 Ezequiel Partida 2023-12-16 11:56:53 CET
The driver is working great!  Sorry I did not reported it before, my time has been short.

Here is the fist video of Mageia on HP's branded Dock Station from DisplayLink.

https://youtu.be/WFa4jbeNUeM

Should I attach the src.rpm here for you to get it up to cauldron?
Comment 26 katnatek 2024-02-13 04:02:07 CET Comment hidden (obsolete)
Comment 27 katnatek 2024-02-13 04:02:36 CET
Created attachment 14374 [details]
Alternative conf file
Comment 28 katnatek 2024-02-13 04:03:17 CET Comment hidden (obsolete)
Comment 29 katnatek 2024-02-13 04:04:31 CET Comment hidden (obsolete)
Comment 30 katnatek 2024-02-13 04:06:51 CET
Most of the work adapted from openmandriva, I give a hand to Ezequiel with dkms generation and displaylink rpath issues
Comment 31 Giuseppe Ghibò 2024-02-13 12:01:42 CET
BTW, for the evdi kernel modules, the current kernel (6.6.14-desktop-2.mga9) has them (-desktop only, x86_64 only). The others require a proper dkms-evdi.
Comment 32 Giuseppe Ghibò 2024-02-13 12:10:20 CET
BTW, note that many of the reasonable cheap USB adapter/docking that adds multiple DP or HDMI ports are not using displaylink capability/chip, they use displayport Alt mode, and more or less on them you might achieve the same behaviour with screen mirroring and screen extending, without evdi. Of they course requires reasonably new hardware that supports this feature.
Comment 33 Morgan Leijström 2024-02-13 14:55:22 CET
(In reply to Giuseppe Ghibò from comment #31)
> BTW, for the evdi kernel modules, the current kernel (6.6.14-desktop-2.mga9)
> has them (-desktop only, x86_64 only). The others require a proper dkms-evdi.

Do we really need to support displaylink for other kernels than desktop?
Thinking of usage scenarios here.

Difference could be noted in https://wiki.mageia.org/en/Kernel_flavours

CC: (none) => fri

Comment 34 Giuseppe Ghibò 2024-02-13 15:07:20 CET
(In reply to Morgan Leijström from comment #33)

> (In reply to Giuseppe Ghibò from comment #31)
> > BTW, for the evdi kernel modules, the current kernel (6.6.14-desktop-2.mga9)
> > has them (-desktop only, x86_64 only). The others require a proper dkms-evdi.
> 
> Do we really need to support displaylink for other kernels than desktop?
> Thinking of usage scenarios here.

I doubt a pure -server would need that, and even better (security, etc.) if it doesn't have off-tree modules. That's why it wasn't included in -server flavour.

However modules in dkms-* has the advtanges that can be built in case of needing for "any" (whatever) kernel, that's why I encouraged to complete the "almost" ready dkms-evdi.
Comment 35 katnatek 2024-02-13 22:06:55 CET
(In reply to Giuseppe Ghibò from comment #34)
> (In reply to Morgan Leijström from comment #33)
> 
> > (In reply to Giuseppe Ghibò from comment #31)
> > > BTW, for the evdi kernel modules, the current kernel (6.6.14-desktop-2.mga9)
> > > has them (-desktop only, x86_64 only). The others require a proper dkms-evdi.
> > 
> > Do we really need to support displaylink for other kernels than desktop?
> > Thinking of usage scenarios here.
> 
> I doubt a pure -server would need that, and even better (security, etc.) if
> it doesn't have off-tree modules. That's why it wasn't included in -server
> flavour.
> 
> However modules in dkms-* has the advtanges that can be built in case of
> needing for "any" (whatever) kernel, that's why I encouraged to complete the
> "almost" ready dkms-evdi.

Its working since sometime ago, see comment#25
Ezequiel after update to kernel 6.6.15 is still working?
Comment 36 katnatek 2024-02-20 03:17:34 CET
Ezequiel and I pass sometime polish this thing to use native evdi mosule, It works
Comment 37 katnatek 2024-02-20 03:19:18 CET Comment hidden (obsolete)

Attachment 14373 is obsolete: 0 => 1

Comment 38 katnatek 2024-02-20 03:22:02 CET
Created attachment 14400 [details]
New version of evdi spec

Attachment 14375 is obsolete: 0 => 1
Attachment 14376 is obsolete: 0 => 1

Comment 39 katnatek 2024-02-20 03:28:05 CET
(In reply to Giuseppe Ghibò from comment #31)
> BTW, for the evdi kernel modules, the current kernel (6.6.14-desktop-2.mga9)
> has them (-desktop only, x86_64 only). The others require a proper dkms-evdi.

Oh I miss read this comment I will work on new spec for both cases
Comment 40 katnatek 2024-02-20 04:38:11 CET
Created attachment 14401 [details]
displaylink spec for kernels with or without native evdi

This spec generates two packages for 64bit arches

displaylink-nodkms and displaylink-with-dkms , for i586 just generates displaylink-with-dkms

Attachment 14399 is obsolete: 0 => 1

katnatek 2024-02-20 21:16:15 CET

CC: (none) => j.alberto.vc, ngompa13

Comment 41 katnatek 2024-02-20 21:17:50 CET
As I'm now officially contributing to this, I add to my mentor and me to CC
Comment 42 katnatek 2024-02-28 20:22:30 CET
Created attachment 14431 [details]
Latest versionof evdi spec

It removes the devel require for dkms-evdi, I test and the module builds

Attachment 14400 is obsolete: 0 => 1