Re: svn commit: r227775 - in head: lib/clang share/mk

2011-11-21 Thread Brooks Davis
On Mon, Nov 21, 2011 at 12:49:46AM +, Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Mon Nov 21 00:49:46 2011
> New Revision: 227775
> URL: http://svn.freebsd.org/changeset/base/227775
> 
> Log:
>   Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50
>   import, it works without issue.

Great news!

-- Brooks


pgpDmHfRiwI4Z.pgp
Description: PGP signature


Re: svn commit: r228071 - head/sys/net

2011-11-28 Thread Brooks Davis
On Mon, Nov 28, 2011 at 02:44:59PM +, Gleb Smirnoff wrote:
> Author: glebius
> Date: Mon Nov 28 14:44:59 2011
> New Revision: 228071
> URL: http://svn.freebsd.org/changeset/base/228071
> 
> Log:
>   - Use generic alloc_unr(9) allocator for if_clone, instead
> of hand-made.
>   - When registering new cloner, check whether a cloner with
> same name already exist.
>   - When allocating unit, also check with help of ifunit()
> whether such interface already exist or not. [1]

Thanks!  This was long over due.

-- Brooks


pgpbtXb8WcC5E.pgp
Description: PGP signature


svn commit: r228380 - head/sys/net

2011-12-09 Thread Brooks Davis
Author: brooks
Date: Fri Dec  9 23:26:28 2011
New Revision: 228380
URL: http://svn.freebsd.org/changeset/base/228380

Log:
  Remove the unused if_free_type() function.
  
  X-MFC after:  never

Modified:
  head/sys/net/if.c
  head/sys/net/if_var.h

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Fri Dec  9 22:23:45 2011(r228379)
+++ head/sys/net/if.c   Fri Dec  9 23:26:28 2011(r228380)
@@ -494,19 +494,12 @@ if_free_internal(struct ifnet *ifp)
 }
 
 /*
- * This version should only be called by intefaces that switch their type
- * after calling if_alloc().  if_free_type() will go away again now that we
- * have if_alloctype to cache the original allocation type.  For now, assert
- * that they match, since we require that in practice.
+ * Deregister an interface and free the associated storage.
  */
 void
-if_free_type(struct ifnet *ifp, u_char type)
+if_free(struct ifnet *ifp)
 {
 
-   KASSERT(ifp->if_alloctype == type,
-   ("if_free_type: type (%d) != alloctype (%d)", type,
-   ifp->if_alloctype));
-
ifp->if_flags |= IFF_DYING; /* XXX: Locking */
 
IFNET_WLOCK();
@@ -522,18 +515,6 @@ if_free_type(struct ifnet *ifp, u_char t
 }
 
 /*
- * This is the normal version of if_free(), used by device drivers to free a
- * detached network interface.  The contents of if_free_type() will move into
- * here when if_free_type() goes away.
- */
-void
-if_free(struct ifnet *ifp)
-{
-
-   if_free_type(ifp, ifp->if_alloctype);
-}
-
-/*
  * Interfaces to keep an ifnet type-stable despite the possibility of the
  * driver calling if_free().  If there are additional references, we defer
  * freeing the underlying data structure.

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Fri Dec  9 22:23:45 2011(r228379)
+++ head/sys/net/if_var.h   Fri Dec  9 23:26:28 2011(r228380)
@@ -865,7 +865,6 @@ voidif_down(struct ifnet *);
 struct ifmultiaddr *
if_findmulti(struct ifnet *, struct sockaddr *);
 void   if_free(struct ifnet *);
-void   if_free_type(struct ifnet *, u_char);
 void   if_initname(struct ifnet *, const char *, int);
 void   if_link_state_change(struct ifnet *, int);
 intif_printf(struct ifnet *, const char *, ...) __printflike(2, 3);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r227459 - in head/sys: dev/lmc net netgraph netinet

2011-12-09 Thread Brooks Davis
On Sat, Nov 12, 2011 at 04:33:36PM -0800, Ben Laurie wrote:
> On Fri, Nov 11, 2011 at 2:57 PM, Brooks Davis  wrote:
> > Author: brooks
> > Date: Fri Nov 11 22:57:52 2011
> > New Revision: 227459
> > URL: http://svn.freebsd.org/changeset/base/227459
> >
> > Log:
> > ?In r191367 the need for if_free_type() was removed and a new member
> > ?if_alloctype was used to store the origional interface type. ?Take
> > ?advantage of this change by removing all existing uses of if_free_type()
> > ?in favor of if_free().
> 
> Just an observation: this change removes an annotation that could be
> useful for correctness checking. Do we care?

Oops, I meant to respond to this earlier.  I think in this case it's not
a significant loss because we're only losing this annotation in 7 of the
approximately 200 locations we free an interface.  A better overall
solution to this correctness issue would be a mechanism to assert that
assignments to ifp->if_alloctype only occur if_alloc() and that
similarly ifp->if_l2com isn't changed outside if_alloc/if_free().

-- Brooks

> 
> >
> > ?MFC after: ? ?1 Month
> >
> > Modified:
> > ?head/sys/dev/lmc/if_lmc.c
> > ?head/sys/net/if_bridge.c
> > ?head/sys/net/if_lagg.c
> > ?head/sys/net/if_tap.c
> > ?head/sys/net/if_vlan.c
> > ?head/sys/netgraph/ng_fec.c
> > ?head/sys/netinet/ip_carp.c
> >
> > Modified: head/sys/dev/lmc/if_lmc.c
> > ==
> > --- head/sys/dev/lmc/if_lmc.c ? Fri Nov 11 22:27:09 2011 ? ? ? ?(r227458)
> > +++ head/sys/dev/lmc/if_lmc.c ? Fri Nov 11 22:57:52 2011 ? ? ? ?(r227459)
> > @@ -4945,7 +4945,9 @@ lmc_ifnet_detach(softc_t *sc)
> > ? /* Detach from the ifnet kernel interface. */
> > ? if_detach(sc->ifp);
> >
> > -# if (__FreeBSD_version >= 60)
> > +# if (defined(__FreeBSD__) && __FreeBSD_version >= 800082)
> > + ?if_free(sc->ifp);
> > +# elif (defined(__FreeBSD__) && __FreeBSD_version >= 60)
> > ? if_free_type(sc->ifp, NSPPP ? IFT_PPP : IFT_OTHER);
> > ?# endif
> > ? }
> >
> > Modified: head/sys/net/if_bridge.c
> > ==
> > --- head/sys/net/if_bridge.c ? ?Fri Nov 11 22:27:09 2011 ? ? ? ?(r227458)
> > +++ head/sys/net/if_bridge.c ? ?Fri Nov 11 22:57:52 2011 ? ? ? ?(r227459)
> > @@ -676,7 +676,7 @@ bridge_clone_destroy(struct ifnet *ifp)
> >
> > ? ? ? ?bstp_detach(&sc->sc_stp);
> > ? ? ? ?ether_ifdetach(ifp);
> > - ? ? ? if_free_type(ifp, IFT_ETHER);
> > + ? ? ? if_free(ifp);
> >
> > ? ? ? ?/* Tear down the routing table. */
> > ? ? ? ?bridge_rtable_fini(sc);
> >
> > Modified: head/sys/net/if_lagg.c
> > ==
> > --- head/sys/net/if_lagg.c ? ? ?Fri Nov 11 22:27:09 2011 ? ? ? ?(r227458)
> > +++ head/sys/net/if_lagg.c ? ? ?Fri Nov 11 22:57:52 2011 ? ? ? ?(r227459)
> > @@ -275,7 +275,7 @@ lagg_clone_create(struct if_clone *ifc,
> > ? ? ? ? ? ? ? ?if (lagg_protos[i].ti_proto == LAGG_PROTO_DEFAULT) {
> > ? ? ? ? ? ? ? ? ? ? ? ?sc->sc_proto = lagg_protos[i].ti_proto;
> > ? ? ? ? ? ? ? ? ? ? ? ?if ((error = lagg_protos[i].ti_attach(sc)) != 0) {
> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if_free_type(ifp, IFT_ETHER);
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if_free(ifp);
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?free(sc, M_DEVBUF);
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return (error);
> > ? ? ? ? ? ? ? ? ? ? ? ?}
> > @@ -293,7 +293,6 @@ lagg_clone_create(struct if_clone *ifc,
> > ? ? ? ?ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO);
> >
> > ? ? ? ?if_initname(ifp, ifc->ifc_name, unit);
> > - ? ? ? ifp->if_type = IFT_ETHER;
> > ? ? ? ?ifp->if_softc = sc;
> > ? ? ? ?ifp->if_start = lagg_start;
> > ? ? ? ?ifp->if_init = lagg_init;
> > @@ -305,7 +304,7 @@ lagg_clone_create(struct if_clone *ifc,
> > ? ? ? ?IFQ_SET_READY(&ifp->if_snd);
> >
> > ? ? ? ?/*
> > - ? ? ? ?* Attach as an ordinary ethernet device, childs will be attached
> > + ? ? ? ?* Attach as an ordinary ethernet device, children will be attached
> > ? ? ? ? * as special device IFT_IEEE8023ADLAG.
> > ? ? ? ? */
> > ? ? ? ?ether_ifattach(ifp, eaddr);
> > @@ -352,7 +351,7 @@ lagg_clone_destroy(struct ifnet *ifp)
> >
> > ? ? ? ?ifmedia_removeall(&sc->sc_media);
> > ? ? ? ?ether_ifdetach(ifp);
> > - ? ? ? if_free_type(ifp, IFT_ETHER);
> > + ? ? ? if_free(ifp);
> >
> > ? ? ?

Re: svn commit: r228143 - in head: . share/mk tools/build/options

2011-12-19 Thread Brooks Davis
On Mon, Dec 19, 2011 at 12:41:29PM -0800, Steve Kargl wrote:
> On Mon, Dec 19, 2011 at 08:09:32PM +, David Chisnall wrote:
> > On 19 Dec 2011, at 19:52, Warner Losh wrote:
> > 
> > > -1.  The needs of the many?  Please.  Let's break a useful feature 
> > > because some people don't understand it and are impatient?  That's lame.
> > 
> > How useful is gprof-based profiling these days?  Now that we
> > have the DTrace pid provider, don't we have access to much more
> > fine-grained profiling information without the need for shipping
> > two versions of every library?
> 
> It is quite uesful given that for the last 20 or so years,
> I can do 
> 
> cc -o z -pg a.c -lm_p
>  ./z
> gprof -b -l ./z z.gmon | more
> 
>   %   cumulative   self  self total   
>  time   seconds   secondscalls  ms/call  ms/call  name
>  72.1   0.91 0.910  100.00%   _mcount [1]
>  11.1   1.05 0.14  8388608 0.00 0.00  sinf [4]
>   8.2   1.16 0.10  8388608 0.00 0.00  nextafterf [5]
>   4.6   1.21 0.060  100.00%   .mcount (9)
> 
> to ge the information I want.

I'd tend to agree that we should leave it on at least in HEAD.

> dtrace(1M) does not seem to contain an example that gives the
> equivalent information.  In fact, the manpage contains no examples,
> only the statement:
> 
>   See the Solaris Dynamic Tracing Guide for detailed examples
>   of how to use the dtrace utility to perform these tasks.
> 
> which, of course, is not very useful given that I do not have a
> Solaris Dynamic Tracing Guide.

http://docs.oracle.com/cd/E19253-01/817-6223/ is it and the first hit in
google...

-- Brooks


pgpXqp4IN5PbE.pgp
Description: PGP signature


svn commit: r215213 - in head: etc/defaults etc/periodic/security share/man/man5

2010-11-12 Thread Brooks Davis
Author: brooks
Date: Sat Nov 13 00:40:43 2010
New Revision: 215213
URL: http://svn.freebsd.org/changeset/base/215213

Log:
  Add an (off by default) check for negative permissions (where the
  group on a object has less permissions that everyone).  These
  permissions will not work reliably over NFS if you have more than
  14 supplemental groups and are usually not what you mean.
  
  MFC after:1 week

Added:
  head/etc/periodic/security/110.neggrpperm
 - copied, changed from r213358, head/etc/periodic/security/100.chksetuid
Modified:
  head/etc/defaults/periodic.conf
  head/etc/periodic/security/Makefile
  head/share/man/man5/periodic.conf.5

Modified: head/etc/defaults/periodic.conf
==
--- head/etc/defaults/periodic.conf Fri Nov 12 22:59:50 2010
(r215212)
+++ head/etc/defaults/periodic.conf Sat Nov 13 00:40:43 2010
(r215213)
@@ -160,6 +160,9 @@ daily_status_security_diff_flags="-b -u"
 # 100.chksetuid
 daily_status_security_chksetuid_enable="YES"
 
+# 110.neggrpperm
+daily_status_security_neggrpperm_enable="NO"
+
 # 200.chkmounts
 daily_status_security_chkmounts_enable="YES"
 #daily_status_security_chkmounts_ignore="^amd:"# Don't check 
matching

Copied and modified: head/etc/periodic/security/110.neggrpperm (from r213358, 
head/etc/periodic/security/100.chksetuid)
==
--- head/etc/periodic/security/100.chksetuidSat Oct  2 11:45:18 2010
(r213358, copy source)
+++ head/etc/periodic/security/110.neggrpperm   Sat Nov 13 00:40:43 2010
(r215213)
@@ -35,23 +35,19 @@ then
 source_periodic_confs
 fi
 
-. /etc/periodic/security/security.functions
-
 rc=0
 
-case "$daily_status_security_chksetuid_enable" in
+case "$daily_status_security_neggrpperm_enable" in
 [Yy][Ee][Ss])
echo ""
-   echo 'Checking setuid files and devices:'
+   echo 'Checking negative group permissions:'
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
-   find -sx $MP /dev/null -type f \
-   \( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
-   \( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ |
-   check_diff setuid - "${host} setuid diffs:"
-   rc=$?
-   ;;
-*)
-   rc=0
+   n=$(find -sx $MP /dev/null -type f \
+   \( \( ! -perm +010 -and -perm +001 \) -or \
+   \( ! -perm +020 -and -perm +002 \) -or \
+   \( ! -perm +040 -and -perm +004 \) \) \
+   -exec ls -liTd \{\} \+ | tee /dev/stderr | wc -l)
+   [ $n -gt 0 ] && rc=1 || rc=0
;;
 esac
 

Modified: head/etc/periodic/security/Makefile
==
--- head/etc/periodic/security/Makefile Fri Nov 12 22:59:50 2010
(r215212)
+++ head/etc/periodic/security/Makefile Sat Nov 13 00:40:43 2010
(r215213)
@@ -3,6 +3,7 @@
 .include 
 
 FILES= 100.chksetuid \
+   110.neggrpperm \
200.chkmounts \
300.chkuid0 \
400.passwdless \

Modified: head/share/man/man5/periodic.conf.5
==
--- head/share/man/man5/periodic.conf.5 Fri Nov 12 22:59:50 2010
(r215212)
+++ head/share/man/man5/periodic.conf.5 Sat Nov 13 00:40:43 2010
(r215213)
@@ -482,6 +482,14 @@ Set to
 .Dq Li YES
 to compare the modes and modification times of setuid executables with
 the previous day's values.
+.It Va daily_status_security_neggrpperm_enable
+.Pq Vt bool
+Set to
+.Dq Li YES
+to check for files where the group of a file has less permissions than
+the world at large.
+When users are in more than 14 supplemental groups these negative
+permissions may not be enforced via NFS shares.
 .It Va daily_status_security_chkmounts_enable
 .Pq Vt bool
 Set to
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r216089 - head/sbin/ifconfig

2010-12-03 Thread Brooks Davis
On Thu, Dec 02, 2010 at 01:19:27PM +, Gavin Atkinson wrote:
> On Wed, 2010-12-01 at 03:24 +, Weongyo Jeong wrote:
> > Author: weongyo
> > Date: Wed Dec  1 03:24:38 2010
> > New Revision: 216089
> > URL: http://svn.freebsd.org/changeset/base/216089
> > 
> > Log:
> >   Don't print usbus[0-9] interfaces that it's not the interesting
> >   interface type for ifconfig(8).
> > 
> > Modified:
> >   head/sbin/ifconfig/ifconfig.c
> > 
> > Modified: head/sbin/ifconfig/ifconfig.c
> > ==
> > --- head/sbin/ifconfig/ifconfig.c   Tue Nov 30 22:39:46 2010
> > (r216088)
> > +++ head/sbin/ifconfig/ifconfig.c   Wed Dec  1 03:24:38 2010
> > (r216089)
> > @@ -295,6 +295,8 @@ main(int argc, char *argv[])
> > sdl = (const struct sockaddr_dl *) ifa->ifa_addr;
> > else
> > sdl = NULL;
> > +   if (sdl != NULL && sdl->sdl_type == IFT_USB)
> > +   continue;
> > if (cp != NULL && strcmp(cp, ifa->ifa_name) == 0 && !namesonly)
> > continue;
> > iflen = strlcpy(name, ifa->ifa_name, sizeof(name));
> 
> I may be misunderstanding, but isn't this more of a hack than the
> correct solution?  I appreciate that there are a large number of defined
> interface types, but I wonder if we should instead check for interface
> types we are prepared to accept, rather than skipping ones we know we
> don't want?
> 
> Was this issue introduced with the introduction of the USB pcap changes?

We might consider an interface flag for interfaces that aren't
configurable in a meaninful way by ifconfig.  Then ifconfig wouldn't
have to change going forward.

-- Brooks


pgpGPMy7uCFgc.pgp
Description: PGP signature


Re: svn commit: r196706 - head/usr.sbin/pkg_install/lib

2009-08-31 Thread Brooks Davis
On Mon, Aug 31, 2009 at 05:50:33PM +, Doug Barton wrote:
> Author: dougb
> Date: Mon Aug 31 17:50:33 2009
> New Revision: 196706
> URL: http://svn.freebsd.org/changeset/base/196706
> 
> Log:
>   Add support for INDEX-9 [1]
>   
>   While I'm here, strip off support for FreeBSD 5.x.

I'm rather baffled as to why you'd bother removing 5.x support and keep
<=4.x support.  It seems vanishingly unlikely we'll ever support plain
INDEX files again.

-- Brooks


pgpNQtbB44pGc.pgp
Description: PGP signature


Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys

2009-09-04 Thread Brooks Davis
On Sat, Aug 29, 2009 at 08:12:28PM +0100, Bruce Cran wrote:
> On Fri, 24 Jul 2009 15:03:10 + (UTC)
> Brooks Davis  wrote:
> 
> > Author: brooks
> > Date: Fri Jul 24 15:03:10 2009
> > New Revision: 195843
> > URL: http://svn.freebsd.org/changeset/base/195843
> > 
> > Log:
> >   Revert the changes to struct kinfo_proc in r194498.  Instead, fill
> >   in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags
> >   (all bits currently unused) to indicate overflow with the new flag
> >   KI_CRF_GRP_OVERFLOW.
> >   
> >   This fixes procstat -s.
> >   
> >   Approved by: re (kib)
> 
> Hi Brooks,
> 
> This checkin appears to have broken crash dump support: the bcopy in
> kvm_proc.c crashes when running "ps -ax -M /var/crash/vmcore.x
> -N /boot/kernel/kernel", apparently because ucred.cr_groups isn't valid.
> Does it need converted using KVM_READ first?

Sorry for the delay, I believe you are correct we need to use kvm_read
here instead of the bcopy.  Do you still have a core handy you can test
a patch against?  The following should do it.

-- Brooks

Index: lib/libkvm/kvm_proc.c
===
--- lib/libkvm/kvm_proc.c   (revision 196736)
+++ lib/libkvm/kvm_proc.c   (working copy)
@@ -151,7 +151,7 @@
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
}
kp->ki_ngroups = ucred.cr_ngroups;
-   bcopy(ucred.cr_groups, kp->ki_groups,
+   kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t));
kp->ki_uid = ucred.cr_uid;
if (ucred.cr_prison != NULL) {


pgpOZzLgXCj6M.pgp
Description: PGP signature


Re: svn commit: r195843 - in head: lib/libkvm sys/kern sys/sys

2009-09-08 Thread Brooks Davis
On Sun, Sep 06, 2009 at 04:47:00AM +0100, Bruce Cran wrote:
> On Fri, 4 Sep 2009 17:14:32 -0500
> Brooks Davis  wrote:
> 
> > On Sat, Aug 29, 2009 at 08:12:28PM +0100, Bruce Cran wrote:
> > > On Fri, 24 Jul 2009 15:03:10 + (UTC)
> > > Brooks Davis  wrote:
> > > 
> > > > Author: brooks
> > > > Date: Fri Jul 24 15:03:10 2009
> > > > New Revision: 195843
> > > > URL: http://svn.freebsd.org/changeset/base/195843
> > > > 
> > > > Log:
> > > >   Revert the changes to struct kinfo_proc in r194498.  Instead,
> > > > fill in up to 16 (KI_NGROUPS) values and steal a bit from
> > > > ki_cr_flags (all bits currently unused) to indicate overflow with
> > > > the new flag KI_CRF_GRP_OVERFLOW.
> > > >   
> > > >   This fixes procstat -s.
> > > >   
> > > >   Approved by: re (kib)
> > > 
> > > Hi Brooks,
> > > 
> > > This checkin appears to have broken crash dump support: the bcopy in
> > > kvm_proc.c crashes when running "ps -ax -M /var/crash/vmcore.x
> > > -N /boot/kernel/kernel", apparently because ucred.cr_groups isn't
> > > valid. Does it need converted using KVM_READ first?
> > 
> > Sorry for the delay, I believe you are correct we need to use kvm_read
> > here instead of the bcopy.  Do you still have a core handy you can
> > test a patch against?  The following should do it.
> 
> The patch has fixed the crash, and data is now returned too.

Thanks for testing!  I've committed the patch and will MFC in the next
week or so.

-- Brooks


pgpP7HWEy8Fl8.pgp
Description: PGP signature


svn commit: r196990 - head/lib/libkvm

2009-09-08 Thread Brooks Davis
Author: brooks
Date: Tue Sep  8 19:37:59 2009
New Revision: 196990
URL: http://svn.freebsd.org/changeset/base/196990

Log:
  cr_groups is no longer embedded in struct ucred and is instead stored
  in a seperate array.  As such we need to use kvm_read rather than bcopy
  to populate the ki_groups field.
  
  This fixes a crash when running ps -ax on a coredump.
  
  Reported by:  brucec
  Tested by:brucec
  MFC after:3 days

Modified:
  head/lib/libkvm/kvm_proc.c

Modified: head/lib/libkvm/kvm_proc.c
==
--- head/lib/libkvm/kvm_proc.c  Tue Sep  8 19:18:02 2009(r196989)
+++ head/lib/libkvm/kvm_proc.c  Tue Sep  8 19:37:59 2009(r196990)
@@ -151,7 +151,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
}
kp->ki_ngroups = ucred.cr_ngroups;
-   bcopy(ucred.cr_groups, kp->ki_groups,
+   kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t));
kp->ki_uid = ucred.cr_uid;
if (ucred.cr_prison != NULL) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197047 - head/share/man/man4

2009-09-09 Thread Brooks Davis
Author: brooks
Date: Wed Sep  9 20:28:58 2009
New Revision: 197047
URL: http://svn.freebsd.org/changeset/base/197047

Log:
  Mention that a few ed(4) devices don't emit link state change notices
  and a workaround for dhclient.
  
  Reviewed by:   thierry
  MFC after:3 days

Modified:
  head/share/man/man4/ed.4

Modified: head/share/man/man4/ed.4
==
--- head/share/man/man4/ed.4Wed Sep  9 19:40:54 2009(r197046)
+++ head/share/man/man4/ed.4Wed Sep  9 20:28:58 2009(r197047)
@@ -425,3 +425,21 @@ driver is slow by today's standards.
 .Pp
 PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet
 port only at this time.
+.Pp
+Some devices supported by
+.Nm
+do no generate the link state change events used by
+.Xr devd 8
+to start
+.Xr dhclinet 8 .
+If you have problems with
+.Xr dhclient 8
+not starting and the device is always attached to the network it may
+be possible to work around this by changing
+.Dq Li DHCP
+to
+.Dq Li SYNCDHCP
+in the
+.Va ifconfig_ed0
+entry in
+.Pa /etc/rc.conf .
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197050 - head/share/man/man4

2009-09-09 Thread Brooks Davis
Author: brooks
Date: Wed Sep  9 21:51:54 2009
New Revision: 197050
URL: http://svn.freebsd.org/changeset/base/197050

Log:
  Change one no to not in r197047
  
  Submitted by: John Nielsen 

Modified:
  head/share/man/man4/ed.4

Modified: head/share/man/man4/ed.4
==
--- head/share/man/man4/ed.4Wed Sep  9 20:59:01 2009(r197049)
+++ head/share/man/man4/ed.4Wed Sep  9 21:51:54 2009(r197050)
@@ -428,7 +428,7 @@ port only at this time.
 .Pp
 Some devices supported by
 .Nm
-do no generate the link state change events used by
+do not generate the link state change events used by
 .Xr devd 8
 to start
 .Xr dhclinet 8 .
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r197065 - in stable/8: etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf

2009-09-10 Thread Brooks Davis
On Thu, Sep 10, 2009 at 05:36:56PM +0200, Ivan Voras wrote:
> 2009/9/10 Ken Smith :
> > On Thu, 2009-09-10 at 15:29 +0100, Gavin Atkinson wrote:
> 
> >> This seems like a step backwards to me: crash dumps have been left
> >> enabled in 7.x and have proved very useful from the point of view of
> >> improved quality of received PRs. ??I'm not aware of any problems
> >> relating to leaving them enabled.
> >>
> >> I'd appreciate it if this decision was reconsidered.
> >>
> >
> > Unfortunately as I said before there is no "Right answer" for this one.
> 
> No, but there is an "80% right" one, based on the question: did the
> change in 7 cause known problems for any significant number of users
> (or one of two big users - that should be enough).

Given that we've shipped three releases with it this way we should have
an answer here.  If we can't identify real problem instances by now,
there probably aren't significant ones in practice.  IMO, we have always
gone too far in disabling debugging.

-- Brooks


pgpnPsUgDwLwL.pgp
Description: PGP signature


Re: svn commit: r197047 - head/share/man/man4

2009-09-10 Thread Brooks Davis
On Thu, Sep 10, 2009 at 02:33:27PM -0600, Warner Losh wrote:
> From: Brooks Davis 
> Subject: svn commit: r197047 - head/share/man/man4
> Date: Wed, 9 Sep 2009 20:28:58 + (UTC)
> 
> > Author: brooks
> > Date: Wed Sep  9 20:28:58 2009
> > New Revision: 197047
> > URL: http://svn.freebsd.org/changeset/base/197047
> > 
> > Log:
> >   Mention that a few ed(4) devices don't emit link state change notices
> >   and a workaround for dhclient.
> 
> I thought that I'd made it so that we report the link as active always
> for those devices that don't support reporting the link status in the
> hardware.  Is this really necessary still?

That fixes the case where dhclient never sees a link, but apparently
doesn't deal with the fact that in 8.0 dhclient never starts without
a link-up event.  It may be that we need to generate a single link-up
event at startup to provide an equivalent workaround.

-- Brooks

> Warner
> 
> >   Reviewed by:   thierry
> >   MFC after:3 days
> > 
> > Modified:
> >   head/share/man/man4/ed.4
> > 
> > Modified: head/share/man/man4/ed.4
> > ==
> > --- head/share/man/man4/ed.4Wed Sep  9 19:40:54 2009
> > (r197046)
> > +++ head/share/man/man4/ed.4Wed Sep  9 20:28:58 2009
> > (r197047)
> > @@ -425,3 +425,21 @@ driver is slow by today's standards.
> >  .Pp
> >  PC Card attachment supports the D-Link DMF650TX LAN/Modem card's Ethernet
> >  port only at this time.
> > +.Pp
> > +Some devices supported by
> > +.Nm
> > +do no generate the link state change events used by
> > +.Xr devd 8
> > +to start
> > +.Xr dhclinet 8 .
> > +If you have problems with
> > +.Xr dhclient 8
> > +not starting and the device is always attached to the network it may
> > +be possible to work around this by changing
> > +.Dq Li DHCP
> > +to
> > +.Dq Li SYNCDHCP
> > +in the
> > +.Va ifconfig_ed0
> > +entry in
> > +.Pa /etc/rc.conf .
> > 
> 


pgpQFmCIjM34V.pgp
Description: PGP signature


svn commit: r197269 - head/sys/ufs/ufs

2009-09-17 Thread Brooks Davis
Author: brooks
Date: Thu Sep 17 12:35:13 2009
New Revision: 197269
URL: http://svn.freebsd.org/changeset/base/197269

Log:
  Allocate space for the group array in a static credential used in
  the quota code.  One case was correctly handled in r194498, but
  this one was missed.
  
  PR:   kern/138657
  Tested by:PR submitter
  MFC after:3 days

Modified:
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cThu Sep 17 12:27:06 2009
(r197268)
+++ head/sys/ufs/ufs/ufs_vnops.cThu Sep 17 12:35:13 2009
(r197269)
@@ -1449,6 +1449,7 @@ ufs_mkdir(ap)
{
 #ifdef QUOTA
struct ucred ucred, *ucp;
+   gid_t ucred_group;
ucp = cnp->cn_cred;
 #endif
/*
@@ -1476,6 +1477,7 @@ ufs_mkdir(ap)
refcount_init(&ucred.cr_ref, 1);
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
+   ucred.cr_groups = &ucred_group;
ucred.cr_groups[0] = dp->i_gid;
ucp = &ucred;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197473 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci ufs/ufs

2009-09-24 Thread Brooks Davis
Author: brooks
Date: Thu Sep 24 21:32:56 2009
New Revision: 197473
URL: http://svn.freebsd.org/changeset/base/197473

Log:
  MFC r197269:
  Allocate space for the group array in a static credential used in
  the quota code.  One case was correctly handled in r194498, but
  this one was missed.
  
  PR:   kern/138657
  Tested by:PR submitter
  MFC after:3 days
  Approved by:  re@ (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/ufs/ufs/ufs_vnops.c

Modified: stable/8/sys/ufs/ufs/ufs_vnops.c
==
--- stable/8/sys/ufs/ufs/ufs_vnops.cThu Sep 24 20:43:08 2009
(r197472)
+++ stable/8/sys/ufs/ufs/ufs_vnops.cThu Sep 24 21:32:56 2009
(r197473)
@@ -1449,6 +1449,7 @@ ufs_mkdir(ap)
{
 #ifdef QUOTA
struct ucred ucred, *ucp;
+   gid_t ucred_group;
ucp = cnp->cn_cred;
 #endif
/*
@@ -1476,6 +1477,7 @@ ufs_mkdir(ap)
refcount_init(&ucred.cr_ref, 1);
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
+   ucred.cr_groups = &ucred_group;
ucred.cr_groups[0] = dp->i_gid;
ucp = &ucred;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r197474 - stable/8/lib/libkvm

2009-09-24 Thread Brooks Davis
Author: brooks
Date: Thu Sep 24 21:35:13 2009
New Revision: 197474
URL: http://svn.freebsd.org/changeset/base/197474

Log:
  MFC r196990:
  cr_groups is no longer embedded in struct ucred and is instead stored
  in a seperate array.  As such we need to use kvm_read rather than bcopy
  to populate the ki_groups field.
  
  This fixes a crash when running ps -ax on a coredump.
  
  Reported by:  brucec
  Tested by:brucec
  MFC after:3 days
  Approved by:  re@ (kib)

Modified:
  stable/8/lib/libkvm/   (props changed)
  stable/8/lib/libkvm/kvm_proc.c

Modified: stable/8/lib/libkvm/kvm_proc.c
==
--- stable/8/lib/libkvm/kvm_proc.c  Thu Sep 24 21:32:56 2009
(r197473)
+++ stable/8/lib/libkvm/kvm_proc.c  Thu Sep 24 21:35:13 2009
(r197474)
@@ -151,7 +151,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
}
kp->ki_ngroups = ucred.cr_ngroups;
-   bcopy(ucred.cr_groups, kp->ki_groups,
+   kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t));
kp->ki_uid = ucred.cr_uid;
if (ucred.cr_prison != NULL) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r227459 - in head/sys: dev/lmc net netgraph netinet

2011-11-11 Thread Brooks Davis
Author: brooks
Date: Fri Nov 11 22:57:52 2011
New Revision: 227459
URL: http://svn.freebsd.org/changeset/base/227459

Log:
  In r191367 the need for if_free_type() was removed and a new member
  if_alloctype was used to store the origional interface type.  Take
  advantage of this change by removing all existing uses of if_free_type()
  in favor of if_free().
  
  MFC after:1 Month

Modified:
  head/sys/dev/lmc/if_lmc.c
  head/sys/net/if_bridge.c
  head/sys/net/if_lagg.c
  head/sys/net/if_tap.c
  head/sys/net/if_vlan.c
  head/sys/netgraph/ng_fec.c
  head/sys/netinet/ip_carp.c

Modified: head/sys/dev/lmc/if_lmc.c
==
--- head/sys/dev/lmc/if_lmc.c   Fri Nov 11 22:27:09 2011(r227458)
+++ head/sys/dev/lmc/if_lmc.c   Fri Nov 11 22:57:52 2011(r227459)
@@ -4945,7 +4945,9 @@ lmc_ifnet_detach(softc_t *sc)
   /* Detach from the ifnet kernel interface. */
   if_detach(sc->ifp);
 
-# if (__FreeBSD_version >= 60)
+# if (defined(__FreeBSD__) && __FreeBSD_version >= 800082)
+  if_free(sc->ifp);
+# elif (defined(__FreeBSD__) && __FreeBSD_version >= 60)
   if_free_type(sc->ifp, NSPPP ? IFT_PPP : IFT_OTHER);
 # endif
   }

Modified: head/sys/net/if_bridge.c
==
--- head/sys/net/if_bridge.cFri Nov 11 22:27:09 2011(r227458)
+++ head/sys/net/if_bridge.cFri Nov 11 22:57:52 2011(r227459)
@@ -676,7 +676,7 @@ bridge_clone_destroy(struct ifnet *ifp)
 
bstp_detach(&sc->sc_stp);
ether_ifdetach(ifp);
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
 
