Commit Graph

10605 Commits

Author SHA1 Message Date
Colin Percival
82835af3f1 Add a note pointing out that certain information (IP address, list of
files fetched, FreeBSD release level) is transmitted to the portsnap
server when portsnap is run, but that this information is only used
anonymously and in aggregate.
2005-09-18 12:19:32 +00:00
Colin Percival
6a15313d24 Handle circular dependencies properly (via errx(3)) rather than dumping
core.  This bug was made visible by a recent change to the audio/timidity++
port, which now has itself as a run dependency.

Reported by:	Emil Mikulic, Andreas Klemm
2005-09-17 15:30:16 +00:00
Craig Rodrigues
387d535430 Fix so that color changes are not lost when the video mode changes.
PR:	bin/83553
Submitted by:	Dan Lukes <dan at obluda dot cz>
2005-09-17 12:52:04 +00:00
Pawel Jakub Dawidek
8b28aef238 Pidfiles should be created with permission preventing users from opening
them for reading. When user can open file for reading, he can also
flock(2) it, which can lead to confusions.

Pointed out by:	green
2005-09-16 11:24:28 +00:00
Colin Percival
ac8189712e Portsnap uses host(1) to search for mirrors, but this is only available
when the base system is not compiled with NO_BIND set.  Before we start
searching for mirrors, make sure that host(1) can be found, and if it
doesn't exist then fallback to the A record instead of the SRV records.

Submitted by:	Luca Morettoni
2005-09-15 13:29:10 +00:00
Joseph Koshy
60f918ef43 Determine where the runtime loader got mapped to when a dynamically
linked process was exec()'ed, and map samples in that address range
into the appropriate buckets in the runtime loader's profile.
Improve a few comments.

MFC after:	3 days
2005-09-14 21:15:50 +00:00
Joseph Koshy
a566429af3 Fix a bug that caused generated gmon.out profiles to be out of
whack.  Use saturating arithmetic when incrementing a bucket.
Improve a few comments.

MFC after:	3 days
2005-09-13 02:23:25 +00:00
Stefan Farfeleder
c790330fe3 Include <osreldate.h> at the top of the file. 2005-09-12 16:06:15 +00:00
Brian Somers
343427d174 Remove this file as it's mostly out of date. Up-to-date info such as
the program's origin is already in the man page.

Update requested by:	Xavier Venient & Jason McIntyre
2005-09-12 11:20:07 +00:00
Colin Percival
e2d583aca4 Fix typo: ${PORTDIR} -> ${PORTSDIR}.
Apologies to everyone who has run portsnap in 7.0-CURRENT since
Tuesday; if there is a file "/.portsnap.INDEX" on your system, you can
delete it (or even better, move it to /usr/ports/.portsnap.INDEX).

Big pointy hat to:	cperciva
Reported that things weren't working properly:	Aleksander Fafula
2005-09-11 12:55:07 +00:00
Colin Percival
73b2114b4e Fix typo: Cowarly -> Cowardly.
Reported by:	Joerg Sonnenberger
2005-09-07 19:32:15 +00:00
Colin Percival
ff69e5b71e Teach portsnap how to ignore unwanted parts of the ports tree. A line
of the form "REFUSE foo" in portsnap.conf will result in parts of the
tree matching "^foo" being (a) not extracted by "portsnap extract", (b)
not updated by "portsnap update", and (c) not having any patches or new
ports downloaded by "portsnap fetch" or "portsnap cron". The example
shown in portsnap.conf demonstrates ignoring all the language categories.

As mentioned in portsnap.conf.5, the use of an imcomplete ports tree is
not officially supported; but this is something which many users have
requested, so I'm adding it anyway.

PR:		bin/85619 (but not the patch provided therein)
MFC after:	1 month
2005-09-06 19:28:37 +00:00
Joseph Koshy
4525db8c52 Improve an error message.
MFC after:	3 days
2005-09-05 18:31:09 +00:00
Maksim Yevmenkin
f27f0bce24 Fix typo in usage.
Submitted by:	Jonatan B < onatan at gmail dot com >
MFC after:	3 days
2005-09-01 22:45:25 +00:00
Sam Leffler
601079f992 o correct alignment of 802.11 addresses passed to ether_ntoa to fix
segfaults on amd64
o while here correct printf formats for size_t args

Identified by:	Pascal Hofstee
MFC after:	3 days
2005-08-30 15:59:49 +00:00
Philip Paeps
2c94e1ffc1 Fix unhandled malloc errors.
PR:		bin/83467
Submitted by:	Dan Lukes <dan -at- obluda.cz>
Prodded by:	glebius
MFC after:	3 days
2005-08-29 10:08:04 +00:00
Murray Stokely
7623747c2e Update number and size of Ports Collection.
MFC after:	1 day
2005-08-28 02:30:50 +00:00
Colin Percival
a2c16fbcd0 Fix a bug introduced in revision 1.9 which causes chkgrp to coredump on
certain corrupt files.

