pkg_install patches for review / testing

From: Oliver Eikemeier <eikemeier_at_fillmore-labs.com>
Date: Sat, 01 May 2004 14:00:31 +0200
This patch add the following features to the pkg_install suite of tools:

* new flags:

  -X: use extended regular expression instead of basic ones (pkg_info, 
      pkg_delete, pkg_version) (PR 56961)

  -S: specify a base directory where files to package could be found 
      (pkg_create) useful for clean room packaging: (PR 66032)

  -E: show only matching package names and set the return code (pkg_info)
      (PR 56961)

  -r: show packages this packages depends on (documentation change) (pkg_info) 
      (PR 56989)

  -j: show the requirements script (new functionality) (pkg_info) (PR 56989)

  -T: test if string matches a glob pattern, setting the exit code accordingly 
      (pkg_version) (PR 56961)

* use absolute paths in all calls of external programs, to account for strange 
  PATHs and be able to do
    env PATH= /usr/local/sbin/pkg_version -v

* fix verbose output of pkg_info when used on packages (PR 56989)

* pkg_add spawns itself as argv[0]  when installing dependent packages, to 
  enable the use as a port.

* use INDEX or INDEX-5 depending on FreeBSD version, to enable the use on 
  FreeBSD 4.x as a port. (PR 56961)

* better handling of corrupt entries in /var/db/pkg, differ between corrupt 
  entires and  packages not installed (PR 57016, 57029)

* record checksums for special files (/var/db/pkg entries) in packages
  (checked with pkg_info -g, backwards compatible)

* parse version numbers of ports containing and underscore followed by a 
  number correctly (PR 56961)

* enable the use of csh-style {...} choices in glob patterns, e.g.
  /usr/local/sbin/pkg_info 'openldap-{client,server}-*'

* use glob patterns when matching packages by origin, for example
  /usr/local/sbin/pkg_info -O 'net/*'

* enable the use of relational comparisons everywhere a package is matched by 
  a pattern, i.e. pkg_info 'apache>=2.0' instead of 'apache-2.*' (PR 56961)

* completely rewritten version number handling, which should be more 
  compatible to what 4.x tools and portupgrade does and generally give the 
  expected results.

A new version number definition has been formulated which matches the current 
usage in the ports tree. Basically, version numbers are composed out of 
number-letter-number triples, with optional parts. `*' is a special component 
that is guaranteed to sort before every other component, so that `>=2.*<3.*' 
matches every 2.x version. Version numbers that use `+' to separate two 
adjacent version numbers sort correctly.

The relational comparisons can be used to check if certain versions of a port 
are installed, which is useful for conflict checking, i.e.
  CONFLICTS=    {,ru-}apache{,+mod_ssl}{,+ipv6}<2.*
or to record dependencies on certain versions of a port. Currently it is used 
to check installed ports for vulnerable versions in portaudit.

The patch against -CURRENT is available at

  http://people.freebsd.org/~eik/pkg_install-20040501.diff

MD5 = 7519c2c883c59a16f96d391660d9227c
SIZE = 57701

or as port sysutils/pkg_install-devel. If this port is installed with 
PREFIX=/usr the base tools are replaced and restored when deinstalling the 
port, so this is probably the most easy way to test the new version.

CVS history is available at
  <http://cvs.sf.net/viewcvs.py/portaudit/pkg_install/>

The next thing I want to do is an integration of vulnerability checking in 
pkg_add, probably with a plug-in mechanism for formats other than plain text.

-Oliver
Received on Sat May 01 2004 - 03:00:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC