dragonfly.git
9 years agoMerge branch 'vendor/LESS'
John Marino [Fri, 13 Mar 2015 16:35:25 +0000 (17:35 +0100)]
Merge branch 'vendor/LESS'

9 years agoUpdate less from version 458 to 471
John Marino [Fri, 13 Mar 2015 14:30:40 +0000 (15:30 +0100)]
Update less from version 458 to 471

9 years agogcc50: Update to 13 Mar 2015 snapshot (SVN 221423)
John Marino [Fri, 13 Mar 2015 13:24:26 +0000 (14:24 +0100)]
gcc50: Update to 13 Mar 2015 snapshot (SVN 221423)

New config headers were brought in for libstdc++ (thanks J.Wakely)
and libgomp.  The former enables some time-based functionality, the
latter I think has no net effect, it changed for libmpx which isn't
built on DragonFly currently.

9 years agoMerge branch 'vendor/GCC50'
John Marino [Fri, 13 Mar 2015 15:04:18 +0000 (16:04 +0100)]
Merge branch 'vendor/GCC50'

9 years agoUpdate gcc-50 to SVN version 221423
John Marino [Fri, 13 Mar 2015 13:20:38 +0000 (14:20 +0100)]
Update gcc-50 to SVN version 221423

Last Changed Date: 2015-03-13 14:48:21 +0100 (Fri, 13 Mar 2015)

9 years agortsock: Make sysctl NET_RT_DUMP MPSAFE.
Sepherosa Ziehau [Mon, 9 Mar 2015 14:28:15 +0000 (22:28 +0800)]
rtsock: Make sysctl NET_RT_DUMP MPSAFE.

- Add rn_walktree_at(), which walks the radix tree from a target node,
  if it could be found, or from the closest node of the target node.
- Allocate temporary buffer for rtm batch, which should be large enough
  for duplicated keys.  We could consider reallocate it if there are
  any real cases that this temporary buffer could not hold rtms for all
  duplicated keys.  In the current implementation, it just logs one
  error and stop.
- Convert the rtentries to rtms in temporary buffer in netisr; unlike
  what we do for inpcbs, routing table could be in inconsistent state
  (due to blocking malloc), if we are not accessing the routing table
  in netisr.  If there is no more space in the temporary buffer, the
  current rtentry's key and netmask are saved and we will start from it
  next time.  Since rn_walktree_at() only starts from the first node of
  duplicated keys, we have to make sure that there is enough space for
  all duplicated keys in the temoprary buffer.
- Once the temporary buffer can't hold more rtms, the rtms in it will
  be delivered to userland.  And we start converting the rtentries in
  netisr from the last node again, until all rtentries are iterated.

9 years agoipfw/ipfw3 - Document new sysctl, clean-up manual pages
Matthew Dillon [Fri, 13 Mar 2015 01:17:21 +0000 (18:17 -0700)]
ipfw/ipfw3 - Document new sysctl, clean-up manual pages

* Document the new net.filters_default_to_accept sysctl and tunable.

* Adjust the ipfw3 manual page to call the program 'ipfw3' rather
  than 'ipfw'.

9 years agoipfw/ipfw3 - Add pre-load sysctl to default filter to accept
Matthew Dillon [Fri, 13 Mar 2015 01:08:56 +0000 (18:08 -0700)]
ipfw/ipfw3 - Add pre-load sysctl to default filter to accept

* Add sysctl and tunable 'net.filters_default_to_accept', which defaults
  to off.  If this variable is set to non-zero prior to loading the ipfw
  or ipfw3 modules, IPFW will default to allowing all packets through instead
  of denying all packets.

* It is necessary to use this feature for netbooted systems with NFS roots
  as the system will not be able to load the rules table after kldloading
  the related module(s) otherwise.

9 years agoipfw2 - Rename FreeBSD ipfw port to ipfw3 (2)
Matthew Dillon [Fri, 13 Mar 2015 00:27:14 +0000 (17:27 -0700)]
ipfw2 - Rename FreeBSD ipfw port to ipfw3 (2)

* Unbreak buildworld

9 years agoRevert "if_clone_detach twice when unload the if_lagg module."
Sascha Wildner [Fri, 13 Mar 2015 00:03:28 +0000 (01:03 +0100)]
Revert "if_clone_detach twice when unload the if_lagg module."

This reverts commit 2574878feac65235315e1557d2e15c5d01c2ed7d.

It was already fixed in our tree and this is a merge issue.

9 years agoipfw2 - Rename FreeBSD ipfw port to ipfw3
Matthew Dillon [Thu, 12 Mar 2015 23:10:34 +0000 (16:10 -0700)]
ipfw2 - Rename FreeBSD ipfw port to ipfw3

* Rename all elements of the port to ipfw3 to reduce confusion.

9 years agokernel/usb4bsd: Unbreak 'template' module (new file missing in Makefile).
Sascha Wildner [Thu, 12 Mar 2015 21:57:46 +0000 (22:57 +0100)]
kernel/usb4bsd: Unbreak 'template' module (new file missing in Makefile).