Submitted by:	liamfoy@dragonflybsd.org
Reported by:	Nikolay Kalev, via freebsd-current
MFC after:	3 days
2005-08-25 17:01:06 +00:00
Pawel Jakub Dawidek
a9ed1f7ffc Test last minute changes, as gcc isn't too smart.
Reported by:	Steve Kargl <sgk@troutmask.apl.washington.edu>
2005-08-24 19:42:40 +00:00
Pawel Jakub Dawidek
0ea90af02e Use pidfile(3) in watchdogd(8). 2005-08-24 19:28:33 +00:00
Pawel Jakub Dawidek
a032b226c8 Use pidfile(3) in mountd(8). There is no need to use /var/run/mountd.lock
anymore.
2005-08-24 19:17:06 +00:00
Pawel Jakub Dawidek
f670195163 Use pidfile(3) in inetd(8). 2005-08-24 19:04:21 +00:00
Pawel Jakub Dawidek
78735592f5 Use pidfile(3) in cron(8).
Note, that when cron(8) cannot create pidfile, it'll exit. I didn't
changed this behaviour, but its better to ignore errors other than
EEXIST, so daemon can be started on systems where /var/ file system
doesn't support locking (like NFS without rpc.lockd(8)).
2005-08-24 17:51:36 +00:00
Pawel Jakub Dawidek
84148fd1da Add '-P' option which allows to specify pidfile. 2005-08-24 17:32:41 +00:00
Pawel Jakub Dawidek
a80d5fc227 Use pidfile(3) in moused(8). 2005-08-24 17:27:06 +00:00
Pawel Jakub Dawidek
fa39391686 Use pidfile(3) in syslogd(8). 2005-08-24 17:26:26 +00:00
Pawel Jakub Dawidek
c6262cb601 Teach daemon(8) how to use pidfile(3). 2005-08-24 17:24:39 +00:00
Bruno Ducrot
7065e0e9f4 Change the default adaptive algorithm for phk's one. Thanks to phk
and Kevin Oberman for this work.

Submitted by:	Kevin Oberman
Reviewed by:	njl
Approved by:	njl
2005-08-24 07:52:59 +00:00
Craig Rodrigues
91d7f332e0 - Remove NTP servers which do not resolve in DNS.
- Use pool.ntp.org servers where possible, thanks to
  Chuck Swiger <cswiger at mac dot com> .
- Update list of Swedish NTP servers, thanks to
  Fredrik Lindberg <fli+freebsd-current at shapeshifter dot se> .

PR:		bin/75479
MFC after:	1 day
2005-08-24 02:21:12 +00:00
Brian Somers
34c22943ec Spell powersavesleep correctly. 2005-08-22 09:59:13 +00:00
Pawel Jakub Dawidek
3a6b8b21d2 Sync code with the error report: calloc(number, 1) is equivalent to
malloc(number).
2005-08-19 11:03:49 +00:00
Dag-Erling Smørgrav
7df76a1312 Use larger buffers to read lines from the vendor list.
Trim trailing whitespace and comments before parsing, and skip empty lines.
Skip subvendor / subdevice entries (which start with two tab characters).
Change the scanf() format string to match any amount and type of whitespace
between the device ID and the description text.

MFC after:	3 weeks
2005-08-18 11:11:40 +00:00
Dag-Erling Smørgrav
5eaf9703df Whitespace cleanup. 2005-08-18 11:04:49 +00:00
Gregory Neil Shapiro
7d0ac6f3a2 Make links for hoststat(8) and purgestat(8) man pages.
PR:		docs/85009
MFC after:	3 days
2005-08-17 02:36:31 +00:00
Colin Percival
398b037d7d Change the default partition sizing code in order to
1. Provide larger /, /var, and /tmp partitions (the last increase was
in 2001, and we now have both larger hard drives and more space-hungry
software.)
2. If there is enough space available, allocate extra space to /var
sufficient to store a crash dump.

On systems where harddrivesize > 3 * RAMsize + 10GB, the default sizes
will now be as follows:
swap	RAMsize * 2
/ 	512 MB
/tmp	512 MB
/var	1024 MB + RAMsize
/usr	the rest (8GB or more)

On systems where harddrivesize > RAMsize / 8 + 2 GB, the default sizes
will be in the following ranges, with space allocated proportionally:
swap	RAMsize / 8 -- RAMsize * 2
/	256 MB	    -- 512 MB
/tmp	128 MB      -- 512 MB
/var	128 MB      -- 1024 MB
/usr	1536 MB     -- 8192 MB

