Display Link RPM package

Hello,

I´ve been a huge mandriva fan since Mandriva 2006 and moved to Mageia since Mageia 1.

I´ve been trying to create a package that works fine in fedora but not in mageia and I was wondering if it works in Mandriva.

The problem is that when installed it complains about bad scripplets, it seems this has to be systemd scripplets since Mageia systemd is different… Is this the same case with OpenMandriva?

I´ve never created any packages before so this means that I am a begginer…

Does someone knows what to change or do when it comes to systemd scripplets and what do I need to do in the .specs file to make it work?.

This package what it does is that it downloads the ubuntu .run file, unpacks it and it creates a 32bit and 64 bit rpm that works with fedora and other RHEL distros.

This is the driver for the displaylink Dock stations also distributed by lenovo, HP, and more.

The next links is from the developer.

Any help would be appreciated…

1 Like

Welcome to OpenMandriva forum.

1 Like

Hi,
I’ve had a quick look - it fails to build here for various reasons, but none of them are related to systemd.

First, the filename of the download seems wrong - on synaptics’ website, I can find only
‘DisplayLink USB Graphics Software for Ubuntu5.6.1-EXE.zip’
but the content seems to be what is expected.

Next, displaylink-sleep-extractor.sh fails with

  • bash /home/bero/abf/displaylink-rpm/displaylink-sleep-extractor.sh displaylink-installer.sh
    ln: failed to create symbolic link ‘/lib/systemd/system-sleep/displaylink.sh’: Permission denied

This is expected - our builders don’t run as root, so they don’t have write access to /lib/systemd. You probably want to make sure it extracts to %{buildroot}/lib/systemd/system-sleep/displaylink.sh instead.

Lastly, it fails with error: File not found: /home/bero/abf/displaylink-rpm/BUILDROOT/displaylink-1.12.0-1.x86_64/usr
/libexec/displaylink/DisplayLinkManager
This turns out to be because I’m building on a znver1 machine, and the spec doesn’t know about this architecture (it should be treated the same as x86_64 in this context, since it is a superset of x86_64 and there is no special znver1 version available).

After fixing that, the package builds - but I don’t have the hardware to see if it actually works.

I don’t see an obvious reason why it wouldn’t work.

Hello Bero,

Thanks for your quick response.

This is expected - our builders don’t run as root, so they don’t have write access to /lib/systemd. You probably want to make sure it extracts to %{buildroot}/lib/systemd/system-sleep/displaylink.sh instead

I am a packager noob… It reminds me when I started to use Mandriva back in 2006 LOL!!

According to the next section it does seem to have %{buildroot}/lib/systemd/system-sleep/displaylink.sh

pm-util

bash %{SOURCE3} displaylink-installer.sh > %{buildroot}%{_prefix}/lib/systemd/system-sleep/displaylink.sh
chmod +x %{buildroot}%{_prefix}/lib/systemd/system-sleep/displaylink.sh

I wonder what you changed in the specs to make it work.

I my case I only changed 2 dependency names, libusbx to libusb1.0_0 and xorg-x11-server-Xorg to x11-server-xorg

Once I run make the packages are created fine, but once I install them I get:

$dnf install displaylink-1.12.0-1.x86_64.rpm

Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : displaylink-1.12.0-1.x86_64 1/1
Running scriptlet: displaylink-1.12.0-1.x86_64 1/1
Job for displaylink-driver.service failed because the control process exited with error code.
See “systemctl status displaylink-driver.service” and “journalctl -xeu displaylink-driver.service” for details.
warning: %post(displaylink-1.12.0-1.x86_64) scriptlet failed, exit status 1

journalctl -xeu displaylink-driver.service
░░ A start job for unit displaylink-driver.service has begun execution.
░░
░░ The job identifier is 2689.
Sep 01 14:48:10 localhost modprobe[94759]: modprobe: FATAL: Module evdi not found in directory /lib/modules/5.19.4-desktop-2.mga9
Sep 01 14:48:10 localhost systemd[1]: displaylink-driver.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd

░░
░░ An ExecStartPre= process belonging to unit displaylink-driver.service has exited.
░░ A start job for unit displaylink-driver.service has begun execution.
░░
░░ The job identifier is 2689.
Sep 01 14:48:10 localhost modprobe[94759]: modprobe: FATAL: Module evdi not found in directory /lib/modules/5.19.4-desktop-2.mga9
Sep 01 14:48:10 localhost systemd[1]: displaylink-driver.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░
░░ An ExecStartPre= process belonging to unit displaylink-driver.service has exited.
░░
░░ The process’ exit code is ‘exited’ and its exit status is 1.
Sep 01 14:48:10 localhost systemd[1]: displaylink-driver.service: Failed with result ‘exit-code’.
░░ Subject: Unit failed
░░ Defined-By: systemd

░░
░░ The unit displaylink-driver.service has entered the ‘failed’ state with result ‘exit-code’.
Sep 01 14:48:10 localhost systemd[1]: Failed to start DisplayLink Driver Service.
░░ Subject: A start job for unit displaylink-driver.service has failed
░░ Defined-By: systemd

░░
░░ A start job for unit displaylink-driver.service has finished with a failure.
░░
░░ The job identifier is 2689 and the job result is failed.

Regards

@ZekeMX
Please Post your code as code.

Thanks for the tip and sorry about that Rugyada,

Since I haven´t been able to make a working rpm on either open mandriva or mageia I think I´ll move to fedora where these package already works. I understand these package is probably useless to most mandriva or mageia users anyway since you might not use any displaylink docking station or OEM like lenovo, HP, Dell…

Regards and thanks for your help Bero