Commit Graph

285 Commits

Author SHA1 Message Date
lukem 9f5d4466a9 Always invoke mtree & pax with "-N ${NETBSDSRCDIR}/etc" so that user & group
lookups occur from there rather than from the host system.
2002-12-19 12:35:01 +00:00
jdolecek 1e127d86d1 ttyaction is ${MACHINE}-specific, not per ${MACHINE_ARCH}
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
2002-12-17 15:54:59 +00:00
lukem fe5f6ce974 - add snap_post, which makes "clean depend all release" in ../distrib/
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
2002-12-02 13:18:03 +00:00
lukem e7bf86cbd5 Separate snap_kern into three targets, to allow finer control over
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)
2002-11-18 07:09:46 +00:00
perry 59af185fe1 Add hackdir/perm and hackdir/record
move larn files into alphabetical order
2002-10-23 20:35:45 +00:00
perry e0ea033b82 add code to include (primitive) package tag names
XXX This file has gotten big and ugly enough that a bit of a rewrite
is likely in order.
2002-10-23 19:50:30 +00:00
lukem 407233e842 Set
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)
2002-10-16 02:30:48 +00:00
grant 904247526b create /etc/mail/local-host-names, required by sendmail(8). 2002-10-05 15:23:19 +00:00
perry a2bd5604f5 Make utmp and utmpx group utmp, not group wheel. This gets masked by
the fact that rc.d sets it to group utmp anyway, but it was certainly
wrong in principle.
2002-09-16 02:35:04 +00:00
perry e1fd62d224 Create wtmpx, just as wtmp is created. 2002-09-16 02:30:29 +00:00
wiz bd93d53f7c Add /var/run/utmpx, requested by soren. 2002-09-03 00:56:08 +00:00
bjh21 2e5fd793fb Set the volume ID on CDs produced my "make iso-image" to something meaningful,
rather than the default of "CDROM".  The volume ID now looks like
"NETBSD_ACORN26_16D".
2002-07-28 01:21:07 +00:00
fredette 1c928c08b2 Removed ftpwelcome from BIN1; it was removed. 2002-07-06 18:19:31 +00:00
lukem 6f9558487e use ` | ${CAT} -l >> ${METALOG} ' to serialise writes to the metalog 2002-06-11 15:50:05 +00:00
itojun dbbcec2c04 have bsd.endian.mk, which detects target endian.
generate *.db in target endian.  (see tech-userlevel for discussions)
2002-05-30 21:40:47 +00:00
itojun b837b667b8 set TARGET_ENDIANNESS appropriately. 2002-05-30 09:49:22 +00:00
jdolecek 074863cac2 Move the sample fstab files to /usr/share/examples/fstab/. Duplicates
or very similar configs removed.
2002-05-04 19:43:57 +00:00
sommerfeld 965e0acae4 Correct BUGS in BUILDING.mdoc now that most ports are USE_NEW_TOOLCHAIN
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.
2002-05-02 22:13:30 +00:00
lukem 2d1f93d643 - consistency cleanup
- ensure INSTALLATION_DIRS contains the appropriate extra directories
  for a given platform
2002-05-02 15:09:40 +00:00
lukem 8feb052770 s/_SRC_TOP_/NETBSDSRCDIR/ 2002-04-26 16:23:14 +00:00
lukem 9ada96166d install postinstall 2002-04-26 15:43:39 +00:00
lukem 46de584226 When building kernel .tgz sets, take advantage of pax's new ability to
not store optional directory entries when copying from a specfile.
2002-04-21 00:06:03 +00:00
perry 9c429c8cc6 add default passwd.conf file 2002-04-15 03:01:31 +00:00
lukem 818750e0b3 if UNPRIVED, call ${PAX} with -N ${_SRC_TOP}/etc 2002-04-10 15:12:37 +00:00
lukem cf1352743d now <bsd.kernobj.mk> defines KERNSRCDIR correctly, pull it in earlier
and clean up related goop
2002-04-10 14:57:45 +00:00
lukem fbeeec837c When building kern-*.tgz, output an mtree specfile to pipe into
${PAX} -M so that the contents get the appropriate ownership.
Fixes [toolchain/16161] from Ben Harris <bjh21@netbsd.org>
2002-04-10 12:05:20 +00:00
matt a6a8089c11 Don't install pcs750.bin in here anymore. 2002-04-09 18:07:24 +00:00
wiz f4c143690e arm32 is not a valid MACHINE_ARCH anymore. 2002-04-07 15:52:27 +00:00
bjh21 9f2fd14aea When doing a "for" loop over a potentially-empty list
(${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.
2002-04-01 17:32:19 +00:00
bjh21 3f0d7066b3 Add a MAKESUMS variable which invokes makesums with CKSUM in its environment.
Use this whenever we want to invoke makesums.
2002-03-31 16:07:53 +00:00
matt e4d7babf1f Change pcs750.bin processing so it works UNPRIVED=. XXX this needs to be
moved to someplace with an objdir.
2002-03-29 04:45:37 +00:00
lukem 4b99ad4ad4 provide check_DESTDIR and check_RELEASEDIR targets in <bsd.own.mk>
and use those rather than local versions
2002-03-05 03:51:21 +00:00
chs 4318a1a32b copy kernels to the releasedir even when KERNELS_DONE is defined
(i.e. only skip building the kernels).  fix some comments while I'm here.
2002-03-01 06:22:09 +00:00
lukem 7b1ed2d086 - add check_destdir and check_releasedir targets, and use appropriately
(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
2002-02-09 11:09:29 +00:00
lukem 6af35d5a81 - replace "tar -cf - ... | gzip -9 > foo" with "GZIP=-9 ${PAX} -zwf foo ... "
- more comment hacking
2002-01-27 06:49:22 +00:00
lukem 03a5940a64 - add the following targets to the DESTDIR=="" check:
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
2002-01-27 01:44:02 +00:00
tv a2291b79c0 MKfoo=no -> NOfoo= 2001-12-12 00:07:45 +00:00
jmc 5baaa9092b Make pwd_mkdb a conditional set so bsd.own.mk can override it 2001-12-07 02:30:22 +00:00
thorpej 8aa58740cf Add support for specifying extra kernel name suffixes to search for
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.
2001-11-30 18:50:09 +00:00
thorpej 44f4566e1a Change the way kernel sets are specified, and make them
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.
#
2001-11-29 22:45:53 +00:00
thorpej ff0f6d3aec Fix oversight in the addition of install-etc-files target; move the
.endif for DISTRIBUTION_DONE to the right place.
2001-11-25 18:19:14 +00:00
perry 33c33d421a Synthetically generate metadata entries for passwd, spwd.db, pwd.db.
XXX Note that it can easily be argued that these should be generated by
the installer, not shipped in the tar files, but that's for another day.
2001-11-24 21:41:12 +00:00
thorpej ba119b4fb0 Split the "distribution" target into "distribution" and "install-etc-files",
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".
2001-11-20 16:07:59 +00:00
perry 2d02e3afad UNPRIVILEGED->UNPRIVED 2001-11-19 05:05:06 +00:00
tv 0b5c0ba712 Make the TARGET_ENDIANNESS check only valid when making release, snapshot,
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.
2001-11-13 17:14:27 +00:00
jmc 7526979e21 Don't run rules unless DESTDIR is set *and* contains a value. Fixes PR 14410 2001-10-31 02:58:58 +00:00
perry 6476719bea Add rm's before symlink and hard link commands.
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.
2001-10-29 22:18:28 +00:00
perry 6ca8767be9 Now that it will actually work, replace instances of ln with install. 2001-10-29 01:19:19 +00:00
jmc 6d536163de Change defaults for kernel compiles. Default all to USETOOLS?=no and have
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.
2001-10-26 06:45:33 +00:00
tv 3f973487e6 Since <bsd.prog.mk> is included, we already have a full list of default
build rules for all standard targets.  Remove the manually-created list
of empty rules.
2001-10-24 02:43:13 +00:00
tv 80439f53c0 Do not run MAKEDEV on "make distribution". The device nodes are not part
of the resultant tarballs; only the MAKEDEV script itself is.  Running
MAKEDEV here can futz with cross build hosts.
2001-10-19 15:07:48 +00:00
lukem 6c2d977e6f A few more changes, from more discussions with Andrew Brown.
- 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...
2001-10-13 14:22:11 +00:00
lukem 96a1608ee4 Major overhaul, with help from Andrew Brown <atatat@netbsd.org>.
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
2001-10-12 05:18:23 +00:00
chs d15ad88d82 skip "distribution" step if DISTRIBUTION_DONE is set. 2001-10-10 06:58:56 +00:00
enami a28fcd776c Make mtree a host tool and use it when appropriate. 2001-10-09 05:19:03 +00:00
tv c4d13adb05 Append / to ${DESTDIR} in distrib-dirs rule; fixes PR bin/14080. 2001-10-04 16:46:22 +00:00
mrg 31be837848 support kernel configs called `../../sparc64/conf/GENERIC32', and the like,
by stripping the dirname off by using ${configfile:C/.*\///} where necessary.
2001-08-23 14:37:02 +00:00
matt 799202c512 Fix botched commit (a conflict was committed). 2001-08-05 03:37:37 +00:00
tsutsui e6b1a09d07 Use "mtree -U" instead of "mtree -u" on making distrib-dirs
to ignore file hierarchy unmatches and check exit status of mtree
to detect actual errors on it (like "unknown user/group" etc).
2001-08-04 18:41:18 +00:00
itojun 7759c4c1c7 do not try to install rtadvd.conf 2001-01-21 15:03:22 +00:00
christos 410cfa811a more dup target fixes... snap_md_post should be fixed in etc.i386
Makefile.inc not to work if $RELEASEDIR or $DESTDIR is not defined.
2001-01-14 06:08:24 +00:00
christos 79c236a085 protect against multiple target definition for parse_md_post 2001-01-14 05:31:36 +00:00
simonb 04935f138a Only need to "make distribution" in usr.bin/ssh once. 2001-01-09 02:13:54 +00:00
jlam 4275d75e69 Correct comment for KERNOBJDIR. 2000-12-02 18:04:45 +00:00
simonb 13e5202536 Get the TARGET_ENDIANNESS by running ${CC} -E over
<machine/endian_machdep.h>.  Fixes problems where
<machine/endian_machdep.h> just includes another file
without defining _BYTE_ORDER itself.
2000-11-30 11:31:05 +00:00
jdolecek 8b43f30672 Call pwd_mkdb with proper flag, so that it creates database in same
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.
2000-11-09 20:01:54 +00:00
thorpej a84221b9db Just nuke the "build aliases.db" stuff from here. It's not
necessary, as /etc/rc.d/sendmail will already rebuild DB files
automatically if necessary, and doing aliases.db here just
totally breaks cross-compiling.
2000-10-30 21:48:20 +00:00
jmc 52645e1ee3 Moved comment about rm out of shell command area. (typo) 2000-10-29 05:16:53 +00:00
jmc 6349db47e1 Ignore errors from the rm in snap_pre. RELEASEDIR could be a mountpoint and
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.
2000-10-23 01:50:37 +00:00
garbled b1fd9718d4 When building kernels for a release (snap_kern) use "distclean" instead of
"clean" to get rid of any .depend files that might be lying about in the
kernel build directory.
2000-10-19 17:53:41 +00:00
simonb 654fd3b749 cd to skel during "make distribution".
Part of fix for PR bin/10985.
2000-10-16 13:18:36 +00:00
hubertf 144164c6e4 Fix typo in iso-image target that led to the cdrom-directory not being
excluded in the iso image (nothing harmful).
2000-10-14 16:45:42 +00:00
thorpej bf69b1a900 Do the `distribution' target for usr.bin/ssh, too. 2000-10-01 22:31:04 +00:00
lukem b5b6e95c7b move default config files from /etc/default -> /etc/defaults, to be
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.
2000-10-01 05:49:26 +00:00
hubertf b4b75848de Add standalone "iso-image" target that can be run with DESTDIR and RELEASEDIR
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.
2000-09-11 21:53:30 +00:00
jhawk 3635b53ea7 As .ifndef RELEASEDIR checks for targets:
snap_pre snap_md_pre snap_md_post
so should .ifndef DESTDIR
2000-08-23 20:48:42 +00:00
lukem 801142dbde - install files in etc/default/
- migrate rc.wscons to (already existing) rc.d/ wscons
2000-08-21 23:03:10 +00:00
fvdl 4ed8b47725 Do not create the binary/security directory, there is no seperate
security set anymore.
2000-08-06 18:10:48 +00:00
kleink a8c7e91153 As discussed with Hubert Feyrer in private mail, install UTC as the default
time zone; while amounting to the same offset, the time zone 'name' of
Factory violates the prinicple of least surprise.
2000-08-03 13:00:02 +00:00
hubertf 343777f0d3 Change default timezone from US/Pacific to Factory:
Before:
    Wed Aug  2 06:53:04 PDT 2000

After:
    Wed Aug  2 13:52:52 Local time zone must be set--see zic manual page 2000
2000-08-02 14:40:45 +00:00
thorpej fe54e81eb3 Also do ../usr.bin/ssh for the `distribution' target. 2000-07-25 19:07:39 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
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.
2000-06-20 06:00:24 +00:00
fredb 21fcee54a9 Loosen sendmail's permission checks for building the aliases.db file
even further. Particularly, allow ${DESTDIR} to be within a world writable
directory, such as /var/tmp.
2000-06-12 06:23:21 +00:00
perry 4d477e62b7 install ttyaction if it exists 2000-06-03 23:53:17 +00:00
fvdl 02cd59a751 * Portmap is now called rpcbind.
* Add IPv6 RPC entries to inetd.conf (commented out by default, as the others)
* Add netconfig file, needed for TI-RPC code.
2000-06-02 22:54:08 +00:00
lukem 78abee064b remove netstart 2000-05-13 08:07:01 +00:00
sjg 4157176c27 Added an obj target to ensure that KERNOBJDIR exists - in case
we are using MAKEOBJDIRPREFIX.
Fixed the comment about why we grab ../Makefile.inc
2000-05-06 07:52:19 +00:00
itojun 14e9ff0043 correct typo (sendmail upgrade) 2000-05-03 11:37:16 +00:00
itojun 366bbade5a sync with sendmail upgrade.
- 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.
2000-05-03 10:55:19 +00:00
sjg 45fb67b360 remove/change missleading comments 2000-05-03 00:10:33 +00:00
sjg 734bcf16ec Use bsd.kernobj.mk
Also if KERNELS_DONE is defined skip building kernels.  Handy if re-spinning
due to errors in distrib later on.
2000-05-02 06:41:44 +00:00
thorpej 0a43d29758 Install the localhost namedb file. 2000-05-01 05:29:34 +00:00
perry 31d7194c3f Add "make distribution" for Postfix. 2000-04-30 21:45:55 +00:00
tsarna 163510ecf4 The file /etc/sysctl.conf is now run with sysctl -f at boot time.
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.
2000-04-08 23:02:53 +00:00
thorpej 47cd48f3db Use distrib/sets/Makefile in the release: and new cryptoset: targets. 2000-03-28 00:39:17 +00:00
lukem c132a440d2 install rc.d scripts 2000-03-10 11:59:35 +00:00
joda 89c2906ea5 explicitly allow writable directories when rebuilding the alias
database, otherwise this will fail if any directory in ${DESTDIR} is
g+w.
2000-03-01 16:48:35 +00:00
itojun 627898817e sync with etc/namedb change (IPv6 loopback reverse database file) 2000-03-01 11:21:13 +00:00
mycroft f4665e12b2 Install a blank sendmail.st here. 2000-02-26 18:42:31 +00:00
mycroft ad78992969 Always checksum binary/kernel, now that there is at least one file in it. 2000-02-20 03:32:37 +00:00