[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] fedoostrap or deboostrap requirement

Guido Günther wrote:
> You need to figure out why debirf thinks you're running as uid 0. Either
> you're really doing so or you're running with fakeroot already.
Actually I'm running as root , but to be more precise I'm running this
from gentoo emerge/ebuild process which setups proper
sandbox to avoid system damage.

 I've had several additional problem i managed to solve, the last one
might need proper solution in deootstrap code - details below:

# fakeroot -i debian/.fakeroot-state.debirf-libguestfs -s
debian/.fakeroot-state.debirf-libguestfs fakechroot
/usr/sbin/debootstrap --variant=fakechroot
--keyring=/usr/share/keyrings/debian-archive-keyring.gpg --include=less
lenny debian/root http://ftp.debian.org/debian/
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 7F5A44454C724A65CBCD4FB14D270D06F42584E6)
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://ftp.debian.org/debian...
I: Validating adduser
I: Validating apt
I: Validating aptitude
I: Extracting util-linux...
I: Extracting zlib1g...
I: Installing core packages...
W: Failure trying to run: chroot
dpkg --force-depends --install

 I managed to solve it by patching debootstrap - more details below:

# chroot
(chroot):/# dpkg -l
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
||/ Name           Version        Description
ii  base-files     5lenny3        Debian base system miscellaneous files
ii  base-passwd    3.5.20         Debian base system master password and
ii  dpkg           1.14.25
(chroot):/# exit            
# chroot
dpkg --force-depends --install
Selecting previously deselected package base-files.
dpkg: regarding .../base-files_5lenny3_amd64.deb containing base-files,
pre-dependency problem:
 base-files pre-depends on awk
  awk is not installed.
dpkg: warning - ignoring pre-dependency problem !
(Reading database ... 0 files and directories currently installed.)
Unpacking base-files (from .../base-files_5lenny3_amd64.deb) ...
Selecting previously deselected package base-passwd.
Unpacking base-passwd (from .../base-passwd_3.5.20_amd64.deb) ...
dpkg: base-passwd: dependency problems, but configuring anyway as you
 base-passwd depends on libc6 (>= 2.7-1); however:
  Package libc6 is not installed.
Setting up base-passwd (3.5.20) ...
dpkg: base-files: dependency problems, but configuring anyway as you
 base-files depends on awk; however:
  Package awk is not installed.
Setting up base-files (5lenny3) ...
# echo $?

So something must be wrong in the debootstrap code, and the following
patch fixes it

# diff -Nru /usr/share/debootstrap/scripts/lenny.orig
--- /usr/share/debootstrap/scripts/lenny.orig   2009-07-13
00:15:25.000000000 +0300
+++ /usr/share/debootstrap/scripts/lenny        2009-07-13
00:15:16.000000000 +0300
@@ -80,7 +80,7 @@

 second_stage_install () {
     x_core_install () {
-       smallyes '' | in_target dpkg --force-depends --install $(debfor
+       chroot $TARGET dpkg --force-depends --install $(debfor "$@")

     p () {

Meaning in_target function defined in /usr/share/debootstrap/functions
does not work correctly.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]