Bug 2144589 - Review Request: tpm2-openssl - Provider for integration of TPM 2.0 to OpenSSL 3.0
Summary: Review Request: tpm2-openssl - Provider for integration of TPM 2.0 to OpenSSL...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Sahana Prasad
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: NotReady
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-21 19:13 UTC by Grant Williamson
Modified: 2024-03-22 12:05 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-03-22 12:05:09 UTC
Type: Bug
Embargoed:
dbelyavs: fedora-review+


Attachments (Terms of Use)
SRPM for tpm2-openssl (422.25 KB, application/x-rpm)
2022-11-21 19:13 UTC, Grant Williamson
no flags Details
tpm2-openssl spec file (1.48 KB, text/plain)
2022-11-21 19:14 UTC, Grant Williamson
no flags Details
WFM for Copr build (2.75 KB, text/plain)
2024-03-20 15:52 UTC, Dmitry Belyavskiy
no flags Details

Description Grant Williamson 2022-11-21 19:13:54 UTC
Created attachment 1926194 [details]
SRPM for tpm2-openssl

Spec Attached
SRPM Attached

Makes the TPM 2.0 accessible via the standard OpenSSL API and command-line
tools, so one can add TPM support to (almost) any  OpenSSL 3.0 based
application.

This is my first fedora package so any guidance would be welcomed.

Comment 1 Grant Williamson 2022-11-21 19:14:59 UTC
Created attachment 1926195 [details]
tpm2-openssl spec file

Comment 2 Jakub Jelen 2022-11-22 08:16:42 UTC
Did you use the template from [1][2] to create this bug? It provides fields that are used by automation and that need to be filled in for stuff to work correctly. Please update the bug with this information in new comment.

  Spec URL: <spec info here>
  SRPM URL: <srpm info here>
  Description: <description here>
  Fedora Account System Username:

Building the package in mock in rawhide fails for me during the tests. I assume it will be some missing dependency for tests, but I did not investigate it further yet. This needs to be fixed too

Do you have fedora account already? Are you in packager group? If not, we will need FE-NEEDSPONSOR as described in [1].

The build is producing dozens of warnings, which should be possible to fix pretty easily (if they are not fixed in the upstream), for example:

src/tpm2-provider-keymgmt-rsa.c: In function 'tpm2_rsa_keymgmt_gen':
src/tpm2-provider-keymgmt-rsa.c:302:1: warning: label 'final' defined but not used [-Wunused-label]
  302 | final:
      | ^~~~~

This makes it hard to find real errors from the build log, but I think fixing this is not a requirement for packaging (but a good practice that will hopefully save some headaches in the future).

[1] https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/
[2] https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&format=fedora-review

Comment 3 afreof 2023-03-30 14:43:53 UTC
According to the documentation of https://github.com/tpm2-software/tpm2-openssl tpm2-openssl is supposed to be used with openssl 3.x and the tpm2-tss-engine https://packages.fedoraproject.org/pkgs/tpm2-tss-engine/tpm2-tss-engine/ works with openssl 1.x. Since Fedora comes with openssl 3.x, I think the tpm2-openssl packages should be added. 

I'm also wondering if this spec file can work with openssl-devel: https://src.fedoraproject.org/rpms/tpm2-tss-engine/blob/rawhide/f/tpm2-tss-engine.spec#_20. Probably this should be changed to openssl1.1-devel. But that's another topic.

To bring this a little bit further I took the spec file from here as a starting point. Here are the repositories:

- git: https://pagure.io/tpm2-openssl
- packages: https://copr.fedorainfracloud.org/coprs/afreof/tpm2-openssl/

The make check is disabled for now. It's not that simple to enable the tests on a CI pipeline but it would be feasible.

It's basically tested on Fedora 36 and 37. It's known to not work with Fedora 38. But it's not yet clear if the tpm2-openssl package is broken or if Fedora 38 has some issues in the tpm2 packages.

How should I proceed?

Comment 4 Sahana Prasad 2023-11-13 15:26:15 UTC
@adrian.freihofer Hi, what's the latest status of this package? Are the builds still failing in rawhide?
We are interested in bringing this package to rawhide ASAP.
Thank you.

Comment 5 afreof 2023-11-13 23:00:40 UTC
Hi Sahana

