Mantis - pkg_get
Viewing Issue Advanced Details
3023 other minor always 2009-01-16 23:51 2009-10-04 02:53
skayser  
phil  
normal  
resolved  
fixed  
none    
none  
0003023: pkg-get fails to bootstrap wget
Just downloaded pkg-get from http://opencsw.org/pkg-get [^] to a Solaris 8 box. As i didn't have wget, pkg-get offered me to download one via ftp. This however fails, as $MASTERBASE isn't set correctly.

# This is only for fallback purposes in extreme measures
# The target package must be UNCOMPRESSED in any way!!
MASTERSITE=${MASTERSITE:-ftp.ibiblio.org}
MASTERBASE=${MASTERSITE:-pub/packages/solaris/opencsw/current}

Even when this is corrected, the installation fails. See second invocation in additional information.

The suggestions made by pkg-get on where to get wget ($SITE/wget) after failing to download / install wget don't help either, because no wget can be found there. Unfortunately the wget download links on http://opencsw.org/pkg-get [^] are broken also.
# pkg-get -U
ERROR: no working version of wget found, in PATH
( /usr/sbin:/usr/bin:/opt/csw/bin:/opt/csw/bin:/opt/sfw/bin:/usr/sfw/bin:/usr/lo
cal/bin:/var/pkg-get/sparc )

Attempt to ftp and install a package for it? (y/n)
y

PLEASE IGNORE DEPENDANCY WARNINGS ON INSTALL

Press return or enter email when asked for a password
Name (ftp.ibiblio.org:root): ---> USER anonymous
Password:
---> PASS XXXX
---> CWD ftp.ibiblio.org/sparc/5.8
ftp.ibiblio.org/sparc/5.8: No such file or directory
---> TYPE I
---> PORT 10,5,1,25,128,41
---> TYPE A
---> NLST wget*
---> TYPE I
can't find list of remote files, oops
---> QUIT
nawk: can't open file wget*
 source line number 1
mkdir: Failed to make directory "/tmp/ftp.tmp"; File exists
ERROR: could not verify downloaded file correctly
Please install a working copy of wget,
or set WGET to name another program, in /opt/csw/etc/pkg-get.conf
You should be able to find a working binary for wget at
ftp.uni-erlangen.de/wget.
download it, rename to 'wget', chmod 0755 wget,
and put it somewhere in your PATH

bash-2.03# pkg-get -U
ERROR: no working version of wget found, in PATH
( /usr/sbin:/usr/bin:/opt/csw/bin:/opt/csw/bin:/opt/sfw/bin:/usr/sfw/bin:/usr/lo
cal/bin:/var/pkg-get/sparc )

Attempt to ftp and install a package for it? (y/n)
y


Press return or enter email when asked for a password
Name (ftp.ibiblio.org:root): ---> USER anonymous
Password:
---> PASS XXXX
---> CWD pub/packages/solaris/opencsw/current/sparc/5.8
---> TYPE I
---> PORT 10,5,1,25,128,46
---> TYPE A
---> NLST wget*
---> TYPE I
---> PORT 10,5,1,25,128,47
---> RETR wget-1.11,REV=2008.02.08-SunOS5.8-sparc-CSW.pkg.gz
---> QUIT
Analysing special files...
Hmmm. Retrying with different archive offset...1712 blocks

nawk: can't open file /var/pkg-get/catalog-ibiblio.org
 source line number 1
ERROR: no info for CSWcommon. Cannot install dependancy.
ERROR: could not install required dependancies for CSWwget
Once dependancies are up to date, call
        /opt/csw/bin/pkg-get -i wget
to (re)install
Please install a working copy of wget,
or set WGET to name another program, in /opt/csw/etc/pkg-get.conf
You should be able to find a working binary for wget at
ibiblio.org/wget.
download it, rename to 'wget', chmod 0755 wget,
and put it somewhere in your PATH
Issue History
2009-01-16 23:51 skayser New Issue
2009-01-16 23:52 skayser Note Added: 0005487
2009-02-27 02:31 phil Status new => assigned
2009-02-27 02:31 phil Assigned To => phil
2009-02-27 02:33 phil Note Added: 0005577
2009-02-27 11:10 skayser Note Added: 0005581
2009-02-28 16:47 phil Note Added: 0005587
2009-02-28 17:55 skayser Note Added: 0005591
2009-09-29 01:32 philadmin Note Added: 0006766
2009-09-29 11:32 skayser Note Added: 0006767
2009-09-29 11:33 skayser Note Edited: 0006767
2009-10-04 02:31 phil Note Added: 0006788
2009-10-04 02:53 phil Note Added: 0006789
2009-10-04 02:53 phil Status assigned => resolved
2009-10-04 02:53 phil Resolution open => fixed

