harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hindess <mark.hind...@googlemail.com>
Subject Re: svn commit: r707024 - in /harmony/enhanced/jdktools/trunk/modules: jdktools/META-INF/ jretools/META-INF/ jretools/src/main/java/org/apache/harmony/jretools/pack200/ samsa/
Date Wed, 05 Nov 2008 23:36:06 GMT

The correct fix is:

Index: build.xml
===================================================================
--- build.xml   (revision 711662)
+++ build.xml   (working copy)
@@ -319,6 +319,7 @@
         <chmod file="${target.dir}/hdk/jdk/jre/bin/keytool*" perm="ugo+x" />
         <chmod file="${target.dir}/hdk/jdk/jre/bin/policytool*" perm="ugo+x" />
         <chmod file="${target.dir}/hdk/jdk/jre/bin/unpack200*" perm="ugo+x" />
+        <chmod file="${target.dir}/hdk/jdk/jre/bin/pack200*" perm="ugo+x" />
     </target>
 
     <target name="assemble-jdk">

Please can someone second this commit?

Regards,
 Mark.

In message <fc2fc95c0811050332l560d489fl7fee101f9fe10c73@mail.gmail.com>, "Sian
 January" writes:
>
> Hi Chunrong,
> 
> I've downloaded the hdk snapshot (Windows32) from
> http://people.apache.org/builds/harmony/snapshots/r710036/ and both
> the pack200 executables work for me.  Which platform are you seeing
> problems on?
> 
> Thanks,
> 
> Sian
> 
> 
> 2008/11/5 chunrong lai <chunronglai@gmail.com>:
> >  I see after a HDK building there are four pack200.
> >
> > ./working_jdktools/deploy/jdk/bin/pack200
> > ./working_jdktools/deploy/jdk/jre/bin/pack200
> > ./target/hdk/jdk/bin/pack200
> > ./target/hdk/jdk/jre/bin/pack200
> >
> > While the first three are executable but the fourth is not yet. I think tha
> t
> > it is what we run by default.
> > So we need to further enhanced the scripts to make it executable.
> >
> > +        <echo message="Run jdk/jre/bin/pack200 in ${hy.tests.reports}"/>
> > +        <exec failonerror="true"
> > +               executable="${test.jre.home}/bin/pack200${exe.suffix}"
> > +               dir="${hy.tests.reports}">
> > +           <arg line="" />
> > +        </exec>
> >
> >
> >
> >
> > On Wed, Oct 22, 2008 at 6:28 PM, <sjanuary@apache.org> wrote:
> >
> >> Author: sjanuary
> >> Date: Wed Oct 22 03:28:30 2008
> >> New Revision: 707024
> >>
> >> URL: http://svn.apache.org/viewvc?rev=707024&view=rev
> >> Log:
> >> Pack200 - add "pack200" executable
> >>
> >> Added:
> >>
> >>  harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache
> /harmony/jretools/pack200/
> >>
> >>  harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache
> /harmony/jretools/pack200/Main.java
> >>   (with props)
> >> Modified:
> >>    harmony/enhanced/jdktools/trunk/modules/jdktools/META-INF/MANIFEST.MF
> >>    harmony/enhanced/jdktools/trunk/modules/jretools/META-INF/MANIFEST.MF
> >>    harmony/enhanced/jdktools/trunk/modules/samsa/build.xml
> >>
> >> Modified:
> >> harmony/enhanced/jdktools/trunk/modules/jdktools/META-INF/MANIFEST.MF
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jdkto
> ols/META-INF/MANIFEST.MF?rev=707024&r1=707023&r2=707024&view=diff
> >>
> >> ==========================================================================
> ====
> >> --- harmony/enhanced/jdktools/trunk/modules/jdktools/META-INF/MANIFEST.MF
> >> (original)
> >> +++ harmony/enhanced/jdktools/trunk/modules/jdktools/META-INF/MANIFEST.MF
> >> Wed Oct 22 03:28:30 2008
> >> @@ -40,6 +40,7 @@
> >>  org.apache.harmony.tools.jarsigner,
> >>  org.apache.harmony.tools.keytool,
> >>  org.apache.harmony.tools.unpack200,
> >> + org.apache.harmony.tools.pack200,
> >>  com.sun.tools.javac,
> >>  com.sun.tools.jdi,
> >>  com.sun.tools.jdi.connect,
> >>
> >> Modified:
> >> harmony/enhanced/jdktools/trunk/modules/jretools/META-INF/MANIFEST.MF
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jreto
> ols/META-INF/MANIFEST.MF?rev=707024&r1=707023&r2=707024&view=diff
> >>
> >> ==========================================================================
> ====
> >> --- harmony/enhanced/jdktools/trunk/modules/jretools/META-INF/MANIFEST.MF
> >> (original)
> >> +++ harmony/enhanced/jdktools/trunk/modules/jretools/META-INF/MANIFEST.MF
> >> Wed Oct 22 03:28:30 2008
> >> @@ -36,4 +36,5 @@
> >>  org.apache.harmony.security.x509;version="1.0.0"
> >>  Export-Package: org.apache.harmony.jretools.keytool,
> >>  org.apache.harmony.jretools.unpack200,
> >> + org.apache.harmony.jretools.pack200,
> >>  org.apache.harmony.jretools.policytool
> >>
> >> Added:
> >> harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache/
> harmony/jretools/pack200/Main.java
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jreto
> ols/src/main/java/org/apache/harmony/jretools/pack200/Main.java?rev=707024&vi
> ew=auto
> >>
> >> ==========================================================================
> ====
> >> ---
> >> harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache/
> harmony/jretools/pack200/Main.java
> >> (added)
> >> +++
> >> harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache/
> harmony/jretools/pack200/Main.java
> >> Wed Oct 22 03:28:30 2008
> >> @@ -0,0 +1,124 @@
> >> +/*
> >> + *  Licensed to the Apache Software Foundation (ASF) under one or more
> >> + *  contributor license agreements.  See the NOTICE file distributed with
> >> + *  this work for additional information regarding copyright ownership.
> >> + *  The ASF licenses this file to You under the Apache License, Version
> >> 2.0
> >> + *  (the "License"); you may not use this file except in compliance with
> >> + *  the License.  You may obtain a copy of the License at
> >> + *
> >> + *     http://www.apache.org/licenses/LICENSE-2.0
> >> + *
> >> + *  Unless required by applicable law or agreed to in writing, software
> >> + *  distributed under the License is distributed on an "AS IS" BASIS,
> >> + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> >> implied.
> >> + *  See the License for the specific language governing permissions and
> >> + *  limitations under the License.
> >> + */
> >> +package org.apache.harmony.jretools.pack200;
> >> +
> >> +import java.io.BufferedOutputStream;
> >> +import java.io.FileInputStream;
> >> +import java.io.FileOutputStream;
> >> +import java.io.OutputStream;
> >> +import java.util.jar.JarInputStream;
> >> +
> >> +import org.apache.harmony.pack200.Archive;
> >> +
> >> +public class Main {
> >> +
> >> +    public static void main(String args[]) throws Exception {
> >> +
> >> +        String inputFileName = null;
> >> +        String outputFileName = null;
> >> +        boolean verbose = false;
> >> +        boolean quiet = false;
> >> +        String logFileName = null;
> >> +        boolean gzip = true;
> >> +
> >> +        for (int i = 0; i < args.length; i++) {
> >> +            if (args[i].equals("--help") || args[i].equals("-help")
> >> +                    || args[i].equals("-h") || args[i].equals("-?")) {
> >> +                printHelp();
> >> +                return;
> >> +            } else if(args[i].equals("-g") || args[i].equals("--no-gzip")
> )
> >> {
> >> +                gzip = false;
> >> +            } else if(args[i].equals("--gzip")) {
> >> +                gzip = true;
> >> +            }  else if(args[i].equals("-v") ||
> >> args[i].equals("--verbose")) {
> >> +                verbose = true;
> >> +                quiet = false;
> >> +            } else if(args[i].equals("-q") || args[i].equals("--quiet")) 
> {
> >> +                quiet = true;
> >> +                verbose = false;
> >> +            } else if(args[i].startsWith("-l")) {
> >> +                logFileName = args[i].substring(2);
> >> +            } else if(args[i].equals("-V") || args[i].equals("--version")
> )
> >> {
> >> +                printVersion();
> >> +                return;
> >> +            } else {
> >> +                outputFileName = args[i];
> >> +                if(args.length > i + 1) {
> >> +                    inputFileName = args[i+1];
> >> +                }
> >> +                break;
> >> +            }
> >> +        }
> >> +        if(inputFileName == null || outputFileName == null) {
> >> +            printUsage();
> >> +            return;
> >> +        }
> >> +        JarInputStream inputStream = new JarInputStream(new
> >> FileInputStream(inputFileName));
> >> +        OutputStream outputStream = new BufferedOutputStream(new
> >> FileOutputStream(outputFileName));
> >> +        Archive archive = new Archive(inputStream, outputStream, gzip);
> >> +        archive.pack();
> >> +    }
> >> +
> >> +    private static void printUsage() {
> >> +        System.out.println("Usage:  pack200 [-opt... | --option=value]...
> >> x.pack[.gz] y.jar");
> >> +        System.out.println("(For more information, run pack200 --help)");
> >> +    }
> >> +
> >> +    private static void printHelp() {
> >> +        // TODO: Support all the options
> >> +        System.out.println("Usage:  pack200 [-opt... | --option=value]...
> >> x.pack[.gz] y.jar");
> >> +        System.out.println();
> >> +        System.out.println("Packing Options");
> >> +        System.out.println("  -g, --no-gzip                   output a
> >> plain *.pack file with no zipping");
> >> +        System.out.println("  --gzip                          (default)
> >> post-process the pack output with gzip");
> >> +//        System.out.println("  -G, --strip-debug               remove
> >> debugging attributes while packing");
> >> +//        System.out.println("  -O, --no-keep-file-order        do not
> >> transmit file ordering information");
> >> +//        System.out.println("  --keep-file-order               (default)
> >> preserve input file ordering");
> >> +//        System.out.println("  -S{N}, --segment-limit={N}      output
> >> segment limit (default N=1Mb)");
> >> +//        System.out.println("  -E{N}, --effort={N}             packing
> >> effort (default N=5)");
> >> +//        System.out.println("  -H{h}, --deflate-hint={h}       transmit
> >> deflate hint: true, false, or keep (default)");
> >> +//        System.out.println("  -m{V}, --modification-time={V}  transmit
> >> modtimes: latest or keep (default)");
> >> +//        System.out.println("  -P{F}, --pass-file={F}          transmit
> >> the given input element(s) uncompressed");
> >> +//        System.out.println("  -U{a}, --unknown-attribute={a}  unknown
> >> attribute action: error, strip, or pass (default)");
> >> +//        System.out.println("  -C{N}={L}, --class-attribute={N}={L}
> >>  (user-defined attribute)");
> >> +//        System.out.println("  -F{N}={L}, --field-attribute={N}={L}
> >>  (user-defined attribute)");
> >> +//        System.out.println("  -M{N}={L}, --method-attribute={N}={L}
> >> (user-defined attribute)");
> >> +//        System.out.println("  -D{N}={L}, --code-attribute={N}={L}
> >> (user-defined attribute)");
> >> +//        System.out.println("  -f{F}, --config-file={F}        read file
> >> F for Pack200.Packer properties");
> >> +//        System.out.println("  -v, --verbose                   increase
> >> program verbosity");
> >> +//        System.out.println("  -q, --quiet                     set
> >> verbosity to lowest level");
> >> +//        System.out.println("  -l{F}, --log-file={F}           output to
> >> the given log file, or '-' for System.out");
> >> +        System.out.println("  -?, -h, --help                  print this
> >> message");
> >> +        System.out.println("  -V, --version                   print
> >> program version");
> >> +//        System.out.println("  -J{X}                           pass
> >> option X to underlying Java VM");
> >> +//        System.out.println("");
> >> +//        System.out.println("Notes:");
> >> +//        System.out.println("  The -P, -C, -F, -M, and -D options
> >> accumulate.");
> >> +//        System.out.println("  Example attribute definition:  -C
> >> SourceFile=RUH .");
> >> +//        System.out.println("  Config. file properties are defined by th
> e
> >> Pack200 API.");
> >> +//        System.out.println("  For meaning of -S, -E, -H-, -m, -U values
> ,
> >> see Pack200 API.");
> >> +//        System.out.println("  Layout definitions (like RUH) are defined
> >> by JSR 200.");
> >> +//        System.out.println("");
> >> +//        System.out.println("Repacking mode updates the JAR file with a
> >> pack/unpack cycle:");
> >> +//        System.out.println("    pack200 [-r|--repack] [-opt |
> >> --option=value]... [repackedy.jar] y.jar");
> >> +    }
> >> +
> >> +    private static void printVersion() {
> >> +        System.out.println("Apache Harmony pack200 version 0.0");  // TOD
> O
> >> - version number
> >> +    }
> >> +
> >> +}
> >>
> >> Propchange:
> >> harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache/
> harmony/jretools/pack200/Main.java
> >>
> >> --------------------------------------------------------------------------
> ----
> >>    svn:eol-style = native
> >>
> >> Propchange:
> >> harmony/enhanced/jdktools/trunk/modules/jretools/src/main/java/org/apache/
> harmony/jretools/pack200/Main.java
> >>
> >> --------------------------------------------------------------------------
> ----
> >>    svn:mime-type = text/plain
> >>
> >> Modified: harmony/enhanced/jdktools/trunk/modules/samsa/build.xml
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/samsa
> /build.xml?rev=707024&r1=707023&r2=707024&view=diff
> >>
> >> ==========================================================================
> ====
> >> --- harmony/enhanced/jdktools/trunk/modules/samsa/build.xml (original)
> >> +++ harmony/enhanced/jdktools/trunk/modules/samsa/build.xml Wed Oct 22
> >> 03:28:30 2008
> >> @@ -84,7 +84,10 @@
> >>         <copy file="${hy.samsa.exe}"
> >> tofile="${jretools.deploy.dir}/bin/unpack200${exe.suffix}" />
> >>         <chmod file="${jretools.deploy.dir}/bin/unpack200${exe.suffix}"
> >> perm="ugo+x" />
> >>
> >> -        <copy file="${hy.samsa.exe}"
> >> tofile="${jretools.deploy.dir}/bin/policytool${exe.suffix}" />
> >> +       <copy file="${hy.samsa.exe}"
> >> tofile="${jretools.deploy.dir}/bin/pack200${exe.suffix}" />
> >> +       <chmod file="${jretools.deploy.dir}/bin/pack200${exe.suffix}"
> >> perm="ugo+x" />
> >> +
> >> +       <copy file="${hy.samsa.exe}"
> >> tofile="${jretools.deploy.dir}/bin/policytool${exe.suffix}" />
> >>         <chmod file="${jretools.deploy.dir}/bin/policytool${exe.suffix}"
> >> perm="ugo+x" />
> >>
> >>     </target>
> >> @@ -114,7 +117,8 @@
> >>         <copy file="${hy.samsa.progdb}"
> >> tofile="${jdktools.deploy.dir}/bin/javap${progdb.suffix}" />
> >>         <copy file="${hy.samsa.progdb}"
> >> tofile="${jdktools.deploy.dir}/bin/jarsigner${progdb.suffix}" />
> >>        <copy file="${hy.samsa.progdb}"
> >> tofile="${jretools.deploy.dir}/bin/unpack200${progdb.suffix}" />
> >> -        <copy file="${hy.samsa.progdb}"
> >> tofile="${jretools.deploy.dir}/bin/keytool${progdb.suffix}" />
> >> +       <copy file="${hy.samsa.progdb}"
> >> tofile="${jretools.deploy.dir}/bin/pack200${progdb.suffix}" />
> >> +       <copy file="${hy.samsa.progdb}"
> >> tofile="${jretools.deploy.dir}/bin/keytool${progdb.suffix}" />
> >>         <copy file="${hy.samsa.progdb}"
> >> tofile="${jretools.deploy.dir}/bin/policytool${progdb.suffix}" />
> >>
> >>     </target>
> >> @@ -192,6 +196,14 @@
> >>            <arg line="" />
> >>         </exec>
> >>
> >> +        <echo message="Run jdk/jre/bin/pack200 in ${hy.tests.reports}"/>
> >> +        <exec failonerror="true"
> >> +               executable="${test.jre.home}/bin/pack200${exe.suffix}"
> >> +               dir="${hy.tests.reports}">
> >> +           <arg line="" />
> >> +        </exec>
> >> +
> >> +
> >>     </target>
> >>
> >>     <!-- Clean natives -->
> >>
> >>
> >>
> >
> 
> 
> 
> -- 
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 7415
> 98.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> 



Mime
View raw message