9 years agokernel/usb4bsd: Unbreak building with USB_DEBUG in the config.
Sascha Wildner [Thu, 12 Mar 2015 21:56:49 +0000 (22:56 +0100)]
kernel/usb4bsd: Unbreak building with USB_DEBUG in the config.

9 years agoipfw2 - Final whitespace cleanup
Matthew Dillon [Thu, 12 Mar 2015 21:33:36 +0000 (14:33 -0700)]
ipfw2 - Final whitespace cleanup

* Do final cleanup of a few more whitespace issues

9 years agoNew IPFW2 for DragonflyBSD which is:
Bill Yuan [Sun, 8 Mar 2015 17:49:34 +0000 (01:49 +0800)]
New IPFW2 for DragonflyBSD which is:
1. source clean and following the Dfly coding style.
2. able to run parallelly together with the existing ipfw.
3. support in-kernel NAT.
4. some enhanced features.
5. designed in modular.

9 years agoipfw2 man page, keep-state
Bill Yuan [Tue, 3 Mar 2015 10:52:56 +0000 (18:52 +0800)]
ipfw2 man page, keep-state

9 years agoipfw2 man page
Bill Yuan [Mon, 2 Mar 2015 09:08:02 +0000 (17:08 +0800)]
ipfw2 man page

9 years agoforward action description.
Bill Yuan [Sun, 1 Mar 2015 17:58:05 +0000 (01:58 +0800)]
forward action description.

9 years ago'forward action' section of ipfw2 man page.
Bill Yuan [Sat, 28 Feb 2015 10:33:28 +0000 (18:33 +0800)]
'forward action' section of ipfw2 man page.

9 years agoif_clone_detach twice when unload the if_lagg module.
Bill Yuan [Thu, 26 Feb 2015 02:34:32 +0000 (10:34 +0800)]
if_clone_detach twice when unload the if_lagg module.
http://bugs.dragonflybsd.org/issues/2795

9 years agoallow layer2 filtering on ipfw2 when net.link.ether.ipfw=1
Bill Yuan [Wed, 25 Feb 2015 09:15:42 +0000 (17:15 +0800)]
allow layer2 filtering on ipfw2 when net.link.ether.ipfw=1

9 years agoremove the sysctl handler.
Bill Yuan [Wed, 25 Feb 2015 06:38:02 +0000 (14:38 +0800)]
remove the sysctl handler.

9 years agoadjust lock in ipfw2_nat.
Bill Yuan [Tue, 24 Feb 2015 17:42:30 +0000 (01:42 +0800)]
adjust lock in ipfw2_nat.

9 years agoM_DONTWAIT -> M_NOWAIT in ipfw2_basic
Bill Yuan [Tue, 24 Feb 2015 08:04:08 +0000 (16:04 +0800)]
M_DONTWAIT -> M_NOWAIT in ipfw2_basic

9 years agoMB_DONTWAIT -> M_NOWAIT
Bill Yuan [Tue, 24 Feb 2015 07:58:50 +0000 (15:58 +0800)]
MB_DONTWAIT -> M_NOWAIT

9 years agoLock release in ipfw2_nat module.
Bill Yuan [Tue, 24 Feb 2015 04:04:15 +0000 (12:04 +0800)]
Lock release in ipfw2_nat module.

9 years agofix for 'multi-dest forwarding'
Bill Yuan [Thu, 12 Feb 2015 16:37:38 +0000 (00:37 +0800)]
fix for 'multi-dest forwarding'

9 years agoenhanced forward action in kernel space
Bill Yuan [Thu, 12 Feb 2015 15:27:07 +0000 (23:27 +0800)]
enhanced forward action in kernel space
1. giveup the 'fwd' keyword
2. forward support multiple destination
3. forward accept a strategy parameter. round-robin/sticky
use random dest without any strategy option
use round-robin when ...
use sticky when ...

9 years agoadd round-robin and sticky to forward action
Bill Yuan [Wed, 11 Feb 2015 14:26:03 +0000 (22:26 +0800)]
add round-robin and sticky to forward action

9 years agoreformat for textwidth=80
Bill Yuan [Tue, 10 Feb 2015 17:19:40 +0000 (01:19 +0800)]
reformat for textwidth=80

9 years agofilter functionality of keyword 'mac dst src' in layer2 module.
Bill Yuan [Tue, 10 Feb 2015 15:38:59 +0000 (23:38 +0800)]
filter functionality of keyword 'mac dst src' in layer2 module.

9 years agofix header file include.
Bill Yuan [Tue, 10 Feb 2015 13:18:05 +0000 (21:18 +0800)]
fix header file include.

9 years agorename the header files.
Bill Yuan [Tue, 10 Feb 2015 03:58:25 +0000 (11:58 +0800)]
rename the header files.

9 years agoVersion 'alpha 1' of ipfw2 firewall module for DragonflyBSD.
Bill Yuan [Sat, 7 Feb 2015 10:26:10 +0000 (18:26 +0800)]
Version 'alpha 1' of ipfw2 firewall module for DragonflyBSD.
1. Modular design
2. Lockless stateful firewall
3. In-kernel NAT using libalias
4. Enhanced policy routing. (coming soon)

9 years agoRefactor the source for ipfw2.
Bill Yuan [Thu, 4 Dec 2014 14:56:56 +0000 (22:56 +0800)]
Refactor the source for ipfw2.

