[arch-general] makepkg and its dependencies, how to create a good build chroot?
For a while now I've been using some scripts to handle the details for creating build chroots, updating them, and triggering builds in them. It's all part of my work with building Haskell packages for Arch. To create a chroot I used this line: mkarchroot -f -C ${pacman_conf} \ -M /usr/share/devtools/makepkg-${arch}.conf ${CHROOT_ROOTDIR} \ util-linux-ng pacman sudo wget file grep base-devel ghc Well, that is, I used that line up until yesterday, and it worked fine until then. Yesterday I ran into the problem that the command `find`, which is used by `makepkg`, was missing in the chroot. A little while later I found the same to be true for `gzip`. So, I added `findutils` and `gzip` to the list of packages to be installed. Now, `makepkg` comes in the `pacman` package, and it doesn't have any dependencies on either of these packages, not even an optional dependency. This leaves me with three questions: 1. Why does `pacman` (the package) not depend on `findutils` and `gzip`, when `makepkg` clearly needs both those packages to function properly? 2. Are there any other packages I ought to install in a build chroot besides those I've listed above? 3. Dependencies of packages change over time, so is there a shortcut to making sure I always create a good build chroot (a group maybe)? /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay
On Thu, Jul 21, 2011 at 09:59:16PM +0200, Magnus Therning wrote:
For a while now I've been using some scripts to handle the details for creating build chroots, updating them, and triggering builds in them. It's all part of my work with building Haskell packages for Arch.
To create a chroot I used this line:
mkarchroot -f -C ${pacman_conf} \ -M /usr/share/devtools/makepkg-${arch}.conf ${CHROOT_ROOTDIR} \ util-linux-ng pacman sudo wget file grep base-devel ghc
Well, that is, I used that line up until yesterday, and it worked fine until then. Yesterday I ran into the problem that the command `find`, which is used by `makepkg`, was missing in the chroot. A little while later I found the same to be true for `gzip`. So, I added `findutils` and `gzip` to the list of packages to be installed.
Now, `makepkg` comes in the `pacman` package, and it doesn't have any dependencies on either of these packages, not even an optional dependency.
This leaves me with three questions:
1. Why does `pacman` (the package) not depend on `findutils` and `gzip`, when `makepkg` clearly needs both those packages to function properly?
Because both findutils and gzip are part of the "base" group and supposed to be installed on every Arch Linux setup.
2. Are there any other packages I ought to install in a build chroot besides those I've listed above?
Yeah, you can take the easy way out by just installing everything from base (and maybe base-devel if you intend to build stuff and need those utilities).
3. Dependencies of packages change over time, so is there a shortcut to making sure I always create a good build chroot (a group maybe)?
See above.
On Thu, Jul 21, 2011 at 10:10:40PM +0200, Lukas Fleischer wrote:
On Thu, Jul 21, 2011 at 09:59:16PM +0200, Magnus Therning wrote: [...]
1. Why does `pacman` (the package) not depend on `findutils` and `gzip`, when `makepkg` clearly needs both those packages to function properly?
Because both findutils and gzip are part of the "base" group and supposed to be installed on every Arch Linux setup.
Just out of curiosity, does that mean that it's unnecessary to depend on any of the packages in 'base' then? And as an extension, is it a really bad idea to remove any of the packages in 'base'?
2. Are there any other packages I ought to install in a build chroot besides those I've listed above?
Yeah, you can take the easy way out by just installing everything from base (and maybe base-devel if you intend to build stuff and need those utilities).
I think I'll take that shortcut :-)
3. Dependencies of packages change over time, so is there a shortcut to making sure I always create a good build chroot (a group maybe)?
See above.
Thanks for the answers. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: magnus@therning.org jabber: magnus@therning.org twitter: magthe http://therning.org/magnus I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. -- Alan Kay
participants (2)
-
Lukas Fleischer
-
Magnus Therning