Commit Graph

19 Commits

Author SHA1 Message Date
apb 26fce401e0 Patches from Lloyd Parkes in PR 41684, plus my changes:
* ${HOSTNAME} is special to bash, so rename the variable to HOSTNAME_CMD.
* Don't use "cd -".
* Don't use only comments in the else part of an if statement.
2009-12-02 15:52:14 +00:00
apb fb5e3559de There's no point in adding _PKGTOOLS_VER=$(${PKG_CREATE} -V)
to any syspkg +BUILD_INFO files, since we don't use the pkg_* tools
to create syspkgs.  Also remove the definition of PKG_CREATE
from sets.subr, since nothing uses it now.
2009-12-01 15:49:21 +00:00
agc 205394f300 Move to a 2-clause BSD license 2009-10-17 23:43:22 +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
apb f7004b0cbc Whenever we try to parse the output from make, run make with the -B
flag.  This ensures that -j<N> isn't accidentally inherited from the
environment, because the "--- foo ---" headers printed with -j<N> would
interfere with parsing the output.
2007-02-05 18:26:01 +00:00
apb d6b37f8359 No space in "function()", "command;" or "$(command)".
Requested by christos.
2006-01-28 19:01:23 +00:00
apb 13da902879 During an "update" build, if previous versions of a syspkg were already
registered, or if previous versions of the syspkg .tgz file already
existed, then delete them.  Previously, this was a fatal error.

Approved by christos
2006-01-28 18:42:23 +00:00
apb 6942b0e739 Use TARGET_ENDIANNESS (from bsd.endian.mk) to decide whether
to add "-E B" or "-E L" options to ${db_opts}.

Approved by christos.
2006-01-08 10:25:33 +00:00
apb e386c41eea In the case where there is no metalog, when converting the
PLIST to specfile format, add type=dir for directories.
Fixes a build problem with non-METALOG builds.
2006-01-08 10:24:04 +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 3df0642b27 * Give regpkg the ability to create binary syspkg packages (*.tgz files).
The new "-t binpkgdir" option requests this action.
* Make it pay attention to DESTDIR.
* Make it work for unprivileged builds using METALOG.
* Add "force" and "update" modes.
* Add "quiet" mode.  There was already a "verbose" mode.
* Add several new command line args in support of the above.
* Make much more use of shell functions.
* Replace the old way of choosing syspkg version numbers.
  The new way gives numbers derived from concatenating the OS
  version [from osrelease.sh or $(uname -r)], a "tiny" version [from
  distrib/sets/versions, default 0], and a date [from RCS time stamps or
  file system time stamps].
* Add @blddep lines to the PLIST (in addition to the @pkgdep lines
  that were previously added).
* Use host tools such as pax, cksum, and db, to do more or less the
  same work that was previously done by pkg_create (which is not a host
  tool).  No longer attempt to use pkg_create.

Reviewed by agc
2006-01-04 14:14:35 +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
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
dyoung 624b44bb1b Cache build info. Makes regpkgset more tolerable on my slow 500MHz
AMD K6-2 workstation with its slow IDE disks.
2004-01-16 10:05:10 +00:00
dyoung b8eacf60d4 Optimization: invoke make fewer times.
Fix typo: osreleasese -> osreleases.

Write @pkgdep directives, drawing package dependencies from
distrib/sets/deps.

When regpkg is finished, now it removes the packing list temporary
file from /tmp.
2003-06-23 09:25:34 +00:00
agc 1802ef39d2 Clean up editing of the original regpkg script in the previous.
+ use "uname -r" if osrelease.sh isn't available

+ if SYSPKG_DATES is set in the environment, use the date for the
  version.  For some reason, this is controversial, so the default is
  to use NetBSD kernel versions.  Re-instate the code to calculate the
  date, but only use it if the date cannot be gleaned from the RCS Ids
  of the constituent parts.

+ re-work the versions file, since it was committed in an incomplete
  state - there were version numbers without package names in there.
  Instead, get the version number by exception - i.e. assume it's "0"
  unless specified in the versions file.  This means less independent
  maintenance when a kernel version number is bumped, and less
  duplication of work (since any new system packages will now have the
  correct version number by default)

+ lose the section which duplicated the calculation of "tiny version"
  which was never used (and which didn't work correctly)
2003-06-18 10:53:52 +00:00
jwise 3ef0e39473 Recreate the ability, which has existed in syspkg since first implementation,
to explicitly version syspkgs.  See discussion on source-changes@netbsd.org.

If we want to lose this functionality, we should discuss this on the appropriate
lists...
2003-06-13 02:32:26 +00:00
agc 72aa9a9ed1 Add the comments file, which is a single file containing all the COMMENT
file entries from the syspkg hierarchy, brought up to date to include some
that had been missed out.

Add the descrs file, which is a single file containing all the DESCR
file entries from the syspkg hierarchy, brought up to date to include some
that had been missed out.

Thanks to Jim Wise for all the work that went into the syspkg sets.

Add the attrs file, which is a single file to which can be added
attributes (like preserve).

Add a regpkg script, which allows a single system package to be
registered, based simply on its setname and syspkg name.  All the
information is gleaned from the lists files by means of scripts, no
source tree is needed.  The version number for the system package is
calculated automatically, based on the most recent mtime of the files
that constitute a system package.

Add a regpkgset script, to register all the system packages in a set.
The set names recognised are "all", "base", "comp", "etc", "games",
"man", "misc", "text".
2003-06-12 20:04:00 +00:00