9 years agoNew ipfw2 for DragonflyBSD which is able to run parallelly with the original ipfw.
Bill Yuan [Wed, 4 Feb 2015 12:44:15 +0000 (20:44 +0800)]
New ipfw2 for DragonflyBSD which is able to run parallelly with the original ipfw.
1. sbin/ipfw2
2. lib/libipfw2
3. sys/net/ipfw2
4. sys/net/dummynet2

9 years agokernel/netgraph7: Add missing braces.
Sascha Wildner [Thu, 12 Mar 2015 20:53:35 +0000 (21:53 +0100)]
kernel/netgraph7: Add missing braces.

9 years agokernel/sound: Add missing braces.
Sascha Wildner [Thu, 12 Mar 2015 20:53:17 +0000 (21:53 +0100)]
kernel/sound: Add missing braces.

9 years agousb - Update bus/u4b
Matthew Dillon [Thu, 12 Mar 2015 20:50:38 +0000 (13:50 -0700)]
usb - Update bus/u4b

* Update bus/u4b from FreeBSD to commit 3121e258c76aa, 10 March 2015,
  with the following commit message:

      Lock softc before clearing bits.

* Some bits not updated.  Some changes around the MSI handling work
  differently in DFly so I punted on that.  And the serial/tty in FreeBSD
  is a bit different, particular this 'pps' stuff.

* Numerous bits of code currently conditionalized out use ABI features
  from FreeBSD, particularly RWTUN, which we do not yet have.  Currently
  non-critical, we can fix these as the related code gets used (if the
  related code gets used).

