Re: pbuilder
On Mon, 24 Sep 2001, Dale Amon wrote:
> On Mon, Sep 24, 2001 at 03:29:00PM +0200, Jens Ruehmkorf wrote:
> > But if you want to get rid of your doc/* and man/* files, you could use
> > apt.conf(5) and "Post-Invoke" to automatically delete those after having
> > installed/updated software. That's a fast and easy way to do it inside a
> > chroot-env.
> >
>
> But how do I modify the apt.conf in such a way that
> it gets used by both debootstrap and pbuilder and yet
> doesn't affect normal installs on my workstation?
Probably I didn't make myself clear ;) What I mean is: Edit
workstation:/path_to_chroot/etc/apt/apt.conf
but leave your
workstation:/etc/apt/apt.conf
untouched. When you invoke apt inside a chroot, it only sees everything
under /path_to_chroot, right?
> Perhaps a better approach is a pbuilder API for this sort of thing.
> Perhaps a hook or hooks for user scripts to intervene at key points
> before the base.tgz gets tarballed?
True.
Until Junichi gets to add such a feature (iff he finds it to be useful), I
simply would write a wrapper-script for pbuilder, like:
-- /usr/local/sbin/pbuilder-wrapper --
#!/bin/bash
# use "$@" instead of $* !
/usr/sbin/pbuilder "$@"
cd /usr/local/lib/pbuilder/hooks/
for hook in * ; do
local filetype=`file --dereference $hook`
case $filetype in
*Bourne*shell*script*)
. ./$hook
;;
*"perl script"*)
./$hook
;;
*)
echo "E: unknown file type for file $filetype"
;;
esac
done
-- end ---
That's merely how such a script could look like, I have not tested it.
Maybe you would like to use a suffix from 00 to 99 (like in rc?.d) to
guarantee order of invocation.
Here is a example how you could use an apt.conf inside your chroot:
-- /to_be_copied_to/chroot/etc/apt/apt.conf --
// just a harmless example for use in chroot
DPkg {
Pre-Invoke {
"printf 'Hello dpkg.'\\n";
};
Post-Invoke {
"printf 'Goodbye dpkg.'\\n";
};
};
-- end --
Hope that helps.
Kind regards,
Jens
--
ruehmkorf at informatik dot uni hyphen koeln dot de
Reply to: