Commit Graph

6407 Commits

Author SHA1 Message Date
lukem 8233be784c support MAKEVERBOSE 2003-10-19 06:12:07 +00:00
lukem a414e34de5 support MAKEVERBOSE and use ${HOST_SH} 2003-10-19 06:11:38 +00:00
lukem 6672bff7fc rework how cfparse.y is generated 2003-10-19 06:09:17 +00:00
lukem eae82b3d06 #define _PATH_BIN_RCMD in common_source/pathnames.h rather than using
wacky Makefile rules to compile rcmd.c
2003-10-19 05:51:44 +00:00
lukem 8545f3b03c Switch back to using YHEADER instead of custom yacc rules.
We use build.sh to support hosting on older NetBSD releases...
2003-10-19 05:30:30 +00:00
lukem fdffaa3fe5 Implement -r, which prevents syslogd from compressing multiple messages with
the same string into "last message repeated N times", and instead forces
syslogd to write out every message.

Based on '-c' in FreeBSD's syslogd, although a different option letter was
chosen because their syslogd requires '-c -c' to get this functionality,
and we don't have the support for logging to pipes which is what FreeBSD's
syslogd with a single '-c' is related to.
2003-10-17 01:39:25 +00:00
itojun 686afb7f65 safer use of realloc 2003-10-16 06:22:09 +00:00
itojun 33c55cb2ac make use of realloc(3) safe 2003-10-16 06:19:11 +00:00
itojun a038ecb5ba poll() argument mistake. Tatoku Ogaito 2003-10-16 05:25:51 +00:00
itojun 94a111ae53 safer realloc.
sizeof() for malloc was mistaken in socksetup().
2003-10-16 03:03:04 +00:00
tron d6dfcb09dd Don't try to compile "vprintf.c" because NetBSD has all the functions
defined there.
2003-10-14 11:49:52 +00:00
lukem 10e10fae7e Instead of requiring that the BPB is always the FAT32 one, check the
first three bytes to determine how much of the BPB to preserve.
Supported values:
	eb 3c 90        FAT16 BPB
	eb 58 90        FAT32 BPB
	(anything else)	don't preserve any BPB

This is because the BPB is generally only the FAT16 one except in the
bootxx_msdos case, where it's the larger FAT32 one.
2003-10-14 09:46:43 +00:00
agc 9f1aac5bb3 Move Jason Downs's code from a 4-clause to a 3-clause licence by
removing the advertising clause.  Diffs provided in PR 22410 by Joel
Baker, confirmed to the board by Jason Downs.

With additional thanks to Jason Thorpe.
2003-10-13 15:36:33 +00:00
dyoung 690ab87058 Use new 802.11 header files. 2003-10-13 08:02:02 +00:00
itojun 912235966a makeargv overrun. from openbsd 2003-10-13 06:14:04 +00:00
dsl d597578896 Include filename in:
'existing entry for `sha1.h', type `file' does not match type `link'
2003-10-10 11:08:54 +00:00
lukem 58e13fba70 Fix compile error on powerpc. Noted by Juergen Hannken-Illjes in private mail. 2003-10-10 01:50:47 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
itojun fdd3180d27 minor KNFs 2003-10-06 09:43:27 +00:00
itojun e45e8f9d58 use bouded string op as much as possible 2003-10-06 09:18:41 +00:00
lukem 420f3b76ba Replace BP_* with I386_BP_FLAGS_*, for consistency with other stuff in
<sys/bootblock.h>
(CONSDEV_ should be converted as well, but that's more intrusive...)
2003-10-06 05:24:54 +00:00
itojun d8db5e11b1 sprintf -> snprintf. hints from Thorsten Glaser 2003-10-06 04:19:41 +00:00
lukem b5589158f0 spelo in comment 2003-10-06 02:39:04 +00:00
grant d5f2632867 minor style nit 2003-10-06 00:44:15 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
wiz 9445c4eef4 Sort names. 2003-10-04 00:53:12 +00:00
wiz 3683b30e87 Add me here, too. 2003-10-04 00:51:31 +00:00
wiz c87a7072e8 Replace strnncpy calls with strlcpy calls. Remove strnncpy.
Ok'ed by agc and hubertf. Verified working with editors/mule package.
2003-10-04 00:50:34 +00:00
itojun c4beb9648d sync w/ header file changes 2003-10-03 23:27:31 +00:00
wiz e2b595e0ce Indent, and remove some #if 0-ed code. 2003-10-03 19:55:34 +00:00
wiz f13972188c Bump date for previous (oops :) ). 2003-10-03 15:42:22 +00:00
wiz 297eaf11ad Bump version to 20031003 for added HTTP support. 2003-10-03 15:41:03 +00:00
wiz 38e730c27c Add HTTP support.
Thanks to dillo@ for extensive review and jmmv@ for testing.
Remaining bugs are, of course, mine.