On systems with even less disk space, the existing behaviour is not
changed.

Approved by:	re (kensmith)
MFC after:	1 day
		(or once people stop arguing about colours of paint)
2005-08-16 13:19:17 +00:00
Pawel Jakub Dawidek
8bd435d9cf Not sure why, but SYSCTL_OUT() can sometimes keep returning ENOMEM
in sysctl_jail_list(). Because of this, jls(8) could enter into
an endless loop. The strange thing is, that we can call jls(8) while
the other one is in loop and it will succeed - SYSCTL_OUT() will
not return ENOMEM there.

Maybe SYSCTL_OUT() returns first ENOMEM, because there is no memory,
but is marking some memory range as wired even on failure and another
SYSCTL_OUT() calls are not going to succeed, because process exceeds
limit of wired memory? ENOVMCLUE.

Anyway. Fix jls(8) to ignore ENOMEM and retry only 4 times.

Submitted by:	Niklas Saers
PR:		kern/79245
MFC after:	3 days
2005-08-15 12:15:21 +00:00
Colin Percival
24a3ff142f Spell "cmp > /dev/null" as "cmp -s".
Suggested by:	dougb
2005-08-14 02:45:04 +00:00
Colin Percival
723c596167 Correctly exit from extract_run() and update_run() if files needed are
missing from ${WORKDIR}/files/.

This bug was caused by the astonishing interaction of "return" and
pipelines; in the following code, the "return" does not exit the
function, but instead exits the subshell which was spawned for the last
element of the pipeline; consequently, the output produced is "foo".

foo() {
	echo bar | while read baz; do
		if [ ${baz} = "bar" ]; then
			return 1
		fi
	done

	echo foo
}

Reported by:	simon
2005-08-13 21:28:43 +00:00
Simon L. B. Nielsen
d24cff0fb0 Misc mdoc(7) fixes:
- Bump document date for recent updates.
- Use .Fx for FreeBSD.
- Remove EOL whitespace.
- Start new sentences on new lines.

Reviewed by:	cperciva
2005-08-13 19:08:10 +00:00
Colin Percival
d958d0d5dc Allow multiple commands to be specified on a single command line, e.g.,
"portsnap fetch update" or "portsnap -I cron update".  They will be
executed in the order that they appear, and duplicates are not removed
(so "portsnap fetch fetch fetch fetch" is meaningful, albeit rather
silly).

Requested by:	Roman Divacky
2005-08-13 16:27:13 +00:00
Colin Percival
a9b7d0260b Fix the progress statistics code by printing the right variable. I
missed this when I changed the stats code in the ports -> base
transition.

Pointed out by:	simon
2005-08-13 11:55:29 +00:00
Sam Leffler
9c1909fe22 save+restore wpa, privacy, and roaming settings
MFC after:	2 weeks
2005-08-13 04:23:33 +00:00
Colin Percival
1c1667f893 When using cmp(1) to determine if the ports tree is already up to date,
we want the exit code, but not the actual output; add a redirect to
/dev/null.

Pointy hat to:	cperciva
2005-08-12 04:35:27 +00:00
Brian Somers
6e03259288 If we fail in chown(2), try to just change the group and continue on to
change the permissions.  Failures are still recorded.

This allows mtree to do a generally better job of things when uid != 0.

Sponsored by:		ActiveState/Sophos
Partially submitted by:	neilw at ActiveState dot com
Reviewed by:		neilw at ActiveState dot com
MFC after:		3 weeks
2005-08-11 15:43:55 +00:00
David E. O'Brien
216a5fbf37 Put rev. 1.65 into usage(). 2005-08-11 15:23:23 +00:00
Colin Percival
8573cb38b6 If the ports tree is already up to date when we run portsnap update,
exit early; this avoids spending five seconds rebuilding the INDEX
files.

Requested by:	somebody on IRC, but I can't remember who
2005-08-11 13:48:13 +00:00
Hajimu UMEMOTO
9cc94db2fe fix typo.
Submitted by:	suz
Obtained from:	KAME
2005-08-10 17:09:08 +00:00
Colin Percival
9de71e6fdd Remove unused variable.
Reported by:	stefanf
2005-08-10 13:45:00 +00:00
David E. O'Brien
71d8a448ac Add an option to tell what version of config(8) this is. 2005-08-10 06:36:44 +00:00
Colin Percival
4c3cffeb64 Check that malloc() succeeds in makelist.
Submitted by:	Roman Divacky (who did a very complete review of both
				make_index.c and phttpget.c)
2005-08-09 09:49:01 +00:00