Subject: pkg/12537: installation errors in security/audit-packages
To: None <>
From: None <>
List: netbsd-bugs
Date: 04/03/2001 10:10:10
>Number:         12537
>Category:       pkg
>Synopsis:       installation errors in security/audit-packages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 03 10:11:00 PDT 2001
>Originator:     Anne Bennett
>Release:        1.5
Concordia University
NetBSD 1.5 NetBSD 1.5 (ERIDANI) #1: Tue Mar 20 15:48:34 EST 2001 i386

"make install" on security/audit-packages version 1.6 (downloaded today)
results in:

----------------- extract begins:
[: to: unexpected operator
===> Registering installation for audit-packages-1.6
pkg_create: only one package name allowed ('show' extraneous)
usage: pkg_create [-ORhlv] [-P dpkgs] [-C cpkgs] [-p prefix] [-f contents]
                  [-i iscript] [-k dscript] [-r rscript] [-t template]
                  [-X excludefile] [-D displayfile] [-m mtreefile]
                  [-b build-version-file] [-B build-info-file]
                  -c comment -d description -f packlist pkg-name
*** Error code 1
--------------------------------- extract ends

Sure enough, the package is not installed correctly; "pkg_info
audit-packages" results in:
--------------------------------- extract begins
Information for audit-packages-1.6:

ERROR: show_file: Can't open '+COMMENT' for reading!

ERROR: show_file: Can't open '+DESC' for reading!
---------------- extract ends

The problem is in the Makefile "COMMENT=" line.  See fix below.
Just try to "make install" the package.

Edit Makefile to remove COMMENT line, and make a normal pkg/COMMENT 

Note: I first tried to enclose the COMMENT text in double quotes,
and that fixed part of the problem, in that the comment was correctly
interpreted as a single argument after the "-c" option flag to 
pkg_create.  However, there were still problems, and setting 
PKG_DEBUG_LEVEL to 2 revealed that was trying this test
(line breaks added for readability):

if [ ! -f /big/sources/pkgsrc/security/audit-packages/work/.PLIST -o 
     ! -f "tools to show vulnerabilities in installed packages" -o 
     ! -f /big/sources/pkgsrc/security/audit-packages/work/.DESCR ];
  echo "** Missing package files for audit-packages-1.6 - installation not recorded.";  exit 1;

... in other words, the COMMENT string was interpreted as a filename,
which of course did not exist.  I don't understand how this whole
Makefile COMMENT setting ever worked.