ChineSouad / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Please provide a source only tarball #283

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please provide a source only tarball to ease building for downstreams (e.g. 
Fedora Linux in my case). 
See https://fisheye.codehaus.org/changelog/qdox/?cs=695#trunkZ002fqdox for 
example what qdox guys has done. All Apache Commons are doing it also

Original issue reported on code.google.com by akurta...@gmail.com on 2 Feb 2011 at 11:01

GoogleCodeExporter commented 9 years ago
I believe you should be able to pull this out of the zip file provided in the 
downloads section. Within the zip is a gson-sources.jar file which is 
essentially the same as a tarball. Unzip the files from the jar and you have 
the source.

Original comment by joel.leitch@gmail.com on 13 Apr 2011 at 4:28

GoogleCodeExporter commented 9 years ago
The -sources.jar does contain the source *java files but not build scripts 
(pom.xml). 

You could add something like this into pom to generate nice project releases:
  <build>
      <plugins>
 ...
 <plugin>
   <artifactId>maven-assembly-plugin</artifactId>
   <configuration>
     <descriptorRefs>
       <descriptorRef>project</descriptorRef>
     </descriptorRefs>
   </configuration>
   <executions>
     <execution>
       <id>make-assembly</id>
       <phase>package</phase>
       <goals>
         <goal>single</goal>
       </goals>
     </execution>
   </executions>
 </plugin>
 ...
      </plugins>
    </build>

Original comment by sochotni...@gmail.com on 13 Apr 2011 at 4:42

GoogleCodeExporter commented 9 years ago

Original comment by limpbizkit on 29 Dec 2011 at 5:52

GoogleCodeExporter commented 9 years ago
FWIW, there seems to be something terribly wrong with google-code's svn. There 
is now way to get the same sources for a release tag for two subsequent svn 
exports.

Example:

    $ cat google-gson.sh
    #!/bin/bash

    FIRST="first"
    SECOND="second"

    rm -rf $FIRST $SECOND

    mkdir $FIRST $SECOND

    pushd $FIRST
    svn export http://google-gson.googlecode.com/svn/tags/gson-2.2.2@1218 google-gson-2.2.2 > /dev/null
    tar -cJf google-gson-2.2.2.tar.xz google-gson-2.2.2
    first_sha=$(sha256sum google-gson-2.2.2.tar.xz | cut -d' ' -f1)
    popd

    pushd $SECOND
    svn export http://google-gson.googlecode.com/svn/tags/gson-2.2.2@1218 google-gson-2.2.2 > /dev/null
    tar -cJf google-gson-2.2.2.tar.xz google-gson-2.2.2
    second_sha=$(sha256sum google-gson-2.2.2.tar.xz | cut -d' ' -f1)
    popd

    if [ "$first_sha" != "$second_sha" ]; then
    echo -e "FAIL!\n"
    echo "SHA256SUM of 1: $first_sha"
    echo "SHA256SUM of 2: $second_sha"
    else
    echo "PASS!"
    fi

    $ bash google-gson.sh
    ~/first ~
    ~
    ~/second ~
    ~
    FAIL!

    SHA256SUM of 1: b6d0fea60c653b9b138848c613ea9c25e67e3a09d5b969c36bf11edf2ca4e687
    SHA256SUM of 2: 8d91396ff9baed486310f8b44c4312ba7d438438249abeed58abd493b193e6b4

Providing source tarballs would be much appreciated.

Original comment by jerb...@gmail.com on 20 Dec 2012 at 10:52

GoogleCodeExporter commented 9 years ago
As it turns out something like this works:

#!/bin/bash

FIRST="first"
SECOND="second"

first_sha_list=first_sha256.txt
second_sha_list=second_sha256.txt

rm -rf $FIRST $SECOND

mkdir $FIRST $SECOND

pushd $FIRST
svn export http://google-gson.googlecode.com/svn/tags/gson-2.2.2@1218 
google-gson-2.2.2 > /dev/null
OLD_IFS="$IFS"
export IFS='
'
for i in $(find google-gson-2.2.2 -type f); do sha256sum $i; done > 
$first_sha_list
export IFS="$OLD_IFS"
popd

pushd $SECOND
svn export http://google-gson.googlecode.com/svn/tags/gson-2.2.2@1218 
google-gson-2.2.2 > /dev/null
OLD_IFS="$IFS"
export IFS='
'
for i in $(find google-gson-2.2.2 -type f); do sha256sum $i; done > 
$second_sha_list
export IFS="$OLD_IFS"
popd

if ! diff -u $FIRST/$first_sha_list $SECOND/$second_sha_list; then
   echo -e "FAIL!\n"
   diff -u $FIRST/$first_sha_list $SECOND/$second_sha_list;
else
   echo "PASS!"
fi

In any case, source tarballs would be much easier to verify.

Original comment by jerb...@gmail.com on 20 Dec 2012 at 11:51

GoogleCodeExporter commented 9 years ago
We no longer provide downloads on the Gson page.

Original comment by inder123 on 12 Nov 2014 at 11:43