[pkg-java] r13731 - trunk/ca-certificates-java/debian
Matthias Klose
doko at alioth.debian.org
Tue May 31 13:28:37 UTC 2011
Author: doko
Date: 2011-05-31 13:28:37 +0000 (Tue, 31 May 2011)
New Revision: 13731
Modified:
trunk/ca-certificates-java/debian/changelog
trunk/ca-certificates-java/debian/jks-keystore.hook
trunk/ca-certificates-java/debian/postinst
Log:
ca-certificates-java (20110531) unstable; urgency=low
* Prepare for multiarch libnss3 update.
-- Matthias Klose <doko at ubuntu.com> Tue, 31 May 2011 15:20:52 +0200
Modified: trunk/ca-certificates-java/debian/changelog
===================================================================
--- trunk/ca-certificates-java/debian/changelog 2011-05-31 00:50:34 UTC (rev 13730)
+++ trunk/ca-certificates-java/debian/changelog 2011-05-31 13:28:37 UTC (rev 13731)
@@ -1,3 +1,9 @@
+ca-certificates-java (20110531) unstable; urgency=low
+
+ * Prepare for multiarch libnss3 update.
+
+ -- Matthias Klose <doko at ubuntu.com> Tue, 31 May 2011 15:20:52 +0200
+
ca-certificates-java (20110426) unstable; urgency=low
* Test for existing file in postinst before copying it. (Closes: #624152)
Modified: trunk/ca-certificates-java/debian/jks-keystore.hook
===================================================================
--- trunk/ca-certificates-java/debian/jks-keystore.hook 2011-05-31 00:50:34 UTC (rev 13730)
+++ trunk/ca-certificates-java/debian/jks-keystore.hook 2011-05-31 13:28:37 UTC (rev 13731)
@@ -34,11 +34,30 @@
printf -- "-server KNOWN\n" > $temp_jvm_cfg
fi
+if which dpkg-query --version >/dev/null; then
+ nsspkg=$(dpkg-query -L libnss3 | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
+ nssjdk=$(sed -n '/nssLibraryDirectory/s/.*= *\(.*\)/\1/p' /etc/$jvm/security/nss.cfg)
+ if [ "$nsspkg" != "$nssjdk" ]; then
+ ln -sf $nsspkg/libnss3.so $nssjdk/libnss3.so
+ fi
+fi
+
+do_cleanup()
+{
+ [ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
+ if [ "$nsspkg" != "$nssjdk" ]; then
+ rm -f $nssjdk/libnss3.so
+ fi
+}
+
CLASSPATH=/usr/share/ca-certificates-java
export CLASSPATH
-java UpdateCertificates -storepass "$storepass"
+if java UpdateCertificates -storepass "$storepass"; then
+ do_cleanup
+else
+ do_cleanup
+ exit 1
+fi
-[ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
-
echo "done."
Modified: trunk/ca-certificates-java/debian/postinst
===================================================================
--- trunk/ca-certificates-java/debian/postinst 2011-05-31 00:50:34 UTC (rev 13730)
+++ trunk/ca-certificates-java/debian/postinst 2011-05-31 13:28:37 UTC (rev 13731)
@@ -23,6 +23,14 @@
first_install()
{
+ if which dpkg-query --version >/dev/null; then
+ nsspkg=$(dpkg-query -L libnss3 | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
+ nssjdk=$(sed -n '/nssLibraryDirectory/s/.*= *\(.*\)/\1/p' /etc/$jvm/security/nss.cfg)
+ if [ "$nsspkg" != "$nssjdk" ]; then
+ ln -sf $nsspkg/libnss3.so $nssjdk/libnss3.so
+ fi
+ fi
+
find /etc/ssl/certs -name \*.pem | \
while read filename; do
alias=$(basename $filename .pem | tr A-Z a-z | tr -cs a-z0-9 _)
@@ -37,6 +45,14 @@
echo "done."
}
+do_cleanup()
+{
+ [ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
+ if [ "$nsspkg" != "$nssjdk" ]; then
+ rm -f $nssjdk/libnss3.so
+ fi
+}
+
case "$1" in
configure)
if dpkg --compare-versions "$2" le "20100412"; then
@@ -60,9 +76,12 @@
printf -- "-server KNOWN\n" > $temp_jvm_cfg
fi
- first_install
-
- [ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
+ if first_install; then
+ do_cleanup
+ else
+ do_cleanup
+ exit 1
+ fi
fi
chmod 600 /etc/default/cacerts || true
;;
More information about the pkg-java-commits
mailing list