Commit graph

116 commits

Author SHA1 Message Date
rillig
d2ef0e68c4 Renamed the ignoreusercheck variable to unprivileged, since it does more
than just checking whether the bootstrap is run by root. No other
visible changes.
2007-11-01 23:18:54 +00:00
rillig
30bae8ae69 Added some very basic sanity checks for the arguments to bootstrap. This
code should have been here since the very beginning of bootstrap.
Additionally, the paths are checked that they only contain characters
from the "Portable Filename Character Set" (IEEE 2003.1, definition 3.276).

Motivated by http://mail-index.netbsd.org/pkgsrc-users/2007/10/17/0000.html
2007-10-17 02:45:42 +00:00
rillig
b1ef808a1a Fixed a typo in the bootstrap program. Now it is possible to specify an
alternative fetch_cmd.

Patch provided by Pierre Bourgin in PR 37081.
2007-10-09 01:10:19 +00:00
rillig
711951595a Mention --unprivileged, since pkgsrc runs (almost) great as unprivileged
user.
2007-09-29 15:50:16 +00:00
rillig
470ab0a92f Removed the warning about pkg_add or pkg_delete "not running as root"
completely. It only made the code more bloated, and a user trying to add
or delete packages would get lots of "Permission denied" warnings
anyway.
2007-09-08 09:58:14 +00:00
rillig
716ddb1f45 In unprivileged builds, the user running pkg_add and pkg_delete is
almost always an unprivileged user. So there's no point in printing a
warning in that case.
2007-09-07 15:45:14 +00:00
joerg
b3671133c5 Add QNX configuration. From Sean Boudreau. 2007-09-06 20:13:44 +00:00
joerg
181bacec05 Try to force a proper shell on Solaris by extending bmake to
expect full path names. Use the default locations in /bin unless
overriden explicitly. Bump revision of bmake.

On Solaris, use /usr/xpg4/bin/sh if it exists.
2007-09-06 19:23:25 +00:00
schwarz
7b0b779d9f do not add preset CFLAGS, CPPFLAGS or LDFLAGS to BOOTSTRAP_MKCONF since on
bootstrap time these variables are already set as shell variables. As a
result, they were doubled for bootstrap compiling.
An alternative solution to that issue would be to explicitly empty those
shell variables once they have been added to BOOTSTRAP_MKCONF, but that
approach would use more lines of shell code :-)
2007-08-18 11:01:28 +00:00
rillig
97cad8f63b Replaced the hard-coded /bin/bash with an environment variable. 2007-08-14 00:26:58 +00:00
rillig
66cc628334 s/POSIX/BSD/ for echo(1). 2007-08-13 22:48:59 +00:00
tnn
7b838717d9 Interix: Install xargs script in $wrkdir, not $prefix, for bootstrapping. 2007-08-05 16:12:15 +00:00
joerg
86c5c8668d In preparation for the libarchivification of pkg_create, pass down
--enable-bootstrap to pkg_install's configure for the first build phase.
2007-08-03 11:54:31 +00:00
joerg
929fd21498 Only write FETCH_CMD to mk.conf, if it is set already. 2007-07-31 14:31:27 +00:00
joerg
d9dc032976 Add --mk-fragment option to bootstrap. This allows including a fragment
after the automatic options and makes it simpler to rebuild the bootstrap
automatically from pbulk.
2007-07-29 17:09:47 +00:00
joerg
07eedea6c2 Split bootstrap into two phases:
- phase one builds the essential tools in the bare minimal version
  needed by the infrastructure to run "make install".
- phase two runs "make install" for all the bootstrap packages.

Set WRKOBJDIR for the second phase, we never want to leave garbage
around.

This increases the time for running bootstrap, but gives more
deterministic results. It also means that e.g. configuration files
in pkg_install can be handled normally. It is a prerequirement to
sanely allow pkg_install some more extended work like building
its own libarchive without having to worry too much about limitations
on some platforms.

This fixes the expansion of @gzcat@ in the download-vulnerability-list
script.

