Bug 2319750 - tpm2-pkcs11 fails to build with setuptools 74+
Summary: tpm2-pkcs11 fails to build with setuptools 74+
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tpm2-pkcs11
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SETUPTOOLS74
TreeView+ depends on / blocked
 
Reported: 2024-10-18 10:16 UTC by Miro Hrončok
Modified: 2024-10-29 12:35 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-10-29 12:23:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2024-10-18 10:16:21 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.

It appears that your package failed to build with setuptools 74.1.3 and wheel 0.44 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-74/package/tpm2-pkcs11/

While it succeeded with setuptools 69.2.0 and wheel 0.43 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-control/package/tpm2-pkcs11/

This usually means this package fails to build with setuptools 74+

We plan to update setuptools to version 74 or newer in Fedora 42. This is an approved Fedora 42 Change:

  https://fedoraproject.org/wiki/Changes/Setuptools_74+



Please analyze the failure and fix it in rawhide. Thanks.


You can use the builds from the churchyard/setuptools-74 copr for local testing.

  mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-$basearch/'


One of the most common problems is that the setup.py test command cannot be used. If that is the case here, run the tests in %check differently, e.g. via %pytest, %tox, %{python3} -m unittest, etc.


If you need help, reach out to me in this bugzilla.

Comment 1 Miro Hrončok 2024-10-29 10:58:39 UTC
I plan to update setuptools to 74.x in rawhide this week.

At that point, this package will fail to build from source if not fixed.

Comment 2 Jakub Jelen 2024-10-29 12:11:29 UTC
If I see right, the only issue is the following:

/usr/lib/python3.13/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'

I will test it works as expected and if so, I will push an update later today.

Comment 3 Jakub Jelen 2024-10-29 12:14:57 UTC
No, its the issue of running

/usr/bin/python3 setup.py test

but if I run it locally with old version, I see no tests run anyway, so I will just go ahead and remove that test execution:

NO TESTS RAN

Comment 4 Miro Hrončok 2024-10-29 12:18:46 UTC
Perhaps take it as an opportunity to actually run some tests during the build. If there are no tests upstream, consider at least running an import check.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests

For the purposes of this bug, deleting the %check section will do, but it's not "nice" :)

Comment 5 Jakub Jelen 2024-10-29 12:23:25 UTC
I was probably not clear enough. The `make check` runs, but the invocation from that specific directory did not run any tests.

This is the transcript of the rerun I did locally with your repo:
```
$ mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-x86_64' --rebuild /home/jjelen/devel/fedora/tpm2-pkcs11/tpm2-pkcs11-1.9.1-1.fc42.src.rpm
[...]
+ make check
make   test/unit/test_twist test/unit/test_log test/unit/test_parser test/unit/test_attr test/unit/test_db test/unit/test_utils  
make[1]: Entering directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
  CC       test/unit/test_twist-test_twist.o
  CCLD     test/unit/test_twist
  CC       test/unit/test_log-test_log.o
  CCLD     test/unit/test_log
  CC       test/unit/test_parser-test_parser.o
  CCLD     test/unit/test_parser
  CC       test/unit/test_attr-test_attr.o
  CCLD     test/unit/test_attr
  CC       test/unit/test_db-test_db.o
  CCLD     test/unit/test_db
  CC       test/unit/test_utils-test_utils.o
  CCLD     test/unit/test_utils
make[1]: Leaving directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
make  check-TESTS
make[1]: Entering directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
make[2]: Entering directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
PASS: test/unit/test_twist
PASS: test/unit/test_log
PASS: test/unit/test_parser
PASS: test/unit/test_attr
PASS: test/unit/test_db
PASS: test/unit/test_utils
============================================================================
Testsuite summary for tpm2-pkcs11 1.9.1
============================================================================
# TOTAL: 6
# PASS:  6
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[2]: Leaving directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
make[1]: Leaving directory '/builddir/build/BUILD/tpm2-pkcs11-1.9.1-build/tpm2-pkcs11-1.9.1'
```
I pushed the changes in rawhide:

https://src.fedoraproject.org/rpms/tpm2-pkcs11/c/a9819573e5f9f4b92141c43206df51394333fcce?branch=rawhide

I assume we do not need a new build as I expect mass rebuild. If I am wrong, please let me know and I will rebuild.

Comment 6 Miro Hrončok 2024-10-29 12:35:24 UTC
A new build is not needed unless you care about https://koschei.fedoraproject.org/package/tpm2-pkcs11 results.


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