[bouncycastle-mail/epel7] add bcpkix suppport

Jochen Schmitt s4504kr at fedoraproject.org
Sat Mar 8 08:08:08 UTC 2014


commit 536e40176a640a027a5e891bbe7541fcab602566
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Sat Mar 8 09:07:51 2014 +0100

    add bcpkix suppport

 bcmail-jdk16-1.46.pom  |   29 -------------
 bouncycastle-mail.spec |  107 ++++++++++++++++++++++++++++--------------------
 create-tarball.sh      |   33 +++++++++++++++
 sources                |    3 +-
 4 files changed, 98 insertions(+), 74 deletions(-)
---
diff --git a/bouncycastle-mail.spec b/bouncycastle-mail.spec
index 1769330..ab1c18b 100644
--- a/bouncycastle-mail.spec
+++ b/bouncycastle-mail.spec
@@ -1,30 +1,27 @@
-%global ver  1.46
-%global archivever  jdk16-%(echo %{ver}|sed 's|\\\.||')
+%global ver  1.50
+%global archivever  jdk15on-%(echo %{ver}|sed 's|\\\.||')
 
 Summary:          S/MIME and CMS libraries for Bouncy Castle
 Name:             bouncycastle-mail
 Version:          %{ver}
-Release:          7%{?dist}
-Group:            System Environment/Libraries
+Release:          3%{?dist}
 License:          MIT
 URL:              http://www.bouncycastle.org/
 Source0:          http://www.bouncycastle.org/download/bcmail-%{archivever}.tar.gz
-Source1:          http://repo2.maven.org/maven2/org/bouncycastle/bcmail-jdk16/%{version}/bcmail-jdk16-%{version}.pom
-Requires:         bouncycastle == %{version}
-Requires:         bouncycastle >= 1.46-5
-BuildRequires:    jpackage-utils >= 1.5
-Requires:         jpackage-utils >= 1.5
-Requires(post):   jpackage-utils >= 1.7
-Requires(postun): jpackage-utils >= 1.7
+Source1:          http://repo2.maven.org/maven2/org/bouncycastle/bcmail-jdk15on/%{version}/bcmail-jdk15on-%{version}.pom
+
 BuildArch:        noarch
-BuildRequires:    bouncycastle == %{version}
-BuildRequires:    bouncycastle >= 1.46-5
+BuildRequires:    bouncycastle = %{version}
+BuildRequires:    bouncycastle-pkix = %{version}
 BuildRequires:    java-devel >= 1.7
-Requires:         java >= 1.7
 BuildRequires:    javamail
+BuildRequires:    javapackages-tools
+BuildRequires:    junit
+Requires:         bouncycastle = %{version}
+Requires:         bouncycastle-pkix = %{version}
+Requires:         java-headless >= 1.7
 Requires:         javamail
-BuildRequires:    junit4
-
+Requires:         javapackages-tools
 Provides:         bcmail = %{version}-%{release}
 
 %description
@@ -35,10 +32,7 @@ generators/processors for S/MIME and CMS, for Bouncy Castle.
 
 %package javadoc
 Summary:        Javadoc for %{name}
-Group:          Documentation
-BuildArch:      noarch
 Requires:       %{name} = %{version}-%{release}
-Requires:       jpackage-utils
 
 %description javadoc
 API documentation for the %{name} package.
@@ -47,15 +41,27 @@ API documentation for the %{name} package.
 %setup -q -n bcmail-%{archivever}
 mkdir src
 unzip -qq src.zip -d src/
-# Remove provided binaries
-find . -type f -name "*.class" -exec rm -f {} \;
-find . -type f -name "*.jar" -exec rm -f {} \;
+
+find . -type f -name "*.class" -delete
+find . -type f -name "*.jar" -delete
+
+# too many "IOException: Stream closed" failures
+rm -f src/org/bouncycastle/mail/smime/test/AllTests.java
+
+# package org.bouncycastle.cms.test does not exist
+rm -f src/org/bouncycastle/mail/smime/test/NewSMIMEEnvelopedTest.java
+rm -f src/org/bouncycastle/mail/smime/test/NewSMIMESignedTest.java
+rm -f src/org/bouncycastle/mail/smime/test/SMIMECompressedTest.java
+rm -f src/org/bouncycastle/mail/smime/test/SMIMEMiscTest.java
+rm -f src/org/bouncycastle/mail/smime/test/SignedMailValidatorTest.java
+
+cp %{SOURCE1} pom.xml
 
 %build
 pushd src
-  export CLASSPATH=$(build-classpath junit4 bcprov javamail)
+  export CLASSPATH=$(build-classpath junit bcprov bcpkix javamail)
   %javac -g -source 1.6 -target 1.6 -encoding UTF-8 $(find . -type f -name "*.java")
-  jarfile="../bcmail-%{version}.jar"
+  jarfile="../bcmail.jar"
   # Exclude all */test/* , cf. upstream
   files="$(find . -type f \( -name '*.class' -o -name '*.properties' \) -not -path '*/test/*')"
   test ! -d classes && mf="" \
@@ -67,14 +73,12 @@ popd
 %install
 # install bouncy castle mail
 install -dm 755 $RPM_BUILD_ROOT%{_javadir}
