Commit Graph

12324 Commits

Author SHA1 Message Date
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
Bryan Drewery
0252c68ba4 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	EMC / Isilon Storage Division
2016-05-04 03:14:34 +00:00
Baptiste Daroussin
eebea334c4 Print the fchmodat mode in human readable fashion
MFC after:	1 week
2016-05-03 21:27:17 +00:00
Bjoern A. Zeeb
e29c552990 fgetc returns an int not a char.
Found by:   powerpc builds failing due to comparing with EOF raised:
"comparison is always false due to limited range of data type"
2016-05-02 15:07:43 +00:00
Pedro F. Giffuni
af7ca7c85d usr.bin: minor spelling fixes on comments.
No functional change.
2016-05-01 16:13:05 +00:00
Pedro F. Giffuni
fcc7baa1ae localedef(1): minor spelling fixes on comments.
No functional change.
2016-05-01 16:10:56 +00:00
Ed Schouten
e33d251e8e Remove useless calls to basename().
There are a couple of places in the source three where we call
basename() on constant strings. This is bad, because the prototype
standardized by POSIX allows the implementation to use its argument as a
storage buffer.

This change eliminates some of these unportable calls to basename() in
cases where it was only added for cosmetical reasons, namely to trim
argv[0]. There's nothing wrong with setting argv[0] to the full path.

Reviewed by:	jilles
Differential Revision:	https://reviews.freebsd.org/D6093
2016-05-01 08:22:11 +00:00
Baptiste Daroussin
da5c2c4230 When checking for binary file, check if ch is not EOF only ch actually got
a value assigned

Reported by:	pfg
2016-04-30 14:48:30 +00:00
Dimitry Andric
4c4924e8b0 Update from subversion 1.9.2 to 1.9.4.
This contains only bug fixes, no new features.  The repository format is
also unchanged from 1.9.2.  Full list of changes between 1.9.4 and
earlier versions:

  https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES

Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and
CVE-2016-2168) do not affect the version of Subversion in the FreeBSD
base system, since neither SASL nor Apache modules are enabled.

Relnotes:	yes
MFC after:	2 weeks
2016-04-30 10:35:42 +00:00
Baptiste Daroussin
13b5b54865 import sdiff(1) from GSoC 2012
Import sdiff(1) from the diff version written by Raymond Lai,
improved during GSoC 2012 by Jesse Hagewood.

Compared to the version done in during that summer of code:
- Remove the zlib frontend: zsdiff
- Compatible output (column size and separators) with GNU sdiff

Compared to GNU sdiff in ports:
- The only difference is padding using spaces vs tabs

Compared to OpenBSD and NetBSD import:
- Implement missing options (including long options) from GNU sdiff
- Improved support for the edition mode (signal handling)
- Output visually compatible with GNU sdiff: size of columns

While here import regression tests from NetBSD adapted to fit the output as
expected by GNU sdiff

Reviewed by:	emaste (in part)
Obtained from:	OpenBSD, NetBSD, GSoC 2012
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5981
Differential Revision:	https://reviews.freebsd.org/D6032 (diff with NetBSD version)
Differential Revision:	https://reviews.freebsd.org/D6033 (diff with OpenBSD version)
2016-04-29 23:27:15 +00:00
Glen Barber
49dae58b28 Fix including Kyuafile in packaged base system.
Fix a related typo while here.

Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.

PR:		209114
Submitted by:	ngie
Sponsored by:	The FreeBSD Foundation
2016-04-29 05:28:40 +00:00
Pedro F. Giffuni
0b33b55b01 Small typo. 2016-04-28 15:20:08 +00:00
Marcelo Araujo
cd59e2f343 Use MIN() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-27 02:44:10 +00:00
Marcelo Araujo
a9a46bd918 Use MIN() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-27 02:34:25 +00:00
Marcelo Araujo
1e8b591f62 Use macro MIN() from sys/param.h.
MFC after:	2 weeks.
2016-04-27 02:26:31 +00:00
Marcelo Araujo
a301044615 Use MIN() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-27 02:13:57 +00:00
Marcelo Araujo
5d49c30c7b Use MIN() instead of MAX() as the previous syntax was wrote in a weird and
confused way: "prec > 9 ? 9 : prec".

Submitted by:	pfg, ngie and luke <luke.tw@gmail.com>
MFC after:	2 weeks.
2016-04-26 00:29:00 +00:00
Tony Finch
c37dc1fb0b Example RIPE whois query with options and spaces.
Since it is used in the example, mention the -- option in the synopsis
even though it is a universal standard, and tweak to fit it on one line.
2016-04-25 15:46:42 +00:00
Bjoern A. Zeeb
d654df1365 Try to make gcc builds happy again by removing a redundant declaration. 2016-04-25 13:20:35 +00:00
Pedro F. Giffuni
3548708c47 Adjust a type from r267490.
Independent of the maximum length, the return type for strnlen(3)
is always size_t.
2016-04-24 04:28:04 +00:00
Pedro F. Giffuni
2c4eed4723 patch(1): avoid signed integer overflow when debugging.
Integer i is used to index p_end of type LINENUM (actually long).

Match the types.

MFC after:	5 days
2016-04-24 04:08:36 +00:00
Maxim Sobolev
96ad8686f6 GC duplicate define. 2016-04-23 07:28:32 +00:00
Maxim Sobolev
4fc55e3e46 Improve performance in a few key areas:
o Split the compression across several worker threads. By default, "several"
   matches number of CPUs, capped at 24 for sanity when running on a very big
   hardwares. Provide option to set that number manually;

 o Fix bug inherited from the mkulzma (R.I.P) which degraded already slow LZMA
   compression even further by calling function to release compression state
   after processing each block.

   It is neither documented as required nor actually required by the LZMA
   library. This caused spree of system calls to release memory and then map
   it again for every block. LZMA compression is more than 2x faster after this
   change alone;

 o Record time it takes to do compression and report throughput achieved.

 o Add simple first-level 256 entry hash table for de-dup code, so it's not
   becoming a bottleneck at big files.