Reviewed-by: Markus Pfeiffer
9 years agobmake(1): Move -w info to the right place (it's not a debug flag).
Sascha Wildner [Thu, 12 Mar 2015 20:17:02 +0000 (21:17 +0100)]
bmake(1): Move -w info to the right place (it's not a debug flag).

9 years agokernel/crypto: Remove some unneeded semicolons.
Sascha Wildner [Thu, 12 Mar 2015 17:10:56 +0000 (18:10 +0100)]
kernel/crypto: Remove some unneeded semicolons.

9 years ago<sys/malloc.h>: Remove an unneeded semicolon.
Sascha Wildner [Thu, 12 Mar 2015 17:10:06 +0000 (18:10 +0100)]
<sys/malloc.h>: Remove an unneeded semicolon.

9 years agokernel: Followup commit to f3f3eadbf9de7a55ef1ff8cb23a68641403906ea.
Sascha Wildner [Thu, 12 Mar 2015 17:06:13 +0000 (18:06 +0100)]
kernel: Followup commit to f3f3eadbf9de7a55ef1ff8cb23a68641403906ea.

Fix some more SYSINIT() cases (all in code which isn't compiled for
one reason or the other), mainly to make a branch merge better here.

9 years agokernel: Move semicolon from the definition of SYSINIT() to its invocations.
Sascha Wildner [Thu, 12 Mar 2015 16:41:56 +0000 (17:41 +0100)]
kernel: Move semicolon from the definition of SYSINIT() to its invocations.

This affected around 70 of our (more or less) 270 SYSINIT() calls.

style(9) advocates the terminating semicolon to be supplied by the
invocation too, because it can make life easier for editors and other
source code parsing programs.

9 years agosbin/hammer: Don't use the same buffer for blockmap layer1 and layer2
Tomohiro Kusumi [Wed, 11 Mar 2015 23:30:30 +0000 (08:30 +0900)]
sbin/hammer: Don't use the same buffer for blockmap layer1 and layer2

- Functions that lookup blockmap layer1 and layer2 should use
  different buffer variable (set to NULL) for each get_buffer_data()
  call to retrieve ondisk data unless isnew flag is set to 1.

- From the way newfs_hammer allocates layer entries on disks,
  any given layer1 entry and layer2 entry are never both cached in
  a single hammer buffer. Passing layer1 buffer to get_buffer_data()
  as a cache for layer2 happens to be overhead as it takes extra cache
  boundary check (and we know layer2 isn't cached in layer1 buffer).

9 years agosys/vfs/hammer: Cleanups on undo
Tomohiro Kusumi [Wed, 11 Mar 2015 13:57:44 +0000 (22:57 +0900)]
sys/vfs/hammer: Cleanups on undo

- hunk1 - These macros were added in 36f82b23 in 2008 but never used.

- hunk2 - Not only zone1 but also zone2 can generate undo.

- hunk3 - Show there is no undo on undo.

9 years agosbin/hammer: Add additional info to "BO"
Tomohiro Kusumi [Wed, 11 Mar 2015 12:28:32 +0000 (21:28 +0900)]
sbin/hammer: Add additional info to "BO"

- Make hammer show command print additional 3 characters after "BO"
  based on error type.

- Happened to see following "BO" while running a test script to
  observe btree growth but there are 9 cases that cause "BO" (EDOM).
  It needs additional info to tell what caused "BO".

  G------ ELM  1 R lo=00000001 obj=0000000000000001 rt=11 key=2ec64cba42580000 ot=02
                   tids 0000000100008020:0000000000000000
  BO               dataoff=9000000022000080/21 crc=94bf75d4
                   fills=z9:68=BADZ
                   dir-entry ino=0000000100000576 lo=00000000 name="0.out"
  G------ ELM  2 R lo=00000001 obj=0000000100000576 rt=01 key=0000000000000000 ot=02
                   tids 0000000100008020:0000000000000000
  BO               dataoff=9000000022000000/128 crc=19f26cd
                   fills=z9:68=BADZ

9 years agokernel/acpi: Avoid double semicolons.
Sascha Wildner [Wed, 11 Mar 2015 22:15:22 +0000 (23:15 +0100)]
kernel/acpi: Avoid double semicolons.

9 years agokernel/acpi: Use semicolons in macro invocations.
Sascha Wildner [Wed, 11 Mar 2015 22:15:08 +0000 (23:15 +0100)]
kernel/acpi: Use semicolons in macro invocations.

9 years agokernel: Use BSD types, not System V types (ulong -> u_long).
Sascha Wildner [Wed, 11 Mar 2015 20:47:27 +0000 (21:47 +0100)]
kernel: Use BSD types, not System V types (ulong -> u_long).

9 years agolvm2: More cleanup (include <unistd.h>, use default CSTD, WARNS = 1).
Sascha Wildner [Wed, 11 Mar 2015 20:09:12 +0000 (21:09 +0100)]
lvm2: More cleanup (include <unistd.h>, use default CSTD, WARNS = 1).

<unistd.h> is required for some prototypes (getpid(), unlink(), ...).

WARNS?=2 requires some more work.

9 years agoRemove more lvm2 related _XOPEN_SOURCE definitions.
Sascha Wildner [Wed, 11 Mar 2015 19:35:25 +0000 (20:35 +0100)]
Remove more lvm2 related _XOPEN_SOURCE definitions.

9 years ago<sys/fcntl.h>: Fix comment that I forgot to change.
Sascha Wildner [Wed, 11 Mar 2015 17:40:01 +0000 (18:40 +0100)]
<sys/fcntl.h>: Fix comment that I forgot to change.

9 years ago<sys/fcntl.h>: Clean up usage of _POSIX_SOURCE.
Sascha Wildner [Wed, 11 Mar 2015 17:16:28 +0000 (18:16 +0100)]
<sys/fcntl.h>: Clean up usage of _POSIX_SOURCE.

Use the normal __BSD_VISIBLE macro instead.

While here, also add some more specific visibility for AT_* and O_NOFOLLOW.

9 years ago<sys/fcntl.h>: Whitespace cleanup. No functional change.
Sascha Wildner [Wed, 11 Mar 2015 17:15:42 +0000 (18:15 +0100)]
<sys/fcntl.h>: Whitespace cleanup. No functional change.

9 years agolvm2: Stop requiring _XOPEN_SOURCE=700 and use our default environment.
Sascha Wildner [Wed, 11 Mar 2015 17:14:26 +0000 (18:14 +0100)]
lvm2: Stop requiring _XOPEN_SOURCE=700 and use our default environment.

The 'stack' macro conflict was solved by renaming the struct lwp_params
members. That define is really a stupid thing to do. :(

9 years ago<sys/unistd.h>: Rename struct lwp_params member names.
Sascha Wildner [Wed, 11 Mar 2015 17:10:55 +0000 (18:10 +0100)]
<sys/unistd.h>: Rename struct lwp_params member names.

This is mainly to better "protect" them against 3rd party software doing
silly things like lvm2 which has a "#define stack ..." that conflicted
with the struct's 'stack' member, for example. It's a lame reason to
rename the struct members, but, given that it is a public struct, it's
a good thing to do so generally.

Also, because it is a public structure, bump __DragonFly_version so it
can be dealt with in code. I didn't find any usage of our lwp_* code
in dports but it might be used in someone's own code still.

9 years agogpt - Bump size of the boot partition from 768MB to 1GB
Matthew Dillon [Wed, 11 Mar 2015 06:10:24 +0000 (23:10 -0700)]
gpt - Bump size of the boot partition from 768MB to 1GB

* Bump the default size of the boot partition to 1GB.

9 years agokernel/acpi: Reduce code duplication with ACPICA.
Sascha Wildner [Tue, 10 Mar 2015 21:31:02 +0000 (22:31 +0100)]
kernel/acpi: Reduce code duplication with ACPICA.

Use the types which the ACPICA framework provides whereever possible in
our acpi_fadt and acpi_madt code. Since we do not use any actual ACPICA
functions here, this is no problem even for code which (so far) runs
before ACPICA is initialized.

Discussed-with-and-approved-by: sephe
9 years agomake upgrade: Remove more installer stuff if WANT_INSTALLER isn't set.
Sascha Wildner [Tue, 10 Mar 2015 21:32:36 +0000 (22:32 +0100)]
make upgrade: Remove more installer stuff if WANT_INSTALLER isn't set.

9 years agomake upgrade: Clear out installer files conditionally
John Marino [Tue, 10 Mar 2015 14:08:52 +0000 (15:08 +0100)]
make upgrade: Clear out installer files conditionally

Installing DragonFly from an image installer will end up coping the
installer itself to /usr/sbin.  This is just cpdup doing what it's told.

The other way these installers could get there is if it's intentionally
built using the WANT_INSTALLER knob.  So remove these files if the
WANT_INSTALLER variable is not defined.

suggested-by: swildner

9 years agosbin/hammer: Remove unnecessary workarond after f0b930f3
Tomohiro Kusumi [Tue, 10 Mar 2015 11:36:18 +0000 (20:36 +0900)]
sbin/hammer: Remove unnecessary workarond after f0b930f3

- Revert one of the workarounds made in commit 2f8c6a59 since it's
  no longer necessary after commit f0b930f3 fixed it in filesystem.

- The other workaround in commit 2f8c6a59 (suppress 'd') is
  still there as it has nothing to do with mirror_tid fix in f0b930f3.

9 years agosys/vfs/hammer: Properly set mirror_tid on root node split
Tomohiro Kusumi [Tue, 10 Mar 2015 11:09:36 +0000 (20:09 +0900)]
sys/vfs/hammer: Properly set mirror_tid on root node split

- Set elms[0].internal.mirror_tid of the new root node
  after root split.

- Without this commit elms[0].internal.mirror_tid of the new root
  node is 0 which is not appropriate given that its children have
  non-zero mirror_tid.

- Submit #2801

- Following hammer show results shows difference.

  /* the root node right after root split without this commit */
       NODE 8000000020801000 cnt=02 p=0000000000000000 type=I depth=0 mirror 00000001000087a0 fill=z8:65=1% {
  G------ ELM  0 L lo=00000000 obj=8000000000000000 rt=00 key=8000000000000000 ot=00
                 d tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 0000000000000000
  G------ ELM  1 L lo=00000001 obj=0000000080000209 rt=01 key=0000000000000000 ot=00
                   tids 0000000100008420:0000000000000000 suboff=8000000020802000 mirror 00000001000087a0
  G------ RBN  2 ? lo=ffffffff obj=7fffffffffffffff rt=ffff key=7fffffffffffffff ot=00
                   tids ffffffffffffffff:0000000000000000 suboff=0000000000000000 mirror 0000000000000000
       }
  BM   NODE 8000000020800000 cnt=32 p=8000000020801000 type=L depth=1 mirror 00000001000087a0 fill=z8:65=1%
  ...

  /* the root node right after root split with this commit */
       NODE 8000000020801000 cnt=02 p=0000000000000000 type=I depth=0 mirror 00000001000087a0 fill=z8:65=1% {
  G------ ELM  0 L lo=00000000 obj=8000000000000000 rt=00 key=8000000000000000 ot=00
                 d tids 0000000000000001:0000000000000001 suboff=8000000020800000 mirror 00000001000087a0
  G------ ELM  1 L lo=00000001 obj=0000000080000209 rt=01 key=0000000000000000 ot=00
                   tids 0000000100008420:0000000000000000 suboff=8000000020802000 mirror 00000001000087a0
  G------ RBN  2 ? lo=ffffffff obj=7fffffffffffffff rt=ffff key=7fffffffffffffff ot=00
                   tids ffffffffffffffff:0000000000000000 suboff=0000000000000000 mirror 0000000000000000
       }
       NODE 8000000020800000 cnt=32 p=8000000020801000 type=L depth=1 mirror 00000001000087a0 fill=z8:65=1% {
  ...

9 years agoRemove contrib/sendmail-8.14
John Marino [Tue, 10 Mar 2015 11:06:09 +0000 (12:06 +0100)]
Remove contrib/sendmail-8.14

The deletion of these source files should complete the removal of
Sendmail from base.

9 years agosendmail transition: Do not pre-generate sendmail.cf
John Marino [Tue, 10 Mar 2015 10:46:07 +0000 (11:46 +0100)]
sendmail transition: Do not pre-generate sendmail.cf

Originally a starter sendmail.cf file was created using the .mc template
files and the m4 files installed from contrib/sendmail-8.14 directory.
This starter sendmail.cf was installed with "make distribution".  The
template files were only changed with "make upgrade" (not sure why but
maybe people tried editing them directly) and the Makefile was only
installed once.

This commit accomplishes these things:
  * No sendmail.cf or submit.cf file is created.  This was the last
    user of contrib/sendmail-8.14
  * etc/sendmail was altered to just install files
  * the README file the was recently placed in libexec/dma was relocated
    to etc/sendmail and updated
  * the /etc/mail/Makefile is now updated with installworld
  * the dragonfl*.mc templates are now updated with installworld

The suggested method to creating /etc/mail/sendmail.cf and
/etc/mail/submit.cf now on a new system is:
  1. cd /etc/mail
  2. type "make cf"
  3. <optional> edit new <hostname>.mc and <hostname>.submit.mc files
  4. <optional> type "make cf" again
  5. type "make install"

9 years agoMore sendmail transition work
John Marino [Tue, 10 Mar 2015 09:56:40 +0000 (10:56 +0100)]
More sendmail transition work

Several changes were made, including
  * set default SENDMAIL_CF_DIR to standard dports location
  * add SENDMAIL_CF_DIR to defaults/make.conf
  * remove SENDMAIL_CF completely (it wasn't even documented)
  * Update dragonfly.mc templates
  * Move SENDMAIL_PERMS definition to defaults/make.conf
  * change SENDMAIL and MAKEMAP definitions to point to dports locations
  * Tweak make.conf.5 man page accordingly
  * and other tweaks ...

9 years agomake.conf(5): Remove SENDMAIL_SET_USER_ID functionality
John Marino [Tue, 10 Mar 2015 08:20:33 +0000 (09:20 +0100)]
make.conf(5): Remove SENDMAIL_SET_USER_ID functionality

This sendmail option has been deprecated and off by default since version
8.12.  It is also not supported by dports Sendmail, probably due to its
security risks.  It makes no sense anymore, so remove it separately ahead
of additional anticipated base Sendmail changes.

9 years agoRemove NO_SENDMAIL and all it masks, except one
John Marino [Mon, 9 Mar 2015 23:53:02 +0000 (00:53 +0100)]
Remove NO_SENDMAIL and all it masks, except one

The next step in the removal of Sendmail is to remove all the components
that NO_SENDMAIL masked, and then remove the internal NO_SENDMAIL knob
itself.

There is one component that got unmasked though: the etc/sendmail
dragonfl*.mc files.  I think we may need to keep building these, and
they require contrib/sendmail-8.14 source files.  I'll figure out what
needs to have to remove the contrib directory later.

9 years agodmsg - Formalize most of the debugging output, cleanup, fix uninit bug
Matthew Dillon [Tue, 10 Mar 2015 00:09:20 +0000 (17:09 -0700)]
dmsg - Formalize most of the debugging output, cleanup, fix uninit bug

* Macroize and formalize most of the debugging output.

* Add LNK_PING support.

* Fix a bug in kdmsg_iocom_uninit().  The RX thread can stall reading
  from the pipe and never wakeup to see the KILLRX flag if no traffic
  comes in.

  To deal with this kdmsg_iocom_uninit() sends a LNK_PING over the link,
  then gives the threads 10 seconds to shutdown nicely.  If they do not
  the pipe descriptor is not-so-nicely shutdown().

9 years agohammer - Fix a vsetisdirty() race
Matthew Dillon [Mon, 9 Mar 2015 22:54:11 +0000 (15:54 -0700)]
hammer - Fix a vsetisdirty() race

* Fix a vsetisdirty() race which can result in a panic by holding a lock
  around the operation.

Reported-by: tuxillo
9 years agoGive better "Quick" fix for passing Sendmail upgrade check
John Marino [Mon, 9 Mar 2015 22:47:37 +0000 (23:47 +0100)]
Give better "Quick" fix for passing Sendmail upgrade check

The original Quick instructions required the administrator to come
back and install the DMA mailer.conf (3 steps).  Let's reduce this
to 2 steps which doesn't require a post-upgrade step

9 years agomail(1): call sendmail, not send-mail
John Marino [Mon, 9 Mar 2015 06:33:45 +0000 (07:33 +0100)]
mail(1): call sendmail, not send-mail

There is no actual executable or link to executable named "send-mail".
Somehow the request must be processed by the mailwrapper because tuxillo
reports mail(1) will not function without an entry in mailer.conf.

Rather than fix all the sample mailer.conf files, the installed one, and
the MTA switch instructions, just make mail(1) spawn "sendmail" instead.
This works because send-mail is always an alias for sendmail in
/etc/mail/mailer.conf

9 years agoxdisk - Fix improper EIO
Matthew Dillon [Mon, 9 Mar 2015 07:36:18 +0000 (00:36 -0700)]
xdisk - Fix improper EIO

* Fix an issue when xa_strategy() is called when no spans are valid,
  but before open_tag could be terminated.  This improperly caused the
  BIO to fail.

  If the BIO is not flagged to allow failures, place the BIO on sc->bioq
  when this situation occurs instead of causing it to fail.  The BIO will
  be requeued when a new span becomes valid.

* With this change a hammer2 mount on a xdisk appears to survive multiple
  communications failures without error (i.e. killing the hammer2 service
  demon either box, then restarting it).

* Fix a locking panic.

9 years agoxdisk - Reprobe when new SPAN state is available
Matthew Dillon [Mon, 9 Mar 2015 04:01:27 +0000 (21:01 -0700)]
xdisk - Reprobe when new SPAN state is available

* Reprobe the disks when new SPAN state is available, in case probes from
  prior span states failed (since their I/Os are allowed to fail).

* Add more debugging for now.

9 years agodmsg - Stabilization work
Matthew Dillon [Mon, 9 Mar 2015 03:49:31 +0000 (20:49 -0700)]
dmsg - Stabilization work

* Refactor the circuit failure handling code.  When a connection is lost
  circuits running through that connection and all sub-circuits/states
  (recursively) are aborted.  This will propagate through the graph and
  there are plenty of edge cases where a failure may be propagating in
  one direction and a request in the other direction.

  The library is responsible for providing missing transaction closures
  when circuits and states fail.

* Add code to handle circuit failure races against newly created messages.
  The STATE_DYING flag is now inherited by the newly created message from
  its parent.

* The state structure on receive is now updated before the callback is
  made so it can be atomic with the lock, instead of after.

* Lots of debugging added and some cleanup.

9 years agokernel: Remove (unhooked) acx(4), bwi(4), iwl(4) and rtw(4).
Sascha Wildner [Mon, 9 Mar 2015 02:06:04 +0000 (03:06 +0100)]
kernel: Remove (unhooked) acx(4), bwi(4), iwl(4) and rtw(4).

The first three were written by sephe and rtw(4) was ported from NetBSD
by him. They were all never ported to the newer wlan(4) upgrades we got,
starting with Rui Paulo's back in 2010.

Approved-by: sephe
9 years agomailer.conf - Add missing send-mail for dma.
Antonio Huete Jimenez [Mon, 9 Mar 2015 01:31:31 +0000 (02:31 +0100)]
mailer.conf - Add missing send-mail for dma.

- This allows mail(1) program to send mails again.

9 years agoFix modes and ownership of /etc/mail reinstallable files
John Marino [Sun, 8 Mar 2015 20:09:38 +0000 (21:09 +0100)]
Fix modes and ownership of /etc/mail reinstallable files

The new sample files and old README were being installed with the
wrong permissions and the wrong group ownership.  Reset that back
to 644 and standard perms.

9 years agoChange /etc/mail/README to update with each make upgrade
John Marino [Sun, 8 Mar 2015 17:44:52 +0000 (18:44 +0100)]
Change /etc/mail/README to update with each make upgrade

Change /etc/mail/README from installing once with make distribution to
also installing the latest version with make upgrade.

9 years agoupdate /etc/mail/README
John Marino [Sun, 8 Mar 2015 16:25:24 +0000 (17:25 +0100)]
update /etc/mail/README

At this time, it seems README still has some use, so I'll update it a
bit to reflect the port locations of sendmail.

However, this file only installs once ever, so I'll need to convert it
to reinstall which each installworld target to really make it useful.

9 years agoRemove /etc/mail/helpfile
John Marino [Sun, 8 Mar 2015 16:15:41 +0000 (17:15 +0100)]
Remove /etc/mail/helpfile

This is now installed via dports at:
   /usr/local/share/sendmail/helpfile

9 years agoinstallworld: Fix auto-backup of world
John Marino [Sun, 8 Mar 2015 14:56:21 +0000 (15:56 +0100)]
installworld: Fix auto-backup of world

The automatic backup of world binaries has been failing for months.
I finally got around to looking at this -- the tar program couldn't be
found, so we have to use the full path (/usr/bin/tar).

9 years agoMakefile_upgrade.inc: Remove /usr/share/libg++
John Marino [Sun, 8 Mar 2015 15:30:06 +0000 (16:30 +0100)]
Makefile_upgrade.inc: Remove /usr/share/libg++

This directory was removed from mtree earlier today.

9 years agoFix lack of buildworld and quickworld messages
John Marino [Sun, 8 Mar 2015 13:39:12 +0000 (14:39 +0100)]
Fix lack of buildworld and quickworld messages

The "world" target has a nice start/stop message.  However, if somebody
chooses to use "make buildworld" followed by "make installworld" rather
than "make world", they get no messages at all.  I think this has been an
ongoing oversight.

This commit improves the "world" target messages (e.g. all targets are
ELF so don't need to specify that, and pre/post-world targets are shown.)
More importantly it adds start/complete messages to buildworld, and start
message to installworld.  The installworld already had a complete message,
but this was redone to match the format of the other ones.

Similar messages were added to quickworld and realquickworld targets too.

9 years agogcc50: Update to 08 Mar 2015 snapshot (SVN 221261)
John Marino [Sun, 8 Mar 2015 08:19:57 +0000 (09:19 +0100)]
gcc50: Update to 08 Mar 2015 snapshot (SVN 221261)

9 years agoMerge branch 'vendor/GCC50'
John Marino [Sun, 8 Mar 2015 14:08:42 +0000 (15:08 +0100)]
Merge branch 'vendor/GCC50'

9 years agoUpdate gcc-50 to SVN version 221261
John Marino [Sun, 8 Mar 2015 08:16:16 +0000 (09:16 +0100)]
Update gcc-50 to SVN version 221261

Last Changed Date: 2015-03-08 01:16:18 +0100 (Sun, 08 Mar 2015)

9 years agodrm/i915: Replace kmem_alloc_nofault() by kmap()
François Tigeot [Sun, 8 Mar 2015 09:03:37 +0000 (10:03 +0100)]
drm/i915: Replace kmem_alloc_nofault() by kmap()

As seen on pre-3.7 Linuxes.

9 years agodrm_gem.c: Start using some drm_mm functions
François Tigeot [Sun, 8 Mar 2015 08:35:53 +0000 (09:35 +0100)]
drm_gem.c: Start using some drm_mm functions

9 years agodrm: Reduce diffs with Linux 3.11 in drm_gem.c
François Tigeot [Sun, 8 Mar 2015 08:10:05 +0000 (09:10 +0100)]
drm: Reduce diffs with Linux 3.11 in drm_gem.c

* Restore Intel's copyright

* Reorder function definitions

* don't use idr_remove_all()

* No functional changes

9 years agoAdd entry about Sendmail removal in UPDATING from 4.0
John Marino [Sun, 8 Mar 2015 07:04:31 +0000 (08:04 +0100)]
Add entry about Sendmail removal in UPDATING from 4.0

9 years agoRemove three empty directories from BSD.usr.dist
John Marino [Sun, 8 Mar 2015 06:54:44 +0000 (07:54 +0100)]
Remove three empty directories from BSD.usr.dist

Two of these directories are removed by "make upgrade" (sendmail).  The
third (libg++) seems that it's just been overlooked forever.  It was
probably used for gcc prior to version 4.1.  In any case, it's not used
now.

9 years agodrm: Add asm/barrier.h
François Tigeot [Sun, 8 Mar 2015 07:23:22 +0000 (08:23 +0100)]
drm: Add asm/barrier.h

9 years agodrm: Add barrier()
François Tigeot [Sun, 8 Mar 2015 07:21:36 +0000 (08:21 +0100)]
drm: Add barrier()

9 years agoEffectively remove sendmail from base
John Marino [Sat, 7 Mar 2015 23:45:13 +0000 (00:45 +0100)]
Effectively remove sendmail from base

The NO_SENDMAIL build knob has been hardwired in sys.mk, so it is not
possible for it to be unset by /etc/make.conf.  This effectively prevents
sendmail from building.

A new check was added to "make upgrade" target to make sure the current
/etc/mail/mailer.conf is not configured to use the base sendmail as the
MTA.  If it fails the check, the upgrade will fail before it starts.
Directions are given hot to fix the problem in the error message.  A
successful check results in the sendmail-related binaries getting removed
from the system.

Finally, NO_SENDMAIL has been removed from the default make.conf and it's
man page.

The actual sendmail makefiles and source remain for now.  Once it is
confirmed that transition is working and dma is functioning well as a
replacement, sendmail and the NO_SENDMAIL conditions will be removed
permanently, along with modifying the mtree files.

Approved-by: dillon

9 years agosys/vfs/hammer: Fix and add comments on btree
Tomohiro Kusumi [Sat, 7 Mar 2015 22:46:49 +0000 (07:46 +0900)]
sys/vfs/hammer: Fix and add comments on btree

- hunk1-2: These two seem to be old ones. At this point *node is
  a pointer to cursor->node->ondisk which is not invalid or stale.

- hunk3: This isn't necessary since now this function just returns
  EINVAL if the cursor's node is internal. It didn't have this check
  when this comment was written.

- hunk4: It's hammer_btree_lookup() that could return ENOSPC when
  no space is available, but not this function. Moving this comment
  to the previous paragraph makes better sense.

- hunk5: Leaf nodes have no idea of boundaries to start with so
  replace it with the comment being used in hammer_btree_delete()
  which also deals with bcopy() of elements.

- hunk6: Fix a typo.

- hunk7: Refer to a leaf node's count in addition to internal node.

9 years ago/etc/mail: Install 4 sample mailer.conf files
John Marino [Sat, 7 Mar 2015 19:37:38 +0000 (20:37 +0100)]
/etc/mail: Install 4 sample mailer.conf files

These files have been recently referenced in the DragonFly handbook.
They are here to allow quick reconfiguration of the Mail Transfer Agent.
For example, if Postfix from DPorts is desired, all one needs to do is
copy /etc/mail/mailer.conf.postfix to /etc/mail/mailer.conf and reboot
(assuming postfix configuration files are already in place).

This provides default MTA configurations for dma (base), postfix,
sendmail, and and opensmtpd.

9 years agoperiodic.conf(5): Adjust for dma as MTA in default conf
John Marino [Sat, 7 Mar 2015 19:34:27 +0000 (20:34 +0100)]
periodic.conf(5): Adjust for dma as MTA in default conf

The DragonFly Mail Agent can't support daily_clean_hoststat and
daily_submit_queuerun, so disable these periodic scripts by default.

9 years agoSwitch default MTA from sendmail to dma
John Marino [Sat, 7 Mar 2015 19:08:26 +0000 (20:08 +0100)]
Switch default MTA from sendmail to dma

The mailwrapper controls which Mail Transfer Agent is used.  The
mailer.conf defines the behavior of the mailwrapper.  This commit will
have no effect on existing installations, but for the first installation
a new mailer.conf will be installed during the "distribution" target.

This means all new images have the DragonFly Mail Agent acting as base
MTA rather than Sendmail for the first time in the project's history.

While here, set the default path in the mail wrapper to dma as well,
although this isn't used unless the mailer.conf is incomplete.

9 years agomake.conf(5): Remove NO_MAILWRAPPER build option
John Marino [Sat, 7 Mar 2015 18:53:38 +0000 (19:53 +0100)]
make.conf(5): Remove NO_MAILWRAPPER build option

I doubt DragonFly mail system would even function properly if somebody
actually set NO_MAILWRAPPER in make.conf.  In preparation for the removal
of sendmail from base, removing the mailwrapper is not feasible.  This
wrapper is needed to support replacing the base MTA with one from ports.

There must have been a need for NO_MAILWRAPPER in the past, but I can't
see any purpose it could serve now.