summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm3
-rw-r--r--usr.sbin/pkg_add/pkg.conf.512
2 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index 90886529a17..cfbbf18e1e5 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocator.pm,v 1.103 2014/03/18 18:53:29 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.104 2016/01/27 20:49:45 sthen Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -44,6 +44,7 @@ sub build_default_path
return unless defined $state->config->value('installpath');
for my $i ($state->config->value("installpath")) {
+ $i =~ s/(^[a-z0-9][a-z0-9.]+\.[a-z0-9.]+$)/http:\/\/$1\/%m/;
$default_path->add(OpenBSD::PackageRepository->new($i, $state));
}
}
diff --git a/usr.sbin/pkg_add/pkg.conf.5 b/usr.sbin/pkg_add/pkg.conf.5
index 2dced2311eb..55a3eb5ba58 100644
--- a/usr.sbin/pkg_add/pkg.conf.5
+++ b/usr.sbin/pkg_add/pkg.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: pkg.conf.5,v 1.8 2015/04/16 19:59:28 jmc Exp $
+.\" $OpenBSD: pkg.conf.5,v 1.9 2016/01/27 20:49:45 sthen Exp $
.\"
.\" Copyright (c) 2010 Marc Espie
.\"
@@ -24,7 +24,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 16 2015 $
+.Dd $Mdocdate: January 27 2016 $
.Dt PKG.CONF 5
.Os
.Sh NAME
@@ -82,10 +82,12 @@ will be expanded to
.Sq full mirror path
and
.Sq OS version
-respectively, e.g.\&
+respectively.
+If a bare hostname is given, the standard /pub/OpenBSD path will be
+used automatically, e.g.\&
.Bd -literal -offset indent
-installpath = http://somesite/pub/OpenBSD/%c/packages/%a/
-installpath += http://othersite/%m/
+installpath = http://somesite.example.org/updates/%c/%a/
+installpath += openbsd-mirror.example.org
.Ed
.Pp
should work.