rpms/bouncycastle/devel .cvsignore, 1.3, 1.4 bouncycastle.spec, 1.4, 1.5 sources, 1.3, 1.4
Thomas Fitzsimmons (fitzsim)
fedora-extras-commits at redhat.com
Thu Nov 29 22:47:06 UTC 2007
Author: fitzsim
Update of /cvs/pkgs/rpms/bouncycastle/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2363
Modified Files:
.cvsignore bouncycastle.spec sources
Log Message:
* Thu Nov 29 2007 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.38-1
- Import Bouncy Castle 1.38.
- Require junit4 for build.
- Wrap lines at 80 columns.
- Inline rebuild-security-providers in post and postun sections.
- Related: rhbz#260161
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 12 Dec 2006 20:46:30 -0000 1.3
+++ .cvsignore 29 Nov 2007 22:46:32 -0000 1.4
@@ -1 +1 @@
-bcprov-jdk14-134-FEDORA.tar.gz
+bcprov-jdk16-138-FEDORA.tar.gz
Index: bouncycastle.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle/devel/bouncycastle.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bouncycastle.spec 1 Apr 2007 00:09:10 -0000 1.4
+++ bouncycastle.spec 29 Nov 2007 22:46:33 -0000 1.5
@@ -1,30 +1,30 @@
-%define archivever 134
+%define archivever jdk16-138
+%define classname org.bouncycastle.jce.provider.BouncyCastleProvider
Summary: Bouncy Castle Crypto Package for Java
Name: bouncycastle
-Version: 1.34
-Release: 3%{?dist}
+Version: 1.38
+Release: 1%{?dist}
Group: System Environment/Libraries
License: BSD
URL: http://www.%{name}.org/
-# bcprov-jdk14-134.tar.gz with patented algorithms removed.
-Source0: bcprov-jdk14-134-FEDORA.tar.gz
+# bcprov-%{archivever}.tar.gz with patented algorithms removed.
+Source0: bcprov-%{archivever}-FEDORA.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: jpackage-utils >= 1.5
Requires: java-1.5.0-gcj
-Requires(post): jpackage-utils >= 1.5
-Requires(postun): jpackage-utils >= 1.5
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-devel >= 1.4.0
BuildRequires: jpackage-utils >= 1.5
BuildRequires: java-gcj-compat-devel
+BuildRequires: junit4
%description
The Bouncy Castle JCE provider.
%prep
-%setup -q -n bcprov-jdk14-134
+%setup -q -n bcprov-%{archivever}
# Remove provided binaries
find . -type f -name "*.class" -exec rm -f {} \;
@@ -34,20 +34,21 @@
mkdir src
pushd src
unzip ../src.zip
- find . -type d -name examples | xargs rm -rf
- find . -type d -name test | xargs rm -rf
+ export CLASSPATH=$(build-classpath junit4)
javac `find . -type f -name "*.java"`
jarfile="../bcprov-%{version}.jar"
files="`find . -type f -name "*.class"`"
- test ! -d classes && mf="" || mf="`find classes/ -type f -name "*.mf" 2>/dev/null`"
- test -n "$mf" && jar cvfm $jarfile $mf $files || jar cvf $jarfile $files
+ test ! -d classes && mf="" \
+ || mf="`find classes/ -type f -name "*.mf" 2>/dev/null`"
+ test -n "$mf" && jar cvfm $jarfile $mf $files \
+ || jar cvf $jarfile $files
popd
%install
rm -rf $RPM_BUILD_ROOT
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/java/security/security.d
-touch $RPM_BUILD_ROOT%{_sysconfdir}/java/security/security.d/2000-org.bouncycastle.jce.provider.BouncyCastleProvider
+touch $RPM_BUILD_ROOT%{_sysconfdir}/java/security/security.d/2000-%{classname}
# install bouncy castle provider
install -dm 755 $RPM_BUILD_ROOT%{_javadir}/gcj-endorsed
@@ -63,9 +64,26 @@
%{_bindir}/aot-compile-rpm
%post
-if [ -x %{_bindir}/rebuild-security-providers ]; then
- %{_bindir}/rebuild-security-providers
-fi
+{
+ # Rebuild the list of security providers in classpath.security
+ suffix=security/classpath.security
+ secfiles="/usr/lib/$suffix /usr/lib64/$suffix"
+
+ for secfile in $secfiles
+ do
+ # check if this classpath.security file exists
+ [ -f "$secfile" ] || continue
+
+ sed -i '/^security\.provider\./d' "$secfile"
+
+ count=0
+ for provider in $(ls /etc/java/security/security.d)
+ do
+ count=$((count + 1))
+ echo "security.provider.${count}=${provider#*-}" >> "$secfile"
+ done
+ done
+} || :
if [ -x %{_bindir}/rebuild-gcj-db ]; then
%{_bindir}/rebuild-gcj-db
@@ -74,9 +92,26 @@
%postun
if [ $1 -eq 0 ] ; then
- if [ -x %{_bindir}/rebuild-security-providers ]; then
- %{_bindir}/rebuild-security-providers
- fi
+ {
+ # Rebuild the list of security providers in classpath.security
+ suffix=security/classpath.security
+ secfiles="/usr/lib/$suffix /usr/lib64/$suffix"
+
+ for secfile in $secfiles
+ do
+ # check if this classpath.security file exists
+ [ -f "$secfile" ] || continue
+
+ sed -i '/^security\.provider\./d' "$secfile"
+
+ count=0
+ for provider in $(ls /etc/java/security/security.d)
+ do
+ count=$((count + 1))
+ echo "security.provider.${count}=${provider#*-}" >> "$secfile"
+ done
+ done
+ } || :
if [ -x %{_bindir}/rebuild-gcj-db ]; then
%{_bindir}/rebuild-gcj-db
@@ -93,10 +128,17 @@
%{_javadir}/bcprov.jar
%{_javadir}/bcprov-%{version}.jar
%{_javadir}/gcj-endorsed/bcprov-%{version}.jar
-%{_sysconfdir}/java/security/security.d/2000-org.bouncycastle.jce.provider.BouncyCastleProvider
+%{_sysconfdir}/java/security/security.d/2000-%{classname}
%attr(-,root,root) %{_libdir}/gcj/%{name}
%changelog
+* Thu Nov 29 2007 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.38-1
+- Import Bouncy Castle 1.38.
+- Require junit4 for build.
+- Wrap lines at 80 columns.
+- Inline rebuild-security-providers in post and postun sections.
+- Related: rhbz#260161
+
* Sat Mar 31 2007 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.34-3
- Require java-1.5.0-gcj.
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/bouncycastle/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 12 Dec 2006 20:46:30 -0000 1.3
+++ sources 29 Nov 2007 22:46:33 -0000 1.4
@@ -1 +1 @@
-a12703f06c032ba01bbae8de4ef8b0a5 bcprov-jdk14-134-FEDORA.tar.gz
+489fd3910ab9bc7b7b177168dca6bf1c bcprov-jdk16-138-FEDORA.tar.gz
More information about the fedora-extras-commits
mailing list