dragonfly.git
8 years agoRemove unnecessary whitespace in macro arguments in some manual pages.
Sascha Wildner [Tue, 10 Nov 2015 18:01:05 +0000 (19:01 +0100)]
Remove unnecessary whitespace in macro arguments in some manual pages.

8 years agoAdd README for basic locale source file generation
John Marino [Tue, 10 Nov 2015 08:40:17 +0000 (09:40 +0100)]
Add README for basic locale source file generation

Bapt wrote this README for FreeBSD, let's bring it in as a starting point.

8 years agonl_langinfo(CODESET): Again return "US-ASCII" for C/POSIX
John Marino [Tue, 10 Nov 2015 08:09:15 +0000 (09:09 +0100)]
nl_langinfo(CODESET): Again return "US-ASCII" for C/POSIX

Reflecting that the "C"/"POSIX" locale has a different encoding (8-bit)
than "US-ASCII" (7-bit) resulted in immediate fallout on ports,
particularly on python.

Looking at glibc, nl_langinfo returns "ANSI_X3.4-1968" for both "C" and
"POSIX" locales, which is the Linux equivalent of US-ASCII.

Despite it being impossible to distinguish between C/POSIX and US-ASCII
with this change, it needs to be reverted for the sake of third-party
software compatibility.  (Remember nl_langinfo has no standard)

8 years agokernel - Improve tcp starting window
Matthew Dillon [Tue, 10 Nov 2015 00:21:14 +0000 (16:21 -0800)]
kernel - Improve tcp starting window

* The tcp sender inflight management was forcing a starting window that
  was way too small for international connections, causing a bulk fetch
  to take several seconds to ramp up.  This management is enabled by default.

* Add net.inet.tcp.inflight_start to set the starting window and set the
  default to something more reasonable, 33792.  Inflight management previously
  used net.inet.tcp.inflight_min as the starting value, which was 6144 and
  way too small.

* This will significantly improve the performance of small fetches, e.g.
  pkg install's, update's, and upgrades, and the performance of small web
  server fetches occuring over high latency connections.

Reported-by: tuxillo
8 years agonl_langinfo: Simplify case ladder
John Marino [Mon, 9 Nov 2015 22:22:11 +0000 (23:22 +0100)]
nl_langinfo: Simplify case ladder

The NONE:US-ASCII case isn't necessary.  The "NONE:" case will handle
US-ASCII, so let's remove the redundant handling.

8 years agolocales: Enforce US-ASCII encoding (limited to 7-bit)
John Marino [Mon, 9 Nov 2015 21:50:27 +0000 (22:50 +0100)]
locales: Enforce US-ASCII encoding (limited to 7-bit)

The US-ASCII format was getting treated identically to POSIX.  It is
supposed to throw an ILSEQ errno if a value of 0x80 or greater is
encountered, so let's bring back the "ASCII" handling.

While here, change nl_codeset to return US-ASCII only when the encoding
really is "US-ASCII".  Before "C" and "POSIX" encoding returned this
string, so now they return "POSIX".

8 years agolocaledef(1): Remove GCC pragmas on two source files
John Marino [Mon, 9 Nov 2015 16:39:06 +0000 (17:39 +0100)]
localedef(1): Remove GCC pragmas on two source files

Taken-from: FreeBSD

8 years agouipc: Use taskqueue to run GC.
Sepherosa Ziehau [Mon, 9 Nov 2015 14:01:41 +0000 (22:01 +0800)]
uipc: Use taskqueue to run GC.

And revoke no longer used unp_gcing.

8 years agouipc: No need to call sorflush() before unp_gc()
Sepherosa Ziehau [Mon, 9 Nov 2015 13:07:45 +0000 (21:07 +0800)]
uipc: No need to call sorflush() before unp_gc()

And move unp_gc() to the end of unp_detach().

8 years agotest: Add test for unix socket cross/self reference
Sepherosa Ziehau [Fri, 6 Nov 2015 15:58:28 +0000 (23:58 +0800)]
test: Add test for unix socket cross/self reference

cross ref: s1 on s2 rcvbuf, while s2 on s1 rcvbuf.
self ref: s1 on s1 rcvbuf, while s2 on s2 rcvbuf.

8 years agosys/dev/disk/dm: Check if target has registered handlers
Tomohiro Kusumi [Mon, 9 Nov 2015 10:54:55 +0000 (19:54 +0900)]
sys/dev/disk/dm: Check if target has registered handlers

Define which handlers are mandatory or optional.
init(), destroy(), strategy() are (or should be) mandatory.
Others aren't needed by all targets hence should be optional.

Add sanity checks in dm_target_insert() to make sure targets
have implemented and registered mandatory handlers.

Cleanup struct dm_target by removing obvious comments and
adding comments on mandatory/optional handlers.

8 years agosys/dev/disk/dm: Rename aprint_debug() to dmdebug()
Tomohiro Kusumi [Mon, 9 Nov 2015 10:21:17 +0000 (19:21 +0900)]
sys/dev/disk/dm: Rename aprint_debug() to dmdebug()

Not sure what aprint is, but dmdebug() is better considering
this macro does
    if (dm_debug_level) kprintf(...);

8 years agosys/dev/disk/dm: Add dm_alloc_string()
Tomohiro Kusumi [Mon, 9 Nov 2015 09:56:38 +0000 (18:56 +0900)]
sys/dev/disk/dm: Add dm_alloc_string()

Add dm_alloc_string() which kmallocs char* from M_DM.

It was confusing that targets had to use M_DM for status
purpose while targets had their own M_DMXXX. Using this
wrapper function makes target code less error prone when
allocating a string without an extra comment on usage.

8 years agosys/dev/disk/dm: Remove misleading code/comment on linear target arg
Tomohiro Kusumi [Mon, 9 Nov 2015 09:50:48 +0000 (18:50 +0900)]
sys/dev/disk/dm: Remove misleading code/comment on linear target arg

The offset arg is mandatory.
Remove code and comment that makes it sounds like it's optional.

8 years agodrm: Don't leak memory from linux_workqueue.c
Imre Vadász [Sun, 8 Nov 2015 16:06:53 +0000 (17:06 +0100)]
drm: Don't leak memory from linux_workqueue.c