This was on hold for several months now. But I quickly updated to the recently tagged version 1.2.0 and it seams to build without warnings also for Rawhide. See here for more details: https://copr.fedorainfracloud.org/coprs/afreof/tpm2-openssl/build/6630731/

We also added a possibility to run the unit tests in a Fedora container: https://github.com/tpm2-software/tpm2-openssl/blob/master/docs/INSTALL.md#build-and-run-all-tests-in-a-container.

Running the tests for the tag 1.2.0 in a Fedora 39 container looks good. All 42 tests passed when using the swtpm as well as when using the ibm TPM emulator.

With rawhide the tests pass when running with the swtpm emulator but many tests fail when running them with the ibm TPM emulator. I did not search for the root cause. I also did not check if this is already fixed when running the latest commit from tpm2-openssl.

Comment 6 Sahana Prasad 2023-11-14 11:47:42 UTC
Hi Afreof,
great thanks for the quick update.
If you could post the links (updated) to the srpm and spec files as per standard fedora review process,
we can run the fedora-review tool to see if there are any issues.
Thank you.

Comment 7 afreof 2023-11-14 12:47:52 UTC
Are the links to copr https://copr.fedorainfracloud.org/coprs/afreof/tpm2-openssl/build/6630731/ and to pagure https://pagure.io/tpm2-openssl not enough?

Comment 8 Anderson Sasaki 2023-11-23 15:31:38 UTC
Hello afreof, could you please add the info in a new comment in the format Jakub requested in comment2? This is to enable the automation tools used for review (fedora-review).

  Spec URL: <spec info here>
  SRPM URL: <srpm info here>
  Description: <description here>
  Fedora Account System Username:

Comment 10 Sahana Prasad 2023-11-24 19:51:56 UTC
Thanks for the links, I'll run the review next week and paste the results.

Comment 11 afreof 2023-11-26 12:07:56 UTC
I can no longer find the links where 2 minor problems were pointed out in a review. One concerns the spdx license identifier and one concerns the description. I just updated the spec file to fix that.

The new build is here: https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-rawhide-x86_64/06695485-tpm2-openssl/ but it doesn't include an RPM for rawhide.
No idea why. Any hints?

Comment 12 afreof 2023-12-01 08:29:45 UTC
Apparently I wasn't patient enough. The packages are now available.

Spec URL: https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-rawhide-x86_64/06695485-tpm2-openssl/tpm2-openssl.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-rawhide-x86_64/06695485-tpm2-openssl/tpm2-openssl-1.2.0-2.fc40.src.rpm
Description: Provider for integration of TPM 2.0 to OpenSSL 3.0
Fedora Account System Username: afreof

Comment 13 Sahana Prasad 2023-12-05 17:31:57 UTC
Hi @afreof, Thanks for the files.

The review looks good, I'm pasting it here.
Only 2 things I think would be nice to have -

1. Make check
2. gpg verify

(look at the lines marked with [!])
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]: 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: "BSD 3-Clause License", "Unknown or generated", "[generated
     file]", "FSF Unlimited License (with License Retention) FSF All
     Permissive License [generated file]", "*No copyright* BSD 3-Clause
     License", "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)". 25 files have unknown license.
     Detailed output of licensecheck in
     /home/sprasad/workspace/2144589-tpm2-openssl/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.
[-]: 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 71680 bytes in 13 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.
[!]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[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]: 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: tpm2-openssl-1.2.0-2.fc38.x86_64.rpm
          tpm2-openssl-debuginfo-1.2.0-2.fc38.x86_64.rpm
          tpm2-openssl-debugsource-1.2.0-2.fc38.x86_64.rpm
          tpm2-openssl-1.2.0-2.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/tmpx7fzb1q5')]
checks: 31, packages: 4

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




Rpmlint (debuginfo)
-------------------
Checking: tpm2-openssl-debuginfo-1.2.0-2.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/tmpvu8f7kj4')]
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.4 s 



Unversioned so-files
--------------------
tpm2-openssl: /usr/lib64/ossl-modules/tpm2.so

Source checksums
----------------
https://github.com/tpm2-software/tpm2-openssl/releases/download/1.2.0/tpm2-openssl-1.2.0.tar.gz :
  CHECKSUM(SHA256) this package     : 2ee15da2dceae1466ffba868e75a00b119d752babc1b6a2792286336a3324fb0
  CHECKSUM(SHA256) upstream package : 2ee15da2dceae1466ffba868e75a00b119d752babc1b6a2792286336a3324fb0


