From: Richard W.M. Jones Date: Sat, 8 Mar 2014 14:46:33 +0000 (+0000) Subject: Use supermin4 binary when compiling libguestfs <= 1.24. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=2b5c3a7099d0ef718c466be184eec162f7030eb5;p=goaljobs-goals.git Use supermin4 binary when compiling libguestfs <= 1.24. --- diff --git a/config.ml b/config.ml index 6016647..aaf536c 100644 --- a/config.ml +++ b/config.ml @@ -36,10 +36,21 @@ let libguestfs_localconfigure source = \"$@\" " configure -let libguestfs_localenv = "\ +let libguestfs_localenv supermin = + "\ # Parallel test runs out of resources starting qemu, unclear why. export SKIP_TEST_PARALLEL_MOUNT_LOCAL=1 # Fails under valgrind because cpio subprocess has a memory leak. export SKIP_TEST_FILE_ARCHITECTURE_11=1 -" + +" ^ + match supermin with + | None -> "" + | Some (supermin, supermin_helper) -> + sprintf "\ +# Needs a modified path to supermin binaries: +export SUPERMIN=%s +export SUPERMIN_HELPER=%s + +" supermin supermin_helper diff --git a/libguestfs.ml b/libguestfs.ml index f3759ac..2fe867a 100644 --- a/libguestfs.ml +++ b/libguestfs.ml @@ -59,6 +59,14 @@ let vernames version = url = url } ) +(* For libguestfs <= 1.24, we need an old supermin 4 binary. *) +let supermin = function + | { major = 1; minor = i } when i <= 24 -> + let home = Sys.getenv "HOME" in + Some ( home // "d/supermin4/src/supermin", + home // "d/supermin4/helper/supermin-helper" ) + | _ -> None + (* Clone or update a repo to the latest version on a branch, by force. * It is cached in name = $buildtmp/repos/- *) diff --git a/libguestfs_upstream.ml b/libguestfs_upstream.ml index 42f9897..06bf83b 100644 --- a/libguestfs_upstream.ml +++ b/libguestfs_upstream.ml @@ -100,7 +100,7 @@ and website_built version = " buildtmp version.tarball version.package_version (quote (libguestfs_localconfigure `Tarball)) - (quote libguestfs_localenv) + (quote (libguestfs_localenv (supermin version))) (quote libguestfs_website_repo) (* Goal: the tarball has passed the required set of tests before @@ -127,7 +127,7 @@ and tarball_tested version = " buildtmp version.tarball version.package_version (quote (libguestfs_localconfigure `Tarball)) - (quote libguestfs_localenv) + (quote (libguestfs_localenv (supermin version))) (* Goal: the tarball has been created from git. *) and tarball_created version = @@ -160,7 +160,7 @@ and tarball_created version = " repodir version.version (quote (libguestfs_localconfigure `Git)) - (quote libguestfs_localenv) + (quote (libguestfs_localenv (supermin version))) version.tarball buildtmp version.tarball (* Goal: test a commit. *) @@ -194,7 +194,7 @@ and commit_tested branch commit = " repodir commit (quote (libguestfs_localconfigure `Git)) - (quote libguestfs_localenv) + (quote (libguestfs_localenv None)) and repo_up_to_date branch = git_force branch