Closes PR 10006.
2003-10-03 15:40:27 +00:00
lukem 4ab35bde4b Document the various bootxx_ variants seen on i386, since it's a FAQ.
Document /usr/mdec/biosboot.  (Arguably that should be renamed to
"/usr/mdec/boot" or "/usr/mdec/boot.i386" for consistency with other platforms)
2003-10-03 13:43:34 +00:00
mhitch 3400c43ec7 Add <string.h> include for memcpy. 2003-09-27 19:35:14 +00:00
dsl 44b926213e Add a -a option to dump all alternate superblocks 2003-09-26 07:02:43 +00:00
wiz fb41fcc067 Make compile with STANDALONE defined. 2003-09-25 22:31:35 +00:00
wiz c605c0c28e s/lukemftp/nbftp/, fix two typos. 2003-09-25 22:14:16 +00:00
dsl e045a0f96e Allow a numeric ID to be preceeded by '#' to avoid the name lookup.
Update man pages to match.
2003-09-25 10:30:10 +00:00
wiz 1d02c95b43 Bump date for previous (hi antti!). New sentence, new line. 2003-09-25 09:37:32 +00:00
pooka 8ac798e2ed Document the controller/firmware keyword. 2003-09-25 09:21:48 +00:00
mycroft fc24d6a197 Pull in libipsec. 2003-09-25 01:02:03 +00:00
agc 8dc14b2f96 Cast the type of argument printed, for sparc and arm platforms. 2003-09-24 06:18:16 +00:00
itojun 8c185a2af9 no need for "sdl = NULL" initialization on decl. cedric@openbsd 2003-09-23 18:15:50 +00:00
itojun ed45a3ba48 simplify by using getifaddrs 2003-09-23 17:57:21 +00:00
christos b3601bdfc6 reset values when malloc fails. 2003-09-23 15:07:43 +00:00
wiz 2095b365b2 Avoid shadowing err. 2003-09-23 14:55:01 +00:00
wiz f220a7df77 Add prototype for remove_files. 2003-09-23 14:54:53 +00:00
wiz 161f3f684b Remove last vsystem caller and vsystem() itself. 2003-09-23 14:23:53 +00:00
agc 342644fea5 Add <sys/wait.h> so that we have a prototype for waitpid(3). 2003-09-23 14:18:01 +00:00
itojun 9beba21754 ignore non-AF_INET addrs. from openbsd 2003-09-23 10:50:51 +00:00
wiz acbbe02c81 Add some free()s in error cases. 2003-09-23 09:47:20 +00:00
wiz 7e60425a84 Get rid of lots of system(3) (partly via vsystem) calls.
Previous version reviewed by agc.
Closes PR 20518.
2003-09-23 09:36:04 +00:00
grant 889c15684e bump PKGTOOLS_VERSION for identification purposes (despite the lack of
any functional change).
2003-09-23 07:10:53 +00:00
grant fd9dca3d28 don't assume mtree is in BINDIR, allow it to be overridden by
MTREE_CMD.
2003-09-23 06:19:45 +00:00
grant e37cded7b1 remove redundant comments about zoularis. 2003-09-23 05:39:41 +00:00
tron 01c3d246ff Add my name to the list of the culprits. 2003-09-20 17:17:40 +00:00
itojun 1ce85c4e12 plug memory leak. from kame 2003-09-20 13:04:07 +00:00
lukem 9c437ec754 Change `LNFILES' to `BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.
2003-09-20 06:20:41 +00:00
wiz 137c968ad5 Initialize cnt; from Greg A. Woods in PR 22862. 2003-09-19 17:44:53 +00:00
martin 0af2c4286d Remove sparc64 special case handling - no longer needed. 2003-09-19 16:39:52 +00:00
itojun 4a7fa92f21 no need for explicit '?'; openbsd 2003-09-19 08:24:07 +00:00
itojun a82a0d12e2 realloc pedant 2003-09-19 06:22:03 +00:00
itojun e99b62a1d7 realloc pedant 2003-09-19 06:11:35 +00:00
itojun 0c4a8b5a7e realloc pedant 2003-09-19 06:01:24 +00:00
agc 4fe63c7eb9 Let pkg_admin(1) have a -S argument - some vendors' xargs(1) don't pass
a null ("") argument properly (hi, Sun), so make -S a synonym for -s "".

