Bug 1265727 - (libcacard) Review Request: libcacard - CAC (Common Access Card) library
Review Request: libcacard - CAC (Common Access Card) library
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
:
: 1282946 (view as bug list)
Depends On: 1265728
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-23 10:53 EDT by Marc-Andre Lureau
Modified: 2015-11-25 09:51 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-24 10:06:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
crobinso: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Marc-Andre Lureau 2015-09-23 10:53:40 EDT
Spec URL: https://elmarco.fedorapeople.org/libcacard.spec
SRPM URL: https://elmarco.fedorapeople.org/libcacard-2.5.0-1.fc22.src.rpm
Description: 
This library provides emulation of smart cards to a virtual card
reader running in a guest virtual machine.

It used to be part of qemu, so conflict/replace transition should be hanlded carefully.

Fedora Account System Username: elmarco
Comment 1 Marc-Andre Lureau 2015-09-23 10:57:53 EDT
There is one issue with debuginfo package that I don't know how to handle:
 
Error: Transaction check error:
  file /usr/lib/debug/usr/bin/vscclient.debug from install of libcacard-debuginfo-3:2.5.0-1.fc22.x86_64 conflicts with file from package qemu-debuginfo-2:2.4.0-0.2.rc4.fc22.x86_64
  file /usr/lib/debug/usr/lib64/libcacard.so.0.0.0.debug from install of libcacard-debuginfo-3:2.5.0-1.fc22.x86_64 conflicts with file from package qemu-debuginfo-2:2.4.0-0.2.rc4.fc22.x86_64
Comment 2 Cole Robinson 2015-09-24 14:12:14 EDT
Marc-Andre Lureau from comment #1)
> There is one issue with debuginfo package that I don't know how to handle:
>  
> Error: Transaction check error:
>   file /usr/lib/debug/usr/bin/vscclient.debug from install of
> libcacard-debuginfo-3:2.5.0-1.fc22.x86_64 conflicts with file from package
> qemu-debuginfo-2:2.4.0-0.2.rc4.fc22.x86_64
>   file /usr/lib/debug/usr/lib64/libcacard.so.0.0.0.debug from install of
> libcacard-debuginfo-3:2.5.0-1.fc22.x86_64 conflicts with file from package
> qemu-debuginfo-2:2.4.0-0.2.rc4.fc22.x86_64

I think proper package conflicts + requires will fix this, see below.

Summary of issues, more details below:

* Use %license for COPYING
* Yeah package name already exists, but to unretire a package requires a re-review anyways so I think we are fine here.
* Add a version to the changelog before building.

* For handling the qemu conflict: I think we wait to build this until qemu 2.5.0-rc0 is out, and only do it in rawhide. This package will have:

Conflicts: qemu-common < 2.5.0

and the qemu 2.5.0 package will have

Requires: libcacard >= 2.5.0

I _think_ that's what's required but this stuff always confuses me. FWIW I'm looking here:

https://fedoraproject.org/wiki/Packaging:Conflicts#Splitting_Packages

But our case isn't specifically described.



fedora-review output on f21 (fedora-review is hanging for me on f23, hitting dnf somehow)


Issues:
=======
- 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
- Package does not use a name that already exists.
  Note: A package with this name already exists. Please check
  https://admin.fedoraproject.org/pkgdb/acls/name/libcacard
  See:
  https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Conflicting_Package_Names


===== 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.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "GPL (v2 or later)", "Unknown or generated". 23 files have
     unknown license. Detailed output of licensecheck in
     /home/localcole/1265727-libcacard/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[!]: 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 30720 bytes in 2 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: There are rpmlint messages (see attachment).
