Re: kern/151194: make delete-old "Syntax error"

2010-10-24 Thread Ivan Klymenko
The following reply was made to PR kern/151194; it has been noted by GNATS.

From: Ivan Klymenko 
To: bug-follo...@freebsd.org, fi...@ukr.net
Cc:  
Subject: Re: kern/151194: make delete-old "Syntax error"
Date: Sun, 24 Oct 2010 11:13:21 +0300

 >By:   arundel
 >When: Sun Oct 24 02:39:09 UTC 2010
 >Why:  Close this PR, since it's very likely that the issue has
 >either been fixed or the user had some kind of file corruption
 >in /usr/src 
 no.
 problem remains to this moment.
 
 r214124
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/151681: NFS mount via IPv6 leads to hang on client with "ipfw: pullup failed"

2010-10-24 Thread Martin Birgmeier

>Number: 151681
>Category:   kern
>Synopsis:   NFS mount via IPv6 leads to hang on client with "ipfw: pullup 
>failed"
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 11:10:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Martin Birgmeier
>Release:client: 7.3, server: 8.1
>Organization:
MBi at home
>Environment:
FreeBSD gandalf.xyzzy 7.3-RELEASE-p3 FreeBSD 7.3-RELEASE-p3 #2: Sat Oct 16 
08:55:47 CEST 2010 
r...@gandalf.xyzzy:/d/14.1/OBJ/FreeBSD/RELENG_7_3/src/sys/XYZZY  i386
>Description:
Scenario:
- The client runs RELENG_7_3
- The server runs RELENG_8_1_0_RELEASE
- All machines are fully configured for dual IPv4/IPv6 operation
- The server exports zfs volumes both via IPv4 and IPv6
- The client mounts from the server via IPv6

Error:
- After only a few operations, the client hangs, with messages "ipfw: pullup 
failed" on the console

Resolution:
- The hang can only be resolved by a reboot of the client.

This hang does not occur if the mount is done via IPv4.

>How-To-Repeat:
Repeat the scenario above, and do NFS operations from the client to the server.

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/151681: [nfs] NFS mount via IPv6 leads to hang on client with "ipfw: pullup failed"

2010-10-24 Thread linimon
Old Synopsis: NFS mount via IPv6 leads to hang on client with "ipfw: pullup 
failed"
New Synopsis: [nfs] NFS mount via IPv6 leads to hang on client with "ipfw: 
pullup failed"

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Oct 24 11:18:57 UTC 2010
Responsible-Changed-Why: 
Sounds like something in the networking layer.

http://www.freebsd.org/cgi/query-pr.cgi?pr=151681
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/151605: RE:Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't work

2010-10-24 Thread linimon
Old Synopsis: 
New Synopsis: RE:Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't 
work

State-Changed-From-To: open->closed
State-Changed-By: linimon
State-Changed-When: Sun Oct 24 11:33:50 UTC 2010
State-Changed-Why: 
Duplicate of kern/151604.


Responsible-Changed-From-To: gnats-admin->freebsd-bugs
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Oct 24 11:33:50 UTC 2010
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151605
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/151604: Re: Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't work

2010-10-24 Thread linimon
Old Synopsis: RE:Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't 
work
New Synopsis: Re: Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't 
work

State-Changed-From-To: open->closed
State-Changed-By: linimon
State-Changed-When: Sun Oct 24 11:34:50 UTC 2010
State-Changed-Why: 
Misfiled followup to kern/115623; content migrated.


Responsible-Changed-From-To: gnats-admin->freebsd-bugs
Responsible-Changed-By: linimon
Responsible-Changed-When: Sun Oct 24 11:34:50 UTC 2010
Responsible-Changed-Why: 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151604
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/151194: make delete-old "Syntax error"

2010-10-24 Thread jilles
Synopsis: make delete-old "Syntax error"