Requires
--------
tpm2-openssl (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    libtss2-esys.so.0()(64bit)
    libtss2-rc.so.0()(64bit)
    libtss2-tctildr.so.0()(64bit)
    rtld(GNU_HASH)
    tpm2-abrmd

tpm2-openssl-debuginfo (rpmlib, GLIBC filtered):

tpm2-openssl-debugsource (rpmlib, GLIBC filtered):



Provides
--------
tpm2-openssl:
    tpm2-openssl
    tpm2-openssl(x86-64)

tpm2-openssl-debuginfo:
    debuginfo(build-id)
    tpm2-openssl-debuginfo
    tpm2-openssl-debuginfo(x86-64)

tpm2-openssl-debugsource:
    tpm2-openssl-debugsource
    tpm2-openssl-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 2144589
Buildroot used: fedora-38-x86_64
Active plugins: Shell-api, Generic, C/C++
Disabled plugins: Java, fonts, Python, Haskell, Perl, PHP, SugarActivity, Ocaml, R
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 14 Sahana Prasad 2023-12-13 13:29:12 UTC
@adrian.freihofer Hi Adrian, for osme reason you were not tagged in the previous comment. RE-tagging in this comment. Thanks.

Comment 15 afreof 2023-12-13 20:27:15 UTC
Well, I'm already working on the findings. The source code is already verified. Also the test suite https://github.com/tpm2-software/tpm2-openssl/blob/master/test/run-with-simulator is integrated. However, there is an issue with openening a tcp ip port on the Fedora build servers: https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-rawhide-x86_64/06735558-tpm2-openssl/builder-live.log.gz.

Probably switching from tcp sockets to unix sockets will solve this issue. Building the rpms locally works without any issues also with tcp sockets.

Comment 16 Sahana Prasad 2023-12-14 21:56:38 UTC
Great, I can approve the package already then. You can look at the issue in Fedora build servers later.
The think the package is good to go!
Thank you!

Comment 17 Sahana Prasad 2024-02-07 17:36:32 UTC
Hi @adrian.freihofer Just a note that I've approved this package review and considered it done in December.
Please feel free to build it and add it into rawhide.

Thank you!

Comment 19 Sahana Prasad 2024-03-04 18:09:40 UTC
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]: 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: "BSD 3-Clause License", "Unknown or generated", "[generated
     file]", "FSF Unlimited License (with License Retention) FSF All
     Permissive License [generated file]", "*No copyright* BSD 3-Clause
     License", "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)". 25 files have unknown license.
     Detailed output of licensecheck in
     /home/sprasad/2144589-tpm2-openssl/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.
[-]: 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.
[-]: Only use %_sourcedir in very specific situations.
     Note: %_sourcedir/$RPM_SOURCE_DIR is used.
[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 71680 bytes in 13 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]: 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.
     Note: gpgverify is not used.
[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]: 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: 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.
[x]: Package should not use obsolete m4 macros
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: tpm2-openssl-1.2.0-4.fc38.x86_64.rpm
          tpm2-openssl-debuginfo-1.2.0-4.fc38.x86_64.rpm
          tpm2-openssl-debugsource-1.2.0-4.fc38.x86_64.rpm
          tpm2-openssl-1.2.0-4.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/tmpg_jswc7e')]
checks: 31, packages: 4

tpm2-openssl.src: W: no-version-in-last-changelog
tpm2-openssl.x86_64: W: no-version-in-last-changelog
tpm2-openssl-debuginfo.x86_64: W: no-version-in-last-changelog
tpm2-openssl-debugsource.x86_64: W: no-version-in-last-changelog
tpm2-openssl.spec:43: W: macro-in-comment %check
tpm2-openssl.spec:44: W: macro-in-comment %{_sourcedir}
tpm2-openssl.spec:44: W: macro-in-comment %{_builddir}
tpm2-openssl.spec:44: W: macro-in-comment %{name}
tpm2-openssl.spec:44: W: macro-in-comment %{version}
tpm2-openssl.spec:44: W: macro-in-comment %{candidate}
=========================================== 4 packages and 0 specfiles checked; 0 errors, 10 warnings, 0 badness; has taken 1.4 s ===========================================




Rpmlint (debuginfo)
-------------------
Checking: tpm2-openssl-debuginfo-1.2.0-4.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/tmpyhsb3o6q')]
checks: 31, packages: 1

