]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
New --with-system-certs option to use the system keystore (Closes: #776395)
authorFrancesc Zacarias <francesc@spotify.com>
Wed, 4 Mar 2015 23:43:30 +0000 (00:43 +0100)
committerEmmanuel Bourg <ebourg@apache.org>
Wed, 4 Mar 2015 23:43:30 +0000 (00:43 +0100)
debian/changelog
lib/javase.sh
lib/jdk.sh
lib/jre.sh
make-jpkg
make-jpkg.1

index 4cf54fb4921f235d85f6a97084e0d183dca715de..175372bce9adc0c0ee697ead4d141ea4eb85843b 100644 (file)
@@ -1,5 +1,9 @@
 java-package (0.58) UNRELEASED; urgency=medium
 
 java-package (0.58) UNRELEASED; urgency=medium
 
+  [ Francesc Zacarias ]
+  * New --with-system-certs option to use the system keystore (Closes: #776395)
+
+  [ Emmanuel Bourg ]
   * Removed the generated package mistakenly included in the source package
     (Closes: #779727)
 
   * Removed the generated package mistakenly included in the source package
     (Closes: #779727)
 
index 3e539b32ea7534cca8f642b9a6f72a062ce62d49..9bfd3ecbefbaa4bf04eb17aab2409e2c3db04c41 100644 (file)
@@ -126,8 +126,16 @@ if [ "\$1" = configure ]; then
           update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
         fi
     }
           update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
         fi
     }
-
 EOF
 EOF
+    if [ "$create_cert_softlinks" == "true" ];then
+        cat >> "$debian_dir/postinst" << EOF
+    for subdir in lib/security jre/lib/security;do
+        if [ -f $jvm_base$j2se_name/\$subdir/cacerts ]; then
+            ln -sf /etc/ssl/certs/java/cacerts $jvm_base$j2se_name/\$subdir/cacerts
+        fi
+    done
+EOF
+    fi
     eval "$j2se_install" >> "$debian_dir/postinst"
 
     cat >> "$debian_dir/postinst" << EOF
     eval "$j2se_install" >> "$debian_dir/postinst"
 
     cat >> "$debian_dir/postinst" << EOF
index 1c7587672e4e5f252203e513dff166eb5b979bdd..46dec6fd912dcaf1bd4018ac793628d0dd9f8783 100644 (file)
@@ -13,6 +13,9 @@ j2sdk_control() {
         # No browser on ARM yet
         java_browser_plugin=""
     fi
         # No browser on ARM yet
         java_browser_plugin=""
     fi
+    if [ "$create_cert_softlinks" == "true" ]; then
+        depends="$depends, ca-certificates-java"
+    fi
     for i in `seq 5 ${j2se_release}`;
     do
         provides_runtime="${provides_runtime} java${i}-runtime,"
     for i in `seq 5 ${j2se_release}`;
     do
         provides_runtime="${provides_runtime} java${i}-runtime,"
index 93aed8b2cfdf3734825a3af432b742e67fac1f18..7b339d823b41944af7fe1b62139c4212ff6b8855 100644 (file)
@@ -1,6 +1,9 @@
 
 j2re_control() {
     j2se_control
 
 j2re_control() {
     j2se_control
+    if [ "$create_cert_softlinks" == "true" ]; then
+        depends="ca-certificates-java"
+    fi
     for i in `seq 5 ${j2se_release}`;
     do
         provides_runtime="${provides_runtime} java${i}-runtime,"
     for i in `seq 5 ${j2se_release}`;
     do
         provides_runtime="${provides_runtime} java${i}-runtime,"
@@ -9,7 +12,7 @@ j2re_control() {
     cat << EOF
 Package: $j2se_package
 Architecture: any
     cat << EOF
 Package: $j2se_package
 Architecture: any
-Depends: \${misc:Depends}, \${shlibs:Depends}
+Depends: \${misc:Depends}, \${shlibs:Depends}, $depends
 Recommends: netbase
 Provides: java-virtual-machine, java-runtime, java2-runtime, $provides_runtime java-runtime-headless, java2-runtime-headless, $provides_headless java-browser-plugin
 Description: $j2se_title
 Recommends: netbase
 Provides: java-virtual-machine, java-runtime, java2-runtime, $provides_runtime java-runtime-headless, java2-runtime-headless, $provides_headless java-browser-plugin
 Description: $j2se_title
index a90c26e9e964e1066b5dc45927272b521021314e..6e53003436a718e94b6f174eb039e5439e942e09 100755 (executable)
--- a/make-jpkg
+++ b/make-jpkg
@@ -79,14 +79,15 @@ Supported java binary distributions currently include:
 
 The following options are recognized:
 
 
 The following options are recognized:
 
-  --full-name NAME   full name used in the maintainer field of the package
-  --email EMAIL      email address used in the maintainer field of the package
-  --changes          create a .changes file
-  --revision         add debian revision
-  --source           build a source package instead of a binary deb package
+  --full-name NAME     full name used in the maintainer field of the package
+  --email EMAIL        email address used in the maintainer field of the package
+  --changes            create a .changes file
+  --revision           add debian revision
+  --source             build a source package instead of a binary deb package
+  --with-system-certs  integrate with the system's keystore
 
 
-  --help             display this help and exit
-  --version          output version information and exit
+  --help               display this help and exit
+  --version            output version information and exit
 
 EOF
 }
 
 EOF
 }
@@ -131,6 +132,8 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
     genchanges="true"
     elif [[ "x$1" == x--source ]]; then
     build_source="true"
     genchanges="true"
     elif [[ "x$1" == x--source ]]; then
     build_source="true"
+    elif [[ "x$1" == x--with-system-certs ]]; then
+    create_cert_softlinks="true"
     else
     unrecognized_option "$1"
     fi
     else
     unrecognized_option "$1"
     fi
index bceec92c98e3d1647c5deaf1a218a42b996b0b78..ba1d000c0c8ec10c84d4f2f25def334cdd54864a 100644 (file)
@@ -52,6 +52,11 @@ add debian revision
 .B --source
 build a source package instead of a binary deb package
 .TP
 .B --source
 build a source package instead of a binary deb package
 .TP
+.B --with-system-certs
+Replace the JVMs keystore with a softlink to the system's keystore,
+(/etc/ssl/certs/java/cacerts) which is managed automatically by the
+ca-certificates and ca-certificates-java packages.
+.TP
 .B --help
 display help text and exit
 .TP
 .B --help
 display help text and exit
 .TP