Commit Graph

71 Commits

Author SHA1 Message Date
martin 2793d78f76 From Jim Bernard in PR install/50615: install_checksum expects a path
relative to ${DESTDIR}, and most callers did pass it that way - fix the
one place where it eroneously was called with a ${DESTDIR} path.
2016-01-03 08:44:59 +00:00
apb 4a6eb64432 Synchronise the "-s" part of the usage message with postinstall.
A colon-separated list of tgz files is no longer accepted; you
must use multiple -s options instead.
2014-11-13 07:11:06 +00:00
apb f80058aa23 Synchronise several shell_quote implementations, and:
* Elide some unnecessary pairs of quotation marks, to improve readability.
  For example, shell_quote "''" is now \'\' instead of ''\'''\'''.
* Don't add quotes around words that contain only safe characters,
  to improve readability.
* LC_COLLATE=C to prevent [a-zA-Z] from matching non-ASCII characters.
* Use ${SED} if defined.
2014-08-04 21:56:30 +00:00
apb 52a5651c02 Use extra="${2-/,}" to use $2 if defined, else default to "/,". 2014-06-16 22:12:30 +00:00
apb ca69835d41 Update date for previous, and fix some small errors. 2014-06-12 14:07:13 +00:00
apb 6a34214686 Add "-d destdir" option to etcupdate.
This has been only lightly tested.
2014-06-12 13:56:32 +00:00
apb 24cced9eb7 Keep track of whether anything was changed (or needs to be changed),
and print a message at the end if nothing needs to be done.
2014-06-12 13:42:05 +00:00
apb d735b9de0e When populating ${TEMPROOT} from ${SRCDIR} by copying, use the mtree set
files from ${BINARYDIR}/etc/mtree/set.{etc,xetc} as a list of files to
copy (and copy using pax instead of cp).

This prevents unnecessary copying of extraneous files, such as in the
case that BINARYDIR refers to a directory where everything has been
unpacked, instead of a directory where only the etc and xetc sets have
been unpacked.

Also convert a relative TEMOROOT to an absolute path.
2014-06-12 13:40:43 +00:00
apb 4961886ca5 There is a file named "._etcupdate_${TEMPROOT}${1}" was
never created, so don't try to delete it.  Delete "$B" instead.
2014-06-12 13:33:43 +00:00
apb 53c50ef02d When processing the -s option, the variable used is ${arg},
not ${ARG}.  Also adjust an error message to say
"Nonexistent or invalid file or directory", not just
"Nonexistent file or directory".
2014-06-12 13:31:47 +00:00
apb 03766ceab0 Remove the ability to specify multiple colon-separated file names with
a single "-s" option.  Multiple "-s" options must now be used instead.
We have been printing a warning about this since 2008-09-14.
2012-08-15 16:26:41 +00:00
joerg 4d4c59441b Run services_mkdb if only the old hash exists 2010-06-24 17:12:06 +00:00
mbalmer 74f49bc48d s/the the/the/ 2009-12-08 09:46:01 +00:00
reed 862cfefb55 Output (when verbose) when storing checksum files.
This may be a little noisy.
As discussed on current-users in March 2008.
2008-11-08 02:11:54 +00:00
apb e7b9864dba Move quotation marks to the correct place in eval statements
that were broken by the previous change.
2008-10-22 15:20:05 +00:00
apb 3c2b458230 In both postinstall and etcupdate, in modes where the -s argument
refers to tgz files or to a directory in which tgz files have already
been extracted, make it an error for the files that should have come
from etc.tgz to be missing.  This is intended to prevent users from
accidentally deleting necessary files when they run "postinstall -s
xetc.tgz fix".

Use the absence of .../etc/mtree/set.etc in the extracted directory
as a test for the error case.
2008-10-04 08:07:38 +00:00
apb bd0c152346 Remove options deprecated in NetBSD-4.0:
* Remove "-b binarydir" option (use "-s binarydir" instead).
* Remove "-s srcdir/etc" option (use "-s srcdir" instead).

Also document that "-s tgz1:tgz2" is merely deprecated, not removed
(use "-s tgz1 -s tgz2" instead).
2008-09-14 14:22:45 +00:00
apb 50356f5260 Allow "-s tgzfile1:tgzfile2" for backward compatibility. Print a
warning to encourage users to switch to using "-s tgzfile1 -s tgzfile2".
2008-09-14 13:46:51 +00:00
apb 8f2f105fda fix missing '$' in previous. 2008-09-07 16:22:12 +00:00
apb fa60b97dcc Document the change in meaning of "-s foo:bar". It now means a single
file or directory nmed "foo:bar".  If you want the old meaning,
use "-s foo -s bar" instead.
2008-09-07 15:21:31 +00:00
apb 41af7abe88 * Allow colons to appear in the names of tgz files, to address PR 39459.
* Allow spaces to appear in the name of the TEMPROOT and SRCDIR directories.
* Remove the ability to specify a colon-separated list of tgz files
  using a single "-s" option, because ":" is now a valid character within the
  name of a single file.  Callers should use multiple "-s" options
  instead.
