FS#65238 - [intel-media-sdk] package violates Arch package guidelines

Attached to Project: Community Packages
Opened by Jensen McKenzie (your_doomsday) - Wednesday, 22 January 2020, 14:38 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Tuesday, 28 January 2020, 23:24 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Daniel Bermond (Bermond)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Arch package guidelines[1] mandate that among other things:

Binaries should go to /usr/bin
Libraries should go to /usr/lib
Header files should go to /usr/include
Application data should go to /usr/share
and so on.

intel-media-sdk violates those rules by installing all binaries, libraries, headers and data into /opt.

Same Arch package guidelines mandate that /opt should be used only for "large self-contained packages". Since ffmpeg started to link against libmfx which is part of intel-media-sdk, the latter isn't a "self-contained package" anymore but mandatory dependency of every tool that uses ffmpeg.

Moreover that state involves need to apply multiple hacks like ld.preload[2] and PATH[3] injection to make things work.

Above behaviour is highly questionable as upstream buildsystem support various install path variables[4] that can be used to install all things in right places. Every other Arch package that uses cmake sets those variables but for some reason intel-media-sdk doesn't, which results to current, vastly inferior situation.

[1] https://wiki.archlinux.org/index.php/Arch_package_guidelines#Directories

[2] https://git.archlinux.org/svntogit/community.git/tree/trunk/intel-media-sdk.conf?h=packages/intel-media-sdk

[3] https://git.archlinux.org/svntogit/community.git/tree/trunk/intel-media-sdk.sh?h=packages/intel-media-sdk

[4] https://github.com/Intel-Media-SDK/MediaSDK/blob/intel-mediasdk-19.4.0/CMakeLists.txt#L184
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Tuesday, 28 January 2020, 23:24 GMT
Reason for closing:  Implemented
Additional comments about closing:  Fixed in intel-media-sdk 19.4.0-4
Comment by Daniel Bermond (Bermond) - Thursday, 23 January 2020, 00:58 GMT
A bit of history is needed here. Back in old time when there was no intel-media-sdk, this product was distributed by Intel in binary form as part of Intel MediaServerStudio (MSS), a huge download file. MSS distributed the SDK in the /opt/intel/mediasdk/ path. After Intel released MediaSDK in GitHub, it continued to use this path as the default one. Intel continues to distribute MediaSDK binaries on GitHub still in /opt/ even today.

Initial versions of MediaSDK didn't even have the option for selecting the install prefix. Back in time when I maintained this package on the AUR on its initial versions I tried to install it at /usr/, but as there was no install prefix option this was mostly a hack and didn't worked well as far as I can remember (some years have passed). But upstream Intel improved this situation, and as you stated, there is a install prefix option for quite a considerable period of time. I continued to use /opt/ path for historical reasons, and also because maybe the users would expect to find MediaSDK in /opt/ as it's the default path used by upstream.

So yes, it makes sense to change the install path to /usr/. And this can improve the package usage.
Comment by Daniel Bermond (Bermond) - Thursday, 23 January 2020, 00:59 GMT
@Jensen McKenzie (your_doomsday) I have implemented this change on intel-media-sdk 19.4.0-3 and pushed it to [community-testing]. Can you please test it to verify that it's working fine?
Comment by Jensen McKenzie (your_doomsday) - Thursday, 23 January 2020, 11:16 GMT
Thx, those changes look fine. Fedora also installs this to /usr.

Loading...