Merge pull request #152458 from alyssais/vmTools-test

vmTools/test: fix
This commit is contained in:
Jörg Thalheim 2021-12-31 15:48:41 +00:00 committed by GitHub
commit 2b91ac56ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -510,8 +510,7 @@ rec {
tarball must contain an RPM specfile. */
buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation ({
prePhases = [ pkgs.prepareImagePhase pkgs.sysInfoPhase ];
dontUnpack = true;
prePhases = [ "prepareImagePhase" "sysInfoPhase" ];
dontConfigure = true;
outDir = "rpms/${attrs.diskImage.name}";
@ -536,9 +535,7 @@ rec {
buildPhase = ''
eval "$preBuild"
# Hacky: RPM looks for <basename>.spec inside the tarball, so
# strip off the hash.
srcName="$(stripHash "$src")"
srcName="$(rpmspec --srpm -q --qf '%{source}' *.spec)"
cp "$src" "$srcName" # `ln' doesn't work always work: RPM requires that the file is owned by root
export HOME=/tmp/home

View file

@ -9,20 +9,23 @@ with vmTools;
buildHelloInVM = runInLinuxVM hello;
buildPanInVM = runInLinuxVM pan;
buildPcmanrmInVM = runInLinuxVM (pcmanfm.overrideAttrs (old: {
# goes out-of-memory with many cores
enableParallelBuilding = false;
}));
testRPMImage = makeImageTestScript diskImages.fedora16x86_64;
testRPMImage = makeImageTestScript diskImages.fedora27x86_64;
buildPatchelfRPM = buildRPM {
name = "patchelf-rpm";
src = patchelf.src;
diskImage = diskImages.fedora16x86_64;
diskImage = diskImages.fedora27x86_64;
diskImageFormat = "qcow2";
};
testUbuntuImage = makeImageTestScript diskImages.ubuntu810i386;
testUbuntuImage = makeImageTestScript diskImages.ubuntu1804i386;
buildInDebian = runInLinuxImage (stdenv.mkDerivation {