Notes
(0005487)
skayser   
2009-01-16 23:52   
# pkginfo -x CSWpkgget
CSWpkgget pkg_get - CSW version of automated package download tool
                (all) 4.0.1,REV=2008.12.15
(0005577)
phil   
2009-02-27 02:33   
Urrrr. drat.

Please try replacing


MASTERBASE=${MASTERSITE:-pub/packages/solaris/opencsw/current}


with
MASTERBASE=${MASTERBASE:-pub/packages/solaris/opencsw/current}

and seeing if it works for you.

I'm thinking it will NOT; that it also needs a patch around line 1289, to change

anonymous
cd $MASTERBASE/$CPU/$OSREV

to be


anonymous
pkg-get-user
cd $MASTERBASE/$CPU/$OSREV



but please let me know what works.
(0005581)
skayser   
2009-02-27 11:10   
See the second (!) invocation of pkg-get -U in that "additional information" field. That is where i had corrected MASTERBASE as you suggest now. ;) The FTP login went smoothly so the second issue you are refering to was not a problem in my case.

Instead please look at the dependency error messages, pkgadd seems to bail out because it can't find the CSWcommon dependency for CSWwget (which is obvious as it is just trying to get the whole catalog download thingie started by installing CSWwget ...).

What about just distributing a wget binary with CSWpkgget like CSWpkgutil does it? Seems less error prone to me.
(0005587)
phil   
2009-02-28 16:47   
I guess you didnt read, or follow, the message that pkg-get prints out:

"PLEASE IGNORE DEPENDANCY WARNINGS ON INSTALL"

:P

or rather, i guess it is not explict enough, because what you are expected to do, is type "y", when it prompts you whether you want to install it even though dependancies are missing.
ok, i'll tweak it to also use the "admin-fullauto" file to install it.
more later
(0005591)
skayser   
2009-02-28 17:55   
"what you are expected to do, is type "y", when it prompts you whether you want to install it even though dependancies are missing."

"pkg-get -U" doesn't give you the option to do that. It downloads the missing wget and bails out when it can't resolve the dependencies. I just verified this in a fresh Solaris 10 zone. If you want to try this for yourself, install pkg-get, drop /usr/sfw/bin from the PATH in line 2440 and call "pkg-get -U".
(0006766)
philadmin   
2009-09-29 01:32   
Looking at my code, it would appear that I have already fixed this issue.
Please check the current pkg-get ( pkg-get -v|grep SCCS should report 4.11)

and tell me if it performs as expected for you.
(0006767)
skayser   
2009-09-29 11:32   
(edited on: 2009-09-29 11:33)
System without /usr/sfw/bin/wget still shows problems.

# pkg-get -U
ERROR: no working version of wget found, in PATH
...
---> RETR wget-1.11.4,REV=2009.04.15-SunOS5.8-i386-CSW.pkg.gz
---> PORT 192,168,120,102,128,237
---> RETR wgetpaste-2.13,REV=2009.08.29-SunOS5.8-all-CSW.pkg.gz
---> QUIT
...
Installing wget - A network utility to retrieve files from the Web as <CSWwget>
...
Installation of <CSWwget> was successful.

ERROR: wget package is not right. Cannot continue
#

A subsequent "pkg-get -U" invocation finds /opt/csw/bin/wget.

# pkg-get -v | grep SCCS
DEBUG-ONLY/VERBOSE MODE: level=1
 (Internal SCCS code revision @(#) pkg-get 4.11@(#))

# pkgparam CSWwget VERSION
1.11.4,REV=2009.04.15

(0006788)
phil   
2009-10-04 02:31   
It would appear that pkg-get was reporting accurately.

"wget package is not right".

It was CHANGED :-(

will release an updated pkg-get to handle both old and new wget packages. grrr.
(0006789)
phil   
2009-10-04 02:53   
fix coded, and tested. pending new pkg-get package release