Ok, here is where I am so far, but my ocaml is VERY weak, so it is slow going, I also added the right stuff to <a href="http://config.ml.in">config.ml.in</a> and Makefile.ml to make it work.<div><br></div><div>it seems to work, but when I run febootstrap --names bash coreutils dcron dhcpcd e2fsprogs file filesystem findutils gawk grep grub gzip initscripts iputils kernel26 less libusb logrotate net-tools pacman sed shadow sysvinit tar tcp_wrappers udev util-linux-ng</div>
<div>it only processes bash.</div><div><br></div><div>I am sure I am missing something obvious, but if you have any suggestions that would be great, learning ocaml is taking some time :)</div><div><br></div><div>-Tom Hatch<br>
<br><div class="gmail_quote">On Sun, Dec 5, 2010 at 4:28 PM, Thomas S Hatch <span dir="ltr"><<a href="mailto:thatch45@gmail.com">thatch45@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Sun, Dec 5, 2010 at 10:56 AM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">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><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><div>Arch: check for existence of /etc/arch-release</div><div>Arch: Or check the kernel version for "ARCH" with a uname -r</div><div class="im">

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
> (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><div>Arch: pactree -l <list of package names> | sort -u </div><div>pactree is part of the pacman-contrib package</div><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><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><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>
<div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><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><div>pacman -Qlp  foo.pkg.tar.xz</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><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><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>
<div class="im"><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><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></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>
</blockquote></div><br></div>