1
0

Accepting request 74205 from Base:System

- fix spurious rpm warning if no java exists (bnc#634793)
- move java.run to java-ca-certificates

OBS-URL: https://build.opensuse.org/request/show/74205
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ca-certificates?expand=0&rev=10
This commit is contained in:
Sascha Peilicke 2011-06-21 07:21:25 +00:00 committed by Git OBS Bridge
commit 512f9211c5
3 changed files with 31 additions and 9 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jun 20 12:49:52 UTC 2011 - lnussel@suse.de
- fix spurious rpm warning if no java exists (bnc#634793)
- move java.run to java-ca-certificates
-------------------------------------------------------------------
Mon Sep 27 14:58:03 UTC 2010 - lnussel@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package ca-certificates (Version 1)
# spec file for package ca-certificates
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -54,6 +54,7 @@ BuildArch: noarch
%if %{with java}
%package -n java-ca-certificates
License: GPLv2+
Group: Productivity/Networking/Security
@ -64,21 +65,25 @@ Supplements: packageand(java-1_6_0-openjdk:ca-certificates)
Supplements: packageand(java-1_6_0-sun:ca-certificates)
%endif
%description
Utilities for system wide CA certificate installation
%if %{with java}
%description -n java-ca-certificates
Utilities for CA certificate installation for gcj and openjdk Java
%endif
%prep
%setup -qcT
install -m 755 %{SOURCE0} .
install -m 644 %{SOURCE1} .
install -m 644 %{SOURCE2} COPYING
%build
%if %{with java}
gcj -C %SOURCE4 -d .
@ -91,6 +96,7 @@ EOF
fastjar cfm keystore.jar MANIFEST.MF keystore*.class
%endif
%install
mkdir -p %{buildroot}/%{etccadir}
mkdir -p %{buildroot}/%{usrcadir}
@ -114,6 +120,7 @@ install -m 644 /dev/null %{buildroot}/var/lib/ca-certificates/java-cacerts
install -m 644 /dev/null %{buildroot}/var/lib/ca-certificates/gcj-cacerts
%endif
%post
# this is just needed for those updating Factory,
# can be removed before 11.3
@ -127,13 +134,16 @@ update-ca-certificates -f || true
%if %{with java}
%post -n java-ca-certificates
update-ca-certificates || true
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root)
%dir %{usrcadir}
@ -147,19 +157,23 @@ rm -rf %{buildroot}
%dir %{_prefix}/lib/ca-certificates
%dir %{_prefix}/lib/ca-certificates/update.d
%dir /var/lib/ca-certificates
%{_prefix}/lib/ca-certificates/update.d/*
%{_prefix}/lib/ca-certificates/update.d/certbundle.run
%{_sbindir}/update-ca-certificates
%{_mandir}/man8/update-ca-certificates.8*
%ghost /var/lib/ca-certificates/ca-bundle.pem
%if %{with java}
%files -n java-ca-certificates
%defattr(-, root, root)
%dir %{_prefix}/lib/ca-certificates/java
%{_prefix}/lib/ca-certificates/update.d/java.run
%{_prefix}/lib/ca-certificates/java/keystore.jar
%ghost /var/lib/ca-certificates/java-cacerts
%ghost /var/lib/ca-certificates/gcj-cacerts
%endif
%changelog

View File

@ -35,11 +35,13 @@ fi
if [ -n "$JAVA_HOME" ]; then
java="$JAVA_HOME/bin/java"
else
java=`which java`
fi
if [[ $(readlink -f "${java}") =~ gij ]]; then
java=""
java=`type -P java`
if [ -n "$java" -a -L "$java" ]; then
java=`readlink -f "$java"`
if [ "${java//gij}" != "$java" ]; then
java=
fi
fi
fi
if [ ! -e "$libexecdir"/keystore.jar ]; then
@ -73,7 +75,7 @@ for i in "$cadir"/*.pem; do
fi
done
if [ -x "$java" ]; then
if [ -n "$java" -a -x "$java" ]; then
echo "creating $cafile ..."
$java -jar $libexecdir/keystore.jar -keystore "$cafile" -cadir "$cadir" "$@"
fi