Tue Nov 15 11:19:09 2016 UTC ()
Change the default PKG_DBDIR to be ${LOCALBASE}/pkgdb.  Resolves issues on
other BSDs which already use /var/db/pkg for the native package manager.


(jperkin)
diff -r1.12 -r1.13 pkgsrc/bootstrap/README
diff -r1.1 -r1.2 pkgsrc/bootstrap/README.Bitrig
diff -r1.6 -r1.7 pkgsrc/bootstrap/README.FreeBSD
diff -r1.17 -r1.18 pkgsrc/bootstrap/README.Interix
diff -r1.2 -r1.3 pkgsrc/bootstrap/README.MirBSD
diff -r1.4 -r1.5 pkgsrc/bootstrap/README.OpenBSD
diff -r1.233 -r1.234 pkgsrc/bootstrap/bootstrap

cvs diff -r1.12 -r1.13 pkgsrc/bootstrap/README (expand / switch to unified diff)

--- pkgsrc/bootstrap/README 2012/01/11 01:15:17 1.12
+++ pkgsrc/bootstrap/README 2016/11/15 11:19:09 1.13
@@ -1,39 +1,37 @@ @@ -1,39 +1,37 @@
1$NetBSD: README,v 1.12 2012/01/11 01:15:17 riz Exp $ 1$NetBSD: README,v 1.13 2016/11/15 11:19:09 jperkin Exp $
2 2
3To try to get pkgsrc working on your system, please try the following 3To try to get pkgsrc working on your system, please try the following
4as root: 4as root:
5 5
6# ./bootstrap 6# ./bootstrap
7 [ --workdir <workdir> ] 7 [ --workdir <workdir> ]
8 [ --prefix <prefix> ] 8 [ --prefix <prefix> ]
9 [ --pkgdbdir <pkgdbdir> ] 9 [ --pkgdbdir <pkgdbdir> ]
10 [ --sysconfdir <sysconfdir> ] 10 [ --sysconfdir <sysconfdir> ]
11 [ --varbase <varbase> ] 11 [ --varbase <varbase> ]
12 [ --ignore-case-check ] 12 [ --ignore-case-check ]
13 [ --ignore-user-check ] 13 [ --ignore-user-check ]
14 [ --preserve-path ] 14 [ --preserve-path ]
15 [ --help ] 15 [ --help ]
16 16
17The defaults for the arguments are as follows: 17The defaults for the arguments are as follows:
18 18
19 --prefix /usr/pkg 19 --prefix /usr/pkg
20 --pkgdbdir /var/db/pkg 20 --pkgdbdir /usr/pkg/pkgdb
21 --sysconfdir /usr/pkg/etc 21 --sysconfdir /usr/pkg/etc
22 --varbase /var 22 --varbase /var
23 --workdir work 23 --workdir work
24 24
25It is perfectly acceptable to place 'pkgdbdir' under 'prefix'. 
26 
27The working directory will be created if it doesn't exist and has to be 25The working directory will be created if it doesn't exist and has to be
28writable by the user executing ./bootstrap. 26writable by the user executing ./bootstrap.
29 27
30Make sure that you have a working C compiler and make(1) binary in 28Make sure that you have a working C compiler and make(1) binary in
31your path. Please note that on some systems (IRIX and SunOS, for example), 29your path. Please note that on some systems (IRIX and SunOS, for example),
32the bootstrap script will look into a number of common directories for 30the bootstrap script will look into a number of common directories for
33alternative implementations of some tools. If they are found, these 31alternative implementations of some tools. If they are found, these
34directories will be prepended to the PATH variable, unless the 32directories will be prepended to the PATH variable, unless the
35'--preserve-path' flag is given. 33'--preserve-path' flag is given.
36 34
37See pkgsrc/doc/pkgsrc.txt or 35See pkgsrc/doc/pkgsrc.txt or
38http://www.NetBSD.org/docs/software/packages.html for 36http://www.NetBSD.org/docs/software/packages.html for
39more information about bootstrapping and using pkgsrc. 37more information about bootstrapping and using pkgsrc.

