Hilko Bengen
2011-Jun-05 22:57 UTC
[Libguestfs] another missing link in febootstrap; failing tests for libguestfs
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. */
Richard W.M. Jones
2011-Jun-06 13:26 UTC
[Libguestfs] another missing link in febootstrap; failing tests for libguestfs
On Mon, Jun 06, 2011 at 12:57:40AM +0200, Hilko Bengen wrote:> 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.I think it's better to push this into libguestfs/appliance/init, instead of adding hacks to febootstrap. BTW this works OK for me (without hacks/patches) with Debian.> 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_rThis is a bug in gnulib. It's probably been fixed upstream, but it's hard to update gnulib in libguestfs without rewriting the ./bootstrap script. I started on this a while back but never finished it, with the result that we haven't updated gnulib in quite a while (almost exactly 1 year in fact). In Fedora we added this workaround at build time: http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=blob;f=libguestfs.spec;h=b9eaeea567c9e494f16ae3c7b5ed9bfb330f5e32;hb=HEAD#l551> 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-symlinkatI've not seen these bugs before, but they are both bugs in gnulib also. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Reasonably Related Threads
- Re: issue when building/making package from git
- libguestfs-1.0.85-1.el5.5 - seems no KVM acceleration support included
- Japanese and Korean Fonts inside Wine.
- OpenSSH banner doesnot display multibyte characters like korean
- Problemas con tildes y otros caracteres en R y RStudio