8 years agocldr2def: Pad CJK short months
John Marino [Sun, 8 Nov 2015 16:47:44 +0000 (17:47 +0100)]
cldr2def: Pad CJK short months

Since 2001, FreeBSD has padded the first 9 abbreviated month names
with a space for the CJK locales.  This allows them to line up.
This alternation will return the padding to avoid a regression
for users (and avoid having to hand-edit the source files)

8 years agosys/dev/disk/dm: Fix/refactor TAILQ_HEAD structure
Tomohiro Kusumi [Sun, 8 Nov 2015 07:41:12 +0000 (16:41 +0900)]
sys/dev/disk/dm: Fix/refactor TAILQ_HEAD structure

Some minor fixes.

Initialize TAILQs in init() since they are removed and freed
in uninit(). Not doing it in init() works only when init() is
guaranteed to be called once.

8 years agosys/dev/disk/dm: Fix table/info priority
Tomohiro Kusumi [Sat, 7 Nov 2015 22:46:43 +0000 (07:46 +0900)]
sys/dev/disk/dm: Fix table/info priority

Fix conditional in dm_table_status() added in e243a4fb to
avoid a potential bug, where DM_STATUS_TABLE_FLAG is set,
but table() handler is NULL, and results calling info().

Currently there are no target that implements info() but
does not implement table() (see f134a703 and 54b60c60).
Therefore this isn't likely to happen, but should be fixed
to avoid a potential bug.

8 years agosys/dev/disk/dm: Use uint32_t for flags
Tomohiro Kusumi [Sat, 7 Nov 2015 22:17:01 +0000 (07:17 +0900)]
sys/dev/disk/dm: Use uint32_t for flags

since libprop uses uint32 APIs for this.

8 years agosys/dev/disk/dm: Change DM_XXX_FLAG() to inline functions
Tomohiro Kusumi [Sat, 7 Nov 2015 21:49:04 +0000 (06:49 +0900)]
sys/dev/disk/dm: Change DM_XXX_FLAG() to inline functions

These shouldn't be macros IMO.

8 years agosys/dev/disk/dm: Cleanup dm_dbg_print_flags()
Tomohiro Kusumi [Sat, 7 Nov 2015 21:25:40 +0000 (06:25 +0900)]
sys/dev/disk/dm: Cleanup dm_dbg_print_flags()

Some minor fixes.

8 years agosys/dev/disk/dm: Whitespace cleanups
Tomohiro Kusumi [Sat, 7 Nov 2015 21:16:31 +0000 (06:16 +0900)]
sys/dev/disk/dm: Whitespace cleanups

8 years agosys/dev/disk/dm: Fix typo
Tomohiro Kusumi [Sat, 7 Nov 2015 22:09:01 +0000 (07:09 +0900)]
sys/dev/disk/dm: Fix typo

"striped" is the name of this target.

8 years agolocaledef: Replace avl tree (cddl) with RB tree, plus ...
John Marino [Sat, 7 Nov 2015 19:45:40 +0000 (20:45 +0100)]
localedef: Replace avl tree (cddl) with RB tree, plus ...

When FreeBSD adopted DragonFly's locales, the AVL tree code was replaced
with an RB tree equivalent. While cddl wasn't an issue here, let's bring
in FreeBSD's changes since they did the work.

Some other changes:
 * replace (safe) strcpy+strncat with snprintf
 * rework charmap types/prototypes to remove GCC pragmas
 * Support case where wchar_t is an unsigned int (ARM)
 * Change -D "DragonFly-style" option description to -D "BSD-style"

8 years agotree.h: Restore ability to generate static functions
John Marino [Sat, 7 Nov 2015 23:42:43 +0000 (00:42 +0100)]
tree.h: Restore ability to generate static functions

These two functions were hardcodes as "static" before the previous
commit which removed the qualifier.  Instead, "static" should have
been changed to the the STORQUAL macro argument.

Doing so now fixes static RB function generation.

8 years agosys/dev/disk/dm: Refactor dm_table_status_ioctl()
Tomohiro Kusumi [Sat, 7 Nov 2015 17:55:24 +0000 (02:55 +0900)]
sys/dev/disk/dm: Refactor dm_table_status_ioctl()

dm_table_status_ioctl() is getting messy, so separate
table/info handler related part into a different function.

prop_dictionary_set_cstring(target_dict, DM_TABLE_PARAMS, "");
is necessary when table/info handlers aren't supported or
handlers return NULL. See a6cf5418.

8 years agosys/dev/disk/dm: Don't force targets to implement table handler
Tomohiro Kusumi [Sat, 7 Nov 2015 17:37:59 +0000 (02:37 +0900)]
sys/dev/disk/dm: Don't force targets to implement table handler

All targets implementing table handler is redundant as some
of them don't need to do anything. Avoid it by a simple NULL
check, just like what's been done to other handlers.

8 years agodrm: Add ktime_get_raw_ns()
François Tigeot [Sat, 7 Nov 2015 16:11:27 +0000 (17:11 +0100)]
drm: Add ktime_get_raw_ns()

8 years agosys/dev/disk/dm: Remove unnecessary dump=NULL;
Tomohiro Kusumi [Sat, 7 Nov 2015 14:55:00 +0000 (23:55 +0900)]
sys/dev/disk/dm: Remove unnecessary dump=NULL;

8 years agosys/dev/disk/dm: Remove upcall handler
Tomohiro Kusumi [Sat, 7 Nov 2015 14:05:09 +0000 (23:05 +0900)]
sys/dev/disk/dm: Remove upcall handler

dm target's upcall() handler
  int (*upcall)(dm_table_entry_t *, struct buf *);
implemented by dm targets acutally do nothing other than
returning 0. Also note that upcall() is not used by dm core.

The targets that are supposed to be relying on this api are
obviously not working at the moment, however things aren't
as simple as just implementing missing upcall() handler.

upcall() is supposed to be something to do with targets like
snapshot, but it lacks documentation and purpose of this api
is not clear at all. Whoever tries to implement snapshot/etc
will have to re-design dm core and appropriate handlers from
scratch anyway without using the existing one.

