[openjdk-8] 01/04: Added a script to download the upstream tarball
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue Apr 1 22:09:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository openjdk-8.
commit 51c5e8915ad4a85594550e528621153b32e64db7
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Tue Apr 1 22:54:47 2014 +0200
Added a script to download the upstream tarball
---
debian/README.source | 102 +++++++++++++++-----------------------
debian/generate-debian-orig.sh | 69 --------------------------
debian/generate-dfsg-zip.sh | 60 ----------------------
debian/generate_source_tarball.sh | 61 +++++++++++++++++++++++
debian/orig-tar.sh | 15 ++++++
debian/rules | 4 ++
debian/update-hgrev.sh | 29 -----------
debian/update-shasum.sh | 27 ----------
8 files changed, 119 insertions(+), 248 deletions(-)
diff --git a/debian/README.source b/debian/README.source
index 583cedb..843de16 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,79 +1,55 @@
-Content of source package
-=========================
-"openjdk7" is a composite source package:
-- Based on IcedTea <http://icedtea.classpath.org/> which provides
- a harness to build the source code from Oracle OpenJDK.
-- Multiple tarballs from each Oracle mercurial repositories :
- corba / hotspot / jaxp / jaxws / jdk-dfsg / langtools / openjdk
-- Tarball from CacaoVM <http://www.cacaovm.org/>.
+Content of the openjdk-8 source package
+---------------------------------------
+
+openjdk8 is a composite source package. It consists in:
+
+- Multiple tarballs containing the sources of the different VMs or ports
+ supported.
+
- Debian packaging scripts and patches.
-Building a new OpenJDK+IcedTea-7 Debian package
-===================================================
-Pre-requisites:
-- Mercurial
-- Bazaar
- sudo aptitude install mercurial bzr
-
-0) Clone OpenJDK debian packaging:
- bzr branch lp:~openjdk/openjdk/openjdk7 openjdk7/
- or update existing repository clone:
- (cd openjdk7/; bzr pull --remember lp:~openjdk/openjdk/openjdk7)
-
-1) Clone IcedTea-7 HG:
- hg clone http://icedtea.classpath.org/hg/icedtea7 icedtea-2.1.1/
- or update existing repository clone:
- (cd icedtea7/; hg pull -u)
-
-2) Download OpenJDK upstream tarballs and move them to $BUILD/
- export BUILD=7u3
- mkdir -p $BUILD/
- (
- cd icedtea-2.1.1/
- sh autogen.sh && ./configure --enable-jamvm --enable-cacao
- make download
- )
-
- mv icedtea-2.1.1/*.tar.gz $BUILD/
- (
- cd icedtea-2.1.1/
- make distclean
- )
-
-3) Remove files with unclear license from jdk.tar.gz:
- sh openjdk7/generate-dfsg-zip.sh $BUILD/jdk.tar.gz
- sh openjdk7/generate-dfsg-zip.sh $BUILD/langtools.tar.gz
-
-4) Check tarballs' name and version (for original directory name)
- in openjdk7/generate-debian-orig.sh and package version in
- openjdk7/changelog
-
-5) Generate "orig" directory and "orig+debian" directory
- sh openjdk7/generate-debian-orig.sh
+- IcedTea patches (http://icedtea.classpath.org/wiki/IcedTea_Patches_for_OpenJDK_8)
+
+
+Building a new OpenJDK 8 Debian package
+---------------------------------------
+
+0) Clone the OpenJDK 8 debian packaging:
+
+ git clone git+ssh://git.debian.org/git/pkg-java/openjdk-8
+
+1) Update the version in debian/changelog
+
+2) Download the sources and build the upstream tarball:
+
+ ./debian/rules get-orig-source
+
+3) Extract the upstream tarball in the current directory
+
Support for DEB_BUILD_OPTIONS
-=============================
+-----------------------------
+
As described in Debian Policy §4.9.1, current package's debian/rules support
the standardized environment variable DEB_BUILD_OPTIONS. This variable can
contain several flags to change how a package is compiled and built.
- * nocheck: don't run mauve and jtreg test suites.
- * nodocs: pass --disable-docs to IcedTea configure script, which
- disable Javadoc generation.
- * nostrip: debugging symbols should not be stripped from the
- binary during installation
- * parallel=X: package should be built using up to X parallel processes
+ * nocheck: don't run mauve and jtreg test suites.
+ * nodocs: disable Javadoc generation.
+ * nostrip: debugging symbols should not be stripped from the
+ binary during installation
+ * parallel=X: package should be built using up to X parallel processes
* nobootstrap: don't use gcj to bootstrap OpenJDK but use existing OpenJDK
installed on current machine.
- * noaltcacao: don't build alternative CACao VM.
- * noaltzero: don't build alternative Zero VM.
- * noaltshark: don't build alternative Shark VM.
- * noaltjamvm: don't build alternative Jamvm VM.
+ * noaltcacao: don't build alternative Cacao VM.
+ * noaltzero: don't build alternative Zero VM.
+ * noaltshark: don't build alternative Shark VM.
+ * noaltjamvm: don't build alternative Jamvm VM.
Sample usage:
-DEB_BUILD_OPTIONS="parallel=5 nocheck" debuild -i"(\.hg|\.bzr)"
+DEB_BUILD_OPTIONS="parallel=5 nocheck" debuild -i"(\.hg|\.bzr|\.git)"
Build with 5 parallel processes and don't run mauve/jtreg test suites.
This also work with cowbuilder/pbuilder:
-DEB_BUILD_OPTIONS="parallel=5 nocheck" pdebuild -i"(\.hg|\.bzr)" --logfile ../build.log --pbuilder cowbuilder
+DEB_BUILD_OPTIONS="parallel=5 nocheck" pdebuild -i"(\.hg|\.bzr|\.git)" --logfile ../build.log --pbuilder cowbuilder
diff --git a/debian/generate-debian-orig.sh b/debian/generate-debian-orig.sh
deleted file mode 100644
index 512ed3b..0000000
--- a/debian/generate-debian-orig.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-tarballs="corba.tar.gz hotspot.tar.gz jaxp.tar.gz jaxws.tar.gz jdk.tar.gz langtools.tar.gz openjdk.tar.gz"
-jamvmtb=jamvm-ac22c9948434e528ece451642b4ebde40953ee7e.tar.gz
-cacaotb=cacao-e215e36be9fc.tar.gz
-tarballdir=7u51
-version=7u51-2.4.5
-base=openjdk-7
-pkgdir=$base-$version
-origtar=${base}_${version}.orig.tar.gz
-
-icedtea_checkout=icedtea7-2.3
-icedtea_checkout=icedtea-2.4.5
-debian_checkout=openjdk7
-
-if [ -d $pkgdir ]; then
- echo directory $pkgdir already exists
- exit 1
-fi
-
-if [ -d $pkgdir.orig ]; then
- echo directory $pkgdir.orig already exists
- exit 1
-fi
-
-if [ -f $origtar ]; then
- echo "Using existing $origtar"
- tar xf $origtar
- if [ -d $pkgdir.orig ]; then
- mv $pkgdir.orig $pkgdir
- fi
- tar -c -f - -C $icedtea_checkout . | tar -x -f - -C $pkgdir
- rm -rf $pkgdir/.hg
-else
- echo "Creating new $pkgdir.orig/"
- rm -rf $pkgdir.orig
- mkdir -p $pkgdir.orig
- case "$base" in
- openjdk*)
- for i in $tarballs; do
- cp -p $tarballdir/$i $pkgdir.orig/
- done
- if [ -n "$cacaotb" ]; then
- cp -p $tarballdir/$cacaotb $pkgdir.orig/
- fi
- cp -p $tarballdir/$jamvmtb $pkgdir.orig/
- ;;
- esac
- tar -c -f - -C $icedtea_checkout . | tar -x -f - -C $pkgdir.orig
- (
- cd $pkgdir.orig
- sh autogen.sh
- rm -rf autom4te.cache
- )
- cp -a $pkgdir.orig $pkgdir
- rm -rf $pkgdir.orig/.hg
-fi
-
-echo "Build debian diff in $pkgdir/"
-cp -a $debian_checkout $pkgdir/debian
-(
- cd $pkgdir
- #bash debian/update-shasum.sh
- #bash debian/update-hgrev.sh
- ls
- patch -p0 < debian/patches/icedtea-patch.diff
- sh autogen.sh
- rm -rf autom4te.cache
-)
diff --git a/debian/generate-dfsg-zip.sh b/debian/generate-dfsg-zip.sh
deleted file mode 100644
index 200be94..0000000
--- a/debian/generate-dfsg-zip.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-
-if [ ! -f "$1" ]; then
- echo "does not exist: $1"
- exit 1
-fi
-
-jdkdir=$(tar tf $1 | head -1 | sed 's,/.*,,')
-echo $jdkdir
-
-dist=$(lsb_release -is)
-
-echo "not needed anymore. 2.4.4 has both jdk and langtools cleaned up"
-exit 1
-
-# Untar openjdk source zip.
-rm -rf openjdk
-case "$1" in
- *.zip) unzip -q -x $1 ;;
- *.tar*) tar xf $1;;
-esac
-
-case "$1" in
- *jdk*)
- echo "Cleanup jdk tarball..."
- # Remove J2DBench sources, some of which have questionable license
- # headers.
- rm -rf \
- $jdkdir/src/share/demo/java2d/J2DBench
-
- # binary files
- rm -f \
- $jdkdir/test/sun/net/idn/*.spp
-
- rm -rf \
- $jdkdir/test/sun/security/pkcs11/nss/lib/*
-
- rm -f \
- $jdkdir/test/java/util/Locale/data/deflocale.sh \
- $jdkdir/test/java/util/Locale/data/deflocale.rhel5 \
- $jdkdir/test/java/util/Locale/data/deflocale.rhel5.fmtasdefault \
- $jdkdir/test/java/util/Locale/data/deflocale.sol10.fmtasdefault \
- $jdkdir/test/java/util/Locale/data/deflocale.win7 \
- $jdkdir/test/java/util/Locale/data/deflocale.win7.fmtasdefault
-;;
-
- *langtools*)
- echo "Cleanup langtools tarball..."
- rm -rf $jdkdir/test/tools/javac/T5090006/broken.jar
-;;
-
-esac
-
-# Create new zip with new name.
-
-NEW_ZIP=$(echo $1 | sed -e 's/\.tar.gz/-dfsg.tar.gz/;s/\.zip/-dfsg.tar.gz/')
-GZIP=-9v tar -cz -f $NEW_ZIP $jdkdir
-
-# Remove old unzipped openjdk dir.
-rm -rf $jdkdir
diff --git a/debian/generate_source_tarball.sh b/debian/generate_source_tarball.sh
new file mode 100755
index 0000000..01827b6
--- /dev/null
+++ b/debian/generate_source_tarball.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+# Generates the 'source tarball' for JDK 8 projects.
+#
+# Usage: generate_source_tarball.sh repo_name tag
+#
+# Examples:
+# ./generate_source_tarball.sh jdk8 jdk8-b79
+# ./generate_source_tarball.sh aarch64-port aarch64-${DATE}
+#
+# This script creates a single source tarball out of the repository
+# based on the given tag and removes code not allowed in Debian.
+#
+# This script was adapted from the java-1.8.0-openjdk package in Fedora
+
+set -e
+
+REPO_NAME="$1"
+VERSION="$2"
+JDK8_URL=http://hg.openjdk.java.net
+
+if [[ "${REPO_NAME}" = "" ]] ; then
+ echo "No repository specified."
+ exit -1
+fi
+if [[ "${VERSION}" = "" ]]; then
+ echo "No version/tag specified."
+ exit -1;
+fi
+
+mkdir -p "${REPO_NAME}"
+pushd "${REPO_NAME}"
+
+REPO_ROOT="${JDK8_URL}/${REPO_NAME}/jdk8"
+
+wget "${REPO_ROOT}/archive/${VERSION}.tar.gz"
+tar xf "${VERSION}.tar.gz"
+rm "${VERSION}.tar.gz"
+
+mv "jdk8-${VERSION}" jdk8
+pushd jdk8
+
+for subrepo in corba hotspot jdk jaxws jaxp langtools nashorn
+do
+ wget "${REPO_ROOT}/${subrepo}/archive/${VERSION}.tar.gz"
+ tar xf "${VERSION}.tar.gz"
+ rm "${VERSION}.tar.gz"
+ mv "${subrepo}-${VERSION}" "${subrepo}"
+done
+
+rm -vr jdk/src/share/native/sun/security/ec/impl
+
+popd
+
+tar cJf ${REPO_NAME}-${VERSION}.tar.xz jdk8
+
+popd
+
+mv "${REPO_NAME}/${REPO_NAME}-${VERSION}.tar.xz" .
+
+rm -Rf ${REPO_NAME}
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..d12102c
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+
+VERSION=$2
+VERSION=8~b132
+TAR=../openjdk-8_$VERSION.orig.tar.gz
+DIR=openjdk8
+BUILDVER=b132
+
+debian/generate_source_tarball.sh jdk8 jdk8-$BUILDVER
+debian/generate_source_tarball.sh aarch64-port jdk8-$BUILDVER
+
+mkdir $DIR
+mv *.tar.xz $DIR
+tar -czvf $TAR $DIR
+rm -Rf $DIR $3
diff --git a/debian/rules b/debian/rules
index ed21f7b..dac4301 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1806,4 +1806,8 @@ endif
dh_builddeb -s $(nodemo) $(nojrec) $(nojrej) $(nojrez) #$(bd_options)
binary: binary-arch binary-indep
+
+get-orig-source:
+ ./debian/orig-tar.sh
+
.PHONY: build clean binary-indep binary-arch binary install packaging-files
diff --git a/debian/update-hgrev.sh b/debian/update-hgrev.sh
deleted file mode 100755
index 7bd056e..0000000
--- a/debian/update-hgrev.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-tarballs=(corba.tar.gz hotspot.tar.gz jaxp.tar.gz jaxws.tar.gz jdk-dfsg.tar.gz langtools-dfsg.tar.gz openjdk.tar.gz)
-varhgchange=(CORBA_CHANGESET HOTSPOT_CHANGESET JAXP_CHANGESET JAXWS_CHANGESET JDK_CHANGESET LANGTOOLS_CHANGESET OPENJDK_CHANGESET)
-tarballdir=.
-
-makefile1=Makefile.am
-
-function update_var() {
- varname=$1
- newsum=$2
-
- echo "$varname: ${newsum}"
- if [ -f $makefile1 ]; then
- sed -i "s/\(^$varname\)\(..*$\)/\1 = ${newsum}/" $makefile1
- fi
-}
-
-function actual_tar_rev() {
- tar=$1
-
- revision=$(tar tf $tar | head -1 | sed 's,/.*,,' | sed 's,.*-,,')
-}
-
-# For all modules
-for (( i = 0 ; i < ${#varhgchange[@]} ; i++ )); do
- actual_tar_rev $tarballdir/${tarballs[$i]}
- update_var ${varhgchange[$i]} $revision
-done
\ No newline at end of file
diff --git a/debian/update-shasum.sh b/debian/update-shasum.sh
deleted file mode 100755
index e1ba2fc..0000000
--- a/debian/update-shasum.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-tarballs=(jdk-dfsg.tar.gz langtools-dfsg.tar.gz)
-varshasum=(JDK_SHA256SUM LANGTOOLS_SHA256SUM)
-tarballdir=.
-
-makefile1=Makefile.am
-
-function update_var() {
- varname=$1
- newsum=$2
-
- echo "$varname: ${newsum}"
- if [ -f $makefile1 ]; then
- sed -i "s/\(^$varname\)\(..*$\)/\1 = ${newsum}/" $makefile1
- fi
-}
-
-# For all modules
-for (( i = 0 ; i < ${#tarballs[@]} ; i++ )); do
- newsum=$(sha256sum $tarballdir/${tarballs[$i]} | cut -f 1 -d ' ')
- update_var ${varshasum[$i]} $newsum
-done
-
-# Use downloaded cacao source tarball
-#newsum=$(sha256sum $tarballdir/cacao-*.tar.* | cut -f 1 -d ' ')
-#update_var "CACAO_SHA256SUM" $newsum
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/openjdk-8.git
More information about the pkg-java-commits
mailing list