[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg_comp HOWTO (Was: pkgsrc)
On Sun 08 Feb 2009 at 16:42:05 +0000, David Brownlee wrote:
> Alternatively, does anyone have a reference to a good howto on
> using pkg_comp, or better still some suggested text to add to the
> pkgsrc guide?
I have a checklist of things to do every 3 months when a stable pkgsrc
branch is made. It is for my situation, where I build binary packages
and try to keep separate directories of binary packages corresponding to
It is missing the steps to set up, since I have that already ;-)
PROCEDURE TO UPDATE PKGSRC
- Update pkgsrc using the update script, edited for the new stable branch.
- Fix all C-onflicts. Sometimes cvs reports conflicts in files when there
are none (sometimes this seems to be related to conflicts that did
exist in the past).
- Create a new All-2007Q7 - like directory in /scratch/packages.amd64-4.0/
for the old branch
- Hardlink everything from All/ into that as a backup
- In /usr/pkgsrc, use "pkg_chk -g" to generate a config file with currently
installed packages - or -
in further pkg_chk commands, add the option "-C
- In pkg_comp: ("pkg_comp chroot")
- pkg_chk -rvk to remove "mismatched" (outdated) packages
- For a comprehensive rebuild of packages with changed dependencies,
move their binaries to the Attic directory with
cd /p/packages &&
/usr/pkgsrc/check_installed_binary_packages All Attic
This prevents them being reinstalled from binaries, if their version
number has not changed.
- pkg_chk -vak and have a looooot of patience
If this fails due to pkg_chk being removed:
cd /usr/pkgsrc/pkgtools/pkg_chk && make package
Fix any errors that may occur and retry until done.
- Outside pkg_comp: now comes the critical part.
Have a backup first.
- Carefully upgrade important services such as sendmail + spamassassin +
spamass-milter + milter-greylist, bind9 (named9), siproxd, sudo, pkg_chk.
If an easy upgrade isn't possible due to dependencies (Perl), just stop
Keep a root shell running just in case sudo stops working.
- export PACKAGES=/scratch/packages.amd64-4.0/All
- (nonroot) pkg_chk -lb double-check all binary packages are present
- pkg_chk -rv remove outdated packages
pkg_chk -akbv add, keep going, use binaries only.
- pkg_chk -ukbv update, use binaries only, keep going.
This should be able to use only binaries as generated before.
- Restart any services stopped before.
check_installed_binary_packages is this:
# Usage: $0 fromdir todir
# Moves all binary packages in fromdir that are not installed anymore
# to todir.
if [ ! -w $todir ]
echo "Can't write in $todir"
for f in $(ls $fromdir)
if pkg_info -e "$pkg"
echo $pkg is still installed
echo $pkg moved to Attic...
mv "$fromdir/$f" "$todir"
___ Olaf 'Rhialto' Seibert -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl -- Cetero censeo "authored" delendum esse.
Main Index |
Thread Index |