]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix building Solaris package from git SCM.
authorIvo Raisr <ivosh@ivosh.net>
Tue, 29 Aug 2017 08:13:20 +0000 (10:13 +0200)
committerIvo Raisr <ivosh@ivosh.net>
Tue, 29 Aug 2017 08:14:01 +0000 (10:14 +0200)
solaris/build_solaris_package
solaris/valgrind.p5m

index 78396c4239cb68ef9d02d6f61b3286c4bb9f6c40..c4ca2c9a337b11a1e310838d106fe5f75e410fa9 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/ksh
 #
 # Builds a Solaris IPS package called "valgrind" from the source
-# directory. The Valgrind and VEX revisions are taken from that
+# directory. The Valgrind revision is taken from that
 # source directory and written to solaris/valgrind.p5m IPS manifest.
 #
 # Requires the following packages to be installed on Solaris 11:
@@ -22,6 +22,7 @@
 # - pkgrepo set -s $repo_uri publisher/prefix=valgrind
 #
 
+GITREPO=git://sourceware.org/git/valgrind.git/
 TMPDIR=/var/tmp/valgrind-build
 SRCDIR=$TMPDIR/sources
 INSTALLDIR=$TMPDIR/install
@@ -58,25 +59,25 @@ create_dirs() {
 
 export_sources() {
     printf "Exporting sources... "
-    svn export --quiet --ignore-externals $source_directory $SRCDIR \
-        2> $TMPDIR/svn-export-valgrind.log.stderr
-    (( $? != 0 )) && fail "Failed to export working copy from $source_directory."
-    svn export --quiet --ignore-externals $source_directory/VEX $SRCDIR/VEX \
-        2> $TMPDIR/svn-export-vex.log.stderr
-    (( $? != 0 )) && fail "Failed to export working copy from $source_directory/VEX."
+    old_dir=$( pwd )
+    git_commit=$( cd $source_directory; git rev-parse HEAD )
+
+    git clone ${GITREPO} ${SRCDIR} 2> $TMPDIR/git-clone-valgrind.log.stderr
+    (( $? != 0 )) && fail "Failed to clone git repo from $source_directory."
+    cd ${SRCDIR}
+    git checkout ${git_commit} 2> $TMPDIR/git-checkout-valgrind.log.stderr
+    (( $? != 0 )) && fail "Failed to checkout git commit ${git_commit}."
+    cd "$old_dir"
     printf "done.\n"
 }
 
 modify_ips_manifest() {
-    valgrind_rev=$( svn info $source_directory | grep Revision | sed -e 's/Revision: //' )
-    vex_rev=$( svn info $source_directory/VEX | grep Revision | sed -e 's/Revision: //' )
+    valgrind_commit=$( cd $source_directory; git rev-parse --short=11 HEAD )
+    [[ -z $valgrind_commit ]] && fail "Failed to find Valgrind revision."
 
-    [[ -z $valgrind_rev ]] && fail "Failed to find Valgrind revision."
-    [[ -z $vex_rev ]] && fail "Failed to find VEX revision."
+    echo "Valgrind commit: $valgrind_commit."
 
-    echo "Valgrind revision: $valgrind_rev, VEX revision $vex_rev."
-
-    sed -i -e "s/VVVVV-XXXX/${valgrind_rev}-${vex_rev}/" $SRCDIR/$IPS_MANIFEST
+    sed -i -e "s/VVVVV/${valgrind_commit}/" $SRCDIR/$IPS_MANIFEST
 }
 
 run_autogen() {
index a5c8fc09c1b580bb110dce3b1eb63f188b9b7a28..66703355294b076de384a6964f6499297e5bf4d2 100644 (file)
@@ -1,4 +1,4 @@
-set name=pkg.fmri value=developer/debug/valgrind@3.11.0,VVVVV-XXXX
+set name=pkg.fmri value=developer/debug/valgrind@3.13.0,VVVVV
 set name=pkg.description value="valgrind: instrumentation framework and tools to detect memory and threading problems"
 set name=pkg.summary value="Valgrind is an award-winning instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools. Currently x86 (32-bit) and amd64 (64-bit) platforms are supported."
 set name=variant.arch value=i386