Commit Graph

577 Commits

Author SHA1 Message Date
Kurt Lidl
95856e1457 Add basic blacklist build support
Reviewed by:	rpaulo
Approved by:	rpaulo
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5913
2016-06-02 19:06:04 +00:00
Glen Barber
ea580d0b45 Revert r301137 and r301163, and implement a correct fix
for the CONFS issue with dma.conf and ppp.conf.

Thank you very much to Bryan Drewery for looking into the
problem and providing this fix.

Pointyhat:	gjb
Sponsored by:	The FreeBSD Foundation
2016-06-01 20:44:28 +00:00
Glen Barber
d1900df6cc Implement a hack to re-enable installation of the dma.conf.
The 'CONFS' entries in share/mk/bsd.confs.mk explicitly check
for the 'installconfig', but does not behave properly with the
'distribute' target.

This seems to be related to the previously-reported issues
with files within /etc in the past.

Reported by:	Ben Woods
Sponsored by:	The FreeBSD Foundation
2016-06-01 20:06:55 +00:00
Glen Barber
efe50fa18a Revert r289096:
Files listed in 'CONFS' are not properly included in new
installations (missing from base.txz), for reasons I still
do not fully understand.

This reverts the change excluding /etc/ppp/ppp.conf from
a new installation.  /etc/dma/dma.conf is also affected,
but requires a different solution, still being investigated.