8 years agodrm/i915: Rename the kernel module to i915.ko
François Tigeot [Sat, 7 Nov 2015 12:49:36 +0000 (13:49 +0100)]
drm/i915: Rename the kernel module to i915.ko

* Giving it the same name than on Linux

* Bump __DragonFly_version

8 years agodrm: Make dev.dri.X node creation work properly with multiple drm devices.
Imre Vadász [Fri, 6 Nov 2015 21:14:18 +0000 (22:14 +0100)]
drm: Make dev.dri.X node creation work properly with multiple drm devices.

Just use the device unit number for the sysctl node name.

8 years agocorepower: Use rdmsr_safe to check availibility of the MSRs first.
Imre Vadász [Thu, 5 Nov 2015 21:16:06 +0000 (22:16 +0100)]
corepower: Use rdmsr_safe to check availibility of the MSRs first.

This should avoid panic-ing in virtual machines where the RAPL MSRs are
not available.

8 years agoReplace our soelim(1) with FreeBSD's.
Sascha Wildner [Sat, 7 Nov 2015 08:32:05 +0000 (09:32 +0100)]
Replace our soelim(1) with FreeBSD's.

Before, DragonFly used Bill Joy's original UCB version, which we inherited
from FreeBSD 4. We never switched to groff's version like they did later.
A year ago they replaced groff's version with one written by bapt.

dports needs features from it which our version doesn't provide.

Pointed-out-by: marino
8 years agokernel/if_re: Add support for the Realtek 8168H.
Sascha Wildner [Fri, 6 Nov 2015 23:20:28 +0000 (00:20 +0100)]
kernel/if_re: Add support for the Realtek 8168H.

It is found in the Intel NUC5CPYH, for example.

Adapted from FreeBSD.

Reported-and-tested-by: Michael Iline <michael.iline@yahoo.com>
8 years ago<sys/cdefs.h>: Align some indent (no functional change).
Sascha Wildner [Thu, 5 Nov 2015 19:41:51 +0000 (20:41 +0100)]
<sys/cdefs.h>: Align some indent (no functional change).

8 years agosys/dev/disk/dm: Disable 2nd level bio_done handler for striped target
Tomohiro Kusumi [Thu, 5 Nov 2015 14:59:53 +0000 (23:59 +0900)]
sys/dev/disk/dm: Disable 2nd level bio_done handler for striped target

Disable 2nd level bio added by the previous commit for now.

All it does is count # of i/o error if any, and it probably
doesn't worth imposing 2 levels of callback for each stripe
device just to do this. Changing netiobuf makes it possible
to do this without using stacked bios, but that requires
(not large but) modification to netiobuf in vfs.

8 years agosys/dev/disk/dm: Add 2nd level bio_done handler for striped target
Tomohiro Kusumi [Wed, 4 Nov 2015 13:03:05 +0000 (22:03 +0900)]
sys/dev/disk/dm: Add 2nd level bio_done handler for striped target

As mentioned in b48c316c, dm-striped target needs to have its
own callback in order to make use of error counter. It could
be done by either modifying netiobuf code or using stacked bio,
but using stacked bio seems to be the right approach here as
it doesn't modify the existing netiobuf bio code.

This commit adds bio_done handler for nbio (the 2nd level bio
after pushing the original bio), and make the handler increment
num_error field of a stripe device if i/o error is detected.

8 years agosys/kern/vfs: Add comment on buf(9) manpage
Tomohiro Kusumi [Thu, 5 Nov 2015 16:02:31 +0000 (01:02 +0900)]
sys/kern/vfs: Add comment on buf(9) manpage

man buf(9) is obsolete and doesn't reflect implementation
although the manpage doesn't say so.

8 years agosys/kern/vfs: Fix wrong function name in panic()
Tomohiro Kusumi [Thu, 5 Nov 2015 16:24:27 +0000 (01:24 +0900)]
sys/kern/vfs: Fix wrong function name in panic()

8 years agosys/kern/vfs: Fix wrong function name in kprintf/panic
Tomohiro Kusumi [Thu, 5 Nov 2015 13:35:03 +0000 (22:35 +0900)]
sys/kern/vfs: Fix wrong function name in kprintf/panic

ae8e83e6e in 2009 renamed biodone() to bpdone(), and made
bpdone() to be called by the new biodone() implementation
as well as other callers, but the function names used in
kprintf() and panic() were not updated to "bpdone:".

bpdone() isn't exclusively used by biodone(), so it should
use a proper function name.

8 years agosys/dev/disk/dm: Cleanups
Tomohiro Kusumi [Wed, 4 Nov 2015 14:10:48 +0000 (23:10 +0900)]
sys/dev/disk/dm: Cleanups

minor fix and typos.

8 years agosys/dev/disk/dm: Remove redundant kprintf in dm strategy
Tomohiro Kusumi [Wed, 4 Nov 2015 13:41:09 +0000 (22:41 +0900)]
sys/dev/disk/dm: Remove redundant kprintf in dm strategy

Having two kprintf("------...\n"); before and after debug
messages is redundant since they mostly end up printing
two consecutive lines. One of them could be removed.

8 years agosys/vfs/hammer: Add HAMMER_ITOB() macro
Tomohiro Kusumi [Tue, 3 Nov 2015 14:25:40 +0000 (23:25 +0900)]
sys/vfs/hammer: Add HAMMER_ITOB() macro

to hide explicit cast from C code so the impact will be small
on possible data structure change. No change in binary.

8 years agouipc: Use token for rights counting
Sepherosa Ziehau [Fri, 6 Nov 2015 08:04:16 +0000 (16:04 +0800)]
uipc: Use token for rights counting

This is mainly used to avoid races stemming from f_msgcount accessing
w/o unp_spin.

8 years agouipc: Factor out unp_{add,del}_right()
Sepherosa Ziehau [Fri, 6 Nov 2015 01:56:26 +0000 (09:56 +0800)]
uipc: Factor out unp_{add,del}_right()

8 years agocompilers.conf: nextclang => clangnext
John Marino [Thu, 5 Nov 2015 11:22:17 +0000 (12:22 +0100)]
compilers.conf: nextclang => clangnext

After thinking about it, we want to keep the clang compilers starting
with "clang" so that make can filter for it, e.g. ".if ${CC:Mclang*}".

