From nobody@FreeBSD.org  Mon May 12 19:14:45 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 690A27CA
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 May 2014 19:14:45 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 55BCB2593
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 May 2014 19:14:45 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4CJEjt5058373
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 May 2014 19:14:45 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4CJEjF9058372;
	Mon, 12 May 2014 19:14:45 GMT
	(envelope-from nobody)
Message-Id: <201405121914.s4CJEjF9058372@cgiserv.freebsd.org>
Date: Mon, 12 May 2014 19:14:45 GMT
From: Stefan Lasiewski <slasiewski@lbl.gov>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeeBSD Manual for `pkg` should include directions to add a repository configuration file
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         189733
>Category:       docs
>Synopsis:       FreeeBSD Manual for `pkg` should include directions to add a repository configuration file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 12 19:20:01 UTC 2014
>Closed-Date:    Sat May 17 03:47:19 UTC 2014
>Last-Modified:  Sat May 17 03:47:19 UTC 2014
>Originator:     Stefan Lasiewski
>Release:        8.4
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
FreeBSD 8.4-RELEASE amd64
>Description:
The FreeBSD Handbook page for pkgng is incomplete and does not include instructions on how to configure a remote repository for use with pkgng. Without a remote repository, pkgng is not very usable and cannot be used to install binary packages.

How to repeat the problem:

I'm reading the directions in the FreeBSD Handbook here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html

But then I end up with this vague error:

    # pkg update
    Updating repository catalogue
    No valid repository found.
    #

This error isn't mentioned in the manpages, and the FreeBSD forums contain ambiguous, outdated or conflicting solutions. The manpage for pkg.conf tells me about something called a 'Repository configuration file' but doesn't tell me where to put this file.

Suggested fix:

The FreeBSD manual should contain at least a basic set of instructions to get pkgng up an running with a repository, otherwise the instructions are incomplete.

Here is one suggestion which I borrowed from the pkgng release announcement [1]

1. Remove any repository-specific configuration from
   /usr/local/etc/pkg.conf, such as PACKAGESITE, MIRROR_TYPE, PUBKEY.
   If this leaves your pkg.conf empty, just remove it.
2. mkdir -p /usr/local/etc/pkg/repos
3. Create the file /usr/local/etc/pkg/repos/FreeBSD.conf with:
FreeBSD: {
  url: "http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: "yes"
}


[1] http://lists.freebsd.org/pipermail/freebsd-pkg/2013-October/000107.html give these steps:

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed  
State-Changed-By: bcr 
State-Changed-When: Sat May 17 03:44:28 UTC 2014 
State-Changed-Why:  
No change is necessary for the handbook because no version of FreeBSD will 
have pkg without signatures. See 
http://www.freebsd.org/security/advisories/FreeBSD-EN-14:03.pkg.asc for 
details. Running freebsd-update(8) should solve this issue.  
PR closed! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=189733 
>Unformatted:
