From snabb@tiktik.epipe.com  Tue Aug 31 14:22:55 2010
Return-Path: <snabb@tiktik.epipe.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7137C10656AA;
	Tue, 31 Aug 2010 14:22:55 +0000 (UTC)
	(envelope-from snabb@tiktik.epipe.com)
Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:470:8940:10::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 3FA5D8FC13;
	Tue, 31 Aug 2010 14:22:55 +0000 (UTC)
Received: from tiktik.epipe.com (localhost [127.0.0.1])
	by tiktik.epipe.com (8.14.4/8.14.4) with ESMTP id o7VEMc0a069912
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 31 Aug 2010 14:22:41 GMT
	(envelope-from snabb@tiktik.epipe.com)
Received: (from snabb@localhost)
	by tiktik.epipe.com (8.14.4/8.14.4/Submit) id o7VEMbil069416;
	Tue, 31 Aug 2010 14:22:37 GMT
	(envelope-from snabb)
Message-Id: <201008311422.o7VEMbil069416@tiktik.epipe.com>
Date: Tue, 31 Aug 2010 14:22:37 GMT
From: Janne Snabb <snabb@epipe.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: gtodd@bellanet.org, rse@freebsd.org, snabb@epipe.com
Subject: [PATCH] sysutils/freebsd-snapshot: confusing warning message
X-Send-Pr-Version: 3.113
X-GNATS-Notify: gtodd@bellanet.org

>Number:         150150
>Category:       ports
>Synopsis:       [PATCH] sysutils/freebsd-snapshot: confusing warning message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bapt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 31 14:30:04 UTC 2010
>Closed-Date:    Fri Sep 03 15:11:14 UTC 2010
>Last-Modified:  Fri Sep  3 15:20:01 UTC 2010
>Originator:     Janne Snabb <snabb@epipe.com>
>Release:        FreeBSD 8.1-RELEASE i386
>Organization:
EPIPE Communications
>Environment:
System: FreeBSD tiktik.epipe.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sat Jul 24 09:20:35 UTC 2010
>Description:

When using "snapshot" command to "mount" or "visit" existing ufs
snapshots an useless and confusing warning message as follows is
always displayed:

WARNING: opening backing store: /usr/.snap/hourly.0 readonly

This warning message is emitted by mdconfig(8) when it is called
by the "snapshot" script.

This is irritating for example when freebsd-snapshot is being used
for making automated backups from cron(8) scripts because an un-needed
output is always generated even though there is no problem.

Port maintainer (gtodd@bellanet.org) as well as the upstream
(rse@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

# snapshot visit /usr:hourly.0
WARNING: opening backing store: /usr/.snap/hourly.0 readonly
# exit
# snapshot mount /usr:hourly.0 /mnt
WARNING: opening backing store: /usr/.snap/hourly.0 readonly
#

>Fix:

Add "-o readonly" to mdconfig(8) options, it prevents this warning
message from being displayed. This should not be a problem as
snapshots are by definition read-only.

The following patch is a bit funny because it patches an existing
patch file in the port.

--- freebsd-snapshot-20091208.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/freebsd-snapshot/files/patch-snapshot /usr/ports/sysutils/freebsd-snapshot.fix/files/patch-snapshot
--- /usr/ports/sysutils/freebsd-snapshot/files/patch-snapshot	2010-01-18 04:46:26.000000000 +0000
+++ /usr/ports/sysutils/freebsd-snapshot.fix/files/patch-snapshot	2010-08-31 14:01:27.000000000 +0000
@@ -1,5 +1,5 @@
---- ./snapshot.orig	2009-08-01 11:34:34.000000000 -0400
-+++ ./snapshot	2010-01-14 18:14:06.940846133 -0500
+--- snapshot.orig	2009-12-08 20:14:13.000000000 +0000
++++ snapshot	2010-08-31 13:50:34.000000000 +0000
 @@ -29,7 +29,9 @@
  ##
  
@@ -19,3 +19,12 @@
      if checkyesno zfs_enable; then \
          echo 'yes'; \
      else \
+@@ -491,7 +494,7 @@
+             echo "snapshot:ERROR: unable to create directory \"$mnt\"" 1>&2
+             exit 1
+         fi
+-        system mdconfig -a -t vnode -f $fs_dir/.snap/$fs_tag.$fs_gen -u $num
++        system mdconfig -a -t vnode -o readonly -f $fs_dir/.snap/$fs_tag.$fs_gen -u $num
+         if [ $? -ne 0 ]; then
+             echo "snapshot:ERROR: unable to attach \"$fs_dir/.snap/$fs_tag.$fs_gen\" to \"/dev/md$num\"" 1>&2
+             exit 1
--- freebsd-snapshot-20091208.1.patch ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Aug 31 14:30:17 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150150 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: gtodd@bellanet.org
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/150150: [PATCH] sysutils/freebsd-snapshot: confusing warning message
Date: Tue, 31 Aug 2010 14:30:13 UT

 Maintainer of sysutils/freebsd-snapshot,
 
 Please note that PR ports/150150 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/150150
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Graham Todd <gtodd@bellanet.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150150: [PATCH] sysutils/freebsd-snapshot: confusing warning
 message
Date: Thu, 02 Sep 2010 10:19:06 -0400

 On 08/31/10 10:30, Edwin Groothuis wrote:
 > Maintainer of sysutils/freebsd-snapshot,
 > 
 > Please note that PR ports/150150 has just been submitted.
 > 
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 > 
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/150150
 > 
 
 I approve this patch.
 
 Thanks for reporting, patching and improving this utility.
Responsible-Changed-From-To: freebsd-ports-bugs->bapt 
Responsible-Changed-By: bapt 
Responsible-Changed-When: Fri Sep 3 15:05:13 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150150 
State-Changed-From-To: feedback->closed 
State-Changed-By: bapt 
State-Changed-When: Fri Sep 3 15:11:13 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150150 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150150: commit references a PR
Date: Fri,  3 Sep 2010 15:11:12 +0000 (UTC)

 bapt        2010-09-03 15:11:01 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/freebsd-snapshot Makefile 
     sysutils/freebsd-snapshot/files patch-snapshot 
   Log:
   - Remove useless and confusing warning message
   - Bump portrevision
   
   PR:             ports/150150
   Submitted by:   Janne Snabb <snabb _at_ epipe.com>
   Approved by:    Graham Todd <gtodd _at_ bellanet.org> (maintainer)
   
   Revision  Changes    Path
   1.13      +1 -0      ports/sysutils/freebsd-snapshot/Makefile
   1.6       +11 -2     ports/sysutils/freebsd-snapshot/files/patch-snapshot
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
