bldcat

Build your own catalogs

If you have test packages that you have built for CSW or your very own packages that have dependencies to each other you may want to use pkgutil to install them. For that to work you need a catalog for your packages just like the ones CSW publishes.

There's now a simple perl script to parse your packages in a directory and build a catalog for them. The one required argument is the directory to parse for *.pkg.gz files. It creates two files: catalog and descriptions.

Note that to create a CSW catalog you need to follow the guidelines on how to name and version packages, see standard.

$ bldcat
bldcat, build CSW catalogs.

Usage: bldcat [-fh] <package dir>

  -f, --format=x        Set catalog format ([8]|9)
  -h, --help            Show this help

Written and maintained by Peter Bonivart.
$ bldcat .
Inspecting ./xv-3.10a,REV=2008.10.17-SunOS5.8-i386-CSW.pkg.gz
$ ls -l
-rw-r--r--   1 bonivart csw          167 Oct 22 17:19 catalog
-rw-r--r--   1 bonivart csw          167 Oct 22 17:19 descriptions
-rw-r--r--   1 bonivart csw      1877768 Oct 22 17:19 xv-3.10a,REV=2008.10.17-SunOS5.8-i386-CSW.pkg.gz
$ more catalog
xv 3.10a,REV=2008.10.17 CSWxv xv-3.10a,REV=2008.10.17-SunOS5.8-i386-CSW.pkg.gz d887c7aed0e849471467e4944d14c2eb 1877768 CSWcommon|CSWtiff|CSWpng|CSWjpeg|CSWzlib none

The script is a part of the official pkgutilplus package.

Catalogs for SUNW packages

From version 1.9.1 a new script is included to build CSW catalogs from Sun packages. The script is build_sun_catalog.py and is written by Maciej Blizinski1.

Warning. Note that if you want to use SUNW packages you should not mix packages from one update onto a system installed with a different update and make sure you reinstall all patches, see the Sun Patchblog2 for details.

Package filenames and versioning

This is the standard from OpenCSW, if you're creating your own repo you should follow these guidelines

Submitted package files should be named with the following standard:

{SOFTWARENAME}-{REV.NUM}-`uname -s``uname -r`-{ARCH}-CSW.pkg

ncurses-5.3,REV=2002.12.31-SunOS5.8-i386-CSW.pkg

The '-' character is an explicit field separator, so it is illegal to use except in the places shown. Please note: the ",REV=YYYY.MM.DD" is now mandatory. It provides a fixed-format way of telling how recent the package really is, for version comparison download purposes.

{ARCH} is usually the output of `uname -p`. But for certain special packages that run on all solaris hardware, or are otherwise architecture-neutral, it may be preferable to have ARCH=all

Note that the filename should exactly show the full VERSION field, including the REV section.

The naming of the file does matter! It determines how your package will be cataloged for people using pkgutil to download it.

Software names (and thus the first component of the filename) must be all lower case. This is an ease of use issue, so people don't have to think about whether they should use:

pkgutil —install imagemagick
pkgutil —install Imagemagick
pkgutil —install ImageMagick

Plus, it makes the directory listing sort properly.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License