[pkg-java] r16249 - trunk/ca-certificates-java/debian

Damien Raude-Morvan drazzib at alioth.debian.org
Sat Jul 21 12:07:56 UTC 2012


Author: drazzib
Date: 2012-07-21 12:07:55 +0000 (Sat, 21 Jul 2012)
New Revision: 16249

Modified:
   trunk/ca-certificates-java/debian/changelog
   trunk/ca-certificates-java/debian/jks-keystore.hook.in
   trunk/ca-certificates-java/debian/postinst.in
   trunk/ca-certificates-java/debian/rules
Log:
* Fix jks-keystore and postinst to work on multi-arch system.
  Use dpkg-query -L package:arch. (Closes: #680618).
* As libnss3-1d is a transitional package on both Debian and Ubuntu,
  upgrade Depends to use libnss3.

Modified: trunk/ca-certificates-java/debian/changelog
===================================================================
--- trunk/ca-certificates-java/debian/changelog	2012-07-18 00:32:07 UTC (rev 16248)
+++ trunk/ca-certificates-java/debian/changelog	2012-07-21 12:07:55 UTC (rev 16249)
@@ -1,3 +1,12 @@
+ca-certificates-java (20120721) unstable; urgency=low
+
+  * Fix jks-keystore and postinst to work on multi-arch system.
+    Use dpkg-query -L package:arch. (Closes: #680618).
+  * As libnss3-1d is a transitional package on both Debian and Ubuntu,
+    upgrade Depends to use libnss3.
+
+ -- Damien Raude-Morvan <drazzib at debian.org>  Sat, 21 Jul 2012 01:06:32 +0200
+
 ca-certificates-java (20120608) unstable; urgency=low
 
   [ James Page ]

Modified: trunk/ca-certificates-java/debian/jks-keystore.hook.in
===================================================================
--- trunk/ca-certificates-java/debian/jks-keystore.hook.in	2012-07-18 00:32:07 UTC (rev 16248)
+++ trunk/ca-certificates-java/debian/jks-keystore.hook.in	2012-07-21 12:07:55 UTC (rev 16249)
@@ -15,6 +15,15 @@
 arch=`dpkg --print-architecture`
 JAR=/usr/share/ca-certificates-java/ca-certificates-java.jar
 
+nsslib_name()
+{
+    if dpkg --assert-multi-arch 2>/dev/null; then
+        echo "@NSS_LIB@:${arch}"
+    else
+        echo "@NSS_LIB@"
+    fi
+}
+
 echo ""
 if [ "$cacerts_updates" != yes ] || [ "$CACERT_UPDATES" = disabled ]; then
     echo "updates of cacerts keystore disabled."
@@ -44,12 +53,12 @@
 fi
 
 if dpkg-query --version >/dev/null; then
-    nsspkg=$(dpkg-query -L @NSS_LIB@ | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
+    nsspkg=$(dpkg-query -L "$(nsslib_name)" | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
     nssjdk=$(sed -n '/nssLibraryDirectory/s/.*= *\(.*\)/\1/p' /etc/${jvm%-$arch}/security/nss.cfg)
     if [ -n "$nsspkg" ] && [ -n "$nssjdk" ] && [ "$nsspkg" != "$nssjdk" ]; then
         ln -sf $nsspkg/libnss3.so $nssjdk/libnss3.so
     fi
-    softokn3pkg=$(dpkg-query -L @NSS_LIB@ | sed -n 's,\(.*\)/libsoftokn3\.so$,\1,p')
+    softokn3pkg=$(dpkg-query -L "$(nsslib_name)" | sed -n 's,\(.*\)/libsoftokn3\.so$,\1,p')
     if [ -n "$softokn3pkg" ] && [ -n "$nssjdk" ] && [ "$softokn3pkg" != "$nssjdk" ]; then
         ln -sf $softokn3pkg/libsoftokn3.so $nssjdk/libsoftokn3.so
     fi

Modified: trunk/ca-certificates-java/debian/postinst.in
===================================================================
--- trunk/ca-certificates-java/debian/postinst.in	2012-07-18 00:32:07 UTC (rev 16248)
+++ trunk/ca-certificates-java/debian/postinst.in	2012-07-21 12:07:55 UTC (rev 16249)
@@ -15,6 +15,15 @@
 arch=`dpkg --print-architecture`
 JAR=/usr/share/ca-certificates-java/ca-certificates-java.jar
 
+nsslib_name()
+{
+    if dpkg --assert-multi-arch 2>/dev/null; then
+        echo "@NSS_LIB@:${arch}"
+    else
+        echo "@NSS_LIB@"
+    fi
+}
+
 setup_path()
 {
     for jvm in java-6-openjdk-$arch java-6-openjdk \
@@ -30,7 +39,7 @@
 first_install()
 {
     if which dpkg-query --version >/dev/null; then
-    nsspkg=$(dpkg-query -L @NSS_LIB@ | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
+    nsspkg=$(dpkg-query -L "$(nsslib_name)" | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
     nssjdk=$(sed -n '/nssLibraryDirectory/s/.*= *\(.*\)/\1/p' /etc/${jvm%-$arch}/security/nss.cfg)
     if [ -n "$nsspkg" ] && [ -n "$nssjdk" ] && [ "$nsspkg" != "$nssjdk" ]; then
         ln -sf $nsspkg/libnss3.so $nssjdk/libnss3.so

Modified: trunk/ca-certificates-java/debian/rules
===================================================================
--- trunk/ca-certificates-java/debian/rules	2012-07-18 00:32:07 UTC (rev 16248)
+++ trunk/ca-certificates-java/debian/rules	2012-07-21 12:07:55 UTC (rev 16249)
@@ -5,13 +5,13 @@
 #export DH_VERBOSE=1
 
 ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
-	SUBSTVARS = -Vnss:Depends="libnss3-1d (>= 3.12.9+ckbi-1.82-0ubuntu3~)" \
+	SUBSTVARS = -Vnss:Depends="libnss3 (>= 3.12.9+ckbi-1.82-0ubuntu3~)" \
 				-Vjre:Depends="openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1)"
 	nss_lib = libnss3
 else
-	SUBSTVARS = -Vnss:Depends="libnss3-1d (>= 3.12.10-2~)" \
+	SUBSTVARS = -Vnss:Depends="libnss3 (>= 3.12.10-2~)" \
 				-Vjre:Depends="openjdk-6-jre-headless (>= 6b16-1.6.1-2)"
-	nss_lib = libnss3-1d
+	nss_lib = libnss3
 endif
 
 JAVA_HOME := /usr/lib/jvm/default-java




More information about the pkg-java-commits mailing list