[Libreoffice-commits] .: Branch 'feature/rip-build-repo' - 9 commits - bin/git-new-workdir bin/git-ps1 bin/mkworkdir bin/repo-list bootstrap.1 download g .gitignore ooo.lst set_soenv.in

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Mon Nov 22 01:29:43 PST 2010


 .gitignore          |    9 ++++
 bin/git-new-workdir |   82 +++++++++++++++++++++++++++++++++++++++++
 bin/git-ps1         |   52 ++++++++++++++++++++++++++
 bin/mkworkdir       |  103 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 bin/repo-list       |    1 
 bootstrap.1         |    4 +-
 download            |    3 +
 g                   |    3 +
 ooo.lst             |    8 +---
 set_soenv.in        |    1 
 10 files changed, 258 insertions(+), 8 deletions(-)

New commits:
commit b0a02abdd67458ccd02bc1136341f2ac6c854ed2
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Nov 22 03:12:15 2010 -0600

    adjust ooo.lst due to moving target in other repos

diff --git a/ooo.lst b/ooo.lst
index 59b247f..802a85a 100644
--- a/ooo.lst
+++ b/ooo.lst
@@ -77,11 +77,9 @@ debc62758716a169df9f62e6ab2bc634-zlib-1.2.3.tar.gz
 e3738abd0d3ce1870dc1fd1f22bba5b1-icu4c-4_2_1-src.tgz
 0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz
 71474203939fafbe271e1263e61d083e-nss-3.12.8-with-nspr-4.8.6.tar.gz
-http://download.go-oo.org/SRC680
-799fc3b835a79adce8c88a3fee0150c1-libwps-0.1.2.tar.gz
-db556b750bf3eac8481a4cc5e29e5af1-libwpg-0.1.3.tar.gz
-http://download.go-oo.org/libwpd
-64d66018897d759358f454010b6e75d2-libwpd-0.8.14.tar.gz
+5ba6a61a2f66dfd5fee8cdd4cd262a37-libwpg-0.2.0.tar.bz2
+86e390f015e505dd71a66f0123c62f09-libwpd-0.9.0.tar.bz2
+9e436bff44c60dc8b97cba0c7fc11a5c-libwps-0.2.0.tar.bz2
 http://download.go-oo.org/extern
 185d60944ea767075d27247c3162b3bc-unowinreg.dll
 http://www.numbertext.org/linux
commit e12279386ccebf916abdee55de6356e862ff8793
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Nov 22 03:11:56 2010 -0600

    oops: remove a debugging flags in g

diff --git a/g b/g
index 2d5e7d2..246d9a4 100755
--- a/g
+++ b/g
@@ -2,7 +2,7 @@
 #
 # Wrapper for git to handle more subdirs at the same time
 #
-set -x
+
 # no params, no action
 if [ "$#" -eq "0" ] ; then
     git
commit bd58937547ffa59fcfb1225c1db675e00005abfd
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Nov 22 03:11:23 2010 -0600

    simplify the determination of the bootstrap dir

diff --git a/bin/mkworkdir b/bin/mkworkdir
index 10630f8..9691ee1 100755
--- a/bin/mkworkdir
+++ b/bin/mkworkdir
@@ -57,18 +57,13 @@ done
 
 
 if [ -z "$BOOTSTRAP_DIR" ]; then
-    BOOTSTRAP_DIR=$(git rev-parse --git-dir 2>/dev/null) || die "Cannot use the current working directory as implicit source: Not a git repository"
-
-    case "$BOOTSTRAP_DIR" in
-	.git)
-	    BOOTSTRAP_DIR="$(pwd)"
-	    ;;
-	.)
-	    cd .. && BOOTSTRAP_DIR=$(pwd)
-	    ;;
-    esac
+    BOOTSTRAP_DIR=$(git rev-parse --show-toplevel 2>/dev/null) || die "Cannot use the current working directory as implicit source: Not a git repository"
+    if [ -n "$BOOTSTRAP_DIR" ] ; then
+	if [ "$(basename $(git config remote.origin.url))" != "bootstrap" ] ; then
+	    die "Cannot use the current working directory as implicit source: Not a bootstrap git repository"
+	fi
+    fi
 fi