2016-04-23 07:23:43 +00:00
Marcelo Araujo
61cfb5db60 Use roundup2() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-22 06:23:23 +00:00
Marcelo Araujo
ee03c16e64 Use MIN() macro from sys/param.h.
MFC after:	2 weeks.
2016-04-22 03:46:57 +00:00
Marcelo Araujo
cadc2836d8 Use macro MAX() from sys/param.h.
MFC after:	2 weeks.
2016-04-22 03:43:06 +00:00
Marcelo Araujo
fcc0131f63 Use macro MAX() from sys/param.h.
MFC after:	2 weeks.
2016-04-22 03:37:27 +00:00
Pedro F. Giffuni
e55a6575d9 kernel: use our nitems() macro when it is available through param.h.
No functional change, only trivial cases are done in this sweep,

Discussed in:	freebsd-current
2016-04-21 21:30:51 +00:00
Ed Maste
2821bdccaa elftoolchain: Use ${SRCTOP} for the top of the FreeBSD tree
It's provided by sys.mk so there's no need to derive it from ${.CURDIR}.

Suggested by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5998
2016-04-21 12:58:29 +00:00
Eitan Adler
c706c470e4 Bring a little more compability with GNU units 2.12
- notionally support a 'history file' flag. This doesn't do much now,
  but is there to prevent scripts written against GNU units from
  breaking
- correctly gracefully quit rather than exit (this will make it easier
  to support a history file in the future)
- remove the "t" flag from fopen which was there to support windows. We
  have not supported windows since at the latest, the introduction of
  capsicum.
2016-04-21 05:24:47 +00:00
Baptiste Daroussin
e6d8c0e2dd Plug memory leaks
Reported by:	Coverity
CID=		1338535, 1338536, 1338542, 1338569, 1338570
2016-04-20 21:23:42 +00:00
Baptiste Daroussin
c1eac826c2 Fix bad checking of the return of realloc(3)
Reported by:	Coverity
CID:		1007335
MFC after:	3 days
2016-04-20 20:56:06 +00:00
Baptiste Daroussin
89afcfedb6 Fix typo: actually test the return of strchr(3)
Reported by:	Coverity
CID:		1007335
MFC after:	3 days
2016-04-20 20:54:47 +00:00
Marcelo Araujo
6b1c46441c Partially revert the change on r298325 where there is an
(-1) casted to a pointer.

Submitted by:	pfg
MFC after:	2 weeks.
2016-04-20 01:38:54 +00:00
Marcelo Araujo
b4b3d271de Use NULL instead of 0 for pointers.
Small cosmetic change.

MFC after:	2 weeks.
2016-04-20 01:28:31 +00:00
Marcelo Araujo
61c2ed541d Use NULL instead of 0 for pointers.
gethostbyname(3) will return NULL for error status.

MFC after:	2 weeks.
2016-04-20 01:26:03 +00:00
Xin LI
aa9ddbd03e Fix build breakage introduced by r298253. 2016-04-19 07:28:39 +00:00
Eitan Adler
3851177de0 Rename units.lib -> definitions.units
- this matches GNU units 2.12
add ISO country codes from units 2.12
2016-04-19 05:17:59 +00:00
Eitan Adler
8ae87993ed Remove pathnames.h
- it only holds a single constant
- it doesn't exist in the GNU variant
2016-04-19 05:04:39 +00:00
Marcelo Araujo
c81a92db98 Use NULL instead of 0 for pointers.
realloc will return NULL in case it cannot allocate memory.

MFC after:	2 weeks.
2016-04-19 02:05:32 +00:00
Marcelo Araujo
7a4b1114b1 Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 14:44:01 +00:00
Ed Maste
c0e5e7f3d2 Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain
This produces a nicer path in debug info and build logs.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-04-18 13:13:59 +00:00
Marcelo Araujo
fffa1bd071 User NULL instead of 0 for pointers.
getservent(3) returns NULL on EOF or error.

MFC after:	2 weeks.
2016-04-18 07:14:01 +00:00
Marcelo Araujo
1b56693f8b Use NULL instead of 0 for pointers.
fopen(3) will return NULL in case it cannot open the STREAM.

MFC after:	2 weeks.
2016-04-18 07:09:34 +00:00
Marcelo Araujo
26ac9660a4 Use NULL instead of 0 for pointers.
MFC after:	2 weeks.
2016-04-18 07:05:18 +00:00
Marcelo Araujo
d919e0d513 Use NULL instead of 0 for pointers.
realloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-18 06:12:00 +00:00
Marcelo Araujo
7dbab9554d Use NULL for pointers.
strrchr(3) will return NULL if the character does not appears in
the string.

MFC after:	2 weeks.
2016-04-18 06:02:26 +00:00
Marcelo Araujo
ef1cb629d8 Use NULL instead of 0 for pointers.
Also malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-18 05:46:18 +00:00
Marcelo Araujo
6a3f9a213a Use NULL instead of 0.
strtok(3) will return NULL when no more tokens remain.

MFC after:	2 weeks.
2016-04-18 05:26:32 +00:00
Baptiste Daroussin
1551be3402 Note that mklocale(1) and colldef(1) are no longer used
mklocale and colldef has been replaced by localedef, but they have to be kept
until 10.2 is EOL for mklocale (it has been added to 10.3 as a bootstrap tools)
and until 10.3 is EOL for colldef (it has never been added to bootstrap tools)
2016-04-17 23:02:49 +00:00