Subject: pkg/16460: make in pkgtools/pkg_install fails on old systems
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kivinen@ssh.fi>
List: netbsd-bugs
Date: 04/23/2002 16:28:47
>Number:         16460
>Category:       pkg
>Synopsis:       make in pkgtools/pkg_install fails on old systems
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 23 06:29:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tero Kivinen
>Release:        NetBSD 1.4.1
>Organization:
SSH Communications Security
>Environment:
System: NetBSD taas.iki.fi 1.4.1 NetBSD 1.4.1 (TAAS) #0: Wed Sep 15 13:03:33 EEST 1999 tri@taas.iki.fi:/usr/src/sys/arch/alpha/compile/TAAS alpha

>Description:

	I cvs updated pkgsrc to the NetBSD 1.4.1 system which did not
	have any packages installed beforehand. Then I tried to
	install the pkgtools/pkg_install. pkg_install decided it needs
	pkgtools/digest but registration of installation of
	pkgtools/digest fails because pkg_create does not understand
	the -S option.

	Here is a log:
----------------------------------------------------------------------
taas (16:19) /usr/pkgsrc/pkgtools/pkg_install#make install
=> pkg_install-20020218.tar.gz doesn't seem to exist on this system.
=> Attempting to fetch pkg_install-20020218.tar.gz from ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/.
=> [79023 bytes]
Connected to ftp.netbsd.org.
220 ftp.netbsd.org FTP server (NetBSD-ftpd 20020201) ready.
331 Guest login ok, type your name as password.
230-
                                                                            
     Welcome to FTP.NetBSD.ORG                                              
     Located in Palo Alto, CA, USA                         ,        ,       
                                                          /(        )`      
                                             Home of      \ \___   / |      
       100Mb Connectivity Courtesy of       the FREE      /- _  `-/  '      
        Internet Software Consortium      MULTIPLATFORM  (/\/ \ \   /\      
                                         NetBSD 1.5.2 OS / /   | `    \     
                                                     \   O O   ) /    |     
    +--- Currently Supported Platforms ----+          \  `-^--'`<     '     
    |   DEC ALPHA, (STRONG)ARM32, ATARI,   |           \ (_.)  _  )   /     
    |BEBOX, COMMODORE AMIGA & MACROSYSTEMS |             `.___/`    /       
    |   DRACO, HP 300, INTEL x86, APPLE    |               `-----' /        
    | MACINTOSH(68k & PPC, iMAC, G3, G4),  |  <----.     __ / __   \        
    | MOTOROLA MVME68k, NEWS (68k & MIPS), |  <----|====O)))==) \) /====    
    |   NeXT, PC532, PMAX, POWERPC, SUN    |  <----'    `--' `.__,' \       
    |  SPARC(64), SUN 3/3X, DEC VAX, X68k  |               |        |       
    +--------------------------------------+               \       /        
           MORE ARE UNDER DEVELOPMENT                 ______( (_  / \_____  
                                              (FL)  ,'  ,-----'   |       \ 
    ALL FTP TRANSFERS AND COMMANDS ARE LOGGED.      `--{__________)       \/
230-
    EXPORT NOTICE
    
    Please note that portions of this FTP site contain cryptographic
    software controlled under the Export Administration Regulations (EAR).
    
    None of this software may be downloaded or otherwise exported or
    re-exported into (or to a national or resident of) Cuba, Iraq, Libya,
    Sudan, North Korea, Iran, Syria or any other country to which the
    U.S. has embargoed goods.
    
    By downloading or using said software, you are agreeing to the
    foregoing and you are representing and warranting that you are not
    located in, under the control of, or a national or resident of any
    such country or on any such list.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
250-
    EXPORT NOTICE
    
    Please note that portions of this FTP site contain cryptographic
    software controlled under the Export Administration Regulations (EAR).
    
    None of this software may be downloaded or otherwise exported or
    re-exported into (or to a national or resident of) Cuba, Iraq, Libya,
    Sudan, North Korea, Iran, Syria or any other country to which the
    U.S. has embargoed goods.
    
    By downloading or using said software, you are agreeing to the
    foregoing and you are representing and warranting that you are not
    located in, under the control of, or a national or resident of any
    such country or on any such list.
250-
    Please read the file README
      it was last modified on Tue Jul 24 13:22:16 2001 - 273 days ago
    Please read the file README.export-control
      it was last modified on Tue Jun  6 21:38:56 2000 - 685 days ago
    Please read the file README.sup
      it was last modified on Wed Mar 13 11:34:14 2002 - 41 days ago
250 CWD command successful.
250-
    Please read the file README
      it was last modified on Thu May 28 19:14:54 1998 - 1425 days ago
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
local: pkg_install-20020218.tar.gz remote: pkg_install-20020218.tar.gz
227 Entering Passive Mode (204,152,184,75,245,37)
150 Opening BINARY mode data connection for 'pkg_install-20020218.tar.gz' (79023 bytes).
100% |*************************************| 79023       9.12 KB/s    00:00 ETA
226 Transfer complete.
79023 bytes received in 00:08 (9.12 KB/s)
221-
    Data traffic for this session was 79023 bytes in 1 file.
    Total traffic for this session was 83350 bytes in 1 transfer.
221 Thank you for using the FTP service on ftp.netbsd.org.
===> Cleaning for digest-20010807
===> Extracting for digest-20010807
===> Patching for digest-20010807
===> Configuring for digest-20010807
===> Building for digest-20010807
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c digest.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c rmd160.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c rmd160hl.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c sha1.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c sha1hl.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c sha2.c
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/digest/work -DVERSION="20010807" -DHAVE_MACHINE_ENDIAN_H_ -c sha2hl.c
cc  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -static -o digest digest.o rmd160.o rmd160hl.o sha1.o sha1hl.o sha2.o sha2hl.o 
nroff -mandoc digest.1 > digest.cat1
===> Installing for digest-20010807
missing: ./libexec/cgi-bin (created)
missing: ./share/doc/html (created)
missing: ./share/locale/az (created)
missing: ./share/locale/az/LC_MESSAGES (created)
missing: ./share/locale/bg (created)
missing: ./share/locale/bg/LC_MESSAGES (created)
missing: ./share/locale/bg_BG.cp1251 (created)
missing: ./share/locale/bg_BG.cp1251/LC_MESSAGES (created)
missing: ./share/locale/ca (created)
missing: ./share/locale/ca/LC_MESSAGES (created)
missing: ./share/locale/cs (created)
missing: ./share/locale/cs/LC_MESSAGES (created)
missing: ./share/locale/da (created)
missing: ./share/locale/da/LC_MESSAGES (created)
missing: ./share/locale/de_AT (created)
missing: ./share/locale/de_AT/LC_MESSAGES (created)
missing: ./share/locale/dk (created)
missing: ./share/locale/dk/LC_MESSAGES (created)
missing: ./share/locale/el (created)
missing: ./share/locale/el/LC_MESSAGES (created)
missing: ./share/locale/en (created)
missing: ./share/locale/en/LC_MESSAGES (created)
missing: ./share/locale/en_GB (created)
missing: ./share/locale/en_GB/LC_MESSAGES (created)
missing: ./share/locale/en_US (created)
missing: ./share/locale/en_US/LC_MESSAGES (created)
missing: ./share/locale/eo (created)
missing: ./share/locale/eo/LC_MESSAGES (created)
missing: ./share/locale/es (created)
missing: ./share/locale/es/LC_MESSAGES (created)
missing: ./share/locale/et (created)
missing: ./share/locale/et/LC_MESSAGES (created)
missing: ./share/locale/eu (created)
missing: ./share/locale/eu/LC_MESSAGES (created)
missing: ./share/locale/fi (created)
missing: ./share/locale/fi/LC_MESSAGES (created)
missing: ./share/locale/ga (created)
missing: ./share/locale/ga/LC_MESSAGES (created)
missing: ./share/locale/gl (created)
missing: ./share/locale/gl/LC_MESSAGES (created)
missing: ./share/locale/he (created)
missing: ./share/locale/he/LC_MESSAGES (created)
missing: ./share/locale/hr (created)
missing: ./share/locale/hr/LC_MESSAGES (created)
missing: ./share/locale/hu (created)
missing: ./share/locale/hu/LC_MESSAGES (created)
missing: ./share/locale/id (created)
missing: ./share/locale/id/LC_MESSAGES (created)
missing: ./share/locale/ja (created)
missing: ./share/locale/ja/LC_MESSAGES (created)
missing: ./share/locale/lt (created)
missing: ./share/locale/lt/LC_MESSAGES (created)
missing: ./share/locale/nn (created)
missing: ./share/locale/nn/LC_MESSAGES (created)
missing: ./share/locale/no@nynorsk (created)
missing: ./share/locale/no@nynorsk/LC_MESSAGES (created)
missing: ./share/locale/pt_BR (created)
missing: ./share/locale/pt_BR/LC_MESSAGES (created)
missing: ./share/locale/pt_PT (created)
missing: ./share/locale/pt_PT/LC_MESSAGES (created)
missing: ./share/locale/ro (created)
missing: ./share/locale/ro/LC_MESSAGES (created)
missing: ./share/locale/ru (created)
missing: ./share/locale/ru/LC_MESSAGES (created)
missing: ./share/locale/se (created)
missing: ./share/locale/se/LC_MESSAGES (created)
missing: ./share/locale/sk (created)
missing: ./share/locale/sk/LC_MESSAGES (created)
missing: ./share/locale/sp (created)
missing: ./share/locale/sp/LC_MESSAGES (created)
missing: ./share/locale/sr (created)
missing: ./share/locale/sr/LC_MESSAGES (created)
missing: ./share/locale/ta (created)
missing: ./share/locale/ta/LC_MESSAGES (created)
missing: ./share/locale/tr (created)
missing: ./share/locale/tr/LC_MESSAGES (created)
missing: ./share/locale/uk (created)
missing: ./share/locale/uk/LC_MESSAGES (created)
missing: ./share/locale/wa (created)
missing: ./share/locale/wa/LC_MESSAGES (created)
missing: ./share/locale/zh (created)
missing: ./share/locale/zh/LC_MESSAGES (created)
missing: ./share/locale/zh_CN (created)
missing: ./share/locale/zh_CN/LC_MESSAGES (created)
missing: ./share/locale/zh_CN.GB2312 (created)
missing: ./share/locale/zh_CN.GB2312/LC_MESSAGES (created)
missing: ./share/locale/zh_TW (created)
missing: ./share/locale/zh_TW/LC_MESSAGES (created)
missing: ./share/locale/zh_TW.Big5 (created)
missing: ./share/locale/zh_TW.Big5/LC_MESSAGES (created)
missing: ./share/mk (created)
missing: ./share/nls/uk_UA.ISO_8859-1 (created)
install   -c -s -o root  -g wheel -m 555 digest /usr/pkg/bin/digest
install   -c -o root  -g wheel -m 444 digest.1 /usr/pkg/man/man1/digest.1
install   -c -o root  -g wheel -m 444 digest.cat1 /usr/pkg/man/cat1/digest.0
===> Registering installation for digest-20010807
pkg_create: illegal option -- S
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

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
zsh: 18130 exit 1     make install
[make install]: u:22.14s s:3.79s r:63.34s 40% T:%X D:%D T:%K M:%M
%Wsw %F+%Rpf %Ii %Oo %rr %ss %ksig %wwaits %ccsw
taas (16:20) /usr/pkgsrc/pkgtools/pkg_install#make install
=> Checksum OK for pkg_install-20020218.tar.gz.
===> Extracting for pkg_install-20020218
===> Patching for pkg_install-20020218
===> Applying NetBSD patches for pkg_install-20020218
===> Building for pkg_install-20020218
all ===> lib
cc -O2  -Werror   -I/usr/pkgsrc/pkgtools/pkg_install/work/pkg_install/lib/../lib  -DBINDIR='"/usr/sbin"' -DCHMOD='"/bin/chmod"' -DCHOWN='"/usr/sbin/chown"' -DCHGRP='"/usr/bin/chgrp"' -c exec.c
...
----------------------------------------------------------------------

	At that point the installtion continues and it manages to
	install the pkg_install package. pkg_info does not show
	neither pkg_install nor digest packages. 

>How-To-Repeat:

	Install 1.4.1 base system. cvs co pkgsrc; cd
	pkgtools/pkg_install; make install

>Fix:

	Second make install will work as the digest seems to be
	somehow installed and it does not try to install it again.
	pkg_info does not show that digest is installed.
>Release-Note:
>Audit-Trail:
>Unformatted: