Bug 1274978

Summary: Review Request: hsakmt - Thunk library for amdkfd
Product: [Fedora] Fedora Reporter: Oded Gabbay <ogabbay>
Component: Package ReviewAssignee: Luya Tshimbalanga <luya>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eocallaghan, kem, luya, ogabbay, package-review
Target Milestone: ---Flags: luya: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-03 20:40:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oded Gabbay 2015-10-24 12:09:00 UTC
Spec URL: http://people.freedesktop.org/~gabbayo/hsakmt/hsakmt.spec
SRPM URL: http://people.freedesktop.org/~gabbayo/hsakmt/hsakmt-1.0.0-1.fc22.src.rpm
Description: hsakmt is a thunk library for AMD's HSA Linux kernel driver (amdkfd)
Fedora Account System Username: gabbayo

rpmlint hsakmt-1.0.0-1.fc22.src.rpm 
hsakmt.src: W: spelling-error %description -l en_US amdkfd 
hsakmt.src: W: strange-permission hsakmt-1.0.0.tar.bz2 640
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

rpmlint hsakmt-1.0.0-1.fc22.x86_64.rpm 
hsakmt.x86_64: W: spelling-error %description -l en_US amdkfd 
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

rpmlint hsakmt-1.0.0-1.fc22.x86_64.rpm 
hsakmt.x86_64: W: spelling-error %description -l en_US amdkfd 
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

rpmlint hsakmt-devel-1.0.0-1.fc22.x86_64.rpm 
hsakmt-devel.x86_64: W: only-non-binary-in-usr-lib
hsakmt-devel.x86_64: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

Comment 1 Upstream Release Monitoring 2015-10-28 09:25:50 UTC
luya's scratch build of hsakmt-1.0.0-1.fc22.src.rpm for f23 failed http://koji.fedoraproject.org/koji/taskinfo?taskID=11611142

Comment 2 Upstream Release Monitoring 2015-10-28 09:32:37 UTC
luya's scratch build of hsakmt-1.0.0-1.fc22.src.rpm for f23 completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11611167

Comment 3 Luya Tshimbalanga 2015-10-28 10:11:43 UTC
Would you update the tar source to the latest version within the spec file according to the guideline:

MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use sha256sum for this task as it is used by the sources file once imported into git.

Comment 4 Oded Gabbay 2015-10-28 10:13:57 UTC
The tar source is updated to the latest version...
There was only one release (which I did a couple of days ago), and the tar source file inside the spec points to it.

