Ignore:
Timestamp:
08/01/2015 04:26:22 AM (9 years ago)
Author:
Douglas R. Reno <renodr@…>
Branches:
systemd-13485
Children:
ad6910d
Parents:
4a83293
Message:

Import back into SVN from Github

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16309 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/openjdk.xml

    r4a83293 rac38e9dc  
    55  %general-entities;
    66
    7   <!ENTITY ojdk-upd                  "25">
    8   <!ENTITY ojdk-bd                   "b18">
     7  <!ENTITY ojdk-upd                  "45">
     8  <!ENTITY ojdk-bd                   "b14">
    99  <!ENTITY ojdk-tarball              "jdk8u&ojdk-upd;-&ojdk-bd;.tar.bz2">
    1010  <!ENTITY ojdk-repo                 "http://hg.openjdk.java.net/jdk8u/jdk8u">
     
    1313  <!ENTITY anduin-download           "http://anduin.linuxfromscratch.org/files/BLFS/OpenJDK-&openjdk-version;">
    1414
    15   <!ENTITY ojdk-md5sum               "a0e0db6c9b322b4639e150b43a374cea">
    16   <!ENTITY ojdk-size                 "384 KB">
     15  <!ENTITY ojdk-md5sum               "4809dd6f1cae5c87e855a21506d43012">
     16  <!ENTITY ojdk-size                 "388 KB">
    1717
    1818  <!ENTITY corba-download            "&anduin-download;/corba.tar.xz">
    19   <!ENTITY corba-md5sum              "8ebdf969cd72746a619ae479a1785b41">
    20   <!ENTITY corba-size                "912 KB">
     19  <!ENTITY corba-md5sum              "af5baa04d025fb96a39a0ea0a5b187f4">
     20  <!ENTITY corba-size                "917 KB">
    2121
    2222  <!ENTITY hotspot-download          "&anduin-download;/hotspot.tar.xz">
    23   <!ENTITY hotspot-md5sum            "684776e6340ff192a818ac38d3d809f1">
    24   <!ENTITY hotspot-size              "6.2 MB">
     23  <!ENTITY hotspot-md5sum            "16b2feeedf3b3d097f51a25af09bb8e1">
     24  <!ENTITY hotspot-size              "6.3 MB">
    2525
    2626  <!ENTITY jaxp-download             "&anduin-download;/jaxp.tar.xz">
    27   <!ENTITY jaxp-md5sum               "74d98254e16f79d7f88c8d3ee69f3742">
     27  <!ENTITY jaxp-md5sum               "3a23fa9cc06fc130c83597c10da9ac29">
    2828  <!ENTITY jaxp-size                 "2.2 MB">
    2929
    3030  <!ENTITY jaxws-download            "&anduin-download;/jaxws.tar.xz">
    31   <!ENTITY jaxws-md5sum              "24346979cfbba2d9093c02eb3cad8732">
    32   <!ENTITY jaxws-size                "2.1 MB">
     31  <!ENTITY jaxws-md5sum              "9769cc527f8c73ea624afa27e86acde9">
     32  <!ENTITY jaxws-size                "2.2 MB">
    3333
    3434  <!ENTITY jdk-download              "&anduin-download;/jdk.tar.xz">
    35   <!ENTITY jdk-md5sum                "9a9e1dc67e43efd246348048ecd717aa">
    36   <!ENTITY jdk-size                  "36.2 MB">
     35  <!ENTITY jdk-md5sum                "813df5653cc634095e88db5243f5351a">
     36  <!ENTITY jdk-size                  "36.4 MB">
    3737
    3838  <!ENTITY langtools-download        "&anduin-download;/langtools.tar.xz">
    39   <!ENTITY langtools-md5sum          "b1e6dea259a362375a1084576282acd2">
     39  <!ENTITY langtools-md5sum          "ebb9bc974506248642a983ca16986425">
    4040  <!ENTITY langtools-size            "2.0 MB">
    4141
    4242  <!ENTITY nashorn-download          "&anduin-download;/nashorn.tar.xz">
    43   <!ENTITY nashorn-md5sum            "cb457804b83babe31f20a9e7ae4944cf">
    44   <!ENTITY nashorn-size              "1.9 MB">
    45 
    46   <!ENTITY jtreg-version             "4.1-b10">
    47   <!ENTITY jtreg-download            "https://adopt-openjdk.ci.cloudbees.com/job/jtreg/lastStableBuild/artifact/jtreg&jtreg-version;.tar.gz">
    48   <!ENTITY jtreg-md5sum              "f48d6f8b748f869a5624d2c44998d54c">
    49   <!ENTITY jtreg-size                "122 KB">
     43  <!ENTITY nashorn-md5sum            "e9b1252034e47023ddaf44b4c8fd9a75">
     44  <!ENTITY nashorn-size              "2.1 MB">
     45
     46  <!ENTITY jtreg-version             "4.1-b11-273">
     47  <!ENTITY jtreg-download            "&anduin-download;/jtreg&jtreg-version;.tar.xz">
     48  <!ENTITY jtreg-md5sum              "2f84934b6e9efcbc9060109729e569d1">
     49  <!ENTITY jtreg-size                "7.2 MB">
    5050
    5151  <!ENTITY icedtea-web-download      "http://icedtea.classpath.org/download/source/icedtea-web-&icedtea-web-version;.tar.gz">
    5252
    53   <!ENTITY ojdk-buildsize           "3 GB">
    54   <!ENTITY ojdk-time                "10 SBU (an additional 100 SBU for testsuite)">
     53  <!ENTITY ojdk-buildsize           "3.9 GB (additional 361 MB for tests)">
     54  <!ENTITY ojdk-time                "10 SBU (additional 110 SBU for tests)">
    5555]>
    5656
     
    8181    </para>
    8282
    83     &lfs76_checked;
     83    &lfs77_checked;
    8484
    8585    <note>
     
    156156      The following files may be downladed from the OpenJDK mercurial
    157157      repository using the addresses <ulink
    158       url="&ojdk-repo;&lt;component&gt;/archive/&ojdk-tarball;"/>,
     158      url="&ojdk-repo;/&lt;component&gt;/archive/&ojdk-tarball;"/>,
    159159      where &lt;component&gt; is the name of the JVM component (corba,
    160160      hostspot, and so on), but that involves renaming the downloaded files,
     
    248248      <listitem>
    249249        <para>
    250           Optional test harness: <ulink url="&jtreg-download;"/>
     250          Recommended test harness: <ulink url="&jtreg-download;"/>
    251251        </para>
    252252      </listitem>
     
    277277    <para role="optional">
    278278      <xref linkend="mercurial"/> and
    279       <xref linkend="twm"/> (for the tests)
     279      an X Window manager such as <xref linkend="twm"/> (for the tests)
    280280    </para>
    281281
     
    305305
    306306    <para>
    307       If you have downloaded the test harness, unpack it too:
    308     </para>
    309 
    310 <screen><userinput>tar -xf ../jtreg&jtreg-version;.tar.gz</userinput></screen>
     307      If you have downloaded the recommended test harness, unpack it too:
     308    </para>
     309
     310<screen><userinput>tar -xf ../jtreg&jtreg-version;.tar.xz</userinput></screen>
    311311
    312312<!--TODO: it might be better to add instructions for the cacerts file at
     
    322322
    323323    <para>
    324       Fix a bug in a shell script used to set the flags for
    325       <command>make</command>:
    326     </para>
    327 
    328 <screen><userinput>sed 's/\([ \t]\)\]\([^\]\)/\1I]\2/g' \
    329     -i hotspot/make/linux/makefiles/adjust-mflags.sh</userinput></screen>
     324      One file in hotspot needs a change, since it relies on a non-normative
     325      compiler behavior, which has changed with GCC version 5. Note that the change
     326      works also with previous versions.
     327    </para>
     328
     329<screen><userinput>sed -e 's/(hi - lo)/ hi - lo /' \
     330    -e 's/(lo - hi)/ lo - hi /' \
     331    -i hotspot/src/share/vm/opto/type.cpp</userinput></screen>
    330332
    331333    <note>
     
    357359   --with-zlib=system         \
    358360   --with-giflib=system       &amp;&amp;
    359 make DEBUG_BINARIES=true all</userinput></screen>
    360 
    361     <para>
    362       It seems that the test infrastructure of OpenJDK is a work in
    363       progress, so that testing the newly built JVM involves several steps.
     361make DEBUG_BINARIES=true                 \
     362     DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
     363     all  &amp;&amp;
     364find build/*/images/j2sdk-image -iname \*.diz -delete
     365</userinput></screen>
     366
     367    <note>
     368      <para>
     369        Testing will involve the interplay of pairs of JVMs using the
     370        networking interface, so networking must be started.  If it
     371        isn't, not only will these tests fail, but the test cleanup
     372        will leave orphaned JVMs running.  There will be many of
     373        them.  Rebooting may be the easiest recovery.
     374      </para>
     375    </note>
     376
     377    <para>
     378      Testing the newly built JVM involves several steps.
    364379      First, it is better to run the test suite in a frame buffer on a
    365380      different display, using Xvfb:
     
    386401
    387402    <para>
    388       Then, it is necessary to modify some files:
     403      Then, it is necessary to modify some files<!-- (replace &lt;N&gt; with the
     404      number of JAVA VM allowed to run concurrently)-->:
    389405    </para>
    390406
     
    401417          sun/pisces          \\
    402418          com/sun/java/swing" >> jdk/test/TEST.groups &amp;&amp;
    403 sed -e 's/all:.*jck.*/all: jtreg/' \
    404     -i langtools/test/Makefile</userinput></screen>
     419sed -e 's/all:.*jck.*/all: jtreg/'      \
     420    -e '/^JTREG /s@\$(JT_PLATFORM)/@@'  \
     421    -i langtools/test/Makefile<!--          &amp;&amp;
     422sed -i 's@/win32@@' jdk/test/Makefile   &amp;&amp;
     423sed -e 's@JTREG_HOME@JT_PLATFORM="" &amp;@' \
     424    -e 's@TEST="@CONCURRENCY=&lt;N&gt; &amp;@'    \
     425    -i test/Makefile--></userinput></screen>
    405426
    406427    <para>
     
    416437    </para>
    417438
     439<!-- no && here either, because the first "make" may return an error -->
    418440<screen role='nodump'><userinput>LANG=C make -k -C test                      \
    419441            JT_HOME=${JT_HOME}              \
    420442            JT_JAVA=${JT_JAVA}              \
    421             PRODUCT_HOME=${PRODUCT_HOME} all &amp;&amp;
    422 LANG=C ${JT_HOME}/linux/bin/jtreg -a -v:fail,error \
    423                 -dir:$(pwd)/hotspot/test    \
    424                 -k:\!ignore                 \
    425                 -jdk:${PRODUCT_HOME}        \
    426                 :jdk</userinput></screen>
     443            PRODUCT_HOME=${PRODUCT_HOME} all
     444LANG=C ${JT_HOME}/bin/jtreg -a -v:fail,error \
     445                -dir:$(pwd)/hotspot/test     \
     446                -k:\!ignore                  \
     447                -jdk:${PRODUCT_HOME}         \
     448<!--                -agentvm -conc:&lt;N&gt;           \
     449-->                :jdk</userinput></screen>
    427450
    428451    <para>
    429452      The test results can be compared to
    430453      <ulink url="http://download.java.net/openjdk/testresults/8/">these
    431       results</ulink>.
    432       Finally, stop the virtual frame buffer and clean up:
     454      results</ulink>, although they usually are run on a newer version.
     455      Some failures can be expected, the number of which depends on various
     456      conditions, like whether the computer is connected to network. Also, some
     457      tests may timeout if the machine is under load.
     458    </para>
     459
     460    <para>
     461      Next some cleanup has to be done. The instructions below only stop the
     462      frame buffer, but it has been reported that some java VM may be left running
     463      after the tests, so it is necessary to check orphaned processes:
    433464    </para>
    434465
     
    444475    <systemitem class="username">root</systemitem> user:</para>
    445476
    446 <screen role="root"><userinput>find build/*/images/j2sdk-image -iname \*.jar -exec chmod a+r {} \; &amp;&amp;
    447 chmod a+r build/*/images/j2sdk-image/lib/ct.sym &amp;&amp;
    448 find build/*/images/j2sdk-image -iname \*.diz -delete &amp;&amp;
    449 find build/*/images/j2sdk-image -iname \*.debuginfo -delete &amp;&amp;
    450 cp -R build/*/images/j2sdk-image /opt/OpenJDK-&openjdk-version; &amp;&amp;
     477<screen role="root"><userinput>cp -RT build/*/images/j2sdk-image /opt/OpenJDK-&openjdk-version; &amp;&amp;
    451478chown -R root:root /opt/OpenJDK-&openjdk-version;</userinput></screen>
    452479
    453     <para>If desired, you may install a <filename class="extension">.desktop</filename>
    454     file so <command>policytool</command> can be accessed from a desktop menu. First,
    455     you need to obtain an icon from the <xref linkend="icedtea-web"/>
    456     tarball:</para>
    457 
    458 <screen role="root"><userinput>tar -xf icedtea-web-&icedtea-web-version;.tar.gz     \
     480    <para>
     481      There are now two <application>OpenJDK</application> SDKs installed
     482      in <filename class="directory">/opt</filename>. You should decide on
     483      which one you would like to use as the default. Normally, you would opt
     484      for the just installed <application>OpenJDK</application>. If so, do
     485      the following as the <systemitem class="username">root</systemitem>
     486      user:
     487    </para>
     488
     489<screen role="root"><userinput>ln -sfvn OpenJDK-&openjdk-version; /opt/jdk</userinput></screen>
     490
     491    <para>If desired, you may install a .desktop file corresponding to an entry
     492    in a desktop menu for <command>policytool</command>. First, you need to
     493    obtain an icon from <xref linkend="icedtea-web"/>:</para>
     494
     495<screen><userinput>tar -xf ../icedtea-web-&icedtea-web-version;.tar.gz  \
    459496        icedtea-web-&icedtea-web-version;/javaws.png \
    460497        --strip-components=1</userinput></screen>
     
    479516install -v -Dm644 javaws.png /usr/share/pixmaps/javaws.png</userinput></screen>
    480517
    481     <para>The choice of pt_BR is just an example. You can delete those lines
    482     or replace them by corresponding ones in your locale, e.g. fr_FR, with the
    483     "Name[fr_FR]" and "Comment[fr_FR]" values given by your translations.</para>
     518    <para>The choice of pt_BR is just an example. You can add any translation
     519    by adding lines corresponding to your locale, e.g. for fr_FR,
     520    <quote>Name[fr_FR]=</quote> and <quote>Comment[fr_FR]=</quote> with the
     521    appropriate text as values.</para>
    484522
    485523  </sect2>
     
    508546    <para>
    509547      <parameter>--with-build-number</parameter>: Again, the build
    510       system does not include the build  number in the version string. It has
     548      system does not include the build number in the version string. It has
    511549      to be specified here too.
    512550    </para>
     
    532570
    533571    <para>
    534       <option>--with-jobs=N</option>: Allows to set the number
     572      <option>--with-jobs=N</option>: Allows setting the number
    535573      of jobs for <command>make</command> equal to N. The default is the
    536574      result of a calculation involving the available memory and the number
    537       of processors. The SBU given above are with parallel jobs disabled.
     575      of processors. Note that even if you specify N=1, some parallelization
     576      may be used during the build. The SBU given above are with parallel jobs
     577      disabled, on a single processor, single core, virtual machine.
    538578    </para>
    539579
    540580    <para>
    541581      <option>--with-cacerts-file=...</option>: Specifies where to find a
    542       <filename>cacerts</filename> file. Otherwise, an empty one is created.
    543       You can get it from an earlier version of the package, or using the
     582      <filename>cacerts</filename> file, typically <filename>
     583      /opt/jdk/jre/lib/security</filename>. Otherwise, an empty one is created.
     584      You can get it from an earlier version of the package, or use the
    544585      script below to generate one.
    545586    </para>
    546     <para>
    547       <command>make DEBUG_BINARIES=true all</command>: The build fails
    548       if DEBUG_BINARIES is not set to true.
    549     </para>
    550 
    551     <para>
    552       <command>find ... -iname '*.jar' -exec chmod a+r {} \;</command>
    553       and following line: Fix permission in some library files, in order to
    554       allow all users to access them.
    555     </para>
    556 
    557     <para>
    558       <command>find ... -iname '*.diz' -delete</command>: This command and the
    559       the next one remove redundant files.
     587
     588    <para>
     589      <command>make DEBUG_BINARIES=true
     590      DISABLE_HOTSPOT_OS_VERSION_CHECK=ok all</command>: The build fails if
     591      DEBUG_BINARIES is not set to true. Furthermore, OS version checking in
     592      hotspot's Makefile does not account for Linux version 4.x. Disabling the
     593      test is harmless and allows building.
     594    </para>
     595
     596    <para>
     597      <command>find ... -iname '*.diz' -delete</command>: This command
     598      removes redundant files.
    560599    </para>
    561600
    562601  </sect2>
    563602
    564   <sect2 role="configuration" id="openjdk-config" xreflabel="Configuring OpenJDK" >
     603  <sect2 role="configuration"
     604         id="openjdk-config"
     605         xreflabel="Configuring OpenJDK">
    565606    <title>Configuring OpenJDK</title>
    566607
     
    568609      <title>Configuration Information</title>
    569610
     611    <para>Normally, the JAVA environment has been configured after installing
     612    the binary version, and can be used with the just built package as well.
     613    Review <xref linkend="ojdk-conf"/> in case you want to modify
     614    something.</para>
     615
     616    <para>To test if the man pages are correctly installed, issue
     617    <command>source /etc/profile</command> and <command>man java</command> to
     618    display the respective man page.</para>
     619
     620    </sect3>
     621
     622    <sect3 id='ojdk-certs' xreflabel='JRE Certificate Authorithy Certificates'>
     623      <title>Install or update the JRE Certificate Authority Certificates
     624      (cacerts) file</title>
     625
    570626      <para>
    571         There are now two <application>OpenJDK</application> SDKs installed
    572         in <filename class="directory">/opt</filename>. You should decide on
    573         which one you would like to use as the default. For example if you
    574         decide to use the precompiled <application>OpenJDK</application>, do
    575         the following as the <systemitem class="username">root</systemitem>
    576         user:
    577       </para>
    578 
    579 <screen role="root"><userinput>ln -sfv OpenJDK-&openjdk-version;-bin /opt/jdk</userinput></screen>
    580 
    581       <para>The information below assumes your system is set up using the
    582       instructions found in <quote><xref
    583       linkend="postlfs-config-profile"/></quote>. You may need to extract the
    584       relevant information below and incorporate it into your system's startup
    585       files if your system is set up differently.</para>
    586 
    587       <para>Add the following <filename>openjdk.sh</filename> shell startup
    588       file to the <filename>/etc/profile.d</filename> directory with the
    589       following commands as the <systemitem class="username">root</systemitem>
    590       user:</para>
    591 
    592 <screen role="root"><userinput>cat &gt;&gt; /etc/profile.d/openjdk.sh &lt;&lt; "EOF"
    593 <literal># Begin /etc/profile.d/openjdk.sh
    594 
    595 # Set JAVA_HOME directory
    596 JAVA_HOME=/opt/jdk
    597 
    598 # Adjust PATH
    599 pathappend $JAVA_HOME/bin PATH
    600 
    601 pathappend $JAVA_HOME/include       C_INCLUDE_PATH
    602 pathappend $JAVA_HOME/include/linux C_INCLUDE_PATH
    603 pathappend $JAVA_HOME/include       CPLUS_INCLUDE_PATH
    604 pathappend $JAVA_HOME/include/linux CPLUS_INCLUDE_PATH
    605 
    606 # Auto Java CLASSPATH
    607 # Copy jar files to, or create symlinks in this directory
    608 
    609 AUTO_CLASSPATH_DIR=/usr/share/java
    610 
    611 pathprepend . CLASSPATH
    612 
    613 for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
    614     pathappend $dir CLASSPATH
    615 done
    616 
    617 for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
    618     pathappend $jar CLASSPATH
    619 done
    620 
    621 export JAVA_HOME CLASSPATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH
    622 unset AUTO_CLASSPATH_DIR dir jar
    623 
    624 # End /etc/profile.d/openjdk.sh</literal>
    625 EOF</userinput></screen>
    626 
    627     <para>Finally, add the man pages to <application>man_db</application>'s
    628     configuration. As the <systemitem class="username">root</systemitem>
    629     user:</para>
    630 
    631 <screen role="root"><userinput>cat >> /etc/profile.d/extrapaths.sh &lt;&lt; "EOF" &amp;&amp;
    632 <literal># Begin Java addition
    633 if ! [ -n $MANPATH ]; then
    634   MANPATH=:/opt/jdk/man
    635 else
    636   pathappend /opt/jdk/man       MANPATH
    637 fi
    638 # End Java addition</literal>
    639 EOF
    640 
    641 
    642 cat &gt;&gt; /etc/man_db.conf &lt;&lt; "EOF" &amp;&amp;
    643 <literal># Begin Java addition
    644 MANDATORY_MANPATH     /opt/jdk/man
    645 MANPATH_MAP           /opt/jdk/bin     /opt/jdk/man
    646 MANDB_MAP             /opt/jdk/man     /var/cache/man/jdk
    647 # End Java addition</literal>
    648 EOF
    649 
    650 mkdir -p /var/cache/man
    651 mandb -c /opt/jdk/man</userinput></screen>
    652 
    653     <para>To test the man pages are correctly installed, issue <command>source /etc/profile</command> and <command>man java</command> to display the respective man page.</para>
    654 
    655     </sect3>
    656 
    657     <sect3 id='ojdk-certs'>
    658       <title>Install or update the JRE Certificate Authority Certificates (cacerts) file</title>
    659 
    660       <para>
    661         Use the following procedure to install the
    662         <filename>cacerts</filename> or to generate a new one if
    663         <xref linkend="cacerts"/> have been updated. First, if it is not
    664         already present, generate the <command>mkcacerts</command> script
     627        <application>OpenJDK</application> uses its own format for the
     628        CA certificates. Those certificates are located in a file named <filename>
     629        /opt/jdk/jre/lib/security/cacerts</filename>. That file may be generated
     630        from the one installed using the instructions on the <xref
     631        linkend="cacerts"/> page, using the following procedure.
     632        First, generate the <command>mkcacerts</command> script
    665633        as the <systemitem class="username">root</systemitem> user:
    666634      </para>
     
    757725        echo "`basename ${0}` creates a valid cacerts file for use with IcedTea."
    758726        echo ""
    759         echo "        -f  --cafile        The path to a file containing PEM formated CA"
    760         echo "                            certificates.  May not be used with -d/--cadir."
    761         echo "        -d  --cadir         The path to a diectory of PEM formatted CA"
    762         echo "                            certificates.  May not be used with -f/--cafile."
    763         echo "        -o  --outfile       The path to the output file."
     727        echo "        -f  --cafile     The path to a file containing PEM"
     728        echo "                         formated CA certificates. May not be"
     729        echo "                         used with -d/--cadir."
    764730        echo ""
    765         echo "        -k  --keytool       The path to the java keytool utility."
     731        echo "        -d  --cadir      The path to a directory of PEM formatted"
     732        echo "                         CA certificates. May not be used with"
     733        echo "                         -f/--cafile."
    766734        echo ""
    767         echo "        -s  --openssl       The path to the openssl utility."
     735        echo "        -o  --outfile    The path to the output file."
    768736        echo ""
    769         echo "        -h  --help          Show this help message and exit."
     737        echo "        -k  --keytool    The path to the java keytool utility."
     738        echo ""
     739        echo "        -s  --openssl    The path to the openssl utility."
     740        echo ""
     741        echo "        -h  --help       Show this help message and exit."
    770742        echo ""
    771743        echo ""
     
    865837    certend=`grep -n "^-----END" "${cert}" | cut -d ":" -f 1`
    866838    sed -n "${certbegin},${certend}p" "${cert}" > "${tempfile}"
    867     echo yes | env LC_ALL=C "${KEYTOOL}" -import -alias `basename "${cert}"` -keystore \
    868                    "${OUTFILE}" -storepass 'changeit' -file "${tempfile}"
     839    echo yes | env LC_ALL=C "${KEYTOOL}" -import                     \
     840                                         -alias `basename "${cert}"` \
     841                                         -keystore "${OUTFILE}"      \
     842                                         -storepass 'changeit'       \
     843                                         -file "${tempfile}"
    869844    rm "${tempfile}"
    870845done
     
    876851EOF
    877852
    878 chmod -c 0755 /opt/jdk/bin/mkcacerts</userinput></screen>
     853chmod -v 755 /opt/jdk/bin/mkcacerts</userinput></screen>
    879854
    880855  <note>
     
    885860  </note>
    886861
    887     <para>If you need to generate a <filename>cacerts</filename> file,
    888     and there is already one in
    889     <filename class="directory">/opt/jdk/jre/lib/security</filename>, it
    890     is better to make a backup. Then, you can create a new one, as the
    891     <systemitem class="username">root</systemitem> user:</para>
    892 
    893 <screen role="root"><userinput>/opt/jdk/bin/mkcacerts -d "/etc/ssl/certs/"  -k "/opt/jdk/bin/keytool" \
    894                        -s "/usr/bin/openssl" -o "/opt/jdk/jre/lib/security/cacerts"</userinput></screen>
     862    <para>
     863      Generate the <application>OpenJDK</application> <filename>cacerts</filename>
     864      file as the <systemitem class="username">root</systemitem> user:
     865    </para>
     866
     867<screen role="root"><userinput>if [ -f /opt/jdk/jre/lib/security/cacerts ]; then
     868  mv /opt/jdk/jre/lib/security/cacerts \
     869     /opt/jdk/jre/lib/security/cacerts.bak
     870fi &amp;&amp;
     871/opt/jdk/bin/mkcacerts                 \
     872        -d "/etc/ssl/certs/"           \
     873        -k "/opt/jdk/bin/keytool"      \
     874        -s "/usr/bin/openssl"          \
     875        -o "/opt/jdk/jre/lib/security/cacerts"</userinput></screen>
     876
     877    <para>Use the following commands to check if the
     878    <filename>cacerts</filename> file has been successfully installed:</para>
     879
     880<screen role="root"><userinput>cd /opt/jdk
     881bin/keytool -list -keystore jre/lib/security/cacerts</userinput></screen>
     882
     883    <para>At the prompt "Enter keystore password:", press the "Enter" key if
     884    there is no keystore password defined. If the <filename>cacerts</filename>
     885    file was installed correctly, you will see a list of the certificates with
     886    related information for each one. If not, you need to reinstall
     887    them.</para>
    895888
    896889    </sect3>
Note: See TracChangeset for help on using the changeset viewer.