Don't dump core if no command is given to pkg_admin(1).

Print usage message to stderr, not stdout, and use the program name by
which it was invoked.

Bump pkg_install version to 20030918.
2003-09-18 09:56:20 +00:00
agc 54f9bdba40 Remove the names of arguments from function prototypes. 2003-09-17 13:27:42 +00:00
jmmv 94114f39df Use tabs for indentation; pointed out by simonb@. 2003-09-14 12:43:04 +00:00
jmmv fc7230200f Fix crash when using the '-x' flag. 2003-09-14 12:35:46 +00:00
jmmv ce413b6dd1 Fix some warnings. 2003-09-14 12:33:05 +00:00
jlam 505c7e361d Update pkg_install to 20030914. Changes from version 20030913 are
ensuring that recursive pkg_delete'ing works by using the correct
pkg_dbdir to find packages.  This fixes recursive deleting if the
-K flag is passed to pkg_delete(1), and the named dbdir differs from
the default dbdir (/var/db/pkg).
2003-09-14 04:58:30 +00:00
christos 27a8c2abc5 PR/22776 : Andreas Wrede: proxyarp in pppd is broken 2003-09-13 18:55:17 +00:00
erh 1f5fff1c1c PR# standards/16143: hide struct uio from userland behind a __UIO_EXPOSE
ifdef.  Define this when building ipf, since it shares code between the
kernel and userland and uses struct uio.
2003-09-13 16:59:29 +00:00
jlam 2277c35f52 Update pkg_install to 20030913. Changes from version 20020912 are quieting
the file removal when deleting linkfarms if the expected file doesn't
exist.  Since the symlink isn't there, the mission is already accomplished,
so why bother with the warning?
2003-09-13 09:20:26 +00:00
jlam 1732738842 Update pkg_install to version 20030912. Changes from 200230907 are
adding two new options to pkg_admin(1) to simply using this utility to
list the bare package names that match patterns when looking in PKG_DBDIR:

      -b      Print only the basenames when matching package names for
              lsall and lsbest.

      -d lsdir
              Set lsdir as the path to the directory in which to find
              matching package names for lsall and lsbest.
