Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Dec 2003 09:19:23 -0500
From:      "fbsd_user" <fbsd_user@a1poweruser.com>
To:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: get pkg_add to use real package names
Message-ID:  <MIEPLLIBMLEEABPDBIEGMEIEFBAA.fbsd_user@a1poweruser.com>
In-Reply-To: <MIEPLLIBMLEEABPDBIEGIEGNFBAA.fbsd_user@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
For the archives.
My perseverance paid off. After sleeping on the problem, today I
decided to test my modified pkg_add path on all the FTP sites. The
pkg_add defaults to using ftp.freebsd.org, I had always been testing
using one of the other 14 ftp sites. When I changed the setenv to
use the default ftp server with my customized directory path it all
worked. See what a nights sleep will do to clear one's mind.

Pkg_add does not login to the ftp site it's pointed at to use. ftp1
through ftp14 all require anonymous login, that's why the script
worked no matter which ftp site I used and the pkg_add failed all
the time.   The pkg_add default ftp.freebsd.org site does not
require anonymous login to gain access.



-----Original Message-----
From: owner-freebsd-questions@freebsd.org
[mailto:owner-freebsd-questions@freebsd.org]On Behalf Of fbsd_user
Sent: Sunday, December 21, 2003 7:03 PM
To: freebsd-questions@FreeBSD. ORG
Subject: get pkg_add to use real package names

I have been trying to get the pkg_add -r  command to
work using the real full package names.
IE: qpopper-4.0.5_1.tgz

pkg_add -r  defaults to going to
pub/FreeBSD/ports/i386/packages-4.8-release/Latest/
and the name there is qpopper.

Problem is I can not find any way to find this name
spelled like that. FBSD handbook says to use
http://www.freebsd.org/ports/index.html or
http://www.freebsd.org/ports/master-index.html to
locate the package name, those web pages gives the
name as qpopper-4.0.5_1

So I am trying to change pkg_add environment variable
to point to different directory location as shown below.
Every thing looks fine, except pkg_add says it can not find it.

Please review what I have posted below to see if I am missing
something simple.

Thanks
Joe

Using the following script, I can verify access
to the FBSD ftp sites and download package using
official name qpopper-4.0.5_1.tgz


This is my working script

#! /bin/sh
cd /usr/packages/
path=pub/FreeBSD/ports/i386/packages-4.8-release/mail
ftp -av ftp://ftp2.freebsd.org/$path/qpopper-4.0.5_1.tgz

Here is the output display messages from this script

Connected to ftp2.us.freebsd.org.
220 ftp2.us.freebsd.org FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
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 CWD command successful.
local: qpopper-4.0.5.tgz remote: qpopper-4.0.5.tgz
150 Opening BINARY mode data connection for 'qpopper-4.0.5.tgz'
(78312 bytes).

  0% |                                                  |
      --:-- ETA
100% |**************************************************| 78312
00:00 ETA
226 Transfer complete.
78312 bytes received in 0.14 seconds (563.44 KB/s)
221 Goodbye.

So I have proof it lives where I think it does and can find it and
download it.


# /root >setenv PACKAGESITE
"ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-4.8-release"

Setenv is the same path as in my script.
PACKAGESITE is the environment variable for pkg__add  command.

# /root >pkg__add  /mail/qpopper-4.0.5_1
test without .tgz  and it get's appended by pkg_add

looking up ftp2.freebsd.org
connecting to ftp2.freebsd.org:21
setting passive mode
opening data connection
initiating transfer
Error: FTP Unable to get
ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-4.8-release/m
ail/qpopper-4.0.5_1.tgz: File unavailable (e.g., file not found, no
access)
pkg_add: unable to fetch
'ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-4.8-release/
mail/qpopper-4.0.5_1.tgz' by URL
pkg_add: 1 package addition(s) failed
# /root >

this time test with .tgz
# /root >pkg_add -rv /mail/qpopper-4.0.5_1.tgz


looking up ftp2.freebsd.org
connecting to ftp2.freebsd.org:21
setting passive mode
opening data connection
initiating transfer
Error: FTP Unable to get
ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-4.8-release/m
ail/qpopper-4.0.5_1.tgz: File unavailable (e.g., file not found, no
access)
pkg_add: unable to fetch
'ftp://ftp2.freebsd.org/pub/FreeBSD/ports/i386/packages-4.8-release/
mail/qpopper-4.0.5_1.tgz' by URL
pkg_add: 1 package addition(s) failed
# /root >

We know the error 'file not found' is incorrect
because we just FTP to it direct, so it must be
the ' no access' error, which makes no scenes.

I know that 5.2 is being readied for release.
Is pkg_add written in some way that the ftp server
can ignore it's request for service
and native ftp still gets serviced?

Any in-sight into how FBSD ftp servers work or
help on the setting the PACKAGESITE environment variable
would be greatly appreciated.

Thanks
Joe






_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MIEPLLIBMLEEABPDBIEGMEIEFBAA.fbsd_user>