rpms/java-1.5.0-gcj/devel java-1.5.0-gcj.spec,1.27,1.28
Thomas Fitzsimmons (fitzsim)
fedora-extras-commits at redhat.com
Mon Jan 21 16:46:09 UTC 2008
Author: fitzsim
Update of /cvs/pkgs/rpms/java-1.5.0-gcj/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30794
Modified Files:
java-1.5.0-gcj.spec
Log Message:
* Mon Jan 21 2008 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.5.0.0-19
- Inline rebuild-security-providers.
- Resolves: rhbz#260161
Index: java-1.5.0-gcj.spec
===================================================================
RCS file: /cvs/pkgs/rpms/java-1.5.0-gcj/devel/java-1.5.0-gcj.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- java-1.5.0-gcj.spec 29 Nov 2007 19:43:42 -0000 1.27
+++ java-1.5.0-gcj.spec 21 Jan 2008 16:45:32 -0000 1.28
@@ -55,7 +55,7 @@
Name: %{name}
Version: %{javaver}.%{buildver}
-Release: 18%{?dist}
+Release: 19%{?dist}
Summary: JPackage runtime compatibility layer for GCJ
Group: Development/Languages
@@ -92,8 +92,6 @@
Requires(post): %{_sbindir}/alternatives
# post requires gij to retrieve gcc version
Requires(post): %{_bindir}/gij%{gccsuffix}
-# post rebuilds the security providers list
-Requires(post): %{_bindir}/rebuild-security-providers
# post rebuilds the gcj database
Requires(post): %{_bindir}/rebuild-gcj-db
# rebuild-gcj-db requires gcj-dbtool
@@ -104,8 +102,6 @@
Requires(postun): %{_sbindir}/alternatives
# postun requires gij to retrieve gcc version
Requires(postun): %{_bindir}/gij%{gccsuffix}
-# postun rebuilds the security providers list
-Requires(postun): %{_bindir}/rebuild-security-providers
# postun rebuilds the gcj database
Requires(postun): %{_bindir}/rebuild-gcj-db
# rebuild-gcj-db requires gcj-dbtool
@@ -317,8 +313,8 @@
1004-gnu.javax.security.auth.callback.GnuCallbacks
do
cat > $RPM_BUILD_ROOT%{_sysconfdir}/java/security/security.d/$provider << EOF
-# This file's contents are ignored. It's name, of the form
-# <priority>-<provider name>, is used by rebuild-security-providers to
+# This file's contents are ignored. Its name, of the form
+# <priority>-<provider name>, is used by post and postun scripts to
# rebuild the list of security providers in libgcj's
# classpath.security file.
EOF
@@ -433,10 +429,31 @@
alternatives --install %{_javadir}/jaxp_parser_impl.jar \
jaxp_parser_impl %{_javadir}/libgcj-$GIJ_VERSION.jar 20
-if [ -x %{_bindir}/rebuild-security-providers ]
-then
- %{_bindir}/rebuild-security-providers
-fi
+{
+ # Rebuild the list of security providers in classpath.security.
+ # This used to be a standalone script, rebuild-security-providers,
+ # provided by the Fedora version of jpackage-utils. Now it is
+ # inlined here and removed from Fedora's jpackage-utils for
+ # compatibility with jpackage.org's jpackage-utils. See:
+ # https://bugzilla.redhat.com/show_bug.cgi?id=260161
+ 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
@@ -488,10 +505,26 @@
%{_javadir}/libgcj-$GIJ_VERSION.jar
fi
-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
@@ -659,12 +692,10 @@
%ghost %{_jvmdir}/%{jredir}/lib/%{_arch}/libjawt.so
%ghost %{_jvmdir}/%{jredir}/lib/%{_arch}/client/libjvm.so
%ghost %{_jvmdir}/%{jredir}/lib/%{_arch}/server/libjvm.so
-# these must not be marked %config(noreplace). their names are used by
-# rebuild-security-providers, which lists
-# %{_sysconfdir}/java/security/security.d/*. their contents are
-# ignored, so replacing them doesn't matter. .rpmnew files are
-# harmful since they're interpreted by rebuild-security-providers as
-# classnames ending in rpmnew.
+# These must not be marked %config(noreplace). Their file names are
+# used in post and postun. Their contents are ignored, so replacing
+# them doesn't matter. .rpmnew files are harmful since they're
+# interpreted by post and postun as classnames ending in rpmnew.
%{_sysconfdir}/java/security/security.d/1000-gnu.java.security.provider.Gnu
%{_sysconfdir}/java/security/security.d/1001-gnu.javax.crypto.jce.GnuCrypto
%{_sysconfdir}/java/security/security.d/1002-gnu.javax.crypto.jce.GnuSasl
@@ -722,6 +753,10 @@
%endif
%changelog
+* Mon Jan 21 2008 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.5.0.0-19
+- Inline rebuild-security-providers.
+- Resolves: rhbz#260161
+
* Tue Nov 27 2007 Thomas Fitzsimmons <fitzsim at redhat.com> - 1.5.0.0-18
- Import java-gcj-compat 1.0.77.
More information about the fedora-extras-commits
mailing list