From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 31 14:30:05 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9BAA1065670 for ; Tue, 31 Aug 2010 14:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7C42F8FC2D for ; Tue, 31 Aug 2010 14:30:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7VEU5lq086181 for ; Tue, 31 Aug 2010 14:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7VEU540086176; Tue, 31 Aug 2010 14:30:05 GMT (envelope-from gnats) Resent-Date: Tue, 31 Aug 2010 14:30:05 GMT Resent-Message-Id: <201008311430.o7VEU540086176@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Janne Snabb 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: snabb@epipe.com, rse@FreeBSD.org, gtodd@bellanet.org Subject: ports/150150: [PATCH] sysutils/freebsd-snapshot: confusing warning message X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 14:30:05 -0000 >Number: 150150 >Category: ports >Synopsis: [PATCH] sysutils/freebsd-snapshot: confusing warning message >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 31 14:30:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Janne Snabb >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: >Unformatted: