Bug 2211754 - Review Request: pkcs11-provider - A PKCS#11 provider for OpenSSL 3.0+
Summary: Review Request: pkcs11-provider - A PKCS#11 provider for OpenSSL 3.0+
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/latchset/pkcs11-pr...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-01 19:58 UTC by Sahana Prasad
Modified: 2023-09-15 12:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-15 12:26:51 UTC
Type: ---
Embargoed:
jjelen: fedora-review+


Attachments (Terms of Use)

Description Sahana Prasad 2023-06-01 19:58:36 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/saprasad/pkcs11-provider/fedora-rawhide-x86_64/05995345-pkcs11-provider/pkcs11-provider.spec

SRPM URL: https://download.copr.fedorainfracloud.org/results/saprasad/pkcs11-provider/fedora-rawhide-x86_64/05995345-pkcs11-provider/pkcs11-provider-0.1-1.fc39.src.rpm

Description: This is an Openssl 3.x provider to access Hardware or Software Tokens using the PKCS#11 Cryptographic Token Interface

This code targets version 3.0 of the interface but should be backwards compatible to previous versions as well.

Refer https://github.com/latchset/pkcs11-provider/wiki for a more detailed documentation.

Fedora Account System Username: saprasad

Comment 1 Jakub Jelen 2023-06-19 15:37:10 UTC
Fedora review:

