From: Ivo Raisr Date: Tue, 29 Aug 2017 08:13:20 +0000 (+0200) Subject: Fix building Solaris package from git SCM. X-Git-Tag: VALGRIND_3_14_0~274 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a3b5325ccc8138c35413b573f734f5480f7b7d5;p=thirdparty%2Fvalgrind.git Fix building Solaris package from git SCM. --- diff --git a/solaris/build_solaris_package b/solaris/build_solaris_package index 78396c4239..c4ca2c9a33 100755 --- a/solaris/build_solaris_package +++ b/solaris/build_solaris_package @@ -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() { diff --git a/solaris/valgrind.p5m b/solaris/valgrind.p5m index a5c8fc09c1..6670335529 100644 --- a/solaris/valgrind.p5m +++ b/solaris/valgrind.p5m @@ -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