[Pkgutil-users] bldcat patch to auto-generate catalog name and GPG sign
Status: Beta
Brought to you by:
bonivart
|
From: <ma...@pr...> - 2010-07-26 12:32:19
|
Following on from the changes I submitted for pkgutil, again to support non-standard packages in a local (non-CSW) repository, I have found it necessary to make a modification to the behaviour of bldcat. To support a repository of third party packages, we would like to use pkgutil without making any changes to those packages. During testing, I've assessed pkgutil and bldcat and determined that the requirement to encode the catalogue name as the first word of the NAME parameter inside pkginfo is only a requirement of bldcat. If I manually add catalogue entries with a catalogue name (common name) of my choice, pkgutil works fine. So, rather than change large numbers of third party packages just so that bldcat can create a catalogue file, it seemed the more sensible approach to modify bldcat to auto-generate the catalogue name from the package name on non-CSW packages, if supplied with the -a (or --auto) command-line option. With the attached patch, if you run: # bldcat --auto . ...all packages that do not begin with uppercase CSW will have their catalogue name taken from the package name, by stripping off the leading capital letters. So, for example, VRTSvcs becomes 'vcs'. This, along with the VERSION comparison changes I submitted earlier for pkgutil, means that we are now able to fully support non-CSW packages in our repository, without making any changes to those packages. I have also built in support for automatically GPG signing the catalogue. pkgutil can already check the catalogue to see if it is GPG signed, so it didn't make sense that bldcat couldn't build a signed catalogue: # bldcat --gpg . ...will run 'gpg --clearsign' on the catalogue file once it has been generated. I also fixed a bug whereby bldcat would generate warnings when processing a previously signed catalogue file. I hope you find the patch acceptable and are able to include it in your next release. I have one question. If I run 'bldcat .' I get a catalogue file that pkgutil can use. If I run 'bldcat some/path/to/some/directory' the resulting catalogue file cannot be used by pkgutil because the pathname has been encoded in the catalogue. Is this a deliberate feature, or is this a bug? Thanks & regards, Mark Bannister. |