[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 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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     libcacard-tools , libcacard-devel

- Shouldn't matter, RPM should handle the lib dep for us IIRC

[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.
[x]: 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:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)

There's whitespaces differences in the spec

[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[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.


Rpmlint
-------
Checking: libcacard-2.5.0-1.fc21.x86_64.rpm
          libcacard-tools-2.5.0-1.fc21.x86_64.rpm
          libcacard-devel-2.5.0-1.fc21.x86_64.rpm
          libcacard-2.5.0-1.fc21.src.rpm
libcacard.x86_64: W: spelling-error %description -l en_US pki -> pk, pi, kip
libcacard.x86_64: W: spelling-error %description -l en_US coolkey -> cool key, cool-key, Cooley
libcacard.x86_64: W: no-version-in-last-changelog

* Yeah, add a version before building

libcacard.x86_64: W: no-manual-page-for-binary vscclient
libcacard-tools.x86_64: W: no-version-in-last-changelog
libcacard-tools.x86_64: W: no-documentation
libcacard-tools.x86_64: W: no-manual-page-for-binary vscclient
libcacard-devel.x86_64: W: no-version-in-last-changelog
libcacard-devel.x86_64: W: only-non-binary-in-usr-lib

* Isn't this fine for a devel package? I don't think there's anything to do here

libcacard-devel.x86_64: W: no-documentation
libcacard.src: W: spelling-error %description -l en_US pki -> pk, pi, kip
libcacard.src: W: spelling-error %description -l en_US coolkey -> cool key, cool-key, Cooley
libcacard.src: W: no-version-in-last-changelog
4 packages and 0 specfiles checked; 0 errors, 13 warnings.

* Rest as fine



Rpmlint (debuginfo)
-------------------
Checking: libcacard-debuginfo-2.5.0-1.fc21.x86_64.rpm
libcacard-debuginfo.x86_64: W: no-version-in-last-changelog
1 packages and 0 specfiles checked; 0 errors, 1 warnings.





Rpmlint (installed packages)
----------------------------
libcacard-devel.x86_64: W: no-version-in-last-changelog
libcacard-devel.x86_64: W: only-non-binary-in-usr-lib
libcacard-devel.x86_64: W: no-documentation
libcacard.x86_64: W: spelling-error %description -l en_US pki -> pk, pi, kip
libcacard.x86_64: W: spelling-error %description -l en_US coolkey -> cool key, cool-key, Cooley
libcacard.x86_64: W: no-version-in-last-changelog
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libssl3.so
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libsmime3.so
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libnssutil3.so
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libplds4.so
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libplc4.so
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libpthread.so.0
libcacard.x86_64: W: unused-direct-shlib-dependency /usr/lib64/libcacard.so.0.0.0 /lib64/libdl.so.2

* Wiki page has info how to fix this if using libtool, but doesn't sound like a big deal, so its optional IMO:

https://fedoraproject.org/wiki/Common_Rpmlint_issues#unused-direct-shlib-dependency

libcacard.x86_64: W: no-manual-page-for-binary vscclient
libcacard-tools.x86_64: W: no-version-in-last-changelog
libcacard-tools.x86_64: W: no-documentation
libcacard-tools.x86_64: W: no-manual-page-for-binary vscclient
libcacard-debuginfo.x86_64: W: no-version-in-last-changelog
4 packages and 0 specfiles checked; 0 errors, 18 warnings.

Rest are fine
Comment 3 Paolo Bonzini 2015-10-12 06:17:08 EDT
> [x]: Fully versioned dependency in subpackages if applicable.
>      Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
>      libcacard-tools , libcacard-devel
> 
> - Shouldn't matter, RPM should handle the lib dep for us IIRC

Better fix it anyway.

> libcacard-devel.x86_64: W: only-non-binary-in-usr-lib
>
> * Isn't this fine for a devel package? I don't think there's anything to
> do here

Yes, this is good.
Comment 4 Cole Robinson 2015-11-04 14:20:57 EST
Marc-Andre, FYI qemu 2.5.0 rc0 is planned for november 12th. So if we get this in fedora git by then, I can handle the libcacard and qemu builds at the same time
Comment 5 Marc-Andre Lureau 2015-11-17 07:14:20 EST
Updated spec & srpm:
https://elmarco.fedorapeople.org/libcacard.spec
https://elmarco.fedorapeople.org/libcacard-2.5.0-1.fc23.src.rpm

Changes:
- added Conflict line
- added libtool trick from wiki for unused-direct-shlib-deps
- use %license for COPYING
- added missing version in changelog
Comment 6 Cole Robinson 2015-11-17 12:57:41 EST
ACK, looks good now!
Comment 7 Cole Robinson 2015-11-17 16:16:38 EST
*** Bug 1282946 has been marked as a duplicate of this bug. ***
Comment 8 Cole Robinson 2015-11-17 16:17:08 EST
rel-eng ticket requesting the package be unretired: https://fedorahosted.org/rel-eng/ticket/6296
Comment 9 Cole Robinson 2015-11-17 16:17:55 EST
*** Bug 1282946 has been marked as a duplicate of this bug. ***
Comment 10 Cole Robinson 2015-11-17 16:21:31 EST
*** Bug 1282946 has been marked as a duplicate of this bug. ***
Comment 11 Fedora Update System 2015-11-23 12:30:58 EST
libcacard-2.5.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-9994a72f59
Comment 12 Fedora Update System 2015-11-23 21:22:42 EST
libcacard-2.5.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update libcacard'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-9994a72f59
Comment 13 Cole Robinson 2015-11-24 10:06:07 EST
Package is in rawhide, so closing. We are still trying to figure out if it will hit f23, since it depends on qemu changes
Comment 14 Tim Jones 2015-11-25 03:10:58 EST
FYI, on fc23:

# dnf --best --allowerasing update
Last metadata expiration check performed 0:40:32 ago on Wed Nov 25 07:23:04 2015.
Error: package libcacard-3:2.5.0-1.fc23.x86_64 conflicts with qemu-common < 2:2.5.0 provided by qemu-common-2:2.4.1-1.fc23.x86_64
Comment 15 Cole Robinson 2015-11-25 09:51:50 EST
(In reply to Tim Jones from comment #14)
> FYI, on fc23:
> 
> # dnf --best --allowerasing update
> Last metadata expiration check performed 0:40:32 ago on Wed Nov 25 07:23:04
> 2015.
> Error: package libcacard-3:2.5.0-1.fc23.x86_64 conflicts with qemu-common <
> 2:2.5.0 provided by qemu-common-2:2.4.1-1.fc23.x86_64

Yeah the f23 update was busted, it's been unpushed

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