[ca-certificates-java] 26/58: * 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.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Wed May 31 13:13:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository ca-certificates-java.
commit 0bfbfa665029f2358c291daa9463221e492a5b94
Author: Damien Raude-Morvan <drazzib at debian.org>
Date: Sat Jul 21 12:07:55 2012 +0000
* 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.
---
debian/changelog | 9 +++++++++
debian/jks-keystore.hook.in | 13 +++++++++++--
debian/postinst.in | 11 ++++++++++-
debian/rules | 6 +++---
4 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2c432d8..70e5266 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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 ]
diff --git a/debian/jks-keystore.hook.in b/debian/jks-keystore.hook.in
index 25cdf94..8d99fed 100644
--- a/debian/jks-keystore.hook.in
+++ b/debian/jks-keystore.hook.in
@@ -15,6 +15,15 @@ fi
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 @@ if [ ! -f /etc/${jvm%-$arch}/jvm-$arch.cfg ]; then
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
diff --git a/debian/postinst.in b/debian/postinst.in
index 0b3f5b4..8425d96 100644
--- a/debian/postinst.in
+++ b/debian/postinst.in
@@ -15,6 +15,15 @@ fi
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 @@ setup_path()
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
diff --git a/debian/rules b/debian/rules
index 1e02f4f..632b9c6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/ca-certificates-java.git
More information about the pkg-java-commits
mailing list