After the last round of patches to febootstrap, the image-based test in
libguestfs still failed. It turned out that this happens because Debian
started replacing /var/run and /var/lock with symlinks that point to a
tmpfs mounted to /run. The symlinks were copied to the appliance but
/run/lock did not exist, so pvcreate refused to run (script
'images/guest-aux/make-debian-img.sh').
After I added the following patch to helper/init.c, the image-based test
worked. I am not certain whether this is the right approach, though.
The next thing I'll be looking at are the following failed libguestfs
tests:
test-getlogin_r.c:42: assertion failed
/bin/bash: line 5: 18338 Aborted EXEEXT='' srcdir='.'
LOCALE_FR='fr_FR' LOCALE_FR_UTF8='fr_FR.UTF-8'
LOCALE_JA='ja_JP.EUC-JP' LOCALE_ZH_CN='zh_CN.GB18030'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_FR='fr_FR'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_JA='ja_JP.EUC-JP'
LOCALE_ZH_CN='zh_CN.GB18030' MAKE='make' ${dir}$tst
FAIL: test-getlogin_r
test-readlink.h:41: assertion failed
/bin/bash: line 5: 18514 Aborted EXEEXT='' srcdir='.'
LOCALE_FR='fr_FR' LOCALE_FR_UTF8='fr_FR.UTF-8'
LOCALE_JA='ja_JP.EUC-JP' LOCALE_ZH_CN='zh_CN.GB18030'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_FR='fr_FR'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_JA='ja_JP.EUC-JP'
LOCALE_ZH_CN='zh_CN.GB18030' MAKE='make' ${dir}$tst
FAIL: test-readlink
test-readlink.h:41: assertion failed
/bin/bash: line 5: 18624 Aborted EXEEXT='' srcdir='.'
LOCALE_FR='fr_FR' LOCALE_FR_UTF8='fr_FR.UTF-8'
LOCALE_JA='ja_JP.EUC-JP' LOCALE_ZH_CN='zh_CN.GB18030'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_FR='fr_FR'
LOCALE_FR_UTF8='fr_FR.UTF-8' LOCALE_JA='ja_JP.EUC-JP'
LOCALE_ZH_CN='zh_CN.GB18030' MAKE='make' ${dir}$tst
FAIL: test-symlinkat
-Hilko
diff --git a/helper/init.c b/helper/init.c
index 50ed19e..8f3834f 100644
--- a/helper/init.c
+++ b/helper/init.c
@@ -181,6 +181,12 @@ main ()
chdir ("/");
mount_proc ();
+ if (mount ("tmpfs", "/run", "tmpfs",
+ MS_NOEXEC|MS_NOSUID, "size=10%,mode=0755") == -1) {
+ perror ("mount: /run");
+ exit (EXIT_FAILURE);
+ }
+y mkdir ("/run/lock", 01777);
print_uptime ();
/* Run /init from ext2 filesystem. */