From nobody@FreeBSD.org  Fri Mar  2 00:20:48 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F656106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  2 Mar 2012 00:20:48 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2ED1D8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  2 Mar 2012 00:20:48 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q220KmiT002340
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 2 Mar 2012 00:20:48 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q220Klum002339;
	Fri, 2 Mar 2012 00:20:47 GMT
	(envelope-from nobody)
Message-Id: <201203020020.q220Klum002339@red.freebsd.org>
Date: Fri, 2 Mar 2012 00:20:47 GMT
From: Michael Carlson <mike@bayphoto.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_add - extend PACKAGESITE lookup to include rc.conf.local
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165602
>Category:       bin
>Synopsis:       [request] pkg_add(1) - extend PACKAGESITE lookup to include rc.conf.local
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 02 00:30:12 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Mar 12 07:27:32 UTC 2012
>Originator:     Michael Carlson
>Release:        9.0-RELEASE
>Organization:
Bay Photo Lab
>Environment:
FreeBSD b-bot.bayphoto.local 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Hey FreeBSD Dev's!

We have a local Tinderbox server to build packages from ports, and then we use Puppet to install said packages.

When puppet uses pkg_add, it does not grab the PACKAGESITE environment variable, and defaults to using the hard-coded value of ftp.freebsd.org in pkg_add itself.

It would be preferable if pkg_add was able to look up PACKAGESITE in any one of the system configuration file locations like rc.conf, rc.conf.local, etc...

Or, even something like /etc/pkg.conf.

This seems like it would be a nice enhancement to a core FreeBSD tool, and FreeBSD is always really good at being super flexible.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