2008-09-07 15:20:02 +00:00
apb e08cb252ae Remove "shift" commands that should have been removed when the
option parsing loop was converted to use getopts.  (Hi christos)
2008-09-07 14:31:10 +00:00
apb 0d8f46b03d remove debugging code accidentally committed in revision 1.39. 2008-09-05 11:29:42 +00:00
apb 92fa4c85e2 Redo previous in a way that more closely matches the style used
in postinstall(8).
2008-09-05 11:14:24 +00:00
apb ce2985aecc The shell builtin getopts returns options without the preceding "-",
so adjust a case statement to compensate.
2008-09-05 09:52:38 +00:00
christos 8283d3d2a9 - `` -> $() and quoting
- getopt -> getopts
- some errors to stderr
- more quoting
2008-09-05 06:04:12 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin 4b1e6a65be Convert to 2 clause license 2008-04-30 08:20:03 +00:00
reed 9b88c4e54a Document some about being able to view differences and
toggling the different diff formats/tools.
2008-03-17 14:46:54 +00:00
apb f228d2e41d Pass NETBSDSRCDIR in the environment to make. This is insurance against
Makefiles that should have an early .include <bsd.own.mk> but that fail
to do so.  It's also slightly more efficient.
2007-12-20 17:04:57 +00:00
martti 96f087cc74 /etc/services needs special attention. 2007-05-15 12:59:27 +00:00
apb 46e1ba7e4e * Make etcupdate's -s option accept a colon-separated list of tgz
files.  (It was already possible to use several -s options.)
* Change man page to refer to "-s tgzdir" instead of "-s tempdir",
  to reduce confusion between tempdir and temproot.
* Always use a temproot directory, even if passed "-s tgzdir".
* Always invoke "postinstall check", even when not using a source dir.
* Add a BUGS section saying that using -s srcdir is not recommended.

Reviewed by lukem and martti.
2007-03-26 18:11:03 +00:00
apb 9271fd890c Revert previous. MAKEDEV.subr no longer exists. 2007-03-03 06:43:46 +00:00
apb 34b8a708b7 If MAKEDEV.subr is updated, remember to run MAKEDEV later. 2007-03-01 07:47:13 +00:00
apb 339d48d326 Run pwd_mkdb before running mtree.
Reported by Hauke Fath in PR 35570.
2007-02-11 15:04:17 +00:00
martti 1ec5653502 Clean ${SRCDIR}/etc when done. Patch provided by rudolf.
http://mail-index.netbsd.org/tech-toolchain/2007/01/11/0001.html
2007-01-11 07:31:47 +00:00
itohy 8e29f0f218 Use "stty size" to acquire screen width reliably.
The fields of the first line of "stty -a" is not fixed.
Fix PR bin/32343.
2006-09-03 09:19:07 +00:00
hubertf ac583aa32a Xref etcupdate from postinstall, and vice versa. 2006-08-11 20:28:22 +00:00
apb 9e61b51ee3 Fix default handling. etcupdate with no "-s" flag
should act like "etcupdate -s /usr/src".
Approved by christos.
2006-02-26 19:56:51 +00:00
apb 8cc0e19f2c Typo in comment. 2006-02-26 19:55:46 +00:00
apb 03f40d9364 Pass BUILD=1 in make environment.
Fixes PR 30385 from Rui Paulo.
Approved by chrisros.
2006-02-26 19:51:05 +00:00
apb 1f082bb8d2 Wording changes to clarify some the options presented after
a file is merged.
2006-02-19 14:56:56 +00:00
apb 32c588d6a3 Fix errors in previous. I accidentally committed the wrong code. 2006-02-19 11:36:10 +00:00
apb 7e321ef839 Give etcupdate the ability to use etc.tgz and xetc.tgz.
* Expand the "-s" flag to -s {srcdir|tgzfile|tempdir}.
* Deprecate the "-b" flag.  It is replaced by "-s tempdir".
* Change "-s srcdir" to refer to the top of the source tree (e.g.
  /usr/src) instead of the etc subdirectory.

In etcupdate's interactive phase, enhance the "s" command to be able
to invoke alternative diff commands.

Also some style changes.

Approved by christos
2006-02-18 19:29:48 +00:00
lukem 8232ca0162 Tweaks for the move of postinstall from /etc to /usr/sbin 2005-04-17 23:12:40 +00:00
grant cacf2d0f45 s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
martti c5a31d5210 Set ${MACHINE} and ${MACHINE_ARCH}. 2003-11-06 07:09:40 +00:00
lukem a329d6f3f8 add MTREE=mtree back, for systems with some .mk version skew... 2003-07-14 23:16:19 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
atatat a9c9b3a125 Use awk instead of fgrep and sed, and default to 80 if we get
something that is arithmetically equal to 0.
2003-04-02 22:32:19 +00:00