tpm2-openssl-debuginfo.x86_64: W: no-version-in-last-changelog
============================================ 1 packages and 0 specfiles checked; 0 errors, 1 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

tpm2-openssl-debuginfo.x86_64: W: no-version-in-last-changelog
tpm2-openssl-debugsource.x86_64: W: no-version-in-last-changelog
tpm2-openssl.x86_64: W: no-version-in-last-changelog
 3 packages and 0 specfiles checked; 0 errors, 3 warnings, 0 badness; has taken 0.3 s 



Unversioned so-files
--------------------
tpm2-openssl: /usr/lib64/ossl-modules/tpm2.so

Source checksums
----------------
https://github.com/tpm2-software/tpm2-openssl/releases/download/1.2.0/tpm2-openssl-1.2.0.tar.gz.asc :
  CHECKSUM(SHA256) this package     : cd5b0ac19be68611882d5d78f23507b6ea5111b77773014330e8c1e75259722b
  CHECKSUM(SHA256) upstream package : cd5b0ac19be68611882d5d78f23507b6ea5111b77773014330e8c1e75259722b
https://github.com/tpm2-software/tpm2-openssl/releases/download/1.2.0/tpm2-openssl-1.2.0.tar.gz :
  CHECKSUM(SHA256) this package     : 2ee15da2dceae1466ffba868e75a00b119d752babc1b6a2792286336a3324fb0
  CHECKSUM(SHA256) upstream package : 2ee15da2dceae1466ffba868e75a00b119d752babc1b6a2792286336a3324fb0