8 years agocompilers.conf: Add the two latest clangs to options
John Marino [Thu, 5 Nov 2015 10:59:19 +0000 (11:59 +0100)]
compilers.conf: Add the two latest clangs to options

This adds "clang37" and "nextclang" defaults to compilers.conf.
Note that nextclang has a new port: devel/llvm-devel.  In fact
lang/clang37 is just a metaport that builds devel/llvm37.

"nextclang" will change over time.  Currently it's the precursor to
clang38, but once llvm3.8 is released, it will become the precursor
to clang 3.9 (or whatever comes after 3.8)

8 years agouipc: Consolidate unp_drop()
Sepherosa Ziehau [Thu, 5 Nov 2015 01:43:28 +0000 (09:43 +0800)]
uipc: Consolidate unp_drop()

And unlink unp from the global unp list in unp_drop(); this is intended
to address following problems:
- Detached unps are listed by netstat/sockstat.
- Unp can not be referenced during unp global list iteration.

8 years agoPut finishing touches on libexecinfo import.
Sascha Wildner [Wed, 4 Nov 2015 18:58:25 +0000 (19:58 +0100)]
Put finishing touches on libexecinfo import.

* Bump date to when it was imported.

* Fix a typo in a function name.

* Since libelf is an internal library in DragonFly, comment out
  references to its manual page.

* Fix the .Lb libexecinfo.

* Make libexecinfo usable in DPADD=... in Makefiles.

8 years agohammer.8: Use full month name in .Dd
Sascha Wildner [Wed, 4 Nov 2015 18:19:06 +0000 (19:19 +0100)]
hammer.8: Use full month name in .Dd

8 years agoftp(1): Complete upgrade from 7 JUN 2014 to 10 OCT 2015
John Marino [Wed, 4 Nov 2015 17:58:21 +0000 (18:58 +0100)]
ftp(1): Complete upgrade from 7 JUN 2014 to 10 OCT 2015

The source for ntftp has changed from cvs of NetBSD's repository to the
tarballs that NetBSD formally releases.  These releases also form the
basis of the ftp/tnftp dport.

8 years agocontrib/tnftp: Add back what's left of local modifications
John Marino [Wed, 4 Nov 2015 17:54:12 +0000 (18:54 +0100)]
contrib/tnftp: Add back what's left of local modifications

Most of the big modification to fetch.c added by dillon is already
present in the source.  The only thing that remained was pre-processing
out the use of popen in all cases.

The other two small patches have been carried for years.

8 years agoMerge branch 'vendor/TNFTP'
John Marino [Wed, 4 Nov 2015 18:16:44 +0000 (19:16 +0100)]
Merge branch 'vendor/TNFTP'

8 years agocontrib/tnftp: Delete entire contents prior to merge
John Marino [Wed, 4 Nov 2015 17:22:36 +0000 (18:22 +0100)]
contrib/tnftp: Delete entire contents prior to merge

Due to a file hierarchy change, merging with the vendor branch will
very difficult.  It's easier to wipe everything and resync to the
vendor branch manually (auto-merge will fail everywhere).  I've
the local modifications although half of them are cruft from various
upgrades.

8 years agoVendor branch: Upgrade from CVS (7 JUN 2014) to release (20151004) gitea/vendor/TNFTP origin/vendor/TNFTP
John Marino [Wed, 4 Nov 2015 16:54:26 +0000 (17:54 +0100)]
Vendor branch: Upgrade from CVS (7 JUN 2014) to release (20151004)

Since 2006, DragonFly has synced with NetBSD's TNFTP program using CVS.
This isn't necessary; NetBSD actually publishes releases.  Let's move
over to the release tarballs from this point forward.

The file hierarchy changes as a result; the sources files in the tarball
are located in the "src" subdirectory.

8 years agolocales: Remove two more aliases (ja_JP.eucjp and en_US.ISO-8859-1)
John Marino [Wed, 4 Nov 2015 16:08:01 +0000 (17:08 +0100)]
locales: Remove two more aliases (ja_JP.eucjp and en_US.ISO-8859-1)

