Bug#857847: java-package: proposal to add a --no-deps flag to make-jpkg

2017-03-15 Thread Sven Hoexter
On Wed, Mar 15, 2017 at 05:22:27PM +0100, Emmanuel Bourg wrote:

Hi Emmanuel,

> Thank you for the patch Sven. This looks like a reasonable compromise to
> support multiple releases. Regarding the implementation, I wonder if
> this could be achieved with an override_dh_shlibdeps in the rules file
> used to generate the package.

Seems to work equally well. Patch attached.

Sven
diff --git a/lib/javase.sh b/lib/javase.sh
index fd025ca..3b11095 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -88,12 +88,21 @@ EOF
 override_dh_compress:
 	dh_compress \$(shell find $j2se_name/man/ -type f ! -name '*.gz' -printf '${jvm_base##/}/%p\n')
 
-override_dh_shlibdeps:
-	dh_shlibdeps \$(EXCLUDE_LIBS) -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
-
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
 EOF
+if [ "${no_deps:-false}" == "true" ]; then
+	cat << EOF
+override_dh_shlibdeps:
+# Disabled, aides to generate one package for different Debian releases - BTS #857847
+EOF
+else
+	cat << EOF
+override_dh_shlibdeps:
+	dh_shlibdeps \$(EXCLUDE_LIBS) -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
+EOF
+fi
+
 }
 
 j2se_doc_rules() {
@@ -106,6 +115,12 @@ j2se_doc_rules() {
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
 EOF
+if [ "${no_deps:-false}" == "true" ]; then
+	cat << EOF
+override_dh_shlibdeps:
+# Disabled, aides to generate one package for different Debian releases - BTS #857847
+EOF
+fi
 }
 
 
diff --git a/make-jpkg b/make-jpkg
index 3db992c..6498b61 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -89,6 +89,7 @@ The following options are recognized:
   --source build a source package instead of a binary deb package
   --with-system-certs  integrate with the system's keystore
   --jce-policy FILEReplace cryptography files with versions from FILE
+  --no-depsAdds override for dh_shlibdeps based "Depends"
 
   --help   display this help and exit
   --versionoutput version information and exit
@@ -146,6 +147,8 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
 revision="-${1}"
 elif [[ "x$1" == x--changes ]]; then
 genchanges="true"
+elif [[ "x$1" == x--no-deps ]]; then
+no_deps="true"
 elif [[ "x$1" == x--source ]]; then
 build_source="true"
 elif [[ "x$1" == x--with-system-certs ]]; then
diff --git a/make-jpkg.1 b/make-jpkg.1
index 34a5462..47eb2f9 100644
--- a/make-jpkg.1
+++ b/make-jpkg.1
@@ -70,6 +70,10 @@ ca-certificates and ca-certificates-java packages.
 Replace cryptography files with versions
 from the specified JCE_POLICY_FILE.
 .TP
+.B --no-deps
+Adds override for dh_shlibdeps based "Depends". Allows to build a package
+without Debian release specific depdencies.
+.TP
 .B --help
 display help text and exit
 .TP
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#857847: java-package: proposal to add a --no-deps flag to make-jpkg

2017-03-15 Thread Sven Hoexter
On Wed, Mar 15, 2017 at 05:22:27PM +0100, Emmanuel Bourg wrote:

Hi Emmanuel,

> Thank you for the patch Sven. This looks like a reasonable compromise to
> support multiple releases. Regarding the implementation, I wonder if
> this could be achieved with an override_dh_shlibdeps in the rules file
> used to generate the package.

I think in theory that should also work, but I did not try it.
I'll give it a try.

Sven

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#852342: patch proposal add --no-strip parameter

2017-03-15 Thread Sven Hoexter
On Wed, Mar 15, 2017 at 05:08:53PM +0100, Emmanuel Bourg wrote:
> Le 15/03/2017 à 17:01, Sven Hoexter a écrit :
> 
> > Would that be something you'd be willing to accept?
> 
> If the stripping breaks jmap, I guess it might be better to disable it
> completely. Is there a good reason to keep it?

Just hacked together a short override patch.

Sven
diff --git a/lib/javase.sh b/lib/javase.sh
index fd025ca..0457dc4 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -93,6 +93,9 @@ override_dh_shlibdeps:
 
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
+
+override_dh_strip:
+# Disable, breaks jmap and other tools - BTS #852342
 EOF
 }
 
@@ -105,6 +108,9 @@ j2se_doc_rules() {
 
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
+
+override_dh_strip:
+# Disable, breaks jmap and other tools - BTS #852342
 EOF
 }
 
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#852342: patch proposal add --no-strip parameter

2017-03-15 Thread Sven Hoexter
On Wed, Mar 15, 2017 at 05:08:53PM +0100, Emmanuel Bourg wrote:
> If the stripping breaks jmap, I guess it might be better to disable it
> completely. Is there a good reason to keep it?

Well the idea was to still accomodate people who value disk space over
the usability of debugging related tools. I personally would also just
go without stripping the binary files and value the usability of the tools
over space.

To add a bit of data, here is the size of the extracted packages stripped
and unstripped:
~/oracle-jdk-deb-package$ du -hs extract-*
357Mextract-no-strip
344Mextract-stripped

So from my point of view the difference in size is neglectable, so I'd be
also fine with a fixed "override_dh-strip:" in the generated rules file.

Sven

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#852342: patch proposal add --no-strip parameter

2017-03-15 Thread Sven Hoexter
Hi,
maybe something like the attached patch would help to solve this problem?
@Emmanuel et al:
Would that be something you'd be willing to accept?

Sven

diff --git a/lib/javase.sh b/lib/javase.sh
index fd025ca..6b3f217 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -94,6 +94,13 @@ override_dh_shlibdeps:
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
 EOF
+
+if [ "${no_strip}" == "true" ]; then
+	cat << EOF
+override_dh_strip:
+# Do not strip the files - BTS #852342
+EOF
+fi
 }
 
 j2se_doc_rules() {
@@ -106,6 +113,13 @@ j2se_doc_rules() {
 override_dh_strip_nondeterminism:
 	# Disable dh_strip_nondeterminism to speed up the build
 EOF
+
+if [ "${no_strip}" == "true" ]; then
+	cat << EOF
+override_dh_strip:
+# Do not strip the files - BTS #852342
+EOF
+fi
 }
 
 
diff --git a/make-jpkg b/make-jpkg
index 3db992c..4bf60c6 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -89,6 +89,7 @@ The following options are recognized:
   --source build a source package instead of a binary deb package
   --with-system-certs  integrate with the system's keystore
   --jce-policy FILEReplace cryptography files with versions from FILE
+  --no-strip   override dh_strip invocation in the genrated rules file
 
   --help   display this help and exit
   --versionoutput version information and exit
@@ -148,6 +149,8 @@ while [[ $# -gt 0 && "x$1" == x--* ]]; do
 genchanges="true"
 elif [[ "x$1" == x--source ]]; then
 build_source="true"
+elif [[ "x$1" == x--no-strip ]]; then
+no_strip="true"
 elif [[ "x$1" == x--with-system-certs ]]; then
 create_cert_softlinks="true"
 else
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.