\"$@\"
" 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
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/<package>-<branch>
*)
" 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
" 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 =
" repodir
version.version
(quote (libguestfs_localconfigure `Git))
- (quote libguestfs_localenv)
+ (quote (libguestfs_localenv (supermin version)))
version.tarball buildtmp version.tarball
(* Goal: test a commit. *)
" repodir
commit
(quote (libguestfs_localconfigure `Git))
- (quote libguestfs_localenv)
+ (quote (libguestfs_localenv None))
and repo_up_to_date branch =
git_force branch