[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - bin/lo-pack-sources bin/unpack-sources download

Fridrich Strba fridrich at kemper.freedesktop.org
Tue Apr 17 02:18:59 PDT 2012


 bin/lo-pack-sources |   11 +++++------
 bin/unpack-sources  |   18 +++++++++---------
 download            |   16 +++++++++-------
 3 files changed, 23 insertions(+), 22 deletions(-)

New commits:
commit fcb1cc5f3788ae1ae3309159d66111767e8781fe
Author: Petr Mladek <pmladek at suse.cz>
Date:   Mon Apr 16 17:16:32 2012 +0200

    allow to download main source tarballs again
    
    The file "core.ver" was removed in configure together with other "core.*"
    files. It was ugly name. Better to use "sources.ver" and the variable
    "lo_sources_ver=..."
    
    The source version is not used in "unpack-sources", so do not source the .ver file
    at all.
    
    The source tarballs are put into "major.minor.micro" version subdirectory
    on the download site now.
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>

diff --git a/bin/lo-pack-sources b/bin/lo-pack-sources
index b57ae1b..11fcd74 100755
--- a/bin/lo-pack-sources
+++ b/bin/lo-pack-sources
@@ -117,14 +117,13 @@ sub run_autoreconf($$)
             "cd - >/dev/null 2>&1") && die "Error: autoreconf failed: $!\n";
 }
 
-sub generate_version_file($$$)
+sub generate_sources_version_file($$)
 {
-    my ($dir, $piece, $release_version) = @_;
+    my ($dir, $release_version) = @_;
 
-    # FIXME: crazy hacks to copy libreoffice-build without too big and useless subdirectories and to show a progress
-    open (VERFILE, ">$dir/$piece.ver") || die "Can't open $dir/lo-$piece.ver: $!\n";
+    open (VERFILE, ">$dir/sources.ver") || die "Can't open $dir/sources.ver: $!\n";
 
-    print VERFILE "lo_core_ver=$release_version\n";
+    print VERFILE "lo_sources_ver=$release_version\n";
 
     close VERFILE;
 }
@@ -248,7 +247,7 @@ sub prepare_piece_sources($$$$)
     my $temp_dir = copy_lo_piece_to_tempdir($piece_dir, $piece, $piece_tarball_name);
     generate_lo_piece_changelog($piece_dir, "$temp_dir/$piece_tarball_name", $piece);
     run_autoreconf("$temp_dir/$piece_tarball_name", $piece) if ($piece eq 'core');
-    generate_version_file("$temp_dir/$piece_tarball_name", $piece, $release_version) if ($piece eq 'core');
+    generate_sources_version_file("$temp_dir/$piece_tarball_name", $release_version) if ($piece eq 'core');
 
     return $temp_dir;
 }
diff --git a/bin/unpack-sources b/bin/unpack-sources
index 271a5e3..0fe4499 100755
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -78,13 +78,12 @@ if ! test -f $start_dir/Repository.mk -a -f $start_dir/solenv/inc/target.mk ; th
     exit 1;
 fi
 
-if test ! -f $start_dir/core.ver -o -d $start_dir/.git ; then
-    echo "Warning: core sources are from git and not from tarball"
+if test ! -f $start_dir/sources.ver -o -d $start_dir/.git ; then
+    echo "Warning: sources are from git and not from tarball"
     echo "         Do nothing."
     exit 0;
 fi
 
-source $start_dir/bootstrap.ver
 lo_src_dir="$start_dir/src"
 mkdir -p "$lo_src_dir"
 
diff --git a/download b/download
index e8ebeff..b5774f1 100755
--- a/download
+++ b/download
@@ -181,15 +181,17 @@ if [ "$COM" = "MSC" ]; then
     downloaditem "http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/" "WindowsXP-KB975337-x86-ENU.exe" "946d00d87e4094f3a6e425e2d538eadd"
 fi
 
-if [ -f $start_dir/core.ver -a ! -d $start_dir/.git ] ; then
-    # core is from sources, so get the other source tarballs
-    . $start_dir/core.ver
+if [ -f $start_dir/sources.ver -a ! -d $start_dir/.git ] ; then
+    # these sources are from a tarball, so get the other source tarballs
+    . $start_dir/sources.ver
+    # sources are put into "major.minor.micro" version directory on the dowload site, e.g. "3.5.2"
+    lo_bugfix_release_sources_ver=`echo $lo_sources_ver | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"`
     lo_src_dir="$start_dir/src"
     mkdir -p "$lo_src_dir"
     for piece in `cat $start_dir/bin/repo-list` ; do