-install -pm 644 bcmail-%{version}.jar \
-  $RPM_BUILD_ROOT%{_javadir}/bcmail-%{version}.jar
-pushd $RPM_BUILD_ROOT%{_javadir}
-  ln -sf bcmail-%{version}.jar bcmail.jar
-popd
+install -pm 644 bcmail.jar \
+  $RPM_BUILD_ROOT%{_javadir}/bcmail.jar
+
 install -dm 755 $RPM_BUILD_ROOT%{_javadir}/gcj-endorsed
 pushd $RPM_BUILD_ROOT%{_javadir}/gcj-endorsed
-  ln -sf ../bcmail-%{version}.jar bcmail-%{version}.jar
+  ln -sf ../bcmail.jar bcmail.jar
 popd
 
 # javadoc
@@ -83,30 +87,22 @@ cp -pr docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
 # maven pom
 install -dm 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-bcmail.pom
-%add_to_maven_depmap org.bouncycastle bcmail-jdk16 %{version} JPP bcmail
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-bcmail.pom
+%add_maven_depmap -a "org.bouncycastle:bcmail-jdk16" JPP-bcmail.pom bcmail.jar
 
 %check
 pushd src
-  export CLASSPATH=$PWD:$(build-classpath junit4 javamail bcprov)
+  export CLASSPATH=$PWD:$(build-classpath junit javamail bcprov bcpkix)
   for test in $(find . -name AllTests.class) ; do
     test=${test#./} ; test=${test%.class} ; test=${test//\//.}
-    # TODO: failures; get them fixed and remove || :
-    %java org.junit.runner.JUnitCore $test || :
+    %java org.junit.runner.JUnitCore $test
   done
 popd
 
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
 %files
 %doc *.html
 %{_javadir}/bcmail.jar
-%{_javadir}/bcmail-%{version}.jar
-%{_javadir}/gcj-endorsed/bcmail-%{version}.jar
+%{_javadir}/gcj-endorsed/bcmail.jar
 %{_mavenpomdir}/JPP-bcmail.pom
 %{_mavendepmapfragdir}/%{name}
 
@@ -114,6 +110,29 @@ popd
 %{_javadocdir}/%{name}
 
 %changelog
+* Tue Mar 04 2014 gil cattaneo <puntogil at libero.it> 1.50-3
+- add bcpkix suppport
+
+* Tue Feb 25 2014 Michal Srb <msrb at redhat.com> - 1.50-2
+- Remove unavailable dep from pom.xml
+
+* Mon Feb 24 2014 Michal Srb <msrb at redhat.com> - 1.50-1
+- Update to upstream version 1.50
+- Switch to java-headless (Resolves: rhbz#1067986)
+- Enable (some) tests
+
+* Tue Oct 22 2013 gil cattaneo <puntogil at libero.it> 1.46-11
+- remove versioned Jars
+
+* Mon Aug 12 2013 gil cattaneo <puntogil at libero.it> 1.46-10
+- rebuilt rhbz#995893
+
+* Mon Aug 05 2013 gil cattaneo <puntogil at libero.it> 1.46-9
+- rebuilt rhbz#992027
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.46-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.46-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
@@ -160,7 +179,7 @@ popd
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.43-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
-* Tue Jul 13 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-2
+* Mon Jul 13 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-2
 - Re-enable AOT bits thanks to Andrew Haley.
 
 * Mon Apr 20 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.43-1
diff --git a/create-tarball.sh b/create-tarball.sh
new file mode 100644
index 0000000..7307087
--- /dev/null
+++ b/create-tarball.sh
@@ -0,0 +1,33 @@
+#!/bin/bash -e
+
+version=`rpmspec -P *.spec | sed -n 's/^Version:\s*\(.*\)\s*/\1/p'`
+dotlessver=`echo $version | sed 's/\.//'`
+echo "version: $version"
+
+
+wget http://www.bouncycastle.org/download/bcmail-jdk15on-${dotlessver}.tar.gz
+# upstream is moving classes back and forth...
+wget https://www.bouncycastle.org/download/bcpkix-jdk15on-${dotlessver}.tar.gz
+
+tar xvf bcpkix-jdk15on-${dotlessver}.tar.gz
+pushd bcpkix-jdk15on-${dotlessver}
+mkdir src
+unzip -qq src.zip -d src/
+popd
+
+tar xvf bcmail-jdk15on-${dotlessver}.tar.gz
+pushd bcmail-jdk15on-${dotlessver}
+mkdir src
+unzip -qq src.zip -d src/
+cp -r ../bcpkix-jdk15on-${dotlessver}/src/org/bouncycastle/{cert,cms,operator,pkcs,openssl} \
+    src/org/bouncycastle/
+# Remove provided binaries
+find . -type f -name "*.class" -exec rm -f {} \;
+find . -type f -name "*.jar" -exec rm -f {} \;
+rm src.zip
+popd
+
+rm -Rf bcpkix-jdk15on-${dotlessver}
+rm -f bcpkix-jdk15on-${dotlessver}.tar.gz bcmail-jdk15on-${dotlessver}.tar.gz
+
+tar czvf bcmail-jdk15on-${dotlessver}.tar.gz bcmail-jdk15on-${dotlessver}
diff --git a/sources b/sources
index 4fc52c7..35dae85 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-d7c84370119dcec7b8f01a484e9a26fc  bcmail-jdk16-146.tar.gz
+c4dad8c7e032bd6c5430f9bc9609e412  bcmail-jdk15on-150.tar.gz
+8fa5f1ead5e52de043c900ee14b8e769  bcmail-jdk15on-1.50.pom


More information about the scm-commits mailing list