Bug 4482 - NetBSD: cvs tests need more setup
Summary: NetBSD: cvs tests need more setup
Status: VERIFIED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 3.2.3
Hardware: All Other
: wish feature
Assignee: Thomas Klausner
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2014-12-25 12:06 UTC by Thomas Klausner
Modified: 2014-12-29 18:50 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments
Example patch removing directories (1.49 KB, patch)
2014-12-28 12:13 UTC, Thomas Klausner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Klausner 2014-12-25 12:06 UTC
On NetBSD, the cvs tests fail with:

+  cvs [init aborted]: init to an existing repository is restricted to members of the group cvsadmin


The cvs man page says:


        On unix, if there is a group named cvsadmin, only members of that group can run cvs admin commands, except for those specified using the UserAdminOptions configuration option in the CVSROOT/config file. Options specified using UserAdminOptions can be run by any user.  See node `config' in the CVS manual for more on UserAdminOptions.

        The cvsadmin group should exist on the server, or any system running the non-client/server cvs.  To disallow cvs admin for all users, create a group with no users in it.  On NT, the cvsadmin feature does not exist and all users can run cvs admin.


It seems that the description is not completely correct, since the error occurs even though there is no cvsadmin group.
Comment 1 Matt Mackall 2014-12-27 16:53 UTC
This check is in the "feature" branch of CVS, 1.12.13, last updated Oct 2005.

It's not in the "stable" branch, 1.11.23, last updated May 2008.

One draws the conclusion that CVS as a whole is abandoned and the feature branch doubly so.

This particular bug has also apparently existed on NetBSD for a while:

http://comments.gmane.org/gmane.os.netbsd.current/51309

Staring at the CVS source, it looks impossible, nor do there appear to be any NetBSD patches that impact it, but there you go. Unlikely to fix, you should probably just add a cvsadmin group and put yourself in it.
Comment 2 Thomas Klausner 2014-12-28 12:13 UTC
Created attachment 1798 [details]
Example patch removing directories
Comment 3 Thomas Klausner 2014-12-28 12:14 UTC
After some hinting I found out that the main problem is that cvs init does not like pre-existing directories. So removing the directory (or not creating it in the first place) fixes the tests on NetBSD.

Btw, when I tried to look at cvs 1.11 behaviour, I found that a random Linux to which I have access also comes with cvs-1.12 and is probably also affected.
Comment 4 Matt Mackall 2014-12-28 14:17 UTC
(I really need to wholly remove the "add an attachment" link.)
Comment 5 HG Bot 2014-12-29 17:45 UTC
Fixed by http://selenic.com/repo/hg/rev/96529f81e2e9
Thomas Klausner <tk@giga.or.at>
tests: run 'cvs init' only on non-existent directories (issue4482)

Do not create cvsroot directory since cvs-1.12 errors out
if CVSROOT exists before 'cvs init'.

(please test the fix)
Comment 6 Thomas Klausner 2014-12-29 18:50 UTC
Fixed on head, thanks!