There was an earlier effort to define common locales (arising from
Linux's case-and-hyphen insensitivity) and they were going to be
removed when our locale handling followed Linux behavior, but it was
decided that we would and should not follow Linux's example.

Since then and through collaborative discussions with FreeBSD, it
was decided these common-but-incorrect-for-BSD aliases should not
continue.  FreeBSD will never get them and I'm removing ours.

8 years agolibdialog: Complete upgrade v1.2-20121230 => v1.2-20150920
John Marino [Wed, 4 Nov 2015 15:50:49 +0000 (16:50 +0100)]
libdialog: Complete upgrade v1.2-20121230 => v1.2-20150920

8 years agoMerge branch 'vendor/DIALOG'
John Marino [Wed, 4 Nov 2015 15:56:22 +0000 (16:56 +0100)]
Merge branch 'vendor/DIALOG'

8 years agocontrib/dialog: Delete entire contents
John Marino [Wed, 4 Nov 2015 15:31:33 +0000 (16:31 +0100)]
contrib/dialog: Delete entire contents

There is a vendor/DIALOG branch which is supposed to feed in the
contents of the contrib/dialog directory via a vendor branch merge.
It was never merged though.  The contents of vendor/DIALOG are just
a copy of the vendor/branch so it's impossible to update via the
normal update-vendor-branch-merge-again process.

To fix, we delete everything and merge for the first time.  The
next commit will merge the dialog source updates.

8 years agoVendor branch: Update dialog 1.2-20121230 => 1.2-20150920 gitea/vendor/DIALOG origin/vendor/DIALOG
John Marino [Wed, 4 Nov 2015 15:19:03 +0000 (16:19 +0100)]
Vendor branch: Update dialog 1.2-20121230 => 1.2-20150920

The README.DELETED file is getting moved to trunk.

8 years agoAdd local path for sendmail libexec.
Justin C. Sherrill [Wed, 4 Nov 2015 15:21:34 +0000 (10:21 -0500)]
Add local path for sendmail libexec.

Since DragonFly ships with DMA, but there's still a dragonfly.mc, any
install of sendmail from ports will still use /etc/mail to generate a config.
This will generally work, but EBINDIR defaults to /usr/libexec.  That means
the .cf files will be built to find mail.local in /usr/libexec, instead of
in /usr/local/libexec, where the port locates them.  This will cause problems
for anything that delivers mail locally, like fetchmail.

8 years agoComplete upgrade of tcsh 6.18.01 => 6.19.00
John Marino [Wed, 4 Nov 2015 13:55:12 +0000 (14:55 +0100)]
Complete upgrade of tcsh 6.18.01 => 6.19.00

8 years agoReapply local modifications to tcsh source after merge
John Marino [Wed, 4 Nov 2015 13:23:20 +0000 (14:23 +0100)]
Reapply local modifications to tcsh source after merge

There are no longer modifications to:
   ed.screen.c
   gethost.c

The previous changes were made upstream.

8 years agoMerge branch 'vendor/TCSH'
John Marino [Wed, 4 Nov 2015 14:37:50 +0000 (15:37 +0100)]
Merge branch 'vendor/TCSH'

8 years agoRevert tcsh local modifications to ensure clean merge
John Marino [Wed, 4 Nov 2015 13:17:40 +0000 (14:17 +0100)]
Revert tcsh local modifications to ensure clean merge

8 years agoVendor branch: upgrade tcsh from 6.18.01 to 6.19.00 gitea/vendor/TCSH origin/vendor/TCSH
John Marino [Wed, 4 Nov 2015 13:14:22 +0000 (14:14 +0100)]
Vendor branch: upgrade tcsh from 6.18.01 to 6.19.00

8 years agouipc: Use fdrop instead of closef
Sepherosa Ziehau [Wed, 4 Nov 2015 14:12:28 +0000 (22:12 +0800)]
uipc: Use fdrop instead of closef

8 years agogrep(1): Upgrade version 2.20 => 2.22
John Marino [Wed, 4 Nov 2015 11:55:13 +0000 (12:55 +0100)]
grep(1): Upgrade version 2.20 => 2.22

release 2.21 (2014-11-23) [stable]
** Improvements
  Performance has been greatly improved for searching files containing
    holes, on platforms where lseek's SEEK_DATA flag works efficiently.
  Performance has improved for rejecting data that cannot match even
    the first part of a nontrivial pattern.
  Performance has improved for very long strings in patterns.
  If a file contains data improperly encoded for the current locale,
    and this is discovered before any of the file's contents are output,
    grep now treats the file as binary.
  grep -P no longer reports an error and exits when given invalid UTF-8
    data. Instead, it considers the data to be non-matching.
** Bug fixes
  grep no longer mishandles patterns that contain \w or \W in multibyte
    locales.
  grep would fail to count newlines internally when operating in non-UTF8
    multibyte locales, leading it to print potentially many lines that did
    not match.  E.g., the command, "seq 10 | env LC_ALL=zh_CN src/grep -n
    .." would print this:
      1:1
      2
      3
      4
      5
      6
      7
      8
      9
      10
     implying that the match, "10" was on line 1.
     [bug introduced in grep-2.19]
  grep -F -x -o no longer prints an extra newline for each match.
    [bug introduced in grep-2.19]
  grep in a non-UTF8 multibyte locale could mistakenly match in the middle
    of a multibyte character when using a '^'-anchored alternate in a
    pattern, leading it to print non-matching lines.  [bug present since
    "the beginning"]
  grep -F Y no longer fails to match in non-UTF8 multibyte locales like
    Shift-JIS, when the input contains a 2-byte character, XY, followed by
    the single-byte search pattern, Y.  grep would find the first, middle-
    of-multibyte matching "Y", and then mistakenly advance an internal
    pointer one byte too far, skipping over the target "Y" just after
    that. [bug introduced in grep-2.19]
  grep -E rejected unmatched ')', instead of treating it like '\)'.
    [bug present since "the beginning"]
  On NetBSD, grep -r no longer reports "Inappropriate file type or format"
    when refusing to follow a symbolic link.
    [bug introduced in grep-2.12]
** Changes in behavior
  The GREP_OPTIONS environment variable is now obsolescent, and grep
    now warns if it is used.  Please use an alias or script instead.
  In locales with multibyte character encodings other than UTF-8,
    grep -P now reports an error and exits instead of misbehaving.
  When searching binary data, grep now may treat non-text bytes as
    line terminators.  This can boost performance significantly.
  grep -z no longer automatically treats the byte '\200' as binary data.

release 2.22 (2015-11-01) [stable]
** Improvements
  Performance has improved for patterns containing very long strings,
    reducing preprocessing time for an N-byte regexp from O(N^2) to
    only slightly superlinear for most patterns.  Before, a command like
    the following would take over a minute, but now, it takes less than
    a second:
    : | grep -f <(seq -s '' 99999)
  When building grep, 'configure' now uses PCRE's pkg-config module for
    configuration information, rather than attempting to guess it by hand.
** Bug fixes
  A DFA matcher bug made this command mistakenly print its input line:
      echo axb | grep -E '^x|x$'
    Likewise for this equivalent command:
      echo axb | grep -e '^x' -e 'x$'
    [bug introduced in grep-2.19 ]
  grep no longer reads from uninitialized memory or from beyond the end
    of the heap-allocated input buffer.  This fix addressed CVE-2015-1345.
    [bug introduced in grep-2.19 ]
  With -z, '.' and '[^x]' in a pattern now consistently match newline.
    Previously, they sometimes matched newline, and sometimes did not.
    [bug introduced in grep-2.4]
  When the JIT stack is exhausted, grep -P now grows the stack rather
    than reporting an internal PCRE error.
  'grep -D skip PATTERN FILE' no longer hangs if FILE is a fifo.
    [bug introduced in grep-2.12]
  --exclude and related options are now matched against entire
    command-line arguments, not against command-line components.
    [bug introduced in grep-2.6]
  Fix performance degradation of grep -Fw in unibyte locales.
    [bug introduced in grep-2.19]

8 years agoMerge branch 'vendor/GREP'
John Marino [Wed, 4 Nov 2015 12:38:11 +0000 (13:38 +0100)]
Merge branch 'vendor/GREP'

8 years agoVendor branch: upgrade grep from 2.20 => 2.22 gitea/vendor/GREP origin/vendor/GREP
John Marino [Wed, 4 Nov 2015 11:06:31 +0000 (12:06 +0100)]
Vendor branch: upgrade grep from 2.20 => 2.22

8 years agoRemove old lzma.h file via 'make upgrade'.
Sascha Wildner [Wed, 4 Nov 2015 11:01:40 +0000 (12:01 +0100)]
Remove old lzma.h file via 'make upgrade'.

It is installed in /usr/include directly.

8 years agobinutils225: Update to 2.25.1 (bug-fix release)
John Marino [Wed, 4 Nov 2015 09:23:15 +0000 (10:23 +0100)]
binutils225: Update to 2.25.1 (bug-fix release)

8 years agoMerge branch 'vendor/BINUTILS225'
John Marino [Wed, 4 Nov 2015 09:36:11 +0000 (10:36 +0100)]
Merge branch 'vendor/BINUTILS225'

8 years agoVendor branch: Upgrade binutils 2.25 => 2.25.1
John Marino [Wed, 4 Nov 2015 09:11:25 +0000 (10:11 +0100)]
Vendor branch: Upgrade binutils 2.25 => 2.25.1

8 years agorevoke.2: Update manpage for ea8f324c34cc7837fa0cc397d329322bee5f99b9
Sepherosa Ziehau [Wed, 4 Nov 2015 08:44:17 +0000 (16:44 +0800)]
revoke.2: Update manpage for ea8f324c34cc7837fa0cc397d329322bee5f99b9

8 years agouipc: Use CTASSERT to simplify the externalize/internalize code
Sepherosa Ziehau [Wed, 4 Nov 2015 03:31:32 +0000 (11:31 +0800)]
uipc: Use CTASSERT to simplify the externalize/internalize code

8 years agouipc: Remove unnecessary unp_token in unp_dispose()
Sepherosa Ziehau [Wed, 4 Nov 2015 03:09:05 +0000 (11:09 +0800)]
uipc: Remove unnecessary unp_token in unp_dispose()

8 years agosocket: Dispose rights directly in soreceive(), if them are not wanted
Sepherosa Ziehau [Wed, 4 Nov 2015 02:38:13 +0000 (10:38 +0800)]
socket: Dispose rights directly in soreceive(), if them are not wanted

Instead of leaving them to unp_gc().  This paves the way to simplify
unp_gc() and to remove filehead.

While I'm here, minor style changes.

8 years agoComplete upgrade of libedit from 2014-06-20 to 2015-03-25
John Marino [Tue, 3 Nov 2015 23:46:37 +0000 (00:46 +0100)]
Complete upgrade of libedit from 2014-06-20 to 2015-03-25

8 years agoMerge branch 'vendor/LIBEDIT'
John Marino [Tue, 3 Nov 2015 23:58:27 +0000 (00:58 +0100)]
Merge branch 'vendor/LIBEDIT'

Conflicts:
contrib/libedit/src/chartype.h
contrib/libedit/src/eln.c

8 years agolibedit: Revert locale modification that modifies locale
John Marino [Tue, 3 Nov 2015 23:27:04 +0000 (00:27 +0100)]
libedit: Revert locale modification that modifies locale

The intent was just to query the current locale, not change it.
Original modificatoin came from FreeBSD which also reverted it.

8 years agoUpdate libedit from version 2014-06-20 to 2015-03-25 on vendor branch gitea/vendor/LIBEDIT origin/vendor/LIBEDIT
John Marino [Tue, 3 Nov 2015 23:23:15 +0000 (00:23 +0100)]
Update libedit from version 2014-06-20 to 2015-03-25 on vendor branch

8 years agolib/: Fix library build dependencies
John Marino [Tue, 3 Nov 2015 22:48:42 +0000 (23:48 +0100)]
lib/: Fix library build dependencies

Several libraries were not listed in the SUBDIR_ORDERED definition,
but should have been.  Many of these were accounted for in the
_prebuild_libs functionality of Makefile.inc1.  The rest were far
down on the alphabetical list and probably satisfied their dependency
requirements by luck (implying a machine with a sufficiently high
-j number would fail so lib/ wasn't jobs safe).

I've listed all the libraries that link to other libraries or have
other libraries (within lib/) link to them in SUBDIR_ORDERED.  I've
completed the requirement annotations and separated them
requirements that are handled by Makefile.inc1 so it's clear. This
results with seven libraries moving from the alphabetical list to
the ordered list.

This makes the "serial" part of the lib/ building pretty long and
unnecessarily long, but it's not possible to get to a lower granularity
with the current framework without creating a new level (having the
subdirectories with their own library subdirectories, similar to
how gcc50 was implemented).

8 years agounbreak full buildworld (liblzma order again)
John Marino [Tue, 3 Nov 2015 20:03:18 +0000 (21:03 +0100)]
unbreak full buildworld (liblzma order again)

The lzma library is part of the "prebuild libraries" group in
the buildworld makefile.  Once the pthread library was required
for the latest verson of xz, the order of lzma building had to
move after the pthread library.  This unbreaks the build after
the XZ upgrade.

8 years agolib: Add liblzma to the build order
John Marino [Tue, 3 Nov 2015 13:34:49 +0000 (14:34 +0100)]
lib: Add liblzma to the build order

The latest liblzma now requires libpthread and thus it must be
guaranteed to be built before liblzma is built.  Move liblzma into
the library ordering accordingly.

8 years agoxz: Upgrade from version 5.0.7 to 5.2.2
John Marino [Tue, 3 Nov 2015 11:06:24 +0000 (12:06 +0100)]
xz: Upgrade from version 5.0.7 to 5.2.2

See vendor branch commit for the many changes, including parallel
compression with multiple threads.

8 years agoMerge branch 'vendor/XZ'
John Marino [Tue, 3 Nov 2015 12:13:43 +0000 (13:13 +0100)]
Merge branch 'vendor/XZ'

8 years agoUpgrade xz from 5.0.7 to 5.2.2 on the vendor branch gitea/vendor/XZ origin/vendor/XZ
John Marino [Tue, 3 Nov 2015 10:21:55 +0000 (11:21 +0100)]
Upgrade xz from 5.0.7 to 5.2.2 on the vendor branch

5.2.2 (2015-09-29)
    * Fixed bugs in QNX-specific code.
    * Omitted the use of pipe2() even if it is available to avoid
      portability issues with some old Linux and glibc combinations.
    * Updated German translation.
    * Added project files to build static and shared liblzma (not the
      whole XZ Utils) with Visual Studio 2013 update 2 or later.
    * Documented that threaded decompression hasn't been implemented
      yet. A 5.2.0 NEWS entry describing multi-threading support had
      incorrectly said "decompression" when it should have said
      "compression".
5.2.1 (2015-02-26)
    * Fixed a compression-ratio regression in fast mode of LZMA1 and
      LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
    * Fixed a portability problem in xz that affected at least OpenBSD.
    * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
      from most other mktemp implementations.
    * Changed CPU core count detection to use cpuset_getaffinity() on
      FreeBSD.
5.2.0 (2014-12-21)
    Since 5.1.4beta:
    * All fixes from 5.0.8
    * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
      was used.
    * xzdiff: If mktemp isn't installed, mkdir will be used as
      a fallback to create a temporary directory. Installing mktemp
      is still recommended.
    * Updated French, German, Italian, Polish, and Vietnamese
      translations.
    Summary of fixes and new features added in the 5.1.x development
    releases:
    * liblzma:
        - Added support for multi-threaded compression. See the
          lzma_mt structure, lzma_stream_encoder_mt(), and
          lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
          lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
          in <lzma/hardware.h> for details.
        - Made the uses of lzma_allocator const correct.
        - Added lzma_block_uncomp_encode() to create uncompressed
          .xz Blocks using LZMA2 uncompressed chunks.
        - Added support for LZMA_IGNORE_CHECK.
        - A few speed optimizations were made.
        - Added support for symbol versioning. It is enabled by default
          on GNU/Linux, other GNU-based systems, and FreeBSD.
        - liblzma (not the whole XZ Utils) should now be buildable
          with MSVC 2013 update 2 or later using windows/config.h.
    * xz:
        - Fixed a race condition in the signal handling. It was
          possible that e.g. the first SIGINT didn't make xz exit
          if reading or writing blocked and one had bad luck. The fix
          is non-trivial, so as of writing it is unknown if it will be
          backported to the v5.0 branch.
        - Multi-threaded compression can be enabled with the
          --threads (-T) option.
          [Fixed: This originally said "decompression".]
        - New command line options in xz: --single-stream,
          --block-size=SIZE, --block-list=SIZES,
          --flush-timeout=TIMEOUT, and --ignore-check.
        - xz -lvv now shows the minimum xz version that is required to
          decompress the file. Currently it is 5.0.0 for all supported
          .xz files except files with empty LZMA2 streams require 5.0.2.
    * xzdiff and xzgrep now support .lzo files if lzop is installed.
      The .tzo suffix is also recognized as a shorthand for .tar.lzo.
5.1.4beta (2014-09-14)
    * All fixes from 5.0.6
    * liblzma: Fixed the use of presets in threaded encoder
      initialization.
    * xz --block-list and --block-size can now be used together
      in single-threaded mode. Previously the combination only
      worked in multi-threaded mode.
    * Added support for LZMA_IGNORE_CHECK to liblzma and made it
      available in xz as --ignore-check.
    * liblzma speed optimizations:
        - Initialization of a new LZMA1 or LZMA2 encoder has been
          optimized. (The speed of reinitializing an already-allocated
          encoder isn't affected.) This helps when compressing many
          small buffers with lzma_stream_buffer_encode() and other
          similar situations where an already-allocated encoder state
          isn't reused. This speed-up is visible in xz too if one
          compresses many small files one at a time instead running xz
          once and giving all files as command-line arguments.
        - Buffer comparisons are now much faster when unaligned access
          is allowed (configured with --enable-unaligned-access). This
          speeds up encoding significantly. There is arch-specific code
          for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
          results and there's no run-time CPU detection for now).
          For other archs there is only generic code which probably
          isn't as optimal as arch-specific solutions could be.
        - A few speed optimizations were made to the SHA-256 code.
          (Note that the builtin SHA-256 code isn't used on all
          operating systems.)
    * liblzma can now be built with MSVC 2013 update 2 or later
      using windows/config.h.
    * Vietnamese translation was added.
5.1.3alpha (2013-10-26)
    * All fixes from 5.0.5
    * liblzma:
        - Fixed a deadlock in the threaded encoder.
        - Made the uses of lzma_allocator const correct.
        - Added lzma_block_uncomp_encode() to create uncompressed
          .xz Blocks using LZMA2 uncompressed chunks.
        - Added support for native threads on Windows and the ability
          to detect the number of CPU cores.
    * xz:
        - Fixed a race condition in the signal handling. It was
          possible that e.g. the first SIGINT didn't make xz exit
          if reading or writing blocked and one had bad luck. The fix
          is non-trivial, so as of writing it is unknown if it will be
          backported to the v5.0 branch.
        - Made the progress indicator work correctly in threaded mode.
        - Threaded encoder now works together with --block-list=SIZES.
        - Added preliminary support for --flush-timeout=TIMEOUT.
          It can be useful for (somewhat) real-time streaming. For
          now the decompression side has to be done with something
          else than the xz tool due to how xz does buffering, but this
          should be fixed.
5.1.2alpha (2012-07-04)
    * All fixes from 5.0.3 and 5.0.4
    * liblzma:
        - Fixed a deadlock and an invalid free() in the threaded encoder.
        - Added support for symbol versioning. It is enabled by default
          on GNU/Linux, other GNU-based systems, and FreeBSD.
        - Use SHA-256 implementation from the operating system if one is
          available in libc, libmd, or libutil. liblzma won't use e.g.
          OpenSSL or libgcrypt to avoid introducing new dependencies.
        - Fixed liblzma.pc for static linking.
        - Fixed a few portability bugs.
    * xz --decompress --single-stream now fixes the input position after
      successful decompression. Now the following works:
          echo foo | xz > foo.xz
          echo bar | xz >> foo.xz
          ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
      Note that it doesn't work if the input is not seekable
      or if there is Stream Padding between the concatenated
      .xz Streams.
    * xz -lvv now shows the minimum xz version that is required to
      decompress the file. Currently it is 5.0.0 for all supported .xz
      files except files with empty LZMA2 streams require 5.0.2.
    * Added an *incomplete* implementation of --block-list=SIZES to xz.
      It only works correctly in single-threaded mode and when
      --block-size isn't used at the same time. --block-list allows
      specifying the sizes of Blocks which can be useful e.g. when
      creating files for random-access reading.
5.1.1alpha (2011-04-12)
    * All fixes from 5.0.2
    * liblzma fixes that will also be included in 5.0.3:
        - A memory leak was fixed.
        - lzma_stream_buffer_encode() no longer creates an empty .xz
          Block if encoding an empty buffer. Such an empty Block with
          LZMA2 data would trigger a bug in 5.0.1 and older (see the
          first bullet point in 5.0.2 notes). When releasing 5.0.2,
          I thought that no encoder creates this kind of files but
          I was wrong.
        - Validate function arguments better in a few functions. Most
          importantly, specifying an unsupported integrity check to
          lzma_stream_buffer_encode() no longer creates a corrupt .xz
          file. Probably no application tries to do that, so this
          shouldn't be a big problem in practice.
        - Document that lzma_block_buffer_encode(),
          lzma_easy_buffer_encode(), lzma_stream_encoder(), and
          lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
        - The return values of the _memusage() functions are now
          documented better.
    * Support for multithreaded compression was added using the simplest
      method, which splits the input data into blocks and compresses
      them independently. Other methods will be added in the future.
      The current method has room for improvement, e.g. it is possible
      to reduce the memory usage.
    * Added the options --single-stream and --block-size=SIZE to xz.
    * xzdiff and xzgrep now support .lzo files if lzop is installed.
      The .tzo suffix is also recognized as a shorthand for .tar.lzo.
    * Support for short 8.3 filenames under DOS was added to xz. It is
      experimental and may change before it gets into a stable release.
5.0.8 (2014-12-21)
    * Fixed an old bug in xzgrep that affected OpenBSD and probably
      a few other operating systems too.
    * Updated French and German translations.
    * Added support for detecting the amount of RAM on AmigaOS/AROS.
    * Minor build system updates.

8 years agoFix various typos in manual pages.
Sascha Wildner [Tue, 3 Nov 2015 12:09:59 +0000 (13:09 +0100)]
Fix various typos in manual pages.

8 years agouipc: Reduce token coverage on detach path
Sepherosa Ziehau [Tue, 3 Nov 2015 03:42:28 +0000 (11:42 +0800)]
uipc: Reduce token coverage on detach path

8 years agouipc: Remove unnecessary socket ref/unref on detach path
Sepherosa Ziehau [Tue, 3 Nov 2015 03:38:28 +0000 (11:38 +0800)]
uipc: Remove unnecessary socket ref/unref on detach path

8 years agouipc: Hold unp_token before calling unp_find_lockref()
Sepherosa Ziehau [Tue, 3 Nov 2015 03:32:22 +0000 (11:32 +0800)]
uipc: Hold unp_token before calling unp_find_lockref()

Mainly to avoid name resolution and v_socket accessing races.
Add comment about it.

8 years agogdb: Unbreak building
Sepherosa Ziehau [Tue, 3 Nov 2015 03:07:12 +0000 (11:07 +0800)]
gdb: Unbreak building

8 years agolib: hook libelf and libexecinfo (in order) into the build
John Marino [Mon, 2 Nov 2015 23:18:13 +0000 (00:18 +0100)]
lib: hook libelf and libexecinfo (in order) into the build

The ELF library must be built before the execinfo library that uses it.
Bump the DragonFly version because ports will alter its behavior from this
point forward.

8 years agoAdd libexecinfo to lib directory, but leave it unhooked
John Marino [Tue, 3 Nov 2015 00:07:57 +0000 (01:07 +0100)]
Add libexecinfo to lib directory, but leave it unhooked

The execinfo library is used to fill in the backtrace of the currently
executing thread.  It originated in Linux and has found its way into a
lot of vendor software.  NetBSD created a BSD-licensed implementation
which FreeBSD imported a while back.

The execinfo library has been in FreeBSD since Release 10.  FreeBSD 9
is the only release that needs libexecinfo from ports and when that
release hits EOL, DragonFly could be left unsupported if ports
maintainers assumes libexecinfo is always available and removes USES
support for it.

To avoid this situation, bring libexecinfo into DragonFly's base for
the purpose of supporting ports.  It requires libelf which has also
been brought in as an internal library.

8 years agolibelf: Add libelf to lib directory, but leave it unhooked
John Marino [Mon, 2 Nov 2015 23:53:41 +0000 (00:53 +0100)]
libelf: Add libelf to lib directory, but leave it unhooked

The ELF library is part of FreeBSD's ELF Tool Chain project that has the
goal to be a drop-in replacement for binutils.  It isn't quite there yet
but the toolchain project has replaced most of the tools.  There may be
interest to bring the entire toolchain into DragonFly once the project is
production ready, but for now we are only interested in libelf.

This library is a required component for the incoming execinfo library.
The ELF library is for internal use only.  It will not be installed, but
instead only statically linked to the execinfo library.  The
contrib/elftoolchain directory has been arranged in a "placeholder"
fashion so the source for more of the tools can be added there later.

8 years agoAdd READMEs for ELF Tool Chain contrib directory
John Marino [Mon, 2 Nov 2015 23:46:21 +0000 (00:46 +0100)]
Add READMEs for ELF Tool Chain contrib directory

8 years agoMerge branch 'vendor/ELFTOOLCHAIN'
John Marino [Mon, 2 Nov 2015 23:44:27 +0000 (00:44 +0100)]
Merge branch 'vendor/ELFTOOLCHAIN'

8 years agoImport ELF Tool Chain r3255 into vendor branch gitea/vendor/ELFTOOLCHAIN origin/vendor/ELFTOOLCHAIN
John Marino [Mon, 2 Nov 2015 23:43:51 +0000 (00:43 +0100)]
Import ELF Tool Chain r3255 into vendor branch