State-Changed-From-To: closed->feedback
State-Changed-By: jilles
State-Changed-When: Sun Oct 24 15:05:06 UTC 2010
State-Changed-Why: 
Please rerun make with -dl (e.g. make -dl delete-old)
and make the full (long) output available.
Also check /etc/make.conf and /etc/src.conf for unmatched quotes.


Responsible-Changed-From-To: freebsd-bugs->jilles
Responsible-Changed-By: jilles
Responsible-Changed-When: Sun Oct 24 15:05:06 UTC 2010
Responsible-Changed-Why: 
Track.

http://www.freebsd.org/cgi/query-pr.cgi?pr=151194
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: kern/140752: commit references a PR

2010-10-24 Thread dfilter service
The following reply was made to PR kern/140752; it has been noted by GNATS.

From: dfil...@freebsd.org (dfilter service)
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: kern/140752: commit references a PR
Date: Sun, 24 Oct 2010 16:32:04 + (UTC)

 Author: brucec
 Date: Sun Oct 24 16:31:57 2010
 New Revision: 214279
 URL: http://svn.freebsd.org/changeset/base/214279
 
 Log:
   Mostly revert r203420, and add similar functionality into ada(4) since the
   existing code caused problems with some SCSI controllers.
   
   A new sysctl kern.cam.ada.spindown_shutdown has been added that controls
   whether or not to spin-down disks when shutting down.
   Spinning down the disks unloads/parks the heads - this is
   much better than removing power when the disk is still
   spinning because otherwise an Emergency Unload occurs which may cause damage
   to the actuator.
   
   PR:  kern/140752
   Submitted by:   olli
   Reviewed by: arundel
   Discussed with: mav
   MFC after:   2 weeks
 
 Modified:
   head/share/man/man4/ada.4
   head/sys/cam/ata/ata_da.c
   head/sys/cam/cam_xpt.c
   head/sys/kern/kern_shutdown.c
 
 Modified: head/share/man/man4/ada.4
 ==
 --- head/share/man/man4/ada.4  Sun Oct 24 16:10:32 2010(r214278)
 +++ head/share/man/man4/ada.4  Sun Oct 24 16:31:57 2010(r214279)
 @@ -118,6 +118,9 @@ This variable determines how long the
  driver will wait before timing out an outstanding command.
  The units for this value are seconds, and the default is currently 30
  seconds.
 +.It kern.cam.ada.spindown_shutdown
 +.Pp
 +This variable determines whether to spin-down disks when shutting down.
  .El
  .Sh FILES
  .Bl -tag -width ".Pa /dev/ada*" -compact
 
 Modified: head/sys/cam/ata/ata_da.c
 ==
 --- head/sys/cam/ata/ata_da.c  Sun Oct 24 16:10:32 2010(r214278)
 +++ head/sys/cam/ata/ata_da.c  Sun Oct 24 16:31:57 2010(r214279)
 @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
  #include 
  #include 
  #include 
 +#include 
  #include 
  #endif /* _KERNEL */
  
 @@ -79,7 +80,8 @@ typedef enum {
ADA_FLAG_CAN_TRIM   = 0x080,
ADA_FLAG_OPEN   = 0x100,
ADA_FLAG_SCTX_INIT  = 0x200,
 -  ADA_FLAG_CAN_CFA= 0x400
 +  ADA_FLAG_CAN_CFA= 0x400,
 +  ADA_FLAG_CAN_POWERMGT   = 0x800
  } ada_flags;
  
  typedef enum {
 @@ -180,6 +182,10 @@ static void   adashutdown(void *arg, int 
  #define   ADA_DEFAULT_SEND_ORDERED1
  #endif
  
 +#ifndef   ADA_DEFAULT_SPINDOWN_SHUTDOWN
 +#define   ADA_DEFAULT_SPINDOWN_SHUTDOWN   1
 +#endif
 +
  /*
   * Most platforms map firmware geometry to actual, but some don't.  If
   * not overridden, default to nothing.
 @@ -191,6 +197,7 @@ static voidadashutdown(void *arg, int 
  static int ada_retry_count = ADA_DEFAULT_RETRY;
  static int ada_default_timeout = ADA_DEFAULT_TIMEOUT;
  static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED;
 +static int ada_spindown_shutdown = ADA_DEFAULT_SPINDOWN_SHUTDOWN;
  
  SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0,
  "CAM Direct Access Disk driver");
 @@ -203,6 +210,9 @@ TUNABLE_INT("kern.cam.ada.default_timeou
  SYSCTL_INT(_kern_cam_ada, OID_AUTO, ada_send_ordered, CTLFLAG_RW,
 &ada_send_ordered, 0, "Send Ordered Tags");
  TUNABLE_INT("kern.cam.ada.ada_send_ordered", &ada_send_ordered);
 +SYSCTL_INT(_kern_cam_ada, OID_AUTO, spindown_shutdown, CTLFLAG_RW,
 +   &ada_spindown_shutdown, 0, "Spin down upon shutdown");
 +TUNABLE_INT("kern.cam.ada.spindown_shutdown", &ada_spindown_shutdown);
  
  /*
   * ADA_ORDEREDTAG_INTERVAL determines how often, relative
 @@ -665,6 +675,8 @@ adaregister(struct cam_periph *periph, v
softc->flags |= ADA_FLAG_CAN_48BIT;
if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
softc->flags |= ADA_FLAG_CAN_FLUSHCACHE;
 +  if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT)
 +  softc->flags |= ADA_FLAG_CAN_POWERMGT;
if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
cgd->inq_flags & SID_CmdQue)
softc->flags |= ADA_FLAG_CAN_NCQ;
 @@ -1227,6 +1239,56 @@ adashutdown(void * arg, int howto)
 /*getcount_only*/0);
cam_periph_unlock(periph);
}
 +
 +  if (ada_spindown_shutdown == 0 ||
 +  (howto & (RB_HALT | RB_POWEROFF)) == 0)
 +  return;
 +
 +  TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
 +  union ccb ccb;
 +
 +  /* If we paniced with lock held - not recurse here. */
 +  if (cam_periph_owned(periph))
 +  continue;
 +  cam_periph_lock(periph);
 +  softc = (struct ada_softc *)periph->softc;
 +  /*
 +   * We 

misc/151695: [nanobsd] [patch] Enhance tools/nanobsd/fill_pkg.sh

2010-10-24 Thread Lev Serebryakov

>Number: 151695
>Category:   misc
>Synopsis:   [nanobsd] [patch] Enhance tools/nanobsd/fill_pkg.sh
>Confidential:   no
>Severity:   non-critical
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 18:30:11 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Lev Serebryakov
>Release:FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD vmware-8-32.home.serebryakov.spb.ru 8.1-STABLE FreeBSD 
8.1-STABLE #1: Wed Oct 20 18:55:10 MSD 2010 
r...@vmware-8-32.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/GENERIC i386

>Description:

  NanoBSD has helper script "fill_pkg.sh" which links all packages and ther 
dependencies from "package dump" (like /usr/ports/packages/All) to specified 
directory.
  But "fill_pkg.sh" has some limitations:
  (1) It needs ports tree, which should have exactly same versions as "package 
dump".
  (2) It requires full paths to needed ports, including "/usr/ports" part.
  (3) It has assumptions about Nano Package Dir (it assumes, that it specified 
rtelative to current directory).
  (4) It does not have any diagnostics (almost).

  This PR enhances "fill_pkg.sh" script in several ways:

  (1) Nano package dir could be absolute path.
  (2) Script understands four ways to specify "root" ports/packages:
 (a) Absolute directory with port (old one)
 (b) Relative directory with port, relative to ${PORTSDIR} or /usr/ports
 (c) Absolute path to file with package (with .tbz suffix)
 (d) Name of package in dump dir, with or without .tbz suffix

 These ways can be mixed in one call. Dependencies for
 packages are obtained with 'pkg_info -r' call, and are searched for
 in same directory as "parent" package. Dependencies for ports are
 obtained in old way from port's Makefile.
  (3) Three levels of diagnostic (and -v option, could be repeated) are added.
  (4) All path variables are enclosed in quotes, to make script work with paths,
  containing spaces.

   As changes are massive, I attach new version of script iteslf, not
   patch/diff output.

>How-To-Repeat:
>Fix:
#!/bin/sh
#
# Copyright (c) 2010 Lev Serebryakov.
# Copyright (c) 2009 Poul-Henning Kamp.
# 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: src/tools/tools/nanobsd/fill_pkg.sh,v 1.1.2.1 2009/08/03 08:13:06 
kensmith Exp $
#
# Usage:
#   $0 PACKAGE_DUMP NANO_PACKAGE_DIR /usr/ports/foo/bar [package.tbz]...
#
# Will symlink the packages listed, including their runtime dependencies,
# from the PACKAGE_DUMP to the NANO_PACKAGE_DIR.
#

: ${PORTSDIR:=/usr/ports}

usage () {
echo "Usage: $0 [-v] package-dump-dir nano-package-dir port-dir-or-pkg 
..." 1>&2
exit 2
}

msg () {
local l=$1
shift
[ "$l" -le "$VERBOSE" ] && echo $*
}

ports_recurse() (
local outputfile=$1
shift
local dumpdir=$1
shift
local type
local fullpath
for p
do
if [ -d "$p" -a -f "$p/Makefile" ] ; then
msg 3 "$p: full path to port"
PKGNAME=`cd "$p" && make -V PKGNAME`
type=port
fullpath=$p
elif [ -d "${PORTSDIR}/$p" -a -f "${PORTSDIR}/$p/Makefile" ] ; 
then
msg 3 "$p: path to port relative to ${PORTSDIR}}"
PKGNAME=`cd "${PORTSDIR}/$p" && make -V PKGNAME`
type=port
fullpath=${PORTSDIR}/$p
elif [ "${p%.tbz}" != "$p" -a -f "$p" ] && pkg_info "$p" > 
/dev/null 2>&1 ; t

misc/151697: [nanobsd] [patch] nanobsd.sh copy links to packages as links to chrooted environment

2010-10-24 Thread Lev Serebryakov

>Number: 151697
>Category:   misc
>Synopsis:   [nanobsd] [patch] nanobsd.sh copy links to packages as links 
>to chrooted environment
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 18:40:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Lev Serebryakov
>Release:FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD vmware-8-32.home.serebryakov.spb.ru 8.1-STABLE FreeBSD 
8.1-STABLE #1: Wed Oct 20 18:55:10 MSD 2010 
r...@vmware-8-32.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/GENERIC i386

>Description:

  "cust_pkg" function in nanobsd.sh script copy all packages from configured 
directory to nanobsd world ands chroot to this world dir.
  It uses "cpio" with options, whcih istructs cpio to copy symlinks as symlinks.
  Typical way to populate package directory is fill_pkg.sh script, whcih 
populates Pkg directory with symlinks.
  cust_pkg copies these links, and after chroot all symlinks becomes invalid.
  This patch adds "-L" option to "cpio" call to copy real files, not symlinks, 
to chroot environment.

>How-To-Repeat:

  Populate "nanobsd/Pkg" directory with help from fill_pkg.sh, try to install 
these packages via "customize_cmd cust_pkg" command in nanobsd.sh config file.

>Fix:
--- nanobsd.sh.orig 2010-10-24 22:20:07.0 +0400
+++ nanobsd.sh.bugfix.pkg   2010-10-24 22:15:56.0 +0400
@@ -641,7 +641,7 @@
(
cd ${NANO_PACKAGE_DIR}
find ${NANO_PACKAGE_LIST} -print |
-   cpio -dumpv ${NANO_WORLDDIR}/Pkg
+   cpio -Ldumpv ${NANO_WORLDDIR}/Pkg
)
 
# Count & report how many we have to install
>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


misc/151696: [nanobsd] [patch] nanobsd.sh doesn't run "make_conf_build" if world build is supressed and kernel build is not

2010-10-24 Thread Lev Serebryakov

>Number: 151696
>Category:   misc
>Synopsis:   [nanobsd] [patch] nanobsd.sh doesn't run "make_conf_build" if 
>world build is supressed and kernel build is not
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 18:40:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Lev Serebryakov
>Release:FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD vmware-8-32.home.serebryakov.spb.ru 8.1-STABLE FreeBSD 
8.1-STABLE #1: Wed Oct 20 18:55:10 MSD 2010 
r...@vmware-8-32.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/GENERIC i386

>Description:

   nanobsd.sh doesn't create build make.conf if world build is supressed (-w 
option) and kernel build is required.

>How-To-Repeat:

  Make full run of nanobsd.sh, remove make.conf.build, run "nanobsd.sh -w" to 
rebuild kernel.

>Fix:
--- nanobsd.sh.orig 2010-10-24 22:20:07.0 +0400
+++ nanobsd.sh.bugfix.cfg   2010-10-24 22:16:37.0 +0400
@@ -867,6 +867,9 @@
 fi
 
 if $do_kernel ; then
+   if ! $do_world ; then
+   make_conf_build
+   fi
build_kernel
 else
pprint 2 "Skipping buildkernel (as instructed)"
>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


misc/151698: [nanobsd] [patch] Add two new options to nanobsd.sh to make rebuilds faster

2010-10-24 Thread Lev Serebryakov

>Number: 151698
>Category:   misc
>Synopsis:   [nanobsd] [patch] Add two new options to nanobsd.sh to make 
>rebuilds faster
>Confidential:   no
>Severity:   serious
>Priority:   medium
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 24 18:40:10 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Lev Serebryakov
>Release:FreeBSD 8.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD vmware-8-32.home.serebryakov.spb.ru 8.1-STABLE FreeBSD 
8.1-STABLE #1: Wed Oct 20 18:55:10 MSD 2010 
r...@vmware-8-32.home.serebryakov.spb.ru:/usr/obj/usr/src/sys/GENERIC i386

>Description:

  This patch adds two new options to nanobsd.sh:

  -f ([f]ast) options supress of extraction of CODE slice (s1) from final 
image. If you need full image to prepare new device, you don't need separate 
file with CODE slice, and this otions saves lots of time.
  -z ([z]ap) option works only if NANO_MD_BACKING=file and supresses creation 
of image file from "/dev/zero". It zeroes out two first cylinders of EXISTENT 
image file, left from previous runs. If image file is absent or has wrong size, 
process stops.

  These two options, when used together, make experiments with creating NanoBSD 
images MUCH faster even on modern hardware.

>How-To-Repeat:

>Fix:
--- nanobsd.sh.orig 2010-10-24 22:20:07.0 +0400
+++ nanobsd.sh.faster   2010-10-24 22:22:28.0 +0400
@@ -466,9 +466,20 @@
MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \
-y ${NANO_HEADS}`
else
-   echo "Creating md backing file..."
-   dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \
-   count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}`
+   if $do_create_md_file || ! [ -f ${IMG} ] ; then
+   echo "Creating md backing file..."
+   dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \
+   count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}`
+   else
+   echo "Check & zap md backing file..."
+   MD_SIZE=`stat -f '%z' ${IMG}`
+   MD_SIZE=$(( ${MDSIZE} / 512 ))
+   if [ "${MD_SIZE}" != "${NANO_MEDIASIZE}" ] ; then
+   echo "Invalid ${IMG} size (found ${MD_SIZE} 
sectors, need ${NANO_MEDIASIZE})"
+   exit 1
+   fi
+   dd if=/dev/zero of=${IMG} bs=1024 count=`expr 
${NANO_SECTS} '*' ${NANO_HEADS}` conv=notrunc
+   fi
MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \
-y ${NANO_HEADS}`
fi
@@ -521,8 +532,10 @@
dd if=/dev/${MD} of=${IMG} bs=64k
fi
 
-   echo "Writing out _.disk.image..."
-   dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+   if do_copyout_partition ; then
+   echo "Writing out _.disk.image..."
+   dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+   fi
mdconfig -d -u $MD
 
trap - 1 2 15 EXIT
@@ -712,14 +725,16 @@
 
 usage () {
(
-   echo "Usage: $0 [-biknqvw] [-c config_file]"
+   echo "Usage: $0 [-bfiknqvwz] [-c config_file]"
echo "  -b  suppress builds (both kernel and world)"
+   echo "  -f  suppress code slice extraction"
echo "  -i  suppress disk image build"
echo "  -k  suppress buildkernel"
echo "  -n  add -DNO_CLEAN to buildworld, buildkernel, etc"
echo "  -q  make output more quiet"
echo "  -v  make output more verbose"
echo "  -w  suppress buildworld"
+   echo "  -z  use existing disk image instead creating new one"
echo "  -c  specify config file"
) 1>&2
exit 2
@@ -732,9 +747,11 @@
 do_kernel=true
 do_world=true
 do_image=true
+do_create_md_file=true
+do_copyout_partition=true
 
 set +e
-args=`getopt bc:hiknqvw $*`
+args=`getopt bc:fhiknqvwz $*`
 if [ $? -ne 0 ] ; then
usage
exit 2
@@ -760,6 +777,10 @@
shift
shift
;;
+   -f)
+   do_copyout_partition=false
+   shift
+   ;;
-h)
usage
;;
@@ -783,6 +804,10 @@
do_world=false
shift
;;
+   -z)
+   do_create_md_file=true
+   shift
+   ;;
--)
shift
break
>Release-Note:
>Audit-Trail:
>Unformatted:
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org

Re: misc/151695: [nanobsd] [patch] Enhance tools/nanobsd/fill_pkg.sh

2010-10-24 Thread lev
Synopsis: [nanobsd] [patch] Enhance tools/nanobsd/fill_pkg.sh

Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded
Responsible-Changed-By: lev
Responsible-Changed-When: Sun Oct 24 18:46:01 UTC 2010
Responsible-Changed-Why: 

  Over to maintainer(s)


http://www.freebsd.org/cgi/query-pr.cgi?pr=151695
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: misc/151696: [nanobsd] [patch] nanobsd.sh doesn't run "make_conf_build" if world build is supressed and kernel build is not

2010-10-24 Thread lev
Synopsis: [nanobsd] [patch] nanobsd.sh doesn't run "make_conf_build" if world 
build is supressed and kernel build is not

Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded
Responsible-Changed-By: lev
Responsible-Changed-When: Sun Oct 24 18:46:01 UTC 2010
Responsible-Changed-Why: 

 Over to maintainer(s).


http://www.freebsd.org/cgi/query-pr.cgi?pr=151696
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: misc/151697: [nanobsd] [patch] nanobsd.sh copy links to packages as links to chrooted environment

2010-10-24 Thread lev
Synopsis: [nanobsd] [patch] nanobsd.sh copy links to packages as links to 
chrooted environment

Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded
Responsible-Changed-By: lev
Responsible-Changed-When: Sun Oct 24 18:46:01 UTC 2010
Responsible-Changed-Why: 

Over to maintainer(s).


http://www.freebsd.org/cgi/query-pr.cgi?pr=151697
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


Re: misc/151698: [nanobsd] [patch] Add two new options to nanobsd.sh to make rebuilds faster

2010-10-24 Thread lev
Synopsis: [nanobsd] [patch] Add two new options to nanobsd.sh to make rebuilds 
faster

Responsible-Changed-From-To: freebsd-bugs->freebsd-embedded
Responsible-Changed-By: lev
Responsible-Changed-When: Sun Oct 24 18:46:01 UTC 2010
Responsible-Changed-Why: 

 Over to maintainer(s).


http://www.freebsd.org/cgi/query-pr.cgi?pr=151698
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"