Skip to content

Commit

Permalink
Downgrade NSS dependency
Browse files Browse the repository at this point in the history
The NSS dependency has been temporarily downgraded to
avoid intermittent CI failures reported in this ticket:
dogtagpki#781

Additional dependencies to NSS subpackages have been
added to avoid conflicts. The PKCS11Constants tests
have been temporarily disabled as well.
  • Loading branch information
edewata committed Jul 9, 2021
1 parent 081c6de commit fe255d7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WORKDIR /tmp/src

# Build packages
RUN dnf install -y git rpm-build
RUN dnf --showduplicates list nss
RUN dnf builddep -y --spec jss.spec
RUN ./build.sh $BUILD_OPTS --work-dir=../build rpm

Expand Down
16 changes: 13 additions & 3 deletions jss.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ Source: https://github.com/dogtagpki/%{name}/archive/v%{version}%{?_phas
# > jss-VERSION-RELEASE.patch
# Patch: jss-VERSION-RELEASE.patch

################################################################################
# NSS
################################################################################

%define min_nss_version 3.44.0
%define max_nss_version 3.66.0

################################################################################
# Java
################################################################################
Expand Down Expand Up @@ -55,8 +62,9 @@ BuildRequires: zip
BuildRequires: unzip

BuildRequires: gcc-c++
BuildRequires: nss-devel >= 3.66
BuildRequires: nss-tools >= 3.66
BuildRequires: nss-devel >= %{min_nss_version}, nss-devel < %{max_nss_version}
BuildRequires: nss-util-devel >= %{nss_version}, nss-util-devel < %{max_nss_version}
BuildRequires: nss-tools >= %{min_nss_version}, nss-tools < %{max_nss_version}
BuildRequires: %{java_devel}
BuildRequires: jpackage-utils
BuildRequires: slf4j
Expand All @@ -66,7 +74,9 @@ BuildRequires: apache-commons-lang3

BuildRequires: junit

Requires: nss >= 3.66
Requires: nss >= %{min_nss_version}, nss < %{max_nss_version}
Requires: nss-util >= %{min_nss_version}, nss-util < %{max_nss_version}
Requires: nss-tools >= %{min_nss_version}, nss-tools < %{max_nss_version}
Requires: %{java_headless}
Requires: jpackage-utils
Requires: slf4j
Expand Down
6 changes: 4 additions & 2 deletions tools/Dockerfiles/fedora_33
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ CMD true \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants-py2.java \
--verbose \
&& diff PKCS11Constants-py2.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java \
&& echo "############################################################" \
&& echo "## Generating PKCS #11 constants with Python 3" \
&& python3 ./tools/build_pkcs11_constants.py -s \
--pkcs11t /usr/include/nss3/pkcs11t.h \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants-py3.java \
--verbose \
&& diff PKCS11Constants-py3.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java \
&& true

# Disable PKCS11Constants tests due to temporary NSS downgrade
# && diff PKCS11Constants-py2.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java
# && diff PKCS11Constants-py3.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java
6 changes: 4 additions & 2 deletions tools/Dockerfiles/fedora_34
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ CMD true \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants-py2.java \
--verbose \
&& diff PKCS11Constants-py2.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java \
&& echo "############################################################" \
&& echo "## Generating PKCS #11 constants with Python 3" \
&& python3 ./tools/build_pkcs11_constants.py -s \
--pkcs11t /usr/include/nss3/pkcs11t.h \
--pkcs11n /usr/include/nss3/pkcs11n.h \
-o PKCS11Constants-py3.java \
--verbose \
&& diff PKCS11Constants-py3.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java \
&& true

# Disable PKCS11Constants tests due to temporary NSS downgrade
# && diff PKCS11Constants-py2.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java
# && diff PKCS11Constants-py3.java src/main/java/org/mozilla/jss/pkcs11/PKCS11Constants.java

0 comments on commit fe255d7

Please sign in to comment.