Issues:
=======
- Dist tag is present.
(afaik the dist tag should be in the format of %{?dist} -- not sure how it got into the upstream without the question mark

[ ]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
(this is reported upstream as there are no signatures yet -- https://github.com/latchset/pkcs11-provider/issues/248)

Rpmlint shows the following warnings:

pkcs11-provider.spec: W: invalid-url Source0: pkcs11-provider-0.1.tar.gz
(should probably point to the download location in github)
(we should also probably use the tar.xz tarball instead of the github generated tar.gz)

pkcs11-provider.x86_64: W: unused-direct-shlib-dependency /usr/lib64/ossl-modules/pkcs11.so /lib64/libssl.so.3
(i think we do not need libssl here, but would have to check)

pkcs11-provider.x86_64: W: dangling-relative-symlink /usr/share/doc/pkcs11-provider/README README.md
(this looks like an upstream issue as we install README, which is just a symlink to README.md, but README.md is not installed -- this needs to be fixed as part of the build process I think)

Comment 2 Petr Menšík 2023-06-20 10:54:01 UTC
Note: There is already passed alternative in Fedora: review bug #2214269
Upstream: https://github.com/opencryptoki/openssl-pkcs11-sign-provider

Has already updates in testing, even though it seems more limited on the first glance.

Comment 3 Petr Menšík 2023-06-20 11:14:32 UTC
Is there reason why source URL is not used?

Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

Would allow rebasing by: spectool -g *.spec

# missing make, required by %check
BuildRequires: make 

I think too unspecific wildcard is used, I would suggest
%{_mandir}/man7/%{name}*

Comment 4 Sahana Prasad 2023-06-28 12:42:42 UTC
Review comments addressed and merged upstream through:
https://github.com/latchset/pkcs11-provider/pull/253

Comment 6 Fedora Review Service 2023-06-29 09:52:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6125211
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2211754-pkcs11-provider/fedora-rawhide-x86_64/06125211-pkcs11-provider/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 7 Jakub Jelen 2023-06-29 11:42:29 UTC
Seems like the fedora review service is broken. The above link gives me 404. Locally fedora review fails too so I ran it against Fedora 38 chroot temporarily, but it should give us some idea. Results:

Issues:
=======
- Sources used to build the package match the upstream source, as provided
  in the spec URL.

sounds like you put into srpm some unreleased version. I guess we will need an upstream release with the changes first to get through the clean review but to finalize the release, I think we can waive this.

[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib64/ossl-modules

this is now owned by openssl-libs but as mentioned below, we somehow lost the dependency in the resulting package. This needs to be fixed.


There is dozens of issues like this reported by rpmlint which was not here last time (Maybe related to https://github.com/latchset/pkcs11-provider/pull/251 ?):

pkcs11-provider.x86_64: W: undefined-non-weak-symbol /usr/lib64/ossl-modules/pkcs11.so ASN1_INTEGER_it»·(/usr/lib64/ossl-modules/pkcs11.so)    

Requires
--------
pkcs11-provider (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    rtld(GNU_HASH)

The openssl-libs needs to be here.

Comment 9 Jakub Jelen 2023-07-10 11:05:35 UTC
I see you updated the version in the header, but did not add a changelog entry with the 0.2 version. I think we need this.

I still see the "too unspecific glob" in the mandir `%{_mandir}/man7/*` pointed by Petr in comment #3

As mentioned in the comment #1, the signed releases are now provided [1] so it would be good to use the signatures.

This just a nit. Spec file mentiones 3.0.5 as smallest openssl version, but upstream configure requires 3.0.7 [2]:

> BuildRequires: openssl-devel >= 3.0.5

[1] https://github.com/latchset/pkcs11-provider/issues/248
[2] https://github.com/latchset/pkcs11-provider/blob/main/configure.ac#L71

Running the fedora review now, but I believe with the above fixed, there will be no other issues.

Comment 10 Jakub Jelen 2023-07-10 12:23:29 UTC
The Fedora review did not prompt any other issues than previously discussed so after we will have fixed the issues in the last comment, I think we are good to go.

Comment 12 Jakub Jelen 2023-07-11 12:56:38 UTC
Thank you. The current version looks good. Attaching checklist from Fedora review.

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]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[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: "Apache License 2.0", "Unknown or generated", "FSF Unlimited
     License (with License Retention) FSF All Permissive License [generated
     file]", "GNU General Public License v2.0 or later [generated file]",
     "GNU General Public License v3.0 or later", "FSF Unlimited License
     [generated file]", "X11 License [generated file]", "GNU General Public
     License v2.0 or later", "FSF Unlimited License (with License
     Retention) GNU General Public License, Version 2", "FSF Unlimited
     License (with License Retention)". 23 files have unknown license.
[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.
[-]: 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 10240 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 must own all directories that it creates.
[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]: 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 must not depend on deprecated() packages.
[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]: 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %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]: Fully versioned dependency in subpackages if applicable.
[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]: 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: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: pkcs11-provider-0.2-1.fc38.x86_64.rpm
          pkcs11-provider-debuginfo-0.2-1.fc38.x86_64.rpm
          pkcs11-provider-debugsource-0.2-1.fc38.x86_64.rpm
          pkcs11-provider-0.2-1.fc38.src.rpm
=================================================================================================================================================== rpmlint session starts ==================================================================================================================================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpmigwewb6')]
checks: 31, packages: 4

==================================================================================================================== 4 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.3 s ===================================================================================================================




Rpmlint (debuginfo)
-------------------
Checking: pkcs11-provider-debuginfo-0.2-1.fc38.x86_64.rpm
=================================================================================================================================================== rpmlint session starts ==================================================================================================================================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmp22h8zk1y')]
checks: 31, packages: 1

==================================================================================================================== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s ===================================================================================================================





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

 3 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.3 s 



Unversioned so-files
--------------------
pkcs11-provider: /usr/lib64/ossl-modules/pkcs11.so

Source checksums
----------------
https://github.com/latchset/pkcs11-provider/releases/download/v0.2/pkcs11-provider-0.2.tar.xz :
  CHECKSUM(SHA256) this package     : c2650d4e5883fa5b13522fde820854e1921258aec6f11b9b10b46ed19d42053d
  CHECKSUM(SHA256) upstream package : c2650d4e5883fa5b13522fde820854e1921258aec6f11b9b10b46ed19d42053d


Requires
--------
pkcs11-provider (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libcrypto.so.3()(64bit)
    libcrypto.so.3(OPENSSL_3.0.0)(64bit)
    libcrypto.so.3(OPENSSL_3.0.3)(64bit)
    rtld(GNU_HASH)

pkcs11-provider-debuginfo (rpmlib, GLIBC filtered):

pkcs11-provider-debugsource (rpmlib, GLIBC filtered):



Provides
--------
pkcs11-provider:
    pkcs11-provider
    pkcs11-provider(x86-64)

pkcs11-provider-debuginfo:
    debuginfo(build-id)
    pkcs11-provider-debuginfo
    pkcs11-provider-debuginfo(x86-64)

pkcs11-provider-debugsource:
    pkcs11-provider-debugsource
    pkcs11-provider-debugsource(x86-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -m fedora-38-x86_64 -b 2211754
Buildroot used: fedora-38-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, PHP, Haskell, fonts, Perl, Ocaml, R, SugarActivity
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 13 Fedora Admin user for bugzilla script actions 2023-07-18 09:06:47 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/pkcs11-provider


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