pkgsrc/bootstrap
khorben 727ba708e4 Introduce a new SYSCONFBASE variable (defaults to /etc)
This is part 1 to support additional platforms with the RC scripts provided in
pkgsrc, in privileged as well as in unprivileged mode, including on NetBSD
(with part 2 in pkgtools/rc.subr).

This variable is meant to point to the configuration directory of the base
system (as opposed to pkgsrc's own prefix) when it should be used by pkgsrc in
special cases (e.g. installing RC scripts), or to point to the existing
PKG_SYSCONFBASE directory otherwise (e.g. for any unprivileged bootstrap).
This teaches pkgsrc where the RC scripts should be installed, and more
importantly, where the local copy of rc.subr can be expected. Part 3 will
progressively update each and every RC script to substitute this path as
expected.

No functional changes are intended in privileged mode without a bootstrap. The
only variable affected by this change directly is RCD_SCRIPTS_DIR, which
currently remains with the same default of /etc/rc.d, and can be overridden as
before.

When bootstrapping, SYSCONFBASE also remains with the existing default when no
prefix is set or is "/usr/pkg" or "/usr"; it is set to $prefix/etc otherwise. It
can be specified specifically with --sysconfbase if necessary.

Existing installations or bootstraps are not affected, as this change needs
setting SYSCONFBASE in the corresponding $sysconfdir/mk.conf to have an impact.

Tested in privileged and unprivileged modes on NetBSD/amd64, and unprivileged
mode on Darwin/amd64; submitted for review on tech-pkg@.
2021-05-30 23:41:05 +00:00
..
bootstrap Introduce a new SYSCONFBASE variable (defaults to /etc) 2021-05-30 23:41:05 +00:00
cleanup
README add a note about bmake vs make in case it is not obvious to the end user 2021-02-10 21:44:44 +00:00
README.AIX
README.Bitrig Change the default PKG_DBDIR to be ${LOCALBASE}/pkgdb. Resolves issues on 2016-11-15 11:19:09 +00:00
README.Cygwin Add note regarding prerequisites 2016-07-03 15:16:47 +00:00
README.FreeBSD Give a heads up until issues are fixed. 2020-06-30 15:37:00 +00:00
README.GNUkFreeBSD
README.Haiku
README.HPUX mention installation instructions for GCC toolchains 2015-04-19 19:29:44 +00:00
README.Interix Change the default PKG_DBDIR to be ${LOCALBASE}/pkgdb. Resolves issues on 2016-11-15 11:19:09 +00:00
README.IRIX
README.IRIX5.3
README.Linux format 2021-02-12 13:00:48 +00:00
README.macOS bootstrap/README.macOS: Remediate my version confusion 2021-02-10 17:30:20 +00:00
README.MidnightBSD bootstrap: Add MidnightBSD support to bootstrap shell script 2021-03-15 16:22:06 +00:00
README.Minix3
README.MirBSD Change the default PKG_DBDIR to be ${LOCALBASE}/pkgdb. Resolves issues on 2016-11-15 11:19:09 +00:00
README.NetBSD bootstrap: Add a NetBSD README 2020-04-09 15:04:03 +00:00
README.OpenBSD The bootstrap works on OpenBSD 6.9 i386, sparc64 & amd64 (at least 6.9beta) 2021-02-10 21:47:15 +00:00
README.OpenServer5
README.OSF1 mention installation instructions for GCC toolchains 2015-04-19 19:29:44 +00:00
README.Solaris Add notes about common problems & mk.conf snippet for Sun Workshop users from the pkgsrc guide 2016-07-03 15:38:12 +00:00
testbootstrap Remove clauses 3,4 from TNF-only copyright blocks. 2018-08-22 20:48:36 +00:00

$NetBSD: README,v 1.25 2021/02/10 21:44:44 cjep Exp $

To try to get pkgsrc working on your system, please try the following
as root:

# ./bootstrap
    [ --workdir <workdir> ]
    [ --prefix <prefix> ]
    [ --pkgdbdir <pkgdbdir> ]
    [ --sysconfdir <sysconfdir> ]
    [ --varbase <varbase> ]
    [ --ignore-user-check ]
    [ --preserve-path ]
    [ --help ]

The defaults for the arguments are as follows:

	--prefix	/usr/pkg
	--pkgdbdir	/usr/pkg/pkgdb
	--sysconfdir	/usr/pkg/etc
	--varbase	/var
	--workdir	work

The working directory will be created if it doesn't exist and has to be
writable by the user executing ./bootstrap.

The bootstrap script will exit if the bootstrap directory already exists,
for example if you have run the script before. In this case, clean it up
by running:

# ./cleanup

Make sure that you have a working C compiler and make(1) binary in
your path.  Please note that on some systems (IRIX and SunOS, for example),
the bootstrap script will look into a number of common directories for
alternative implementations of some tools.  If they are found, these
directories will be prepended to the PATH variable, unless the
'--preserve-path' flag is given.

See pkgsrc/doc/pkgsrc.txt or
http://www.NetBSD.org/docs/software/packages.html for
more information about bootstrapping and using pkgsrc.

We'd be very interested in hearing of any successes or failures on
"unknown" (to us) systems.

Please remember to add $prefix/bin to your PATH environment variable
and $prefix/man to your MANPATH environment variable, if necessary.
(See above for --prefix and its default value.)

Remember also to use bmake to build packages in pkgsrc. It's very
likely that the native make on your system will be incompatible with
the Makefiles in pkgsrc.

The bootstrap script will create an example mk.conf file located
in your work directory as "mk.conf.example". It contains the
settings you provided to the bootstrap. Copy it to your
$sysconfdir directory (see above about --sysconfdir and its default
value). If the default mk.conf doesn't already exist, the example is
copied into place.


PER PLATFORM INFORMATION
========================

pkgsrc supports or has supported many operating systems (platforms).
In general, there is a README.os for each platform that can run
pkgsrc, explaining particular considerations.

Because pkgsrc contains many per-platform fixes and accommodations,
and because the presence of those at times causes more work for
others, we list platforms according to whether they are in active use.
(If you feel a platform is miscategorized, send rationale to
pkgsrc-users@.  Include a README.platform with instructions if it is
missing and you are asserting that there are users.  Developers should
of course feel free to make improvements.)

Note that listing a platform as having no users is not a decision to
remove it from pkgsrc; this is merely recording information that
individual developers can use when deciding how much work is justified
for keeping any particular accommodation.  (As always, any large-scale
removals require a proposal and discussion on pkgsrc-users@.)

Note also that pkgsrc policy is that fixes to packages, unless the
fixes are to adjust a package to pkgsrc norms, should be filed
upstream and the upstream tracker URL included in the patch file or
Makefile.

Platforms are listed by the filename in mk/platform, annotated by the
README.platform here if different.  Problems are listed, such as lack
of a README, lack of cwrappers support, and lack of destdir support.


Platforms with active use and maintenance
-----------------------------------------

The following platforms have active users, and people that regularly
fix problems.

  Darwin (README.macOS, macOS)
  FreeBSD
  Linux
  NetBSD
  SunOS (README.Solaris, illumos, SmartOS, OmniOS)


Platforms believed to have users
--------------------------------

  OpenBSD


Platforms with at least a tiny number of users
----------------------------------------------

  HPUX
  SCO_SV (README.OpenServer5)


Platforms with unknown status
-----------------------------
  Cygwin
  DragonFly (no README)
  FreeMiNT (no README)
  GNUkFreeBSD
  Minix (no README)
  UnixWare (no README)


Platforms believed to have almost no users
------------------------------------------

  AIX (no cwrappers)
  BSDOS (no README)
  IRIX
  Interix
  MirBSD
  OSF1
  QNX (no README)


Platforms believed to have no users
-----------------------------------

  Bitrig
  Haiku