Tested by tnn@ on Interix and myself on DragonFly.
2007-07-27 10:43:24 +00:00
joerg
370e455e33 mtree is no longer needed or used by the pkgsrc infrastructure. 2007-07-02 14:59:19 +00:00
tnn
0234d40e0a xargs(1) on Interix is broken. It executes the utility on the command line
even if standard input is the empty string. Install a wrapper script
bundled with pkgtools/bootstrap-extras to deal with this. This is an
attempt at a permanent workaround for the problem described in PR pkg/25777
which has regressed since it was initially fixed.

We can now bootstrap again on Interix 3.5.
2007-07-01 23:27:43 +00:00
schmonz
7235907039 We no longer need to check $pkgsrcdir for case-sensitivity.
XXX Is it time we stopped checking $prefix, too? IMO, yes.
2007-05-30 01:42:59 +00:00
schmonz
bef8568825 tnftp means to link with its own libedit, but on OS X the linker's
search order means that the system libedit gets found first. This
hasn't been much of a problem until now, but the system libedit
lacks support for Apple's 64-bit architectures, which breaks the
Universal build. Therefore, force linking with tnftp's internal
libedit by replacing "-ledit" in ${LIBS} with "../libedit/libedit.a".
Workaround suggested by tls.
2007-05-23 04:20:36 +00:00
tnn
cb6e83f784 hpux: machine_arch is hppa, not 9000. 2007-04-25 13:24:24 +00:00
tnn
146da1286c Teach pkgsrc about HP-UX. 2007-04-14 14:17:49 +00:00
joerg
2dfcdbab0c Change bootstrap to register bmake as package. Change bmake to
use inplace libnbcompat like the direct build from bootstrap
does. Fix a long-standing bug in mkbinarykit. The default work
directory was "work" (relative) and therefore MAKECONF=work/...
was passed down, effectively making it a nop. That resulted in
digest being incorrectly installed during the bootstrap.

Tested on DragonFly by myself and on OSF by tnn@, discussed with jlam@
2007-04-12 20:31:04 +00:00
joerg
2a722b785e When calling bootstrap-register from the bootstrap script for the
various packages, pass down PKG_PRESERVE. Remove the default setting of
PKG_PRESERVE, it makes perfect sense to install e.g. pkgtools/mtree
and be able to remove it again, if it is not an essientiel tool.

OK jlam@
2007-04-12 14:36:40 +00:00
wiz
f93aa15197 Remove references to pkgmanpages package and packages(7). Noted by reed@. 2007-03-02 16:48:48 +00:00
rillig
860cfa817b In the bootstrap script, MAKECONF must be overridden, so that the
settings from there don't influence the bootstrap process.

