Commit Graph

80 Commits

Author SHA1 Message Date
christos
984789e59f We always have a valid mtree file, so always specify -M 2013-02-07 16:27:41 +00:00
christos
64ccf8daf2 merge d flag. 2013-02-07 01:24:04 +00:00
christos
698fd2d87e - use dest instead of DESTDIR
- factor out pax usage, and make it use only the first word from the sets
2013-02-07 01:07:41 +00:00
christos
963f4e0c4d Create full sets using mtree from the flists (not just filenames). 2013-02-06 01:01:12 +00:00
christos
82e56e3752 - add xdebug set
- document debug better
- fix previous debug fallout.
2013-01-16 21:11:05 +00:00
christos
824c548c74 Add a new "debug" set that gets built when ${MKDEBUG} is set. On evbarm:
-rw-r--r--  1 root  src   35806068 Jan 16 10:47 base.tgz
-rw-r--r--  1 root  src   57374069 Jan 16 10:48 comp.tgz
-rw-r--r--  1 root  src  101286193 Jan 16 10:49 debug.tgz
...
This allows always building the debugging code and libraries but not
installing it (although now it is placed in the default sets if ${MKDEBUG}
is set
2013-01-16 16:01:05 +00:00
mrg
25c3593d4e add new option to build/use tools/pigz for compressing sets. for now
USE_PIGZGZIP defaults to "no".  (it depends upon local <pthread.h> and -lz.)

you can set it to "yes" on most modern platforms just fine.
2010-08-15 07:27:33 +00:00
uebayasi
9fa6d83816 sh(1) style. No functional changes. 2009-12-10 02:22:57 +00:00
cegger
a12917370a Fix syntax error on OSX 10.5.
While here, simplify handling with OPTARG using IFS.

developped with and 'go for it' dsl@
2009-12-05 15:56:25 +00:00
apb
3cdf47a42a Exit with a sensible error message if makeflist output is empty.
This should be better than an incomprehensible error message from
mtree.
2009-12-03 12:44:57 +00:00
uebayasi
d166c4bf28 Support "extsrc", externally added programs and libraries. Users can write
their own reach-overs, cross-build, install, and get set files just like base
and X11 / X.org.  (These sets are not included as TNF releases.)
2009-11-30 16:13:22 +00:00
apb
06867cdace If there are errors in creating a ${set}.tgz tar file, then don't
just press on regardless.
2009-09-12 11:01:55 +00:00
apb
c62615c020 In various places that manipulate mtree specs, use "mtree -CS" to sort.
Remove some now-redundant standalone sort commands.
2009-04-11 15:09:32 +00:00
perry
58e0c54cf3 Consistently use gzip with the -n flag so dates are not embedded.
Not tested on all platforms.
2009-04-03 22:36:34 +00:00
tsutsui
d28e46bb7b Explicitly sort entries on preparing set files from METALOG.
METALOG could have different order due to install(1) race
on parallel builds, and mtree(8) doesn't sort files.
Should fix inconsistent shared sets among builds as seen in
/pub/NetBSD-daily/netbsd-5/200904010000Z/shared/ and
/pub/NetBSD-daily/netbsd-5/200904010002Z/shared/ dirs.
Okay'ed by snj@.
2009-04-02 23:06:16 +00:00
perry
d93da10e54 Clean up set files to make them consistent using mtree. Patch from lukem. 2009-04-02 18:06:54 +00:00
lukem
6c8d08d4c7 Add '-q' to maketars and makesrctars, to quieten them.
Improve MAKEVERBOSE support.
2008-03-16 07:02:22 +00:00
lukem
1e8f8a64e7 Cleanup .tgz.tmp files on exit. 2008-03-16 04:39:19 +00:00
jmmv
4d9b8b6a50 Add the tests.tgz set
This adds a new tests.tgz set to releases which includes all the tests
for the system.  It is important to note that this set does not rely on
comp.tgz: a user of the system can run the tests without having the
development tools installed, which can be useful in a production machine.
2007-11-12 15:06:45 +00:00
apb
d6b37f8359 No space in "function()", "command;" or "$(command)".
Requested by christos.
2006-01-28 19:01:23 +00:00
apb
c32228d46e When printing messages to stderr, always use
echo >&2 "${prog}: ..."

Approved by christos
2006-01-08 10:10:03 +00:00
apb
29e51821aa Remove the code that used "${MTREE} -C ..." to sanitise the plist. We
can now assume that it's already been sanitised before maketars was
invoked.

Reviewed by agc
2006-01-04 15:03:39 +00:00
apb
0bee96eab7 Ensure that (almost) all shell variables in distrib/sets/* scripts are
used with curly braces and quotes, as in "${var}".

Also ensure that command substitution is quoted, as in "$(command)", and
convert `command` to $(command).

Reviewed by agc
2006-01-03 18:31:09 +00:00
apb
3a0b541193 Add shell variables defined in sets.subr for almost all commands used
by scripts in distrib/sets/*.  This is intended to be useful when cross
building.  Only trivial commands like echo, cat, and rm are excluded
from this treatment.

While I am here, make ${MTREE} and ${DB} follow the pattern used by most
other such variables.

Reviewed by agc.
2006-01-03 16:40:16 +00:00
apb
26d8593b50 Move default values for several shell variables into sets.subr.
Reviewed by agc
2006-01-03 15:42:42 +00:00
jmc
d5bf52b805 Set default vars so blank and unset both end up w. a reasonable default 2005-10-21 02:41:14 +00:00
erh
10d0173282 Make all the sets scripts work even when not run from the directory that
they reside in.
Change any uses of dirname to use shell variable substitution instead.
2004-07-23 15:11:26 +00:00
dsl
eb5d4e583d Write to a temporary file and mv to real name to avoid getting a
truncated file if/when interrupted.
2004-04-18 19:52:32 +00:00
dyoung
c3ca61a258 Clearly the error message was supposed to print $metalog, not
$METALOG.
2004-02-19 02:54:51 +00:00
lukem
5a4b1f5af4 When not using a metalog, only copy the generated flist.<set> over
/etc/mtree/set.<set> if they are different.  This should allow
installsets to operate from a pre-populated read-only DESTDIR.
Based on fix from Juergen Hannken-Illjes.
2004-02-06 11:38:57 +00:00
lukem
1c401bb3d7 Create ${DESTDIR}/etc/mtree/set.<setname> setfiles for each given <setname>.
Add `-S' to exit after creating the setfiles.
Send errors to stderr instead of stdout.
2004-01-30 08:39:50 +00:00
lukem
024e4b2926 Also remove "xetc" from the default list of sets copied with -i installdir 2004-01-29 08:32:51 +00:00
lukem
6f9a1982b5 rename all the <bsd.own.mk> derived variables to uppercase, and export
them to the environment.
2004-01-03 02:38:58 +00:00
lukem
b852db83fb Significant overhaul of how the sets are used:
* Add an optional third field to the sets file which is a list of
  comma separated keywords that control if the line is printed.
  Currently supported keywords
	kerberos4	${MKKERBEROS4} != no
	kerberos	${MKKERBEROS} != no
	lint		${MKLINT} != no
	obsolete	${obsolete} != 0.
			In this case, non obsolete files are not printed.
  (This will allow future support for builds with variables such as
  MKHESIOD and MKYP set to "no".)

* Use sh(1)'s getopts where appropriate, and otherwise cleanup the
  various scripts.

* Move defaults for sets.subr from sets.defaults into sets.subr.
  Move replicated code for determining stuff such as shlibs type
  from various scripts into sets.subr.

* Merge the obsolete.*, krb.*, krb4.* and lint.* into the appropriate
  main lists with the relevant third field keyword(s).
2003-12-29 03:13:25 +00:00
jmc
62fcaffaa9 Redo creation of sets/sums so this can be parallelized if using -j.
Suggested in PR#20115 and PR#20116
2003-12-19 22:25:53 +00:00
dyoung
17b5668ccd Factor duplicated code for setting variables such as machine_cpu
and machine_arch to their defaults into sets.defaults, and source
it at the top of each script.

Also, to be consistent with variable naming, s/arch/machine_arch/.

sets.defaults introduces two new variables, krb and krb4, which
will affect whether Kerberos- or Kerberos IV-only files are put
into the set lists.
2003-11-25 07:19:46 +00:00
dsl
11dc7d2a0b Report correct error code (in particular when mtree objects to METALOG file). 2003-10-16 14:20:20 +00:00
lukem
9eb4566d27 * use ${MKTEMP} -d instead of home-grown tempdir creation code
* use $(...) instead of `...`
* fix a recent modification to follow the same coding style as the
  rest of the file...  (mmm, consistency)
2003-09-30 05:07:40 +00:00
dsl
9d055a33fc Since the METALOG is updated by every install, there is no need to
remake the sets if the set files are newer than METALOG.
Useful for running DISTRIBUTION_DONE= nbmake in src/etc in order to
rebuild with new kernels and/or new ramdisk.
2003-08-22 19:08:47 +00:00
lukem
ed18469ce3 if the mtree parse of METALOG fails, exit. 2003-07-03 06:43:02 +00:00
perry
2c736e195a Temporarily revert last. It now screws over symlinks from the destdir,
which is the inverse problem. It is fixable by piping one pax -w into
a pax -r instead of using a pax -rw, but unfortunately that won't work
yet because I've hit a pax issue. I'll fix that and then fix this right.
2003-04-07 17:22:19 +00:00
perry
1b49023f24 do pax -L so that symlinks aren't blown away.
Beginning of work to fix PR install/8090 from Luke Mewburn
2003-04-06 19:41:03 +00:00
erh
f3281c94bd Return the correct exit status in the trap handler so errors get caught.
Also make sure the status is less than 256.
2003-01-21 19:07:05 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
lukem
245a0c292b improve description of -t 2003-01-03 15:26:32 +00:00
lukem
7f4e9b543c improve description 2002-12-25 23:47:32 +00:00
lukem
12837cbb48 fix header to match usage 2002-12-25 23:44:06 +00:00
lukem
144b55005f Rework METALOG manipulation:
- add '-D ${DESTDIR}' to INSTPRIV, so install(8) removes the leading
  ${DESTDIR} from the metalogged path
- provide ${METADB.add} variable (for "${CAT} -l >> ${METALOG}"), to make
  it easier to replace manual metalog manipulation in the future.
- with manual metalog additions, don't add the leading ${DESTDIR} in the path
- in maketars, use "mtree -C ..." instead of
  "mtree -D ... | sed -e 's,\(.*\) \(\..*\),\2 \1,";

Benefits:
- maketars "Parsing METALOG" step speeds up from 29 seconds to 1.2 seconds
  on a P3-600.
  (This also benefits "make installworld" at the top level.)
- ${DESTDIR}/METALOG is easier to read without the leading "${DESTDIR}"
  on all the pathnames, and it's smaller as well.
2002-12-23 06:52:48 +00:00
lukem
d9aa9519e8 Invoke ${PAX} with '-O' so that various errors don't hang the make
or the command with an interactive question.  (This also prevents
weird problems if a directory element of '-f path' is missing and
'make -j N' is being used).
2002-12-21 15:54:48 +00:00
lukem
a4a6515a36 Always call maketars (and subsequently pax) with -N ${NETBSDSRCDIR}/etc,
so that we always use the user & group databases from there rather than
the host systems.
2002-12-19 12:33:10 +00:00