cvs diff -r1.1 -r1.2 pkgsrc/bootstrap/Attic/README.Bitrig (expand / switch to unified diff)

--- pkgsrc/bootstrap/Attic/README.Bitrig 2015/06/04 15:48:45 1.1
+++ pkgsrc/bootstrap/Attic/README.Bitrig 2016/11/15 11:19:09 1.2
@@ -1,26 +1,21 @@ @@ -1,26 +1,21 @@
1$NetBSD: README.Bitrig,v 1.1 2015/06/04 15:48:45 sevan Exp $ 1$NetBSD: README.Bitrig,v 1.2 2016/11/15 11:19:09 jperkin Exp $
2 2
3Please read the general README file as well. 3Please read the general README file as well.
4 4
5Care should be taken so that the tools that this kit installs do not conflict 5Care should be taken so that the tools that this kit installs do not conflict
6with the Bitrig userland tools. There are several steps: 6with the Bitrig userland tools. There are several steps:
7 7
81. Bitrig stores its ports pkg database in /var/db/pkg. Therefore, you must 81. If you do not intend to use the Bitrig ports tools, it's probably a
9choose a different location (e.g. /var/db/pkgsrc) by using the --pkgdbdir 
10option to the bootstrap script. If you don't do this, installing pkgsrc 
11packages will result in numerous PLIST errors upon install. 
12 
132. If you do not intend to use the Bitrig ports tools, it's probably a 
14good idea to move them out of the way to avoid confusion, e.g.: 9good idea to move them out of the way to avoid confusion, e.g.:
15 cd /usr/sbin 10 cd /usr/sbin
16 mv pkg_add pkg_add.orig 11 mv pkg_add pkg_add.orig
17 mv pkg_create pkg_create.orig 12 mv pkg_create pkg_create.orig
18 mv pkg_delete pkg_delete.orig 13 mv pkg_delete pkg_delete.orig
19 mv pkg_info pkg_info.orig 14 mv pkg_info pkg_info.orig
20 15
213. The bootstrap script will create an example mk.conf file located in 162. The bootstrap script will create an example mk.conf file located in
22pkgsrc/bootstrap/work/mk.conf.example. It contains the settings you provided to  17pkgsrc/bootstrap/work/mk.conf.example. It contains the settings you provided to
23bootstrap. Copy it to your $sysconfdir directory. If $sysconfdir/mk.conf doesn't 18bootstrap. Copy it to your $sysconfdir directory. If $sysconfdir/mk.conf doesn't
24exist, the example is copied into place. 19exist, the example is copied into place.
25 20
26bootstrap-pkgsrc has been tested on Bitrig 1.0 (amd64). 21bootstrap-pkgsrc has been tested on Bitrig 1.0 (amd64).

cvs diff -r1.6 -r1.7 pkgsrc/bootstrap/README.FreeBSD (expand / switch to unified diff)