/* Tear down the routing table. */
bridge_rtable_fini(sc);

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Fri Nov 11 22:27:09 2011(r227458)
+++ head/sys/net/if_lagg.c  Fri Nov 11 22:57:52 2011(r227459)
@@ -275,7 +275,7 @@ lagg_clone_create(struct if_clone *ifc, 
if (lagg_protos[i].ti_proto == LAGG_PROTO_DEFAULT) {
sc->sc_proto = lagg_protos[i].ti_proto;
if ((error = lagg_protos[i].ti_attach(sc)) != 0) {
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
free(sc, M_DEVBUF);
return (error);
}
@@ -293,7 +293,6 @@ lagg_clone_create(struct if_clone *ifc, 
ifmedia_set(&sc->sc_media, IFM_ETHER | IFM_AUTO);
 
if_initname(ifp, ifc->ifc_name, unit);
-   ifp->if_type = IFT_ETHER;
ifp->if_softc = sc;
ifp->if_start = lagg_start;
ifp->if_init = lagg_init;
@@ -305,7 +304,7 @@ lagg_clone_create(struct if_clone *ifc, 
IFQ_SET_READY(&ifp->if_snd);
 
/*
-* Attach as an ordinary ethernet device, childs will be attached
+* Attach as an ordinary ethernet device, children will be attached
 * as special device IFT_IEEE8023ADLAG.
 */
ether_ifattach(ifp, eaddr);
@@ -352,7 +351,7 @@ lagg_clone_destroy(struct ifnet *ifp)
 
ifmedia_removeall(&sc->sc_media);
ether_ifdetach(ifp);
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
 
mtx_lock(&lagg_list_mtx);
SLIST_REMOVE(&lagg_list, sc, lagg_softc, sc_entries);

Modified: head/sys/net/if_tap.c
==
--- head/sys/net/if_tap.c   Fri Nov 11 22:27:09 2011(r227458)
+++ head/sys/net/if_tap.c   Fri Nov 11 22:57:52 2011(r227459)
@@ -218,7 +218,7 @@ tap_destroy(struct tap_softc *tp)
knlist_destroy(&tp->tap_rsel.si_note);
destroy_dev(tp->tap_dev);
ether_ifdetach(ifp);
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
 
mtx_destroy(&tp->tap_mtx);
free(tp, M_TAP);

Modified: head/sys/net/if_vlan.c
==
--- head/sys/net/if_vlan.c  Fri Nov 11 22:27:09 2011(r227458)
+++ head/sys/net/if_vlan.c  Fri Nov 11 22:57:52 2011(r227459)
@@ -967,7 +967,7 @@ vlan_clone_create(struct if_clone *ifc, 
 */
ether_ifdetach(ifp);
vlan_unconfig(ifp);
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
ifc_free_unit(ifc, unit);
free(ifv, M_VLAN);
 
@@ -989,7 +989,7 @@ vlan_clone_destroy(struct if_clone *ifc,
 
ether_ifdetach(ifp);/* first, remove it from system-wide lists */
vlan_unconfig(ifp); /* now it can be unconfigured and freed */
-   if_free_type(ifp, IFT_ETHER);
+   if_free(ifp);
free(ifv, M_VLAN);
ifc_free_unit(ifc, unit);
 

Modified: head/sys/netgraph

svn commit: r218372 - in stable/8: etc/defaults etc/periodic/security share/man/man5

2011-02-06 Thread Brooks Davis
Author: brooks
Date: Sun Feb  6 13:59:03 2011
New Revision: 218372
URL: http://svn.freebsd.org/changeset/base/218372

Log:
  MFC r215213:
  
  Add an (off by default) check for negative permissions (where the
  group on a object has less permissions than everyone).  These
  permissions will not work reliably over NFS if you have more than
  14 supplemental groups and are usually not what you mean.

Added:
  stable/8/etc/periodic/security/110.neggrpperm
 - copied unchanged from r215213, head/etc/periodic/security/110.neggrpperm
Modified:
  stable/8/etc/defaults/periodic.conf
  stable/8/etc/periodic/security/Makefile
  stable/8/share/man/man5/periodic.conf.5
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/etc/defaults/periodic.conf
==
--- stable/8/etc/defaults/periodic.conf Sun Feb  6 13:17:40 2011
(r218371)
+++ stable/8/etc/defaults/periodic.conf Sun Feb  6 13:59:03 2011
(r218372)
@@ -157,6 +157,9 @@ daily_status_security_diff_flags="-b -u"
 # 100.chksetuid
 daily_status_security_chksetuid_enable="YES"
 
+# 110.neggrpperm
+daily_status_security_neggrpperm_enable="NO"
+
 # 200.chkmounts
 daily_status_security_chkmounts_enable="YES"
 #daily_status_security_chkmounts_ignore="^amd:"# Don't check 
matching

Copied: stable/8/etc/periodic/security/110.neggrpperm (from r215213, 
head/etc/periodic/security/110.neggrpperm)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/8/etc/periodic/security/110.neggrpperm   Sun Feb  6 13:59:03 
2011(r218372, copy of r215213, 
head/etc/periodic/security/110.neggrpperm)
@@ -0,0 +1,54 @@
+#!/bin/sh -
+#
+# Copyright (c) 2001  The FreeBSD Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+. /etc/defaults/periodic.conf
+source_periodic_confs
+fi
+
+rc=0
+
+case "$daily_status_security_neggrpperm_enable" in
+[Yy][Ee][Ss])
+   echo ""
+   echo 'Checking negative group permissions:'
+   MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
+   n=$(find -sx $MP /dev/null -type f \
+   \( \( ! -perm +010 -and -perm +001 \) -or \
+   \( ! -perm +020 -and -perm +002 \) -or \
+   \( ! -perm +040 -and -perm +004 \) \) \
+   -exec ls -liTd \{\} \+ | tee /dev/stderr | wc -l)
+   [ $n -gt 0 ] && rc=1 || rc=0
+   ;;
+esac
+
+exit $rc

Modified: stable/8/etc/periodic/security/Makefile
==
--- stable/8/etc/periodic/security/Makefile Sun Feb  6 13:17:40 2011
(r218371)
+++ stable/8/etc/periodic/security/Makefile Sun Feb  6 13:59:03 2011
(r218372)
@@ -3,6 +3,7 @@
 .include 
 
 FILES= 100.chksetuid \
+   110.neggrpperm \
200.chkmounts \
300.chkuid0 \
400.passwdless \

Modified: stable/8/share/man/man5/periodic.conf.5
==
--- stable/8/share/man/man5/periodic.conf.5 Sun Feb  6 13:17:40 2011
(r218371)
+++ stable/8/share/man/man5/periodic.conf.5 Sun Feb  6 13:59:03 2011
(r218372)
@@ -482,6 +482,14 @@ Set to
 .Dq Li YES
 to compare the modes and modification times of setuid executables with
 the previous day's values.
+.It Va daily_status_security_neggrpperm_enable
+.Pq Vt bool
+Set to
+.Dq Li YES
+to check for files where the group o

svn commit: r219018 - head/etc/defaults

2011-02-24 Thread Brooks Davis
Author: brooks
Date: Thu Feb 24 23:51:59 2011
New Revision: 219018
URL: http://svn.freebsd.org/changeset/base/219018

Log:
  Enable the check for negative permissions (the group on a file can't do
  something "everyone" can) by default.
  
  X-MFC after:  never

Modified:
  head/etc/defaults/periodic.conf

Modified: head/etc/defaults/periodic.conf
==
--- head/etc/defaults/periodic.conf Thu Feb 24 23:45:13 2011
(r219017)
+++ head/etc/defaults/periodic.conf Thu Feb 24 23:51:59 2011
(r219018)
@@ -161,7 +161,7 @@ daily_status_security_diff_flags="-b -u"
 daily_status_security_chksetuid_enable="YES"
 
 # 110.neggrpperm
-daily_status_security_neggrpperm_enable="NO"
+daily_status_security_neggrpperm_enable="YES"
 
 # 200.chkmounts
 daily_status_security_chkmounts_enable="YES"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r224638 - head/crypto/openssh

2011-08-03 Thread Brooks Davis
Author: brooks
Date: Wed Aug  3 19:14:22 2011
New Revision: 224638
URL: http://svn.freebsd.org/changeset/base/224638

Log:
  Add support for dynamically adjusted buffers to allow the full use of
  the bandwidth of long fat pipes (i.e. 100Mbps+ trans-oceanic or
  trans-continental links).  Bandwidth-delay products up to 64MB are
  supported.
  
  Also add support (not compiled by default) for the None cypher.  The
  None cypher can only be enabled on non-interactive sessions (those
  without a pty where -T was not used) and must be enabled in both
  the client and server configuration files and on the client command
  line.  Additionally, the None cypher will only be activated after
  authentication is complete.  To enable the None cypher you must add
  -DNONE_CIPHER_ENABLED to CFLAGS via the make command line or in
  /etc/make.conf.
  
  This code is a style(9) compliant version of these features extracted
  from the patches published at:
  
  http://www.psc.edu/networking/projects/hpn-ssh/
  
  Merging this patch has been a collaboration between me and Bjoern.
  
  Reviewed by:  bz
  Approved by:  re (kib), des (maintainer)

Added:
  head/crypto/openssh/README.hpn
Modified:
  head/crypto/openssh/buffer.c
  head/crypto/openssh/buffer.h
  head/crypto/openssh/channels.c
  head/crypto/openssh/channels.h
  head/crypto/openssh/cipher.c
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/compat.h
  head/crypto/openssh/kex.c
  head/crypto/openssh/kex.h
  head/crypto/openssh/misc.c
  head/crypto/openssh/misc.h
  head/crypto/openssh/myproposal.h
  head/crypto/openssh/packet.c
  head/crypto/openssh/packet.h
  head/crypto/openssh/readconf.c
  head/crypto/openssh/readconf.h
  head/crypto/openssh/servconf.c
  head/crypto/openssh/servconf.h
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp.1
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh.c
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.c
  head/crypto/openssh/sshd_config
  head/crypto/openssh/version.c
  head/crypto/openssh/version.h

Added: head/crypto/openssh/README.hpn
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/crypto/openssh/README.hpn  Wed Aug  3 19:14:22 2011
(r224638)
@@ -0,0 +1,120 @@
+Notes:
+
+NONE CIPHER:
+  To use the NONE option you must have the NoneEnabled switch set on the server
+  and you MUST have *both* NoneEnabled and NoneSwitch set to yes on the client.
+  The NONE feature works with ALL ssh subsystems (as far as we can tell)
+  as long as there is no tty allocated.
+  If a user uses the -T switch to prevent a tty being created the NONE cipher
+  will be disabled. 
+
+
+PERFORMANCE:
+  The performance increase will only be as good as the network and TCP stack
+  tuning on the reciever side of the connection allows.  As a rule of thumb a
+  user will need at least 10Mb/s connection with a 100ms RTT to see a doubling
+  of performance.
+  The HPN-SSH home page  http://www.psc.edu/networking/projects/hpn-ssh
+  describes this in greater detail. 
+
+
+BUFFER SIZES:
+- if HPN is disabled the receive buffer size will be set to the OpenSSH default
+  of 64K.
+
+- if a HPN system connects to a non-HPN system the receive buffer will
+  be set to the HPNBufferSize value. The default is 2MB but user adjustable.
+
+- If a HPN to HPN connection is established a number of different things might
+  happen based on the user options and conditions. 
+
+  Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set 
+  Result: HPN Buffer Size = up to 64MB 
+This is the default state.  The HPN buffer size will grow to a maximum of
+64MB as the TCP receive buffer grows.  The maximum HPN Buffer size of 64MB
+is geared towards 10GigE transcontinental connections. 
+
+  Conditions: HPNBufferSize NOT Set, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set
+  Result: HPN Buffer Size = TCP receive buffer value. 
+Users on non-autotuning systesm should disable TCPRcvBufPoll in the 
+ssh_cofig and sshd_config
+
+  Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf NOT Set
+  Result: HPN Buffer Size = minmum of TCP receive buffer and HPNBufferSize. 
+This would be the system defined TCP receive buffer (RWIN).
+
+  Conditions: HPNBufferSize SET, TCPRcvBufPoll disabled, TCPRcvBuf SET
+  Result: HPN Buffer Size = minmum of TCPRcvBuf and HPNBufferSize. 
+Generally there is no need to set both.
+
+  Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf NOT Set
+  Result: HPN Buffer Size = grows to HPNBufferSize
+The buffer will grow up to the maximum size specified here. 
+
+  Conditions: HPNBufferSize SET, TCPRcvBufPoll enabled, TCPRcvBuf SET
+  Result: HPN Buffer Size = minmum of TCPRcvBuf and HPNBufferSize. 
+Generally there is no need to set both of the

svn commit: r224640 - head/crypto/openssh

2011-08-03 Thread Brooks Davis
Author: brooks
Date: Wed Aug  3 20:00:36 2011
New Revision: 224640
URL: http://svn.freebsd.org/changeset/base/224640

Log:
  Enable keyword expansion for $FreeBSD$ on files where it was added it
  r224638.
  
  Submitted by: bz
  Approved by:  re (implicit)
  Point hat to: brooks

Modified:
Directory Properties:
  head/crypto/openssh/buffer.c   (props changed)
  head/crypto/openssh/buffer.h   (props changed)
  head/crypto/openssh/channels.c   (props changed)
  head/crypto/openssh/channels.h   (props changed)
  head/crypto/openssh/cipher.c   (props changed)
  head/crypto/openssh/clientloop.c   (props changed)
  head/crypto/openssh/compat.c   (props changed)
  head/crypto/openssh/kex.c   (props changed)
  head/crypto/openssh/kex.h   (props changed)
  head/crypto/openssh/misc.c   (props changed)
  head/crypto/openssh/misc.h   (props changed)
  head/crypto/openssh/myproposal.h   (props changed)
  head/crypto/openssh/packet.c   (props changed)
  head/crypto/openssh/packet.h   (props changed)
  head/crypto/openssh/readconf.h   (props changed)
  head/crypto/openssh/serverloop.c   (props changed)
  head/crypto/openssh/sftp.c   (props changed)
  head/crypto/openssh/sshconnect2.c   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r224642 - head/crypto/openssh

2011-08-03 Thread Brooks Davis
Author: brooks
Date: Wed Aug  3 20:21:52 2011
New Revision: 224642
URL: http://svn.freebsd.org/changeset/base/224642

Log:
  Fix two more $FreeBSD$ keywords.
  
  Reported by:  pluknet
  Approved by:  re (implicit)

Modified:
  head/crypto/openssh/compat.h   (contents, props changed)
  head/crypto/openssh/servconf.h   (contents, props changed)

Modified: head/crypto/openssh/compat.h
==
--- head/crypto/openssh/compat.hWed Aug  3 20:21:00 2011
(r224641)
+++ head/crypto/openssh/compat.hWed Aug  3 20:21:52 2011
(r224642)
@@ -1,5 +1,5 @@
 /* $OpenBSD: compat.h,v 1.42 2008/09/11 14:22:37 markus Exp $ */
-/* $FReeBSD$ */
+/* $FreeBSD$ */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Markus Friedl.  All rights reserved.

Modified: head/crypto/openssh/servconf.h
==
--- head/crypto/openssh/servconf.h  Wed Aug  3 20:21:00 2011
(r224641)
+++ head/crypto/openssh/servconf.h  Wed Aug  3 20:21:52 2011
(r224642)
@@ -1,5 +1,5 @@
 /* $OpenBSD: servconf.h,v 1.95 2010/11/13 23:27:50 djm Exp $ */
-/* $OpenBSD$ */
+/* $FreeBSD$ */
 
 /*
  * Author: Tatu Ylonen 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r224782 - svnadmin/conf

2011-08-11 Thread Brooks Davis
Author: brooks
Date: Thu Aug 11 14:17:04 2011
New Revision: 224782
URL: http://svn.freebsd.org/changeset/base/224782

Log:
  Take Kirill's commit bit into safe keeping per his request to core@.
  
  Approved by:  core

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessThu Aug 11 13:29:59 2011(r224781)
+++ svnadmin/conf/accessThu Aug 11 14:17:04 2011(r224782)
@@ -136,7 +136,6 @@ kevlo
 kib
 kientzle
 kmacy
-krion
 kris
 kuriyama
 le
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r221348 - head/sys/boot/i386/boot2

2011-05-03 Thread Brooks Davis
On Tue, May 03, 2011 at 03:39:27PM +0200, Roman Divacky wrote:
> With the recent libobjc removal this means that we can compile
> all (no exceptions) of FreeBSD/{i386,amd64} with clang.
> 
> Quite a milestone in my opinion :)


Great news!  Thanks for all the work to make this happen!

Has boot2 been submitted to LLVM as a clang regression test?

Thanks,
Brooks

> 
> On Mon, May 02, 2011 at 09:13:08PM +, Dimitry Andric wrote:
> > Author: dim
> > Date: Mon May  2 21:13:08 2011
> > New Revision: 221348
> > URL: http://svn.freebsd.org/changeset/base/221348
> > 
> > Log:
> >   Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.
> > 
> > Modified:
> >   head/sys/boot/i386/boot2/Makefile
> > 
> > Modified: head/sys/boot/i386/boot2/Makefile
> > ==
> > --- head/sys/boot/i386/boot2/Makefile   Mon May  2 21:10:13 2011
> > (r221347)
> > +++ head/sys/boot/i386/boot2/Makefile   Mon May  2 21:13:08 2011
> > (r221348)
> > @@ -2,9 +2,6 @@
> >  
> >  .include 
> >  
> > -# XXX: clang can compile the boot code just fine, but boot2 gets too big
> > -CC:=${CC:C/^(.*\/)?clang$/gcc/1}
> > -
> >  FILES= boot boot1 boot2
> >  
> >  NM?=   nm
> > @@ -45,6 +42,12 @@ CFLAGS=  -Os \
> > -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
> > -Winline --param max-inline-insns-single=100
> >  
> > +.if ${CC:T:Mclang} == "clang"
> > +CFLAGS+=   -mllvm -stack-alignment=8 -mllvm -inline-threshold=3
> > +# XXX: clang integrated-as doesn't grok .codeNN directives yet
> > +CFLAGS+=   ${.IMPSRC:T:Mboot1.S:C/^.+$/-no-integrated-as/}
> > +.endif
> > +
> >  LDFLAGS=-static -N --gc-sections
> >  
> >  # Pick up ../Makefile.inc early.
> 


pgpomAXJodmw2.pgp
Description: PGP signature


Re: svn commit: r190482 - in head/lib/libc/db: . btree hash mpool

2009-03-30 Thread Brooks Davis
On Mon, Mar 30, 2009 at 09:18:50PM +1100, u...@vk2pj.dyndns.org wrote:
> Hi Xin,
> 
> On 2009-Mar-28 04:00:46 +, Xin LI  wrote:
> >Log:
> >  When allocating memory, zero out them if we don't intend to overwrite them
> >  all; before freeing memory, zero out them before we release it as free
> >  heap.  This will eliminate some potential information leak issue.
> 
> Given that db runs with the same privileges as the process using it, I
> don't see how zeroing memory eliminates any information leak - the
> process can directly open and read the underlying db file itself.
> Zeroing on allocation may fix any potential issue with uninitialised
> structures and prevent the return of garbage in "holes" but that's not
> an information leak.

Consider /etc/pwd.db.  It's world readable, but written by a program that
also wrote /etc/spwd.db which definitely is not.

-- Brooks


pgpYzvBWDtEgZ.pgp
Description: PGP signature


Re: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label

2009-04-07 Thread Brooks Davis
On Wed, Apr 08, 2009 at 12:04:53AM +0200, Ivan Voras wrote:
> 2009/4/7 Dmitry Marakasov :
> > * Robert Watson (rwat...@freebsd.org) wrote:
> >
> >> I get quite a lot of console spam in 8.x right now every boot:
> >>
> >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a.
> >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c.
> >> Trying to mount root from ufs:/dev/ad0s1a
> >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed.
> >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a.
> >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed.
> >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c.
> >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed.
> >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed.
> 
> It's not specific to new development but a standard issue with any labels ...
> 
> > Yeah, and btw there are the same messages at least for msdosfs and
> > iso9660. I guess it's time to silence all these altogether.
> 
> ... and I agree. While useful as a diagnostic, they may be a little
> too much now that UFS IDs are integrated.
> 
> It is simple to set the default verbosity level for glabel lower than
> it is now. But it will be global - for all types of labels.
> 
> Consensus?

IMO the whole thing should be reworked so the labels don't vanish when
used, but until that happens, we should probably hide all the noise
under boot verbose.

-- Brooks


pgpil627ZS4ge.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Brooks Davis
On Thu, Apr 09, 2009 at 05:12:53PM +0400, Dmitry Marakasov wrote:
> * Dag-Erling Smorgrav (d...@freebsd.org) wrote:
> 
> > Modified: head/etc/defaults/rc.conf
> > ==
> > --- head/etc/defaults/rc.conf   Thu Mar 19 12:39:13 2009
> > (r190030)
> > +++ head/etc/defaults/rc.conf   Thu Mar 19 12:48:00 2009
> > (r190031)
> > @@ -101,7 +101,7 @@ nisdomainname="NO"  # Set to NIS domain 
> >  dhclient_program="/sbin/dhclient"  # Path to dhcp client program.
> >  dhclient_flags=""  # Extra flags to pass to dhcp client.
> >  #dhclient_flags_fxp0=""# Extra dhclient flags for fxp0 only
> > -background_dhclient="YES"  # Start dhcp client in the background.
> > +background_dhclient="NO"   # Start dhcp client in the background.
> >  #background_dhclient_fxp0="YES"# Start dhcp client on fxp0 in the 
> > background.
> >  synchronous_dhclient="NO"  # Start dhclient directly on configured
> > # interfaces during startup.
> 
> Shouldn't synchronous_dhclient be ON by default then? The way it
> is, DHCP is not used at all, I ended up with unreachable box which
> didn't get any IP already.

Unless you have one of the few interfaces that does not generate
link status events, dhclient will be started by devd.  The only ones I
know of are a subset set of ed(4) devices, though I think imp may have
fixed those recently with a stub ifmedia interface.

-- Brooks



pgp4YArOvvKk6.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-09 Thread Brooks Davis
On Thu, Apr 09, 2009 at 07:51:38PM +0400, Dmitry Marakasov wrote:
> * Brooks Davis (bro...@freebsd.org) wrote:
> 
> > > Shouldn't synchronous_dhclient be ON by default then? The way it
> > > is, DHCP is not used at all, I ended up with unreachable box which
> > > didn't get any IP already.
> > 
> > Unless you have one of the few interfaces that does not generate
> > link status events, dhclient will be started by devd.  The only ones I
> > know of are a subset set of ed(4) devices, though I think imp may have
> > fixed those recently with a stub ifmedia interface.
> 
> I use ale(4). Will test some more. Couldn't the fact that the interface
> is renamed be the reason?

Shouldn't be.  I use renamed interfaces a fair bit.  The ale(4) driver
uses mii, but so lack of link events shouldn't be an issue unless the
driver is buggy.

> Also, how is the issue of services not starting because of no default
> route/dns/network available solved when running dhclient from devd?

The wait in /etc/rc.d/defaultroute.

-- Brooks


pgp5WJjzRT5Bq.pgp
Description: PGP signature


Re: svn commit: r190031 - head/etc/defaults

2009-04-10 Thread Brooks Davis
On Fri, Apr 10, 2009 at 12:34:04PM -0600, M. Warner Losh wrote:
> In message: <20090409153805.gb83...@lor.one-eyed-alien.net>
>     Brooks Davis  writes:
> : Unless you have one of the few interfaces that does not generate
> : link status events, dhclient will be started by devd.  The only ones I
> : know of are a subset set of ed(4) devices, though I think imp may have
> : fixed those recently with a stub ifmedia interface.
> 
> I think ep(4) is the only "common" case left.  For ed(4) we now do the
> right thing for the really old cards (those without a MII) as well as
> the merely old cards (those with a phy).  For the really old cards, we
> generally default to "Link is up all the time" as our status,
> specifically to keep dhclient happy.
> 
> Of course, the number of users of these cards is quite low these
> days...  I've fixed a number of bugs that should have been bad enough
> for people to complain, but since nobody did, I'm guessing the install
> base is smaller than I'd thought...

Good to know.  This will be pretty useful since some emulators seem to
emulate very old ed devices.

-- Brooks


pgpfXgBIgqZYI.pgp
Description: PGP signature


svn commit: r191121 - head/sbin/ifconfig

2009-04-15 Thread Brooks Davis
Author: brooks
Date: Wed Apr 15 20:53:34 2009
New Revision: 191121
URL: http://svn.freebsd.org/changeset/base/191121

Log:
  The structs ifaliasreq and in_aliasreq have exactly the same layout and
  member names, but we really do mean to use in_aliasreq here.
  
  MFC after:1 week

Modified:
  head/sbin/ifconfig/af_inet.c

Modified: head/sbin/ifconfig/af_inet.c
==
--- head/sbin/ifconfig/af_inet.cWed Apr 15 20:49:59 2009
(r191120)
+++ head/sbin/ifconfig/af_inet.cWed Apr 15 20:53:34 2009
(r191121)
@@ -52,7 +52,7 @@ static const char rcsid[] =
 
 #include "ifconfig.h"
 
-static struct ifaliasreq in_addreq;
+static struct in_aliasreq in_addreq;
 static struct ifreq in_ridreq;
 
 static void
@@ -169,7 +169,7 @@ in_status_tunnel(int s)
 static void
 in_set_tunnel(int s, struct addrinfo *srcres, struct addrinfo *dstres)
 {
-   struct ifaliasreq addreq;
+   struct in_aliasreq addreq;
 
memset(&addreq, 0, sizeof(addreq));
strncpy(addreq.ifra_name, name, IFNAMSIZ);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r190031 - head/etc/defaults

2009-04-24 Thread Brooks Davis
On Sat, Apr 25, 2009 at 01:47:53AM +0400, Dmitry Marakasov wrote:
> * Brooks Davis (bro...@freebsd.org) wrote:
> 
> So, any comments on this? Should I submit the PR?

Please do submit a pr.  I think we should actually change the link check
for a check if there are dhcp interfaces marked up and add a press-any
key to skip option for laptop users on the plane.  The carrier check is
bogus because negotiation can take quite a while with some devices as in
your case.  People who don't want to wait should probably set the delay
to 0.

-- Brooks


pgpBDpXCoWmHi.pgp
Description: PGP signature


Re: svn commit: r263949 - head

2014-03-31 Thread Brooks Davis
On Sun, Mar 30, 2014 at 10:24:37PM +, Warner Losh wrote:
> Author: imp
> Date: Sun Mar 30 22:24:37 2014
> New Revision: 263949
> URL: http://svnweb.freebsd.org/changeset/base/263949
> 
> Log:
>   When building g++, we need to build libsupc earlier to avoid a race
>   with libproc. Not sure why people didn't see this before now, but I
>   get it often for higher (20-30) -j builds, but never for -j1 builds.

Thanks Warner!  I bumped into this on Friday afternoon and didn't quite
get to the point of characterizing it.

-- Brooks


pgpVxcyZ3y4UO.pgp
Description: PGP signature


Re: svn commit: r264027 - in head: release share/man/man7

2014-04-02 Thread Brooks Davis
On Tue, Apr 01, 2014 at 10:41:27PM +, Glen Barber wrote:
> Author: gjb
> Date: Tue Apr  1 22:41:26 2014
> New Revision: 264027
> URL: http://svnweb.freebsd.org/changeset/base/264027
> 
> Log:
>   Add a new release build variable, WITH_COMPRESSED_IMAGES.
>   
>   When set to a non-empty value, the installation medium is
>   compressed with gzip(1) as part of the 'install' target in
>   the release/ directory.
>   
>   With gzip(1) compression, downloadable image are reduced in
>   size quite significantly.  Build test against head@263927
>   shows the following:
>   
>bootonly.iso:  64% smaller
>disc1.iso: 44% smaller
>memstick.img:  47% smaller
>mini-memstick.img: 65% smaller
>dvd1.iso:  untested
>   
>   This option is off by default, I would eventually like to
>   turn it on by default, and remove the '-k' flag to gzip(1)
>   so only compressed images are published on FTP.

I'd recommend testing xz compression as well.  With UFS images of a full
world the savings vs gzip are significant (more than 30% IIRC, but it's
need more than a year since I checked so I'm a bit unsure of the exact
numbers).

-- Brooks


pgp0mmVjzYrzl.pgp
Description: PGP signature


Re: svn commit: r264027 - in head: release share/man/man7

2014-04-02 Thread Brooks Davis
On Wed, Apr 02, 2014 at 12:33:50PM -0400, Glen Barber wrote:
> On Wed, Apr 02, 2014 at 12:23:46PM -0400, Nikolai Lifanov wrote:
> > On 04/02/14 12:06, Glen Barber wrote:
> > > On Wed, Apr 02, 2014 at 11:55:33AM -0400, Nikolai Lifanov wrote:
> > >> On 04/02/14 11:51, Glen Barber wrote:
> > >>> On Wed, Apr 02, 2014 at 10:40:22AM -0500, Brooks Davis wrote:
> > >>>> On Tue, Apr 01, 2014 at 10:41:27PM +, Glen Barber wrote:
> > >>>>> Author: gjb
> > >>>>> Date: Tue Apr  1 22:41:26 2014
> > >>>>> New Revision: 264027
> > >>>>> URL: http://svnweb.freebsd.org/changeset/base/264027
> > >>>>>
> > >>>>> Log:
> > >>>>>   Add a new release build variable, WITH_COMPRESSED_IMAGES.
> > >>>>>   
> > >>>>>   When set to a non-empty value, the installation medium is
> > >>>>>   compressed with gzip(1) as part of the 'install' target in
> > >>>>>   the release/ directory.
> > >>>>>   
> > >>>>>   With gzip(1) compression, downloadable image are reduced in
> > >>>>>   size quite significantly.  Build test against head@263927
> > >>>>>   shows the following:
> > >>>>>   
> > >>>>>bootonly.iso:  64% smaller
> > >>>>>disc1.iso: 44% smaller
> > >>>>>memstick.img:  47% smaller
> > >>>>>mini-memstick.img: 65% smaller
> > >>>>>dvd1.iso:  untested
> > >>>>>   
> > >>>>>   This option is off by default, I would eventually like to
> > >>>>>   turn it on by default, and remove the '-k' flag to gzip(1)
> > >>>>>   so only compressed images are published on FTP.
> > >>>>
> > >>>> I'd recommend testing xz compression as well.  With UFS images of a 
> > >>>> full
> > >>>> world the savings vs gzip are significant (more than 30% IIRC, but it's
> > >>>> need more than a year since I checked so I'm a bit unsure of the exact
> > >>>> numbers).
> > >>>>
> > >>>
> > >>> delphij also brought this up.
> > >>>
> > >>> I have concerns with xz(1), since there was mention in IRC that Windows
> > >>> users may have problems decompressing xz-compressed images.  So, gzip(1)
> > >>> is used because it seems to be the more commonly-supported archive
> > >>> mechanisms.
> > >>>
> > >>> The benefit of xz(1) over gzip(1) was only 50M-ish.
> > >>>
> > >>>   -rw-r--r--  1 root  wheel   601M Mar 28 20:18 disc1.iso
> > >>>   -rw-r--r--  1 root  wheel   381M Mar 28 20:18 disc1.iso.bz2
> > >>>   -rw-r--r--  1 root  wheel   392M Mar 28 20:18 disc1.iso.gz
> > >>>   -rw-r--r--  1 root  wheel   348M Mar 28 20:18 disc1.iso.xz
> > >>>
> > >>> Glen
> > >>>
> > >>
> > >> How about 7zip (Windows program, not file format)? What would a Windows
> > >> user use that can decompress gzip and not xz? It was a problem around
> > >> ~2007, but xz support is no longer rare or exotic.
> > >>
> > > 
> > > I don't know, to be honest.  I have no Windows machines to test, so
> > > I can only go by what I am told.
> > > 
> > > Glen
> > > 
> > 
> > I just verified it with 7zip for Windows version 9.22. It extracts
> > .tar.xz archives and decompresses .xz images.
> > 
> 
> Great, thank you for confirming.
> 
> So, the question I have now is, considering the time it takes to
> compress the image with xz(1) compared to gzip(1), is that worth saving
> the 50MB space?
> 
> I do not object to using xz(1), but the compression time difference was
> quite significant.  (I do not have numbers off-hand, but can run the
> compression again.)

xz is quite slow, but who cares if it's something we do once for the
benefit of many.  One thing I did do in my build system is use pxz from
ports.  It speeds things up quite a bit on many-core machines with lots
of ram.

-- Brooks


pgpijffHYnDoG.pgp
Description: PGP signature


svn commit: r264543 - head/lib/libkse

2014-04-16 Thread Brooks Davis
Author: brooks
Date: Wed Apr 16 17:12:59 2014
New Revision: 264543
URL: http://svnweb.freebsd.org/changeset/base/264543

Log:
  Remove the libkse directory.  It was unhooked from the build and kernel
  support removed in 2008 (prior to 8.0).
  
  Approved by:  deischen, imp
  MFC after:3 days

Deleted:
  head/lib/libkse/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r264897 - head/sys/mips/beri

2014-04-24 Thread Brooks Davis
Author: brooks
Date: Thu Apr 24 22:28:53 2014
New Revision: 264897
URL: http://svnweb.freebsd.org/changeset/base/264897

Log:
  Merge from CheriBSD:
  
  commit 003649d9622ce252a2794ae5891ee7e7c209caca
  Author: Robert N. M. Watson 
  Date:   Wed Feb 5 18:32:09 2014 +
  
  Teach the FreeBSD/beri boot to "auto-detect" whether argument 4 (a3) is a
  memory size of pointer to a struct bootinfo * by looking at its value and
  seeing whether it is pointer-like.  If a pointer, assume it's a bootinfo
  and extract memsize from it instead; otherwise, use it as memsize 
directly.
  This allows kernels to support bootinfo being passed by loader (and boot2)
  while still supporting older Miniboot setups.
  
  commit f7045af9a1e92b6bd92541fe5d25abf66d824e8f
  Author: Robert N. M. Watson 
  Date:   Thu Feb 6 13:45:34 2014 +
  
  When the module metadata pointer is available from loader, use it in the
  kernel.
  
  commit 52e0e1ff2cba9dfcfab9e1d0a31fb7fdf7317450
  Author: Robert N. M. Watson 
  Date:   Thu Feb 6 19:57:48 2014 +
  
  In the BERI kernel boot code, extract 'boothowto' (which includes boot 
flags
  such as '-s') and 'envp' from passed module data.  Booting to single-user
  mode using boot flags now works.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/mips/beri/beri_machdep.c

Modified: head/sys/mips/beri/beri_machdep.c
==
--- head/sys/mips/beri/beri_machdep.c   Thu Apr 24 21:18:29 2014
(r264896)
+++ head/sys/mips/beri/beri_machdep.c   Thu Apr 24 22:28:53 2014
(r264897)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2006 Wojciech A. Koszek 
- * Copyright (c) 2012 Robert N. M. Watson
+ * Copyright (c) 2012-2014 Robert N. M. Watson
  * All rights reserved.
  *
  * This software was developed by SRI International and the University of
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -131,60 +132,19 @@ platform_reset(void)
__asm__ __volatile("wait");
 }
 
-#ifdef FDT
-/* Parse cmd line args as env - copied from xlp_machdep. */
-/* XXX-BZ this should really be centrally provided for all (boot) code. */
-static void
-_parse_bootargs(char *cmdline)
-{
-   char *n, *v;
-
-   while ((v = strsep(&cmdline, " \n")) != NULL) {
-   if (*v == '\0')
-   continue;
-   if (*v == '-') {
-   while (*v != '\0') {
-   v++;
-   switch (*v) {
-   case 'a': boothowto |= RB_ASKNAME; break;
-   /* Someone should simulate that ;-) */
-   case 'C': boothowto |= RB_CDROM; break;
-   case 'd': boothowto |= RB_KDB; break;
-   case 'D': boothowto |= RB_MULTIPLE; break;
-   case 'm': boothowto |= RB_MUTE; break;
-   case 'g': boothowto |= RB_GDB; break;
-   case 'h': boothowto |= RB_SERIAL; break;
-   case 'p': boothowto |= RB_PAUSE; break;
-   case 'r': boothowto |= RB_DFLTROOT; break;
-   case 's': boothowto |= RB_SINGLE; break;
-   case 'v': boothowto |= RB_VERBOSE; break;
-   }
-   }
-   } else {
-   n = strsep(&v, "=");
-   if (v == NULL)
-   setenv(n, "1");
-   else
-   setenv(n, v);
-   }
-   }
-}
-#endif
-
 void
 platform_start(__register_t a0, __register_t a1,  __register_t a2, 
 __register_t a3)
 {
+   struct bootinfo *bootinfop;
vm_offset_t kernend;
uint64_t platform_counter_freq;
int argc = a0;
char **argv = (char **)a1;
char **envp = (char **)a2;
-   unsigned int memsize = a3;
+   long memsize;
 #ifdef FDT
-   char buf[2048]; /* early stack supposedly big enough */
vm_offset_t dtbp;
-   phandle_t chosen;
void *kmdp;
 #endif
int i;
@@ -197,6 +157,25 @@ platform_start(__register_t a0, __regist
 
mips_pcpu0_init();
 
+   /*
+* Over time, we've changed out boot-time binary interface for the
+* kernel.  Miniboot simply provides a 'memsize' in a3, whereas the
+* FreeBSD boot loader provides a 'bootinfo *' in a3.  While slightly
+* grody, we support both here by detecting 'pointer-like' values in
+* a3 and assuming physical memory can never be that back.
+*
+* XXXRW: Pull more values than memsize out of bootinfop -- e.g.,
+* module information.
+*/
+   if (a3 >= 0x9800ULL) {
+ 

svn commit: r264904 - head/sys/mips/beri

2014-04-24 Thread Brooks Davis
Author: brooks
Date: Thu Apr 24 23:28:09 2014
New Revision: 264904
URL: http://svnweb.freebsd.org/changeset/base/264904

Log:
  Fix beri_simplebus probing.  It's not allowed to have two modules on the
  same bus with the same name.
  
  Tweak the description so it's clear the BERI version attached.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/mips/beri/beri_simplebus.c

Modified: head/sys/mips/beri/beri_simplebus.c
==
--- head/sys/mips/beri/beri_simplebus.c Thu Apr 24 23:17:40 2014
(r264903)
+++ head/sys/mips/beri/beri_simplebus.c Thu Apr 24 23:28:09 2014
(r264904)
@@ -136,9 +136,10 @@ static driver_t simplebus_driver = {
 
 devclass_t simplebus_devclass;
 
-DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0);
-DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0,
+DRIVER_MODULE(beri_simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0,
 0);
+DRIVER_MODULE(beri_simplebus, simplebus, simplebus_driver, simplebus_devclass,
+0, 0);
 
 static int
 simplebus_probe(device_t dev)
@@ -150,7 +151,7 @@ simplebus_probe(device_t dev)
if (!ofw_bus_is_compatible(dev, "simple-bus"))
return (ENXIO);
 
-   device_set_desc(dev, "Flattened device tree simple bus");
+   device_set_desc(dev, "Flattened device tree simple bus (BERI version)");
 
return (BUS_PROBE_SPECIFIC);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r265060 - head/sys/kern

2014-04-28 Thread Brooks Davis
Author: brooks
Date: Mon Apr 28 20:38:08 2014
New Revision: 265060
URL: http://svnweb.freebsd.org/changeset/base/265060

Log:
  Revert r263754, re-adding support for hw.bus.devctl_disable.  Breaking
  old devd's and thus hosts that get IP addresses from DHCP was too much
  of a POLA violation.
  
  The sysctl may be removed again after r263758 has been merged to at
  least stable/9 and stable/10, and releases have been cut from those
  branches.
  
  Discussed with:   mjg
  Reported by:  theraven, rwatson

Modified:
  head/sys/kern/subr_bus.c

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cMon Apr 28 18:54:12 2014(r265059)
+++ head/sys/kern/subr_bus.cMon Apr 28 20:38:08 2014(r265060)
@@ -355,6 +355,13 @@ device_sysctl_fini(device_t dev)
  * tested since 3.4 or 2.2.8!
  */
 
+/* Deprecated way to adjust queue length */
+static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS);
+/* XXX Need to support old-style tunable hw.bus.devctl_disable" */
+SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW |
+CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_disable, "I",
+"devctl disable -- deprecated");
+
 #define DEVCTL_DEFAULT_QUEUE_LEN 1000
 static int sysctl_devctl_queue(SYSCTL_HANDLER_ARGS);
 static int devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN;
@@ -685,9 +692,9 @@ devctl_notify(const char *system, const 
  * Common routine that tries to make sending messages as easy as possible.
  * We allocate memory for the data, copy strings into that, but do not
  * free it unless there's an error.  The dequeue part of the driver should
- * free the data.  We don't send data when queue length is 0.  We do send
- * data, even when we have no listeners, because we wish to avoid races
- * relating to startup and restart of listening applications.
+ * free the data.  We don't send data when the device is disabled.  We do
+ * send data, even when we have no listeners, because we wish to avoid
+ * races relating to startup and restart of listening applications.
  *
  * devaddq is designed to string together the type of event, with the
  * object of that event, plus the plug and play info and location info
@@ -779,6 +786,33 @@ devnomatch(device_t dev)
 }
 
 static int
+sysctl_devctl_disable(SYSCTL_HANDLER_ARGS)
+{
+   struct dev_event_info *n1;
+   int dis, error;
+
+   dis = devctl_queue_length == 0;
+   error = sysctl_handle_int(oidp, &dis, 0, req);
+   if (error || !req->newptr)
+   return (error);
+   mtx_lock(&devsoftc.mtx);
+   if (dis) {
+   while (!TAILQ_EMPTY(&devsoftc.devq)) {
+   n1 = TAILQ_FIRST(&devsoftc.devq);
+   TAILQ_REMOVE(&devsoftc.devq, n1, dei_link);
+   free(n1->dei_data, M_BUS);
+   free(n1, M_BUS);
+   }
+   devsoftc.queued = 0;
+   devctl_queue_length = 0;
+   } else {
+   devctl_queue_length = DEVCTL_DEFAULT_QUEUE_LEN;
+   }
+   mtx_unlock(&devsoftc.mtx);
+   return (0);
+}
+
+static int
 sysctl_devctl_queue(SYSCTL_HANDLER_ARGS)
 {
struct dev_event_info *n1;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r265097 - head

2014-04-29 Thread Brooks Davis
Author: brooks
Date: Tue Apr 29 16:57:25 2014
New Revision: 265097
URL: http://svnweb.freebsd.org/changeset/base/265097

Log:
  Merge from CheriBSD:
  
  commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb
  Author: Brooks Davis 
  Date:   Fri Mar 28 16:24:45 2014 +
  
  Add a long needed seatbelt.
  
  Exit with an error when make is called without a target at the top level
  rather than poluting the source tree and causing use confusion in future
  builds.
  
  commit a9d9aa341b2f4308a227ab460ba85f1f287ad028
  Author: Brooks Davis 
  Date:   Tue Apr 29 16:06:12 2014 +
  
  Simplify seatbelt added in 1d1b908 based in feedback.
  
  Discussed with:   i...@freebsd.org
  
  Reviewed by:  imp
  Sponsored by: DARPA, AFRL

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Tue Apr 29 16:51:28 2014(r265096)
+++ head/Makefile   Tue Apr 29 16:57:25 2014(r265097)
@@ -238,8 +238,17 @@ tinderbox toolchains kernel-toolchains: 
 ${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
 
-# Set a reasonable default
-.MAIN: all
+# The historic default "all" target creates files which may cause stale
+# or (in the cross build case) unlinkable results. Fail with an error
+# when no target is given. The users can explicitly specify "all"
+# if they want the historic behavior.
+.MAIN: _guard
+
+_guard:
+   @echo
+   @echo "Explicit target required (use \"all\" for historic behavior)"
+   @echo
+   @false
 
 STARTTIME!= LC_ALL=C date
 CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r265201 - head/sys/kern

2014-05-01 Thread Brooks Davis
Author: brooks
Date: Thu May  1 22:28:14 2014
New Revision: 265201
URL: http://svnweb.freebsd.org/changeset/base/265201

Log:
  Fix a 2038 bug.
  
  If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
  just years less than 2038.
  
  Don't bother fixing the underflow in the case of years before 1903.
  
  MFC after:1 week
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/kern/subr_clock.c

Modified: head/sys/kern/subr_clock.c
==
--- head/sys/kern/subr_clock.c  Thu May  1 21:34:55 2014(r265200)
+++ head/sys/kern/subr_clock.c  Thu May  1 22:28:14 2014(r265201)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -147,7 +148,7 @@ clock_ct_to_ts(struct clocktime *ct, str
if (ct->mon < 1 || ct->mon > 12 || ct->day < 1 ||
ct->day > days_in_month(year, ct->mon) ||
ct->hour > 23 ||  ct->min > 59 || ct->sec > 59 ||
-   ct->year > 2037) {  /* time_t overflow */
+   (sizeof(time_t) == 4 && year > 2037)) { /* time_t overflow */
if (ct_debug)
printf(" = EINVAL\n");
return (EINVAL);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r265449 - stable/10

2014-05-06 Thread Brooks Davis
Author: brooks
Date: Tue May  6 14:38:03 2014
New Revision: 265449
URL: http://svnweb.freebsd.org/changeset/base/265449

Log:
  MFC r265097:
  
  Merge from CheriBSD:
  
  commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb
  Author: Brooks Davis 
  Date:   Fri Mar 28 16:24:45 2014 +
  
  Add a long needed seatbelt.
  
  Exit with an error when make is called without a target at the top level
  rather than poluting the source tree and causing use confusion in future
  builds.
  
  commit a9d9aa341b2f4308a227ab460ba85f1f287ad028
  Author: Brooks Davis 
  Date:   Tue Apr 29 16:06:12 2014 +
  
  Simplify seatbelt added in 1d1b908 based in feedback.
  
  Discussed with: i...@freebsd.org
  
  Reviewed by:  imp
  Sponsored by: DARPA, AFRL

Modified:
  stable/10/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile
==
--- stable/10/Makefile  Tue May  6 14:33:18 2014(r265448)
+++ stable/10/Makefile  Tue May  6 14:38:03 2014(r265449)
@@ -252,8 +252,17 @@ tinderbox toolchains kernel-toolchains: 
 ${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
 
-# Set a reasonable default
-.MAIN: all
+# The historic default "all" target creates files which may cause stale
+# or (in the cross build case) unlinkable results. Fail with an error
+# when no target is given. The users can explicitly specify "all"
+# if they want the historic behavior.
+.MAIN: _guard
+
+_guard:
+   @echo
+   @echo "Explicit target required (use \"all\" for historic behavior)"
+   @echo
+   @false
 
 STARTTIME!= LC_ALL=C date
 CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r265450 - stable/9

2014-05-06 Thread Brooks Davis
Author: brooks
Date: Tue May  6 15:38:44 2014
New Revision: 265450
URL: http://svnweb.freebsd.org/changeset/base/265450

Log:
  MFC: r265097
  
  Merge from CheriBSD:
  
  commit 1d1b908107255ffdff4d17f015d8f057d73cc6cb
  Author: Brooks Davis 
  Date:   Fri Mar 28 16:24:45 2014 +
  
  Add a long needed seatbelt.
  
  Exit with an error when make is called without a target at the top level
  rather than poluting the source tree and causing use confusion in future
  builds.
  
  commit a9d9aa341b2f4308a227ab460ba85f1f287ad028
  Author: Brooks Davis 
  Date:   Tue Apr 29 16:06:12 2014 +
  
  Simplify seatbelt added in 1d1b908 based in feedback.
  
  Discussed with: i...@freebsd.org
  
  Reviewed by:  imp
  Sponsored by: DARPA, AFRL

Modified:
  stable/9/Makefile   (contents, props changed)
Directory Properties:
  stable/9/   (props changed)

Modified: stable/9/Makefile
==
--- stable/9/Makefile   Tue May  6 14:38:03 2014(r265449)
+++ stable/9/Makefile   Tue May  6 15:38:44 2014(r265450)
@@ -222,8 +222,17 @@ cleanworld:
 ${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
 
-# Set a reasonable default
-.MAIN: all
+# The historic default "all" target creates files which may cause stale
+# or (in the cross build case) unlinkable results. Fail with an error
+# when no target is given. The users can explicitly specify "all"
+# if they want the historic behavior.
+.MAIN: _guard
+
+_guard:
+   @echo
+   @echo "Explicit target required (use \"all\" for historic behavior)"
+   @echo
+   @false
 
 STARTTIME!= LC_ALL=C date
 CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r251861 - stable/9

2013-06-17 Thread Brooks Davis
Author: brooks
Date: Mon Jun 17 19:54:47 2013
New Revision: 251861
URL: http://svnweb.freebsd.org/changeset/base/251861

Log:
  MFC r251689
  
  Be more agressive about bootstrapping ctfmerge and ctfconvert so
  builds from existing releases have a chance of working properly when
  WITH_CLANG_IS_CC is enabled.

Modified:
  stable/9/Makefile.inc1   (contents, props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Mon Jun 17 19:45:27 2013(r251860)
+++ stable/9/Makefile.inc1  Mon Jun 17 19:54:47 2013(r251861)
@@ -1166,8 +1166,9 @@ _clang_tblgen= \
 .endif
 
 .if ${MK_CDDL} != "no" && \
-${BOOTSTRAPPING} < 800038 && \
-!(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 79)
+((${BOOTSTRAPPING} < 134 && \
+  !(${BOOTSTRAPPING} >= 901505 && ${BOOTSTRAPPING} < 99)) \
+  || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
 _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
 lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r253164 - stable/9

2013-07-10 Thread Brooks Davis
Author: brooks
Date: Wed Jul 10 18:27:14 2013
New Revision: 253164
URL: http://svnweb.freebsd.org/changeset/base/253164

Log:
  MFC r251765:
  
  Simplify the hierarchy target's logic.[0]
  
  Run hierarchy with WORLDTMP in the path so it works when it is invoked
  directly.  Such use is nearly alwasy wrong but appears to be common.[1]
  
  PR:   conf/178209 [0], conf/178547 [1]
  Submitted by: Garrett Cooper  [0]

Modified:
  stable/9/Makefile.inc1   (contents, props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Wed Jul 10 18:19:48 2013(r253163)
+++ stable/9/Makefile.inc1  Wed Jul 10 18:27:14 2013(r253164)
@@ -268,6 +268,13 @@ WMAKEENV=  ${CROSSENV} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH}
+
+# make hierarchy
+HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
+.if defined(NO_ROOT)
+HMAKE+=PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
+.endif
+
 .if ${MK_CDDL} == "no"
 WMAKEENV+= NO_CTF=1
 .endif
@@ -1288,12 +1295,7 @@ cross-tools:
 # hierarchy - ensure that all the needed directories are present
 #
 hierarchy hier:
-.if defined(NO_ROOT)
-   cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
-   -DNO_ROOT METALOG=${METALOG} distrib-dirs
-.else
-   cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
-.endif
+   cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs
 
 #
 # libraries - build all libraries, and install them under ${DESTDIR}.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r253660 - head/share/man/man9

2013-07-25 Thread Brooks Davis
Author: brooks
Date: Thu Jul 25 20:53:15 2013
New Revision: 253660
URL: http://svnweb.freebsd.org/changeset/base/253660

Log:
  Document the sbinuptime() and getsbinuptime() functions introduced in
  r247452.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/microuptime.9

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileThu Jul 25 20:50:35 2013
(r253659)
+++ head/share/man/man9/MakefileThu Jul 25 20:53:15 2013
(r253660)
@@ -954,7 +954,9 @@ MLINKS+=microuptime.9 binuptime.9 \
microuptime.9 getbinuptime.9 \
microuptime.9 getmicrouptime.9 \
microuptime.9 getnanouptime.9 \
-   microuptime.9 nanouptime.9
+   microuptime.9 getsbinuptime.9 \
+   microuptime.9 nanouptime.9 \
+   microuptime.9 sbinuptime.9
 MLINKS+=mi_switch.9 cpu_switch.9 \
mi_switch.9 cpu_throw.9
 MLINKS+=mtx_pool.9 mtx_pool_alloc.9 \

Modified: head/share/man/man9/microuptime.9
==
--- head/share/man/man9/microuptime.9   Thu Jul 25 20:50:35 2013
(r253659)
+++ head/share/man/man9/microuptime.9   Thu Jul 25 20:53:15 2013
(r253660)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 16, 2004
+.Dd July 25, 2013
 .Dt MICROUPTIME 9
 .Os
 .Sh NAME
@@ -33,7 +33,9 @@
 .Nm microuptime ,
 .Nm getmicrouptime ,
 .Nm nanouptime ,
-.Nm getnanouptime
+.Nm getnanouptime ,
+.Nm sbinuptime ,
+.Nm getsbinuptime
 .Nd get the time elapsed since boot
 .Sh SYNOPSIS
 .In sys/time.h
@@ -49,6 +51,10 @@
 .Fn nanouptime "struct timespec *ts"
 .Ft void
 .Fn getnanouptime "struct timespec *tsp"
+.Ft sbintime_t
+.Fn sbinuptime "void"
+.Ft sbintime_t
+.Fn getsbinuptime "void"
 .Sh DESCRIPTION
 The
 .Fn binuptime
@@ -71,28 +77,37 @@ and
 .Fn getnanouptime
 functions store the elapsed time as a
 .Vt "struct timespec" .
+The
+.Fn sbinuptime
+and
+.Fn getsbinuptime
+functions return the time elapsed since boot as a
+.Vt "sbintime_t" .
 .Pp
 The
 .Fn binuptime ,
 .Fn microuptime ,
+.Fn nanouptime ,
 and
-.Fn nanouptime
+.Fn sbinuptime
 functions
 always query the timecounter to return the current time as precisely as
 possible.
 Whereas
 .Fn getbinuptime ,
 .Fn getmicrouptime ,
+.Fn getnanouptime ,
 and
-.Fn getnanouptime
+.Fn getsbinuptime
 functions are abstractions which return a less precise, but
 faster to obtain, time.
 .Pp
 The intent of the
 .Fn getbinuptime ,
 .Fn getmicrouptime ,
+.Fn getnanouptime ,
 and
-.Fn getnanouptime
+.Fn getsbinuptime
 functions is to enforce the user's preference for timer accuracy versus
 execution time.
 .Sh SEE ALSO
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248290 - head/sys/conf

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Thu Mar 14 22:16:13 2013
New Revision: 248290
URL: http://svnweb.freebsd.org/changeset/base/248290

Log:
  FDT_DTS_FILE is expanded in a Makefile so use :R to remove the suffix
  rather than using echo|cut to remove everything after the first '.'.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Mar 14 22:04:53 2013(r248289)
+++ head/sys/conf/files Thu Mar 14 22:16:13 2013(r248290)
@@ -55,9 +55,9 @@ aic79xx_reg_print.o   optional ahd pci ah
 # from the specified source (DTS) file: .dts -> .dtb
 #
 fdt_dtb_file   optional fdt \
-   compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O 
dtb -o `echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 -p 1024 
$S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \
+   compile-with "if [ -f $S/boot/fdt/dts/${FDT_DTS_FILE} ]; then dtc -O 
dtb -o ${FDT_DTS_FILE:R}.dtb -b 0 -p 1024 $S/boot/fdt/dts/${FDT_DTS_FILE}; fi" \
no-obj no-implicit-rule before-depend   \
-   clean   "`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb"
+   clean   "${FDT_DTS_FILE:R}.dtb"
 fdt_static_dtb.h   optional fdt fdt_dtb_static \
compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ." \
no-obj no-implicit-rule before-depend \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248293 - in stable/9/usr.sbin/makefs: . cd9660 ffs

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Thu Mar 14 22:57:27 2013
New Revision: 248293
URL: http://svnweb.freebsd.org/changeset/base/248293

Log:
  MFC all change to makefs through r247052.  Key functional changes
  include:
  
  r239562:
  Add -p flag to create the image as a sparse file.
  
  r242501:
  If no contents keyword is specified, the default for files is
  the named file.
  
  r247041:
  Add a -D flag that causes duplicate entries in an mtree manifest to be
  treated as warnings rather than errors.
  
  r247042:
  Fix the -N option in manifest mode by using pwcache(3).  This also
  speeds up image creation appreciably.
  
  r247043:
  Allow '.' components in manifest paths.  They are always the first
  component of mtree -C and install -M output and are easily skipped.
  
  r247052:
  Support hardlinks in manifest files by the same logic as the treewalk
  code.

Modified:
  stable/9/usr.sbin/makefs/cd9660.c
  stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c
  stable/9/usr.sbin/makefs/cd9660/cd9660_write.c
  stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c
  stable/9/usr.sbin/makefs/ffs.c
  stable/9/usr.sbin/makefs/ffs/ffs_alloc.c
  stable/9/usr.sbin/makefs/ffs/ffs_extern.h
  stable/9/usr.sbin/makefs/ffs/ffs_subr.c
  stable/9/usr.sbin/makefs/ffs/ufs_bmap.c
  stable/9/usr.sbin/makefs/makefs.8
  stable/9/usr.sbin/makefs/makefs.c
  stable/9/usr.sbin/makefs/makefs.h
  stable/9/usr.sbin/makefs/mtree.c
  stable/9/usr.sbin/makefs/walk.c
Directory Properties:
  stable/9/usr.sbin/makefs/   (props changed)

Modified: stable/9/usr.sbin/makefs/cd9660.c
==
--- stable/9/usr.sbin/makefs/cd9660.c   Thu Mar 14 22:55:59 2013
(r248292)
+++ stable/9/usr.sbin/makefs/cd9660.c   Thu Mar 14 22:57:27 2013
(r248293)
@@ -621,10 +621,6 @@ static void
 cd9660_finalize_PVD(void)
 {
time_t tim;
-   unsigned char *temp;
-
-   /* Copy the root directory record */
-   temp = (unsigned char *) &diskStructure.primaryDescriptor;
 
/* root should be a fixed size of 34 bytes since it has no name */
memcpy(diskStructure.primaryDescriptor.root_directory_record,
@@ -1051,7 +1047,7 @@ static cd9660node *
 cd9660_rename_filename(cd9660node *iter, int num, int delete_chars)
 {
int i = 0;
-   int numbts, dot, semi, digit, digits, temp, powers, multiplier, count;
+   int numbts, digit, digits, temp, powers, count;
char *naming;
int maxlength;
 char *tmp;
@@ -1073,7 +1069,6 @@ cd9660_rename_filename(cd9660node *iter,
powers = 1;
count = 0;
digits = 1;
-   multiplier = 1;
while (((int)(i / powers) ) >= 10) {
digits++;
powers = powers * 10;
@@ -1088,15 +1083,9 @@ cd9660_rename_filename(cd9660node *iter,
}
*/
 
-   dot = -1;
-   semi = -1;
while (count < maxlength) {
-   if (*naming == '.')
-   dot = count;
-   else if (*naming == ';') {
-   semi = count;
+   if (*naming == ';')
break;
-   }
naming++;
count++;
}
@@ -1527,7 +1516,6 @@ cd9660_generate_path_table(void)
cd9660node *last = dirNode;
int pathTableSize = 0;  /* computed as we go */
int counter = 1;/* root gets a count of 0 */
-   int parentRecNum = 0;   /* root's parent is '0' */
 
TAILQ_HEAD(cd9660_pt_head, ptq_entry) pt_head;
TAILQ_INIT(&pt_head);
@@ -1557,10 +1545,6 @@ cd9660_generate_path_table(void)
}
last = dirNode;
 
-   parentRecNum = 1;
-   if (dirNode->parent != 0)
-   parentRecNum = dirNode->parent->ptnumber;
-
/* Push children onto queue */
TAILQ_FOREACH(cn, &dirNode->cn_children, cn_next_child) {
/*

Modified: stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c
==
--- stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c   Thu Mar 14 22:55:59 
2013(r248292)
+++ stable/9/usr.sbin/makefs/cd9660/cd9660_eltorito.c   Thu Mar 14 22:57:27 
2013(r248293)
@@ -610,7 +610,7 @@ cd9660_write_boot(FILE *fd)
e->entry_type);
}
/*
-* It doesnt matter which one gets written
+* It doesn't matter which one gets written
 * since they are the same size
 */
fwrite(&(e->entry_data.VE), 1, 32, fd);

Modified: stable/9/usr.sbin/makefs/cd9660/cd9660_write.c
==

svn commit: r248299 - in vendor/NetBSD/libc-vis: . 20121214 20121214a 20121412 20121412a 20130221 20132102

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Thu Mar 14 23:25:01 2013
New Revision: 248299
URL: http://svnweb.freebsd.org/changeset/base/248299

Log:
  Fix the date command for tagging imports in the instructions and rename
  the resulting errant tags to from DDMM to MMDD.

Added:
  vendor/NetBSD/libc-vis/20121214/
 - copied from r248297, vendor/NetBSD/libc-vis/20121412/
  vendor/NetBSD/libc-vis/20121214a/
 - copied from r248297, vendor/NetBSD/libc-vis/20121412a/
  vendor/NetBSD/libc-vis/20130221/
 - copied from r248297, vendor/NetBSD/libc-vis/20132102/
Deleted:
  vendor/NetBSD/libc-vis/20121412/
  vendor/NetBSD/libc-vis/20121412a/
  vendor/NetBSD/libc-vis/20132102/
Modified:
  vendor/NetBSD/libc-vis/FreeBSD-Upgrade

Modified: vendor/NetBSD/libc-vis/FreeBSD-Upgrade
==
--- vendor/NetBSD/libc-vis/FreeBSD-Upgrade  Thu Mar 14 23:20:18 2013
(r248298)
+++ vendor/NetBSD/libc-vis/FreeBSD-Upgrade  Thu Mar 14 23:25:01 2013
(r248299)
@@ -20,7 +20,7 @@ Instructions for updating unvis(3) and v
svn commit -m "Vendor import of NetBSD's (un)vis(3) at `date +%F`" dist
svn cp -m "Tag `date +%F` import of NetBSD's (un)vis(3)" \
$REPO/base/vendor/NetBSD/libc-vis/dist \
-   $REPO/base/vendor/NetBSD/libc-vis/`date +%Y%d%m`
+   $REPO/base/vendor/NetBSD/libc-vis/`date +%Y%m%d`
 
 4) Update the files in src/contrib/libc-pwcache:
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248301 - in vendor/NetBSD: unvis unvis/20130221 unvis/20132102 vis vis/20130221 vis/20132102

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Thu Mar 14 23:35:52 2013
New Revision: 248301
URL: http://svnweb.freebsd.org/changeset/base/248301

Log:
  Correct typo in update instuctions and resulting DDMM format tags.

Added:
  vendor/NetBSD/unvis/20130221/
 - copied from r248300, vendor/NetBSD/unvis/20132102/
  vendor/NetBSD/vis/20130221/
 - copied from r248300, vendor/NetBSD/vis/20132102/
Deleted:
  vendor/NetBSD/unvis/20132102/
  vendor/NetBSD/vis/20132102/
Modified:
  vendor/NetBSD/unvis/FreeBSD-Upgrade
  vendor/NetBSD/vis/FreeBSD-Upgrade

Modified: vendor/NetBSD/unvis/FreeBSD-Upgrade
==
--- vendor/NetBSD/unvis/FreeBSD-Upgrade Thu Mar 14 23:25:42 2013
(r248300)
+++ vendor/NetBSD/unvis/FreeBSD-Upgrade Thu Mar 14 23:35:52 2013
(r248301)
@@ -16,7 +16,7 @@ Instructions for updating unvis(1):
svn commit -m "Vendor import of NetBSD's unvis(1) at `date +%F`" dist
svn cp -m "Tag `date +%F` import of NetBSD's unvis(1)" \
$REPO/base/vendor/NetBSD/unvis/dist \
-   $REPO/base/vendor/NetBSD/unvis/`date +%Y%d%m`
+   $REPO/base/vendor/NetBSD/unvis/`date +%Y%m%d`
 
 4) Update the files in src/contrib/unvis:
 

Modified: vendor/NetBSD/vis/FreeBSD-Upgrade
==
--- vendor/NetBSD/vis/FreeBSD-Upgrade   Thu Mar 14 23:25:42 2013
(r248300)
+++ vendor/NetBSD/vis/FreeBSD-Upgrade   Thu Mar 14 23:35:52 2013
(r248301)
@@ -16,7 +16,7 @@ Instructions for updating vis(1):
svn commit -m "Vendor import of NetBSD's vis(1) at `date +%F`" dist
svn cp -m "Tag `date +%F` import of NetBSD's vis(1)" \
$REPO/base/vendor/NetBSD/vis/dist \
-   $REPO/base/vendor/NetBSD/vis/`date +%Y%d%m`
+   $REPO/base/vendor/NetBSD/vis/`date +%Y%m%d`
 
 4) Update the files in src/contrib/vis:
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248302 - in head: contrib/libc-vis lib/libc/gen

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Thu Mar 14 23:51:47 2013
New Revision: 248302
URL: http://svnweb.freebsd.org/changeset/base/248302

Log:
  Update to the latest (un)vis(3) sources from NetBSD.  This adds
  multibyte support[0] and the new functions strenvisx and strsenvisx.
  
  Add MLINKS for vis(3) functions add by this and the initial import from
  NetBSD[1].
  
  PR:   bin/166364, bin/175418
  Submitted by: "J.R. Oldroyd" [0]
stefanf[1]
  Obtained from:NetBSD
  MFC after:2 weeks

Modified:
  head/contrib/libc-vis/unvis.3
  head/contrib/libc-vis/unvis.c
  head/contrib/libc-vis/vis.3
  head/contrib/libc-vis/vis.c
  head/contrib/libc-vis/vis.h
  head/lib/libc/gen/Makefile.inc
  head/lib/libc/gen/Symbol.map
Directory Properties:
  head/contrib/libc-vis/   (props changed)

Modified: head/contrib/libc-vis/unvis.3
==
--- head/contrib/libc-vis/unvis.3   Thu Mar 14 23:35:52 2013
(r248301)
+++ head/contrib/libc-vis/unvis.3   Thu Mar 14 23:51:47 2013
(r248302)
@@ -1,4 +1,4 @@
-.\"$NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $
+.\"$NetBSD: unvis.3,v 1.27 2012/12/15 07:34:36 wiz Exp $
 .\"$FreeBSD$
 .\"
 .\" Copyright (c) 1989, 1991, 1993
@@ -126,15 +126,17 @@ The
 function has several return codes that must be handled properly.
 They are:
 .Bl -tag -width UNVIS_VALIDPUSH
-.It Li \&0 (zero)
+.It Li \&0 No (zero)
 Another character is necessary; nothing has been recognized yet.
 .It Dv UNVIS_VALID
 A valid character has been recognized and is available at the location
-pointed to by cp.
+pointed to by
+.Fa cp .
 .It Dv UNVIS_VALIDPUSH
 A valid character has been recognized and is available at the location
-pointed to by cp; however, the character currently passed in should
-be passed in again.
+pointed to by
+.Fa cp ;
+however, the character currently passed in should be passed in again.
 .It Dv UNVIS_NOCHAR
 A valid sequence was detected, but no character was produced.
 This return code is necessary to indicate a logical break between characters.
@@ -150,7 +152,7 @@ one more time with flag set to
 to extract any remaining character (the character passed in is ignored).
 .Pp
 The
-.Ar flag
+.Fa flag
 argument is also used to specify the encoding style of the source.
 If set to
 .Dv VIS_HTTPSTYLE
@@ -161,7 +163,8 @@ will decode URI strings as specified in 
 If set to
 .Dv VIS_HTTP1866 ,
 .Fn unvis
-will decode URI strings as specified in RFC 1866.
+will decode entity references and numeric character references
+as specified in RFC 1866.
 If set to
 .Dv VIS_MIMESTYLE ,
 .Fn unvis
@@ -169,7 +172,9 @@ will decode MIME Quoted-Printable string
 If set to
 .Dv VIS_NOESCAPE ,
 .Fn unvis
-will not decode \e quoted characters.
+will not decode
+.Ql \e
+quoted characters.
 .Pp
 The following code fragment illustrates a proper use of
 .Fn unvis .
@@ -204,7 +209,7 @@ The functions
 and
 .Fn strnunvisx
 will return \-1 on error and set
-.Va errno 
+.Va errno
 to:
 .Bl -tag -width Er
 .It Bq Er EINVAL
@@ -212,7 +217,7 @@ An invalid escape sequence was detected,
 .El
 .Pp
 In addition the functions
-.Fn strnunvis 
+.Fn strnunvis
 and
 .Fn strnunvisx
 will can also set
@@ -244,4 +249,14 @@ and
 functions appeared in
 .Nx 6.0
 and
-.Fx 10.0 .
+.Fx 9.2 .
+.Sh BUGS
+The names
+.Dv VIS_HTTP1808
+and
+.Dv VIS_HTTP1866
+are wrong.
+Percent-encoding was defined in RFC 1738, the original RFC for URL.
+RFC 1866 defines HTML 2.0, an application of SGML, from which it
+inherits concepts of numeric character references and entity
+references.

Modified: head/contrib/libc-vis/unvis.c
==
--- head/contrib/libc-vis/unvis.c   Thu Mar 14 23:35:52 2013
(r248301)
+++ head/contrib/libc-vis/unvis.c   Thu Mar 14 23:51:47 2013
(r248302)
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $  */
+/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $  */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)unvis.c8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 __FBSDID("$FreeBSD$");
@@ -90,7 +90,7 @@ __weak_alias(strnunvisx,_strnunvisx)
  * RFC 1866
  */
 static const struct nv {
-   const char name[7];
+   char name[7];
uint8_t value;
 } nv[] = {
{ "AElig",  198 }, /* capital AE diphthong (ligature)  */

Modified: head/contrib/libc-vis/vis.3
==
--- head/contrib/libc-vis/vis.3 Thu Mar 14 23:35:52 2013(r248301)
+++ head/contrib/libc-vis/vis.3 Thu Mar 14 23:51:47 2013(r248302)
@@ -1,4 +1,4 @@
-.\"$NetBSD: vis.3,v 1.29 2012/12/14 22:55:59 christos Exp $
+.

svn commit: r248303 - in head: contrib/unvis contrib/vis usr.bin/unvis usr.bin/vis

2013-03-14 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 00:05:50 2013
New Revision: 248303
URL: http://svnweb.freebsd.org/changeset/base/248303

Log:
  Replace our (un)vis(1) commands with implementations from NetBSD to
  match our import of the (un)vis(3) APIs.
  
  This adds support for multibyte encoding and the -h and -m flags which
  support HTTP and MIME encoding respectively.
  
  PR:   bin/175418
  Obtained from:NetBSD

Added:
  head/contrib/unvis/
 - copied from r247132, vendor/NetBSD/unvis/dist/
  head/contrib/vis/
 - copied from r247132, vendor/NetBSD/vis/dist/
Deleted:
  head/usr.bin/unvis/unvis.1
  head/usr.bin/unvis/unvis.c
  head/usr.bin/vis/extern.h
  head/usr.bin/vis/foldit.c
  head/usr.bin/vis/vis.1
  head/usr.bin/vis/vis.c
Modified:
  head/usr.bin/unvis/Makefile
  head/usr.bin/vis/Makefile

Modified: head/usr.bin/unvis/Makefile
==
--- head/usr.bin/unvis/Makefile Thu Mar 14 23:51:47 2013(r248302)
+++ head/usr.bin/unvis/Makefile Fri Mar 15 00:05:50 2013(r248303)
@@ -3,4 +3,6 @@
 
 PROG=  unvis
 
+.PATH: ${.CURDIR}/../../contrib/unvis
+
 .include 

Modified: head/usr.bin/vis/Makefile
==
--- head/usr.bin/vis/Makefile   Thu Mar 14 23:51:47 2013(r248302)
+++ head/usr.bin/vis/Makefile   Fri Mar 15 00:05:50 2013(r248303)
@@ -1,6 +1,10 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
+# $FreeBSD$
 
 PROG=  vis
 SRCS=  vis.c foldit.c
 
+.PATH: ${.CURDIR}/../../contrib/vis
+CFLAGS+=   -I${.CURDIR}/../../contrib/vis
+
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248330 - stable/9/tools/build

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 14:53:29 2013
New Revision: 248330
URL: http://svnweb.freebsd.org/changeset/base/248330

Log:
  MFC r245311:
  
  Add pwcache(3) and vis(3) to libegacy as install(1) is about to grow a
  dependency on them.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/9/tools/build/Makefile
Directory Properties:
  stable/9/tools/build/   (props changed)

Modified: stable/9/tools/build/Makefile
==
--- stable/9/tools/build/Makefile   Fri Mar 15 14:01:37 2013
(r248329)
+++ stable/9/tools/build/Makefile   Fri Mar 15 14:53:29 2013
(r248330)
@@ -9,6 +9,22 @@ INCS=  
 
 BOOTSTRAPPING?=0
 
+_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true
+.if ${_WITH_PWCACHEDB} == 0
+.PATH: ${.CURDIR}/../../contrib/libc-pwcache
+CFLAGS+=   -I${.CURDIR}/../../contrib/libc-pwcache \
+   -I${.CURDIR}/../../lib/libc/include
+SRCS+= pwcache.c
+.endif
+
+_WITH_STRSVIS!=grep -c strsvis /usr/include/vis.h || true
+.if ${_WITH_STRSVIS} == 0
+.PATH: ${.CURDIR}/../../contrib/libc-vis
+SRCS+= vis.c
+CFLAGS+=   -I${.CURDIR}/../../contrib/libc-vis \
+   -I${.CURDIR}/../../lib/libc/include
+.endif
+
 .if empty(SRCS)
 SRCS=  dummy.c
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248331 - in stable/9: . usr.bin/xinstall

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 15:19:33 2013
New Revision: 248331
URL: http://svnweb.freebsd.org/changeset/base/248331

Log:
  MFC all changes to install(1) through r246784.  Notable functional
  changes are:
  
  r245617:
  Introduce six new options from NetBSD:
   * -MLog metadata in mtree format.
   * -DLog paths relative to .
   * -h   Log digest of type .
   * -T   Specify which mtree tags to log.
   * -l   Create hard or symbolic links (allows logging).
   * -U Install without root privileges (owner, group, mode,
and flags can be logged via -M
  
  NOTE: In the interest of compatibility with NetBSD and because it is the
  obvious letter, the nearly useless -M option (disable mmap) has been
  repurposed.
  
  Sponsored by: DARPA, AFRL
  Obtained from:NetBSD
  Reviewed by:  bz
  
  r245312:
  Implement the -N  option which allows an alternate passwd and
  group file to be used.  This is useful for installing on systems where
  a user or group does not currently exist.
  
  Sponsored by: DARPA, AFRL
  Obtained from:NetBSD

Modified:
  stable/9/UPDATING   (contents, props changed)
  stable/9/usr.bin/xinstall/Makefile
  stable/9/usr.bin/xinstall/install.1
  stable/9/usr.bin/xinstall/xinstall.c
Directory Properties:
  stable/9/usr.bin/xinstall/   (props changed)

Modified: stable/9/UPDATING
==
--- stable/9/UPDATING   Fri Mar 15 14:53:29 2013(r248330)
+++ stable/9/UPDATING   Fri Mar 15 15:19:33 2013(r248331)
@@ -11,6 +11,15 @@ handbook:
 Items affecting the ports and packages system can be found in
 /usr/ports/UPDATING.  Please read that file before running portupgrade.
 
+20130315:
+   The install(1) option -M has changed meaning and now takes an
+   argument that is a file or path to append logs to.  In the
+   unlikely event that -M was the last option on the command line
+   and the command line contained at least two files and a target
+   directory the first file will have logs appended to it.  The -M
+   option served little practical purpose in the last decade so it's
+   used expected to be extremely rare.
+
 20130225:
A new compression method (lz4) has been merged to.  Please refer to
zpool-features(7) for more information.

Modified: stable/9/usr.bin/xinstall/Makefile
==
--- stable/9/usr.bin/xinstall/Makefile  Fri Mar 15 14:53:29 2013
(r248330)
+++ stable/9/usr.bin/xinstall/Makefile  Fri Mar 15 15:19:33 2013
(r248331)
@@ -3,6 +3,16 @@
 
 PROG=  xinstall
 PROGNAME=  install
+SRCS=  xinstall.c getid.c
 MAN=   install.1
 
+.PATH: ${.CURDIR}/../../contrib/mtree
+.PATH: ${.CURDIR}/../../lib/libmd
+CFLAGS+=   -I${.CURDIR}/../../contrib/mtree
+CFLAGS+=   -I${.CURDIR}/../../lib/libnetbsd
+CFLAGS+=   -I${.CURDIR}/../../lib/libmd
+
+DPADD+=${LIBMD}
+LDADD+=-lmd
+
 .include 

Modified: stable/9/usr.bin/xinstall/install.1
==
--- stable/9/usr.bin/xinstall/install.1 Fri Mar 15 14:53:29 2013
(r248330)
+++ stable/9/usr.bin/xinstall/install.1 Fri Mar 15 15:19:33 2013
(r248331)
@@ -28,7 +28,7 @@
 .\"From: @(#)install.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd March 6, 2006
+.Dd January 18, 2013
 .Dt INSTALL 1
 .Os
 .Sh NAME
@@ -36,31 +36,50 @@
 .Nd install binaries
 .Sh SYNOPSIS
 .Nm
-.Op Fl bCcMpSsv
+.Op Fl bCcpSsUv
 .Op Fl B Ar suffix
+.Op Fl D Ar destdir
 .Op Fl f Ar flags
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl l Ar linkflags
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
+.Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar file1 file2
 .Nm
-.Op Fl bCcMpSsv
+.Op Fl bCcpSsUv
 .Op Fl B Ar suffix
+.Op Fl D Ar destdir
 .Op Fl f Ar flags
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl l Ar linkflags
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
+.Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar file1 ... fileN directory
 .Nm
 .Fl d
-.Op Fl v
+.Op Fl Uv
+.Op Fl D Ar destdir
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
+.Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar directory ...
 .Sh DESCRIPTION
 The file(s) are copied
-to the target file or directory.
+(or linked if the
+.Fl l
+option is specified) to the target file or directory.
 If the destination is a directory, then the
 .Ar file
 is copied into
@@ -105,6 +124,17 @@ This is actually the default.
 The
 .Fl c
 option is only included for backwards compatibility.
+.It Fl D Ar destdir
+Specify the
+.Ev DESTDIR
+(top of the file hierarchy) that the items are installed in to.
+If
+.Fl M Ar metalog
+is in use, a leading string of
+.Dq Ar destdir
+will be removed from the file names logged to the
+.Ar metalog .
+This option does not affect wh

svn commit: r248332 - stable/9/tools

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 15:21:34 2013
New Revision: 248332
URL: http://svnweb.freebsd.org/changeset/base/248332

Log:
  MFC r245751,245893:
  
  r245751:
  Implement the -l option using ln(1) to facilitate boostrapping.
  
  Ignore the new options -D, -h, -T, and -U.  Adjust -M support to ignore
  an argument.
  
  Sponsored by: DARPA, AFRL
  Reviewed by:  ian, ray, rpaulo
  
  r245893:
  Use = not == in test arguments.
  
  Submitted by: Christoph Mallon 

Modified:
  stable/9/tools/install.sh
Directory Properties:
  stable/9/tools/   (props changed)

Modified: stable/9/tools/install.sh
==
--- stable/9/tools/install.sh   Fri Mar 15 15:19:33 2013(r248331)
+++ stable/9/tools/install.sh   Fri Mar 15 15:21:34 2013(r248332)
@@ -30,12 +30,22 @@
 
 # parse install's options and ignore them completely.
 dirmode=""
+linkmode=""
 while [ $# -gt 0 ]; do
 case $1 in
 -d) dirmode="YES"; shift;;
--[bCcMpSsv]) shift;;
--[Bfgmo]) shift; shift;;
--[Bfgmo]*) shift;;
+-[bCcpSsv]) shift;;
+-[BDfghMmNoTU]) shift; shift;;
+-[BDfghMmNoTU]*) shift;;
+-l)
+   shift
+   case $1 in
+   *[sm]*) linkmode="symbolic";;   # XXX: 'm' should prefer hard
+   *h*) linkmode="hard";;
+   *) echo "invalid link mode"; exit 1;;
+   esac
+   shift
+   ;;
 *) break;
 esac
 done
@@ -51,7 +61,13 @@ if [ -z "$dirmode" ] && [ "$#" -lt 2 ]; 
 fi
 
 # the remaining arguments are assumed to be files/dirs only.
-if [ -z "$dirmode" ]; then
+if [ -n "${linkmode}" ]; then
+   if [ "${linkmode}" = "symbolic" ]; then
+   ln -fsh "$@"
+   else
+   ln -f "$@"
+   fi
+elif [ -z "$dirmode" ]; then
exec install -p "$@"
 else
exec install -d "$@"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248333 - stable/9

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 15:34:09 2013
New Revision: 248333
URL: http://svnweb.freebsd.org/changeset/base/248333

Log:
  MFC the second half of r246784:
  
  - Fix libmd dependency.  It is needed in the bootstrap library list because
usr.bin/xinstall depends on it.

Modified:
  stable/9/Makefile.inc1   (contents, props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Fri Mar 15 15:21:34 2013(r248332)
+++ stable/9/Makefile.inc1  Fri Mar 15 15:34:09 2013(r248333)
@@ -1110,6 +1110,7 @@ bootstrap-tools:
 ${_sed} \
 ${_yacc} \
 ${_lex} \
+lib/libmd \
 usr.bin/xinstall \
 ${_gensnmptree} \
 usr.sbin/config \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248335 - in stable/9: . etc

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 18:49:39 2013
New Revision: 248335
URL: http://svnweb.freebsd.org/changeset/base/248335

Log:
  MFC:
  r241684,245316,245318,245440,245563,245565,245622,245754,246092,246096,246602
  
  r241684:
  Allow LOCAL_DIRS to install files in directories not found in the
  system mtree files via a LOCAL_MTREE variable which contains a list of
  mtree files to be applyed along with the base mtree files to the tmp
  root and DESTDIR.
  
  r245440:
  Add an option DB_FROM_SRC to use src/etc's user/group databases when
  installing.  This allows things like running installworld for 10-CURRENT
  on a 9.0-RELEASE system without adding extra users and groups to the
  passwd and group files.
  
  To prevent potentially risky uid/gid mismatches on systems with
  non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
  set.
  
  Sponsored by:   DARPA, AFRL
  Reviewed by:peter
  
  r245565:
  Rework the mtree portion of etc/Makefile's distrib-dirs target to run
  mtree in a shell loop so there is only one mtree commandline.  Move the
  implementation of LOCAL_MTREE into etc/Makefile.
  
  Sponsored by:   DARPA, AFRL

Modified:
  stable/9/Makefile.inc1   (contents, props changed)
  stable/9/etc/Makefile
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Fri Mar 15 18:10:38 2013(r248334)
+++ stable/9/Makefile.inc1  Fri Mar 15 18:49:39 2013(r248335)
@@ -12,8 +12,12 @@
 #  -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
 #  -DNO_PORTSUPDATE do not update ports in ${MAKE} update
 #  -DNO_DOCUPDATE do not update doc in ${MAKE} update
+#  -DDB_FROM_SRC use the user/group databases in src/etc instead of
+#  the system database when installing.
 #  -DNO_CTF do not run the DTrace CTF conversion tools on built objects
 #  LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
+#  LOCAL_MTREE="list of mtree files" to process to allow local directories
+#  to be created before files are installed
 #  TARGET="machine" to crossbuild world for a different machine type
 #  TARGET_ARCH= may be required when a TARGET supports multiple endians
 
@@ -326,12 +330,13 @@ LIB32WMAKE=   ${LIB32WMAKEENV} ${MAKE} -DN
-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
-DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \
DESTDIR=${LIB32TMP}
-LIB32IMAKE=${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS
+LIB32IMAKE=${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
+   ${IMAKE_INSTALL}
 .endif
 
-# install stage
 IMAKEENV=  ${CROSSENV:N_LDSCRIPTROOT=*}
-IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
+IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
+   ${IMAKE_INSTALL} ${IMAKE_MTREE}
 .if empty(.MAKEFLAGS:M-n)
 IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
LD_LIBRARY_PATH=${INSTALLTMP} \
@@ -340,6 +345,10 @@ IMAKE+=__MAKE_SHELL=${INSTALLTMP}/sh
 .else
 IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP}
 .endif
+.if defined(DB_FROM_SRC)
+IMAKE_INSTALL= INSTALL="install -N ${.CURDIR}/etc"
+IMAKE_MTREE=   MTREE_CMD="nmtree -N ${.CURDIR}/etc"
+.endif
 
 # kernel stage
 KMAKEENV=  ${WMAKEENV}
@@ -395,6 +404,9 @@ _worldtmp:
mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \
-p ${WORLDTMP}/usr/include >/dev/null
 .endif
+.for _mtree in ${LOCAL_MTREE}
+   mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
+.endfor
 _legacy:
@echo
@echo "--"
@@ -583,9 +595,11 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc
 installcheck:
 
 #
-# Require DESTDIR to be set if installing for a different architecture.
+# Require DESTDIR to be set if installing for a different architecture or
+# using the user/group database in the source tree.
 #
-.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE}
+.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \
+defined(DB_FROM_SRC)
 .if !make(distributeworld)
 installcheck: installcheck_DESTDIR
 installcheck_DESTDIR:
@@ -596,6 +610,7 @@ installcheck_DESTDIR:
 .endif
 .endif
 
+.if !defined(DB_FROM_SRC)
 #
 # Check for missing UIDs/GIDs.
 #
@@ -623,6 +638,7 @@ installcheck_UGID:
false; \
fi
 .endfor
+.endif
 
 #
 # Required install tools to be saved in a scratch dir for safety.
@@ -634,10 +650,14 @@ _install-info=install-info
 _zoneinfo= zic tzsetup
 .endif
 
+.if exists(/usr/sbin/nmtree)
+_nmtree_itools=nmtree
+.endif
+
 ITOOLS=[ awk cap_mkdb cat chflags chmod chown \
date echo egrep find grep ${_install-info} \
-   ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \
-   test true unam

Re: svn commit: r248335 - in stable/9: . etc

2013-03-15 Thread Brooks Davis
On Fri, Mar 15, 2013 at 06:49:39PM +, Brooks Davis wrote:
> Author: brooks
> Date: Fri Mar 15 18:49:39 2013
> New Revision: 248335
> URL: http://svnweb.freebsd.org/changeset/base/248335
> 
> Log:
>   MFC:
>   
> r241684,245316,245318,245440,245563,245565,245622,245754,246092,246096,246602

The primary purpose of this commit was to merge DB_FROM_SRC.
LOCAL_MTREE ended up touching to many of the same lines to not merge it
as well without more risk that I wanted to take so I merged them
together.

-- Brooks


pgpnM7vJaTL8I.pgp
Description: PGP signature


svn commit: r248336 - in stable/9: . share/zoneinfo

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 19:16:35 2013
New Revision: 248336
URL: http://svnweb.freebsd.org/changeset/base/248336

Log:
  MFC r245265,245271,245309:
  
  Rather than using zic to both compile and install zoneinfo files,
  generate the files during the build and install them with install(1).
  This was the one place in installworld where files (vs links) were
  installed by a tool other than install.
  
  Reviewed by:  edwin, jilles

Modified:
  stable/9/share/zoneinfo/Makefile
Directory Properties:
  stable/9/Makefile.inc1   (props changed)
  stable/9/share/zoneinfo/   (props changed)

Modified: stable/9/share/zoneinfo/Makefile
==
--- stable/9/share/zoneinfo/MakefileFri Mar 15 18:49:39 2013
(r248335)
+++ stable/9/share/zoneinfo/MakefileFri Mar 15 19:16:35 2013
(r248336)
@@ -29,6 +29,7 @@
 #
 
 CLEANFILES+=   yearistype
+CLEANDIRS+=builddir
 CONTRIBDIR=${.CURDIR}/../../contrib/tzdata/
 .PATH: ${CONTRIBDIR}
 
@@ -48,13 +49,39 @@ TZFILES+=   backward systemv
 
 TZFILES:=  ${TZFILES:S/^/${CONTRIBDIR}/}
 
-all: yearistype
-
-beforeinstall:
+TZBUILDDIR=${.OBJDIR}/builddir
+TZBUILDSUBDIRS=\
+   Africa \
+   America/Argentina \
+   America/Indiana \
+   America/Kentucky \
+   America/North_Dakota \
+   Antarctica \
+   Arctic \
+   Asia \
+   Atlantic \
+   Australia \
+   Etc \
+   Europe \
+   Indian \
+   Pacific \
+   SystemV
+
+all: zoneinfo
+
+.PHONY: zoneinfo
+zoneinfo: yearistype ${TDATA}
+   mkdir -p ${TZBUILDDIR}
+   cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}
umask 022; cd ${.CURDIR}; \
-   zic -D -d ${DESTDIR}/usr/share/zoneinfo -p ${POSIXRULES} \
-   -u ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+   zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
+
+beforeinstall:
+   cd ${TZBUILDDIR} && \
+   find . -type f -print -exec ${INSTALL} \
+   -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+   \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248337 - stable/9/bin/cat

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 19:27:27 2013
New Revision: 248337
URL: http://svnweb.freebsd.org/changeset/base/248337

Log:
  MFC all features as of r248336:
  
  The user visable feature is from r246083:
  
  Add -l option to cat(1). This option causes cat(1) to use fcntl(2) to
  set an exclusive advisory lock on stdout.  This will be used to guarantee
  orderly writing to METALOG.
  
  Sponsored by: DARPA, AFRL
  Obtained from:NetBSD (mason)

Modified:
  stable/9/bin/cat/cat.1
  stable/9/bin/cat/cat.c
Directory Properties:
  stable/9/bin/cat/   (props changed)

Modified: stable/9/bin/cat/cat.1
==
--- stable/9/bin/cat/cat.1  Fri Mar 15 19:16:35 2013(r248336)
+++ stable/9/bin/cat/cat.1  Fri Mar 15 19:27:27 2013(r248337)
@@ -32,7 +32,7 @@
 .\" @(#)cat.1  8.3 (Berkeley) 5/2/95
 .\" $FreeBSD$
 .\"
-.Dd March 21, 2004
+.Dd January 29, 2013
 .Dt CAT 1
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Nd concatenate and print files
 .Sh SYNOPSIS
 .Nm
-.Op Fl benstuv
+.Op Fl belnstuv
 .Op Ar
 .Sh DESCRIPTION
 The
@@ -79,6 +79,16 @@ Display non-printing characters (see the
 option), and display a dollar sign
 .Pq Ql \&$
 at the end of each line.
+.It Fl l
+Set an exclusive advisory lock on the standard output file descriptor.
+This lock is set using
+.Xr fcntl 2
+with the
+.Dv F_SETLKW
+command.
+If the output file is already locked,
+.Nm
+will block until the lock is acquired.
 .It Fl n
 Number the output lines, starting at 1.
 .It Fl s
@@ -127,7 +137,7 @@ to the file
 truncating
 .Pa file3
 if it already exists.
-See the manual page for your shell (i.e.,
+See the manual page for your shell (e.g.,
 .Xr sh 1 )
 for more information on redirection.
 .Pp
@@ -160,6 +170,7 @@ operand.
 .Xr tail 1 ,
 .Xr vis 1 ,
 .Xr zcat 1 ,
+.Xr fcntl 2 ,
 .Xr setbuf 3
 .Rs
 .%A Rob Pike
@@ -175,7 +186,7 @@ utility is compliant with the
 specification.
 .Pp
 The flags
-.Op Fl benstv
+.Op Fl belnstv
 are extensions to the specification.
 .Sh HISTORY
 A

Modified: stable/9/bin/cat/cat.c
==
--- stable/9/bin/cat/cat.c  Fri Mar 15 19:16:35 2013(r248336)
+++ stable/9/bin/cat/cat.c  Fri Mar 15 19:27:27 2013(r248337)
@@ -64,9 +64,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-int bflag, eflag, nflag, sflag, tflag, vflag;
-int rval;
-const char *filename;
+static int bflag, eflag, lflag, nflag, sflag, tflag, vflag;
+static int rval;
+static const char *filename;
 
 static void usage(void);
 static void scanfiles(char *argv[], int cooked);
@@ -96,10 +96,11 @@ int
 main(int argc, char *argv[])
 {
int ch;
+   struct flock stdout_lock;
 
setlocale(LC_CTYPE, "");
 
-   while ((ch = getopt(argc, argv, "benstuv")) != -1)
+   while ((ch = getopt(argc, argv, "belnstuv")) != -1)
switch (ch) {
case 'b':
bflag = nflag = 1;  /* -b implies -n */
@@ -107,6 +108,9 @@ main(int argc, char *argv[])
case 'e':
eflag = vflag = 1;  /* -e implies -v */
break;
+   case 'l':
+   lflag = 1;
+   break;
case 'n':
nflag = 1;
break;
@@ -127,6 +131,15 @@ main(int argc, char *argv[])
}
argv += optind;
 
+   if (lflag) {
+   stdout_lock.l_len = 0;
+   stdout_lock.l_start = 0;
+   stdout_lock.l_type = F_WRLCK;
+   stdout_lock.l_whence = SEEK_SET;
+   if (fcntl(STDOUT_FILENO, F_SETLKW, &stdout_lock) == -1)
+   err(EXIT_FAILURE, "stdout");
+   }
+
if (bflag || eflag || nflag || sflag || tflag || vflag)
scanfiles(argv, 1);
else
@@ -140,7 +153,7 @@ main(int argc, char *argv[])
 static void
 usage(void)
 {
-   fprintf(stderr, "usage: cat [-benstuv] [file ...]\n");
+   fprintf(stderr, "usage: cat [-belnstuv] [file ...]\n");
exit(1);
/* NOTREACHED */
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248338 - stable/9/sys/sys

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 19:32:37 2013
New Revision: 248338
URL: http://svnweb.freebsd.org/changeset/base/248338

Log:
  Bump __FreeBSD_version for install -l, -M, -N and related flags as well
  as cat -l.
  
  This is a notional MFC of r245313,246084.

Modified:
  stable/9/sys/sys/param.h
Directory Properties:
  stable/9/sys/sys/   (props changed)

Modified: stable/9/sys/sys/param.h
==
--- stable/9/sys/sys/param.hFri Mar 15 19:27:27 2013(r248337)
+++ stable/9/sys/sys/param.hFri Mar 15 19:32:37 2013(r248338)
@@ -58,7 +58,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 901503   /* Master, propagated to newvers */
+#define __FreeBSD_version 901504   /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248339 - in stable/9: . etc/mtree share/mk usr.bin/man

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 19:50:21 2013
New Revision: 248339
URL: http://svnweb.freebsd.org/changeset/base/248339

Log:
  MFC r245513,245514,245515:
  
  The last section 1aout manpage was installed no later than July 2002.
  Remove all support for them.

Modified:
  stable/9/ObsoleteFiles.inc   (contents, props changed)
  stable/9/etc/mtree/BSD.usr.dist
  stable/9/share/mk/bsd.man.mk
  stable/9/share/mk/bsd.prog.mk
  stable/9/usr.bin/man/man.1
  stable/9/usr.bin/man/man.sh
Directory Properties:
  stable/9/etc/mtree/   (props changed)
  stable/9/share/mk/   (props changed)
  stable/9/usr.bin/man/   (props changed)

Modified: stable/9/ObsoleteFiles.inc
==
--- stable/9/ObsoleteFiles.inc  Fri Mar 15 19:32:37 2013(r248338)
+++ stable/9/ObsoleteFiles.inc  Fri Mar 15 19:50:21 2013(r248339)
@@ -38,6 +38,13 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20130315: removed long unused directories for .1aout section manpages
+OLD_FILES+=usr/share/man/en.ISO8859-1/man1aout
+OLD_FILES+=usr/share/man/en.UTF-8/man1aout
+OLD_DIRS+=usr/share/man/man1aout
+OLD_DIRS+=usr/share/man/cat1aout
+OLD_DIRS+=usr/share/man/en.ISO8859-1/cat1aout
+OLD_DIRS+=usr/share/man/en.UTF-8/cat1aout
 # 20121230: remove wrongly created directories for auditdistd
 OLD_DIRS+=var/dist
 OLD_DIRS+=var/remote

Modified: stable/9/etc/mtree/BSD.usr.dist
==
--- stable/9/etc/mtree/BSD.usr.dist Fri Mar 15 19:32:37 2013
(r248338)
+++ stable/9/etc/mtree/BSD.usr.dist Fri Mar 15 19:50:21 2013
(r248339)
@@ -752,8 +752,6 @@
 /set uname=man
 cat1
 ..
-cat1aout
-..
 cat2
 ..
 cat3
@@ -791,8 +789,6 @@
 en.ISO8859-1uname=root
 cat1
 ..
-cat1aout
-..
 cat2
 ..
 cat3
@@ -831,8 +827,6 @@
 en.UTF-8uname=root
 cat1
 ..
-cat1aout
-..
 cat2
 ..
 cat3
@@ -909,8 +903,6 @@
 ..
 man1
 ..
-man1aout
-..
 man2
 ..
 man3

Modified: stable/9/share/mk/bsd.man.mk
==
--- stable/9/share/mk/bsd.man.mkFri Mar 15 19:32:37 2013
(r248338)
+++ stable/9/share/mk/bsd.man.mkFri Mar 15 19:50:21 2013
(r248339)
@@ -62,7 +62,7 @@ MROFF_CMD?=   groff -Tascii -mtty-char -ma
 MCOMPRESS_CMD?=${COMPRESS_CMD}
 MCOMPRESS_EXT?=${COMPRESS_EXT}
 
-SECTIONS=  1 1aout 2 3 4 5 6 7 8 9
+SECTIONS=  1 2 3 4 5 6 7 8 9
 .SUFFIXES: ${SECTIONS:S/^/./g}
 
 # Backwards compatibility.

Modified: stable/9/share/mk/bsd.prog.mk
==
--- stable/9/share/mk/bsd.prog.mk   Fri Mar 15 19:32:37 2013
(r248338)
+++ stable/9/share/mk/bsd.prog.mk   Fri Mar 15 19:50:21 2013
(r248339)
@@ -95,8 +95,7 @@ ${PROG}: ${OBJS}
 .if${MK_MAN} != "no" && !defined(MAN) && \
!defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
!defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
-   !defined(MAN7) && !defined(MAN8) && !defined(MAN9) && \
-   !defined(MAN1aout)
+   !defined(MAN7) && !defined(MAN8) && !defined(MAN9)
 MAN=   ${PROG}.1
 MAN1=  ${MAN}
 .endif

Modified: stable/9/usr.bin/man/man.1
==
--- stable/9/usr.bin/man/man.1  Fri Mar 15 19:32:37 2013(r248338)
+++ stable/9/usr.bin/man/man.1  Fri Mar 15 19:50:21 2013(r248339)
@@ -84,7 +84,7 @@ environment variable.
 .It Fl S Ar mansect
 Restricts manual sections searched to the specified colon delimited list.
 Defaults to
-.Dq Li 1:1aout:8:2:3:n:4:5:6:7:9:l .
+.Dq Li 1:8:2:3:n:4:5:6:7:9:l .
 Overrides the
 .Ev MANSECT
 environment variable.

Modified: stable/9/usr.bin/man/man.sh
==
--- stable/9/usr.bin/man/man.sh Fri Mar 15 19:32:37 2013(r248338)
+++ stable/9/usr.bin/man/man.sh Fri Mar 15 19:50:21 2013(r248339)
@@ -945,7 +945,7 @@ STTY=/bin/stty
 SYSCTL=/sbin/sysctl
 
 debug=0
-man_default_sections='1:1aout:8:2:3:n:4:5:6:7:9:l'
+man_default_sections='1:8:2:3:n:4:5:6:7:9:l'
 man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man'
 cattool='/usr/bin/zcat -f'
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248348 - stable/9

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 20:26:51 2013
New Revision: 248348
URL: http://svnweb.freebsd.org/changeset/base/248348

Log:
  MFC r241311:
  
  Change 32-bit library builds by removing use of make -E and passing AS,
  CC, CXX and LD on the commandline of the sub-make instead of in the
  environment of the sub-make.

Modified:
  stable/9/Makefile.inc1   (contents, props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Fri Mar 15 20:22:20 2013(r248347)
+++ stable/9/Makefile.inc1  Fri Mar 15 20:26:51 2013(r248348)
@@ -293,9 +293,10 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse -
 LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
 .endif
 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
-   MACHINE_CPU="i686 mmx sse sse2" \
-   LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
-   AS="${AS} --32"
+   MACHINE_CPU="i686 mmx sse sse2"
+LIB32WMAKEFLAGS=   \
+   AS="${AS} --32" \
+   LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32"
 
 .elif ${TARGET_ARCH} == "powerpc64"
 .if empty(TARGET_CPUTYPE)
@@ -303,7 +304,8 @@ LIB32CPUFLAGS=  -mcpu=powerpc
 .else
 LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE}
 .endif
-LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \
+LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc
+LIB32WMAKEFLAGS=   \
LD="${LD} -m elf32ppc"
 .endif
 
@@ -320,16 +322,20 @@ LIB32WMAKEENV+=   MAKEOBJDIRPREFIX=${OBJTR
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \
-   CC="${CC} ${LIB32FLAGS}" \
-   CXX="${CXX} ${LIB32FLAGS}" \
LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32 \
COMPILER_TYPE=${WMAKE_COMPILER_TYPE}
+LIB32WMAKEFLAGS+=  \
+   CC="${CC} ${LIB32FLAGS}" \
+   CXX="${CXX} ${LIB32FLAGS}" \
+   DESTDIR=${LIB32TMP} \
+   -DCOMPAT_32BIT \
+   -DNO_CPU_CFLAGS \
+   -DNO_CTF \
+   -DNO_LINT
 
-LIB32WMAKE=${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
-   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \
-   -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \
-   DESTDIR=${LIB32TMP}
+LIB32WMAKE=${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
+   -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
 LIB32IMAKE=${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
${IMAKE_INSTALL}
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248350 - in stable/9: . cddl/lib/libdtrace share/mk

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 20:34:10 2013
New Revision: 248350
URL: http://svnweb.freebsd.org/changeset/base/248350

Log:
  MFC r245561,245885:
  
  Add a new LIBRARIES_ONLY make variable to disable the build and install
  of files other than the actual libraries.
  
  Use LIBRARIES_ONLY to supress the inclusion of files in the lib32
  distribution that are duplicates of files in base.
  
  Sponsored by: DARPA, AFRL
  Reviewed by:  emaste

Modified:
  stable/9/Makefile.inc1   (contents, props changed)
  stable/9/cddl/lib/libdtrace/Makefile
  stable/9/share/mk/bsd.README
  stable/9/share/mk/bsd.lib.mk
Directory Properties:
  stable/9/cddl/lib/libdtrace/   (props changed)
  stable/9/share/mk/   (props changed)

Modified: stable/9/Makefile.inc1
==
--- stable/9/Makefile.inc1  Fri Mar 15 20:29:31 2013(r248349)
+++ stable/9/Makefile.inc1  Fri Mar 15 20:34:10 2013(r248350)
@@ -330,6 +330,7 @@ LIB32WMAKEFLAGS+=   \
CXX="${CXX} ${LIB32FLAGS}" \
DESTDIR=${LIB32TMP} \
-DCOMPAT_32BIT \
+   -DLIBRARIES_ONLY \
-DNO_CPU_CFLAGS \
-DNO_CTF \
-DNO_LINT

Modified: stable/9/cddl/lib/libdtrace/Makefile
==
--- stable/9/cddl/lib/libdtrace/MakefileFri Mar 15 20:29:31 2013
(r248349)
+++ stable/9/cddl/lib/libdtrace/MakefileFri Mar 15 20:34:10 2013
(r248350)
@@ -95,7 +95,7 @@ dt_names.c:
 beforedepend:  dt_errtags.c dt_names.c
 
 beforeinstall:
-.if exists(${DESTDIR}/usr/lib/dtrace)
+.if !defined(LIBRARIES_ONLY) && exists(${DESTDIR}/usr/lib/dtrace)
 .for file in ${DSRCS}
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} 
${DESTDIR}/usr/lib/dtrace
 .endfor

Modified: stable/9/share/mk/bsd.README
==
--- stable/9/share/mk/bsd.READMEFri Mar 15 20:29:31 2013
(r248349)
+++ stable/9/share/mk/bsd.READMEFri Mar 15 20:34:10 2013
(r248350)
@@ -356,6 +356,8 @@ SHLIB_LDSCRIPT  Template file to generate
Unless used, a simple symlink is created to the real
shared object.
 
+LIBRARIES_ONLY Do not build or install files other than the library.
+
 The include file  includes the file named "../Makefile.inc"
 if it exists, as well as the include file .
 

Modified: stable/9/share/mk/bsd.lib.mk
==
--- stable/9/share/mk/bsd.lib.mkFri Mar 15 20:29:31 2013
(r248349)
+++ stable/9/share/mk/bsd.lib.mkFri Mar 15 20:34:10 2013
(r248350)
@@ -313,12 +313,15 @@ _libinstall:
 .endif
 .endif # !defined(INTERNALLIB)
 
+.if !defined(LIBRARIES_ONLY)
 .include 
 .include 
 .include 
+.endif
+
 .include 
 
-.if ${MK_MAN} != "no"
+.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
 realinstall: _maninstall
 .ORDER: beforeinstall _maninstall
 .endif
@@ -330,7 +333,7 @@ lint: ${SRCS:M*.c}
${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC}
 .endif
 
-.if ${MK_MAN} != "no"
+.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
 .include 
 .endif
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248351 - stable/9/etc

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 20:52:00 2013
New Revision: 248351
URL: http://svnweb.freebsd.org/changeset/base/248351

Log:
  MFC r245571,245580:
  
  In preparation for logging metadata about each filesystem object,
  refactor the link section of distrib-dirs to alwasy install to a full
  path (the link contents remain relative as they should).
  
  Eliminate the use of the "rm -r[f] ; ln -s  " pattern in
  favor of "ln -sfh  ".  None of these links could be directories
  on a system installed in the last decade.
  
  Sponsored by:   DARPA, AFRL

Modified:
  stable/9/etc/Makefile
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/Makefile
==
--- stable/9/etc/Makefile   Fri Mar 15 20:34:10 2013(r248350)
+++ stable/9/etc/Makefile   Fri Mar 15 20:52:00 2013(r248351)
@@ -321,32 +321,26 @@ distrib-dirs:
-f $$m -p $$d; \
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
done; true
-   cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
-   cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
-   cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
+   ln -sfh usr/src/sys ${DESTDIR}/sys
cd ${DESTDIR}/usr/share/man; \
-   set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
-   while [ $$# -gt 0 ] ; \
-   do \
-   rm -rf "$$1"; \
-   ln -s "$$2" "$$1"; \
-   shift; shift; \
+   for mandir in man*; do \
+   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
+   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \
done
cd ${DESTDIR}/usr/share/openssl/man; \
+   for mandir in man*; do \
+   ln -sfh ../$$mandir \
+   ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
+   done
set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
-   while [ $$# -gt 0 ] ; \
-   do \
-   rm -rf "$$1"; \
-   ln -s "$$2" "$$1"; \
+   while [ $$# -gt 0 ] ; do \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \
shift; shift; \
done
-   cd ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1; ln -sf ../man* .
-   cd ${DESTDIR}/usr/share/nls; \
set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
-   while [ $$# -gt 0 ] ; \
-   do \
-   rm -rf "$$1"; \
-   ln -s "$$2" "$$1"; \
+   while [ $$# -gt 0 ] ; do \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
shift; shift; \
done
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248352 - in stable/9: etc share/mk

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 21:32:40 2013
New Revision: 248352
URL: http://svnweb.freebsd.org/changeset/base/248352

Log:
  MFC r245752,246913,247162
  
  Replace all known uses of ln in the build process with appropriate
  install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
  variables.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/9/etc/Makefile
  stable/9/share/mk/bsd.incs.mk
  stable/9/share/mk/bsd.info.mk
  stable/9/share/mk/bsd.lib.mk
  stable/9/share/mk/bsd.links.mk
  stable/9/share/mk/bsd.man.mk
  stable/9/share/mk/bsd.own.mk
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/mk/   (props changed)

Modified: stable/9/etc/Makefile
==
--- stable/9/etc/Makefile   Fri Mar 15 20:52:00 2013(r248351)
+++ stable/9/etc/Makefile   Fri Mar 15 21:32:40 2013(r248352)
@@ -321,26 +321,29 @@ distrib-dirs:
-f $$m -p $$d; \
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
done; true
-   ln -sfh usr/src/sys ${DESTDIR}/sys
+   ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
cd ${DESTDIR}/usr/share/man; \
for mandir in man*; do \
-   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
-   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \
+   ${INSTALL_SYMLINK} ../$$mandir \
+   ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
+   ${INSTALL_SYMLINK} ../$$mandir \
+   ${DESTDIR}/usr/share/man/en.UTF-8/; \
done
cd ${DESTDIR}/usr/share/openssl/man; \
for mandir in man*; do \
-   ln -sfh ../$$mandir \
+   ${INSTALL_SYMLINK} ../$$mandir \
${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
done
set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
while [ $$# -gt 0 ] ; do \
-   ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \
-   ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \
+   ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
+   ${INSTALL_SYMLINK} "$$2" \
+   "${DESTDIR}/usr/share/openssl/man/$$1"; \
shift; shift; \
done
set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
while [ $$# -gt 0 ] ; do \
-   ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
+   ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
shift; shift; \
done
 

Modified: stable/9/share/mk/bsd.incs.mk
==
--- stable/9/share/mk/bsd.incs.mk   Fri Mar 15 20:52:00 2013
(r248351)
+++ stable/9/share/mk/bsd.incs.mk   Fri Mar 15 21:32:40 2013
(r248352)
@@ -73,7 +73,7 @@ installincludes:
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
-   ln -fs $$l $$t; \
+   ${INSTALL_SYMLINK} $$l $$t; \
done; true
 .endif
 .endif # !target(installincludes)

Modified: stable/9/share/mk/bsd.info.mk
==
--- stable/9/share/mk/bsd.info.mk   Fri Mar 15 20:52:00 2013
(r248351)
+++ stable/9/share/mk/bsd.info.mk   Fri Mar 15 21:32:40 2013
(r248352)
@@ -113,7 +113,7 @@ DVIPS2ASCII?=   dvips2ascii
 
 .info.html:
${INFO2HTML} ${.IMPSRC}
-   ln -f ${.TARGET:R}.info.Top.html ${.TARGET}
+   ${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET}
 
 .PATH: ${.CURDIR} ${SRCDIR}
 

Modified: stable/9/share/mk/bsd.lib.mk
==
--- stable/9/share/mk/bsd.lib.mkFri Mar 15 20:52:00 2013
(r248351)
+++ stable/9/share/mk/bsd.lib.mkFri Mar 15 21:32:40 2013
(r248352)
@@ -178,9 +178,9 @@ ${SHLIB_NAME}: ${SOBJS} beforelinking
 ${SHLIB_NAME}: ${SOBJS}
 .endif
@${ECHO} building shared library ${SHLIB_NAME}
-   @rm -f ${.TARGET} ${SHLIB_LINK}
+   @rm -f ${SHLIB_NAME} ${SHLIB_LINK}
 .if defined(SHLIB_LINK)
-   @ln -fs ${.TARGET} ${SHLIB_LINK}
+   @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
 .endif
 .if !defined(NM)
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
@@ -291,9 +291,9 @@ _libinstall:
${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .else
 .if ${SHLIBDIR} == ${LIBDIR}
-   ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
+   ${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .else
-   ln -fs ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \
+   ${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \
${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .if exists(${DESTDIR}${LIBDIR}/${SHLIB_NAME})
-chflags noschg ${DESTDIR}${LIBDIR}/${SHLIB

svn commit: r248353 - stable/9/share/info

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 21:45:49 2013
New Revision: 248353
URL: http://svnweb.freebsd.org/changeset/base/248353

Log:
  MFC r245753:
  
  Install the template info directory with mode 644 instead of 444 to
  allow it to be updated by its owner without resorting to privilege.
  
  This is required by upcoming changes to allow installworld to work as
  a non-root user.
  
  Sponsored by:   DARPA, AFRL

Modified:
  stable/9/share/info/Makefile
Directory Properties:
  stable/9/share/info/   (props changed)

Modified: stable/9/share/info/Makefile
==
--- stable/9/share/info/MakefileFri Mar 15 21:32:40 2013
(r248352)
+++ stable/9/share/info/MakefileFri Mar 15 21:45:49 2013
(r248353)
@@ -17,6 +17,6 @@ beforeinstall:
@exit 3;
 .endif
 .if !exists(${DESTDIR}${INFODIR}/dir)
-   ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m ${INFOMODE} \
+   ${INSTALL} -o ${INFOOWN} -g ${INFOGRP} -m 644 \
 dir-tmpl ${DESTDIR}${INFODIR}/dir
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248354 - stable/9/usr.sbin

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 22:14:41 2013
New Revision: 248354
URL: http://svnweb.freebsd.org/changeset/base/248354

Log:
  MFC r245853:
  
  manctl is conditionally added to SUBDIRS later on.  Don't unconditionally
  include in the main list.

Modified:
  stable/9/usr.sbin/Makefile   (contents, props changed)

Modified: stable/9/usr.sbin/Makefile
==
--- stable/9/usr.sbin/Makefile  Fri Mar 15 21:45:49 2013(r248353)
+++ stable/9/usr.sbin/Makefile  Fri Mar 15 22:14:41 2013(r248354)
@@ -37,7 +37,6 @@ SUBDIR=   adduser \
kldxref \
mailwrapper \
makefs \
-   manctl \
memcontrol \
mergemaster \
mfiutil \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248355 - stable/9/gnu/usr.bin/cc/c++

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 22:20:45 2013
New Revision: 248355
URL: http://svnweb.freebsd.org/changeset/base/248355

Log:
  MFC r245882,245898
  
  Reorder so that NO_MAN is declared before bsd.own.mk is included and thus
  has an effect (not installed a g++.1 manpage over the g++.1(.gz) link
  created in ../cc).
  
  bsd.own.mk needs to be included before Makefil.inc so MK_ARM_EABI is defined

Modified:
  stable/9/gnu/usr.bin/cc/c++/Makefile
Directory Properties:
  stable/9/gnu/usr.bin/cc/c++/   (props changed)

Modified: stable/9/gnu/usr.bin/cc/c++/Makefile
==
--- stable/9/gnu/usr.bin/cc/c++/MakefileFri Mar 15 22:14:41 2013
(r248354)
+++ stable/9/gnu/usr.bin/cc/c++/MakefileFri Mar 15 22:20:45 2013
(r248355)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
+NO_MAN=
 .include 
 
 .include "../Makefile.inc"
@@ -9,13 +10,13 @@
 
 PROG=  g++
 SRCS+= g++spec.c
+
+DPADD= ${LIBCPP} ${LIBIBERTY}
+LDADD= ${LIBCPP} ${LIBIBERTY}
+
 .if ${MK_CLANG_IS_CC} == "no"
 LINKS= ${BINDIR}/g++ ${BINDIR}/c++
 LINKS+=${BINDIR}/g++ ${BINDIR}/CC
 .endif
-NO_MAN=
-
-DPADD= ${LIBCPP} ${LIBIBERTY}
-LDADD= ${LIBCPP} ${LIBIBERTY}
 
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248357 - stable/9/include/arpa

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 22:26:19 2013
New Revision: 248357
URL: http://svnweb.freebsd.org/changeset/base/248357

Log:
  MFC r245886,245911
  
  Don't install telnet.h if it will be installed by libtelnet.

Modified:
  stable/9/include/arpa/Makefile
Directory Properties:
  stable/9/include/arpa/   (props changed)

Modified: stable/9/include/arpa/Makefile
==
--- stable/9/include/arpa/Makefile  Fri Mar 15 22:24:34 2013
(r248356)
+++ stable/9/include/arpa/Makefile  Fri Mar 15 22:26:19 2013
(r248357)
@@ -1,7 +1,12 @@
 # $FreeBSD$
 
+.include 
+
 NO_OBJ=
-INCS=  ftp.h inet.h nameser.h nameser_compat.h telnet.h tftp.h
+INCS=  ftp.h inet.h nameser.h nameser_compat.h tftp.h
+.if ${MK_TELNET} == "no"
+INCS+= telnet.h
+.endif
 INCSDIR=${INCLUDEDIR}/arpa
 
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r248358 - in stable/9/lib/ncurses: form menu ncurses panel

2013-03-15 Thread Brooks Davis
Author: brooks
Date: Fri Mar 15 22:31:51 2013
New Revision: 248358
URL: http://svnweb.freebsd.org/changeset/base/248358

Log:
  MFC r245887
  
  Only install manpages and html documentation in the ncurses/*w (wchar)
  builds so that it is only installed once.  This is consistent with the
  existing decision to only install headers in the that case.

Modified:
  stable/9/lib/ncurses/form/Makefile
  stable/9/lib/ncurses/menu/Makefile
  stable/9/lib/ncurses/ncurses/Makefile
  stable/9/lib/ncurses/panel/Makefile
Directory Properties:
  stable/9/lib/ncurses/form/   (props changed)
  stable/9/lib/ncurses/menu/   (props changed)
  stable/9/lib/ncurses/ncurses/   (props changed)
  stable/9/lib/ncurses/panel/   (props changed)

Modified: stable/9/lib/ncurses/form/Makefile
==
--- stable/9/lib/ncurses/form/Makefile  Fri Mar 15 22:26:19 2013
(r248357)
+++ stable/9/lib/ncurses/form/Makefile  Fri Mar 15 22:31:51 2013
(r248358)
@@ -59,7 +59,6 @@ LDADD=-lncurses${LIB_SUFFIX}
 
 .if defined(ENABLE_WIDEC)
 INCS=  form.h
-.endif
 
 .PATH: ${NCURSES_DIR}/man
 MAN=   \
@@ -157,6 +156,9 @@ MLINKS= form_cursor.3 pos_form_cursor.3 
form_win.3 scale_form.3 \
form_win.3 set_form_sub.3 \
form_win.3 set_form_win.3
+.else
+NO_MAN=
+.endif
 
 .include 
 

Modified: stable/9/lib/ncurses/menu/Makefile
==
--- stable/9/lib/ncurses/menu/Makefile  Fri Mar 15 22:26:19 2013
(r248357)
+++ stable/9/lib/ncurses/menu/Makefile  Fri Mar 15 22:31:51 2013
(r248358)
@@ -45,7 +45,6 @@ LDADD=-lncurses${LIB_SUFFIX}
 
 .if defined(ENABLE_WIDEC)
 INCS=  menu.h eti.h
-.endif
 
 .PATH: ${NCURSES_DIR}/man
 MAN=   \
@@ -130,6 +129,9 @@ MLINKS= menu_attributes.3 menu_back.3 \
mitem_value.3 item_value.3 \
mitem_value.3 set_item_value.3 \
mitem_visible.3 item_visible.3
+.else
+NO_MAN=
+.endif
 
 .include 
 

Modified: stable/9/lib/ncurses/ncurses/Makefile
==
--- stable/9/lib/ncurses/ncurses/Makefile   Fri Mar 15 22:26:19 2013
(r248357)
+++ stable/9/lib/ncurses/ncurses/Makefile   Fri Mar 15 22:31:51 2013
(r248358)
@@ -2,6 +2,10 @@
 
 SHLIBDIR?= /lib
 
+.if !defined(ENABLE_WIDEC)
+NO_MAN=
+.endif
+
 .include 
 
 .include "${.CURDIR}/../config.mk"
@@ -304,8 +308,10 @@ SYMLINKS+= libncurses${LIB_SUFFIX}_p.a $
 SYMLINKS+= libncurses${LIB_SUFFIX}_p.a ${LIBDIR}/libtinfo${LIB_SUFFIX}_p.a
 .endif
 
+.if defined(ENABLE_WIDEC)
 DOCSDIR=   ${SHAREDIR}/doc/ncurses
 DOCS=  ncurses-intro.html hackguide.html
+.endif
 
 .if ${MK_HTML} != "no"
 .PATH: ${NCURSES_DIR}/doc/html
@@ -457,6 +463,7 @@ terminfo.5: MKterminfo.sh terminfo.head 
 
 CLEANFILES+=   terminfo.5
 
+.if defined(ENABLE_WIDEC)
 .PATH: ${NCURSES_DIR}/man
 MAN=   \
curs_addch.3 \
@@ -517,7 +524,6 @@ MAN=\
resizeterm.3 \
wresize.3
 
-.if defined(ENABLE_WIDEC)
 MAN+=  \
curs_add_wch.3 \
curs_add_wchstr.3 \

Modified: stable/9/lib/ncurses/panel/Makefile
==
--- stable/9/lib/ncurses/panel/Makefile Fri Mar 15 22:26:19 2013
(r248357)
+++ stable/9/lib/ncurses/panel/Makefile Fri Mar 15 22:31:51 2013
(r248358)
@@ -34,7 +34,6 @@ LDADD=-lncurses${LIB_SUFFIX}
 
 .if defined(ENABLE_WIDEC)
 INCS=  panel.h
-.endif
 
 # generate MAN
 .PATH: ${NCURSES_DIR}/man
@@ -58,6 +57,9 @@ MLINKS=   panel.3 bottom_panel.3 \
panel.3 show_panel.3 \
panel.3 top_panel.3 \
panel.3 update_panels.3
+.else
+NO_MAN=
+.endif

 .include 
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r248352 - in stable/9: etc share/mk

2013-03-19 Thread Brooks Davis
On Sun, Mar 17, 2013 at 06:10:58PM +0400, Dmitry Morozovsky wrote:
> On Fri, 15 Mar 2013, Brooks Davis wrote:
> 
> > Author: brooks
> > Date: Fri Mar 15 21:32:40 2013
> > New Revision: 248352
> > URL: http://svnweb.freebsd.org/changeset/base/248352
> > 
> > Log:
> >   MFC r245752,246913,247162
> >   
> >   Replace all known uses of ln in the build process with appropriate
> >   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
> >   variables.
> 
> It seems this merge breaks ``make distribution'' and hence mergemaster if 
> your 
> base system is not updated yet (for example, while updating jail):

Sorry for the delay in responding.  I missed this yesterday.

It works for me on a older 9.0-STABLE system where the base install
doesn't support -l.  Did you build world or run "make toolchain" in that
source tree to build the bootstrap copy of install?

-- Brooks


pgpjC9yJECBXb.pgp
Description: PGP signature


svn commit: r248531 - in stable/9: etc share/mk usr.sbin/mergemaster

2013-03-19 Thread Brooks Davis
Author: brooks
Date: Tue Mar 19 20:00:34 2013
New Revision: 248531
URL: http://svnweb.freebsd.org/changeset/base/248531

Log:
  Revert r248352:
  
  >   Replace all known uses of ln in the build process with appropriate
  >   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
  >   variables.
  
  This breaks the assumption mergemaster and etcupdate that no new
  features of tools will be required to run "make distribution" or it's
  prerequisites.
  
  Plotting a way forward will take some time and nothing in 9-STABLE
  depends on INSTALL_LINK and INSTALL_SYMLINK yet so backing this out seem
  like the right short-term approach.
  
  PR:   misc/177055

Modified:
  stable/9/etc/Makefile
  stable/9/share/mk/bsd.incs.mk
  stable/9/share/mk/bsd.info.mk
  stable/9/share/mk/bsd.lib.mk
  stable/9/share/mk/bsd.links.mk
  stable/9/share/mk/bsd.man.mk
  stable/9/share/mk/bsd.own.mk
  stable/9/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/mk/   (props changed)

Modified: stable/9/etc/Makefile
==
--- stable/9/etc/Makefile   Tue Mar 19 19:49:06 2013(r248530)
+++ stable/9/etc/Makefile   Tue Mar 19 20:00:34 2013(r248531)
@@ -321,29 +321,26 @@ distrib-dirs:
-f $$m -p $$d; \
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
done; true
-   ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
+   ln -sfh usr/src/sys ${DESTDIR}/sys
cd ${DESTDIR}/usr/share/man; \
for mandir in man*; do \
-   ${INSTALL_SYMLINK} ../$$mandir \
-   ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
-   ${INSTALL_SYMLINK} ../$$mandir \
-   ${DESTDIR}/usr/share/man/en.UTF-8/; \
+   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
+   ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \
done
cd ${DESTDIR}/usr/share/openssl/man; \
for mandir in man*; do \
-   ${INSTALL_SYMLINK} ../$$mandir \
+   ln -sfh ../$$mandir \
${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
done
set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
while [ $$# -gt 0 ] ; do \
-   ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
-   ${INSTALL_SYMLINK} "$$2" \
-   "${DESTDIR}/usr/share/openssl/man/$$1"; \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \
shift; shift; \
done
set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
while [ $$# -gt 0 ] ; do \
-   ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
+   ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
shift; shift; \
done
 

Modified: stable/9/share/mk/bsd.incs.mk
==
--- stable/9/share/mk/bsd.incs.mk   Tue Mar 19 19:49:06 2013
(r248530)
+++ stable/9/share/mk/bsd.incs.mk   Tue Mar 19 20:00:34 2013
(r248531)
@@ -73,7 +73,7 @@ installincludes:
t=${DESTDIR}$$1; \
shift; \
${ECHO} $$t -\> $$l; \
-   ${INSTALL_SYMLINK} $$l $$t; \
+   ln -fs $$l $$t; \
done; true
 .endif
 .endif # !target(installincludes)

Modified: stable/9/share/mk/bsd.info.mk
==
--- stable/9/share/mk/bsd.info.mk   Tue Mar 19 19:49:06 2013
(r248530)
+++ stable/9/share/mk/bsd.info.mk   Tue Mar 19 20:00:34 2013
(r248531)
@@ -113,7 +113,7 @@ DVIPS2ASCII?=   dvips2ascii
 
 .info.html:
${INFO2HTML} ${.IMPSRC}
-   ${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET}
+   ln -f ${.TARGET:R}.info.Top.html ${.TARGET}
 
 .PATH: ${.CURDIR} ${SRCDIR}
 

Modified: stable/9/share/mk/bsd.lib.mk
==
--- stable/9/share/mk/bsd.lib.mkTue Mar 19 19:49:06 2013
(r248530)
+++ stable/9/share/mk/bsd.lib.mkTue Mar 19 20:00:34 2013
(r248531)
@@ -178,9 +178,9 @@ ${SHLIB_NAME}: ${SOBJS} beforelinking
 ${SHLIB_NAME}: ${SOBJS}
 .endif
@${ECHO} building shared library ${SHLIB_NAME}
-   @rm -f ${SHLIB_NAME} ${SHLIB_LINK}
+   @rm -f ${.TARGET} ${SHLIB_LINK}
 .if defined(SHLIB_LINK)
-   @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
+   @ln -fs ${.TARGET} ${SHLIB_LINK}
 .endif
 .if !defined(NM)
@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
@@ -291,9 +291,9 @@ _libinstall:
${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .else
 .if ${SHLIBDIR} == ${LIBDIR}
-   ${INSTALL_SYMLINK} ${S

Re: svn commit: r248352 - in stable/9: etc share/mk

2013-03-19 Thread Brooks Davis
On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote:
> On Tue, 19 Mar 2013, Brooks Davis wrote:
> 
> > > >   Replace all known uses of ln in the build process with appropriate
> > > >   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
> > > >   variables.
> > > 
> > > It seems this merge breaks ``make distribution'' and hence mergemaster if 
> > > your 
> > > base system is not updated yet (for example, while updating jail):
> > 
> > Sorry for the delay in responding.  I missed this yesterday.
> > 
> > It works for me on a older 9.0-STABLE system where the base install
> > doesn't support -l.  Did you build world or run "make toolchain" in that
> > source tree to build the bootstrap copy of install?
> 
> Yes, this is after full ``make buildworld buildkernel'' process.

I've found the problem thanks to misc/177055.  It is that mergemaster
(and etcupdate) set MAKEOBJDIRPREFIX to something in their
temporary directory and thus deprive themselves of bootstrap tools.
Unfortunately, I don't see a trivial fix so I've backed this out for
now and will work on this in HEAD.

-- Brooks


pgpe4Hm149Li_.pgp
Description: PGP signature


Re: svn commit: r248331 - in stable/9: . usr.bin/xinstall

2013-03-19 Thread Brooks Davis
On Mon, Mar 18, 2013 at 09:45:57AM -0400, John Baldwin wrote:
> On Sunday, March 17, 2013 10:49:22 pm Jeremy Chadwick wrote:
> > Please see PR 177055.  This MFC has broken mergmaster for at least a
> > couple people.  The PR should really be rated high priority:

Sorry I missed this earlier.  I've backed out the change for now.

Ironically, it only effects people who follow the instructions about
mergemaster -p.  If you get away with skipping that step then it just
works.

> > http://www.freebsd.org/cgi/query-pr.cgi?pr=177055
> > 
> > http://lists.freebsd.org/pipermail/freebsd-stable/2013-March/072848.html
> 
> Probably breaks etcupdate as well.  Both of these tools use the host's tools
> and not the cross-built tools as they just run 'make distribute'.  The right 
> fix might be as simple as making those make targets use XMAKE so that if a 
> world is built they use the cross-built tools instead of the host's tools?

I was wondering why they sets MAKEOBJDIRPREFIX at all.  If they don't
set it, then they would use the bootstrap tools that were already
created.

Regardless of the final fix in mergemaster and etcupdate, we also need
to change the instructions in UPDATING.  Users need to run "sh
usr.sbin/mergemaster/mergemaster.sh -p" as that's the only way we can
reliably survive requirement changes in the source tree.  Does this seem
like a generally acceptable change?

-- Brooks

P.S. In addition to requiring install -l, I'm planning to change HEAD to
require nmtree in the not to distant future so that we can eliminate the
last duplicate entries in METALOG by only listing each directly once in
a .mtree file so it would be good to get this sorted out soon.


pgpgzIPjqgPNj.pgp
Description: PGP signature


Re: svn commit: r248352 - in stable/9: etc share/mk

2013-04-02 Thread Brooks Davis
On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote:
> On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote:
> > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote:
> > > On Tue, 19 Mar 2013, Brooks Davis wrote:
> > > 
> > > > > >   Replace all known uses of ln in the build process with appropriate
> > > > > >   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
> > > > > >   variables.
> > > > > 
> > > > > It seems this merge breaks ``make distribution'' and hence 
> > > > > mergemaster if your 
> > > > > base system is not updated yet (for example, while updating jail):
> > > > 
> > > > Sorry for the delay in responding.  I missed this yesterday.
> > > > 
> > > > It works for me on a older 9.0-STABLE system where the base install
> > > > doesn't support -l.  Did you build world or run "make toolchain" in that
> > > > source tree to build the bootstrap copy of install?
> > > 
> > > Yes, this is after full ``make buildworld buildkernel'' process.
> > 
> > I've found the problem thanks to misc/177055.  It is that mergemaster
> > (and etcupdate) set MAKEOBJDIRPREFIX to something in their
> > temporary directory and thus deprive themselves of bootstrap tools.
> > Unfortunately, I don't see a trivial fix so I've backed this out for
> > now and will work on this in HEAD.
> 
> Hu.  In the case of etcupdate you can use 'etcupdate -B'.  That is 
> actually safe
> to do in the common case where you've just updated /usr/src and built the 
> corresponding
> world in /usr/obj.  It should possibly even by the default for etcupdate if a 
> DESTDIR
> is not specified.

Finally getting back to this...

etcupdate -B would correct the immediate problem for etcupdate.  I do
think that making it the default if the tree exists makes sense.  It
won't be more broken than a cross installworld is.

I did a quick test when I first found this issue and it would be easy to
reuse the existing MAKEOBJDIRPREFIX in mergemaster as well.

I think we'll want to update UPDATING to recommend that the
mergemaster -p stage (and the equivalent for etcupdate) be run using the
version in the source tree, not the installed one.  I do wonder if it
would make sense for them to attempt to find and invoke that version so
simplify bootstrapping.

-- Brooks



pgprdgfa2rg3y.pgp
Description: PGP signature


Re: svn commit: r248352 - in stable/9: etc share/mk

2013-04-02 Thread Brooks Davis
On Tue, Apr 02, 2013 at 03:50:43PM -0400, John Baldwin wrote:
> On Tuesday, April 02, 2013 1:59:03 pm Brooks Davis wrote:
> > On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote:
> > > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote:
> > > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote:
> > > > > On Tue, 19 Mar 2013, Brooks Davis wrote:
> > > > > 
> > > > > > > >   Replace all known uses of ln in the build process with 
> > > > > > > > appropriate
> > > > > > > >   install -l invocations via new INSTALL_LINK and 
> > > > > > > > INSTALL_SYMLINK
> > > > > > > >   variables.
> > > > > > > 
> > > > > > > It seems this merge breaks ``make distribution'' and hence 
> > > > > > > mergemaster if your 
> > > > > > > base system is not updated yet (for example, while updating jail):
> > > > > > 
> > > > > > Sorry for the delay in responding.  I missed this yesterday.
> > > > > > 
> > > > > > It works for me on a older 9.0-STABLE system where the base install
> > > > > > doesn't support -l.  Did you build world or run "make toolchain" in 
> > > > > > that
> > > > > > source tree to build the bootstrap copy of install?
> > > > > 
> > > > > Yes, this is after full ``make buildworld buildkernel'' process.
> > > > 
> > > > I've found the problem thanks to misc/177055.  It is that mergemaster
> > > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their
> > > > temporary directory and thus deprive themselves of bootstrap tools.
> > > > Unfortunately, I don't see a trivial fix so I've backed this out for
> > > > now and will work on this in HEAD.
> > > 
> > > Hu.  In the case of etcupdate you can use 'etcupdate -B'.  That is 
> > > actually safe
> > > to do in the common case where you've just updated /usr/src and built the 
> > > corresponding
> > > world in /usr/obj.  It should possibly even by the default for etcupdate 
> > > if a DESTDIR
> > > is not specified.
> > 
> > Finally getting back to this...
> > 
> > etcupdate -B would correct the immediate problem for etcupdate.  I do
> > think that making it the default if the tree exists makes sense.  It
> > won't be more broken than a cross installworld is.
> 
> Hmmm, checking for the obj tree is a bit hackish.  I'd rather it were more
> deterministic.  I think I'd like to make it just default to -B and require
> a new -b flag to build a new tree, but perhaps have it check for a tree
> and error out if it doesn't exist and you don't give it -b?

Just switching the default seems fine in practice.  I guess it would
probably be useful to keep an option to enable the old behavior.

> > I did a quick test when I first found this issue and it would be easy to
> > reuse the existing MAKEOBJDIRPREFIX in mergemaster as well.
> > 
> > I think we'll want to update UPDATING to recommend that the
> > mergemaster -p stage (and the equivalent for etcupdate) be run using the
> > version in the source tree, not the installed one.  I do wonder if it
> > would make sense for them to attempt to find and invoke that version so
> > simplify bootstrapping.
> 
> Currently etcupdate doesn't implement something like -p.  I need to add that 
> as
> I would prefer to use its conflict resolution for adding users.  (That would
> also let it serve as a full replacement for mergemaster for those who prefer 
> it.)

OK, I'll look at switching the default behavior in mergemaster and
adding an option to revert to the old behavior.

I'll also change UPDATING to suggest using the mergemaster.sh from the
source tree for mergemaster -p.

- Brooks


pgpOD8l_qX5Aj.pgp
Description: PGP signature


svn commit: r249063 - head/bin/dd

2013-04-03 Thread Brooks Davis
Author: brooks
Date: Wed Apr  3 19:19:45 2013
New Revision: 249063
URL: http://svnweb.freebsd.org/changeset/base/249063

Log:
  IFP4 change 222074.
  
  Introduce an explicit close of the output descriptor so that work done
  on close is accounted for in the summary output triggered at exit
  (implicit close()s occur after atexit() hooks).
  
  This is useful because some devices such as cfi(4) may perform
  signficant work after a close occurs (e.g. erasing and rewriting a
  block of flash).

Modified:
  head/bin/dd/dd.c

Modified: head/bin/dd/dd.c
==
--- head/bin/dd/dd.cWed Apr  3 18:30:09 2013(r249062)
+++ head/bin/dd/dd.cWed Apr  3 19:19:45 2013(r249063)
@@ -98,6 +98,13 @@ main(int argc __unused, char *argv[])
dd_in();
 
dd_close();
+   /*
+* Some devices such as cfi(4) may perform significant amounts
+* of work when a write descriptor is closed.  Close the out
+* descriptor explicitly so that the summary handler (called
+* from an atexit() hook) includes this work.
+*/
+   close(out.fd);
exit(0);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r249071 - in head/sys: conf kern

2013-04-03 Thread Brooks Davis
Author: brooks
Date: Wed Apr  3 22:24:36 2013
New Revision: 249071
URL: http://svnweb.freebsd.org/changeset/base/249071

Log:
  MFP4 change 210763
  
  Allow boothowto and bootverbose to be set via kernel options, which
  is useful on architectures that are unable to rely on a boot loader
  to pass configuration variables to the kernel.
  
  Submitted by: rwatson

Modified:
  head/sys/conf/NOTES
  head/sys/conf/options
  head/sys/kern/init_main.c

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Apr  3 21:55:19 2013(r249070)
+++ head/sys/conf/NOTES Wed Apr  3 22:24:36 2013(r249071)
@@ -139,6 +139,12 @@ optionsMAXPHYS=(128*1024)
 #
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
 
+#
+# Compile-time defaults for various boot parameters
+#
+optionsBOOTVERBOSE=1
+optionsBOOTHOWTO=RB_MULTIPLE
+
 optionsGEOM_AES# Don't use, use GEOM_BDE
 optionsGEOM_BDE# Disk encryption.
 optionsGEOM_BSD# BSD disklabels

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Apr  3 21:55:19 2013(r249070)
+++ head/sys/conf/options   Wed Apr  3 22:24:36 2013(r249071)
@@ -68,6 +68,8 @@ TEXTDUMP_VERBOSE  opt_ddb.h
 ADAPTIVE_LOCKMGRS
 ALQ
 AUDIT  opt_global.h
+BOOTHOWTO  opt_global.h
+BOOTVERBOSEopt_global.h
 CALLOUT_PROFILING
 CAPABILITIES   opt_capsicum.h
 CAPABILITY_MODEopt_capsicum.h

Modified: head/sys/kern/init_main.c
==
--- head/sys/kern/init_main.c   Wed Apr  3 21:55:19 2013(r249070)
+++ head/sys/kern/init_main.c   Wed Apr  3 22:24:36 2013(r249071)
@@ -101,10 +101,17 @@ structthread thread0 __aligned(16);
 struct vmspace vmspace0;
 struct proc *initproc;
 
-intboothowto = 0;  /* initialized so that it can be patched */
+#ifndef BOOTHOWTO
+#defineBOOTHOWTO   0
+#endif
+intboothowto = BOOTHOWTO;  /* initialized so that it can be patched */
 SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0,
"Boot control flags, passed from loader");
-intbootverbose;
+
+#ifndef BOOTVERBOSE
+#defineBOOTVERBOSE 0
+#endif
+intbootverbose = BOOTVERBOSE;
 SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0,
"Control the output of verbose kernel messages");
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r249072 - in head/sys: conf dev/cfi

2013-04-03 Thread Brooks Davis
Author: brooks
Date: Wed Apr  3 22:37:40 2013
New Revision: 249072
URL: http://svnweb.freebsd.org/changeset/base/249072

Log:
  MFP4 change 217313 and part of 222068:
  
  Add a simple nexus attachment for cfi(4).

Added:
  head/sys/dev/cfi/cfi_bus_nexus.c
 - copied, changed from r249062, head/sys/dev/cfi/cfi_bus_ixp4xx.c
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Wed Apr  3 22:24:36 2013(r249071)
+++ head/sys/conf/files Wed Apr  3 22:37:40 2013(r249072)
@@ -1051,6 +1051,7 @@ dev/cardbus/cardbus.c optional cardbus
 dev/cardbus/cardbus_cis.c  optional cardbus
 dev/cardbus/cardbus_device.c   optional cardbus
 dev/cas/if_cas.c   optional cas
+dev/cfi/cfi_bus_nexus.coptional cfi
 dev/cfi/cfi_core.c optional cfi
 dev/cfi/cfi_dev.c  optional cfi
 dev/cfi/cfi_disk.c optional cfid

Copied and modified: head/sys/dev/cfi/cfi_bus_nexus.c (from r249062, 
head/sys/dev/cfi/cfi_bus_ixp4xx.c)
==
--- head/sys/dev/cfi/cfi_bus_ixp4xx.c   Wed Apr  3 18:30:09 2013
(r249062, copy source)
+++ head/sys/dev/cfi/cfi_bus_nexus.cWed Apr  3 22:37:40 2013
(r249072)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2012 SRI International
  * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc.
  * Copyright (c) 2009 Sam Leffler, Errno Consulting
  * All rights reserved.
@@ -41,40 +42,25 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#include 
-#include 
-
 static int
-cfi_ixp4xx_probe(device_t dev)
+cfi_nexus_probe(device_t dev)
 {
-   struct cfi_softc *sc = device_get_softc(dev);
-   /*
-* NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET
-* according to the flash on the board.  If it does not then it
-* can be done here.
-*/
-   if (bootverbose) {
-   struct ixp425_softc *sa =
-   device_get_softc(device_get_parent(dev));
-   device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n",
-   EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET));
-   }
-   sc->sc_width = 2;   /* NB: don't probe interface width */
+
return cfi_probe(dev);
 }
 
-static device_method_t cfi_ixp4xx_methods[] = {
+static device_method_t cfi_nexus_methods[] = {
/* device interface */
-   DEVMETHOD(device_probe, cfi_ixp4xx_probe),
+   DEVMETHOD(device_probe, cfi_nexus_probe),
DEVMETHOD(device_attach,cfi_attach),
DEVMETHOD(device_detach,cfi_detach),
 
-   DEVMETHOD_END
+   {0, 0}
 };
 
-static driver_t cfi_ixp4xx_driver = {
+static driver_t cfi_nexus_driver = {
cfi_driver_name,
-   cfi_ixp4xx_methods,
+   cfi_nexus_methods,
sizeof(struct cfi_softc),
 };
-DRIVER_MODULE(cfi, ixp, cfi_ixp4xx_driver, cfi_devclass, 0, 0);
+DRIVER_MODULE(cfi, nexus, cfi_nexus_driver, cfi_devclass, 0, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

2013-04-16 Thread Brooks Davis
Author: brooks
Date: Tue Apr 16 16:09:27 2013
New Revision: 249549
URL: http://svnweb.freebsd.org/changeset/base/249549

Log:
  MFC (much delayed) 234504:
  
  Enable DTrace hooks in GENERIC.

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/conf/GENERIC
==
--- stable/9/sys/amd64/conf/GENERIC Tue Apr 16 14:22:16 2013
(r249548)
+++ stable/9/sys/amd64/conf/GENERIC Tue Apr 16 16:09:27 2013
(r249549)
@@ -22,6 +22,7 @@ cpu   HAMMER
 ident  GENERIC
 
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+makeoptionsWITH_CTF=1  # Run ctfconvert(1) for DTrace support
 
 optionsSCHED_ULE   # ULE scheduler
 optionsPREEMPTION  # Enable kernel thread preemption
@@ -63,11 +64,12 @@ options KBD_INSTALL_CDEV# install a CD
 optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
-#options   KDTRACE_FRAME   # Ensure frames are compiled in
-#options   KDTRACE_HOOKS   # Kernel DTrace hooks
+optionsKDTRACE_FRAME   # Ensure frames are compiled in
+optionsKDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
 optionsKDB # Kernel debugger related code
 optionsKDB_TRACE   # Print a stack trace for a panic
+optionsDDB_CTF # kernel ELF linker loads CTF data
 
 # Make an SMP-capable kernel by default
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/i386/conf/GENERIC
==
--- stable/9/sys/i386/conf/GENERIC  Tue Apr 16 14:22:16 2013
(r249548)
+++ stable/9/sys/i386/conf/GENERIC  Tue Apr 16 16:09:27 2013
(r249549)
@@ -24,6 +24,7 @@ cpu   I686_CPU
 ident  GENERIC
 
 makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+makeoptionsWITH_CTF=1  # Run ctfconvert(1) for DTrace support
 
 optionsSCHED_ULE   # ULE scheduler
 optionsPREEMPTION  # Enable kernel thread preemption
@@ -64,10 +65,11 @@ options KBD_INSTALL_CDEV# install a CD
 optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
-#options   KDTRACE_HOOKS   # Kernel DTrace hooks
+optionsKDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
 optionsKDB # Kernel debugger related code
 optionsKDB_TRACE   # Print a stack trace for a panic
+optionsDDB_CTF # kernel ELF linker loads CTF data
 
 # To make an SMP kernel, the next two lines are needed
 optionsSMP # Symmetric MultiProcessor Kernel
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

2013-04-16 Thread Brooks Davis
On Tue, Apr 16, 2013 at 05:14:41PM +0100, Steven Hartland wrote:
> - Original Message - 
> From: "Brooks Davis" 
> > Author: brooks
> > Date: Tue Apr 16 16:09:27 2013
> > New Revision: 249549
> > URL: http://svnweb.freebsd.org/changeset/base/249549
> > 
> > Log:
> >  MFC (much delayed) 234504:
> >  
> >  Enable DTrace hooks in GENERIC.
> > 
> > Modified:
> >  stable/9/sys/amd64/conf/GENERIC
> >  stable/9/sys/i386/conf/GENERIC
> > Directory Properties:
> >  stable/9/sys/   (props changed)
> > 
> > Modified: stable/9/sys/amd64/conf/GENERIC
> > ==
> > --- stable/9/sys/amd64/conf/GENERIC Tue Apr 16 14:22:16 2013 (r249548)
> > +++ stable/9/sys/amd64/conf/GENERIC Tue Apr 16 16:09:27 2013 (r249549)
> > @@ -22,6 +22,7 @@ cpu HAMMER
> > ident GENERIC
> > 
> > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
> > +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support
> > 
> > options SCHED_ULE # ULE scheduler
> > options PREEMPTION # Enable kernel thread preemption
> > @@ -63,11 +64,12 @@ options KBD_INSTALL_CDEV # install a CD
> > options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
> > options AUDIT # Security event auditing
> > options MAC # TrustedBSD MAC Framework
> > -#options KDTRACE_FRAME # Ensure frames are compiled in
> > -#options KDTRACE_HOOKS # Kernel DTrace hooks
> > +options KDTRACE_FRAME # Ensure frames are compiled in
> > +options KDTRACE_HOOKS # Kernel DTrace hooks
> > options INCLUDE_CONFIG_FILE # Include this file in kernel
> > options KDB # Kernel debugger related code
> > options KDB_TRACE # Print a stack trace for a panic
> > +options DDB_CTF # kernel ELF linker loads CTF data
> > 
> > # Make an SMP-capable kernel by default
> > options SMP # Symmetric MultiProcessor Kernel
> > 
> > Modified: stable/9/sys/i386/conf/GENERIC
> > ==
> > --- stable/9/sys/i386/conf/GENERIC Tue Apr 16 14:22:16 2013 (r249548)
> > +++ stable/9/sys/i386/conf/GENERIC Tue Apr 16 16:09:27 2013 (r249549)
> > @@ -24,6 +24,7 @@ cpu I686_CPU
> > ident GENERIC
> > 
> > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
> > +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support
> > 
> > options SCHED_ULE # ULE scheduler
> > options PREEMPTION # Enable kernel thread preemption
> > @@ -64,10 +65,11 @@ options KBD_INSTALL_CDEV # install a CD
> > options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
> > options AUDIT # Security event auditing
> > options MAC # TrustedBSD MAC Framework
> > -#options KDTRACE_HOOKS # Kernel DTrace hooks
> > +options KDTRACE_HOOKS # Kernel DTrace hooks
> > options INCLUDE_CONFIG_FILE # Include this file in kernel
> > options KDB # Kernel debugger related code
> > options KDB_TRACE # Print a stack trace for a panic
> > +options DDB_CTF # kernel ELF linker loads CTF data
> > 
> > # To make an SMP kernel, the next two lines are needed
> > options SMP # Symmetric MultiProcessor Kernel
> 
> What's the performance / memory usage impact of enabling these
> by default?

The performance impact should be close to zero, but I've not attempted
to measure it.  Others who are using DTrace in production could probably
comment more usefully.

DDB_CTF causes the slightly less than 700KB SUNW_ctf section to be
loaded into RAM that should be the majority of the overhead.

-- Brooks


pgpaiTUaqlaeB.pgp
Description: PGP signature


svn commit: r249556 - head/sys/geom

2013-04-16 Thread Brooks Davis
Author: brooks
Date: Tue Apr 16 17:47:13 2013
New Revision: 249556
URL: http://svnweb.freebsd.org/changeset/base/249556

Log:
  Partial MFP4 of 222836:
  
  Only look for FDT partitions if our potential parent is a DISK device.
  
  Excluding direct recursion on the flashmap geoms was insufficient
  because it did not prevent the underlying device from being retrieved if
  flashmap geoms were further partitioned.
  
  Reviewed by:  imp
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/geom/geom_flashmap.c

Modified: head/sys/geom/geom_flashmap.c
==
--- head/sys/geom/geom_flashmap.c   Tue Apr 16 17:30:13 2013
(r249555)
+++ head/sys/geom/geom_flashmap.c   Tue Apr 16 17:47:13 2013
(r249556)
@@ -174,7 +174,7 @@ g_flashmap_taste(struct g_class *mp, str
g_topology_assert();
 
if (flags == G_TF_NORMAL &&
-   !strcmp(pp->geom->class->name, FLASHMAP_CLASS_NAME))
+   strcmp(pp->geom->class->name, G_DISK_CLASS_NAME) != 0)
return (NULL);
 
gp = g_slice_new(mp, FLASH_SLICES_MAX_NUM, pp, &cp, NULL, 0,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r249560 - in stable/9: contrib/libc-vis lib/libc/gen

2013-04-16 Thread Brooks Davis
Author: brooks
Date: Tue Apr 16 19:27:09 2013
New Revision: 249560
URL: http://svnweb.freebsd.org/changeset/base/249560

Log:
  MFC r248302:
  
  Update to the latest (un)vis(3) sources from NetBSD.  This adds
  multibyte support[0] and the new functions strenvisx and strsenvisx.
  
  Add MLINKS for vis(3) functions add by this and the initial import from
  NetBSD[1].
  
  PR:   bin/166364, bin/175418
  Submitted by: "J.R. Oldroyd" [0]
stefanf[1]
  Obtained from:NetBSD

Modified:
  stable/9/contrib/libc-vis/unvis.3
  stable/9/contrib/libc-vis/unvis.c
  stable/9/contrib/libc-vis/vis.3
  stable/9/contrib/libc-vis/vis.c
  stable/9/contrib/libc-vis/vis.h
  stable/9/lib/libc/gen/Makefile.inc
  stable/9/lib/libc/gen/Symbol.map
Directory Properties:
  stable/9/contrib/libc-vis/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/contrib/libc-vis/unvis.3
==
--- stable/9/contrib/libc-vis/unvis.3   Tue Apr 16 19:25:41 2013
(r249559)
+++ stable/9/contrib/libc-vis/unvis.3   Tue Apr 16 19:27:09 2013
(r249560)
@@ -1,4 +1,4 @@
-.\"$NetBSD: unvis.3,v 1.23 2011/03/17 14:06:29 wiz Exp $
+.\"$NetBSD: unvis.3,v 1.27 2012/12/15 07:34:36 wiz Exp $
 .\"$FreeBSD$
 .\"
 .\" Copyright (c) 1989, 1991, 1993
@@ -126,15 +126,17 @@ The
 function has several return codes that must be handled properly.
 They are:
 .Bl -tag -width UNVIS_VALIDPUSH
-.It Li \&0 (zero)
+.It Li \&0 No (zero)
 Another character is necessary; nothing has been recognized yet.
 .It Dv UNVIS_VALID
 A valid character has been recognized and is available at the location
-pointed to by cp.
+pointed to by
+.Fa cp .
 .It Dv UNVIS_VALIDPUSH
 A valid character has been recognized and is available at the location
-pointed to by cp; however, the character currently passed in should
-be passed in again.
+pointed to by
+.Fa cp ;
+however, the character currently passed in should be passed in again.
 .It Dv UNVIS_NOCHAR
 A valid sequence was detected, but no character was produced.
 This return code is necessary to indicate a logical break between characters.
@@ -150,7 +152,7 @@ one more time with flag set to
 to extract any remaining character (the character passed in is ignored).
 .Pp
 The
-.Ar flag
+.Fa flag
 argument is also used to specify the encoding style of the source.
 If set to
 .Dv VIS_HTTPSTYLE
@@ -161,7 +163,8 @@ will decode URI strings as specified in 
 If set to
 .Dv VIS_HTTP1866 ,
 .Fn unvis
-will decode URI strings as specified in RFC 1866.
+will decode entity references and numeric character references
+as specified in RFC 1866.
 If set to
 .Dv VIS_MIMESTYLE ,
 .Fn unvis
@@ -169,7 +172,9 @@ will decode MIME Quoted-Printable string
 If set to
 .Dv VIS_NOESCAPE ,
 .Fn unvis
-will not decode \e quoted characters.
+will not decode
+.Ql \e
+quoted characters.
 .Pp
 The following code fragment illustrates a proper use of
 .Fn unvis .
@@ -204,7 +209,7 @@ The functions
 and
 .Fn strnunvisx
 will return \-1 on error and set
-.Va errno 
+.Va errno
 to:
 .Bl -tag -width Er
 .It Bq Er EINVAL
@@ -212,7 +217,7 @@ An invalid escape sequence was detected,
 .El
 .Pp
 In addition the functions
-.Fn strnunvis 
+.Fn strnunvis
 and
 .Fn strnunvisx
 will can also set
@@ -244,4 +249,14 @@ and
 functions appeared in
 .Nx 6.0
 and
-.Fx 10.0 .
+.Fx 9.2 .
+.Sh BUGS
+The names
+.Dv VIS_HTTP1808
+and
+.Dv VIS_HTTP1866
+are wrong.
+Percent-encoding was defined in RFC 1738, the original RFC for URL.
+RFC 1866 defines HTML 2.0, an application of SGML, from which it
+inherits concepts of numeric character references and entity
+references.

Modified: stable/9/contrib/libc-vis/unvis.c
==
--- stable/9/contrib/libc-vis/unvis.c   Tue Apr 16 19:25:41 2013
(r249559)
+++ stable/9/contrib/libc-vis/unvis.c   Tue Apr 16 19:27:09 2013
(r249560)
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $  */
+/* $NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $  */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)unvis.c8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: unvis.c,v 1.40 2012/12/14 21:31:01 christos Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.41 2012/12/15 04:29:53 matt Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 __FBSDID("$FreeBSD$");
@@ -90,7 +90,7 @@ __weak_alias(strnunvisx,_strnunvisx)
  * RFC 1866
  */
 static const struct nv {
-   const char name[7];
+   char name[7];
uint8_t value;
 } nv[] = {
{ "AElig",  198 }, /* capital AE diphthong (ligature)  */

Modified: stable/9/contrib/libc-vis/vis.3
==
--- stable/9/contrib/libc-vis/vis.3 Tue Apr 16 19:25:41 2013
(r249559)
+++ stable/9/contrib/libc-vis/vis.3 Tue Apr 16 19:27:09 2013   

svn commit: r249561 - in stable/9/usr.bin: unvis vis

2013-04-16 Thread Brooks Davis
Author: brooks
Date: Tue Apr 16 19:28:00 2013
New Revision: 249561
URL: http://svnweb.freebsd.org/changeset/base/249561

Log:
  MFC r248303:
  
  Replace our (un)vis(1) commands with implementations from NetBSD to
  match our import of the (un)vis(3) APIs.
  
  This adds support for multibyte encoding and the -h and -m flags which
  support HTTP and MIME encoding respectively.
  
  PR:   bin/175418
  Obtained from:NetBSD

Added:
 - copied from r249557, head/contrib/unvis/
 - copied from r249557, head/contrib/vis/
Directory Properties:
  stable/9/contrib/unvis/   (props changed)
  stable/9/contrib/vis/   (props changed)
Deleted:
  stable/9/usr.bin/unvis/unvis.1
  stable/9/usr.bin/unvis/unvis.c
  stable/9/usr.bin/vis/extern.h
  stable/9/usr.bin/vis/foldit.c
  stable/9/usr.bin/vis/vis.1
  stable/9/usr.bin/vis/vis.c
Modified:
  stable/9/usr.bin/unvis/Makefile
  stable/9/usr.bin/vis/Makefile
Directory Properties:
  stable/9/usr.bin/unvis/   (props changed)
  stable/9/usr.bin/vis/   (props changed)

Modified: stable/9/usr.bin/unvis/Makefile
==
--- stable/9/usr.bin/unvis/Makefile Tue Apr 16 19:27:09 2013
(r249560)
+++ stable/9/usr.bin/unvis/Makefile Tue Apr 16 19:28:00 2013
(r249561)
@@ -3,4 +3,6 @@
 
 PROG=  unvis
 
+.PATH: ${.CURDIR}/../../contrib/unvis
+
 .include 

Modified: stable/9/usr.bin/vis/Makefile
==
--- stable/9/usr.bin/vis/Makefile   Tue Apr 16 19:27:09 2013
(r249560)
+++ stable/9/usr.bin/vis/Makefile   Tue Apr 16 19:28:00 2013
(r249561)
@@ -1,6 +1,10 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
+# $FreeBSD$
 
 PROG=  vis
 SRCS=  vis.c foldit.c
 
+.PATH: ${.CURDIR}/../../contrib/vis
+CFLAGS+=   -I${.CURDIR}/../../contrib/vis
+
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

2013-04-17 Thread Brooks Davis
On Wed, Apr 17, 2013 at 12:35:38PM -0700, Jeremy Chadwick wrote:
> On Wed, Apr 17, 2013 at 02:54:33PM +0200, Jeremie Le Hen wrote:
> > Hi Jeremy,
> > 
> > On Tue, Apr 16, 2013 at 09:19:19AM -0700, Jeremy Chadwick wrote:
> > > 
> > > Now that this has been enabled by default, I should warn folks of a
> > > caveat that I found in the buildworld/buildkernel framework.  It's
> > > easiest to explain like this:
> > > 
> > > 1. Install FreeBSD 9.x, svn checkout of stable/9, etc...
> > > 2. Add WITHOUT_CDDL=true to /etc/src.conf
> > > 3. Rebuild + install kernel/world per src/Makefile procedure
> > > 4. Remove WITHOUT_CDDL=true from /etc/src.conf
> > > 5. rm -fr /usr/obj/*
> > > 6. Rebuild world
> > > 7. Rebuild kernel -- fails, stating "ctfconvert: not found".
> > > 
> > > For whatever reason the buildkernel bits make the assumption that
> > > ctfconvert exists on the system (presumably in $PATH or possibly a
> > > hard-coded), when ideally it should try to use the recently-built
> > > version in /usr/obj first.
> > 
> > I've tested this is a freshly installed 9.1-RELEASE jail and I haven't
> > been biten by the bug you describe.
> > 
> > ctfconvert(1) seems to be installed by default in 9.1-RELEASE, this is
> > probably there problem didn't occur.  I can easily verify this in the
> > jail:
> > 
> > % root@test9:/usr/src # ls -l /usr/bin/ctfconvert /usr/bin/vi /usr/bin/tail 
> > % -r-xr-xr-x  1 root  wheel  371536 Dec  4 09:33 /usr/bin/ctfconvert
> > % -r-xr-xr-x  1 root  wheel   19848 Apr 17 06:28 /usr/bin/tail
> > % -r-xr-xr-x  6 root  wheel  346432 Apr 17 06:28 /usr/bin/vi
> > 
> > 
> > Do you have a theory about why you've got the problem while I haven't?
> > FYI, it seems 9.0-RELEASE also has ctfconvert(1):
> > http://svnweb.freebsd.org/base/release/9.0.0/cddl/usr.bin/ctfconvert/
> > 
> > My guess is tha this might happen if you don't have /usr/bin/ctfconvert.
> > I've just removed it and trying to build kernel again.
> 
> I will spend some time to figure out exactly how to reproduce this.
> 
> Going from recent memory (~2 weeks ago), I encountered it on my VPS box
> (which does run ntpd, just FYI):
> 
> 1. Initially installed with 9.1-RELEASE,
> 2. Upgraded to stable/9 (using svn),
> 3. WITHOUT_CDDL=true and WITHOUT_ZFS=true added to /etc/src.conf
> 4. world/kernel rebuilt/reinstalled/etc. (this includes make delete-old,
>as per instructions in src/Makefile -- which would delete
>/usr/bin/ctfconvert)
> 5. Fast forward many months
> 6. Removed WITHOUT_CDDL=true from src.conf
> 7. Encountered the above issue ("ctfconvert: not found") during
>buildkernel
> 8. Rebuilt kernel again -- same error
> 9. Removed WITHOUT_ZFS=true from src.conf
> 10. Rebuilt kernel again -- worked
> 
> This could mean WITHOUT_ZFS=true has some bearing on this situation, but
> I don't see how/why, as WITHOUT_CDDL is supposed to be the "trigger" for
> ctf* utilities.  I did poke around the Makefiles and framework a bit
> but didn't have any epiphanies.
> 
> Like I said -- I'll try to reproduce the exact scenario.

Looking at Makefile.inc1 around line 1164 (on HEAD), ctfconvert and
cftmerge are bootstrap tools only when they don't exist at all on the
host.  The code there should be expanded to bootstrap for cases where
the installed ones are known to be broken (virtually all prior versions
given recent fixes) as well as when they aren't present on the host
system.

-- Brooks


pgpcLzvgpsEYg.pgp
Description: PGP signature


Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

2013-04-17 Thread Brooks Davis
On Wed, Apr 17, 2013 at 11:00:11PM +0200, Jeremie Le Hen wrote:
> On Wed, Apr 17, 2013 at 02:47:06PM -0500, Brooks Davis wrote:
>  > 
> > > I will spend some time to figure out exactly how to reproduce this.
> > > 
> > > Going from recent memory (~2 weeks ago), I encountered it on my VPS box
> > > (which does run ntpd, just FYI):
> > > 
> > > 1. Initially installed with 9.1-RELEASE,
> > > 2. Upgraded to stable/9 (using svn),
> > > 3. WITHOUT_CDDL=true and WITHOUT_ZFS=true added to /etc/src.conf
> > > 4. world/kernel rebuilt/reinstalled/etc. (this includes make delete-old,
> > >as per instructions in src/Makefile -- which would delete
> > >/usr/bin/ctfconvert)
> > > 5. Fast forward many months
> > > 6. Removed WITHOUT_CDDL=true from src.conf
> > > 7. Encountered the above issue ("ctfconvert: not found") during
> > >buildkernel
> > > 8. Rebuilt kernel again -- same error
> > > 9. Removed WITHOUT_ZFS=true from src.conf
> > > 10. Rebuilt kernel again -- worked
> > > 
> > > This could mean WITHOUT_ZFS=true has some bearing on this situation, but
> > > I don't see how/why, as WITHOUT_CDDL is supposed to be the "trigger" for
> > > ctf* utilities.  I did poke around the Makefiles and framework a bit
> > > but didn't have any epiphanies.
> > > 
> > > Like I said -- I'll try to reproduce the exact scenario.
> > 
> > Looking at Makefile.inc1 around line 1164 (on HEAD), ctfconvert and
> > cftmerge are bootstrap tools only when they don't exist at all on the
> > host.  The code there should be expanded to bootstrap for cases where
> > the installed ones are known to be broken (virtually all prior versions
> > given recent fixes) as well as when they aren't present on the host
> > system.
> 
> Do you have an idea how we can identify whether the installed
> ctfconvert(1) is broken or not?  I think in Jeremy's case we cannot rely
> on OSRELDATE given that right before he built and installed world with
> WITHOUT_CDDL, so ctfconvert and OSRELDATE are not in sync.

I think we should be able to come up with a fairly reliable set values
where it's broken.  We can also add a exists(/usr/bin/ctfconvert) to
catch the case were the user caused it to not be there.

> Why not just always add ctfconvert to bootstrap tools when it is needed?
> I don't know how long it takes to build though, but it is probably
> nothing compared to LLVM ;-).

It's probably not too bad to add, but I don't think it's changing all
that quickly so as long as people remember to update Makefile.inc1 it
shouldn't too bad.

-- Brooks


pgpPtZwLcJd8i.pgp
Description: PGP signature


Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf

2013-04-17 Thread Brooks Davis
On Wed, Apr 17, 2013 at 03:56:03PM -0700, Jeremy Chadwick wrote:
> On Wed, Apr 17, 2013 at 02:47:06PM -0500, Brooks Davis wrote:
> > On Wed, Apr 17, 2013 at 12:35:38PM -0700, Jeremy Chadwick wrote:
> > > On Wed, Apr 17, 2013 at 02:54:33PM +0200, Jeremie Le Hen wrote:
> > > > Hi Jeremy,
> > > > 
> > > > On Tue, Apr 16, 2013 at 09:19:19AM -0700, Jeremy Chadwick wrote:
> > > > > 
> > > > > Now that this has been enabled by default, I should warn folks of a
> > > > > caveat that I found in the buildworld/buildkernel framework.  It's
> > > > > easiest to explain like this:
> > > > > 
> > > > > 1. Install FreeBSD 9.x, svn checkout of stable/9, etc...
> > > > > 2. Add WITHOUT_CDDL=true to /etc/src.conf
> > > > > 3. Rebuild + install kernel/world per src/Makefile procedure
> > > > > 4. Remove WITHOUT_CDDL=true from /etc/src.conf
> > > > > 5. rm -fr /usr/obj/*
> > > > > 6. Rebuild world
> > > > > 7. Rebuild kernel -- fails, stating "ctfconvert: not found".
> > > > > 
> > > > > For whatever reason the buildkernel bits make the assumption that
> > > > > ctfconvert exists on the system (presumably in $PATH or possibly a
> > > > > hard-coded), when ideally it should try to use the recently-built
> > > > > version in /usr/obj first.
> > > > 
> > > > I've tested this is a freshly installed 9.1-RELEASE jail and I haven't
> > > > been biten by the bug you describe.
> > > > 
> > > > ctfconvert(1) seems to be installed by default in 9.1-RELEASE, this is
> > > > probably there problem didn't occur.  I can easily verify this in the
> > > > jail:
> > > > 
> > > > % root@test9:/usr/src # ls -l /usr/bin/ctfconvert /usr/bin/vi 
> > > > /usr/bin/tail 
> > > > % -r-xr-xr-x  1 root  wheel  371536 Dec  4 09:33 /usr/bin/ctfconvert
> > > > % -r-xr-xr-x  1 root  wheel   19848 Apr 17 06:28 /usr/bin/tail
> > > > % -r-xr-xr-x  6 root  wheel  346432 Apr 17 06:28 /usr/bin/vi
> > > > 
> > > > 
> > > > Do you have a theory about why you've got the problem while I haven't?
> > > > FYI, it seems 9.0-RELEASE also has ctfconvert(1):
> > > > http://svnweb.freebsd.org/base/release/9.0.0/cddl/usr.bin/ctfconvert/
> > > > 
> > > > My guess is tha this might happen if you don't have /usr/bin/ctfconvert.
> > > > I've just removed it and trying to build kernel again.
> > > 
> > > I will spend some time to figure out exactly how to reproduce this.
> > > 
> > > Going from recent memory (~2 weeks ago), I encountered it on my VPS box
> > > (which does run ntpd, just FYI):
> > > 
> > > 1. Initially installed with 9.1-RELEASE,
> > > 2. Upgraded to stable/9 (using svn),
> > > 3. WITHOUT_CDDL=true and WITHOUT_ZFS=true added to /etc/src.conf
> > > 4. world/kernel rebuilt/reinstalled/etc. (this includes make delete-old,
> > >as per instructions in src/Makefile -- which would delete
> > >/usr/bin/ctfconvert)
> > > 5. Fast forward many months
> > > 6. Removed WITHOUT_CDDL=true from src.conf
> > > 7. Encountered the above issue ("ctfconvert: not found") during
> > >buildkernel
> > > 8. Rebuilt kernel again -- same error
> > > 9. Removed WITHOUT_ZFS=true from src.conf
> > > 10. Rebuilt kernel again -- worked
> > > 
> > > This could mean WITHOUT_ZFS=true has some bearing on this situation, but
> > > I don't see how/why, as WITHOUT_CDDL is supposed to be the "trigger" for
> > > ctf* utilities.  I did poke around the Makefiles and framework a bit
> > > but didn't have any epiphanies.
> > > 
> > > Like I said -- I'll try to reproduce the exact scenario.
> > 
> > Looking at Makefile.inc1 around line 1164 (on HEAD), ctfconvert and
> > cftmerge are bootstrap tools only when they don't exist at all on the
> > host.  The code there should be expanded to bootstrap for cases where
> > the installed ones are known to be broken (virtually all prior versions
> > given recent fixes) as well as when they aren't present on the host
> > system.
> 
> I'm able to reproduce the issue I speak of with 100% reliability.
> Jeremie, I'm not sure why you're not able to reproduce this, because I
> can do so reliably/consistently.

The followin

svn commit: r249776 - in head/sys/mips: include mips

2013-04-22 Thread Brooks Davis
Author: brooks
Date: Mon Apr 22 19:02:37 2013
New Revision: 249776
URL: http://svnweb.freebsd.org/changeset/base/249776

Log:
  MFP4 223084, 227821:
  
  Partially implement generic_bs_*_8() for MIPS platforms.
  
  This is known to work with TARGET_ARCH=mips64 with FreeBSD/BERI.
  Assuming that other definitions in cpufunc.h are correct it will
  work on non-o64 ABI systems except sibyte. On sibyte and o32 systems
  generic_bs_*_8() will remain panic() implementations.
  
  Sponsored by: DARPA, AFRL
  Reviewed by:  imp, jmallett (older versions)

Modified:
  head/sys/mips/include/cpufunc.h
  head/sys/mips/mips/bus_space_generic.c

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Mon Apr 22 18:58:12 2013
(r249775)
+++ head/sys/mips/include/cpufunc.h Mon Apr 22 19:02:37 2013
(r249776)
@@ -354,9 +354,15 @@ void mips3_sd(volatile uint64_t *, uint6
 #definereadb(va)   (*(volatile uint8_t *) (va))
 #definereadw(va)   (*(volatile uint16_t *) (va))
 #definereadl(va)   (*(volatile uint32_t *) (va))
+#if defined(__GNUC__) && !defined(__mips_o32)
+#definereadq(a)(*(volatile uint64_t *)(a))
+#endif
  
 #definewriteb(va, d)   (*(volatile uint8_t *) (va) = (d))
 #definewritew(va, d)   (*(volatile uint16_t *) (va) = (d))
 #definewritel(va, d)   (*(volatile uint32_t *) (va) = (d))
+#if defined(__GNUC__) && !defined(__mips_o32)
+#definewriteq(va, d)   (*(volatile uint64_t *) (va) = (d))
+#endif
 
 #endif /* !_MACHINE_CPUFUNC_H_ */

Modified: head/sys/mips/mips/bus_space_generic.c
==
--- head/sys/mips/mips/bus_space_generic.c  Mon Apr 22 18:58:12 2013
(r249775)
+++ head/sys/mips/mips/bus_space_generic.c  Mon Apr 22 19:02:37 2013
(r249776)
@@ -202,9 +202,11 @@ static struct bus_space generic_space = 
 #define rd8(a) cvmx_read64_uint8(a)
 #define rd16(a) cvmx_read64_uint16(a)
 #define rd32(a) cvmx_read64_uint32(a)
+#define rd64(a) cvmx_read64_uint64(a)
 #define wr8(a, v) cvmx_write64_uint8(a, v)
 #define wr16(a, v) cvmx_write64_uint16(a, v)
 #define wr32(a, v) cvmx_write64_uint32(a, v)
+#define wr64(a, v) cvmx_write64_uint64(a, v)
 #elif defined(CPU_SB1) && _BYTE_ORDER == _BIG_ENDIAN
 #include 
 #define rd8(a) sb_big_endian_read8(a)
@@ -217,9 +219,15 @@ static struct bus_space generic_space = 
 #define rd8(a) readb(a)
 #define rd16(a) readw(a)
 #define rd32(a) readl(a)
+#ifdef readq
+#define rd64(a)readq((a))
+#endif
 #define wr8(a, v) writeb(a, v)
 #define wr16(a, v) writew(a, v)
 #define wr32(a, v) writel(a, v)
+#ifdef writeq
+#define wr64(a, v) writeq(a, v)
+#endif
 #endif
 
 /* generic bus_space tag */
@@ -297,7 +305,11 @@ uint64_t
 generic_bs_r_8(void *t, bus_space_handle_t handle, bus_size_t offset)
 {
 
+#ifdef rd64
+   return(rd64(handle + offset));
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 void
@@ -333,8 +345,14 @@ void
 generic_bs_rm_8(void *t, bus_space_handle_t bsh, bus_size_t offset,
 uint64_t *addr, size_t count)
 {
+#ifdef rd64
+   bus_addr_t baddr = bsh + offset;
 
+   while (count--)
+   *addr++ = rd64(baddr);
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 /*
@@ -382,8 +400,16 @@ void
 generic_bs_rr_8(void *t, bus_space_handle_t bsh, bus_size_t offset,
 uint64_t *addr, size_t count)
 {
+#ifdef rd64
+   bus_addr_t baddr = bsh + offset;
 
+   while (count--) {
+   *addr++ = rd64(baddr);
+   baddr += 8;
+   }
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 /*
@@ -419,7 +445,11 @@ generic_bs_w_8(void *t, bus_space_handle
 uint64_t value)
 {
 
+#ifdef wr64
+   wr64(bsh + offset, value);
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 /*
@@ -460,8 +490,14 @@ void
 generic_bs_wm_8(void *t, bus_space_handle_t bsh, bus_size_t offset,
 const uint64_t *addr, size_t count)
 {
+#ifdef wr64
+   bus_addr_t baddr = bsh + offset;
 
+   while (count--)
+   wr64(baddr, *addr++);
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 /*
@@ -508,8 +544,16 @@ void
 generic_bs_wr_8(void *t, bus_space_handle_t bsh, bus_size_t offset,
 const uint64_t *addr, size_t count)
 {
+#ifdef wr64
+   bus_addr_t baddr = bsh + offset;
 
+   while (count--) {
+   wr64(baddr, *addr++);
+   baddr += 8;
+   }
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 /*
@@ -550,8 +594,14 @@ void
 generic_bs_sm_8(void *t, bus_space_handle_t bsh, bus_size_t offset,
 uint64_t value, size_t count)
 {
+#ifdef wr64
+   bus_addr_t addr = bsh + offset;
 
+   while (count--)
+   wr64(addr, value);
+#else
panic("%s: not implemented", __func__);
+#endif
 }
 
 

svn commit: r249906 - in head: . usr.sbin/mergemaster

2013-04-25 Thread Brooks Davis
Author: brooks
Date: Thu Apr 25 21:19:50 2013
New Revision: 249906
URL: http://svnweb.freebsd.org/changeset/base/249906

Log:
  Use the system MAKEOBJDIRPREFIX when running make targets in
  mergemaster.  This allows bootstrap verions of tools to be used.
  
  Add a note to UPDATING about this change.
  
  Discussed with:   jhb
  Sponsored by: DARPA, AFRL
  MFC after:5 days

Modified:
  head/UPDATING
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/UPDATING
==
--- head/UPDATING   Thu Apr 25 20:42:21 2013(r249905)
+++ head/UPDATING   Thu Apr 25 21:19:50 2013(r249906)
@@ -31,6 +31,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20130425:
+   The mergemaster command now uses the default MAKEOBJDIRPREFIX
+   rather than creating it's own in the temporary directory in
+   order allow access to bootstrapped versions of tools such as
+   install and mtree.  When upgrading from version of FreeBSD where
+   the install command does not support -l, you will need to
+   install a new mergemaster command if mergemaster -p is required.
+   This can be accomplished with the command (cd src/usr.sbin/mergemaster
+   && make install).
+
 20130404:
Legacy ATA stack, disabled and replaced by new CAM-based one since
FreeBSD 9.0, completely removed from the sources.  Kernel modules
@@ -1757,7 +1767,7 @@ COMMON ITEMS:
step.  It never hurts to do it all the time.  You may need to
install a new mergemaster (cd src/usr.sbin/mergemaster && make
install) after the buildworld before this step if you last updated
-   from current before 20020224 or from -stable before 20020408.
+   from current before 20130425 or from -stable before 20130430.
 
[6] This only deletes old files and directories. Old libraries
can be deleted by "make delete-old-libs", but you have to make

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shThu Apr 25 20:42:21 2013
(r249905)
+++ head/usr.sbin/mergemaster/mergemaster.shThu Apr 25 21:19:50 2013
(r249906)
@@ -629,11 +629,10 @@ case "${RERUN}" in
 ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs >/dev/null
 ;;
   esac
-  od=${TEMPROOT}/usr/obj
   ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs >/dev/null &&
-  MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null &&
-  MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc 
>/dev/null &&
-  MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution 
>/dev/null;} ||
+  ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null &&
+  ${MM_MAKE} everything SUBDIR_OVERRIDE=etc >/dev/null &&
+  ${MM_MAKE} DESTDIR=${TEMPROOT} distribution >/dev/null;} ||
 { echo '';
  echo "  *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files 
to";
   echo "  the temproot environment";
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r262318 - stable/10/sys/geom/eli

2014-02-24 Thread Brooks Davis
On Sat, Feb 22, 2014 at 12:30:33AM +, Xin LI wrote:
> Author: delphij
> Date: Sat Feb 22 00:30:33 2014
> New Revision: 262318
> URL: http://svnweb.freebsd.org/changeset/base/262318
> 
> Log:
>   MFC r261618:
>   
>   In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
>   k_ipad.
>   
>   Note that the two consumers in geli(4) are not affected by this
>   issue because the way the code is constructed and as such, we
>   believe there is no security impact with or without this change
>   with geli(4)'s usage.
>   
>   Reported by:Serge van den Boom 
>   Reviewed by:pjd
> 
> Modified:
>   stable/10/sys/geom/eli/g_eli_crypto.c
> Directory Properties:
>   stable/10/   (props changed)
> 
> Modified: stable/10/sys/geom/eli/g_eli_crypto.c
> ==
> --- stable/10/sys/geom/eli/g_eli_crypto.c Sat Feb 22 00:16:27 2014
> (r262317)
> +++ stable/10/sys/geom/eli/g_eli_crypto.c Sat Feb 22 00:30:33 2014
> (r262318)
> @@ -265,6 +265,7 @@ g_eli_crypto_hmac_init(struct hmac_ctx *
>   /* Perform inner SHA512. */
>   SHA512_Init(&ctx->shactx);
>   SHA512_Update(&ctx->shactx, k_ipad, sizeof(k_ipad));
> + bzero(k_ipad, sizeof(k_ipad));
>  }
>  
>  void
> 

Unless k_ipad is declared volatile there is some risk an overly smart
compiler will optimize this bzero() away.  It might make sense for us to
use a non-standard function for such zeroing operations.

-- Brooks


pgpMO0SrXfiqa.pgp
Description: PGP signature


svn commit: r262643 - in stable/10: gnu/usr.bin/dialog lib/ncurses share/mk usr.bin/systat usr.bin/vi usr.sbin/bsdinstall/distextract usr.sbin/bsdinstall/distfetch usr.sbin/bsdinstall/partedit usr....

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 03:09:16 2014
New Revision: 262643
URL: http://svnweb.freebsd.org/changeset/base/262643

Log:
  MFC r261296:
  
  Merge from CheriBSD:
  commit c1acf022c533c5ae27e0cd556977eafe3f5959eb
  Author: Brooks Davis 
  Date:   Fri Jan 17 21:46:44 2014 +
  
Add an option WITHOUT_NCURSESW to suppress building and linking to
libncursesw.  While wide character support it useful we'd like to
only need one ncurses library on embedded systems.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/10/gnu/usr.bin/dialog/Makefile
  stable/10/lib/ncurses/Makefile
  stable/10/share/mk/bsd.own.mk
  stable/10/usr.bin/systat/Makefile
  stable/10/usr.bin/systat/main.c
  stable/10/usr.bin/vi/Makefile
  stable/10/usr.sbin/bsdinstall/distextract/Makefile
  stable/10/usr.sbin/bsdinstall/distfetch/Makefile
  stable/10/usr.sbin/bsdinstall/partedit/Makefile
  stable/10/usr.sbin/tzsetup/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/usr.bin/dialog/Makefile
==
--- stable/10/gnu/usr.bin/dialog/Makefile   Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/gnu/usr.bin/dialog/Makefile   Sat Mar  1 03:09:16 2014
(r262643)
@@ -3,11 +3,21 @@
 DIALOG=${.CURDIR}/../../../contrib/dialog
 PROG=   dialog
 
-DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM}
-LDADD= -ldialog -lncursesw -lm
+DPADD= ${LIBDIALOG} ${LIBM}
+LDADD= -ldialog -lm
 CFLAGS+= -I${.CURDIR} -I${DIALOG}
 .PATH: ${DIALOG}
 
 WARNS?= 6
 
+.include 
+
+.if ${MK_NCURSESW} == "no"
+DPADD+=${LIBNCURSES}
+LDADD+=-lncurses
+.else
+DPADD+=${LIBNCURSESW}
+LDADD+=-lncursesw
+.endif
+
 .include 

Modified: stable/10/lib/ncurses/Makefile
==
--- stable/10/lib/ncurses/Makefile  Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/lib/ncurses/Makefile  Sat Mar  1 03:09:16 2014
(r262643)
@@ -1,6 +1,11 @@
 # $FreeBSD$
 
-SUBDIR=ncurses form menu panel \
-   ncursesw formw menuw panelw
+.include 
+
+SUBDIR=ncurses form menu panel
+
+.if ${MK_NCURSESW} != "no"
+SUBDIR+=   ncursesw formw menuw panelw
+.endif
 
 .include 

Modified: stable/10/share/mk/bsd.own.mk
==
--- stable/10/share/mk/bsd.own.mk   Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/share/mk/bsd.own.mk   Sat Mar  1 03:09:16 2014
(r262643)
@@ -313,6 +313,7 @@ __DEFAULT_YES_OPTIONS = \
 MAILWRAPPER \
 MAKE \
 MAN \
+NCURSESW \
 NDIS \
 NETCAT \
 NETGRAPH \

Modified: stable/10/usr.bin/systat/Makefile
==
--- stable/10/usr.bin/systat/Makefile   Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/usr.bin/systat/Makefile   Sat Mar  1 03:09:16 2014
(r262643)
@@ -16,7 +16,16 @@ CFLAGS+= -DINET6
 
 WARNS?=0
 
-DPADD= ${LIBNCURSESW} ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
-LDADD= -lncursesw -lm -ldevstat -lkvm
+DPADD= ${LIBM} ${LIBDEVSTAT} ${LIBKVM}
+LDADD= -lm -ldevstat -lkvm
+
+.if ${MK_NCURSESW} == "no"
+DPADD+=${LIBNCURSES}
+LDADD+=-lncurses
+.else
+CFLAGS+=   -DUSE_WIDECHAR
+DPADD+=${LIBNCURSESW}
+LDADD+=-lncursesw
+.endif
 
 .include 

Modified: stable/10/usr.bin/systat/main.c
==
--- stable/10/usr.bin/systat/main.c Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/usr.bin/systat/main.c Sat Mar  1 03:09:16 2014
(r262643)
@@ -84,7 +84,11 @@ main(int argc, char **argv)
size_t  size;
double t;
 
+#ifdef USE_WIDECHAR
(void) setlocale(LC_ALL, "");
+#else
+   (void) setlocale(LC_TIME, "");
+#endif
 
argc--, argv++;
while (argc > 0) {

Modified: stable/10/usr.bin/vi/Makefile
==
--- stable/10/usr.bin/vi/Makefile   Sat Mar  1 02:57:22 2014
(r262642)
+++ stable/10/usr.bin/vi/Makefile   Sat Mar  1 03:09:16 2014
(r262643)
@@ -36,7 +36,7 @@ CFLAGS+=-I${.CURDIR} -I${SRCDIR} -I${SRC
 DPADD= ${LIBUTIL}
 LDADD= -lutil
 
-.if defined(RESCUE) || defined(RELEASE_CRUNCH)
+.if defined(RESCUE) || defined(RELEASE_CRUNCH) || ${MK_NCURSESW} == "no"
 DPADD+=${LIBNCURSES}
 LDADD+=-lncurses
 .else

Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile
==
--- stable/10/usr.sbin/bsdinstall/distextract/Makefile  Sat Mar  1 02:57:22 
2014(r262642)
+++ stable/10/usr.sbin/bsdinstall/distextract/Makefile  Sat Mar 

svn commit: r262644 - stable/10/tools/build/options

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 03:11:26 2014
New Revision: 262644
URL: http://svnweb.freebsd.org/changeset/base/262644

Log:
  MFC r261300:
  
  Add a missing options file.
  
  Sponsored by: DARPA, AFRL

Added:
  stable/10/tools/build/options/WITHOUT_NCURSESW
 - copied unchanged from r261300, head/tools/build/options/WITHOUT_NCURSESW
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/tools/build/options/WITHOUT_NCURSESW (from r261300, 
head/tools/build/options/WITHOUT_NCURSESW)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/tools/build/options/WITHOUT_NCURSESW  Sat Mar  1 03:11:26 
2014(r262644, copy of r261300, 
head/tools/build/options/WITHOUT_NCURSESW)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build or depend on the
+.Nm libncursesw
+library.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262648 - in stable/10/usr.sbin: mtree nmtree

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 03:39:56 2014
New Revision: 262648
URL: http://svnweb.freebsd.org/changeset/base/262648

Log:
  MFC: 261298
  Merge from CheriBSD:
  commit 70b8f0c127db6b80411789d237b403cc64a93573
  Author: Brooks Davis 
  Date:   Mon Jan 27 22:53:57 2014 +
  
Move mtree.5 to usr.sbin/nmtree.
Remove note that mtree 2.0 format files aren't supported.
  
  Sponsored by: DARPA, AFRL

Added:
  stable/10/usr.sbin/nmtree/mtree.5
 - copied unchanged from r261298, head/usr.sbin/nmtree/mtree.5
Deleted:
  stable/10/usr.sbin/mtree/mtree.5
Modified:
  stable/10/usr.sbin/mtree/Makefile
  stable/10/usr.sbin/nmtree/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/mtree/Makefile
==
--- stable/10/usr.sbin/mtree/Makefile   Sat Mar  1 03:36:46 2014
(r262647)
+++ stable/10/usr.sbin/mtree/Makefile   Sat Mar  1 03:39:56 2014
(r262648)
@@ -6,7 +6,7 @@
 .PATH: ${.CURDIR}/../../usr.bin/cksum
 
 PROG=  fmtree
-MAN=   fmtree.8 mtree.5
+MAN=   fmtree.8
 SRCS=  compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c
 SRCS+= specspec.c
 

Modified: stable/10/usr.sbin/nmtree/Makefile
==
--- stable/10/usr.sbin/nmtree/Makefile  Sat Mar  1 03:36:46 2014
(r262647)
+++ stable/10/usr.sbin/nmtree/Makefile  Sat Mar  1 03:39:56 2014
(r262648)
@@ -4,8 +4,8 @@
 
 .PATH: ${.CURDIR}/../../contrib/mtree
 
-PROG=  nmtree
-MAN=   nmtree.8
+PROG=  mtree
+MAN=   mtree.5 mtree.8
 SRCS=  compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \
only.c spec.c specspec.c verify.c
 LDADD+=-lmd -lutil

Copied: stable/10/usr.sbin/nmtree/mtree.5 (from r261298, 
head/usr.sbin/nmtree/mtree.5)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/usr.sbin/nmtree/mtree.5   Sat Mar  1 03:39:56 2014
(r262648, copy of r261298, head/usr.sbin/nmtree/mtree.5)
@@ -0,0 +1,264 @@
+.\" Copyright (c) 1989, 1990, 1993
+.\" The Regents of the University of California.  All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"may be used to endorse or promote products derived from this software
+.\"without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" From: @(#)mtree.8   8.2 (Berkeley) 12/11/93
+.\" $FreeBSD$
+.\"
+.Dd December 31, 2007
+.Dt MTREE 5
+.Os
+.Sh NAME
+.Nm mtree
+.Nd format of mtree dir hierarchy files
+.Sh DESCRIPTION
+The
+.Nm
+format is a textual format that describes a collection of filesystem objects.
+Such files are typically used to create or verify directory hierarchies.
+.Ss General Format
+An
+.Nm
+file consists of a series of lines, each providing information
+about a single filesystem object.
+Leading whitespace is always ignored.
+.Pp
+When encoding file or pathnames, any backslash character or
+character outside of the 95 printable ASCII characters must be
+encoded as a backslash followed by three
+octal digits.
+When reading mtree files, any appearance of a backslash
+followed by three octal digits should be converted into the
+corresponding character.
+.Pp
+Each line is interpreted independently as one of the following types:
+.Bl -tag -width Cm
+.It Si

svn commit: r262650 - in stable/10: share/mk tools/build/mk tools/build/options usr.sbin

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 04:25:52 2014
New Revision: 262650
URL: http://svnweb.freebsd.org/changeset/base/262650

Log:
  MFC r261299:
  
  Merge from CheriBSD:
  commit 2d581e8caf79d7a0f5a24590eccd06da90cccb74
  Author: Brooks Davis 
  Date:   Mon Jan 27 22:57:51 2014 +
  
Add WITHOUT_FMTREE to disable building fmtree.
  
  Sponsored by: DARPA, AFRL

Added:
  stable/10/tools/build/options/WITHOUT_FMTREE
 - copied unchanged from r261299, head/tools/build/options/WITHOUT_FMTREE
Modified:
  stable/10/share/mk/bsd.own.mk
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
  stable/10/usr.sbin/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/mk/bsd.own.mk
==
--- stable/10/share/mk/bsd.own.mk   Sat Mar  1 04:16:54 2014
(r262649)
+++ stable/10/share/mk/bsd.own.mk   Sat Mar  1 04:25:52 2014
(r262650)
@@ -274,6 +274,7 @@ __DEFAULT_YES_OPTIONS = \
 ED_CRYPTO \
 EXAMPLES \
 FLOPPY \
+FMTREE \
 FORMAT_EXTENSIONS \
 FORTH \
 FP_LIBC \

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Sat Mar  1 04:16:54 
2014(r262649)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Sat Mar  1 04:25:52 
2014(r262650)
@@ -630,6 +630,11 @@ OLD_FILES+=usr/bin/g++
 OLD_FILES+=usr/libexec/cc1plus
 .endif
 
+.if ${MK_FMTREE} == no
+OLD_FILES+=usr/sbin/fmtree
+OLD_FILES+=usr/share/man/man8/fmtree.8.gz
+.endif
+
 .if ${MK_GNUCXX} == no
 OLD_FILES+=usr/bin/g++
 OLD_FILES+=usr/include/c++/4.2/algorithm

Copied: stable/10/tools/build/options/WITHOUT_FMTREE (from r261299, 
head/tools/build/options/WITHOUT_FMTREE)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/tools/build/options/WITHOUT_FMTREESat Mar  1 04:25:52 
2014(r262650, copy of r261299, head/tools/build/options/WITHOUT_FMTREE)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to not build and install
+.Pa /usr/sbin/fmtree .

Modified: stable/10/usr.sbin/Makefile
==
--- stable/10/usr.sbin/Makefile Sat Mar  1 04:16:54 2014(r262649)
+++ stable/10/usr.sbin/Makefile Sat Mar  1 04:25:52 2014(r262650)
@@ -48,7 +48,7 @@ SUBDIR=   adduser \
mountd \
mptutil \
mtest \
-   mtree \
+   ${_mtree} \
newsyslog \
nfscbd \
nfsd \
@@ -142,6 +142,10 @@ SUBDIR+=   fdread
 SUBDIR+=   fdwrite
 .endif
 
+.if ${MK_FMTREE} != "no"
+SUBDIR+=   mtree
+.endif
+
 .if ${MK_FREEBSD_UPDATE} != "no"
 SUBDIR+=   freebsd-update
 .endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r262651 - stable/10/share/man/man5

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 04:44:33 2014
New Revision: 262651
URL: http://svnweb.freebsd.org/changeset/base/262651

Log:
  MFC r261301 (notional merge):
  
Regenerate for WITHOUT_FMTREE and WITHOUT_NCURSESW
  
  Large churn in comments due to regeneration with makeman script.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/10/share/man/man5/src.conf.5
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man5/src.conf.5
==
--- stable/10/share/man/man5/src.conf.5 Sat Mar  1 04:25:52 2014
(r262650)
+++ stable/10/share/man/man5/src.conf.5 Sat Mar  1 04:44:33 2014
(r262651)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 
07:22:04Z des
+.\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z 
des
 .\" $FreeBSD$
-.Dd January 27, 2014
+.Dd March 1, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -78,54 +78,54 @@ The following list provides a name and s
 that can be used for source builds.
 .Bl -tag -width indent
 .It Va WITHOUT_ACCT
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 
20:47:44Z ed
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 
20:47:44Z ed
 Set to not build process accounting tools such as
 .Xr accton 8
 and
 .Xr sa 8 .
 .It Va WITHOUT_ACPI
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 
07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 
07:50:50Z ru
 Set to not build
 .Xr acpiconf 8 ,
 .Xr acpidump 8
 and related programs.
 .It Va WITHOUT_AMD
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AMD 183242 2008-09-21 
22:02:26Z sam
+.\" from FreeBSD: head/tools/build/options/WITHOUT_AMD 183242 2008-09-21 
22:02:26Z sam
 Set to not build
 .Xr amd 8 ,
 and related programs.
 .It Va WITHOUT_APM
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_APM 183242 2008-09-21 
22:02:26Z sam
+.\" from FreeBSD: head/tools/build/options/WITHOUT_APM 183242 2008-09-21 
22:02:26Z sam
 Set to not build
 .Xr apm 8 ,
 .Xr apmd 8
 and related programs.
 .It Va WITHOUT_ARM_EABI
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ARM_EABI 253396 
2013-07-16 19:15:19Z andrew
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ARM_EABI 253396 2013-07-16 
19:15:19Z andrew
 Set the ARM ABI to OABI.
 .It Va WITHOUT_ASSERT_DEBUG
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 
2006-09-11 13:55:27Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 
2006-09-11 13:55:27Z ru
 Set to compile programs and libraries without the
 .Xr assert 3
 checks.
 .It Va WITHOUT_AT
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AT 183242 2008-09-21 
22:02:26Z sam
+.\" from FreeBSD: head/tools/build/options/WITHOUT_AT 183242 2008-09-21 
22:02:26Z sam
 Set to not build
 .Xr at 1
 and related utilities.
 .It Va WITHOUT_ATM
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ATM 156932 2006-03-21 
07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 
07:50:50Z ru
 Set to not build
 programs and libraries related to ATM networking.
 .It Va WITHOUT_AUDIT
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUDIT 156932 
2006-03-21 07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 
07:50:50Z ru
 Set to not build audit support into system programs.
 .It Va WITHOUT_AUTHPF
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 
2006-03-21 07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 
07:50:50Z ru
 Set to not build
 .Xr authpf 8 .
 .It Va WITHOUT_BINUTILS
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BINUTILS 255974 
2013-10-01 17:40:56Z emaste
+.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 
17:40:56Z emaste
 Set to not install binutils (as, c++-filt, gconv,
 ld, nm, objcopy, objdump, readelf, size and strip).
 .Bf -symbolic
@@ -133,10 +133,10 @@ The option does not generally work for b
 toolchain is enabled.
 .Ef
 .It Va WITHOUT_BLUETOOTH
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BLUETOOTH 156932 
2006-03-21 07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 
07:50:50Z ru
 Set to not build Bluetooth related kernel modules, programs and libraries.
 .It Va WITHOUT_BMAKE
-.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BMAKE 250839 
2013-05-21 00:41:49Z delphij
+.\" from FreeBSD: head/tools/build/options/WITHOUT_BMAKE 250839 2013-05-21 
00:41:49Z delphij
 Set to not build and install the portable BSD make (bmake) as
 .Xr make 1
 instead of the traditional FreeBSD make.
@@ -145,22 +145,22 @@ It allows developers to switch to bmake 
 kinks or issues.
 This option 

svn commit: r262652 - stable/10/tools/tools/makeroot

2014-02-28 Thread Brooks Davis
Author: brooks
Date: Sat Mar  1 04:49:55 2014
New Revision: 262652
URL: http://svnweb.freebsd.org/changeset/base/262652

Log:
  MFC r261302:
  
The -B flag is intended to take an argument.
  
Fix a couple typos in comments.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/10/tools/tools/makeroot/makeroot.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/tools/makeroot/makeroot.sh
==
--- stable/10/tools/tools/makeroot/makeroot.sh  Sat Mar  1 04:44:33 2014
(r262651)
+++ stable/10/tools/tools/makeroot/makeroot.sh  Sat Mar  1 04:49:55 2014
(r262652)
@@ -65,7 +65,7 @@ atexit()
 }
 
 DEBUG=
-# Allow duplice manifest entries when not file list is given because the
+# Allow duplicate manifest entries when not file list is given because the
 # FreeBSD METALOG still includes it.
 DUPFLAG=-D
 EXTRAS=
@@ -75,7 +75,7 @@ KEYDIR=
 KEYUSERS=
 PASSWD=
 
-while getopts "Bde:f:g:K:k:p:s:" opt; do
+while getopts "B:de:f:g:K:k:p:s:" opt; do
case "$opt" in
B)  BFLAG="-B ${OPTARG}" ;;
d)  DEBUG=1 ;;
@@ -174,7 +174,7 @@ else
/ type=/ { if ($1 != file) {print} }' >> ${manifest}
 fi
 
-# For each extras file, add contents kyes relative to the directory the
+# For each extras file, add contents keys relative to the directory the
 # manifest lives in for each file line that does not have one.  Adjust
 # contents keys relative to ./ to be relative to the same directory.
 for eman in ${EXTRAS}; do
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r262648 - in stable/10/usr.sbin: mtree nmtree

2014-03-03 Thread Brooks Davis
On Sat, Mar 01, 2014 at 02:02:32PM +0100, Tijl Coosemans wrote:
> On Sat, 1 Mar 2014 03:39:56 + (UTC) Brooks Davis wrote:
> > Author: brooks
> > Date: Sat Mar  1 03:39:56 2014
> > New Revision: 262648
> > URL: http://svnweb.freebsd.org/changeset/base/262648
> > 
> > Log:
> >   MFC: 261298
> >   Merge from CheriBSD:
> >   commit 70b8f0c127db6b80411789d237b403cc64a93573
> >   Author: Brooks Davis 
> >   Date:   Mon Jan 27 22:53:57 2014 +
> >   
> > Move mtree.5 to usr.sbin/nmtree.
> > Remove note that mtree 2.0 format files aren't supported.
> >   
> >   Sponsored by: DARPA, AFRL
> 
> This broke stable and caused a flood of tinderbox emails on stable@ so
> I've reverted this for now.
> 

Thank you and sorry about that.  I was pretty certain I did a full
buildworld with this change, but obviously not. :(

-- Brooks


pgpN7DCBg8vK7.pgp
Description: PGP signature


svn commit: r262717 - stable/10/sys/mips/mips

2014-03-03 Thread Brooks Davis
Author: brooks
Date: Mon Mar  3 20:28:27 2014
New Revision: 262717
URL: http://svnweb.freebsd.org/changeset/base/262717

Log:
  MFR r261294:
  
  Remove an unneeded space in the BERI merge.
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/10/sys/mips/mips/machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/mips/mips/machdep.c
==
--- stable/10/sys/mips/mips/machdep.c   Mon Mar  3 18:06:25 2014
(r262716)
+++ stable/10/sys/mips/mips/machdep.c   Mon Mar  3 20:28:27 2014
(r262717)
@@ -351,7 +351,7 @@ mips_vector_init(void)
 * XXXRW: Why don't we install the XTLB handler for all 64-bit
 * architectures?
 */
-#if defined(__mips_n64) || defined(CPU_RMI) || defined(CPU_NLM) || defined 
(CPU_BERI)
+#if defined(__mips_n64) || defined(CPU_RMI) || defined(CPU_NLM) || 
defined(CPU_BERI)
 /* Fake, but sufficient, for the 32-bit with 64-bit hardware addresses  */
bcopy(MipsTLBMiss, (void *)MIPS_XTLB_MISS_EXC_VEC,
  MipsTLBMissEnd - MipsTLBMiss);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


  1   2   3   4   5   6   7   8   9   10   >