-        tarname="libreoffice-$piece-$lo_core_ver"
+        tarname="libreoffice-$piece-$lo_sources_ver"
         if [ ! -f "$TARFILE_LOCATION/$tarname.tar.xz" ] ; then
-	    downloaditem "http://download.documentfoundation.org/libreoffice/src/" "$tarname.tar.xz" ""
+	    downloaditem "http://download.documentfoundation.org/libreoffice/src/$lo_bugfix_release_sources_ver" "$tarname.tar.xz" ""
 	fi
 	$start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.xz
     done
commit de27fa7a22cf6bb08a03121c7144ac99692a5220
Author: Petr Mladek <pmladek at suse.cz>
Date:   Fri Apr 13 16:20:55 2012 +0200

    unpack-sources, download: update for .xz source tarballs
    
    Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>

diff --git a/bin/unpack-sources b/bin/unpack-sources
index 130c9a2..271a5e3 100755
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -73,13 +73,13 @@ if test -z "$start_dir" ; then
     echo "Error: Please, define where to unpack sources, try --help"
 fi
 
-if ! test -d $start_dir/src -a -f $start_dir/solenv/inc/target.mk ; then
-    echo "Error: $start_dir is not a valid bootstrap directory"
+if ! test -f $start_dir/Repository.mk -a -f $start_dir/solenv/inc/target.mk ; then
+    echo "Error: $start_dir is not a valid LibreOffice core source directory"
     exit 1;
 fi
 
-if test ! -f $start_dir/bootstrap.ver -o -d $start_dir/.git ; then
-    echo "Warning: bootstrap sources are from git and not from tarball"
+if test ! -f $start_dir/core.ver -o -d $start_dir/.git ; then
+    echo "Warning: core sources are from git and not from tarball"
     echo "         Do nothing."
     exit 0;
 fi
@@ -89,17 +89,18 @@ lo_src_dir="$start_dir/src"
 mkdir -p "$lo_src_dir"
 
 for tarball in $tarballs ; do
-    tarname=`basename $tarball | sed -e "s/.tar.bz2//"`
+    tarname=`basename $tarball | sed -e "s/\.tar\..*//"`
     if test -d $lo_src_dir/$tarname ; then
         echo "Warning: $lo_src_dir/$tarname already exists => skipping"
         continue;
     fi
 
     echo "Unpacking $tarname..."
-    tar -xjf "$tarball" -C "$lo_src_dir"
+    echo tar -xf "$tarball" -C "$lo_src_dir"
+    tar -xf "$tarball" -C "$lo_src_dir"
 
-    # create symlinks
-    for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -printf "$tarname/%f\n"` ; do
+    # create symlinks for module directories; ignore git-hooks directory
+    for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -path $lo_src_dir/$tarname/git-hooks -o -printf "$tarname/%f\n"` ; do
         ln -sf "src/$dir" "$start_dir"
     done
 done
diff --git a/download b/download
index 15d4a06..e8ebeff 100755
--- a/download
+++ b/download
@@ -181,17 +181,17 @@ if [ "$COM" = "MSC" ]; then
     downloaditem "http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/" "WindowsXP-KB975337-x86-ENU.exe" "946d00d87e4094f3a6e425e2d538eadd"
 fi
 
-if [ -f $start_dir/bootstrap.ver -a ! -d $start_dir/.git ] ; then
-    # bootstrap is from sources, so get the other source tarballs
-    . $start_dir/bootstrap.ver
+if [ -f $start_dir/core.ver -a ! -d $start_dir/.git ] ; then
+    # core is from sources, so get the other source tarballs
+    . $start_dir/core.ver
     lo_src_dir="$start_dir/src"
     mkdir -p "$lo_src_dir"
     for piece in `cat $start_dir/bin/repo-list` ; do
-        tarname="libreoffice-$piece-$lo_bootstrap_ver"
-        if [ ! -f "$TARFILE_LOCATION/$tarname.tar.bz2" ] ; then
-	    downloaditem "http://download.documentfoundation.org/libreoffice/src/" "$tarname.tar.bz2" ""
+        tarname="libreoffice-$piece-$lo_core_ver"
+        if [ ! -f "$TARFILE_LOCATION/$tarname.tar.xz" ] ; then
+	    downloaditem "http://download.documentfoundation.org/libreoffice/src/" "$tarname.tar.xz" ""
 	fi
-	$start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.bz2
+	$start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.xz
     done
 fi
 


More information about the Libreoffice-commits mailing list