-
 if [ -z "$DEST_DIR" ]; then
     echo "destination directory is missing."
     print_help $0
commit a90881df93fffff0076d4d39b1bf35ee12e2ee5f
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:16:52 2010 -0600

    adjust .gitignore for bootstrap build

diff --git a/.gitignore b/.gitignore
index 6829bde..588c1f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
 /*/unxlng??.pro
 /*/wntmsci??
 /*/wntmsci??.pro
+/*/unxmacxi.pro
 
 # autoconf generated stuff
 /aclocal.m4
@@ -25,10 +26,18 @@
 /set_soenv
 /visibility.cxx
 
+# misc
+/set_soenv.last
+/set_soenv.stamp
+/warn
+/build.log
+
 /*.Set.sh
 
 /*/*.exe
 
+/solver/*
+
 # links to the other repositories
 MathMLDTD
 Mesa
commit df3a280a55b28c98844952bc03f4bb93d156d4ac
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:06:14 2010 -0600

    add some utility scripts to create new workdir
    
    based on kohei blog on the subject, adapted for the 'bootstrap' build

diff --git a/bin/git-new-workdir b/bin/git-new-workdir
new file mode 100755
index 0000000..3ad2c0c
--- /dev/null
+++ b/bin/git-new-workdir
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+usage () {
+	echo "usage:" $@
+	exit 127
+}
+
+die () {
+	echo $@
+	exit 128
+}
+
+if test $# -lt 2 || test $# -gt 3
+then
+	usage "$0 <repository> <new_workdir> [<branch>]"
+fi
+
+orig_git=$1
+new_workdir=$2
+branch=$3
+
+# want to make sure that what is pointed to has a .git directory ...
+git_dir=$(cd "$orig_git" 2>/dev/null &&
+  git rev-parse --git-dir 2>/dev/null) ||
+  die "Not a git repository: \"$orig_git\""
+
+case "$git_dir" in
+.git)
+	git_dir="$orig_git/.git"
+	;;
+.)
+	git_dir=$orig_git
+	;;
+esac
+
+# don't link to a configured bare repository
+isbare=$(git --git-dir="$git_dir" config --bool --get core.bare)
+if test ztrue = z$isbare
+then
+	die "\"$git_dir\" has core.bare set to true," \
+		" remove from \"$git_dir/config\" to use $0"
+fi
+
+# don't link to a workdir
+if test -L "$git_dir/config"
+then
+	die "\"$orig_git\" is a working directory only, please specify" \
+		"a complete repository."
+fi
+
+# don't recreate a workdir over an existing repository
+if test -e "$new_workdir"
+then
+	die "destination directory '$new_workdir' already exists."
+fi
+
+# make sure the links use full paths
+git_dir=$(cd "$git_dir"; pwd)
+
+# create the workdir
+mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
+
+# create the links to the original repo.  explicitly exclude index, HEAD and
+# logs/HEAD from the list since they are purely related to the current working
+# directory, and should not be shared.
+for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
+do
+	case $x in
+	*/*)
+		mkdir -p "$(dirname "$new_workdir/.git/$x")"
+		;;
+	esac
+	ln -s "$git_dir/$x" "$new_workdir/.git/$x"
+done
+
+# now setup the workdir
+cd "$new_workdir"
+# copy the HEAD from the original repository as a default branch
+cp "$git_dir/HEAD" .git/HEAD
+# checkout the branch (either the same as HEAD from the original repository, or
+# the one that was asked for)
+git checkout -f $branch
diff --git a/bin/git-ps1 b/bin/git-ps1
new file mode 100755
index 0000000..8a09800
--- /dev/null
+++ b/bin/git-ps1
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+r=
+b=
+g="$(git rev-parse --git-dir 2>/dev/null)"
+
+if [ -n "$g" ]; then
+    if [ -d "$g/../.dotest" ]
+        then
+        if test -f "$g/../.dotest/rebasing"
+            then
+            r="|REBASE"
+        elif test -f "$g/../.dotest/applying"
+            then
+            r="|AM"
+        else
+            r="|AM/REBASE"
+        fi
+        b="$(git symbolic-ref HEAD 2>/dev/null)"
+    elif [ -f "$g/.dotest-merge/interactive" ]
+        then
+        r="|REBASE-i"
+        b="$(cat "$g/.dotest-merge/head-name")"
+    elif [ -d "$g/.dotest-merge" ]
+        then
+        r="|REBASE-m"
+        b="$(cat "$g/.dotest-merge/head-name")"
+    elif [ -f "$g/MERGE_HEAD" ]
+        then
+        r="|MERGING"
+        b="$(git symbolic-ref HEAD 2>/dev/null)"
+    else
+        if [ -f "$g/BISECT_LOG" ]
+            then
+            r="|BISECTING"
+        fi
+        if ! b="$(git symbolic-ref HEAD 2>/dev/null)"
+            then
+            if ! b="$(git describe --exact-match HEAD 2>/dev/null)"
+                then
+                b="$(cut -c1-7 "$g/HEAD")..."
+            fi
+        fi
+    fi
+
+    if [ -n "$1" ]; then
+        printf "$1" "${b##refs/heads/}$r"
+    else
+        printf "%s" "${b##refs/heads/}$r"
+    fi
+else
+    printf "not-in-git"
+fi
diff --git a/bin/mkworkdir b/bin/mkworkdir
new file mode 100755
index 0000000..10630f8
--- /dev/null
+++ b/bin/mkworkdir
@@ -0,0 +1,108 @@
+#!/usr/bin/env bash
+
+BASEDIR=$(dirname $0)
+GIT_NEW_WORKDIR=`which git-new-workdir 2>/dev/null`
+if [ -z $GIT_NEW_WORKDIR ] ; then
+   GIT_NEW_WORKDIR="$BASEDIR/git-new-workdir"
+fi
+
+print_help() {
+    echo "Usage: $1 [-s | --source bootstrap_reference_repo_path] [ -d | --workdir-base-path path] [ --as alias_name] [branch name]"
+    echo "--source is optional if you are currently in a bootstrap git repository, in which case that repository is used as source"
+    echo "--workdir-base-path is optional if you have defined LO_BASE_WORKDIR in your environement"
+    echo "--as is the name of the directory that will be the bootstrap of your new workdir ensemble. the default is the branch name used to create the workdir"
+    echo "the branch name is optional, the default is 'master'"
+}
+
+die() {
+    echo $1
+    exit 1
+}
+
+BOOTSTRAP_DIR=
+DEST_DIR=${LO_BASE_WORKDIR:-}
+BRANCH="master"
+
+while [ "${1:-}" != "" ] ; do
+      case $1 in
+	  -s | --source )
+	      shift
+	      BOOTSTRAP_DIR="$1"
+	      ;;
+	  -d | --workdir-base-path )
+	      shift
+	      DEST_DIR="$1"
+	      ;;
+	  --as )
+	      shift
+	      WKDIR_NAME="$1"
+	      ;;
+	  -h | --help )
+	      print_help $0
+	      exit 0
+	      ;;
+	  -* )
+	      die "invalid option $1"
+	      ;;
+	  *)
+	      if [ -z "$BRANCH" ] ; then
+		  BRANCH="$1"
+	      else
+		  die "Too many arguments"
+	      fi
+	      ;;
+      esac
+      shift
+done
+
+
+if [ -z "$BOOTSTRAP_DIR" ]; then
+    BOOTSTRAP_DIR=$(git rev-parse --git-dir 2>/dev/null) || die "Cannot use the current working directory as implicit source: Not a git repository"
+
+    case "$BOOTSTRAP_DIR" in
+	.git)
+	    BOOTSTRAP_DIR="$(pwd)"
+	    ;;
+	.)
+	    cd .. && BOOTSTRAP_DIR=$(pwd)
+	    ;;
+    esac
+fi
+
+if [ -z "$DEST_DIR" ]; then
+    echo "destination directory is missing."
+    print_help $0
+    exit 1
+fi
+
+if [ -z "$WKDIR_NAME" ]; then
+    WKDIR_NAME="$BRANCH"
+fi
+
+if [ -e "$DEST_DIR/$WKDIR_NAME" ]; then
+    die "$DEST_DIR/$WKDIR_NAME already exists."
+fi
+
+echo "===== bootstrap ====="
+$GIT_NEW_WORKDIR $BOOTSTRAP_DIR "$DEST_DIR/$WKDIR_NAME" $BRANCH
+
+echo "creating directory $DEST_DIR/$WKDIR_NAME/clone"
+mkdir -p "$DEST_DIR/$WKDIR_NAME/clone" || die "failed to create $DEST_DIR/$WKDIR_NAME/clone"
+
+REPOS=$(cat ${BASEDIR}/repo-list)
+
+cd "$DEST_DIR/$WKDIR_NAME"
+
+for repo in $REPOS; do
+    repo_path="${BOOTSTRAP_DIR}/clone/$repo"
+    echo "===== $repo ====="
+    $GIT_NEW_WORKDIR $repo_path "$DEST_DIR/$WKDIR_NAME/clone/$repo" $BRANCH
+    for link in $(ls ./clone/$repo) ; do
+        if [ ! -e "$link" ] ; then
+            echo "Creating link $link"
+            ln -s "./clone/$repo/$link" "$link"
+        fi
+    done
+
+done
+
diff --git a/bin/repo-list b/bin/repo-list
new file mode 100644
index 0000000..349fb7d
--- /dev/null
+++ b/bin/repo-list
@@ -0,0 +1 @@
+artwork base calc components extensions extras filters help impress libs-core libs-extern libs-extern-sys libs-gui postprocess sdk testing ure writer
commit 499dd199b72988e579a6adf4763cc70300bf4593
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:04:06 2010 -0600

    correct the instructions:./download and ./g clone are implicit with make