--- pkgsrc/bootstrap/README.FreeBSD 2013/12/16 10:43:09 1.6
+++ pkgsrc/bootstrap/README.FreeBSD 2016/11/15 11:19:09 1.7
@@ -1,24 +1,19 @@ @@ -1,24 +1,19 @@
1$NetBSD: README.FreeBSD,v 1.6 2013/12/16 10:43:09 asau Exp $ 1$NetBSD: README.FreeBSD,v 1.7 2016/11/15 11:19:09 jperkin Exp $
2 2
3Please read the general README file as well. 3Please read the general README file as well.
4 4
5Care should be taken so that the tools that this kit installs do not conflict 5Care should be taken so that the tools that this kit installs do not conflict
6with the FreeBSD userland tools. There are several steps: 6with the FreeBSD userland tools.
7 7
81. FreeBSD stores its ports pkg database in /var/db/pkg. It is therefore 8If you do not intend to use the FreeBSD ports tools, it may be a
9recommended that you choose a different location (e.g. /usr/pkg/pkgdb) by 
10using the --pkgdbdir option to the bootstrap script. 
11 
122. If you do not intend to use the FreeBSD ports tools, it may be a 
13good idea to move them out of the way to avoid confusion, e.g.: 9good idea to move them out of the way to avoid confusion, e.g.:
14 cd /usr/sbin 10 cd /usr/sbin
15 mv pkg_add pkg_add.orig 11 mv pkg_add pkg_add.orig
16 mv pkg_create pkg_create.orig 12 mv pkg_create pkg_create.orig
17 mv pkg_delete pkg_delete.orig 13 mv pkg_delete pkg_delete.orig
18 mv pkg_info pkg_info.orig 14 mv pkg_info pkg_info.orig
19 15
20Alternatively, take care to get pkgsrc tools first in PATH. 16Alternatively, take care to get pkgsrc tools first in PATH.
21 17
22 
23bootstrap-pkgsrc has been tested on FreeBSD 4.x and 5.x (i386). 18bootstrap-pkgsrc has been tested on FreeBSD 4.x and 5.x (i386).
24pkgsrc works well on FreeBSD 6.2-6.4, 7.1-7.3 (i386), 9.0-9.1 (amd64). 19pkgsrc works well on FreeBSD 6.2-6.4, 7.1-7.3 (i386), 9.0-9.1 (amd64).

cvs diff -r1.17 -r1.18 pkgsrc/bootstrap/README.Interix (expand / switch to unified diff)

