Bug 1301116 - Review Request: libcxl - Coherent accelerator interface
Review Request: libcxl - Coherent accelerator interface
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
ppc64 Linux
medium Severity medium
: ---
: ---
Assigned To: Dan Horák
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F-ExcludeArch-ppc64le/PPC64LETracker 1305080
  Show dependency treegraph
 
Reported: 2016-01-22 11:04 EST by Michel Normand
Modified: 2016-06-23 10:06 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-17 12:02:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dan: fedora‑review+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 135962 None None None 2016-01-22 11:35 EST

  None (edit)
Description Michel Normand 2016-01-22 11:04:59 EST
Spec URL: https://build.opensuse.org/source/hardware/libcxl/libcxl.spec
SRPM URL: http://download.opensuse.org/repositories/hardware/openSUSE_Factory_PPC/src/libcxl-1.3-4.1.src.rpm
Description: Coherent accelerator interface user-space library
Fedora Account System Username: michelmno

This is my first request for package creation, I need a sponsor.

related scratch build on ppc koji:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3089837
Comment 1 Dan Horák 2016-01-22 11:48:14 EST
taking for review
Comment 2 Dan Horák 2016-01-27 09:17:37 EST
Michel, the URLs don't work for me, the spec returns me back to bugzilla, the srpm returns 404.
Comment 3 Michel Normand 2016-01-27 09:47:08 EST
(In reply to Dan Horák from comment #2)
> Michel, the URLs don't work for me, the spec returns me back to bugzilla,
> the srpm returns 404.


Dan, sorry for the inconvenience
I moved the spec and source rpm in fedora server:

Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-4.2.src.rpm
Description: Coherent accelerator interface user-space library
Fedora Account System Username: michelmno

This is my first request for package creation, I need a sponsor.

related scratch build on ppc koji: (not updated since initial description)
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3089837
Comment 4 Dan Horák 2016-01-29 07:41:26 EST
Thanks, I see it's using SUSE spec file, I would recommend to start from scratch or rather use "rpmdev-newspec libcxl.spec" to create a Fedora compliant template. Maintaining a cross distro spec adds a lot of code that makes the spec file hardly readable. First item to fix would be the naming, Fedora doesn't set the major version number into the package name.

Please see https://fedoraproject.org/wiki/Packaging:Guidelines for the standards Fedora packages need to follow.
Comment 5 Michel Normand 2016-01-29 11:32:16 EST
(In reply to Dan Horák from comment #4)
> Thanks, I see it's using SUSE spec file, I would recommend to start from
> scratch or rather use "rpmdev-newspec libcxl.spec" to create a Fedora
> compliant template. Maintaining a cross distro spec adds a lot of code that
> makes the spec file hardly readable. First item to fix would be the naming,
> Fedora doesn't set the major version number into the package name.
> 
> Please see https://fedoraproject.org/wiki/Packaging:Guidelines for the
> standards Fedora packages need to follow.

spec file modified as suggested
 
Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-1.fc23.src.rpm
Description: Coherent accelerator interface user-space library
Fedora Account System Username: michelmno

related scratch build on ppc koji:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3107206
Comment 6 Sinny Kumari 2016-02-01 08:09:32 EST
Few comments on latest spec file:
* With recent changes in guideline, C application should include compiler used for compilation source. In this case add, 
    BuildRequires: gcc
https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires
* %install section contains "ldconfig -n $RPM_BUILD_ROOT%{_libdir}", not sure why it is mentioned here? ld cache will already be updated through %post and %postrun section
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=PackagingGuidelines#Shared_Libraries
* In %file and %file devel section, specifying %defattr(-,root,root) is not required now
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=PackagingGuidelines#File_Permissions
* LICENSE file is getting installed in both main and devel package. Since, devel package has dependency on main package, removing %license LICENSE from %files devel section will be fine.
* Is there any significance of including static library (libcxl.a) in devel package? If yes, static libraries must be packaged in a -static sub-package https://fedoraproject.org/wiki/Packaging:Guidelines?rd=PackagingGuidelines#Packaging_Static_Libraries_2
Comment 7 Michel Normand 2016-02-02 05:25:02 EST
(In reply to Sinny Kumari from comment #6)
I accepted all you comments and updated the spec.
* adding BuildRequires: gcc
* removed ldconfig ... in %install
* remove %defattr in %file devel
* remove LICENSE  in %file devel
* remove static lib

Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-1.fc23.src.rpm

related scratch build on ppc koji:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3115696
Comment 8 Sinny Kumari 2016-02-03 05:26:57 EST
(In reply to Michel Normand from comment #7)
> Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
> SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-1.fc23.src.rpm
> 
> related scratch build on ppc koji:
> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3115696

Looks good to me.

Small note - After modifying SPEC file, it's good to add a new Changelog entry as well. Refer https://fedoraproject.org/wiki/Packaging:Guidelines#Multiple_Changelog_Entries_per_Release for more information.
Comment 9 Michel Normand 2016-02-03 06:30:33 EST
(In reply to Sinny Kumari from comment #8)
> [CUT] ...
> Small note - After modifying SPEC file, it's good to add a new Changelog
> entry as well. Refer
> https://fedoraproject.org/wiki/Packaging:
> Guidelines#Multiple_Changelog_Entries_per_Release for more information.

Thanks for the review.
I voluntarily did not modified the Changelog because not yet in fedora db.
Comment 10 Hanns-Joachim Uhl 2016-02-25 14:37:25 EST
(In reply to Sinny Kumari from comment #8)
> (In reply to Michel Normand from comment #7)
> > Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
> > SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-1.fc23.src.rpm
> > 
> > related scratch build on ppc koji:
> > http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3115696
> 
> Looks good to me.
> 
.
Hello Red Hat / Sinny or Dan,
... which are the next steps to malke this package available in Fedora ..?
Please advise ...
Thanks for your support.
Comment 11 Dan Horák 2016-03-03 03:48:39 EST
formal review is here, see the notes explaining OK* and BAD statuses below:

OK      source files match upstream:
            46189245b46fa3a53b9f983d6c30130661ad928f  v1.3.tar.gz
OK      package meets naming and versioning guidelines.
BAD     specfile is properly named, is cleanly written and uses macros consistently.
OK      dist tag is present.
OK      license field matches the actual license.
OK      license is open source-compatible (ASL 2.0). License text included in package.
OK      latest version is being packaged.
OK      BuildRequires are proper.
BAD     compiler flags are appropriate.
OK      package builds in mock (Rawhide/ppc64,ppc64le).
OK      debuginfo package looks complete.
BAD     rpmlint is silent.
OK      final provides and requires look sane.
N/A     %check is present and all tests pass.
BAD     no shared libraries are added to the regular linker search paths.
OK      owns the directories it creates.
OK      doesn't own any directories it shouldn't.
OK      no duplicates in %files.
OK      file permissions are appropriate.
OK      correct scriptlets present.
OK      code, not content.
OK      documentation is small, so no -docs subpackage is necessary.
OK      %docs are not necessary for the proper functioning of the package.
OK      headers in devel subpackage.
OK      no pkgconfig files.
OK      no libtool .la droppings.
OK      not a GUI app.

- do not explicitly compress the man pages, it's done automagically by rpmbuild
- you should skip the "rm -rf" in %install, rpmbuild does that automatically
- use a verbose build so we can confirm what compiler flags are used, the distro-wide flags from $RPM_OPT_FLAGS/%{optflags} must be used (https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags)
- rpmlint complains a bit
libcxl.ppc64le: W: spelling-error %description -l en_US Userland -> User land, User-land, Slanderous
libcxl.ppc64le: W: spelling-error %description -l en_US powerpc -> PowerPC
libcxl.ppc64le: W: spelling-error %description -l en_US cxl -> cl, cal, col
libcxl.ppc64le: W: spelling-error %description -l en_US txt -> text, ext, tit
libcxl.ppc64le: W: spelling-error %description -l en_US userland -> user land, user-land, slanderous
libcxl.ppc64le: E: no-ldconfig-symlink /usr/lib64/libcxl.so
3 packages and 0 specfiles checked; 1 errors, 5 warnings.
- libcxl.so should be a symlink to the actual library file that contains version info (eg. soname version) in the name, with the symlink in devel subpackage
Comment 12 Michel Normand 2016-03-03 07:45:32 EST
Thank you Dan for the review.
I modified my spec file to address the reported issues, except for "spelling error" I am not able to verify. (see comment below)

(In reply to Dan Horák from comment #11)
> formal review is here, see the notes explaining OK* and BAD statuses below:
> 
> {CUT] ...
> 
> - do not explicitly compress the man pages, it's done automagically by
> rpmbuild
> - you should skip the "rm -rf" in %install, rpmbuild does that automatically
> - use a verbose build so we can confirm what compiler flags are used, the
> distro-wide flags from $RPM_OPT_FLAGS/%{optflags} must be used
> (https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags)
> - rpmlint complains a bit
> libcxl.ppc64le: W: spelling-error %description -l en_US Userland -> User
> land, User-land, Slanderous
> libcxl.ppc64le: W: spelling-error %description -l en_US powerpc -> PowerPC
> libcxl.ppc64le: W: spelling-error %description -l en_US cxl -> cl, cal, col
> libcxl.ppc64le: W: spelling-error %description -l en_US txt -> text, ext, tit
> libcxl.ppc64le: W: spelling-error %description -l en_US userland -> user
> land, user-land, slanderous

from where are coming the "spelling-error" check ?
If I run myself the rpmlint with no specific option on generated rpm file I do not have such warning.
Do you have a specific configuration file ?

> libcxl.ppc64le: E: no-ldconfig-symlink /usr/lib64/libcxl.so
> 3 packages and 0 specfiles checked; 1 errors, 5 warnings.
> - libcxl.so should be a symlink to the actual library file that contains
> version info (eg. soname version) in the name, with the symlink in devel
> subpackage
Comment 13 Dan Horák 2016-03-03 08:41:50 EST
(In reply to Michel Normand from comment #12)
> Thank you Dan for the review.
> I modified my spec file to address the reported issues, except for "spelling
> error" I am not able to verify. (see comment below)

thanks, please upload the updated spec and srpm when finished
 
> (In reply to Dan Horák from comment #11)
> > formal review is here, see the notes explaining OK* and BAD statuses below:
> > 
> > {CUT] ...
> > 
> > - do not explicitly compress the man pages, it's done automagically by
> > rpmbuild
> > - you should skip the "rm -rf" in %install, rpmbuild does that automatically
> > - use a verbose build so we can confirm what compiler flags are used, the
> > distro-wide flags from $RPM_OPT_FLAGS/%{optflags} must be used
> > (https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags)
> > - rpmlint complains a bit
> > libcxl.ppc64le: W: spelling-error %description -l en_US Userland -> User
> > land, User-land, Slanderous
> > libcxl.ppc64le: W: spelling-error %description -l en_US powerpc -> PowerPC
> > libcxl.ppc64le: W: spelling-error %description -l en_US cxl -> cl, cal, col
> > libcxl.ppc64le: W: spelling-error %description -l en_US txt -> text, ext, tit
> > libcxl.ppc64le: W: spelling-error %description -l en_US userland -> user
> > land, user-land, slanderous
> 
> from where are coming the "spelling-error" check ?
> If I run myself the rpmlint with no specific option on generated rpm file I
> do not have such warning.
> Do you have a specific configuration file ?

hm, nothing special AFAIK, I'm running it on F-22, but the spelling errors are often harmless. Only "userland" seems to be valid complaint here (and still with question mark :-)).
 
> > libcxl.ppc64le: E: no-ldconfig-symlink /usr/lib64/libcxl.so
> > 3 packages and 0 specfiles checked; 1 errors, 5 warnings.
> > - libcxl.so should be a symlink to the actual library file that contains
> > version info (eg. soname version) in the name, with the symlink in devel
> > subpackage
Comment 14 Michel Normand 2016-03-03 09:01:21 EST

(In reply to comment #13)
I made changes for all reported issues (last one reducing Description text)

Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-1.fc24.src.rpm

related scratch build on ppc koji:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3192570
Comment 15 Dan Horák 2016-03-03 09:47:56 EST
additional comments:
- please update release for each iteration, it hard to track the changes made if it's kept the same and spec and srpms are overridden
- you can drop also the "build" dir for man pages, it's a no-op at the end
mkdir -p build/man3
cp man3/*.3 build/man3
- I would use only VERS_LIB=%{version} otherwise it appends also ".1.fc24" which is not correct IMO
- the libcxl.so symlink need to be created manually or the makefile be updated to create it, then "%files" should have
%{_libdir}/libcxl.so.*
and "%files devel" then
%{_libdir}/libcxl.so
Comment 16 Michel Normand 2016-03-03 11:03:17 EST
(In reply to Dan Horák from comment #15)
> additional comments:
> - please update release for each iteration, it hard to track the changes
> made if it's kept the same and spec and srpms are overridden

I will do for next

> - you can drop also the "build" dir for man pages, it's a no-op at the end
> mkdir -p build/man3
> cp man3/*.3 build/man3

There are other files in  man3/ I do not want to package
this is the reason why i did a copy before to install build/man3/

> - I would use only VERS_LIB=%{version} otherwise it appends also ".1.fc24"
> which is not correct IMO

I will do

> - the libcxl.so symlink need to be created manually or the makefile be
> updated to create it, then "%files" should have
> %{_libdir}/libcxl.so.*
> and "%files devel" then
> %{_libdir}/libcxl.so

I am lost :( for me the symbolic link is created by ldconfig at install time
from the soname information present in the shipped so file
===
$ls -ltr /usr/lib64/libcxl.so*
-rwxr-xr-x. 1 root root 69216 mars   3 16:59 /usr/lib64/libcxl.so.1.3
lrwxrwxrwx. 1 root root    13 mars   3 17:00 /usr/lib64/libcxl.so.1 -> libcxl.so.1.3
===
$rpm -ql libcxl
/usr/lib64/libcxl.so.1.3
/usr/share/doc/libcxl
/usr/share/doc/libcxl/README.md
/usr/share/licenses/libcxl
/usr/share/licenses/libcxl/LICENSE
===
Comment 17 Michel Normand 2016-03-04 03:10:59 EST
(In reply to Dan Horák from comment #15)
> additional comments:
> - please update release for each iteration, it hard to track the changes
> made if it's kept the same and spec and srpms are overridden

I did it => release 2 for rpm below

> - you can drop also the "build" dir for man pages, it's a no-op at the end
> mkdir -p build/man3
> cp man3/*.3 build/man3

not done as detailed in comment #16

> - I would use only VERS_LIB=%{version} otherwise it appends also ".1.fc24"
> which is not correct IMO

I did it

> - the libcxl.so symlink need to be created manually or the makefile be
> updated to create it, then "%files" should have
> %{_libdir}/libcxl.so.*
> and "%files devel" then
> %{_libdir}/libcxl.so

not done as per question in comment #16


Spec URL: https://michelmno.fedorapeople.org/libcxl.spec
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-2.fc24.src.rpm
Comment 18 Michel Normand 2016-03-11 03:22:47 EST
Dan, any update ?
Comment 19 Dan Horák 2016-03-11 08:03:54 EST
(In reply to Michel Normand from comment #16)
> (In reply to Dan Horák from comment #15)
> > additional comments:
> > - please update release for each iteration, it hard to track the changes
> > made if it's kept the same and spec and srpms are overridden
> 
> I will do for next
> 
> > - you can drop also the "build" dir for man pages, it's a no-op at the end
> > mkdir -p build/man3
> > cp man3/*.3 build/man3
> 
> There are other files in  man3/ I do not want to package
> this is the reason why i did a copy before to install build/man3/
> 
> > - I would use only VERS_LIB=%{version} otherwise it appends also ".1.fc24"
> > which is not correct IMO
> 
> I will do
> 
> > - the libcxl.so symlink need to be created manually or the makefile be
> > updated to create it, then "%files" should have
> > %{_libdir}/libcxl.so.*
> > and "%files devel" then
> > %{_libdir}/libcxl.so
> 
> I am lost :( for me the symbolic link is created by ldconfig at install time
> from the soname information present in the shipped so file
> ===
> $ls -ltr /usr/lib64/libcxl.so*
> -rwxr-xr-x. 1 root root 69216 mars   3 16:59 /usr/lib64/libcxl.so.1.3
> lrwxrwxrwx. 1 root root    13 mars   3 17:00 /usr/lib64/libcxl.so.1 ->
> libcxl.so.1.3

there are usually 3 files for a library
- first the versioned real file - /usr/lib64/libcxl.so.1.3
- second the symlink with soname (can be created by ldconfig) - /usr/lib64/libcxl.so.1
- and last the development symlink libfoo.so that is used by a linker when linking an app with the foo library
The first 2 files go to the main package (via %{_libdir}/libfoo.so.*), the last one to the devel subpackage (via %{_libdir}/libfoo.so).
Comment 20 Michel Normand 2016-03-11 09:37:52 EST
(In reply to Dan Horák from comment #19)
> (In reply to Michel Normand from comment #16)
> [CUT] ...
> 
> there are usually 3 files for a library
> - first the versioned real file - /usr/lib64/libcxl.so.1.3
> - second the symlink with soname (can be created by ldconfig) -
> /usr/lib64/libcxl.so.1
> - and last the development symlink libfoo.so that is used by a linker when
> linking an app with the foo library
> The first 2 files go to the main package (via %{_libdir}/libfoo.so.*), the
> last one to the devel subpackage (via %{_libdir}/libfoo.so).

spec updated as requested:

Spec URL: https://michelmno.fedorapeople.org/libcxl.spec.rel3
SRPM URL: https://michelmno.fedorapeople.org/libcxl-1.3-3.fc24.src.rpm

related scratchbuild
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3215313
Comment 21 Dan Horák 2016-03-17 05:55:00 EDT
Two minor nitpicks - use an empty line to separate the entries in %changelog and use "cp -p" when copying the man pages to the man3 dir in %build. Please do changes before committing the initial version to git.

The libcxl package is APPROVED.
Comment 22 Michel Normand 2016-03-17 09:16:24 EDT
Awaiting package request creation in fedora db, before to commit above.
https://admin.fedoraproject.org/pkgdb/packager/michelmno/requests
Comment 23 Gwyn Ciesla 2016-03-17 10:32:21 EDT
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/libcxl
Comment 24 Michel Normand 2016-03-17 11:45:28 EDT
package source available now in master and scratchbuild OK
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3226265
Comment 25 Dan Horák 2016-03-17 12:02:24 EDT
I see it's even a regular build so we can close the bug. Please do also a rawhide (f25) build from the master branch.

Note You need to log in before you can comment on or make changes to this bug.