diff --git a/set_soenv.in b/set_soenv.in
index a83c29b..a7dc52c 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -2154,7 +2154,6 @@ if ( $Warning ne "" )
 print "*********************************************************".
       "******************* $newline";
 
-print "\nTo download the build dependencies, issue:\n./g clone\n./download\n\n";
 print "To build, issue:\nmake\n\n";
 print "For the developer installation, issue:\nmake dev-install\n\n";
 
commit c36e95ebb56ce5373c7a2e18c754c139df31d4bc
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:02:59 2010 -0600

    make the download step clone the 'others' git-repos if needed

diff --git a/download b/download
index e2f0340..f238027 100755
--- a/download
+++ b/download
@@ -26,6 +26,9 @@
 #
 #*************************************************************************
 
+if [ ! -d clone ] ; then
+    ./g clone
+fi
 if [ -z "$TARFILE_LOCATION" ]; then
     . ./*.Set.sh
 fi
commit 23b28ddfa52050967bceb63fdfbea6f106ae7d78
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:01:56 2010 -0600

    in the 'bootstrap' based build, fetch_tarball is really ./download

diff --git a/bootstrap.1 b/bootstrap.1
index 156f562..68ed695 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -80,5 +80,7 @@ chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
 
 # fetch or update external tarballs
 if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
-	$SRC_ROOT/fetch_tarballs.sh $SRC_ROOT/ooo.lst
+	(
+	cd $SRC_ROOT && ./download
+	)
 fi
commit 1251dc9b1ec5a6190affc1f19d24dc67d61e0102
Author: Norbert Thiebaud <norbert at sqdata.com>
Date:   Sat Nov 20 23:00:47 2010 -0600

    Make the determination of the remote repo url work on MacOS
    
    Use bash substitution, instead of a piped sed

diff --git a/g b/g
index e410422..2d5e7d2 100755
--- a/g
+++ b/g
@@ -2,7 +2,7 @@
 #
 # Wrapper for git to handle more subdirs at the same time
 #
-
+set -x
 # no params, no action
 if [ "$#" -eq "0" ] ; then
     git
@@ -187,7 +187,8 @@ for REPO in $DIRS ; do
                     fi
                     ;;
                 clone)
-                    EXTRA="$(git config remote.origin.url|sed 's|/[^/]\+$||')/${REPO}"
+                    EXTRA="$(git config remote.origin.url)"
+		    EXTRA=${EXTRA/bootstrap/${REPO}}
                     ;;
             esac
 


More information about the Libreoffice-commits mailing list