<br><br><div class="gmail_quote">On Sun, Dec 5, 2010 at 10:56 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
To make this even more explicit:<br>
<div class="im"><br>
> (1) There has to be a way to detect that the package manager should<br>
> be used, eg. by looking for /etc/arch-release<br>
<br>
</div>RPM: check for existence of /etc/redhat-release<br>
Debian: check for existence of /etc/debian_version</blockquote><div><meta http-equiv="content-type" content="text/html; charset=utf-8">Arch: check for existence of /etc/arch-release</div><div>Arch: Or check the kernel version for "ARCH" with a uname -r</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> (2) There must be a way to take a list of package names, and fully<br>
> resolve all dependencies (recursively as necessary) to get a complete<br>
> list of packages that must be installed to bootstrap.<br>
<br>
</div>RPM: [lots of Yum API magic]<br>
Debian: apt-cache depends --recurse -i <list of package names><br></blockquote><div>Arch: pactree -l <list of package names> | sort -u </div><div>pactree is part of the pacman-contrib package</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
> (3) Must be a way to download a package.<br>
<br>
</div>RPM: yumdownloader <name of package><br>
Debian: aptitude download <name of package><br></blockquote><div>Arch: pacman -Sw --cachedir=<Where to download> <name of package(s)></div><div>This will download the package to the cachedir: /var/cache/pacman/pkg</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> (4) Must be able to list out the files in a downloaded package.<br>
<br>
</div>RPM: rpm -qlp foo.rpm<br>
Debian: dpkg-deb -c foo.deb<br></blockquote><div>pacman -Qlp  foo.pkg.tar.xz</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
> (5) Must be able to extract a single file from a downloaded package.<br>
<br>
</div>RPM: rpm2cpio foo.rpm | cpio -id<br>
Debian: dpkg-deb --fsys-tarfile foo.deb | tar xf -<br></blockquote><div>Arch: tar xf foo.pkg.tar.xz</div><div>Arch packages are just tarballs with a PKGINFO file in the root directory which has package metadata</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
So it's almost enough for you to tell me the equivalent of those<br>
commands for pacman, although of course I'd prefer a patch to<br>
febootstrap!<br>
<div class="im"><br>
Rich.<br>
<br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
</div>virt-p2v converts physical machines to virtual machines.  Boot with a<br>
live CD or over the network (PXE) and turn machines into Xen guests.<br>
<a href="http://et.redhat.com/~rjones/virt-p2v" target="_blank">http://et.redhat.com/~rjones/virt-p2v</a><br>
</blockquote></div><br><div>Here are the answers, and all commands work as non-root, before running any commands the package database would need to be updated by running "pacman -Sy"</div><div><br></div><div>I will grab a git checkout of febootstrap and start looking into prepping a patch, but if this is enough info for you to whip up support then let me know and I will test it and fix any arch specific things.</div>
<div><br></div><div>Thanks!</div><div><br></div><div>-Tom Hatch</div>