Fixes PR 33188.
2007-02-22 23:29:02 +00:00
rillig
262f062106 Added a fix for the case when /bin/sh is a (symlink to) dash. 2007-01-26 15:48:42 +00:00
rillig
416baedaae The example mk.conf is installed automatically if there isn't already a
mk.conf. This makes using pkgsrc a bit easier.
2007-01-26 07:57:04 +00:00
tv
f91b394772 Add lang/nawk and sysutils/install-sh to the "don't blow away" package
list for bulk builds.  (Revert previous on bootstrap; the PKG_PRESERVE
hack didn't work as expected.)
2006-11-06 21:08:42 +00:00
tv
e03538189e Set PKG_PRESERVE on install-sh, nbsed, nawk if installed for the current
platform as a bootstrap tool.  These cannot be nuked as part of the bulk
build clean cycles, or else parts of the .mk infrastructure won't work.
2006-11-06 21:01:42 +00:00
rillig
d7aa920f48 Added --unprivileged as an alias for --ignore-user-check, aligning with
the wording in many other places. Also added --quiet to the usage text,
which I had forgotten before.
2006-10-13 19:09:53 +00:00
rillig
56b5590c2f Added the --quiet option.
Made the code simpler by defining a register_package function.
2006-10-02 16:26:54 +00:00
rillig
d84e87b5c4 Fixed a bug that prevented the definition of ${ID} to be written into
the example mk.conf.

The explanation for setting DBG to the empty value is written to the
mk.conf file to inform the uninitiated pkgsrc user about its purpose.
2006-09-18 12:35:44 +00:00
schwarz
aa38134c13 ${X11BASE} can now be set to /usr, so just do so for IRIX and OSF1. No need
for any artificial symlinking any more in bootstrap.
2006-09-10 20:14:43 +00:00
schwarz
b396fa74ce make sure that no default optimizer flags are set via DBG if CFLAGS is
specified
2006-09-02 11:14:48 +00:00
schwarz
0b9cc38f3e * bootstrap no longer needs regex.h
* support environment variables CP, GREP, ID, MKDIR, TEST, TOUCH, XARGS to
  allow specification on non-standard tools (needed on IRIX 5)
* preserve compiler/linker flags if set
2006-08-26 15:42:27 +00:00
schwarz
0ee1ef088c * use the pkgsrc mkdir_p script on IRIX 5
* default to cc for CC with mipspro, ido, and sunpro
* make sure CFLAGS and CPPFLAGS are used when set by the user
2006-08-20 14:25:22 +00:00
rillig
f63a40d9e4 Added an option --compiler, which can be used to override the automatic
compiler detection. This is needed for Solaris with SunPro at least,
since bootstrap tried to install gcc>=2.95.3 during the registration of
the bootstrap packages.
2006-08-02 23:43:47 +00:00
rillig
2d74ada610 Allow the bootstrap command to be run from any directory, not just
pkgsrcdir.
2006-07-24 07:57:45 +00:00
jlam
898a0c5f98 In the post-bootstrap message, tell the user the correct manpage directory
to add to MANPATH.
2006-07-21 19:08:56 +00:00
jlam
d5b27ab1f8 Add a new option "--full" that implies all of the platform-independent
bootstrap software will be installed, regardless of platform.
2006-07-21 18:58:03 +00:00
jlam
fc3c1e56b8 Don't create the "work" symlink when building and installing software. 2006-07-21 18:46:52 +00:00
jlam
80e73a2bc7 Add back $pkg_install_args when invoking the pkg_install configure
script.  It was lost in revision 1.55.  This fixes the path to the
various pax, mtree, ftp commands used by pkg_install.  Bump the version
number of the bootstrap script.
2006-07-21 16:31:49 +00:00
jlam
a0c229751d Since bootstrap happens quite early and it's hard to get good debugging
output for bug reports, build with PKG_VERBOSE defined.
2006-07-21 15:30:30 +00:00
jlam
e4c8520953 Ensure $wrkdir is an absolute path so that $wrkobjdir is too. Avoids
creating empty "work" directories in the pkgsrc tree due to the
bootstrap script setting WRKOBJDIR=$wrkobjdir.
2006-07-21 15:16:39 +00:00
jlam
1c419eedc0 Fix a reversed test -- if the user specifies "CC" in the environment,
then he really doesn't want to always use CC=gcc.  This has no effect
if you were previously setting CC=gcc anyway.  Noted by Stuart Shelton.
2006-07-20 19:28:42 +00:00
jlam
98bd70c66b Fix location of install-sh script in the bootstrap work directory.
Problem noted by OBATA Akio on pkgsrc-users@.
2006-07-20 15:13:10 +00:00
jlam
79d62b7bc1 Explicitly set the compiler used to build nawk. The Makefile was
explicitly setting CC=cc, so override it on the bmake command line.
We use the CC taken from the environment first, and default to "gcc"
if CC is not set.
2006-07-19 15:27:37 +00:00
jlam
3c8ae20801 Ensure that "Makefile" and not "makefile" is used when building nawk.
The former contains fixes for the latter to avoid make errors.
2006-07-19 15:01:23 +00:00
jlam
90f0ef4799 * Move the "extra" scripts installed by bootstrap for certain platforms
into a separate package pkgtools/bootstrap-extras.  Teach the bootstrap
  script to look for those scripts from the bootstrap-extras package.

* When registering the installed software, set WRKOBJDIR to the bootstrap
  work directory to protect against a read-only pkgsrc tree.
2006-07-17 14:30:05 +00:00