--- pkgsrc/bootstrap/README.Interix 2016/07/10 01:25:16 1.17
+++ pkgsrc/bootstrap/README.Interix 2016/11/15 11:19:09 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: README.Interix,v 1.17 2016/07/10 01:25:16 sevan Exp $ 1$NetBSD: README.Interix,v 1.18 2016/11/15 11:19:09 jperkin Exp $
2 2
3Interix is a POSIX-compatible subsystem for the Windows NT kernel, providing a 3Interix is a POSIX-compatible subsystem for the Windows NT kernel, providing a
4Unix-like environment with a tighter kernel integration than available with 4Unix-like environment with a tighter kernel integration than available with
5Cygwin. It is part of the Windows Services for Unix package, available for free 5Cygwin. It is part of the Windows Services for Unix package, available for free
6for any licensed copy of Windows 2000, XP (not including XP Home), or 2003. SFU 6for any licensed copy of Windows 2000, XP (not including XP Home), or 2003. SFU
7can be downloaded from http://www.microsoft.com/windows/sfu/. 7can be downloaded from http://www.microsoft.com/windows/sfu/.
8 8
9Services for Unix 3.5 has been tested. 3.0 or 3.1 may work, but are not 9Services for Unix 3.5 has been tested. 3.0 or 3.1 may work, but are not
10officially supported. (The main difference in 3.0/3.1 is lack of pthreads, but 10officially supported. (The main difference in 3.0/3.1 is lack of pthreads, but
11other parts of libc may also be lacking.) 11other parts of libc may also be lacking.)
12 12
13Services for Unix Applications (aka SUA) is an integrated component of Windows 13Services for Unix Applications (aka SUA) is an integrated component of Windows
14Server 2003 R2 (5.2), Windows Vista and Windows Server 2008 (6.0), Windows 7 and 14Server 2003 R2 (5.2), Windows Vista and Windows Server 2008 (6.0), Windows 7 and
@@ -85,27 +85,27 @@ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Se @@ -85,27 +85,27 @@ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Se
85 85
86Set the DWORD value "EnableSetuidBinaries" to 1; then reboot. 86Set the DWORD value "EnableSetuidBinaries" to 1; then reboot.
87 87
88Important notes for using pkgsrc 88Important notes for using pkgsrc
89-------------------------------- 89--------------------------------
90 90
91The package manager (either the pkgsrc "su" user, or the user running "pkg_add") 91The package manager (either the pkgsrc "su" user, or the user running "pkg_add")
92must be a member of the local Administrators group. Such a user must also be 92must be a member of the local Administrators group. Such a user must also be
93used to run the bootstrap. This is slightly relaxed from the normal pkgsrc 93used to run the bootstrap. This is slightly relaxed from the normal pkgsrc
94requirement of "root". 94requirement of "root".
95 95
96The package manager should use a umask of 002. "make install" will automatically 96The package manager should use a umask of 002. "make install" will automatically
97complain if this is not the case. This ensures that directories written in 97complain if this is not the case. This ensures that directories written in
98/var/db/pkg are Administrators-group writeable. 98/usr/pkg/pkgdb are Administrators-group writeable.
99 99
100The popular Interix binary packages from http://www.interopsystems.com/ use an 100The popular Interix binary packages from http://www.interopsystems.com/ use an
101older version of pkgsrc's pkg_* tools. Ideally, these should NOT be used in 101older version of pkgsrc's pkg_* tools. Ideally, these should NOT be used in
102conjunction with pkgsrc. If you choose to use them at the same time as the 102conjunction with pkgsrc. If you choose to use them at the same time as the
103pkgsrc packages, ensure that you use the proper pkg_* tools for each type of 103pkgsrc packages, ensure that you use the proper pkg_* tools for each type of
104binary package. 104binary package.
105 105
106The TERM setting used for DOS-type console windows (including those invoked by 106The TERM setting used for DOS-type console windows (including those invoked by
107the csh and ksh startup shortcuts) is "interix". Most systems don't have a 107the csh and ksh startup shortcuts) is "interix". Most systems don't have a
108termcap/terminfo entry for it, but the following .termcap entry provides 108termcap/terminfo entry for it, but the following .termcap entry provides
109adequate emulation in most cases: 109adequate emulation in most cases:
110 110
111interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi: 111interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:

cvs diff -r1.2 -r1.3 pkgsrc/bootstrap/README.MirBSD (expand / switch to unified diff)

--- pkgsrc/bootstrap/README.MirBSD 2016/07/03 14:47:05 1.2
+++ pkgsrc/bootstrap/README.MirBSD 2016/11/15 11:19:09 1.3
@@ -1,36 +1,32 @@ @@ -1,36 +1,32 @@
1$NetBSD: README.MirBSD,v 1.2 2016/07/03 14:47:05 sevan Exp $ 1$NetBSD: README.MirBSD,v 1.3 2016/11/15 11:19:09 jperkin Exp $
2 2
3Please read the general README file as well. 3Please read the general README file as well.
4 4
5pkgsrc will install the portable NetBSD make as "bmake". The standard 5pkgsrc will install the portable NetBSD make as "bmake". The standard
6make(1) from MirBSD is incompatible with pkgsrc. 6make(1) from MirBSD is incompatible with pkgsrc.
7 7
8Unless you bootstrap pkgsrc with the --unprivileged option, sudo(8) will 8Unless you bootstrap pkgsrc with the --unprivileged option, sudo(8) will
9be used to gain root privileges. 9be used to gain root privileges.
10 10
11MirPorts and pkgsrc can be installed in parallel. The MirPorts framework 11MirPorts and pkgsrc can be installed in parallel. The MirPorts framework
12uses /usr/mpkg as its default prefix and /usr/mpkg/db/pkg as its package 12uses /usr/mpkg as its default prefix and /usr/mpkg/db/pkg as its package
13database directory. Thus, its paths do not clash with the default 13database directory. Thus, its paths do not clash with the default
14choices of pkgsrc, which are /usr/pkg and /var/db/pkg respectively. We 14choices of pkgsrc, which are /usr/pkg and /usr/pkg/pkgdb respectively.
15suggest however that you place the package database for pkgsrc below its 15
16prefix, for example by specifying the 16Please note that the package tools from MirPorts and pkgsrc have the
17 17same names (e.g. pkg_add) but are incompatible. This leads to strage
18 --pkgdbdir /usr/pkg/db 18behavior when building or installing packages if both frameworks are in
19 19your PATH.
20option to bootstrap. Please note that the package tools from MirPorts 
21and pkgsrc have the same names (e.g. pkg_add) but are incompatible. This 
22leads to strage behavior when building or installing packages if both 
23frameworks are in your PATH. 
24 20
25Thus, before you start the bootstrap, you must make sure that 21Thus, before you start the bootstrap, you must make sure that
26/usr/mpkg/bin and /usr/mpkg/sbin are NOT in your PATH if MirPorts is 22/usr/mpkg/bin and /usr/mpkg/sbin are NOT in your PATH if MirPorts is
27already installed. Use a command like the following: 23already installed. Use a command like the following:
28 24
29 export PATH=${HOME}/.etc/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/pkg/sbin:/usr/games 25 export PATH=${HOME}/.etc/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/pkg/sbin:/usr/games
30 26
31Other environment variables that you may want to set are MANPATH, 27Other environment variables that you may want to set are MANPATH,
32INFOPATH and XAPPLRESDIR. There should be no need to set the 28INFOPATH and XAPPLRESDIR. There should be no need to set the
33LD_LIBRARY_PATH environment variable. 29LD_LIBRARY_PATH environment variable.
34 30
35The default mk.conf will be installed in /usr/pkg/etc. It mirrors the 31The default mk.conf will be installed in /usr/pkg/etc. It mirrors the
36values for CFLAGS, CPPFLAGS, and LDFLAGS retrieved from the native 32values for CFLAGS, CPPFLAGS, and LDFLAGS retrieved from the native

cvs diff -r1.4 -r1.5 pkgsrc/bootstrap/README.OpenBSD (expand / switch to unified diff)

--- pkgsrc/bootstrap/README.OpenBSD 2015/04/05 00:40:07 1.4
+++ pkgsrc/bootstrap/README.OpenBSD 2016/11/15 11:19:09 1.5
@@ -1,27 +1,23 @@ @@ -1,27 +1,23 @@
1$NetBSD: README.OpenBSD,v 1.4 2015/04/05 00:40:07 rodent Exp $ 1$NetBSD: README.OpenBSD,v 1.5 2016/11/15 11:19:09 jperkin Exp $
2 2
3Please read the general README file as well. 3Please read the general README file as well.
4 4
5Care should be taken so that the tools that this kit installs do not conflict 5Care should be taken so that the tools that this kit installs do not conflict
6with the OpenBSD userland tools. There are several steps: 6with the OpenBSD userland tools. There are several steps:
7 7
81. OpenBSD stores its ports pkg database in /var/db/pkg. It is therefore 81. If you do not intend to use the OpenBSD ports tools, it's probably a
9recommended that you choose a different location (e.g. /usr/pkgdb) by 
10using the --pkgdbdir option to the bootstrap script. 
11 
122. If you do not intend to use the OpenBSD ports tools, it's probably a 
13good idea to move them out of the way to avoid confusion, e.g.: 9good idea to move them out of the way to avoid confusion, e.g.:
14 cd /usr/sbin 10 cd /usr/sbin
15 mv pkg_add pkg_add.orig 11 mv pkg_add pkg_add.orig
16 mv pkg_create pkg_create.orig 12 mv pkg_create pkg_create.orig
17 mv pkg_delete pkg_delete.orig 13 mv pkg_delete pkg_delete.orig
18 mv pkg_info pkg_info.orig 14 mv pkg_info pkg_info.orig
19 15
203. The bootstrap script will create an example mk.conf file located in 162. The bootstrap script will create an example mk.conf file located in
21pkgsrc/bootstrap/work/mk.conf.example. It contains the settings you provided to  17pkgsrc/bootstrap/work/mk.conf.example. It contains the settings you provided to
22bootstrap. Copy it to your $sysconfdir directory. If $sysconfdir/mk.conf doesn't 18bootstrap. Copy it to your $sysconfdir directory. If $sysconfdir/mk.conf doesn't
23exist, the example is copied into place. 19exist, the example is copied into place.
24 20
25bootstrap-pkgsrc has been tested on OpenBSD 3.2 and 3.5 (i386). Some testing has 21bootstrap-pkgsrc has been tested on OpenBSD 3.2 and 3.5 (i386). Some testing has
26been done on 3.0 as well and 5.6 (amd64). It has been used successfully on 5.5 22been done on 3.0 as well and 5.6 (amd64). It has been used successfully on 5.5
27and 5.6 (sparc64). 23and 5.6 (sparc64).

cvs diff -r1.233 -r1.234 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2016/11/01 20:44:22 1.233
+++ pkgsrc/bootstrap/bootstrap 2016/11/15 11:19:09 1.234
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.233 2016/11/01 20:44:22 jperkin Exp $ 3# $NetBSD: bootstrap,v 1.234 2016/11/15 11:19:09 jperkin Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -477,27 +477,27 @@ checkarg_sane_absolute_path "$varbase" " @@ -477,27 +477,27 @@ checkarg_sane_absolute_path "$varbase" "
477checkarg_sane_relative_path "$pkginfodir" "--pkginfodir" 477checkarg_sane_relative_path "$pkginfodir" "--pkginfodir"
478checkarg_sane_relative_path "$pkgmandir" "--pkgmandir" 478checkarg_sane_relative_path "$pkgmandir" "--pkgmandir"
479 479
480# set defaults for system locations if not already set by the user 480# set defaults for system locations if not already set by the user
481wrkobjdir=${wrkdir}/pkgsrc 481wrkobjdir=${wrkdir}/pkgsrc
482if [ "$unprivileged" = "yes" ]; then 482if [ "$unprivileged" = "yes" ]; then
483 [ -z "$prefix" ] && prefix=${HOME}/pkg 483 [ -z "$prefix" ] && prefix=${HOME}/pkg
484elif [ -z "$prefix" -o "$prefix" = "/usr/pkg" ]; then 484elif [ -z "$prefix" -o "$prefix" = "/usr/pkg" ]; then
485 prefix=/usr/pkg 485 prefix=/usr/pkg
486 [ -z "$varbase" ] && varbase=/var 486 [ -z "$varbase" ] && varbase=/var
487fi 487fi
488 488
489[ -z "$varbase" ] && varbase=${prefix}/var 489[ -z "$varbase" ] && varbase=${prefix}/var
490[ -z "$pkgdbdir" ] && pkgdbdir=${varbase}/db/pkg 490[ -z "$pkgdbdir" ] && pkgdbdir=${prefix}/pkgdb
491 491
492if [ "$prefix" = "/usr" ]; then 492if [ "$prefix" = "/usr" ]; then
493 [ -z "$pkginfodir" ] && pkginfodir=share/info 493 [ -z "$pkginfodir" ] && pkginfodir=share/info
494 [ -z "$pkgmandir" ] && pkgmandir=share/man 494 [ -z "$pkgmandir" ] && pkgmandir=share/man
495else 495else
496 [ -z "$pkginfodir" ] && pkginfodir=info 496 [ -z "$pkginfodir" ] && pkginfodir=info
497 [ -z "$pkgmandir" ] && pkgmandir=man 497 [ -z "$pkgmandir" ] && pkgmandir=man
498fi 498fi
499infodir=${prefix}/${pkginfodir} 499infodir=${prefix}/${pkginfodir}
500mandir=${prefix}/${pkgmandir} 500mandir=${prefix}/${pkgmandir}
501[ -z "$sysconfdir" ] && sysconfdir=${prefix}/etc 501[ -z "$sysconfdir" ] && sysconfdir=${prefix}/etc
502 502
503if [ "x$preserve_path" != "xyes" ]; then 503if [ "x$preserve_path" != "xyes" ]; then