2003-09-13 05:48:50 +00:00
pooka fdd5c1261b our isdntrace uses /dev/isdntrc<n>, not /dev/i4btrc<n> 2003-09-11 14:14:31 +00:00
jlam f310627cee Fix a bug I accidentally introduced in rev. 1.48 where a pkg_dbdir could no
longer be a symlink to a directory.
2003-09-10 17:28:59 +00:00
jlam 7297f559c5 Inverted a test by mistake. 2003-09-09 08:22:39 +00:00
jlam f5e8befe51 Replace call to vsystem() with call to fexec() for speed. 2003-09-09 06:43:10 +00:00
jlam 154a25e9c8 Output the name of the pkgdb file from which we are removing entries
instead of just "pkgdb".
2003-09-08 22:19:25 +00:00
jlam bfb9e5680c Allow the package entries in the pkgdbdir to be either directories or
symlinks to directories.  This gives the user more rope, but lets those
who know what they're doing to do what they want.
2003-09-08 22:11:12 +00:00
cl 289a48a2fc free string only after it's no longer used through dirname reference. 2003-09-08 17:50:12 +00:00
jlam 37365fbf87 It's "-d stowdir" not "-D stowdir". 2003-09-08 10:21:25 +00:00
jlam 198410e826 Use the pkgviews terminology from pkgsrc/mk/buildlink3/README consistently
in this man page: depoted packages are kept in their depot directories, and
pkg_view(1) manages instances of those packages in views.  Also copy the
warning in the pkg_delete(1) man page instead of the one from the
pkg_add(1) man page since the former correctly refers to package control
files already installed on the system.
2003-09-08 10:17:16 +00:00
wiz a3a659ef72 Add options to SYNOPSIS; remove some fluff from Nd. 2003-09-08 09:12:35 +00:00
wiz b897232ac9 Sort options; use Fl x instead of Ar -x; use Pq/Sq. 2003-09-08 09:11:12 +00:00
wiz 255fb463e6 Bump date for previous. 2003-09-08 08:57:56 +00:00
wiz 1b83dbb69f Sort options. 2003-09-08 08:57:42 +00:00
wiz 491ae8b74a Bump date for previous. 2003-09-08 07:14:29 +00:00
jlam 0d7b7e0f8f Bump version to 20030907. Changes from previous version include:
* Teaching pkg_add(1) to be smarter about how to add a depoted packge.

    * "pkg_delete foo" only deletes foo if it's a unique package.

    * Teach pkg_admin(1) two new commands "add" and "delete" for working
      with pkgdb.byfile.db.

    * pkg_view(1) uses the new pkg_admin(1) commands to keep the
      pkgdb.byfile.db files consistent in each view.
2003-09-08 07:13:29 +00:00
wiz 376ac9e3f6 Bump date for previous. 2003-09-08 07:12:53 +00:00
jlam 453f4348b6 Use "pkg_admin add|delete" to manipulate the pkgdb.byfile.db files in each
view so that they contain the correct information for the files stored in
each view.
2003-09-08 07:09:33 +00:00
jlam 751f88a06a When executing "pkg_delete foo", only delete it if "foo" resolves to a
unique package.  This makes deleting packages less surprising in a pkgviews
world where you can have multiple versions of packages installed at the
same time in the package depot.

Also make "pkg_delete -f" work depoted packages if they have been added to
views by also running "pkg_delete -f" for the package instances in the
views.
2003-09-08 07:08:11 +00:00
jlam 1bbe06780b Add new commands "add" and "delete" to pkg_admin(1):
add pkg ...
             For each listed package, write the absolute pathnames of the
             files listed in its +CONTENTS file together with the package
             they belong to into the package database.  This should be used
             only by pkg_view(1).

     delete pkg ...
             For each listed package, remove all file entries in the
             package database that belong to the package.  This should be
             used only by pkg_view(1).

These commands will be used by pkg_view(1) to keep the pkgdb.byfile.db
files for each view consistent with what's stored in each view.

Since we stole these names from the debug code, change the names of the
debug commands to "addkey" and "delkey".
2003-09-08 07:04:40 +00:00
jlam 449bc6e566 Note that LOCALBASE and PKG_VIEW in the environment will affect the
behaviour of pkg_add(1) indirectly by affecting the behaviour of
pkg_view(1).
2003-09-08 07:01:30 +00:00
jlam 6a37e1039a When adding depoted packages into the depot, manipulate the correct
pkgdb.byfile.db by using the fact that depoted packages have their
dbdir == ${DEPOTBASE}.
2003-09-08 07:00:10 +00:00
jlam 140fe23a05 strlen(pkgname) only returns the number of characters preceding the NUL,
but the size of the data field in the pkgdb.byfile.db file is the length of
the string plus 1 for the NUL.  Fix this check so that removing all of the
files belonging to pkgname from pkgdb.byfile.db works again.
2003-09-08 06:41:23 +00:00
jlam 5fc555d16b Correct the documentation of the return values for pkgdb_open() and
pkgdb_remove_pkg().
2003-09-08 05:34:35 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
fvdl bd84ee9c7a Revert arc4random usage. makefs is only used for install images,
filehandle randomization is not an issue there, and using arc4random
broke building makefs as a host tool.
2003-09-07 14:24:08 +00:00