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

new cowbuilder tool: make local package cache available



Hi *,

I’ve just written a hookscript for pbuilder which makes the
locally cached files available during a package build. Just
chmod +x it, drop it into the --hookdir, and you’re set¹².

Usage scenario here is mostly debian-ports: when building
packages that depend on each other, you no longer have to
wait until the first package is Installed until you can
build the second package³. It also makes older packages,
e.g. arch:all ones, available so that you can, with some
APT pinning⁴, build packages against others that have
temporarily become uninstallable in unstable, e.g. to
break build dependency cycles.

Do make sure to not put untrusted packages into the
/var/cache/pbuilder/aptcache directory⁵. It does protocol
all made-available packages into the pbuilder log, just
so people inspecting it later can know.

https://www.mirbsd.org/cvs.cgi/contrib/hosted/tg/deb/hookdir/D00local?rev=HEAD

This script will be updated this week or the next, or so,
because Guillem has just committed a change to dpkg that
allows dpkg-scanpackages to skip generating the SHA-1 and
SHA-256 hashes for the packages, so this will take only a
third of the time on our slow m68k machines. (Thanks!)

① You can also share the package cache with your live system:
  • rm -rf /var/cache/apt/archives
  • ln -s /var/cache/pbuilder/aptcache /var/cache/apt/archives
  • echo 'Dir::Cache::Archives "/var/cache/pbuilder/aptcache";' \
    >>/etc/apt/apt.conf
  The first two are not strictly necessary, but help e.g.
  scripts or people who assume the default location. Trust me.
  Oh, and be careful of an “apt-get clean” afterwards…

② I forgot what I wanted to write in this footnote. Maybe later…

③ Or when you upload several packages that depend on previous
  ones, especially when they are NEW.

④ Example paragraph (we do have current glib-networking by now):

  Package: glib-networking-common
  Pin: version 2.36.1-2~m68k.1
  Pin-Priority: 1001

⑤ Do distinguish between /var/cache/pbuilder/aptcache-debian
  and /var/cache/pbuilder/aptcache-ubuntu when you use my cool
  https://www.mirbsd.org/cvs.cgi/contrib/hosted/tg/deb/pbuilderrc?rev=HEAD

Have fun,
//mirabilos
-- 
<Uli> Du hast Recht.
<Uli> Du hast Recht!


Reply to: