information about the build, and "install-release-info" to install it.
(The latter will be invoked by src/Makefile)
Based on work by Hubert Feyrer <hubertf@> and the "params" target in
src/Makefile.
instead of -v ETCDIR.
* Parse $NETBSDSRCDIR/etc/{master.passwd,group} to build a list of
user->uid and group->gid mappings, and replace %uid_XXX% and %gid_XXX%
appropriately.
* Whitespace & regex tweaks.
- If DISTRIBUTION_DONE is defined, don't add the 'root' directory to METALOG.
(maybe install -M shouldn't write to the METALOG file if it doesn't install
the file either)
- Don't re-compress the kernels if the compressed file is newer than the
kernel.
Useful if all you want to do is rebuild the ramdisk image.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"
Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"
Improve documentation for these and other make flags.
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.
Use /var/db/obsolete instead of /etc/obsolete
etc/Makefile:
Create separate target "install-obsolete-files" to populate
/var/db/obsolete, instead of using "install-etc-files".
Makefile:
Add do-obsolete target, to run "cd etc && make install-obsolete-files",
and add this to BUILDTARGETS.
This moves the "obsolete files" creation from "distribution" to "build".
Per discussion with Andrew Brown.
* Improve message display in find_file_in_dirlist()
* do_obsolete(): instead of running distrib/sets/makeobsolete to
temporarily generate the obsolete sets lists, look for them in
${SRC_DIR}/etc/obsolete/* or ${DEST_DIR}/etc/obsolete/*.
The obsolete check now works for "extracted etc.tgz" as the source dir.
etc/Makefile (install-etc-files), distrib/sets/lists/*
* Install obsolete set lists into /etc/obsolete/
* Tweak how pwd_mkdb files are added to METALOG
distrib/sets/makeobsolete
* Don't bother with "_obsolete" suffix on generated file names.
- Add ${.CURDIR} to various rules.
- Remove the ${KERNOBJDIR} (sys/arch/${MACHINE}/compile) objdir creation
from here.
- Rework iso-image to copy temporary files (such as kernels or boot files)
into a temporary directory instead of stomping over ${RELEASEDIR}, and
use mkisofs -graft-points to merge the temporary directory and
${RELEASEDIR}/${MACHINE}.
NOTE: mkisofs 2.0 is highly recommended for functioning -graft-points
- Add some more comments
- 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.
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).
MD disktab where possible (everything but vax)
the MD disktab was often either empty, or contained entries even for disks
which support geometry autodetection (SCSI), and/or non-interesting/long
obsolete entries
the old records are still available in example disktab in
/usr/share/examples/disktab/disktab in case anyone would need them
remove special ttyaction hook from etc/etc.sun[23]/Makefile.inc, it's no longer
needed
ld.so.conf is ${MACHINE}-specific, the code happened to work for i386 and sparc
only because ${MACHINE} == ${MACHINE_ARCH} there
remove basesrc/etc/ld.so.conf and its special vax/ns32k/m68k hook in Makefile -
vax & m68k are ELF now, and ns32k doesn't need to be handled here
for all platforms.
- remove now unnecessary replicated code in the various snap_md_post targets
- remove snap_md_pre; nothing uses it any more
- use ${NETBSDSRCDIR} and ${KERNSRCDIR} as appropriate
which bits to build, and to allow "make -j N" actually do something in
parallel:
- build_kernels: for each of ${ALL_KERNELS}, create kern-${NAME} target
which configures & builds the kernel ${NAME}.
- build_kernsets: for each of ${KERNEL_SETS}, create kernset-${NAME} target
to create ${RELEASEDIR}/binary/sets/kern-${NAME}.tgz
- build_releasekernels: for each of ${KERNEL_SETS} ${EXTRA_KERNELS}, create
${RELEASEDIR}/binary/kernel/netbsd-${NAME}.gz (et al)
(The latter two .WAIT until build_kernels has completed)
ALL_KERNELS ?= ${KERNEL_SETS} ${EXTRA_KERNELS} ${BUILD_KERNELS}
and use ALL_KERNELS instead of the latter three in the loop to configure
& build kernels. This allows ALL_KERNELS to be overridden in make(1)'s
environment or on make(1)'s command line... (I got sick of waiting for
all eleven i386 kernels to rebuild when I was only testing one)
Obsolete NBUILDJOBS; build.sh just passes -jN through to make(1),
which inherits it cooperatively through the build tree. Fix
documentation so that it's shown to be deprecated.
If you use build -jN, please save full build logs so that errors due
to missing dependancies can be analyzed and corrected.
(${KERNEL_SUFFIXES}), put the list in a shell variable and use that.
Both bash (before 2.05a) and Solaris /usr/xpg4/bin/sh report a syntax
error otherwise.
(easier to read that large nested .if's
- use INSTALL_FILE, INSTALL_LINK and INSTALL_SYMLINK instead of INSTALL
- when creating release directories, don't bother setting owner and group
install-etc-files iso_image_mi iso-image_md_pre iso-image_md_post snap_kern
- add the following targets to the RELEASEDIR=="" check:
iso_image_mi iso-image_md_pre iso-image_md_post snap_kern
- improve comments around make .flow control statements (including adding
some helper # { ... # } comments around large .if statements for (ab)use
with vi showmatch mode)
- clean up whitespace
when building the kernel sets and placing gzip'd kernels in binary/kernels.
For example, if KERNEL_SUFFIXES were set to "ecoff srec", then the kernel
set would include:
netbsd
netbsd.ecoff (only if it exists in the kernel compile directory)
netbsd.srec (only if it exists in the kernel compile directory)
This is useful for packaging kernel sets for platforms which have
extra special requirements for loading the kernel.
more consistent. To quote the comment in etc/Makefile
that describes how it's done:
# This target builds the kernels specified by each port. A port may
# specify the following kernels:
#
# KERNEL_SETS The list of kernels that will be
# packaged into sets, named
# kern-${kernel}.tgz. These kernels
# are also placed in the binary/kernels
# area of the release package as
# netbsd-${kernel}.gz.
#
# EXTRA_KERNELS Additional kernels to place in the
# binary/kernels area of the release
# package as netbsd-${kernel}.gz, but
# which are not placed into sets. This
# allows a port to provide e.g. a netbootable
# installation kernel containing a ramdisk.
#
# BUILD_KERNELS Additional kernels to build which are
# not placed into sets nor into the
# binary/kernels area of the release
# package. These are typically kernels
# that are built for inclusion only in
# installation disk/CD-ROM/tape images.
#
the latter being called by the "distribution" target. This allows the
various /etc/... files to be installed manually in a convenient way, if
desired.
NOTE: It is INTENTIONAL that this target is not named "install".
or distribution.
Also, clean up the check and include <sys/endian.h> instead -- some platforms'
<machine/endian_machdep.h> pull in the definitions of _BIG_ENDIAN and
_LITTLE_ENDIAN, invalidating the test; this makes the check values uniformly
"4321" and "1234" respectively.
Shouldn't be needed, but install has no other good way to deal with
this.
Pointed out by Rob Windsor in PR 14394 -- I committed his patch plus
one for something he didn't hit yet.
the etc Makefile override that by putting USETOOLS into $.MAKEOVERRIDES
This way the default for kernel compiles is still to use the installed
toolchain instead of depending on $TOOLDIR. $TOOLDIR can be used by
simply adding USETOOLS=yes to the command line as usual.
Adjust each ports template to set the default no setting and also pull in
bsd.own.mk if they weren't already to ensure they'll build correctly
with the new toolchain setup.
- Resurrect /etc/changelist, even if it's an "empty" file by default,
because it's easier to use than /etc/mtree/special.local for adding
a couple of simple files. Back by popular demand (hi @@@! :-)
- Add /etc/rc.d/* to the list of "dynamic" files; this notices changes
in user-added scripts
- Only calculate the mtree -I nomail list once, and re-use
- Use "cat foo | while read file" instead of "for file in `cat foo`" ;
handles whitespace better...
Features:
- Add a bunch of stuff to /etc/mtree/special to enable removal of
/etc/changelist:
- files which we want to monitor for changes but don't want to
see the diffs of (master.passwd, ssh_host_key, ...) are
tagged with "nomail"
- files which we don't want to monitor are tagged with "exclude"
(such as netgroup.db, kvm.db, ...)
- monitor /etc/mtree/special.local, /root/.ssh/*
- remove /etc/changelist, and a bunch of XXX comments
- use mtree(8)'s -D, -I, and -E to generate lists of files to
actually do the changelist stuff on.
- support /etc/mtree/special.local as an optional user-provided
version of /etc/mtree/special (effectively, an enhanced
/etc/changelist)
- Add code to monitor: /etc/ifconfig.* /etc/raid*.conf /etc/rc.conf.d/*
including support for these files being added and removed at will.
- If /sbin/fdisk exists, backup the output of "fdisk $disk" for all
the active disk drives as part of $check_disklabels
- Check permissions on: ~/.ssh/* ~/.shosts
Details:
- Reorder initialisation of defaults
- Remove special case for /etc/master.passwd "monitor but don't email diffs"
with general case for other similar files.
- Keep all `autogenerated' files (such as disklabel.*, setuid.current, ...)
in "$backup_dir/work", to minimise name clashes.
- Add migrate_file(old, new) to do the hard work of migrating files
from the old `top level' /var/backups mechanism to the `full path'
mechanism recently added. Use this appropriately.
- Add backup_and_diff(file, printdiffs), to the hard work of backing-up
and diff-ing files.
- Cleanup use of shell redirects
- /bin/sh supports ~root globbing, so use it.
- Improve umask checking; use awk regex rather than awk math
endianness as compile target. This is primarily for cross compiles.
Hopefully this method (looking into
${DESTDIR}/usr/include/machine/endian_machdep.h) is okay.
Patch sent by Andrew Brown in bin/11454.
necessary, as /etc/rc.d/sendmail will already rebuild DB files
automatically if necessary, and doing aliases.db here just
totally breaks cross-compiling.
rm complains because it can't actually nuke the mount point. Anything serious
like permissions or I/O errors will get caught in the install's after this
anyways.
consistent with what FreeBSD uses /etc/defaults for, and since SVR4
uses /etc/default for another purpose.
as discussed on tech-userlevel, and no objections were made.
set in src/etc after a "make release" in both "src" and "xsrc", to create a
ISO-image of the release in $RELEASEDIR/installation/cdrom.
Hook for architecture dependent pre/post-processing in etc/etc.*/Makefile.inc
are available as 'iso-image_md_post' and 'iso-image_md_pre', see
etc/etc.i386/Makefile.inc as an example. Might be useful for setting up
bootable CDs on alpha, sparc, ...
Reviewed by Todd Whitesel and Thomas Klausner.
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.
There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
- sendmail configuration files are in /etc/mail, not /etc.
- src/etc/aliases will be installed into /etc/mail/aliases (confusing)
- rc.d/sendmail warns if /etc/sendmail.cf exists.
This replaces the previous /etc/rc.d/sysctl. Also, the variables are now
set earlier, between ipf/ipnat and the network coming up.
The rc.conf defcorename and securelevel variables are no more. You can
set them directly in sysctl.conf now.
port-specific Makefiles can add to.
+ Separate snap_md into snap_md_pre and snap_md_post that are depended
on before and after snap_kern.
+ Build all kernels listing in ${BUILD_KERNELS}, but don't put them in
${RELEASEDIR}.
file that just does "include" GENERIC, and therefore has no "config" line.
It's simplest to assume that "netbsd" will be the result in that case.
Rather than duplicate config(8)'s parser in awk (or something), we should
adjust config to parse the config file and spit out the kernel names, and
then use that to replace this awk script thing.
kernel per config file and the resulting kernel need not be named
"netbsd"; therefore paw through the config file after the kernel
builds are done, find them all, and put them where they belong per
release(7). This all done with some clever awk/sh scripting, from
PR 7180 by David Forbes.
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.
(closed [misc/574])
- send ftp to /var/log/xferlog
- prevent anything that goes to a restricted file (e.g., /var/cron/log)
ending up in /var/log/messages
- rotate /var/lgo/secure
- install the default logs with permissions consistant with those
set by newsyslog.conf (and commonsense)