Requires
--------
tpm2-openssl (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    libtss2-esys.so.0()(64bit)
    libtss2-rc.so.0()(64bit)
    libtss2-tctildr.so.0()(64bit)
    rtld(GNU_HASH)
    tpm2-abrmd

tpm2-openssl-debuginfo (rpmlib, GLIBC filtered):

tpm2-openssl-debugsource (rpmlib, GLIBC filtered):



Provides
--------
tpm2-openssl:
    tpm2-openssl
    tpm2-openssl(x86-64)

tpm2-openssl-debuginfo:
    debuginfo(build-id)
    tpm2-openssl-debuginfo
    tpm2-openssl-debuginfo(x86-64)

tpm2-openssl-debugsource:
    tpm2-openssl-debugsource
    tpm2-openssl-debugsource(x86-64)

Comment 20 Sahana Prasad 2024-03-04 18:10:48 UTC
The review has passed with the above result.
@adrian.freihofer You can go ahead and build the package and bring it to fedora now!
Thank you.

Comment 21 afreof 2024-03-18 08:21:56 UTC
Not sure how to proceed here. The missing part is still: [!]: %check is present and all tests pass. But I do not understand how the build servers would allow me to run the tests which require something link this:

swtpm socket --tpm2 --server port=2321 --ctrl type=tcp,port=2322 --flags not-need-init --tpmstate dir="$PWD" &
make check

Here is the full test suite: https://github.com/tpm2-software/tpm2-openssl/blob/master/test/run-with-simulator which works fine for example in a rawhide container, but fails on the copr build servers.

Any idea?

Comment 22 Dmitry Belyavskiy 2024-03-19 14:58:13 UTC
Could you please share a link to the Copr build so I could take a look?

Comment 23 afreof 2024-03-19 21:10:27 UTC
Copr cleaned all the builds. I pushed a new one, with tests enabled. From https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-40-x86_64/07183834-tpm2-openssl/builder-live.log.gz

Skipping the build
---> starting dbus daemon
---> starting swtpm simulator
Error: Port conflict? Cleaning up PID: 2591
Starting tpm2 simulator failed (swtpm)
error: 
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.p78edt (%check)
    Bad exit status from /var/tmp/rpm-tmp.p78edt (%check)


Thank you for having a look at that.

Comment 24 Dmitry Belyavskiy 2024-03-20 15:52:05 UTC
Created attachment 2022721 [details]
WFM for Copr build

Comment 25 Dmitry Belyavskiy 2024-03-20 15:53:28 UTC
You need to specify tpm2-abrmd, tpm2-abrmd-selinux, and iproute as BuildRequires.
See the attached spec

https://copr.fedorainfracloud.org/coprs/dbelyavs/tpm2-provider/build/7188151/ is my Copr build

Comment 26 afreof 2024-03-21 07:07:36 UTC
Thank you Dmitry. Now we have a successful build with tests running: https://download.copr.fedorainfracloud.org/results/afreof/tpm2-openssl/fedora-rawhide-x86_64/07189085-tpm2-openssl/builder-live.log.gz. What's the next step now?

Comment 27 Dmitry Belyavskiy 2024-03-21 08:10:51 UTC
Some of us should approve this package (change the status of the bug to APPROVED). The next steps are:

Assuming you are a new contributor, this link: https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_New_Contributors/

If you already contributed, please follow the https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_Existing_Contributors/ process

Comment 28 Sahana Prasad 2024-03-21 08:30:15 UTC
Next steps for the contributor should be followed from here:
https://docs.fedoraproject.org/en-US/package-maintainers/Package_Review_Process/

(fedora-review flag is set to +, the package review is successful)

Comment 29 Dmitry Belyavskiy 2024-03-21 08:31:46 UTC
We can sponsor your membership in the packager groups if necessary

Comment 30 afreof 2024-03-21 22:20:07 UTC
Opened an issue here: https://pagure.io/packager-sponsors/issue/639

Comment 31 Peter Robinson 2024-03-21 22:31:22 UTC
Happy to sponsor, I'm also the maintainer of the tpm2 stack.

Comment 32 afreof 2024-03-22 09:02:45 UTC
Thank you Peter.

When requesting for a git repository for this new package, I'm running into this:

fedpkg request-repo  tpm2-openssl 2144589
Could not execute request_repo: The Bugzilla bug's review was approved over 60 days ago

Comment 33 Dmitry Belyavskiy 2024-03-22 09:09:29 UTC
Could you please try it now? I switched the flag off and back on

Comment 34 afreof 2024-03-22 09:49:24 UTC
Looks better, but now we have the next detail:

fedpkg request-repo  tpm2-openssl 2144589
Could not execute request_repo: Invalid title for this Bugzilla bug (no "-" present)

Comment 35 Peter Robinson 2024-03-22 09:51:23 UTC
(In reply to afreof from comment #34)
> Looks better, but now we have the next detail:
> 
> fedpkg request-repo  tpm2-openssl 2144589
> Could not execute request_repo: Invalid title for this Bugzilla bug (no "-"
> present)

Should be fixes, the script is quite particular :)

Comment 36 afreof 2024-03-22 10:20:19 UTC
Thank you. Here is the request: https://pagure.io/releng/fedora-scm-requests/issue/61104

Comment 37 David Woodhouse 2024-03-22 10:29:27 UTC
(In reply to Grant Williamson from comment #0)
> Makes the TPM 2.0 accessible via the standard OpenSSL API and command-line
> tools, so one can add TPM support to (almost) any  OpenSSL 3.0 based
> application.

So if I use (almost) any existing OpenSSL based application in Fedora, and in place of a "normal" key file I just happen to pass it a PEM file starting

 ----- BEGIN TSS2 PRIVATE KEY-----

according to the specification at https://www.hansenpartnership.com/draft-bottomley-tpm2-keys.html

I should expect that to work, right? Nothing *extra* to do for any normal application?

Comment 38 Dmitry Belyavskiy 2024-03-22 10:31:39 UTC
(In reply to afreof from comment #36)
> Thank you. Here is the request:
> https://pagure.io/releng/fedora-scm-requests/issue/61104

Looks like you still have to tune your account: https://docs.fedoraproject.org/en-US/package-maintainers/New_Package_Process_for_New_Contributors/#add_package_to_source_code_management_scm_system_and_set_owner the 1st sentence

Comment 39 afreof 2024-03-22 10:57:57 UTC
After checking everything again, I think it is not an issue with my account. The bot is angry because of:

The Bugzilla review bug creator could not be found in FAS. Make sure your FAS email address is the same as in Bugzilla.

The issue is probably related to the setting of this bug: "Reported: 2022-11-21 19:13 UTC by Grant Williamson". Grant probably does not have a FAS account (anymore?). Can we change the "reported" flag? Or do we need a new bug reported by someone with an account? Or is my guess not plausible?

Comment 40 Dmitry Belyavskiy 2024-03-22 11:49:02 UTC
I'm afraid creating a new bug by you will be the easiest path

Comment 41 afreof 2024-03-22 12:05:09 UTC
Closing this bug in favor of https://bugzilla.redhat.com/show_bug.cgi?id=2271055


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