Reported by:	Ben Woods
Sponsored by:	The FreeBSD Foundation
2016-06-01 16:45:08 +00:00
Glen Barber
b40fde96d2 Fix etcupdate(8) with rc.sendmail and devd/*. It turns out
BIN1 and such in etc/* cannot use FILESGROUPS.

Reported by:	peter
Sponsored by:	The FreeBSD Foundation
2016-04-17 03:45:45 +00:00
Glen Barber
538354481e MFH
Sponsored by:	The FreeBSD Foundation
2016-03-14 18:54:29 +00:00
Bryan Drewery
b7d28aff10 META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm
cookie behavior when a .meta file detects it needs to rebuild and fails.

Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:28 +00:00
Bryan Drewery
d5cc057985 DIRDEPS_BUILD: Fix staging of share/sendmail and share/examples.
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:45:09 +00:00
Glen Barber
9c4fa87c23 Create a package for sendmail(8).
Sponsored by:	The FreeBSD Foundation
2016-02-08 18:41:46 +00:00
Glen Barber
dd181aca6c Create a package for autofs(5)
Sponsored by:	The FreeBSD Foundation
2016-02-02 17:33:37 +00:00
Gleb Smirnoff
dc5f4fa86e Install /etc/snmpd.config with 0600 permissions.
Noticed by:	Pierre Kim
Security:	SA-16:06.snmpd
Pointy hat to:	glebius in 2005
2016-01-14 10:25:18 +00:00
Warner Losh
2db56e791f Add libsoft to the tree, just like lib32. 2016-01-03 04:32:05 +00:00
Enji Cooper
0574118ff7 Revert r290840
This request by the submitter was valid, but unfortunately there is a good deal
of concern over breakage when DESTDIR != / or "", i.e. with release media.
Making this change correct for all cases would make it markedly more complex
than need be

Requested by: bdrewery, ian, imp
PR: 76362
2015-12-01 06:22:27 +00:00
Bryan Drewery
a55fda252b Avoid FSCHG for INSTALL_AS_USER as well.
PR:		194189
X-MFC-With:	r290628
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-11-16 20:18:38 +00:00
Enji Cooper
cff0f15031 Setup the symlink to /sys to mirror one's current source, e.g. if my source
tree was /usr/src/svn, /sys would point to usr/src/svn

This fixes the assumption that the source tree will always exist at
${DESTDIR}/usr/src

MFC after: 1 week
PR: 76362
Reported by: Scot Hetzel <swhetzel@gmail.com>
Sponsored by: EMC / Isilon Storage Division
2015-11-15 03:04:39 +00:00
Brad Davis
26de3a17b7 Fix a few files that where being incorrectly installed as one file. This was caused by the nvi upgrade fallout in r281994. So add the missing directories back to the mtree and add distrib-cleanup target to retroactively remove the files that should have been directories.
Reviewed by:	bdrewery
Approved by:	bdrewery
2015-11-13 17:25:20 +00:00
Bryan Drewery
15482f3f96 Respect NO_FSCHG for extracting mtrees.
PR:		194189
X-MFC-With:	r290628
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-11-12 17:11:03 +00:00
Bryan Drewery
6662a8e56b When extracting mtrees, pass -i so schg/sappnd are respected.
This fixes /var/empty not being schg in the installation.

This was a change from fmtree to nmtree, that -i is now required to
apply these flags.

PR:		194189
Submitted by:	guyyur@gmail.com
MFC after:	2 weeks
Relnotes:	yes
2015-11-09 23:37:01 +00:00
Bryan Drewery
7d8f797b72 Use more appropriate ${SHAREDIR} rather than /usr/share.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-27 23:35:02 +00:00
Julio Merino
74c52c6526 Handle lib32 files during delete-old* when MK_LIB32=no.
Extend OptionalObsoleteFiles.inc to delete all lib32 files when MK_LIB32 is
set to no on a system that previously had lib32 libraries installed.

Also, to prevent "make delete-old-dirs" from always deleting lib32 directories
after an installworld, move the lib32 subtree to its own mtree file that only
gets applied when MK_LIB32=yes.

Test: Ran "make delete-old" and "make delete-old-libs" on a system that never
had MK_LIB32 enabled, and on a system where MK_LIB32 was enabled and later
disabled.  Did this both on amd64 and powerpc64.

Test: Ran "make tinderbox" without errors.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D3923
2015-10-20 20:35:34 +00:00
Cy Schubert
6f422073d1 Add default leap-seconds file. This should help ntp networks get the
leap second date correct

Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
ftp://tycho.usno.navy.mil/pub/ntp/.

Suggested by:	dwmalone
Reviewed by:	roberto, dwmalone, delphij
Approved by:	roberto
MFC after:	1 week
2015-10-16 14:04:16 +00:00
Ed Maste
07670b30fa Create /usr/tests *.debug file directory hierarchy
Reviewed by:	bdrewery, ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3896
2015-10-15 01:46:55 +00:00
Baptiste Daroussin
23c7816115 Move ppp.conf into the ppp sources 2015-10-09 23:57:07 +00:00
Baptiste Daroussin
855ff27c8c Move all the dma(8) components into one single directory
Simplifying maintainance and options (only one place to deal with MK_DMAGENT)

This also makes packaging base less intrusive by getting a single point where
to add tags.
2015-10-09 22:09:44 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Glen Barber
c426d0d1f7 Re-implement endian-aware services_mkdb(8) in the 'distribute'
target.  This effectively reverts r261142, which reverted both
r261031 and r261044.

Prodded by:	jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-06-04 15:02:05 +00:00
Baptiste Daroussin
1a31e4a637 After r283981 it is no more needed to specify endianness when generating the
passwd database
2015-06-04 08:05:44 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Enji Cooper
7afb8adff3 Move all test integration pieces for etc/ from etc/ to tests/
This is being done to fix breakage with make distribution with read-only
source trees as make distribution doesn't use make obj like building
tests/ does in all cases

Reported by: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
Suggested by: jhb
X-MFC with: r282059
MFC after: 1 week
2015-05-18 11:02:43 +00:00
Baptiste Daroussin
2b7dce20ad Remove now unneeded libmap32.conf 2015-05-04 16:34:08 +00:00
Andrew Turner
8c5075340f Respect DESTDIR when creating the directory structure when NO_ROOT is set.
Reviewed by:	bapt
MFC after:	1 Week
2015-04-06 08:37:40 +00:00
Ed Maste
5dd72ff561 Unconditionally install debug directory hierarchy
This avoids various failure modes (e.g., when building and installing a
single binary with debug data on a system that otherwise does not have
it enabled).

It is also consistent with the way other directory hierarchies are
handled (e.g. share/man).

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D1962
2015-02-24 19:27:51 +00:00
Enji Cooper
f515b5988f Honor the following flags for items that can be conditionalized out of the
build/install without disrupting other dependent services (see r278249, et
al):

- MK_LOCATE
- MK_MAN
- MK_NLS
- MK_OPENSSL
- MK_PKGBOOTSTRAP
- MK_SENDMAIL

Additional flags need to be handled in etc/Makefile, but it requires
refactoring the relevant scripts in etc/rc.d/*

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2015-02-05 11:42:59 +00:00
Enji Cooper
11981695fc Add the following options to enable/disable several features in the base system
WITHOUT_BOOTPARAMD - bootparamd
WITHOUT_BOOTPD - bootpd
WITHOUT_FINGER - finger, fingerd
WITHOUT_FTP - ftp, ftpd
WITHOUT_INETD - inetd
WITHOUT_RBOOTD - rbootd
WITHOUT_TCP_WRAPPERS - tcpd, et al
WITHOUT_TFTP - tftp, tftp-server
WITHOUT_TIMED - timed

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-02-04 10:19:32 +00:00
Enji Cooper
b359042310 Add MK_AUTOFS knob for building and installing autofs(4), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 07:15:49 +00:00
Enji Cooper
5e49723127 Add sample log rotation support for opensm
Up to 7 archives of the log will be kept (just for consistency with the other
log rotation rules)

PR: 196788
MFC after: 1 week
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division
2015-01-22 23:50:47 +00:00
Enji Cooper
f703589ef4 Fix building/installing tests when TESTSBASE != /usr/tests
The work in r258233 hardcoded the assumption that tests was the last component
of the tests tree by pushing tests as an explicit prefix for the paths in
BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all
of the mtree calls used in Makefile.inc1. This assumption breaks if/when one
provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests .

One thing that r258233 did properly though was remove "/usr/tests" creation
from BSD.usr.dist -- that should have not been there in the first place. That
was an "oops" on my part for the work that was originally committed in r241823

MFC after: 2 weeks
Phabric: D1301
Reviewed by: imp
Sponsored by: EMC / Isilon Storage Division
2014-12-18 18:16:00 +00:00
Enji Cooper
dfdf74ea7e Revert r275270
MK_MAIL applies to MK_SENDMAIL and a number of other knobs. r275270 incorrectly
applied it to only MK_SENDMAIL
2014-11-29 22:31:19 +00:00
Enji Cooper
e42bedb82e etc/mail actually applies to MK_SENDMAIL, not MK_MAIL 2014-11-29 22:26:35 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Edward Tomasz Napierala
3914ddf8a7 Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-17 09:44:42 +00:00
Gavin Atkinson
c67bc4dbda Remove send-pr, the supported interface to submit bugs is now via
https://bugs.freebsd.org/submit/

Removing send-pr also removes one more piece of non-BSD-licensed software.

Hat:		bugmeister
MFC after:	3 days
2014-06-14 20:36:32 +00:00
Julio Merino
e8a34402f2 Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install it.

To make this possible, we need two fixes:
- bsd.subdir.mk needs to properly honor NO_SUBDIR in all cases so that we
  do not recurse into 'tests' subdirectories when we needn't.  Otherwise,
  we end up with some Kyuafiles in base.txz.
- etc/Makefile needs to skip installing tests in its 'distribute' target
  so that a Kyuafile doesn't leak into base.txz.

Approved by:	gjb
2014-06-10 17:04:30 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
63efcf90b9 There is no guarantee that our group has a name.
Since the results are temp, just subst [gu]name for [gu]id

Reviewed by: obrien
2014-05-02 00:45:30 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Julio Merino
38f0b757fd Add placeholder Kyuafiles for various top-level hierarchies.
This change adds tests/ directories in the source tree to create various
subdirectories in /usr/tests/ and to install placeholder Kyuafiles for
them.

the relevant hierarchies are: cddl, etc, games, gnu and secure.

The reason for this is to simplify the addition of new test programs for
utilities or libraries under any of these directories.  Doing so on a
case by case basis is unnecessary and is quite an obscure process.
2014-04-21 21:39:25 +00:00
Bryan Drewery
eed74b2360 Always install pkg.conf. Don't depend on MK_PKGBOOTSTRAP.
This file is used by pkg(8) from ports as well. Someone may
choose to not install pkg(7) but still want to consume
official packages by building or installing pkg(8) manually.

Discussed with:	bapt
MFC after:	1 day (Working on EN)
2014-04-13 20:21:56 +00:00
Baptiste Daroussin
6a54f620e5 Rename WITHOUT_DMA into WITHOUT_DMAGENT to avoid confusion
Requested by:	ian
2014-02-22 13:05:23 +00:00
Baptiste Daroussin
a1bf0ec834 Install a default configuration file for dma
Suggested by:	flo
2014-02-21 21:02:19 +00:00
Glen Barber
b3f2918a25 Temporarily turn off the services.db generation during distributeworld.
I'll work on an update to test for endianness-compatibility.

Submitted by:	many
Sponsored by:	The FreeBSD Foundation
2014-01-25 00:03:33 +00:00
Glen Barber
8fcaeb45bb Disable output about duplicate services, which were not output during
testing.

MFC after:	1 month
X-MFC-After:	r261031
Sponsored by:	The FreeBSD Foundation
2014-01-22 23:00:29 +00:00
John Baldwin
385d6d4738 Generate /var/db/services.db during 'make distribution' so that it is
present during new installs.  Update etcupdate and mergemaster to
ignore the generated file.

Tested by:	gjb (release build)
MFC after:	1 month
2014-01-22 16:59:53 +00:00
Pawel Jakub Dawidek
42a8595256 Please welcome casperd daemon. It (and its services) will be responsible for
giving access to functionality that is not available in capability mode
sandbox. The functionality can be precisely restricted.

Start with the following services:
- system.dns - provides API compatible to:
	- gethostbyname(3),
	- gethostbyname2(3),
	- gethostbyaddr(3),
	- getaddrinfo(3),
	- getnameinfo(3),
- system.grp - provides getgrent(3)-compatible API,
- system.pwd - provides getpwent(3)-compatible API,
- system.random - allows to obtain entropy from /dev/random,
- system.sysctl - provides sysctlbyname(3-compatible API.

Sponsored by:	The FreeBSD Foundation
2013-12-02 08:21:28 +00:00
Julio Merino
5efcd27a34 Move all atf directories to the tests mtree.
This is to ensure that test-related directories don't get needlessly
created (and later deleted) when MK_TESTS=no.

Problem found by jhb@.

Approved by:	rpaulo (mentor)
2013-11-16 19:42:40 +00:00
Bryan Drewery
8d20be1e22 Move /etc/keys to /usr/share/keys where users are less likely to modify them.
Requested by:	secteam (cperciva, des)
Approved by:	bapt
2013-10-29 15:07:54 +00:00
Bryan Drewery
24a2212906 Add infrastructure for installing pkg(8) keys into /etc/keys/pkg and add
the current test key that packages will be signed with until 10.0-RELEASE.

Approved by:	bapt
Discussed by:	bapt with des
MFC after:	2 days
2013-10-26 03:53:24 +00:00
Bryan Drewery
bc5e9ac08d Add support for reading configuration files from /etc/pkg.
For now only /etc/pkg/FreeBSD.conf is supported. Its style is:

Repo: {
   URL: "...",
   MIRROR_TYPE: "...",
   ...
}

The configuration will be read from /usr/local/etc/pkg.conf if exists,
otherwise /etc/pkg/FreeBSD.conf

Approved by:	bapt
MFC after: 	2 days
2013-10-26 03:31:05 +00:00
Rui Paulo
e2197f8018 Set up the /usr/tests hierarchy.
Populate /usr/tests with the only test programs that currently live
in the tree (those in lib/libcrypt/tests/) and add all the build
machinery to accompany this change.

In particular:

- Add a WITHOUT_TESTS variable that users can define to request that
  no tests be put in /usr/tests.
- Add a top-level Kyuafile for /usr/tests and a way to create similar
  Kyuafiles in top-level subdirectories.
- Add a BSD.tests.dist file to define the directory layout of
  /usr/tests.

Submitted by:	Julio Merino jmmv google.com
Reviewed by:	sjg
MFC after:	2 weeks
2013-10-25 05:25:19 +00:00
Simon J. Gerraty
1991e07af8 Fix botched sed script 2013-10-21 18:47:29 +00:00
Simon J. Gerraty
e8f617fd36 We use distrib-dirs to populate stage tree.
But that depends on up-to-date passwd and group files in /etc.
If MK_INSTALL_AS_USER==yes and we are not root, filter the mtree input
to avoid problems with [gu]name and [gu]id settings.
2013-10-16 16:03:01 +00:00
Rui Paulo
ec0e2ac611 Remove most of the ATF tools and the _atf user.
This is necessary because ATF is deprecated and it will be replaced by Kyua.

Submitted by:	jmmv@netbsd.org
Reviewed by:	Garrett Cooper
Approved by:	re
2013-10-12 06:06:53 +00:00
Dag-Erling Smørgrav
56b72efe82 Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
Dag-Erling Smørgrav
63d39bea23 Replace the unused /etc/unbound directory with a symlink to /var/unbound.
Approved by:	re (blanket)
2013-09-24 10:04:51 +00:00
Dag-Erling Smørgrav
d7510453f3 The correct variable is apparently MACHINE_ARCH, not TARGET_ARCH.
Approved by:	re (blanket)
2013-09-09 17:38:02 +00:00
Dag-Erling Smørgrav
924eb7812b Remove unneeded mappings from libmap32.conf. Move it up one level and
install it on powerpc64 in addition to amd64.

Reviewed by:	kib
Approved by:	re (blanket)
2013-09-09 06:02:30 +00:00
Dag-Erling Smørgrav
773eec475a Add a stock libmap32.conf for amd64. The first two lines have no effect
except to document the hardcoded standard library search path for 32-bit
binaries.  The third line performs the equivalent substitution for the
private library directory.

Ironically, these entries rely on functionality which is only available
in the COMPAT_32BIT version of rtld-elf.

Approved by:	re (blanket)
2013-09-08 09:46:22 +00:00
Jeremie Le Hen
4b00159792 Include /usr/local/etc/libmap.d/ by default.
PR:		180568
Reviewed by:	bapt
Obtained from:	kib
MFC after:	3 days
2013-08-01 05:50:42 +00:00
Ed Maste
42f8c5b580 Add a new knob WITH_DEBUG_FILES to control the building of standalone
debug files for userland programs and libraries.  The "-g" debug flag
is automatically applied when WITH_DEBUG_FILES is set.

The debug files are now named ${prog}.debug and ${shlib}.debug for
consistency with other systems and documentation.  In addition they are
installed under /usr/lib/debug, to simplify the process of installing
them if needed after a crash.  Users of bsd.{prog,lib}.mk outside of the
base system place the standalone debug files in a .debug subdirectory.
GDB automatically searches both of these directories for standalone
debug files.

Thanks to everyone who contributed changes, review, and testing during
development.
2013-06-07 21:40:02 +00:00
Brooks Davis
8dccfa7cab Make an attempt to detect missing MTREE files in distrib-dirs. Not
perfect, but this is just a developer seatbelt.

PR:		conf/176897
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
MFC after:	1 week
2013-04-30 19:26:44 +00:00
Andrey A. Chernov
69b23515b5 Back out prev. change preventing /sys/sys symlink. It appears my install
was not very recent and not acts like 'ln -h'
2013-02-22 19:57:18 +00:00
Andrey A. Chernov
312c5e1aeb In 'make hierarchy' don't install /sys/sys pointing to usr/src/sys
but just /sys pointing there
2013-02-17 13:06:59 +00:00
Brooks Davis
8caedc2a57 When adding the directory ownership to the METALOG do it by name rather
than number as is done in install so as to differ binding of names to
ids.

Remove the -W flag from the mtree command so that the correct user and
group is recorded rather than the default.
2013-01-30 17:39:43 +00:00
Brooks Davis
64dc091fdd Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
Make cat a bootstrap tool to facilitate this.
2013-01-29 22:17:58 +00:00
Brooks Davis
4a63ae1150 Introduce a new option -DNO_ROOT that allows install and distribution
targets to be run without root privilege.

Information about ownership, group, flags, and suid bits are stored in
the file specified by METALOG which defaults to ${DESTDIR}/METALOG.
This file can be used in conjunction with bsdtar or makefs to generate
archives or file system images with correct permissions.

The packageworld target has been altered to use this metadata allowing
non-root releases (subject to further changes in release/Makefile.)

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray
2013-01-22 21:10:03 +00:00
Brooks Davis
12dd8cb14c Replace all known uses of ln in the build process with appropriate
install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
variables.

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray, rpaulo
2013-01-21 22:40:39 +00:00
Brooks Davis
dbc6339b41 In r245571, "rm -rf <foo>; ln -s <bar> <foo>" needed to be replaced with
"ln -sfh <bar> <foo>" or the links would fail when a valid link to a
directly was in place at <foo>.

Reported by:	peter
Tested by:	peter
Pointy hat to:	brooks
2013-01-17 23:05:03 +00:00
Brooks Davis
62bc689aa6 In preparation for logging metadata about each filesystem object
refactor the link section of distrib-dirs to alwasy install to a full
path (the link contents remain relative as they should).

Eliminate the use of the "rm -r[f] <foo>; ln -s <bar> <foo>" pattern in
favor of "ln -sf <bar> <foo>".  None of these links could be directories
on a system installed in the last decade.

Sponsored by:	DARPA, AFRL
Reviewed by:	mtree
2013-01-17 20:21:30 +00:00
Brooks Davis
75534bda19 Rework the mtree portion of etc/Makefile's distrib-dirs target to run
mtree in a shell loop so there is only one mtree commandline.  Move the
implementation of LOCAL_MTREE into etc/Makefile.

Sponsored by:	DARPA, AFRL
Reviewed by:	mtree :)
2013-01-17 18:32:30 +00:00
Brooks Davis
41a8e2231d Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing.  This allows things like running installworld for 10-CURRENT
on a 9.0-RELEASE system without adding extra users and groups to the
passwd and group files.

To prevent potentially risky uid/gid mismatches on systems with
non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
set.

Sponsored by:	DARPA, AFRL
Reviewed by:	peter
2013-01-15 00:12:34 +00:00
Brooks Davis
0fc1aae5e2 Revert r245316. Systems with non-standard uids/gids are more prevalent
that I'd feared.  Discussion is ongoing about the scope of a safer
solution.
2013-01-11 23:44:35 +00:00
Brooks Davis
7ee2bf94f7 Use the -N option to install and nmtree to eliminate the need for the
checks for missing users and groups.

Sponsored by:	DARPA, AFRL
2013-01-11 23:08:19 +00:00
Eitan Adler
7ccabb05a7 Using set -x produces output on stderr instead of stdout.
It also doesn't work with make -s.
Prefer the use of builtin make features.

PR:		misc/126312
Reported by:	Nejc Skoberne <nejc@skoberne.net>
Submitted by:	bdrewery
Approved by:	cperciva
MFC after:	1 week
2012-11-15 20:37:38 +00:00
Marcel Moolenaar
c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Dag-Erling Smørgrav
7c5a921699 Finally nuke auth.conf, nine years after it was deprecated. The only
thing it was still used for was to set the "global default" password
hash.  Since the stock auth.conf contained nothing but comments, the
global default was actually the first algorithm in crypt(3)'s list,
which happens to be DES; I take the fact that nobody noticed as proof
that it was not used outside of crypt(3).

The only other use in our tree was in the Kerberos support code in
in tinyware's passwd(1).  I removed that code in an earlier commit;
it would not have compiled anyway, as it only supported Kerberos IV.

The auth_getval() function is now a stub that always returns NULL,
which has the same effect as a functional auth_getval() with an
empty auth.conf.

MFC after:	3 weeks
2012-06-12 17:02:53 +00:00
Eitan Adler
f85a4a2977 Style: prefer the use of line continuations to +=
Requested by:	marcel, dougb, bde
Approved by:	cperciva
MFC after:	3 days
2012-02-17 01:21:08 +00:00
Eitan Adler
b169a33235 Make etc/Makefile more conflict resistant
PR:		conf/163789
Submitted by:	gcooper (iXsystems)
Approved by:	cperciva
MFC after:	3 days
2012-02-09 20:44:20 +00:00
Doug Barton
4116c8e738 Revert r224760, and enhance the sed patterns from r224659 to comment out
the _compat entries in the WITHOUT_NIS case rather then delete them.

Approved by:	re (kib)
2011-08-10 20:52:02 +00:00
Doug Barton
c2aedca43b Rather than edit the nsswitch.conf file based on ${MK_NIS} == "no"
comment out the NIS _compat options by default, but leave them in
the file for the convenience of users who want to enable it.

Update the comment in the file accordingly.

Reviewed by:	ed
Approved by:	re (hrs)
2011-08-06 09:16:53 +00:00
Ed Schouten
b41afd430d Remove NIS entries from /etc/nsswitch.conf for WITHOUT_NIS.
We already modify various configuration files in /etc based on build
configuration. This is not done for nsswitch.conf right now when setting
WITHOUT_NIS. This breaks various utilities, including crond, that depend
on working databases.

Approved by:	re (kib)
MFC after:	1 month
2011-08-05 17:33:12 +00:00
Ulrich Spörlein
423102c6fa Flesh out WITHOUT_GROFF support to DTRT.
A full featured groff is required during buildworld, so build it always
and don't rely on it being present on the host system.

vgrind(1) is tightly coupled to a roff processor and will not be
built/installed when groff is disabled. Also much of the roff'ed
documentation under share/doc will not be built/installed when
WITHOUT_GROFF is defined.

Reviewed by:	ru (partial)
2011-02-22 08:13:49 +00:00
Gordon Tetlow
42e2c9f18f No longer install /etc/manpath.config since the BSDL man utilities
don't use it.

Approved by:	wes (mentor)
2010-10-04 01:07:04 +00:00
Andriy Gapon
ac79617984 device.hints: do install when WITHOUT_BOOT is set
Discussed with:	imp
MFC after:	2 weeks
2010-06-16 07:52:44 +00:00
Warner Losh
f62a0233c8 Merge from tbemd, with minor tweaks:
Search from most specific ($MACHINE) to least specific
($MACHINE_CPUARCH) when looking for the tty file to use.  Also add an
.error case if none exist.
2010-06-13 16:35:20 +00:00
Jung-uk Kim
07e547fe26 Add a new build option, MAN_UTILS. This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.  This patch
is slightly improved by me from:

PR:		misc/145212
2010-05-19 23:56:26 +00:00
Ed Schouten
799c1824b1 Slightly improve my previous commit.
Just comment out the atrun line instead of completely removing it. It is
not a bad idea to leave it as a reference in case someone decides to
install atrun by hand afterwards.
2010-03-19 15:53:02 +00:00
Ed Schouten
5743a283c2 Don't add the atrun-line to the crontab when MK_AT is set.
This prevents spurious calls to sendmail every 5 minutes.

MFC after:	1 week
2010-03-19 11:59:02 +00:00
Ed Schouten
52a7be6c43 Install termcap.small.
Right now we have a termcap.small in the tree, but we don't install it.
If we do install this file by default, it is more likely for
applications to work in single user mode.

I am not entirely happy with the contents of this file. In my opinion we
should remove the `dosansi', `pc' and `pc3' entries and replace them
with `vt100' in case someone uses a serial console.

The file does already have entries for `cons25' and `xterm', which is
used most often.

Requested by:	brucec
2010-03-07 08:30:21 +00:00
Hajimu UMEMOTO
2bba0e1a00 Unify rc.firewall and rc.firewall6, and obsolete rc.firewall6
and rc.d/ip6fw.

Reviewed by:	dougb, jhb
MFC after:	1 month
2009-12-02 15:05:26 +00:00
Ed Schouten
d29a98f47f Split up etc.i386/ttys into a PC98 version as well.
This means I can now convert syscons on i386 to xterm as well.

Discussed with:	nyan
2009-11-13 11:26:44 +00:00
Florent Thoumie
b7f0127e7b - Remove BSD.{x11,x11-4}.dist as we merged prefixes a while ago and those
files aren't used anymore.
- Remove BSD.local.dist as the file moved to ports/Templates when we merged
prefixes.
2009-09-02 14:54:47 +00:00
Edwin Groothuis
e530f4b50d Welcome to a default installed /etc/ntp.conf
This NTP configuration file points to the [012].pool.ntp.org servers,
which will return a list of geographical local NTP servers.
It uses the best-practice options of "iburst" and "maxpoll 9".
It gives examples on how to use the "restrict" commands, which are
unfortunately not working when you use the pool.ntp.org servers.
It sets up a fudge server so any clients syncing against this server
will always be synced even if we lose the master.

The idea of this file was briefly discussed on -net.

PR:		conf/58595
Submitted by:	Chris Stenton <jacs@gnome.co.uk>
MFC after:	1 week
2009-06-07 13:26:57 +00:00
Andrew Thompson
487f6bb895 Add /etc/devd/ and move hardware specific configuration there. This makes it
easier to maintain custom rules for non-system things like ACPI hotkeys.

/etc/devd.conf is already set up to check this directory, no change needed there.
2008-12-17 19:12:30 +00:00
Mark Peek
3f2459c989 Explicitly set the shell to /bin/sh when MK_TCSH == no.
Not objected to by:	sam
2008-10-29 18:46:47 +00:00
Sam Leffler
5b6f501657 o fix MK_TCSH == no: the default master.passwd sets up root to use /bin/csh
but there won't be one so root won't be able to login; edit the installed
  file to use /bin/sh in this case.
o while here split csh-related files apart from sh and only install them
  when requested
2008-10-27 16:13:28 +00:00
Dag-Erling Smørgrav
0a25b2e007 Create separate cat directories for en.UTF-8. This, together with r183697,
allows users in en.UTF-8 locales to see non-ascii characters in man pages.

MFC after:	1 week
2008-10-08 13:28:02 +00:00
Sam Leffler
e8d1aafbed add back regdomain.xml
Noticed by:	jhay
2008-09-22 15:37:47 +00:00
Sam Leffler
690f477d75 add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by:	various (posted to arch)
MFC after:	1 month
2008-09-21 22:02:26 +00:00
Bjoern A. Zeeb
2e598474fa Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.

This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation

Discussed with: rwatson, re
2008-05-26 10:40:09 +00:00
Sam Leffler
67591c284e 802.11 regulatory definitions used by ifconfig
Support by:	Hobnob
2008-04-20 20:37:02 +00:00
Brooks Davis
ae2edb2af1 Use the new command file feature of ddb(8) to support setting ddb(4)
scripts at boot.  This is currently disabled by default. /etc/ddb.conf
contains some potentially reasonable default scripts.

PR:		conf/119995
Submitted by:	Scot Hetzel <swhetzel at gmail dot com> (Earlier version)
X-MFC after:	textdumps
2008-03-05 18:32:58 +00:00
Max Laier
42a227f8ba Update pf examples from OpenBSD to catch up with new stateful defaults and
other syntax changes.  Move pf.conf from /etc to examples, too.
2007-11-11 01:16:51 +00:00
Yaroslav Tykhiy
e0cb3d9c5c Add support for `make -nn' dry runs to this makefile. Basically,
it's just a matter of adding a `${_+_}' prefix before each submake
invokation.  This allows a dry run to proceed down to, but not
including, leaf commands.  (See <sys.mk> for how ${_+_} is set
depending on the number of -n flags.)
2007-10-29 07:37:08 +00:00
Michael Bushkov
0f3c4f0fac Forced commit to note cached.conf -> nscd.conf repocopy. etc/Makefile
changed accordingly.

Approved by:	brooks (mentor)
2007-10-18 08:26:20 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00
Alexander Leidinger
99f6b270e3 Import OpenBSD's sysctl hardware sensors framework.
This commit includes the following core components:

 * sample configuration file for sensorsd
 * rc(8) script and glue code for sensorsd(8)
 * sysctl(3) doc fixes for CTL_HW tree
 * sysctl(3) documentation for hardware sensors
 * sysctl(8) documentation for hardware sensors
 * support for the sensor structure for sysctl(8)
 * rc.conf(5) documentation for starting sensorsd(8)
 * sensor_attach(9) et al documentation
 * /sys/kern/kern_sensors.c
   o sensor_attach(9) API for drivers to register ksensors
   o sensor_task_register(9) API for the update task
   o sysctl(3) glue code
   o hw.sensors shadow tree for sysctl(8) internal magic
 * <sys/sensors.h>
 * HW_SENSORS definition for <sys/sysctl.h>
 * sensors display for systat(1), including documentation
 * sensorsd(8) and all applicable documentation

The userland part of the framework is entirely source-code
compatible with OpenBSD 4.1, 4.2 and  -current as of today.

All sensor readings can be viewed with `sysctl hw.sensors`,
monitored in semi-realtime with `systat -sensors` and also
logged with `sensorsd`.

Submitted by:	Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by:	Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by:	syrinx
Tested by:	many
OKed by:	kensmith
Obtained from:	OpenBSD (parts)
2007-10-14 10:45:31 +00:00
Warner Losh
b906fea63d Arm doesn't have GENERIC.hints, so don't install it if it doesn't exist.
Approved by: re (kensmith)
2007-07-13 14:28:10 +00:00
Doug Barton
bc998fd6f4 Add a namedb/master directory for the zone files I'm about to add,
and switch to the more "normal" way of installing files for the
namedb directory so that we can pick up the new subdir.
2007-06-18 05:44:38 +00:00
Paolo Pisati
be4f3cd0d9 Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:

-made libalias modular:

 -support for 'particular' protocols (like ftp/irc/etcetc) is no more
  hardcoded inside libalias, but it's available through external
  modules loadable at runtime

 -modules are available both in kernel (/boot/kernel/alias_*.ko) and
  user land (/lib/libalias_*)

 -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
  skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru
2006-09-26 23:26:53 +00:00
Colin Percival
48ffe56ac5 Add FreeBSD Update 2.0 client code. The build code is in the projects
repository.

Sponsored by:	FreeBSD security development fundraiser
2006-08-31 09:51:34 +00:00
Hajimu UMEMOTO
321000dda1 Install /etc/nsswitch.conf statically rather than generating it at
boot.  Autogeneration of nsswitch.conf doesn't makes sense in 7.0
since it's not permitted to upgrade from a pre-nss release without
passing through an intermediate release.

Suggested by:	brooks
2006-05-03 15:14:47 +00:00
Hajimu UMEMOTO
06a99fe36f - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Ruslan Ermilov
3c0aeb7618 Fix "make distribution" when just NO_CRYPT is defined.
PR:		misc/94309
Submitted by:	Matthias Lederhofer
MFC after:	3 days
2006-03-11 08:51:16 +00:00
Robert Watson
7db952b8b5 Install audit_control and audit_user, both of which are likely to be
modified by the administrator, as user-writable instead of read-only.

Obtained from:	TrustedBSD Project
2006-02-12 13:01:39 +00:00
Robert Watson
28024c0c6b Install /etc/security configuration files from OpenBSM.
Obtained from:	TrustedBSD Project
2006-02-02 10:03:43 +00:00
Doug Rabson
c0b9f4fe65 Add a new extensible GSS-API layer which can support GSS-API plugins,
similar the the Solaris implementation. Repackage the krb5 GSS mechanism
as a plugin library for the new implementation. This also includes a
comprehensive set of manpages for the GSS-API functions with text mostly
taken from the RFC.

Reviewed by: Love Hörnquist Åstrand <lha@it.su.se>, ru (build system), des (openssh parts)
2005-12-29 14:40:22 +00:00
Ian Dowse
2e46a159cc Remove usbd(8) and all references to it. It is no longer necessary
since devd(8) now provides the same functionality.

Submitted by:	Anish Mistry
2005-12-15 01:04:51 +00:00
Ruslan Ermilov
ebd3cef10b Diff reduction to RELENG_6. 2005-11-16 07:24:31 +00:00
Warner Losh
652729a4d5 Allow one to override the endian flags for make distribution. This
can be useful for when you know that you are doing something that
won't work with the standard settings and different settings are more
appropriate.
	This allows 5.3 tools to build a 6.x userland when these
	values are set to null.
2005-08-26 18:54:06 +00:00
Colin Percival
6fb01948ee Add portsnap to the base system. This is a secure, easy to use,
fast, lightweight, and generally good way for users to keep their
ports trees up to date.

This is version 0.9.4 from the ports tree (sysutils/portsnap) with
the following changes:
1. The experimental pipelined http code is enabled.  No seatbelts
in -CURRENT. (^_^)
2. The working directory has moved from /usr/local/portsnap to
/var/db/portsnap (as discussed on -arch two days ago).
3. Portsnap now fetches a list of mirrors (distributed as DNS SRV
records) and selects one randomly.  This should help to avoid the
uneven loading which plagues the cvsup mirror network.
4. The license is now 2-clause BSD instead of 3-clause BSD.
5. Various incidental changes to make portsnap fit into the base
system's build mechanics.

X-MFC-After:    6.0-RELEASE
X-MFC-Before:   5.5-RELEASE
X-MFC-To:       RELENG_6, RELENG_5, ports
discussed on:   -arch and several other places
"yes please" from:      simon, remko, flz, Diane Bruce
thinks this is a great idea:    bsdimp
Hopes he didn't forget any files:       cperciva
2005-08-08 20:10:06 +00:00
Ruslan Ermilov
1ede9a7d0e Require that DESTDIR be set before running "make distribution". 2005-07-22 10:35:35 +00:00
Ruslan Ermilov
6537491231 Pass -i to pwd_mkdb(8) to ignore locking failures. This can be useful
for NFS installing world/kernel to another machine.
2005-07-15 14:52:29 +00:00
Brooks Davis
2af94c5d1d To allow /etc to be as minimal as possible in a diskless setup, we need
to run initdiskless before we run rcorder on /etc/rc.d.  To allow this,
move /etc/rc.d/initdiskless to /etc/rc.initdiskless and run it directly
from /etc/rc.

Remove /etc/rc.d/preseedrandom as it is no longer necessicary (we start
with entropy unblocked) and was only used by initdiskless when it
was needed.

Discussed on:	freebsd-rc
Repocopy by:	peter
2005-04-29 23:02:56 +00:00
Gleb Smirnoff
8d6e44f80f Add startup script and default configuration file for bsnmpd.
Reviewed by:	harti
2005-04-17 10:47:58 +00:00
Brooks Davis
04198d1800 Remove a number of entries from the distribution target that are
automaticly created at boot.  There's no need to maintain a list of
files and permissions in multiple places.  This also means binary
updates won't stomp on log files.

For the record, utmp is created in etc/rc.d/cleanvar, wtmp and lastlog
in etc/rc.d/var, and the reset via etc/rc.d/newsyslog.
2005-03-02 00:44:39 +00:00
Tom Rhodes
81e03d8868 Add rc.bsdextended. It's been tested enough. 2005-03-01 03:59:24 +00:00
Ruslan Ermilov
0c5397aa69 Bootstrap pwd_mkdb(8) and use its new feature during "make distribute". 2005-02-28 22:55:43 +00:00
Ruslan Ermilov
80f64943ba Step 1/2 of making "make distribute" work for cross-builds. 2005-02-28 14:16:53 +00:00
Ruslan Ermilov
a216173556 NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Doug Barton
b04e39c493 1. Incorporate most of Ruslan's improvements to where and how the
/etc/namedb symlink is created.

2. Incorporate Brian's suggestion to make the link relative. This
is necessary to handle situations (such as mergemaster) where the
user is building a tree in a seperate environment. This will also
fix the problem with the way DESTDIR is set in 'make release'.

3. Add a new knob, NO_BIND_MTREE, as suggested by the folks who
already have stuff in /var/named that they don't want me to mess with.

4. Update make.conf(5) with the new stuff, and correct a few paths
that have changed since I last updated it.
2004-10-08 00:14:28 +00:00
Ruslan Ermilov
46c63c1d76 Fixed symlinking of /etc/namedb.
Reported by:	Jeremy Chadwick
2004-10-05 13:03:08 +00:00
Doug Barton
bb3b2b373a Install namedb stuff to ${DESTDIR}/var/named/etc/namedb instead
of relying on the symlink in ${DESTDIR}/etc/namedb.

This is functionally equivalent, but doesn't rely on the symlink to work.

Requested by:	ru
2004-09-30 10:24:24 +00:00
Ruslan Ermilov
587ca40507 Fixed symlinking /var/named/etc/namedb to /etc/namedb.
A second "make distrib-dirs" createed a symlink in /var/namedb/etc/namedb.
A third "make distrib-dirs" failed.
2004-09-29 06:54:18 +00:00
Doug Barton
8f1bb3891d Create a named chroot directory structure in /var/named, and use it
by default when named is enabled. Also, improve our default directory
layout by creating /var/named/etc/namedb/{master|slave} directories,
and use the former for the generated localhost* files.

Rather than using pax to copy device entries, mount devfs in the
chroot directory.

There may be some corner cases where things need to be adjusted,
but overall this structure has been well tested on a production
network, and should serve the needs of the vast majority of users.

UPDATING has instructions on how to do the conversion for those
with existing configurations.
2004-09-28 09:46:00 +00:00
Doug Barton
2a61444749 1. Add much finer granularity to the NO_BIND knobs with the addition of:
NO_BIND_DNSSEC, NO_BIND_ETC, NO_BIND_NAMED, and NO_BIND_UTILS.

2. Make creation of directories in /usr/include that are only needed
in the WITH_BIND_LIBS case conditional.

Reviewed by:	ru, des
2004-09-27 08:23:43 +00:00
Dag-Erling Smørgrav
8dee269791 Reconnect namedb. While it may not be optimal, our old named.conf from
BIND 8 is quite usable for BIND 9.
2004-09-24 16:13:55 +00:00