Migration of Gentoo Repositories from CVS to Subversion. ======================================================== * Interested Parties: mail to: klieber, CC to: pylon, robbat2, trapni (that is me) (and maybe: absinthe - as he was doing the study AFAIK) * Prerequirements: * make sure, client side and server side repositories does not require to much disc space. * make sure performance is really better than (or equal to) CVS. * create an ebuild dev-utils/cvs2svn as it isn't done yet. DL URL: http://cvs2svn.tigris.org/files/documents/1462/16792/cvs2svn-1.1.0.tar.gz DEPEND="app-text/rcs" * Convert the Repository: $ emerge -pv cvs2svn # will install rcs if not yet done $ emerge -v cvs2svn $ mkdir /var/db/svn $ cd /var/cvsroot $ cvs2svn -s /var/db/svn/gentoo-x86 gentoo-x86 in case cvs2svn aborts because of errors in pass 1, fix them by hand and resume at pass 2 $ cvs2svn -p2 -s /var/db/svn/gentoo-x86 gentoo-x86 Such an error maybe is: "ERROR: A CVS repository cannot contain both repos/foo,v and repos/Attic/foo,v" In this case, just remove the "repos/Attic/foo,v" or merge by hand. This error occurs ONLY when cvs admin had done some hand editing on cvsroot (I got told so on IRC) The whole conversion process took me up to 20 hours on my AMD AthlonXP 2800+ with 1GB RAM; *** Results ************************ Well, okay, while the CVS tree just needs 1GB, the SVN tree even needs 2.9GB with fs type bdb. So, lets see how fs type fsfs goes then. This bdb -> fsfs "fs-type" conversion may took me some hours, too. ... *** server side disk usage ********* du -ckhs /var/db/svn/* 2.9G portage-gentoo-x86-bdb 2.0G portage-gentoo-x86-fsfs *** svn checkout timings *********** svn co svn+ssh://trapni@subversion.trapni-akane.org/var/db/svn/portage-gentoo-x86-fsfs/trunk real 53m7.635s user 5m57.373s sys 2m10.571s cvs co gentoo-x86 real 8m47.846s user 0m31.121s sys 1m1.356s see testing svn repositories: * http://subversion.trapni-akane.org/cgi-bin/viewcvs.cgi/?root=portage-gentoo-x86-bdb with BDB fs backend type (complete conversion) * http://subversion.trapni-akane.org/cgi-bin/viewcvs.cgi/?root=portage-gentoo-x86-fsfs with FSFS fs backend type (complete conversion) * Anonymous Repository Access: * This is possible via Apache2 modules mod_dav_svn and mod_umask. * svn:// URL scheme supports anon access, too. But it's questionable wether it's required though and reslly a good advice to provide this, too. * Developer Repository Write Access: * either via svn+ssh:// * via http:// and https:// using following apache2 modules: * mod_dav_svn * mod_umask - to allow svn+ssh:// as well * mod_auth_pam - to auth against PAM accounts (and maybe install a pre-commit hook in order to allow ACL based commits) * post changes of 3rd level tools: * repoman: must understand local svn repositories * IRC Bot (CIA-10): needs to be notified via svn post-commit hook on new commits; CIA-5 on #cvs2svn does obviousely do this for svn, so there must already be a solution for this * Howto's needs talk about svn instead of cvs then, too ;) * create backup scripts (using svn hotcopy) * ... * IRC NOTES: 15:46 < trapni> btw, there's no option to like --fs-type in cvs2svn to pass :( 15:47 <@bliss> trapni: trunk has it. for older versions create it using svnadmin and pass --existing-repos to cvs2svn * online references good to know about: * http://www.erenkrantz.com/oscon/OSCON%202003%20Apache%20HTTP%20Authentication.pdf (apache authentification) * http://sam.zoy.org/writings/programming/svn2cvs.html (contains good script excerpts on how to set svn:ignore and svn:keywords on a whole repository at once) * https://moin.conectiva.com.br/RepositorySystem * http://subversion.tigris.org/propaganda.htm ==== TIMINGS ==== $ cvs2svn -s svnroot/gentoo-projects cvsroot/gentoo-projects .... pass 1: 32 seconds pass 2: 0 seconds pass 3: 0 seconds pass 4: 1 second pass 5: 2 seconds pass 6: 0 seconds pass 7: 0 seconds pass 8: 187 seconds total: 224 seconds $ cvs2svn -s svnroot/gentoo-src cvsroot/gentoo-src .... pass 1: 29 seconds pass 2: 2 seconds pass 3: 0 seconds pass 4: 6 seconds pass 5: 15 seconds pass 6: 0 seconds pass 7: 0 seconds pass 8: 1329 seconds total: 1383 seconds Though, the following modules migrated w/o any problems gentoo-projects, gentoo-src ==== gentoo-x86 conversion errors ===== Error summary: ERROR: A CVS repository cannot contain both cvsroot/gentoo-x86/gnome-extra/users-guide/users-guide-1.2.ebuild,v and cvsroot/gentoo-x86/gnome-extra/users-guide/Attic/users-guide-1.2.ebuild,v ERROR: A CVS repository cannot contain both cvsroot/gentoo-x86/gnome-extra/users-guide/files/digest-users-guide-1.2,v and cvsroot/gentoo-x86/gnome-extra/users-guide/files/Attic/digest-users-guide-1.2,v ERROR: A CVS repository cannot contain both cvsroot/gentoo-x86/dev-lang/entity/entity-0.7.2.ebuild,v and cvsroot/gentoo-x86/dev-lang/entity/Attic/entity-0.7.2.ebuild,v ERROR: A CVS repository cannot contain both cvsroot/gentoo-x86/dev-lang/entity/files/digest-entity-0.7.2,v and cvsroot/gentoo-x86/dev-lang/entity/files/Attic/digest-entity-0.7.2,v ERROR: A CVS repository cannot contain both cvsroot/gentoo-x86/media-sound/mpg321/files/mpg321-0.1.5-ao.diff,v and cvsroot/gentoo-x86/media-sound/mpg321/files/Attic/mpg321-0.1.5-ao.diff,v Exited due to fatal error(s). === FIXING === cvsroot="/var/db/cvs" pre_removes=( "gentoo-x86/gnome-extra/users-guide/users-guide-1.2.ebuild,v" "gentoo-x86/gnome-extra/users-guide/files/digest-users-guide-1.2,v" "gentoo-x86/dev-lang/entity/entity-0.7.2.ebuild,v" "gentoo-x86/dev-lang/entity/files/digest-entity-0.7.2,v" "gentoo-x86/media-sound/mpg321/files/mpg321-0.1.5-ao.diff,v" ) for file in ${pre_removes[*]}; do rm -f $cvsroot/$file done vim:ai:noet:ts=4:nowrap