Commit graph

144 commits

Author SHA1 Message Date
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
jlam
2d7c2b7a83 Copy the *.mk files from the pkgtools/bootstrap-mk-files package for
installation.  Garbage-collect the unused bmake and mods directories.
Register the *.mk files at the end of the bootstrap process.
2006-07-14 23:19:15 +00:00
jlam
0fad60e408 Use the pkgtools/pkgmanpages package instead of keeping our own copy of
the packages.7 man/catman page.
2006-07-14 22:17:09 +00:00
jlam
4118037f3f Create a separate pkgtools/tnftp package that is installed as part of
the bootstrap process and which may be needed by pkg_install.  This
is distinct from the net/tnftp package that is now a "normal" package.

Modify the bootstrap script to use pkgtools/tnftp instead, and clean up
some of the registration code.
2006-07-14 21:41:42 +00:00
jlam
9c75370cb9 Use pkgtools/pax when registering the bootstrap pax. 2006-07-14 19:40:26 +00:00
jlam
ed6be9b70d Back out part of revision 1.60 that I didn't mean to commit. 2006-07-14 17:55:56 +00:00
jlam
9924c898b7 Register the files that installed by the bootstrap script into the
package database.

XXX There are still some files not registered, e.g. share/mk and any
XXX mkdir/install/strip/ldd replacements needed by some platforms.
XXX These will probably get moved into pkgsrc proper.
2006-07-14 17:51:13 +00:00
jlam
80fb46b42a Fix path to the bmake.1 man page in the work directory. 2006-07-14 15:58:43 +00:00
jlam
ac8e595261 Install the bmake man page now that we properly handle PKGMANDIR in
bootstrap.
2006-07-14 15:21:05 +00:00
jlam
72aafc46c3 Fix TOOLS_PLATFORM.tar definition (cut and paste bug). 2006-07-14 14:30:21 +00:00
jlam
ded5437a56 Add nawk as a bootstrap tool. Reorder the builds so that nawk and sed
are built just after bmake so that they may be used in the configure
scripts for later bootstrap tools.
2006-07-14 14:27:00 +00:00
jlam
cc40796fe9 Pass the computed mandir down to all the configure script invocations. 2006-07-13 21:37:30 +00:00
jlam
c33cc9f058 Allow the user to specify --pkgmandir to control where man pages go. 2006-07-13 21:27:06 +00:00
jlam
3fb04117ee * Set PKG_TOOLS_BIN to the location of the bootstrapped pkg_* tools
in the example mk.conf file.

* Don't install digest anymore.  It's not needed by binary package users
  and it's handled within pkgsrc/mk now via BOOTSTRAP_DEPENDS.
2006-07-13 14:54:00 +00:00
jlam
acec97ecc0 After building bmake, use it exclusively to build everything else that
needs "make".
2006-07-11 18:04:08 +00:00
jlam
6ce9c24794 Generate the proper TOOLS_PLATFORM.* lines for bootstrap binaries to
tell the tools framework which binaries to use.  Also add some whitespace
so the example mk.conf looks more like a "real" mk.conf.
2006-07-11 17:29:20 +00:00
schwarz
eeec12647c re-introduce a modification from 1.48 that had erroneously been removed
with the modification for 1.49.
2006-04-14 20:37:08 +00:00
joerg
f860aa0fbb Don't use the carat (^) in class matches, as it is not supported by
some shells. Use precendency order instead.

Should fix PR 33236.
2006-04-11 14:35:48 +00:00
joerg
b14c4dc764 Allow overriding of the default FETCH_CMD with --fetch-cmd
for both bootstrap and mkbinarykit. When this is done or the
platform fragment of bootstrap specifies an explicit fetch_cmd,
tnftp is not built.

Use /usr/bin/ftp by default on DragonFly 1.4 and later.
2006-04-10 18:29:24 +00:00
schwarz
89bda489cd added bootstrap support for IRIX 5.3 (finally :-)) 2006-04-10 13:29:38 +00:00
jschauma
b48101ad3b Apply parts of a patch from Georg Schwarz to allow IRIX 6.x to bootstrap
again.
2005-12-17 17:51:40 +00:00
minskim
11d41836b7 Bump BOOTSTRAP_VERSION due to the update of archivers/pax. 2005-12-01 03:03:51 +00:00
joerg
e806cd23e8 sysMkPath should be ${PREFIX}/share/mk by default and only that.
Including e.g. /usr/share/mk results in sys.mk read from there
as well. On DragonFly this adds X11BASE and results in obscure
breakages. Since the mk files are supposed to be self-contained,
it doesn't make much sense to look in other directories anyway.
Bump revision to annotate this.

Discussed-with: reed@.
Reported-by: Aggelos Economopoulos <aoiko AT cc DOT ece DOT ntua DOT gr>
2005-11-16 13:53:51 +00:00
reed
6fa7d5f273 Add "--mksrc none" to the boot-strap arguments for building "bmake". 2005-11-10 00:10:35 +00:00
reed
9dc3ac78a5 Remove the NetBSD specific Makefile.in for bmake. It was not used anyways
since yesterday's update (since it overwrites it).
2005-11-02 00:34:23 +00:00
reed
868a3892a6 bootstrap script uses source files from pkgsrc/devel/bmake/files
for "bmake".

