Commit Graph

70 Commits

Author SHA1 Message Date
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Enji Cooper
d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Konstantin Belousov
6992112349 Commit the 64-bit inode project.
Extend the ino_t, dev_t, nlink_t types to 64-bit ints.  Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment.  Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks.  Unfortunately, not everything can be
fixed, especially outside the base system.  For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING.  Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb).  Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver.  Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem).  Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by:	The FreeBSD Foundation (emaste, kib)
Differential revision:	https://reviews.freebsd.org/D10439
2017-05-23 09:29:05 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Enji Cooper
b943c77347 Fix .../usr.bin/lastcomm/legacy_test:main on i386
The time in the output files was ahead by 3 hours on i386. Fix the incorrect
offset.

Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff)
MFC after: 1 week
PR: 210329
Reported by: asomers
Approved by: re (gjb)
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division
2016-07-03 17:52:21 +00:00
Enji Cooper
a96a4734c0 Output the diffs to standard error when comparing the expected vs the
obtained output from lastcomm instead of just printing out a summary, e.g.
"they differed".

This will make failures with results more apparent when running kyua debug,
kyua report-html, etc.

Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff)
MFC after: 1 week
Approved by: re (gjb)
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division
2016-07-03 17:51:24 +00:00
Alan Somers
2101ef6b90 Skip lastcomm and sa tests on unsupported architectures
usr.bin/lastcom/tests/Makefile
usr.sbin/sa/tests/Makefile
	Set allow_architectures appropriately.  These tests depend on golden
	files that must be generated for each architecture, and haven't yet
	been generated for all of them.

PR:		210566
PR:		204154
Reviewed by:	ngie
Approved by:	re (gjb)
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D6960
2016-06-26 00:53:31 +00:00
Enji Cooper
430f7286a5 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
  namespacing is kept with FILES appropriately, and that this shouldn't need
  to be repeated if the namespace changes -- only the definition of PACKAGE
  needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
  `tests`. In the event we get to the point where things can be split up
  enough in the base system, it would make more sense to group the tests
  with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
  previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
  bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
  ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
  and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
2016-05-04 23:20:53 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
15c433351f DIRDEPS_BUILD: Connect MK_TESTS.
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:46:01 +00:00
Glen Barber
43faedc133 First pass to fix the 'tests' packages.
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:26:49 +00:00
Glen Barber
d3d8fcf2c6 Create an acct package for accounting tools.
Sponsored by:	The FreeBSD Foundation
2016-01-21 17:49:10 +00:00
Enji Cooper
b2d48be1bc Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +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
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +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
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Julio Merino
d14afb2adc Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
This change was originally going to only migrate the usr.sbin tests but, as
it turns out, the usr.sbin/sa/ tests require files from usr.bin/lastcomm/
so it's better to just also migrate the latter at the same time.  The other
usr.bin tests will be moved separately.

To make these tests work within the test suite, some of them have required
changes to prevent modifying the source directory and instead just rely on
the current directory for file manipulation.
2014-03-16 04:09:22 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Konstantin Belousov
6fe3ecc3b1 Allow to specify strftime(3) format for process start end exit times.
Submitted by:	Andrey Zonov <andrey zonov org>
MFC after:	1 week
2012-05-17 11:10:13 +00:00
Xin LI
b561579962 Remove unneeded headers.
MFC after:	2 weeks
2011-06-21 20:36:10 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Jilles Tjoelker
c84cab5626 Update xrefs from 4.3BSD to modern signal functions in various man pages.
sigvec(2) references have been updated to sigaction(2), sigsetmask(2) and
sigblock(2) to sigprocmask(2), sigpause(2) to sigsuspend(2).

Some legacy man pages still refer to them, that is OK.
2010-05-06 22:49:54 +00:00
Ed Schouten
85277f1350 Let lastcomm(1) build without <utmp.h>.
Use MAXLOGNAME - 1 instead of UTNAMESIZE. There is no definition for TTY
name sizes, at least not as low as 8, so hardcode it for now.
2010-01-10 21:59:06 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Diomidis Spinellis
fdbe5babe4 Increase precision of time values in the process accounting
structure, while maintaining backward compatibility with legacy
file and record formats.
2007-05-22 06:51:38 +00:00
Diomidis Spinellis
e91843d40a Backout revisions 1.16-1.14.
Backwards compatibility with the new acct(5) format will be
implemented through the explicit versioning of acct records,
not through an export/import procedure.
2007-05-14 09:05:22 +00:00
David Malone
61f31ed6cf Initialise variable size so that reading stdin works deterministically.
Add missing include.

Default to WARNS=6.
2007-05-03 13:57:19 +00:00
Diomidis Spinellis
b7dd80b843 Change the export option from -w (write) to -X.
While implementing import it became apparent that write as a mnemonic
is ambiguous and confusing.

MFC after:	8 days
2007-04-18 16:43:21 +00:00
Diomidis Spinellis
3f863a9ae4 Complain on write errors.
Use correct type for write_text.

MFC after:	8 days
2007-04-18 09:39:47 +00:00
Diomidis Spinellis
947ef7f187 Add export capability through the new -w flag.
Discussed in: -arch
MFC after:	8 days
2007-04-18 08:55:54 +00:00
Diomidis Spinellis
44c900afd7 A dash as an argument to the -f option will now cause lastcomm to
read data from the standard input.  This allows tail -f to pipe
data to lastcomm, and thereby real-time monitoring of executed
commands.  The manual page includes the exact incantation.

MFC after:	2 weeks
2007-04-04 16:04:58 +00:00
Ruslan Ermilov
f682f10c76 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
Philippe Charnier
17373fb9a5 Introduce options list the standard way. Correct style(9) in FILES section. 2004-07-26 19:59:29 +00:00
Ruslan Ermilov
557b7fa148 Deal with double whitespace. 2004-07-03 00:24:45 +00:00
Hiten Pandya
151e36fc65 Remove unneeded lseek(2) hack to position past the 2GB point,
use fseeko(3) instead.

This commit fixes breakage when `lastcomm matchstring` is run.

PR:          	bin/66765, bin/64568
Submitted by:	Dan Nelson <dnelson at allantgroup.com>
2004-05-20 19:25:27 +00:00
Bill Fenner
6841d8b90d Don't try to fseek before the beginning of the file; POSIX requires that
this return an error.
This re-enables display of the first entry in /var/account/acct instead
 of the error "lastcomm: /var/account/acct: Invalid argument"
2003-01-27 18:16:32 +00:00
David Malone
f4ac32def2 ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
Philippe Charnier
6f84b6813b Use `The .Nm utility'. Add section number to .Xr. 2002-04-20 21:28:47 +00:00