Comment 5 Luya Tshimbalanga 2015-10-28 16:55:39 UTC
(In reply to Oded Gabbay from comment #4)
> The tar source is updated to the latest version...
> There was only one release (which I did a couple of days ago), and the tar
> source file inside the spec points to it.

https://wiki.freedesktop.org/xorg/archive/individual/lib/hsakmt-1.0.0.tar.bz2 from source0 to compare the tar source within the srom leads to error 404. Would you reinstate that tarball package so I can match the sha256sum? It is part of procedure as a reviewer. See https://fedoraproject.org/wiki/Packaging:ReviewGuidelines

Comment 6 Luya Tshimbalanga 2015-10-28 16:56:19 UTC
I mean sprm rather than srom

Comment 7 Oded Gabbay 2015-10-29 06:03:03 UTC
Because you are using a wrong link.
It's not https://wiki.freedesktop.org/xorg/archive/individual/lib/hsakmt-1.0.0.tar.bz2

It's http://xorg.freedesktop.org/archive/individual/lib/hsakmt-1.0.0.tar.bz2

The 404 error you get is because that link is wrong and it can't find the file to download.

I downloaded the file from the correct link and compared sha256sum to the tar inside the srpm and they are identical

Comment 8 Luya Tshimbalanga 2015-10-29 09:51:18 UTC
(In reply to Oded Gabbay from comment #7)
> Because you are using a wrong link.
> It's not
> https://wiki.freedesktop.org/xorg/archive/individual/lib/hsakmt-1.0.0.tar.bz2
> 
> It's http://xorg.freedesktop.org/archive/individual/lib/hsakmt-1.0.0.tar.bz2

It turned out HTTPS Everywhere extenision for Firefox caused the 404 error by replacing http with https. Disable it led me to get the tarball. 

-------
Looking at the spec files, could you fix the following:

- Package uses either %{buildroot} or $RPM_BUILD_ROOT on that following line

> make install DESTDIR=$RPM_BUILD_ROOT
>
> find %{buildroot} -type f -name "*.la" -delete


I will personally suggest using %{buildroot} for consistency

--------------------
  
- 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.
  Note: License file COPYING is marked as %doc instead of %license
  See:
  http://fedoraproject.org/wiki/Packaging/LicensingGuidelines#License_Text

--------------------

- According to license check from fedora-review script, hsakmt source tarball has two licenses which should be reflected on the spec file:

GPL (v2 or later)
-----------------
hsakmt-1.0.0/ltmain.sh

MIT/X11 (BSD like)
------------------
hsakmt-1.0.0/COPYING
hsakmt-1.0.0/hsakmt/debug.c
hsakmt-1.0.0/hsakmt/events.c
hsakmt-1.0.0/hsakmt/fmm.c
hsakmt-1.0.0/hsakmt/fmm.h
hsakmt-1.0.0/hsakmt/globals.c
hsakmt-1.0.0/hsakmt/hsakmt-version.h.in
hsakmt-1.0.0/hsakmt/include/hsakmt.h
hsakmt-1.0.0/hsakmt/include/hsakmttypes.h
hsakmt-1.0.0/hsakmt/include/linux/kfd_ioctl.h
hsakmt-1.0.0/hsakmt/libhsakmt.h
hsakmt-1.0.0/hsakmt/memory.c
hsakmt-1.0.0/hsakmt/openclose.c

--------------------------
- AutoTools result from fedora-review script: Obsoleted m4s found
------------------------------
  AC_PROG_LIBTOOL found in: hsakmt-1.0.0/configure.ac:70 is replaced by 
LT_INIT. See https://fedorahosted.org/FedoraReview/wiki/AutoTools for details

Comment 9 Oded Gabbay 2015-10-29 11:37:05 UTC
I can fix everything, however the last item involves fixing the tar file itself, which I don't want to do at this point.

Can we continue with fixing all of your remarks except the last one (configure.ac), and I'll fix it upstream so next release it will be fixed in Fedora as well ?

Comment 10 Luya Tshimbalanga 2015-10-29 17:08:57 UTC
(In reply to Oded Gabbay from comment #9)
> Can we continue with fixing all of your remarks except the last one
> (configure.ac), and I'll fix it upstream so next release it will be fixed in
> Fedora as well ?

Sur you can. Please post the updated spec and srpm so I can continue reviewing.

Comment 11 Oded Gabbay 2015-10-29 17:47:12 UTC
Uploaded new spec and srpm files.

Comment 12 Luya Tshimbalanga 2015-10-29 17:51:55 UTC
(In reply to Oded Gabbay from comment #11)
> Uploaded new spec and srpm files.

URL?

Comment 14 Luya Tshimbalanga 2015-10-29 18:28:29 UTC
Hmm, I don't see the fix within the spec file. Perhaps you mistakenly sent the old version.

Could you bump also the srpm to 1.0.0-2 reflecting the change? Thanks.

Comment 16 Upstream Release Monitoring 2015-10-29 18:54:14 UTC
luya's scratch build of hsakmt-1.0.0-2.fc22.src.rpm for f23 completed http://koji.fedoraproject.org/koji/taskinfo?taskID=11630452

Comment 17 Luya Tshimbalanga 2015-10-29 19:37:44 UTC
Here is the  review, I will ignore the obsolete macro case as you, upstream, will fix on the next release.

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

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

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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig called in %post and %postun if required.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

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.
[-]: 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.
[x]: 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.
[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: There are rpmlint messages (see attachment).
[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 must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[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]: 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]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in hsakmt-
     devel (it is safe to remove that line on the spec file)
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Scriptlets must be sane, if used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[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]: Uses parallel make %{?_smp_mflags} macro.
[x]: The placement of pkgconfig(.pc) files are correct.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Package should not use obsolete m4 macros
     Note: Some obsoleted macros found, see the attachment.
     See: https://fedorahosted.org/FedoraReview/wiki/AutoTools (Conditional acceptance as upstream will fix on the next release)
[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: hsakmt-1.0.0-2.fc22.x86_64.rpm
          hsakmt-devel-1.0.0-2.fc22.x86_64.rpm
          hsakmt-1.0.0-2.fc22.src.rpm
hsakmt.x86_64: W: spelling-error %description -l en_US amdkfd 
hsakmt.x86_64: W: no-documentation
hsakmt-devel.x86_64: W: only-non-binary-in-usr-lib
hsakmt-devel.x86_64: W: no-documentation
hsakmt.src: W: spelling-error %description -l en_US amdkfd 
hsakmt.src: W: strange-permission hsakmt-1.0.0.tar.bz2 640
3 packages and 0 specfiles checked; 0 errors, 6 warnings.

(although the rpmlint has no error, please fix these warning as possible on the next update)



Rpmlint (debuginfo)
-------------------
Checking: hsakmt-debuginfo-1.0.0-2.fc22.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
hsakmt-devel.x86_64: W: only-non-binary-in-usr-lib
hsakmt-devel.x86_64: W: no-documentation
hsakmt.x86_64: W: spelling-error %description -l en_US amdkfd 
hsakmt.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libhsakmt-1.so.0.0.0 /lib64/libm.so.6
hsakmt.x86_64: W: no-documentation
3 packages and 0 specfiles checked; 0 errors, 5 warnings.



Requires
--------
hsakmt-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    hsakmt
    libhsakmt-1.so.0()(64bit)
    pkgconfig

hsakmt (rpmlib, GLIBC filtered):
    /sbin/ldconfig
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)



Provides
--------
hsakmt-devel:
    hsakmt-devel
    hsakmt-devel(x86-64)
    pkgconfig(hsakmt-1)

hsakmt:
    hsakmt
    hsakmt(x86-64)
    libhsakmt-1.so.0()(64bit)



Source checksums
----------------
http://xorg.freedesktop.org/archive/individual/lib/hsakmt-1.0.0.tar.bz2 :
  CHECKSUM(SHA256) this package     : f558cea2764d9d5d65ba00bdbf4168ac1cfbf8c9ab65715a9da34149754a6e3d
  CHECKSUM(SHA256) upstream package : f558cea2764d9d5d65ba00bdbf4168ac1cfbf8c9ab65715a9da34149754a6e3d


Based on the criteria, the review is marked PASSED.

Comment 18 Luya Tshimbalanga 2015-10-29 22:16:29 UTC
One more thing, considering that hsakmt is a library, would you rename the package as libhsakmt to be consistent on Fedora repository? The source tarball does not need renaming, only the spec and srpm. Once it is done, I will set as APPROVED. Thanks.

Comment 20 Luya Tshimbalanga 2015-11-01 10:24:45 UTC
Scratch build result 
http://koji.fedoraproject.org/koji/taskinfo?taskID=11663501, all are good. APPROVED.

Comment 21 Luya Tshimbalanga 2015-11-01 10:35:17 UTC
Next step will be following this guide: https://fedoraproject.org/wiki/PackageDB_admin_requests

Comment 22 Oded Gabbay 2015-11-01 10:51:27 UTC
Thanks, already did that on Friday.

Comment 23 Gwyn Ciesla 2015-11-05 00:55:50 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/hsakmt

Comment 24 Luya Tshimbalanga 2015-12-03 20:40:49 UTC
Closing this review request now that hsakmt is officially packaged.
https://apps.fedoraproject.org/packages/hsakmt