Remove all of bmake source from this bootstrap.
Keep bootstrap/bmake/mk -- copy to files-mk (so the
bmake "boot-strap" doesn't notice the mk*).

This was tested on DragonFly, NetBSD and some on Linux.

Hopefully all the fixes to boostrap's bmake are included in
devel/bmake/files.

Note that the "mk" files is still not using devel/mk-files.
2005-11-01 01:06:02 +00:00
reed
cec0180295 Do not define sysconfdir when --prefix is set. This causes
sysconfdir to be reset if --prefix is later on command line.
2005-10-31 23:05:24 +00:00
jmmv
1eda67b394 Allow --varbase=something (note the '='). Pointed out by rillig@. 2005-05-30 19:03:29 +00:00
jmmv
041d5ecfe0 Simplify usage as non-root. When given the --ignore-user-check, change
default installation paths to be inside ~/pkg and define UNPRIVILEGED=yes
in the generated mk.conf.  This lets regular users to simply bootstrap by
doing './bootstrap --ignore-user-check'.
2005-05-29 17:15:25 +00:00
rillig
8aedb70177 Added a function get_optarg that avoids code duplication in the option
parsing code. For maximum portability it uses the expr(1) command
instead of sed(1), the same way as it is done in the core of the latest
GNU configure scripts.
2005-05-25 07:06:54 +00:00
rillig
2f39dcaf4a Allow the user to type --prefix=foo instead of requiring a whitespace
between the --prefix and the directory. This makes life easier for users
that often run GNU ./configure scripts manually.
2005-05-14 02:12:48 +00:00
wiz
af43f6cfdc Refer doc/pkgsrc.txt instead of Packages.txt. 2005-05-07 22:16:38 +00:00
minskim
9e761f6663 Define TMACDIR and CATDEPS appropriately on Linux.
Bump BOOTSTRAP_VERSION.
2005-04-19 18:24:17 +00:00
jschauma
ccfb405e99 If need_bsd_install=yes, then also set INSTALL accordingly in the sample
mk.conf
2005-04-11 21:03:21 +00:00
jschauma
f8a308ad6a Implement changes suggested on tech-pkg some time ago:
(1) rework how command-line arguments are parsed:
instead of --command=<arg>, use --command <arg>

This allows us to not rely on certain commands for which we first need
to figure out where they are to parse the arguments, which in turn
allows us to

(2) add the command-line option

--preserve-path

to prevent bootstrap from munging the PATH (as it does on some platforms)
and look in places that are not currently in the PATH

Finally,

(3) add a check to see if we're using gcc, and set and add the
PKGSRC_COMPILER=<compiler>
flag to the sample mk.conf.  This is particularly useful (and actually
necessary) under IRIX.

Bump BOOTSTRAP_VERSION.
2005-04-10 21:54:13 +00:00
tv
f7bdf70504 Were the overrides in mods/mk ever tested?
Fix the override logic for $opsys.bsd.{lib,man}.mk to install the files
in the correct place -- this was previously all kinds of b0rken.  Now it's
possible to build shlibs properly on Interix using <bsd.lib.mk>, and may
be possible on Darwin as well.
2005-03-08 15:43:10 +00:00
grant
ec39a6ec98 set MACHINE_ARCH correctly on AIX. 2005-02-19 04:07:31 +00:00
grant
986adbbaca don't override the CPPFLAGS and LDFLAGS environment variables, add to
them instead.
2005-02-15 08:48:34 +00:00
agc
ffe1509afb DragonFly's pax(1) has different options to those in NetBSD.
Re-bootstrapping with pax fixes the situation.

Fix from Todd Willey.
2005-01-20 22:36:06 +00:00
grant
20b97d46a1 append, not prepend, /usr/ccs/bin to the $PATH (where it exists).
Solaris is happy with it being tacked onto the end, and it unbreaks
the build on HP-UX with the native compiler.

from Andrey Zakharchenko.
2005-01-16 02:56:24 +00:00
jschauma
8fe60ea175 Set machine_arch=mipseb on IRIX, so that binary packages don't complain
about a mismatch.
2005-01-12 16:42:13 +00:00
agc
aaab8e1464 Apply fixes to set TARPROG definition properly for DragonFlyBSD from
Todd Willey in PR 28941.
2005-01-12 11:30:37 +00:00
tv
16a4e83435 No need to "cp -p" here. 2005-01-05 21:51:19 +00:00
grant
77e4975de4 add support for Tru64, patches provided by Tobias Nygren
<tnn at netilium dot org> with minor changes by me.

tested on Tru64 5.0 and 5.1B.
2004-11-20 04:31:35 +00:00
wiz
37aaf3046b Add DragonFlyBSD recognition defaults, provided by Todd Willey on tech-pkg. 2004-10-31 22:04:26 +00:00
tv
fd931daac1 Bump BOOTSTRAP_VERSION for previous. 2004-10-08 17:29:00 +00:00
tv
1f62dde17e Revert part of rev 1.19:
There's one place where you absolutely *must* use bmake:  when building
pkg_install.  Otherwise its Makefiles will attempt to get $(MACHINE_ARCH)
from the system make, which is not likely to be correct on several
platforms.
2004-10-08 17:26:45 +00:00
jlam
568471a1f2 Catch up with textproc/nbsed needing to be configured with
--program-transform-name="s,sed,nbsed," to be installed with the correct
name.
2004-08-27 06:48:58 +00:00
jlam
f79acda48d * Modify bmake to use libnbcompat to ensure that a regex implementation
exists.

* nbsed-20040821 requires libnbcompat, so make the appropriate
  adjustments to the build to use it.

* If nbsed is built during bootstrap, then use it as the sed for
  pkg_install so that the correct program is embedded into the pkg_view
  and linkfarm scripts.

* We don't need bmake to build any of the bootstrap packages, so just
  call out to the system make.
2004-08-23 03:44:34 +00:00
schmonz
7ecc421fab Retire the bootstrap script's --pkgsrcdir argument. Now that we're
part of pkgsrc, we don't need to be told where it is.
2004-05-11 02:07:19 +00:00
tv
640ffba907 Use numeric uid/gid instead of Administrator/+Administrators, as native
language non-English versions of Windows name these accounts differently.
2004-05-05 14:39:45 +00:00
danw
52c490d5f1 make sure /sbin and /usr/sbin are in $PATH. pkg/24010 2004-04-24 19:17:09 +00:00
tv
16fb5e30af Rather than work around an automake braindeadness, parameterize install-sh
so that Interix can set the default mode to 0775.  Then add "install_sh"
to CONFIGURE_ENV so it uses ${INSTALL}, not the package-supplied
install script (as is done for autoconf $INSTALL).
2004-04-23 02:03:18 +00:00
tv
29729ef6eb For Interix, use "mkdir -p" after all so that the umask can take effect. 2004-04-21 20:35:18 +00:00
heinz
6ba6314a4f Use 'mkdir-sh' instead of 'mkdir-p.sh' (similar to 'install-sh'). 2004-04-16 23:47:02 +00:00
heinz
9b0383bdda Add support for UnixWare 2004-04-11 03:17:12 +00:00
jmmv
34db6d0fa4 Add support for the --sysconfdir argument, which changes the location of
configuration files.

From now on, mk.conf is first searched under the value passed to the
sysconfdir argument (which defaults to ${prefix}/etc, to match pkgsrc's
PKG_SYSCONFDIR default value).  If not found, /etc/mk.conf is tried, to
not break existing installations which have the file in that location.
This is done to help with non-root installations of pkgsrc.

Also change pkgsrc's PKG_SYSCONFBASE value to match what is given to
sysconfdir, for consistency.

While doing this, rename $opsys.own.mk files to $opsys.own.mk.in for clarity,
as they now need sed replacements to work (i.e., the SYSCONFDIR stuff).
2004-04-07 12:05:37 +00:00
tv
0e9ff9bdf9 Don't set -m in mkdir_p because Interix needs 0775, not 0755. Let the umask
take care of it (the mtree file will do the rest).

Use numeric gid for Interix in an unprivileged build.
2004-03-29 02:20:04 +00:00
grant
ab335a10c2 apply patch from Klaus Heinz to support bootstrapping from a read-only
pkgsrc with the --workdir argument.
2004-03-28 01:55:17 +00:00
grant
5a4625cab5 MACHINE_ARCH should be derived from uname -m on OpenBSD.
from Philip Reynolds on tech-pkg.
2004-03-21 01:06:37 +00:00
tv
b565285e6e In mkdir_p, iterate the directory names. (install-sh doesn't.) 2004-03-11 20:49:09 +00:00
tv
27795985bc Interix has the possibility of case-insensitive filesystems too. Add the
same check used for Darwin, and a doc fragment to README.Interix.
2004-03-11 20:47:56 +00:00
tv
3c6beb239f Interix needs pax too. <grumble> 2004-03-11 19:45:09 +00:00
sketch
438e0e531d Use the install-sh wrapper to create directories rather than relying on
the system mkdir(1) which may bail out too easily for non-fatal errors.

Should fix pkg/23086
2004-03-11 17:47:18 +00:00
tv
cee9b8562c Parameterize the root user, and provide an alternative implementation
of the is_root() function for Interix only.
2004-03-11 17:29:11 +00:00
grant
f4486c21b5 grab and build the various programs required from pkgsrc rather than
keeping a separate copy (with the exception of bmake, which is
currently older than devel/bmake).
2004-03-11 13:08:06 +00:00
grant
dc18479966 import the required bits of bootstrap-pkgsrc from 20040311. 2004-03-11 13:03:58 +00:00