Subject: pkg/12537: installation errors in security/audit-packages
To: None <gnats-bugs@gnats.netbsd.org>
From: None <anne@alcor.concordia.ca>
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
>Closed-Date:
>Last-Modified:
>Originator:     Anne Bennett
>Release:        1.5
>Organization:
Concordia University
>Environment:
NetBSD eridani.concordia.ca 1.5 NetBSD 1.5 (ERIDANI) #1: Tue Mar 20 15:48:34 EST 2001     anne@eridani.concordia.ca:/big/sources/usr/src/sys/arch/i386/compile/ERIDANI i386


>Description:
"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:


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

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

The problem is in the Makefile "COMMENT=" line.  See fix below.
>How-To-Repeat:
Just try to "make install" the package.

>Fix:
Edit Makefile to remove COMMENT line, and make a normal pkg/COMMENT 
file.

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 bsd.pkg.mk 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 ];
then  
  echo "** Missing package files for audit-packages-1.6 - installation not recorded.";  exit 1;
fi

... 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.
>Release-Note:
>Audit-Trail:
>Unformatted: