[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
--exclude=apt-utils,bsdmainutils,cron,ed,info,logrotate,man-db,manpages,tasksel,tasksel-data,tcpd,traceroute
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
/var/tmp/portage/app-emulation/libguestfs-1.0.57/work/libguestfs-1.0.57/appliance/debian/root
dpkg --force-depends --install
/var/cache/apt/archives/base-files_5lenny3_amd64.deb
/var/cache/apt/archives/base-passwd_3.5.20_amd64.deb

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

# chroot
/var/tmp/portage/app-emulation/libguestfs-1.0.57/work/libguestfs-1.0.57/appliance/debian/root
(chroot):/# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  base-files     5lenny3        Debian base system miscellaneous files
ii  base-passwd    3.5.20         Debian base system master password and
group
ii  dpkg           1.14.25
(chroot):/# exit            
#
# chroot
/var/tmp/portage/app-emulation/libguestfs-1.0.57/work/libguestfs-1.0.57/appliance/debian/root
dpkg --force-depends --install
/var/cache/apt/archives/base-files_5lenny3_amd64.deb
/var/cache/apt/archives/base-passwd_3.5.20_amd64.deb
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
request:
 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
request:
 base-files depends on awk; however:
  Package awk is not installed.
Setting up base-files (5lenny3) ...
# echo $?
0
#        

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
--- /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.

Alex


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