common/conf/jib-profiles.js
changeset 45206 ea8a7db01e03
parent 45048 665cd82e98dc
child 45163 cca20dff94e1
child 46218 3850de6acd8e
equal deleted inserted replaced
45205:3837a9dfb3b6 45206:ea8a7db01e03
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   229     common.build_number = input.build_number != null ? input.build_number : "0";
   229     common.build_number = input.build_number != null ? input.build_number : "0";
   230 
   230 
   231     // List of the main profile names used for iteration
   231     // List of the main profile names used for iteration
   232     common.main_profile_names = [
   232     common.main_profile_names = [
   233         "linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
   233         "linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
   234         "solaris-sparcv9", "windows-x64", "windows-x86"
   234         "solaris-sparcv9", "windows-x64", "windows-x86",
       
   235         "linux-arm64", "linux-arm-vfp-hflt", "linux-arm-vfp-hflt-dyn"
   235     ];
   236     ];
   236 
   237 
   237     // These are the base setttings for all the main build profiles.
   238     // These are the base setttings for all the main build profiles.
   238     common.main_profile_base = {
   239     common.main_profile_base = {
   239         dependencies: ["boot_jdk", "gnumake", "jtreg"],
   240         dependencies: ["boot_jdk", "gnumake", "jtreg"],
   240         default_make_targets: ["product-bundles", "test-bundles"],
   241         default_make_targets: ["product-bundles", "test-bundles"],
   241         configure_args: [
   242         configure_args: concat(["--enable-jtreg-failure-handler"],
   242             "--with-version-opt=" + common.build_id,
   243                                versionArgs(input, common))
   243             "--enable-jtreg-failure-handler",
       
   244             "--with-version-build=" + common.build_number
       
   245         ]
       
   246     };
   244     };
   247     // Extra settings for debug profiles
   245     // Extra settings for debug profiles
   248     common.debug_suffix = "-debug";
   246     common.debug_suffix = "-debug";
   249     common.debug_profile_base = {
   247     common.debug_profile_base = {
   250         configure_args: ["--enable-debug"],
   248         configure_args: ["--enable-debug"],
   266     common.configure_args_64bit = ["--with-target-bits=64"];
   264     common.configure_args_64bit = ["--with-target-bits=64"];
   267     common.configure_args_32bit = ["--with-target-bits=32"];
   265     common.configure_args_32bit = ["--with-target-bits=32"];
   268 
   266 
   269     /**
   267     /**
   270      * Define common artifacts template for all main profiles
   268      * Define common artifacts template for all main profiles
   271      * @param pf - Name of platform in bundle names
   269      * @param o - Object containing data for artifacts
   272      * @param demo_ext - Type of extension for demo bundle
       
   273      */
   270      */
   274     common.main_profile_artifacts = function (pf, demo_ext) {
   271     common.main_profile_artifacts = function (o) {
       
   272         var jdk_subdir = (o.jdk_subdir != null ? o.jdk_subdir : "jdk-" + data.version);
       
   273         var jre_subdir = (o.jre_subdir != null ? o.jre_subdir : "jre-" + data.version);
       
   274         var pf = o.platform
   275         return {
   275         return {
   276             artifacts: {
   276             artifacts: {
   277                 jdk: {
   277                 jdk: {
   278                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   278                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   279                     remote: [
   279                     remote: [
   280                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin.tar.gz",
   280                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin.tar.gz",
   281                         "bundles/" + pf + "/\\1"
   281                         "bundles/" + pf + "/\\1"
   282                     ],
   282                     ],
   283                     subdir: "jdk-" + data.version,
   283                     subdir: jdk_subdir,
   284                     exploded: "images/jdk"
   284                     exploded: "images/jdk"
   285                 },
   285                 },
   286                 jre: {
   286                 jre: {
   287                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   287                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   288                     remote: [
   288                     remote: [
   289                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin.tar.gz",
   289                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin.tar.gz",
   290                         "bundles/" + pf + "/\\1"
   290                         "bundles/" + pf + "/\\1"
   291                     ],
   291                     ],
   292                     subdir: "jre-" + data.version,
   292                     subdir: jre_subdir,
   293                     exploded: "images/jre"
   293                     exploded: "images/jre"
   294                 },
   294                 },
   295                 test: {
   295                 test: {
   296                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   296                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   297                     remote: [
   297                     remote: [
   304                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   304                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   305                     remote: [
   305                     remote: [
   306                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
   306                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
   307                         "bundles/" + pf + "/\\1"
   307                         "bundles/" + pf + "/\\1"
   308                     ],
   308                     ],
   309                     subdir: "jdk-" + data.version,
   309                     subdir: jdk_subdir,
   310                     exploded: "images/jdk"
   310                     exploded: "images/jdk"
   311                 },
   311                 },
   312                 jre_symbols: {
   312                 jre_symbols: {
   313                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   313                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   314                     remote: [
   314                     remote: [
   315                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
   315                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-symbols.tar.gz",
   316                         "bundles/" + pf + "/\\1"
   316                         "bundles/" + pf + "/\\1"
   317                     ],
   317                     ],
   318                     subdir: "jre-" + data.version,
   318                     subdir: jre_subdir,
   319                     exploded: "images/jre"
   319                     exploded: "images/jre"
   320                 },
       
   321                 demo: {
       
   322                     local: "bundles/\\(jdk.*demo." + demo_ext + "\\)",
       
   323                     remote: [
       
   324                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_demo." + demo_ext,
       
   325                         "bundles/" + pf + "/\\1"
       
   326                     ],
       
   327                 }
   320                 }
   328             }
   321             }
   329         };
   322         };
   330     };
   323     };
   331 
   324 
   332 
   325 
   333     /**
   326     /**
   334      * Define common artifacts template for all debug profiles
   327      * Define common artifacts template for all debug profiles
   335      * @param pf - Name of platform in bundle names
   328      * @param o - Object containing data for artifacts
   336      */
   329      */
   337     common.debug_profile_artifacts = function (pf) {
   330     common.debug_profile_artifacts = function (o) {
       
   331         var jdk_subdir = "jdk-" + data.version + "/fastdebug";
       
   332         var jre_subdir = "jre-" + data.version + "/fastdebug";
       
   333         var pf = o.platform
   338         return {
   334         return {
   339             artifacts: {
   335             artifacts: {
   340                 jdk: {
   336                 jdk: {
   341                     local: "bundles/\\(jdk.*bin-debug.tar.gz\\)",
   337                     local: "bundles/\\(jdk.*bin-debug.tar.gz\\)",
   342                     remote: [
   338                     remote: [
   343                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz",
   339                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug.tar.gz",
   344                         "bundles/" + pf + "/\\1"
   340                         "bundles/" + pf + "/\\1"
   345                     ],
   341                     ],
   346                     subdir: "jdk-" + data.version,
   342                     subdir: jdk_subdir,
   347                     exploded: "images/jdk"
   343                     exploded: "images/jdk"
   348                 },
   344                 },
   349                 jre: {
   345                 jre: {
   350                     local: "bundles/\\(jre.*bin-debug.tar.gz\\)",
   346                     local: "bundles/\\(jre.*bin-debug.tar.gz\\)",
   351                     remote: [
   347                     remote: [
   352                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz",
   348                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug.tar.gz",
   353                         "bundles/" + pf + "/\\1"
   349                         "bundles/" + pf + "/\\1"
   354                     ],
   350                     ],
   355                     subdir: "jre-" + data.version,
   351                     subdir: jre_subdir,
   356                     exploded: "images/jre"
   352                     exploded: "images/jre"
   357                 },
   353                 },
   358                 test: {
   354                 test: {
   359                     local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)",
   355                     local: "bundles/\\(jdk.*bin-tests-debug.tar.gz\\)",
   360                     remote: [
   356                     remote: [
   367                     local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
   363                     local: "bundles/\\(jdk.*bin-debug-symbols.tar.gz\\)",
   368                     remote: [
   364                     remote: [
   369                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
   365                         "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
   370                         "bundles/" + pf + "/\\1"
   366                         "bundles/" + pf + "/\\1"
   371                     ],
   367                     ],
   372                     subdir: "jdk-" + data.version,
   368                     subdir: jdk_subdir,
   373                     exploded: "images/jdk"
   369                     exploded: "images/jdk"
   374                 },
   370                 },
   375                 jre_symbols: {
   371                 jre_symbols: {
   376                     local: "bundles/\\(jre.*bin-debug-symbols.tar.gz\\)",
   372                     local: "bundles/\\(jre.*bin-debug-symbols.tar.gz\\)",
   377                     remote: [
   373                     remote: [
   378                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
   374                         "bundles/" + pf + "/jre-" + data.version + "_" + pf + "_bin-debug-symbols.tar.gz",
   379                         "bundles/" + pf + "/\\1"
   375                         "bundles/" + pf + "/\\1"
   380                     ],
   376                     ],
   381                     subdir: "jre-" + data.version,
   377                     subdir: jre_subdir,
   382                     exploded: "images/jre"
   378                     exploded: "images/jre"
   383                 }
   379                 }
   384             }
   380             }
   385         };
   381         };
   386     };
   382     };
   389     var boot_jdk_subdirpart = "1.8.0";
   385     var boot_jdk_subdirpart = "1.8.0";
   390     // JDK 8 does not work on sparc M7 cpus, need a newer update when building
   386     // JDK 8 does not work on sparc M7 cpus, need a newer update when building
   391     // on such hardware.
   387     // on such hardware.
   392     if (input.build_cpu == "sparcv9") {
   388     if (input.build_cpu == "sparcv9") {
   393        var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
   389        var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
   394        if (cpu_brand.trim() == 'SPARC-M7') {
   390        if (cpu_brand.trim().match('SPARC-.7')) {
   395            boot_jdk_revision = "8u20";
   391            boot_jdk_revision = "8u20";
   396            boot_jdk_subdirpart = "1.8.0_20";
   392            boot_jdk_subdirpart = "1.8.0_20";
   397        }
   393        }
   398     }
   394     }
   399     common.boot_jdk_revision = boot_jdk_revision;
   395     common.boot_jdk_revision = boot_jdk_revision;
   400     common.boot_jdk_subdirpart = boot_jdk_subdirpart;
   396     common.boot_jdk_subdirpart = boot_jdk_subdirpart;
   401     common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk"
   397     common.boot_jdk_home = input.get("boot_jdk", "home_path") + "/jdk"
   402         + common.boot_jdk_subdirpart
   398         + common.boot_jdk_subdirpart
   403         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
   399         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
       
   400     common.boot_jdk_platform = input.build_os + "-"
       
   401         + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
   404 
   402 
   405     return common;
   403     return common;
   406 };
   404 };
   407 
   405 
   408 /**
   406 /**
   417     var profiles = {
   415     var profiles = {
   418 
   416 
   419         "linux-x64": {
   417         "linux-x64": {
   420             target_os: "linux",
   418             target_os: "linux",
   421             target_cpu: "x64",
   419             target_cpu: "x64",
   422             dependencies: ["devkit"],
   420             dependencies: ["devkit", "graphviz", "pandoc"],
   423             configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
   421             configure_args: concat(common.configure_args_64bit,
       
   422                 "--enable-full-docs", "--with-zlib=system"),
   424             default_make_targets: ["docs-bundles"],
   423             default_make_targets: ["docs-bundles"],
   425         },
   424         },
   426 
   425 
   427         "linux-x86": {
   426         "linux-x86": {
   428             target_os: "linux",
   427             target_os: "linux",
   467             target_os: "windows",
   466             target_os: "windows",
   468             target_cpu: "x86",
   467             target_cpu: "x86",
   469             build_cpu: "x64",
   468             build_cpu: "x64",
   470             dependencies: ["devkit", "freetype"],
   469             dependencies: ["devkit", "freetype"],
   471             configure_args: concat(common.configure_args_32bit),
   470             configure_args: concat(common.configure_args_32bit),
       
   471         },
       
   472 
       
   473         "linux-arm64": {
       
   474             target_os: "linux",
       
   475             target_cpu: "aarch64",
       
   476             build_cpu: "x64",
       
   477             dependencies: ["devkit", "build_devkit", "cups", "headless_stubs"],
       
   478             configure_args: [
       
   479                 "--with-cpu-port=arm64",
       
   480                 "--with-jvm-variants=server",
       
   481                 "--openjdk-target=aarch64-linux-gnu",
       
   482                 "--enable-headless-only"
       
   483             ],
       
   484         },
       
   485 
       
   486         "linux-arm-vfp-hflt": {
       
   487             target_os: "linux",
       
   488             target_cpu: "arm",
       
   489             build_cpu: "x64",
       
   490             dependencies: ["devkit", "build_devkit", "cups"],
       
   491             configure_args: [
       
   492                 "--with-jvm-variants=minimal1,client",
       
   493                 "--with-x=" + input.get("devkit", "install_path") + "/arm-linux-gnueabihf/libc/usr/X11R6-PI",
       
   494                 "--openjdk-target=arm-linux-gnueabihf",
       
   495                 "--with-abi-profile=arm-vfp-hflt"
       
   496             ],
       
   497         },
       
   498 
       
   499         // Special version of the SE profile adjusted to be testable on arm64 hardware.
       
   500         "linux-arm-vfp-hflt-dyn": {
       
   501             configure_args: "--with-stdc++lib=dynamic"
   472         }
   502         }
   473     };
   503     };
       
   504     // Let linux-arm-vfp-hflt-dyn inherit everything from linux-arm-vfp-hflt
       
   505     profiles["linux-arm-vfp-hflt-dyn"] = concatObjects(
       
   506         profiles["linux-arm-vfp-hflt-dyn"], profiles["linux-arm-vfp-hflt"]);
       
   507 
   474     // Add the base settings to all the main profiles
   508     // Add the base settings to all the main profiles
   475     common.main_profile_names.forEach(function (name) {
   509     common.main_profile_names.forEach(function (name) {
   476         profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
   510         profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
   477     });
   511     });
   478 
   512 
   580         testedProfile = input.build_os + "-" + input.build_cpu;
   614         testedProfile = input.build_os + "-" + input.build_cpu;
   581     }
   615     }
   582     var testOnlyProfilesPrebuilt = {
   616     var testOnlyProfilesPrebuilt = {
   583         "run-test-prebuilt": {
   617         "run-test-prebuilt": {
   584             src: "src.conf",
   618             src: "src.conf",
   585             dependencies: [ "jtreg", "gnumake", testedProfile + ".jdk",
   619             dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk",
   586                 testedProfile + ".test", "src.full"
   620                 testedProfile + ".test", "src.full"
   587             ],
   621             ],
   588             work_dir: input.get("src.full", "install_path") + "/test",
   622             work_dir: input.get("src.full", "install_path") + "/test",
   589             environment: {
   623             environment: {
   590                 "JT_JAVA": common.boot_jdk_home,
   624                 "JT_JAVA": common.boot_jdk_home,
   624     }
   658     }
   625 
   659 
   626     //
   660     //
   627     // Define artifacts for profiles
   661     // Define artifacts for profiles
   628     //
   662     //
   629     // Macosx bundles are named osx and Windows demo bundles use zip instead of
   663     // Macosx bundles are named osx
   630     // tar.gz.
   664     // tar.gz.
   631     var artifactData = {
   665     var artifactData = {
   632         "linux-x64": {
   666         "linux-x64": {
   633             platform: "linux-x64",
   667             platform: "linux-x64",
   634             demo_ext: "tar.gz"
       
   635         },
   668         },
   636         "linux-x86": {
   669         "linux-x86": {
   637             platform: "linux-x86",
   670             platform: "linux-x86",
   638             demo_ext: "tar.gz"
       
   639         },
   671         },
   640         "macosx-x64": {
   672         "macosx-x64": {
   641             platform: "osx-x64",
   673             platform: "osx-x64",
   642             demo_ext: "tar.gz"
   674             jdk_subdir: "jdk-" + data.version +  ".jdk/Contents/Home",
       
   675             jre_subdir: "jre-" + data.version +  ".jre/Contents/Home"
   643         },
   676         },
   644         "solaris-x64": {
   677         "solaris-x64": {
   645             platform: "solaris-x64",
   678             platform: "solaris-x64",
   646             demo_ext: "tar.gz"
       
   647         },
   679         },
   648         "solaris-sparcv9": {
   680         "solaris-sparcv9": {
   649             platform: "solaris-sparcv9",
   681             platform: "solaris-sparcv9",
   650             demo_ext: "tar.gz"
       
   651         },
   682         },
   652         "windows-x64": {
   683         "windows-x64": {
   653             platform: "windows-x64",
   684             platform: "windows-x64",
   654             demo_ext: "zip"
       
   655         },
   685         },
   656         "windows-x86": {
   686         "windows-x86": {
   657             platform: "windows-x86",
   687             platform: "windows-x86",
   658             demo_ext: "zip"
   688         },
       
   689        "linux-arm64": {
       
   690             platform: "linux-arm64-vfp-hflt",
       
   691         },
       
   692         "linux-arm-vfp-hflt": {
       
   693             platform: "linux-arm32-vfp-hflt",
       
   694         },
       
   695         "linux-arm-vfp-hflt-dyn": {
       
   696             platform: "linux-arm32-vfp-hflt-dyn",
   659         }
   697         }
   660     }
   698     }
   661     // Generate common artifacts for all main profiles
   699     // Generate common artifacts for all main profiles
   662     common.main_profile_names.forEach(function (name) {
   700     Object.keys(artifactData).forEach(function (name) {
   663         profiles[name] = concatObjects(profiles[name],
   701         profiles[name] = concatObjects(profiles[name],
   664             common.main_profile_artifacts(artifactData[name].platform, artifactData[name].demo_ext));
   702             common.main_profile_artifacts(artifactData[name]));
   665     });
   703     });
   666 
   704 
   667     // Generate common artifacts for all debug profiles
   705     // Generate common artifacts for all debug profiles
   668     common.main_profile_names.forEach(function (name) {
   706     Object.keys(artifactData).forEach(function (name) {
   669         var debugName = name + common.debug_suffix;
   707         var debugName = name + common.debug_suffix;
   670         profiles[debugName] = concatObjects(profiles[debugName],
   708         profiles[debugName] = concatObjects(profiles[debugName],
   671             common.debug_profile_artifacts(artifactData[name].platform));
   709             common.debug_profile_artifacts(artifactData[name]));
   672     });
   710     });
   673 
   711 
   674     // Extra profile specific artifacts
   712     // Extra profile specific artifacts
   675     profilesArtifacts = {
   713     profilesArtifacts = {
   676         "linux-x64": {
   714         "linux-x64": {
   687 
   725 
   688         "linux-x64-open": {
   726         "linux-x64-open": {
   689             artifacts: {
   727             artifacts: {
   690                 jdk: {
   728                 jdk: {
   691                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   729                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   692                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   730                     remote: [
       
   731                         "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
       
   732                             + "_linux-x64_bin.tar.gz",
       
   733                         "bundles/openjdk/GPL/linux-x64/\\1"
       
   734                     ],
       
   735                     subdir: "jdk-" + data.version
   693                 },
   736                 },
   694                 jre: {
   737                 jre: {
   695                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   738                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   696                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   739                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   697                 },
   740                 },
   698                 test: {
   741                 test: {
   699                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   742                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   700                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   743                     remote: [
       
   744                         "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
       
   745                             + "_linux-x64_bin-tests.tar.gz",
       
   746                         "bundles/openjdk/GPL/linux-x64/\\1"
       
   747                     ]
   701                 },
   748                 },
   702                 jdk_symbols: {
   749                 jdk_symbols: {
   703                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   750                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   704                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   751                     remote: [
       
   752                         "bundles/openjdk/GPL/linux-x64/jdk-" + data.version
       
   753                             + "_linux-x64_bin-symbols.tar.gz",
       
   754                         "bundles/openjdk/GPL/linux-x64/\\1"
       
   755                     ],
       
   756                     subdir: "jdk-" + data.version
   705                 },
   757                 },
   706                 jre_symbols: {
   758                 jre_symbols: {
   707                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   759                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   708                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
       
   709                 },
       
   710                 demo: {
       
   711                     local: "bundles/\\(jdk.*demo.tar.gz\\)",
       
   712                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   760                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   713                 },
   761                 },
   714                 doc_api_spec: {
   762                 doc_api_spec: {
   715                     local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
   763                     local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
   716                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   764                     remote: "bundles/openjdk/GPL/linux-x64/\\1",
   720 
   768 
   721         "linux-x86-open": {
   769         "linux-x86-open": {
   722             artifacts: {
   770             artifacts: {
   723                 jdk: {
   771                 jdk: {
   724                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   772                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   725                     remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
   773                     remote: [
       
   774                         "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
       
   775                             + "_linux-x86_bin.tar.gz",
       
   776                         "bundles/openjdk/GPL/linux-x86/\\1"
       
   777                     ],
       
   778                     subdir: "jdk-" + data.version
   726                 },
   779                 },
   727                 jdk_symbols: {
   780                 jdk_symbols: {
   728                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   781                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   729                     remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
   782                     remote: [
       
   783                         "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
       
   784                             + "_linux-x86_bin-symbols.tar.gz",
       
   785                         "bundles/openjdk/GPL/linux-x86/\\1"
       
   786                     ],
       
   787                     subdir: "jdk-" + data.version
       
   788                 },
       
   789                 test: {
       
   790                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
       
   791                     remote: [
       
   792                         "bundles/openjdk/GPL/linux-x86/jdk-" + data.version
       
   793                             + "_linux-x86_bin-tests.tar.gz",
       
   794                         "bundles/openjdk/GPL/linux-x86/\\1"
       
   795                     ]
   730                 },
   796                 },
   731                 jre: {
   797                 jre: {
   732                     // This regexp needs to not match the compact* files below
   798                     // This regexp needs to not match the compact* files below
   733                     local: "bundles/\\(jre.*[+][0-9]\\{1,\\}_linux-x86_bin.tar.gz\\)",
   799                     local: "bundles/\\(jre.*[+][0-9]\\{1,\\}_linux-x86_bin.tar.gz\\)",
   734                     remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
   800                     remote: "bundles/openjdk/GPL/profile/linux-x86/\\1",
   750 
   816 
   751         "windows-x86-open": {
   817         "windows-x86-open": {
   752             artifacts: {
   818             artifacts: {
   753                 jdk: {
   819                 jdk: {
   754                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   820                     local: "bundles/\\(jdk.*bin.tar.gz\\)",
   755                     remote: "bundles/openjdk/GPL/windows-x86/\\1",
   821                     remote: [
       
   822                         "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
       
   823                             + "_windows-x86_bin.tar.gz",
       
   824                         "bundles/openjdk/GPL/windows-x86/\\1"
       
   825                     ],
       
   826                     subdir: "jdk-" + data.version
   756                 },
   827                 },
   757                 jre: {
   828                 jre: {
   758                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   829                     local: "bundles/\\(jre.*bin.tar.gz\\)",
   759                     remote: "bundles/openjdk/GPL/windows-x86/\\1"
   830                     remote: "bundles/openjdk/GPL/windows-x86/\\1"
   760                 },
   831                 },
   761                 test: {
   832                 test: {
   762                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   833                     local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
   763                     remote: "bundles/openjdk/GPL/windows-x86/\\1",
   834                     remote: [
       
   835                         "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
       
   836                             + "_windows-x86_bin-tests.tar.gz",
       
   837                         "bundles/openjdk/GPL/windows-x86/\\1"
       
   838                     ]
   764                 },
   839                 },
   765                 jdk_symbols: {
   840                 jdk_symbols: {
   766                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   841                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
   767                     remote: "bundles/openjdk/GPL/windows-x86/\\1"
   842                     remote: [
       
   843                         "bundles/openjdk/GPL/windows-x86/jdk-" + data.version
       
   844                             + "_windows-x86_bin-symbols.tar.gz",
       
   845                         "bundles/openjdk/GPL/windows-x86/\\1"
       
   846                     ],
       
   847                     subdir: "jdk-" + data.version
   768                 },
   848                 },
   769                 jre_symbols: {
   849                 jre_symbols: {
   770                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   850                     local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
   771                     remote: "bundles/openjdk/GPL/windows-x86/\\1",
       
   772                 },
       
   773                 demo: {
       
   774                     local: "bundles/\\(jdk.*demo.zip\\)",
       
   775                     remote: "bundles/openjdk/GPL/windows-x86/\\1",
   851                     remote: "bundles/openjdk/GPL/windows-x86/\\1",
   776                 }
   852                 }
   777             }
   853             }
   778         },
   854         },
   779 
   855 
   830  * @param common The common values
   906  * @param common The common values
   831  * @returns {{}} Dependencies part of configuration
   907  * @returns {{}} Dependencies part of configuration
   832  */
   908  */
   833 var getJibProfilesDependencies = function (input, common) {
   909 var getJibProfilesDependencies = function (input, common) {
   834 
   910 
   835     var boot_jdk_platform = input.build_os + "-"
       
   836         + (input.build_cpu == "x86" ? "i586" : input.build_cpu);
       
   837 
       
   838     var devkit_platform_revisions = {
   911     var devkit_platform_revisions = {
   839         linux_x64: "gcc4.9.2-OEL6.4+1.1",
   912         linux_x64: "gcc4.9.2-OEL6.4+1.1",
   840         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
   913         macosx_x64: "Xcode6.3-MacOSX10.9+1.0",
   841         solaris_x64: "SS12u4-Solaris11u1+1.0",
   914         solaris_x64: "SS12u4-Solaris11u1+1.0",
   842         solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
   915         solaris_sparcv9: "SS12u4-Solaris11u1+1.0",
   843         windows_x64: "VS2013SP4+1.0"
   916         windows_x64: "VS2013SP4+1.0",
       
   917         linux_aarch64: "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0",
       
   918         linux_arm: (input.profile != null && input.profile.indexOf("hflt") >= 0
       
   919                     ? "gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux+1.0"
       
   920                     : "arm-linaro-4.7+1.0")
   844     };
   921     };
   845 
   922 
   846     var devkit_platform = (input.target_cpu == "x86"
   923     var devkit_platform = (input.target_cpu == "x86"
   847         ? input.target_os + "_x64"
   924         ? input.target_os + "_x64"
   848         : input.target_platform);
   925         : input.target_platform);
   851 
   928 
   852         boot_jdk: {
   929         boot_jdk: {
   853             server: "javare",
   930             server: "javare",
   854             module: "jdk",
   931             module: "jdk",
   855             revision: common.boot_jdk_revision,
   932             revision: common.boot_jdk_revision,
   856             checksum_file: boot_jdk_platform + "/MD5_VALUES",
   933             checksum_file: common.boot_jdk_platform + "/MD5_VALUES",
   857             file: boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
   934             file: common.boot_jdk_platform + "/jdk-" + common.boot_jdk_revision
   858                 + "-" + boot_jdk_platform + ".tar.gz",
   935                 + "-" + common.boot_jdk_platform + ".tar.gz",
   859             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
   936             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
   860             environment_path: common.boot_jdk_home + "/bin"
   937             environment_path: common.boot_jdk_home + "/bin"
   861         },
   938         },
   862 
   939 
   863         devkit: {
   940         devkit: {
   881         },
   958         },
   882 
   959 
   883         jtreg: {
   960         jtreg: {
   884             server: "javare",
   961             server: "javare",
   885             revision: "4.2",
   962             revision: "4.2",
   886             build_number: "b05",
   963             build_number: "b07",
   887             checksum_file: "MD5_VALUES",
   964             checksum_file: "MD5_VALUES",
   888             file: "jtreg_bin-4.2.zip",
   965             file: "jtreg_bin-4.2.zip",
   889             environment_name: "JT_HOME",
   966             environment_name: "JT_HOME",
   890             environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
   967             environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
   891         },
   968         },
   909         },
   986         },
   910 
   987 
   911         freetype: {
   988         freetype: {
   912             organization: common.organization,
   989             organization: common.organization,
   913             ext: "tar.gz",
   990             ext: "tar.gz",
   914             revision: "2.3.4+1.0",
   991             revision: "2.7.1-v120+1.0",
   915             module: "freetype-" + input.target_platform
   992             module: "freetype-" + input.target_platform
   916         }
   993         },
       
   994 
       
   995         graphviz: {
       
   996             organization: common.organization,
       
   997             ext: "tar.gz",
       
   998             revision: "2.38.0-1+1.1",
       
   999             module: "graphviz-" + input.target_platform,
       
  1000             configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot"
       
  1001         },
       
  1002 
       
  1003         pandoc: {
       
  1004             organization: common.organization,
       
  1005             ext: "tar.gz",
       
  1006             revision: "1.17.2+1.0",
       
  1007             module: "pandoc-" + input.target_platform,
       
  1008             configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc"
       
  1009         },
   917     };
  1010     };
   918 
  1011 
   919     return dependencies;
  1012     return dependencies;
   920 };
  1013 };
   921 
  1014 
  1078     var version_numbers = getVersionNumbers();
  1171     var version_numbers = getVersionNumbers();
  1079     var version = (major != null ? major : version_numbers.get("DEFAULT_VERSION_MAJOR"))
  1172     var version = (major != null ? major : version_numbers.get("DEFAULT_VERSION_MAJOR"))
  1080         + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR"))
  1173         + "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR"))
  1081         + "." + (security != null ? security :  version_numbers.get("DEFAULT_VERSION_SECURITY"))
  1174         + "." + (security != null ? security :  version_numbers.get("DEFAULT_VERSION_SECURITY"))
  1082         + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH"));
  1175         + "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH"));
  1083     while (version.match(".*\.0$")) {
  1176     while (version.match(".*\\.0$")) {
  1084         version = version.substring(0, version.length - 2);
  1177         version = version.substring(0, version.length - 2);
  1085     }
  1178     }
  1086     return version;
  1179     return version;
  1087 };
  1180 };
       
  1181 
       
  1182 /**
       
  1183  * Constructs the common version configure args based on build type and
       
  1184  * other version inputs
       
  1185  */
       
  1186 var versionArgs = function(input, common) {
       
  1187     var args = ["--with-version-build=" + common.build_number];
       
  1188     if (input.build_type == "promoted") {
       
  1189         args = concat(args,
       
  1190                       // This needs to be changed when we start building release candidates
       
  1191                       "--with-version-pre=ea",
       
  1192                       "--without-version-opt");
       
  1193     } else {
       
  1194         args = concat(args, "--with-version-opt=" + common.build_id);
       
  1195     }
       
  1196     return args;
       
  1197 }
  1088 
  1198 
  1089 // Properties representation of the common/autoconf/version-numbers file. Lazily
  1199 // Properties representation of the common/autoconf/version-numbers file. Lazily
  1090 // initiated by the function below.
  1200 // initiated by the function below.
  1091 var version_numbers;
  1201 var version_numbers;
  1092 
  1202