Followup-For: Bug #641049 Control: tag -1 patch Hi,
I'm attaching two patches that fix the circular dependency issues. I verified in piuparts that the new packages install and remove cleanly in sid, and upgrade successfully from jessie and wheezy. And especially the previously problematic installation test of biomaj-watcher with --enable-recommends now succeeds. Patch 1 downgrades the openjdk-7-jre-lib Depends: openjdk-7-jre-headless to a Recommends, but this was not sufficient to solve the problem. openjdk-7-jre-lib has no rdepends beyond openjdk-7-jre-headless. Needs turning /usr/share/doc/openjdk-7-jre-lib into a real directory. Patch 2 splits most of openjdk-7-jre-headless' content into a new openjdk-7-jre-core package (better name suggestions welcome, and I'll update the patch). A third patch is needed for ca-certificates-java to switch the dependency from openjdk-7-jre-headless to openjdk-7-jre-core to actually break the circular dependency. I'll file a bug once the patches for openjdk-7 have been accepted. In the end the dependencies should look like: openjdk-7-jre-headless: openjdk-7-jre-core, ca-certificates-java ca-certificates-java: ... | openjdk-7-jre-core | ... openjdk-7-jre-core: openjdk-7-jre-lib openjdk-7-jre-lib: n/a and the recommends: openjdk-7-jre-lib: openjdk-7-jre-headless openjdk-7-jre-core: openjdk-7-jre-headless Andreas
>From 73fd7df34faa44c906623486307a596465e1b00d Mon Sep 17 00:00:00 2001 From: Andreas Beckmann <a...@debian.org> Date: Sat, 16 Nov 2013 18:20:47 +0100 Subject: [PATCH 1/2] break circular dependency openjdk-7-jre-{lib,headless} --- debian/JB-jre-lib.preinst.in | 10 ++++++++++ debian/changelog | 6 ++++++ debian/control.in | 4 ++-- debian/rules | 7 ++----- 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 debian/JB-jre-lib.preinst.in diff --git a/debian/JB-jre-lib.preinst.in b/debian/JB-jre-lib.preinst.in new file mode 100644 index 0000000..d258ac3 --- /dev/null +++ b/debian/JB-jre-lib.preinst.in @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +# prepare switching from symlink to real directory +DOCDIR=/usr/share/doc/@basename@-jre-lib +if [ -h $DOCDIR ]; then + rm $DOCDIR +fi + +#DEBHELPER# diff --git a/debian/changelog b/debian/changelog index c6445d3..fb6c6fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,12 @@ openjdk-7 (7u25-2.3.12-4.1) UNRELEASED; urgency=low * debian/rules - run autoreconf, instead of aclocal, automake and autoconf (Closes: #724083) + [ Andreas Beckmann ] + * openjdk-7-jre-lib: Break circular dependency with openjdk-7-jre-headless + by downgrading the Depends to Recommends. Make /u/s/d/openjdk-7-jre-lib a + real directory instead of a symbolic link to openjdk-7-jre-headless. + (Closes: 641049) + -- Hideki Yamane <henr...@debian.org> Wed, 23 Oct 2013 19:14:39 +0900 openjdk-7 (7u25-2.3.12-4) unstable; urgency=low diff --git a/debian/control.in b/debian/control.in index 1befc68..f6452b8 100644 --- a/debian/control.in +++ b/debian/control.in @@ -61,8 +61,8 @@ Package: @basename@-jre-lib Architecture: @lib_arch@ Multi-Arch: foreign Pre-Depends: ${dpkg:Depends} -Depends: @basename@-jre-headless (>= ${base:Version}), ${misc:Depends} -Recommends: ${dlopen:Recommends} +Depends: ${misc:Depends} +Recommends: @basename@-jre-headless (>= ${base:Version}), ${dlopen:Recommends} Built-Using: ${rhino:Source} Description: OpenJDK Java runtime (architecture independent libraries) OpenJDK Java runtime, using ${vm:Name}. diff --git a/debian/rules b/debian/rules index 70a00d7..dd0adae 100755 --- a/debian/rules +++ b/debian/rules @@ -1783,11 +1783,6 @@ ifneq (,$(DEB_HOST_MULTIARCH)) echo '$(commonbasedir)/src.zip $(basedir)/src.zip' >> $(d_jdk).links endif - : # create docdir symlinks for $(p_lib) - ( \ - echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_lib); \ - ) > $(d_lib).links - : # create docdir symlinks for $(p_dbg) ( \ echo usr/share/doc/$(p_jrehl) usr/share/doc/$(p_dbg); \ @@ -1920,6 +1915,8 @@ ifeq ($(with_docs),yes) ln -sf ../$(p_jrehl)/$$b $(d_doc)/usr/share/doc/$(p_doc)/$$b; \ done endif + dh_installchangelogs -p$(p_lib) + dh_installdocs -p$(p_lib) # FIXME: desktop and menu files not ready for multiarch. #658321 ifeq (,$(DEB_HOST_MULTIARCH)) dh_installmenu -i $(nodocs) -- 1.7.10.4
>From 83d7a6ebd88955ac0424bd844555fc6110096d5a Mon Sep 17 00:00:00 2001 From: Andreas Beckmann <a...@debian.org> Date: Sat, 16 Nov 2013 19:00:57 +0100 Subject: [PATCH 2/2] split openjdk-7-jre-core from openjdk-7-jre-headless --- debian/JB-jre-core.overrides.in | 5 ++ debian/JB-jre-core.postinst.in | 144 +++++++++++++++++++++++++++++++++++ debian/JB-jre-core.postrm.in | 21 +++++ debian/JB-jre-core.preinst.in | 28 +++++++ debian/JB-jre-core.prerm.in | 27 +++++++ debian/JB-jre-headless.overrides.in | 5 -- debian/JB-jre-headless.postinst.in | 144 ----------------------------------- debian/JB-jre-headless.postrm.in | 21 ----- debian/JB-jre-headless.preinst.in | 28 ------- debian/JB-jre-headless.prerm.in | 27 ------- debian/changelog | 5 ++ debian/control.in | 20 ++++- debian/rules | 54 +++++++------ 13 files changed, 277 insertions(+), 252 deletions(-) create mode 100644 debian/JB-jre-core.overrides.in create mode 100644 debian/JB-jre-core.postinst.in create mode 100644 debian/JB-jre-core.postrm.in create mode 100644 debian/JB-jre-core.preinst.in create mode 100644 debian/JB-jre-core.prerm.in delete mode 100644 debian/JB-jre-headless.overrides.in delete mode 100644 debian/JB-jre-headless.postinst.in delete mode 100644 debian/JB-jre-headless.postrm.in delete mode 100644 debian/JB-jre-headless.preinst.in delete mode 100644 debian/JB-jre-headless.prerm.in diff --git a/debian/JB-jre-core.overrides.in b/debian/JB-jre-core.overrides.in new file mode 100644 index 0000000..8e2eb1f --- /dev/null +++ b/debian/JB-jre-core.overrides.in @@ -0,0 +1,5 @@ +# empty directory by intent +@basename@-jre-core binary: package-contains-empty-directory usr/share/binfmts/ + +# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +@basename@-jre-core binary: unstripped-binary-or-object diff --git a/debian/JB-jre-core.postinst.in b/debian/JB-jre-core.postinst.in new file mode 100644 index 0000000..6b863a7 --- /dev/null +++ b/debian/JB-jre-core.postinst.in @@ -0,0 +1,144 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +priority=@priority@ +basedir=/@basedir@ +mandir=$basedir/jre/man +srcext=1.gz +dstext=1.gz +jre_tools='@jre_hl_tools@' + +case "$1" in +configure) + # fail early. java currently uses tricks to find its own shared + # libraries depending on the path of the binary. Will be changed + # in OpenJDK7 + if ! mountpoint -q /proc; then + echo >&2 "the java command requires a mounted proc fs (/proc)." + exit 1 + fi + + [ -d /etc/.java ] || mkdir -m 755 /etc/.java + [ -d /etc/.java/.systemPrefs ] || mkdir -m 755 /etc/.java/.systemPrefs + if [ ! -f /etc/.java/.systemPrefs/.system.lock ]; then + touch /etc/.java/.systemPrefs/.system.lock + chmod 644 /etc/.java/.systemPrefs/.system.lock + fi + if [ ! -f /etc/.java/.systemPrefs/.systemRootModFile ]; then + touch /etc/.java/.systemPrefs/.systemRootModFile + chmod 644 /etc/.java/.systemPrefs/.systemRootModFile + fi + + if [ -z "$2" ]; then + update_alternatives=y + fi + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then + update_alternatives=y + break + fi + done + fi + if [ "$update_alternatives" != y ] && [ $priority -gt 1060 ]; then + for i in $jre_tools; do + oldp=$(update-alternatives --query java | awk -v b=$basedir '/^Alternative:/ && $2~b {p=1} /^Priority:/ && p {print $2; exit}') + if [ -n "$oldp" ] && [ "$oldp" -le 1060 ]; then + update_alternatives=y + break + fi + done + fi + + if [ "$update_alternatives" = y ]; then + if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then + priority=$(expr $priority - 1) + fi + for i in $jre_tools; do + unset slave1 slave2 || true + if [ -e $mandir/man1/$i.$srcext ]; then + slave1="--slave \ + /usr/share/man/man1/$i.$dstext \ + $i.$dstext \ + $mandir/man1/$i.$srcext" + fi + # disabled + if false && [ -e $mandir/ja/man1/$i.$srcext ]; then + slave2="--slave \ + /usr/share/man/ja/man1/$i.$dstext \ + ${i}_ja.$dstext \ + $mandir/ja/man1/$i.$srcext" + fi + update-alternatives \ + --install \ + /usr/bin/$i \ + $i \ + $basedir/jre/bin/$i \ + $priority \ + $slave1 $slave2 + done + update-alternatives \ + --install /usr/bin/jexec jexec $basedir/jre/lib/jexec $priority \ + --slave \ + /usr/share/binfmts/jar \ + jexec-binfmt \ + $basedir/jre/lib/jar.binfmt + fi # update alternatives + + if [ -n "$multiarch" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 7~b147-2.0~pre3-3ubuntu2~; then + for d in cmm; do + if [ -d $basedir/jre/lib/$d ] && [ ! -h $basedir/jre/lib/$d ]; then + rm -rf $basedir/jre/lib/$d + ln -s ../../../java-6-openjdk-common/jre/lib/$d $basedir/jre/lib/$d + fi + done + fi + + # register binfmt; ignore errors, the alternative may already be + # registered by another JRE. + if which update-binfmts >/dev/null && [ -r /usr/share/binfmts/jar ]; then + update-binfmts --package @basename@ --import jar || true + fi + + # activate class data sharing + case @archdir@ in i386|sparc) + rm -f $basedir/jre/lib/@archdir@/client/classes.jsa + log=$(tempfile) + if ! $basedir/bin/java -client -Xshare:dump -XX:PermSize=128m > $log; then + cat >&2 $log + rm -f $log + # this may fail on some machines/configurations, just ignore it. + echo >&2 "ignoring dump failure" + #exit 1 + fi + rm -f $log + esac + case @archdir@ in amd64|i386|sparc) + rm -f $basedir/jre/lib/@archdir@/server/classes.jsa + log=$(tempfile) + if ! $basedir/bin/java -server -Xshare:dump > $log; then + cat >&2 $log + rm -f $log + # this may fail on some machines/configurations, just ignore it. + echo >&2 "ignoring dump failure" + #exit 1 + fi + rm -f $log + esac + + if [ -n "$multiarch" ]; then + if [ ! -h /@basedir@/jre/lib/zi ] && [ -d /@basedir@/jre/lib/zi ]; then + rm -rf /@basedir@/jre/lib/zi + ln -s ../../../../../share/javazi /@basedir@/jre/lib/zi + fi + fi + + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/JB-jre-core.postrm.in b/debian/JB-jre-core.postrm.in new file mode 100644 index 0000000..5c8811f --- /dev/null +++ b/debian/JB-jre-core.postrm.in @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +multiarch=@multiarch@ +jdirname=@jdirname@ +etcdir=/@etcdir@ + +case "$1" in +purge) + if [ -z "$jdirname" ] || [ -z "$etcdir" ]; then + echo >&2 "$(basename $0): Internal error" + exit 1 + fi + # removals of config files in /etc is handled by dpkg + + # XXX should remove /etc/.java ??? + ;; +esac + +#DEBHELPER# diff --git a/debian/JB-jre-core.preinst.in b/debian/JB-jre-core.preinst.in new file mode 100644 index 0000000..ed5a69f --- /dev/null +++ b/debian/JB-jre-core.preinst.in @@ -0,0 +1,28 @@ +#! /bin/sh + +set -e + +if [ -h /usr/share/doc/@basename@-jre-headless ]; then + rm -f /usr/share/doc/@basename@-jre-headless +fi + +multiarch=@multiarch@ +old_basedir=/usr/lib/jvm/java-7-openjdk +jre_tools='java keytool pack200 rmid rmiregistry unpack200 orbd servertool tnameserv' + +case "$1" in + upgrade) + if [ -n "$multiarch" ] && [ -n "$2" ]; then + for i in $jre_tools; do + if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove $i $old_basedir/jre/bin/$i || true + fi + done + if [ -n "$(update-alternatives --list jexec 2>/dev/null | grep ^$old_basedir/)" ]; then + update-alternatives --remove jexec $old_basedir/jre/lib/jexec || true + fi + fi + ;; +esac + +#DEBHELPER# diff --git a/debian/JB-jre-core.prerm.in b/debian/JB-jre-core.prerm.in new file mode 100644 index 0000000..d8e24ce --- /dev/null +++ b/debian/JB-jre-core.prerm.in @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +basedir=/@basedir@ +jre_tools='@jre_hl_tools@' + +rm -f $basedir/jre/lib/@archdir@/client/classes.jsa +rm -f $basedir/jre/lib/@archdir@/server/classes.jsa + +if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then + for i in $jre_tools; do + update-alternatives --remove $i $basedir/jre/bin/$i + done + + if which update-binfmts >/dev/null; then + # try to remove and ignore the error + if [ -e /var/lib/binfmts/@basename@ ]; then + update-binfmts --package @basename@ \ + --remove jar /usr/bin/jexec || true + fi + fi + + update-alternatives --remove jexec $basedir/jre/lib/jexec +fi + +#DEBHELPER# diff --git a/debian/JB-jre-headless.overrides.in b/debian/JB-jre-headless.overrides.in deleted file mode 100644 index 6004673..0000000 --- a/debian/JB-jre-headless.overrides.in +++ /dev/null @@ -1,5 +0,0 @@ -# empty directory by intent -@basename@-jre-headless binary: package-contains-empty-directory usr/share/binfmts/ - -# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. -@basename@-jre-headless binary: unstripped-binary-or-object diff --git a/debian/JB-jre-headless.postinst.in b/debian/JB-jre-headless.postinst.in deleted file mode 100644 index 6b863a7..0000000 --- a/debian/JB-jre-headless.postinst.in +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/sh - -set -e - -multiarch=@multiarch@ -priority=@priority@ -basedir=/@basedir@ -mandir=$basedir/jre/man -srcext=1.gz -dstext=1.gz -jre_tools='@jre_hl_tools@' - -case "$1" in -configure) - # fail early. java currently uses tricks to find its own shared - # libraries depending on the path of the binary. Will be changed - # in OpenJDK7 - if ! mountpoint -q /proc; then - echo >&2 "the java command requires a mounted proc fs (/proc)." - exit 1 - fi - - [ -d /etc/.java ] || mkdir -m 755 /etc/.java - [ -d /etc/.java/.systemPrefs ] || mkdir -m 755 /etc/.java/.systemPrefs - if [ ! -f /etc/.java/.systemPrefs/.system.lock ]; then - touch /etc/.java/.systemPrefs/.system.lock - chmod 644 /etc/.java/.systemPrefs/.system.lock - fi - if [ ! -f /etc/.java/.systemPrefs/.systemRootModFile ]; then - touch /etc/.java/.systemPrefs/.systemRootModFile - chmod 644 /etc/.java/.systemPrefs/.systemRootModFile - fi - - if [ -z "$2" ]; then - update_alternatives=y - fi - if [ -n "$multiarch" ] && [ -n "$2" ]; then - for i in $jre_tools; do - if [ -z "$(update-alternatives --list $i 2>/dev/null | grep ^$basedir/)" ]; then - update_alternatives=y - break - fi - done - fi - if [ "$update_alternatives" != y ] && [ $priority -gt 1060 ]; then - for i in $jre_tools; do - oldp=$(update-alternatives --query java | awk -v b=$basedir '/^Alternative:/ && $2~b {p=1} /^Priority:/ && p {print $2; exit}') - if [ -n "$oldp" ] && [ "$oldp" -le 1060 ]; then - update_alternatives=y - break - fi - done - fi - - if [ "$update_alternatives" = y ]; then - if [ -n "$multiarch" ] && [ "$DPKG_MAINTSCRIPT_ARCH" != $(dpkg --print-architecture) ]; then - priority=$(expr $priority - 1) - fi - for i in $jre_tools; do - unset slave1 slave2 || true - if [ -e $mandir/man1/$i.$srcext ]; then - slave1="--slave \ - /usr/share/man/man1/$i.$dstext \ - $i.$dstext \ - $mandir/man1/$i.$srcext" - fi - # disabled - if false && [ -e $mandir/ja/man1/$i.$srcext ]; then - slave2="--slave \ - /usr/share/man/ja/man1/$i.$dstext \ - ${i}_ja.$dstext \ - $mandir/ja/man1/$i.$srcext" - fi - update-alternatives \ - --install \ - /usr/bin/$i \ - $i \ - $basedir/jre/bin/$i \ - $priority \ - $slave1 $slave2 - done - update-alternatives \ - --install /usr/bin/jexec jexec $basedir/jre/lib/jexec $priority \ - --slave \ - /usr/share/binfmts/jar \ - jexec-binfmt \ - $basedir/jre/lib/jar.binfmt - fi # update alternatives - - if [ -n "$multiarch" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 7~b147-2.0~pre3-3ubuntu2~; then - for d in cmm; do - if [ -d $basedir/jre/lib/$d ] && [ ! -h $basedir/jre/lib/$d ]; then - rm -rf $basedir/jre/lib/$d - ln -s ../../../java-6-openjdk-common/jre/lib/$d $basedir/jre/lib/$d - fi - done - fi - - # register binfmt; ignore errors, the alternative may already be - # registered by another JRE. - if which update-binfmts >/dev/null && [ -r /usr/share/binfmts/jar ]; then - update-binfmts --package @basename@ --import jar || true - fi - - # activate class data sharing - case @archdir@ in i386|sparc) - rm -f $basedir/jre/lib/@archdir@/client/classes.jsa - log=$(tempfile) - if ! $basedir/bin/java -client -Xshare:dump -XX:PermSize=128m > $log; then - cat >&2 $log - rm -f $log - # this may fail on some machines/configurations, just ignore it. - echo >&2 "ignoring dump failure" - #exit 1 - fi - rm -f $log - esac - case @archdir@ in amd64|i386|sparc) - rm -f $basedir/jre/lib/@archdir@/server/classes.jsa - log=$(tempfile) - if ! $basedir/bin/java -server -Xshare:dump > $log; then - cat >&2 $log - rm -f $log - # this may fail on some machines/configurations, just ignore it. - echo >&2 "ignoring dump failure" - #exit 1 - fi - rm -f $log - esac - - if [ -n "$multiarch" ]; then - if [ ! -h /@basedir@/jre/lib/zi ] && [ -d /@basedir@/jre/lib/zi ]; then - rm -rf /@basedir@/jre/lib/zi - ln -s ../../../../../share/javazi /@basedir@/jre/lib/zi - fi - fi - - ;; - -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/JB-jre-headless.postrm.in b/debian/JB-jre-headless.postrm.in deleted file mode 100644 index 5c8811f..0000000 --- a/debian/JB-jre-headless.postrm.in +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -set -e - -multiarch=@multiarch@ -jdirname=@jdirname@ -etcdir=/@etcdir@ - -case "$1" in -purge) - if [ -z "$jdirname" ] || [ -z "$etcdir" ]; then - echo >&2 "$(basename $0): Internal error" - exit 1 - fi - # removals of config files in /etc is handled by dpkg - - # XXX should remove /etc/.java ??? - ;; -esac - -#DEBHELPER# diff --git a/debian/JB-jre-headless.preinst.in b/debian/JB-jre-headless.preinst.in deleted file mode 100644 index ed5a69f..0000000 --- a/debian/JB-jre-headless.preinst.in +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh - -set -e - -if [ -h /usr/share/doc/@basename@-jre-headless ]; then - rm -f /usr/share/doc/@basename@-jre-headless -fi - -multiarch=@multiarch@ -old_basedir=/usr/lib/jvm/java-7-openjdk -jre_tools='java keytool pack200 rmid rmiregistry unpack200 orbd servertool tnameserv' - -case "$1" in - upgrade) - if [ -n "$multiarch" ] && [ -n "$2" ]; then - for i in $jre_tools; do - if [ -n "$(update-alternatives --list $i 2>/dev/null | grep ^$old_basedir/)" ]; then - update-alternatives --remove $i $old_basedir/jre/bin/$i || true - fi - done - if [ -n "$(update-alternatives --list jexec 2>/dev/null | grep ^$old_basedir/)" ]; then - update-alternatives --remove jexec $old_basedir/jre/lib/jexec || true - fi - fi - ;; -esac - -#DEBHELPER# diff --git a/debian/JB-jre-headless.prerm.in b/debian/JB-jre-headless.prerm.in deleted file mode 100644 index d8e24ce..0000000 --- a/debian/JB-jre-headless.prerm.in +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -set -e - -basedir=/@basedir@ -jre_tools='@jre_hl_tools@' - -rm -f $basedir/jre/lib/@archdir@/client/classes.jsa -rm -f $basedir/jre/lib/@archdir@/server/classes.jsa - -if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then - for i in $jre_tools; do - update-alternatives --remove $i $basedir/jre/bin/$i - done - - if which update-binfmts >/dev/null; then - # try to remove and ignore the error - if [ -e /var/lib/binfmts/@basename@ ]; then - update-binfmts --package @basename@ \ - --remove jar /usr/bin/jexec || true - fi - fi - - update-alternatives --remove jexec $basedir/jre/lib/jexec -fi - -#DEBHELPER# diff --git a/debian/changelog b/debian/changelog index fb6c6fd..8780883 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,11 @@ openjdk-7 (7u25-2.3.12-4.1) UNRELEASED; urgency=low - run autoreconf, instead of aclocal, automake and autoconf (Closes: #724083) [ Andreas Beckmann ] + * openjdk-7-jre-core: New package split from openjdk-7-jre-headless to allow + breaking the dependency cycle with ca-certificates-java. All binaries, + libraries, the alternatives and binfmt handling, and most dependencies + have been moved to the new package. Only in very rare circumstances other + packages should depend on openjdk-7-jre-core. * openjdk-7-jre-lib: Break circular dependency with openjdk-7-jre-headless by downgrading the Depends to Recommends. Make /u/s/d/openjdk-7-jre-lib a real directory instead of a symbolic link to openjdk-7-jre-headless. diff --git a/debian/control.in b/debian/control.in index f6452b8..fba7923 100644 --- a/debian/control.in +++ b/debian/control.in @@ -24,16 +24,30 @@ Description: OpenJDK Development Kit (JDK) The packages are built using the IcedTea build support and patches from the IcedTea project. +Package: @basename@-jre-core +Architecture: @any_archs@ +Multi-Arch: same +Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends} +Depends: @basename@-jre-lib (= ${source:Version}), ${jredefault:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends} +Conflicts: ${multiarch:Conflicts} +Breaks: icedtea-netx (<< 1.4-2), @basename@-jre-headless (<< 7u25-2.3.12-4.0) +Replaces: @basename@-jre-headless (<< 7u25-2.3.12-4.0) +Recommends: @basename@-jre-headless (>= ${base:Version}) +Description: OpenJDK Java runtime, using ${vm:Name} (core) + Minimal Java runtime core - needed for installing packages. + Using ${vm:Name}. + . + The packages are built using the IcedTea build support and patches + from the IcedTea project. + Package: @basename@-jre-headless Architecture: @any_archs@ Multi-Arch: same Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends} -Depends: @basename@-jre-lib (= ${source:Version}), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends} +Depends: @basename@-jre-core (= ${binary:Version}), ${cacert:Depends}, ${shlibs:Depends}, ${misc:Depends} Recommends: ${dlopenhl:Recommends}, ${jamvm:Recommends} Suggests: ${cacao:Recommends}, libnss-mdns, sun-java6-fonts, @core_fonts@, @cjk_fonts@ Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides} -Conflicts: ${multiarch:Conflicts} -Breaks: icedtea-netx (<< 1.4-2) Description: OpenJDK Java runtime, using ${vm:Name} (headless) Minimal Java runtime - needed for executing non GUI Java programs. Using ${vm:Name}. diff --git a/debian/rules b/debian/rules index dd0adae..b04f476 100755 --- a/debian/rules +++ b/debian/rules @@ -854,6 +854,7 @@ else endif p_jre = $(basename)-jre +p_core = $(basename)-jre-core p_jrehl = $(basename)-jre-headless p_jrec = icedtea-$(shortver)-jre-cacao p_jrej = icedtea-$(shortver)-jre-jamvm @@ -867,6 +868,7 @@ p_dbg = $(basename)-dbg d = debian/tmp d_jre = debian/$(p_jre) +d_core = debian/$(p_core) d_jrehl = debian/$(p_jrehl) d_jrec = debian/$(p_jrec) d_jrej = debian/$(p_jrej) @@ -1586,7 +1588,7 @@ endif : # now move things to the packages. it is so ****** to create : # .install files first. dh_movefiles did do the job perfectly - : # $(p_jrehl).install / $(p_jre).install + : # $(p_core).install / $(p_jrehl).install / $(p_jre).install ( \ echo 'etc'; \ echo '$(basedir)/jre/lib/jexec'; \ @@ -1594,12 +1596,12 @@ endif echo '$(basedir)/jre/man/ja'; \ echo '$(basedir)/man/ja'; \ echo '$(basedir)/bin/java-rmi.cgi'; \ - ) > debian/$(p_jrehl).install + ) > debian/$(p_core).install ifneq (,$(DEB_HOST_MULTIARCH)) ( \ echo '$(basedir)/jre/lib/meta-index'; \ echo '$(basedir)/jre/lib/ext/meta-index'; \ - ) >> debian/$(p_jrehl).install + ) >> debian/$(p_core).install endif $(RM) debian/$(p_jre).install @@ -1607,7 +1609,7 @@ endif for i in $(basedir)/jre/{bin,man/man1,man/ja_JP.UTF-8/man1}/*; do \ case "$$i" in \ */policytool*) echo $$i >> ../$(p_jre).install;; \ - *) echo $$i >> ../$(p_jrehl).install; \ + *) echo $$i >> ../$(p_core).install; \ esac; \ done @@ -1616,7 +1618,7 @@ endif [ -h $$i ] || continue; \ case "$$i" in \ */policytool*) echo $$i >> ../$(p_jre).install;; \ - *) echo $$i >> ../$(p_jrehl).install; \ + *) echo $$i >> ../$(p_core).install; \ esac; \ done; \ @@ -1627,7 +1629,7 @@ endif */cacao) echo $$i >> ../$(p_jrec).install;; \ */jamvm) echo $$i >> ../$(p_jrej).install;; \ */zero|*/shark) echo $$i >> ../$(p_jrez).install;; \ - *) echo $$i >> ../$(p_jrehl).install; \ + *) echo $$i >> ../$(p_core).install; \ esac; \ done @@ -1710,11 +1712,13 @@ endif -e '// permission java.security.AllPermission;\' \ -e '//};\' \ -e '' \ - $(d_jrehl)/$(security)/java.policy + $(d_core)/$(security)/java.policy # 'make Emacs Makefile mode happy dh_installdirs -p$(p_jrehl) \ - usr/share/doc/$(p_jrehl) \ + usr/share/doc/$(p_jrehl) + + dh_installdirs -p$(p_core) \ usr/share/binfmts dh_installdirs -p$(p_jre) \ @@ -1806,22 +1810,22 @@ endif ifeq ($(with_tzdata),yes) echo usr/share/javazi $(basedir)/jre/lib/zi \ - >> $(if $(DEB_HOST_MULTIARCH),$(d_jrehl),$(d_lib)).links + >> $(if $(DEB_HOST_MULTIARCH),$(d_core),$(d_lib)).links endif : # create links for the config files - find $(d_jrehl)/$(etcdir) -type f ! -name jvm.cfg \ - -printf "$(etcdir)/%P $(basedir)/jre/lib/%P\n" >> $(d_jrehl).links + find $(d_core)/$(etcdir) -type f ! -name jvm.cfg \ + -printf "$(etcdir)/%P $(basedir)/jre/lib/%P\n" >> $(d_core).links ifneq (,$(DEB_HOST_MULTIARCH)) - mv $(d_jrehl)/$(etcdir)/jvm.cfg \ - $(d_jrehl)/$(etcdir)/jvm-$(DEB_HOST_ARCH).cfg + mv $(d_core)/$(etcdir)/jvm.cfg \ + $(d_core)/$(etcdir)/jvm-$(DEB_HOST_ARCH).cfg ( \ echo "$(etcdir)/jvm-$(DEB_HOST_ARCH).cfg $(basedir)/jre/lib/$(archdir)/jvm.cfg"; \ - ) >> $(d_jrehl).links + ) >> $(d_core).links else ( \ echo "$(etcdir)/jvm.cfg $(basedir)/jre/lib/$(archdir)/jvm.cfg"; \ - ) >> $(d_jrehl).links + ) >> $(d_core).links endif ifneq (,$(pkg_certs)) echo "etc/ssl/certs/java/cacerts $(basedir)/jre/lib/security/cacerts" \ @@ -1850,16 +1854,16 @@ endif for d in $(browser_plugin_dirs); do \ echo "plugin $$d-javaplugin.so /$(basedir)/jre/lib/$(archdir)/$(plugin_name)"; \ done; \ - ) > $(d_jrehl)/$(TOP)/.$(jdiralias).jinfo + ) > $(d_core)/$(TOP)/.$(jdiralias).jinfo ( \ echo 'package $(basename)'; \ echo 'interpreter /usr/bin/jexec'; \ echo 'magic PK\x03\x04'; \ - ) > $(d_jrehl)/$(basedir)/jre/lib/jar.binfmt + ) > $(d_core)/$(basedir)/jre/lib/jar.binfmt : # another jvm symlink - ln -sf $(jdirname) $(d_jrehl)/usr/lib/jvm/$(jdiralias) + ln -sf $(jdirname) $(d_core)/usr/lib/jvm/$(jdiralias) ifeq ($(with_systemtap),yes) : # systemtap support @@ -1878,10 +1882,10 @@ ifneq (,$(DEB_HOST_MULTIARCH)) : # create symlinks for the files in $(p_lib) find $(d_lib)/$(commonbasedir) \ ! -name zi ! -name meta-index \( -name cmm -prune -o -type f \) \ - -printf "$(commonbasedir)/%P $(basedir)/%P\n" >> $(d_jrehl).links + -printf "$(commonbasedir)/%P $(basedir)/%P\n" >> $(d_core).links ifeq ($(with_tzdata),yes) echo usr/share/javazi $(basedir)/jre/lib/zi \ - >> $(d_jrehl).links + >> $(d_core).links endif endif @@ -1931,7 +1935,7 @@ endif dh_md5sums -i $(nodocs) dh_builddeb -i $(nodocs) $(bd_options) -absarchdir = $(CURDIR)/$(d_jrehl)/$(basedir)/jre/lib/$(archdir) +absarchdir = $(CURDIR)/$(d_core)/$(basedir)/jre/lib/$(archdir) shlibdeps_ld_path =$(absarchdir):$(absarchdir)/client:$(absarchdir)/server:$(absarchdir)/native_threads$(if $(xulrunner_depends),:$(shell pkg-config --libs-only-L libxul | sed 's/^-L//;s/-devel//;s,/lib *$$,,')) # pass vm name as first argument @@ -1951,6 +1955,8 @@ endef binary-arch: build install dh_testdir dh_testroot + dh_installchangelogs -p$(p_core) + dh_installdocs -p$(p_core) dh_installchangelogs -p$(p_jrehl) dh_installdocs -p$(p_jrehl) \ debian/JAVA_HOME \ @@ -1991,7 +1997,7 @@ endif -Xlibjvm.so --dbg-package=$(p_dbg) ifeq (,$(findstring nostrip, $(DEB_BUILD_OPTIONS))) set -e; \ - for i in {$(d_jrehl),$(d_jrec),$(d_jrez)}/$(basedir)/jre/lib/$(archdir)/*/libjvm.so; do \ + for i in {$(d_core),$(d_jrec),$(d_jrez)}/$(basedir)/jre/lib/$(archdir)/*/libjvm.so; do \ id=$$(echo $$i | sed -r 's,debian/[^/]+,$(d_dbg)/usr/lib/debug,'); \ [ -f $$i ] || continue; \ echo strip $$i; \ @@ -2006,8 +2012,8 @@ endif dh_compress -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -Xexamples -Xdemos -Xpackage-list dh_fixperms -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) - dh_makeshlibs -p$(p_jrehl) -p$(p_jre) - dh_shlibdeps -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -L $(p_jrehl) \ + dh_makeshlibs -p$(p_core) -p$(p_jre) + dh_shlibdeps -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -L $(p_core) \ -l$(shlibdeps_ld_path) \ -- dh_installdeb -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) -- 1.7.10.4