From marck@woozle.rinet.ru  Sun Apr 22 08:04:25 2001
Return-Path: <marck@woozle.rinet.ru>
Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68])
	by hub.freebsd.org (Postfix) with ESMTP id 1008B37B422
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Apr 2001 08:04:24 -0700 (PDT)
	(envelope-from marck@woozle.rinet.ru)
Received: (from marck@localhost)
	by woozle.rinet.ru (8.11.2/8.11.2) id f3MF4He24480;
	Sun, 22 Apr 2001 19:04:17 +0400 (MSD)
	(envelope-from marck)
Message-Id: <200104221504.f3MF4He24480@woozle.rinet.ru>
Date: Sun, 22 Apr 2001 19:04:17 +0400 (MSD)
From: marck@rinet.ru
Reply-To: marck@rinet.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: cvs checkout bug with existing val-tags and readonlyfs
X-Send-Pr-Version: 3.2

>Number:         26771
>Category:       gnu
>Synopsis:       cvs checkout bug with existing val-tags and readonlyfs
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 22 08:10:03 PDT 2001
>Closed-Date:    Sat Nov 3 10:58:46 PST 2001
>Last-Modified:  Sat Nov 03 11:01:44 PST 2001
>Originator:     Dmitry Morozovsky <marck@rinet.ru>
>Release:        Various
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
	cvs versions at least 1.10, 1.11

>Description:

When:

- repository is readonly, and
- there is CVSROOT/val-tags file, and
- you try to check out tree with valid tag, and
- this tag is not exist in CVSROOT/val-tags file

cvs exits with an error such as:

[checkout aborted]: cannot write /.../CVSROOT/val-tags: Read-only file system


>How-To-Repeat:

See description.


>Fix:

Just do not try to modify val-tags when readonlyfs is set:
                                                          
Index: src/contrib/cvs/src/tag.c
===================================================================
RCS file: /pub/FreeBSD/ncvs/src/contrib/cvs/src/tag.c,v
retrieving revision 1.1.1.6.2.1
diff -u -r1.1.1.6.2.1 tag.c
--- src/contrib/cvs/src/tag.c   2000/10/31 09:37:58     1.1.1.6.2.1
+++ src/contrib/cvs/src/tag.c   2001/04/22 14:15:48                     
@@ -868,7 +868,8 @@
        /* The tags is valid but not mentioned in val-tags.  Add it.  */
        datum value;

-       if (noexec)
+       /* Do not try to add tags if our repository is read-only */
+       if (noexec || readonlyfs)
        {
            if (db != NULL)
                dbm_close (db);


>Release-Note:
>Audit-Trail:

From: Dmitry Morozovsky <marck@rinet.ru>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: gnu/26771: cvs checkout bug with existing val-tags and readonlyfs
Date: Sun, 22 Apr 2001 19:54:08 +0400 (MSD)

 Addition: the example of checkout sequence may be
 
 mount -r /pub		<- directory with FreeBSD repository
 cvs -R -d /pub/FreeBSD/ncvs checkout -P -r RELENG_4_3_0_RELEASE src
 
 Sincerely,
 D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
 ------------------------------------------------------------------------
 *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
 ------------------------------------------------------------------------
 

From: marck@rinet.ru
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: gnu/26771: cvs checkout bug with existing val-tags and readonlyfs
Date: Sun, 22 Apr 2001 19:04:17 +0400 (MSD)

 >Number:         26771
 >Category:       gnu
 >Synopsis:       cvs checkout bug with existing val-tags and readonlyfs
 >Confidential:   no
 >Severity:       serious
 >Priority:       high
 >Responsible:    freebsd-bugs
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          sw-bug
 >Submitter-Id:   current-users
 >Arrival-Date:   Sun Apr 22 08:10:03 PDT 2001
 >Closed-Date:
 >Last-Modified:
 >Originator:     Dmitry Morozovsky <marck@rinet.ru>
 >Release:        Various
 >Organization:
 Cronyx Plus LLC (RiNet ISP)
 >Environment:
 	cvs versions at least 1.10, 1.11
 
 >Description:
 
 When:
 
 - repository is readonly, and
 - there is CVSROOT/val-tags file, and
 - you try to check out tree with valid tag, and
 - this tag is not exist in CVSROOT/val-tags file
 
 cvs exits with an error such as:
 
 [checkout aborted]: cannot write /.../CVSROOT/val-tags: Read-only file system
 
 
 >How-To-Repeat:
 
 See description.
 
 
 >Fix:
 
 Just do not try to modify val-tags when readonlyfs is set:
                                                           
 Index: src/contrib/cvs/src/tag.c
 ===================================================================
 RCS file: /pub/FreeBSD/ncvs/src/contrib/cvs/src/tag.c,v
 retrieving revision 1.1.1.6.2.1
 diff -u -r1.1.1.6.2.1 tag.c
 --- src/contrib/cvs/src/tag.c   2000/10/31 09:37:58     1.1.1.6.2.1
 +++ src/contrib/cvs/src/tag.c   2001/04/22 14:15:48                     
 @@ -868,7 +868,8 @@
         /* The tags is valid but not mentioned in val-tags.  Add it.  */
         datum value;
 
 -       if (noexec)
 +       /* Do not try to add tags if our repository is read-only */
 +       if (noexec || readonlyfs)
         {
             if (db != NULL)
                 dbm_close (db);
 
 
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-bugs" in the body of the message
State-Changed-From-To: open->analyzed 
State-Changed-By: asmodai 
State-Changed-When: Tue Jul 31 09:32:37 PDT 2001 
State-Changed-Why:  
This patch is present in cvs 1.11.1p1 from http://www.cvshome.org/ 

I am currently discussing importing the new version. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26771 
State-Changed-From-To: analyzed->closed 
State-Changed-By: asmodai 
State-Changed-When: Sat Nov 3 10:58:46 PST 2001 
State-Changed-Why:  
Peter Wemm imported this version 1.11.1p1 in CURRENT and MFC'd it  
to STABLE. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26771 
>Unformatted:
