Bug 5045

Summary: Review Request: intel-media-driver - The Intel Media Driver for VAAPI
Product: Package Reviews Reporter: Nicolas Chauvet <kwizart>
Component: Review RequestAssignee: Robert-André Mauchin <zebob.m>
Status: RESOLVED FIXED    
Severity: enhancement CC: rpmfusion-package-review, zebob.m
Priority: P1 Flags: zebob.m: fedora-review+
Version: Current   
Hardware: x86_64   
OS: GNU/Linux   
namespace: nonfree
Bug Depends on:    
Bug Blocks: 4    

Description Nicolas Chauvet 2018-10-08 22:14:20 CEST
Spec URL: http://dl.kwizart.net/review/intel-media-driver.spec
SRPM URL: http://dl.kwizart.net/review/intel-media-driver-18.3.0-1.fc28.src.rpm
Description: The Intel Media Driver for VAAPI
Fedora Account System Username: kwizart

This package is only relevant for f29+

This is for the nonfree section because of some blob in hex forms

TODO:
- Add AppData ModAlias support (there is a placeholder from the intel vaapi backend )
- Runtime tests

This package depends on intel-gmmlib review rhbz#1637124
rpmlint is clean:
3 packages and 0 specfiles checked; 0 errors, 0 warnings.
Comment 1 Robert-André Mauchin 2018-10-09 18:56:56 CEST
/usr/share/appdata is deprecated, install the metainfo file in %{_metainfodir}
Comment 2 Robert-André Mauchin 2018-10-09 19:30:12 CEST
Build error:

-- Checking for module 'pciaccess'
--   Package 'pciaccess', required by 'virtual:world', not found
BUILDSTDERR: CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:436 (message):
BUILDSTDERR:   A required package was not found
BUILDSTDERR: Call Stack (most recent call first):
BUILDSTDERR:   /usr/share/cmake/Modules/FindPkgConfig.cmake:602 (_pkg_check_modules_internal)
BUILDSTDERR:   media_driver/media_top_cmake.cmake:90 (pkg_check_modules)
BUILDSTDERR:   media_driver/CMakeLists.txt:89 (include)
-- Configuring incomplete, errors occurred!
Comment 3 Robert-André Mauchin 2018-10-09 20:06:07 CEST
After adding: BuildRequires:	pkgconfig(pciaccess)

New error:

UILDSTDERR: /builddir/build/BUILD/media-driver-intel-media-18.3.0/media_driver/linux/common/codec/ddi/media_libva_decoder.cpp:45:10: fatal error: X11/Xutil.h: No such file or directory
BUILDSTDERR:  #include <X11/Xutil.h>
BUILDSTDERR:           ^~~~~~~~~~~~~
BUILDSTDERR: compilation terminated.
Comment 4 Robert-André Mauchin 2018-10-09 20:46:22 CEST
 - So for this to actually build you need to add:


BuildRequires:	pkgconfig(pciaccess)
BuildRequires:	pkgconfig(x11)




Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Expat License BSD 3-clause "New" or "Revised" License", "BSD
     3-clause "New" or "Revised" License", "Expat License", "Unknown or
     generated". 184 files have unknown license. Detailed output of
     licensecheck in /home/bob/packaging/review/intel-media-driver/review-
     intel-media-driver/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: No rpmlint messages.
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: %config files are marked noreplace or the reason is justified.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: No %config files under /usr.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in intel-
     media-driver-debuginfo , intel-media-driver-debugsource
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: intel-media-driver-18.3.0-1.fc30.x86_64.rpm
          intel-media-driver-debuginfo-18.3.0-1.fc30.x86_64.rpm
          intel-media-driver-debugsource-18.3.0-1.fc30.x86_64.rpm
          intel-media-driver-18.3.0-1.fc30.src.rpm
4 packages and 0 specfiles checked; 0 errors, 0 warnings.
Comment 5 Thorsten Leemhuis 2018-10-10 07:22:57 CEST
(In reply to Nicolas Chauvet from comment #0)

> This is for the nonfree section because of some blob in hex forms

If you have a minute, could you point me to them (just to satisfy my curiosity)? I checked out upstream and could spot only one thing (guess I missed something you found) when running """ find . -type f -not -regex '\./\.git/.*' -print0 | xargs -0 file | grep -v -e 'C source' -e 'C++ source' -e '.asm:' -e '.cmake:' -e '.py:' -e '.sh:' """:

./Tools/MediaDriverTools/UMDPerfProfiler/MediaPerfParser:                                           ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=f7472f338af769ba09420452ad9ad0a3b13c9aee, with debug_info, not stripped

But I wonder if that file is actually needed or if it's simply a mistake that it got included.
Comment 6 Nicolas Chauvet 2018-10-10 13:18:34 CEST
(In reply to Thorsten Leemhuis from comment #5)
> (In reply to Nicolas Chauvet from comment #0)
> 
> > This is for the nonfree section because of some blob in hex forms
> 
> If you have a minute, could you point me to them (just to satisfy my
> curiosity)? I checked out upstream and could spot only one thing (guess I
> missed something you found) when running """ find . -type f -not -regex
> '\./\.git/.*' -print0 | xargs -0 file | grep -v -e 'C source' -e 'C++
> source' -e '.asm:' -e '.cmake:' -e '.py:' -e '.sh:' """:

That kind of thing is not really in a format "suitable for edition".
https://raw.githubusercontent.com/intel/media-driver/master/media_driver/agnostic/gen11/codec/kernel/igcodeckrn_g11.c
This file seems to be generated from a binary in the Tools directory, but there is nowhere a version of the original file.

There is a mention that a FLOSS version could eventually be built.
https://github.com/intel/media-driver/blob/master/distro_cmake.sh
Now I'm not sure how usable it would be ?
That been said, I also miss the needed hardware at hand so I'm seeking for a more interested maintainer once reviewed.
(and eventually have an intel-media-driver-free in fedora if relevant).


> ./Tools/MediaDriverTools/UMDPerfProfiler/MediaPerfParser:                   
> ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
> interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0,
> BuildID[sha1]=f7472f338af769ba09420452ad9ad0a3b13c9aee, with debug_info, not
> stripped
> 
> But I wonder if that file is actually needed or if it's simply a mistake
> that it got included.
Good catch, it's not used at build time, but there is no source for the file.
Others tools seems to be available for building, but it seems more debugging tools for intel-media-driver devs.
Comment 7 Nicolas Chauvet 2018-10-10 14:11:22 CEST
Spec URL: http://dl.kwizart.net/review/intel-media-driver.spec
SRPM URL: http://dl.kwizart.net/review/intel-media-driver-18.3.0-2.fc28.src.rpm
Description: The Intel Media Driver for VAAPI

Changelog:
- Use metainfodir
- Enable AppStream support (no hardware detection yet)
- Add missing BR
- Remove pre-built tools
Comment 8 Robert-André Mauchin 2018-10-10 15:52:15 CEST
Looks good to me. Package approved.
Comment 9 Nicolas Chauvet 2018-10-17 09:01:16 CEST
Thx imported.