diff --git a/component/java/buildout.cfg b/component/java/buildout.cfg index da200727ffc06ab0172e47eaa56f6f7e27c8222e..905423c11cf176177c804a90704139f760894d70 100644 --- a/component/java/buildout.cfg +++ b/component/java/buildout.cfg @@ -2,8 +2,77 @@ parts = java - + +[jdk-6u27-no-user-interaction-patch] +recipe = hexagonit.recipe.download +url = ${:_profile_base_location_}/${:filename} +download-only = true +filename = jdk-6u27-no-user-interaction.patch +md5sum = 4c4303240647a114d07f3c411b2e6b5b + [java] +<= java-re + +[java-re] +<= java-re-1.6.0 + +[java-sdk] +<= java-sdk-1.6.0 + +[java-re-1.6.0] +recipe = slapos.recipe.build +slapos_promisee = + directory:bin + directory:lib + directory:man + directory:plugin + directory:javaws + file:lib/rt.jar + file:bin/java +x86 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=52240 0bd27d325c5ce11ce863d982ad052f7f +x86-64 = http://javadl.sun.com/webapps/download/AutoDL?BundleId=52242 a4d929bc4d6511290c07c3745477b77b +script = + if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ') + download_file = self.download(self.options['url'], self.options.get('md5sum')) + extract_dir = tempfile.mkdtemp(self.name) + os.chdir(extract_dir) + (download_dir, filename) = os.path.split(download_file) + auto_extract_bin = os.path.join(extract_dir, filename) + shutil.move(download_file, auto_extract_bin) + os.chmod(auto_extract_bin, 0777) + subprocess.call([auto_extract_bin]) + self.cleanup_dir_list.append(extract_dir) + workdir = guessworkdir(extract_dir) + self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s") + +[java-sdk-1.6.0] +recipe = slapos.recipe.build +slapos_promisee = + directory:bin + directory:lib + directory:man + directory:plugin + directory:javaws + file:jre/lib/rt.jar + file:bin/java +x86 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-i586.bin bdb5f05bd20c6aa9a4729726191bf6fd +x86-64 = http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-x64.bin 94f93a3ff03f824a238ecd79ad90433e +script = + if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ') + download_file = self.download(self.options['url'], self.options.get('md5sum')) + extract_dir = tempfile.mkdtemp(self.name) + os.chdir(extract_dir) + (download_dir, filename) = os.path.split(download_file) + auto_extract_bin = os.path.join(extract_dir, filename) + shutil.move(download_file, auto_extract_bin) + os.chmod(auto_extract_bin, 0777) + subprocess.call(["patch", auto_extract_bin, "-i", "${jdk-6u27-no-user-interaction-patch:location}/${jdk-6u27-no-user-interaction-patch:filename}"]) + subprocess.call([auto_extract_bin]) + self.cleanup_dir_list.append(extract_dir) + workdir = guessworkdir(extract_dir) + self.copyTree(os.path.join(workdir, "jdk1.6.0_27"), "%(location)s") + +[java-sdk-1.7.0] recipe = slapos.recipe.build slapos_promisee = directory:bin @@ -20,3 +89,4 @@ script = extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum'))) workdir = guessworkdir(extract_dir) self.copyTree(workdir, "%(location)s") + diff --git a/component/java/jdk-6u27-no-user-interaction.patch b/component/java/jdk-6u27-no-user-interaction.patch new file mode 100644 index 0000000000000000000000000000000000000000..b217852d4e9b4ea42bdf9992c58bb5dab4b0dd6c --- /dev/null +++ b/component/java/jdk-6u27-no-user-interaction.patch @@ -0,0 +1,20 @@ +--- jdk-6u27-linux-x64.bin.orig 2011-09-27 11:02:14.000000000 +0200 ++++ jdk-6u27-linux-x64.bin 2011-09-27 10:38:01.000000000 +0200 +@@ -81,7 +81,7 @@ + trap 'rm -f $outname; exit 1' HUP INT QUIT TERM + echo "Unpacking..." + tail ${tail_args} +189 "$0" > $outname +-if [ -x /usr/bin/sum ]; then ++if [ -x /usr/bin/null ]; then + echo "Checksumming..." + + sum=`/usr/bin/sum $outname` +@@ -169,7 +169,7 @@ + fi + + # Service Tag support and JDK product registration +- register_JDK "$javahome" "${BINARY_NAME}" "$1" ++ # register_JDK "$javahome" "${BINARY_NAME}" "$1" + + else + if [ "$1" = "-x" ]; then