Bug 1892248 - build fails against NSS 3.58
Summary: build fails against NSS 3.58
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nss
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Alex Scheel
QA Contact: Fedora Extras Quality Assurance
: 1899142 (view as bug list)
Depends On:
Blocks: F34FTBFS PYTHON3.10
TreeView+ depends on / blocked
Reported: 2020-10-28 09:56 UTC by Stanislav Levin
Modified: 2020-12-07 18:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-12-07 18:29:16 UTC
Type: Bug

Attachments (Terms of Use)

Description Stanislav Levin 2020-10-28 09:56:06 UTC
With the recent NSS 3.58:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -
pipe -frecord-gcc-switches -Wall -g -O3 -pipe -frecord-gcc-switches -Wall -g -O2 -fno-strict-al
iasing -fPIC -Isrc -I/usr/include/nss -I/usr/include/nspr -I/usr/include/python3.8 -c src/py_ns
s.c -o build/temp.linux-x86_64-3.8/src/py_nss.o -O0 -g
In file included from src/py_nss.c:341:
src/py_nss.h:126:3: error: conflicting types for ‘RSAPublicKey’
  126 | } RSAPublicKey;
      |   ^~~~~~~~~~~~
In file included from /usr/include/nss/pk11hpke.h:8,
                 from /usr/include/nss/pk11pub.h:12,
                 from src/py_nss.h:23,
                 from src/py_nss.c:341:
/usr/include/nss/blapit.h:281:32: note: previous declaration of ‘RSAPublicKey’ was here
  281 | typedef struct RSAPublicKeyStr RSAPublicKey;
      |                                ^~~~~~~~~~~~
In file included from src/py_nss.c:341:
src/py_nss.h:136:3: error: conflicting types for ‘DSAPublicKey’
  136 | } DSAPublicKey;
      |   ^~~~~~~~~~~~
In file included from /usr/include/nss/pk11hpke.h:8,
                 from /usr/include/nss/pk11pub.h:12,
                 from src/py_nss.h:23,
                 from src/py_nss.c:341:
/usr/include/nss/blapit.h:323:32: note: previous declaration of ‘DSAPublicKey’ was here
  323 | typedef struct DSAPublicKeyStr DSAPublicKey;
      |                                ^~~~~~~~~~~~


Comment 1 Miro Hrončok 2020-11-18 15:55:53 UTC
*** Bug 1899142 has been marked as a duplicate of this bug. ***

Comment 2 Miro Hrončok 2020-11-18 16:06:14 UTC
At this point, I would needinfo the package maintainer, but it is not possible here.

Comment 3 Miro Hrončok 2020-11-21 11:00:20 UTC
This blocks the Python 3.10 rebuild of pki-core.

 Problem: package python3-nss-1.0.1-20.fc33.x86_64 requires python(abi) = 3.9, but none of the providers can be installed
  - package python3-devel-3.10.0~a2-1.fc34.x86_64 conflicts with python3 < 3.10.0~a2-1.fc34 provided by python3-3.9.0-1.fc34.i686
  - cannot install both python3-3.9.0-1.fc34.x86_64 and python3-3.10.0~a2-1.fc34.x86_64
  - cannot install the best candidate for the job

For all our attempts to build python-nss with Python 3.10, see:

For all our attempts to build pki-core with Python 3.10, see:

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.


Comment 4 Alex Scheel 2020-12-04 22:07:36 UTC
I've checked this into dist-git, but did not build it. Miro reported on IRC that this rebuilds fine in the 3.10 COPR; I'll let the 3.10 mass rebuild take care of building.

I've not backported this to earlier releases yet, despite them also being affected due to newer NSS. 

(Note: failure was caused by newer NSS, not Python 3.10).

Comment 5 Stanislav Levin 2020-12-07 10:58:13 UTC
ascheel@, thank you for the patch [0].

This change rename Python classes (actually exposed from Python NSS) RSAPublicKey -> PyRSAPublicKey and DSAPublicKey -> PyDSAPublicKey:

188 -    "nss.nss.RSAPublicKey",                    /* tp_name */                   
189 -    sizeof(RSAPublicKey),                      /* tp_basicsize */              
190 +    "nss.nss.PyRSAPublicKey",                  /* tp_name */                   
191 +    sizeof(PyRSAPublicKey),                    /* tp_basicsize */

417 -    "nss.nss.DSAPublicKey",                    /* tp_name */                   
418 -    sizeof(DSAPublicKey),                      /* tp_basicsize */              
419 +    "nss.nss.PyDSAPublicKey",                  /* tp_name */                   
420 +    sizeof(PyDSAPublicKey),                    /* tp_basicsize */

I think that was the unintentional rename, because breaks old clients.

[0]: https://src.fedoraproject.org/rpms/python-nss/blob/master/f/0001-Rename-DSA-RSA-PublicKey-to-Py-DSA-RSA-PublicKey.patch

Comment 6 Alex Scheel 2020-12-07 18:29:16 UTC
Thanks Stanislav for the review. Dogtag doesn't use RSAPublicKey/DSAPublicKey at all so I missed that. 

IIRC the sizeof needs to stay; it is just the name that needs to change. 

I've pushed this as a modification to the original patch and it should now build correctly in Fedora. I've also rebuilt rawhide now, so marking this as fixed.

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