====== CVS to Git Migration for PLD Linux using GitHub ======
This page describes initial plan using GitHub as PLD Linux packages primary repository, things described here are just historical view of the plan, not current state.
[[https://github.com/pld-linux/|PLD Linux Github Organization]] is currently used to mirror git.pld-linux.org
This page describes migration of PLD Linux [[http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/|CVS Packages]] repository to [[https://github.com/|github]].
Organization in github as been done: [[https://github.com/pld-linux]], later referred as Organization.
PLD Developers wishing to join Organization, should create account in GitHub, and Organization Owners will add them to Team named Developers.
Each developer should set their ''@pld-linux.org'' as e-mail alias in GitHub (Account Settings->Email Addresses)
===== Migration Tasks =====
Migration test was done using ''cvs2git'', that is not incremental (but semi-incremental achieved with rsync.log).
* full git cvsimport (using local cvs files copy): ~470 minutes
* Secondary git cvsimport time (local cvs mirror): ~580 minutes
* git cvsimport size: 4.8G
* git root bare size: 3.2G
* imported users will be login@pld-linux.org in authors file, people can claim their identities by adding their @pld emails to their accounts in github
You can clone from test import at carme:~glen/git/pld-git/git-import (via ssh)
Scripts used to do the import: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/git-migration/
==== git cvs convert todo ====
* cvsps to understand cvsnt "Commit Identifier". FIXED: cvsps patched
* fix problematic packages:
- libghttp, cvsps loops on libghttp-fixlocale.patch (two revisions 1.1)
- kernel - cvsps loops on kernel-ppc.config
- fltk2, classpath, joomla
- vim : spec.vim: ''cvs checkout: Skipping `$Log$' keyword due to excessive comment leader.''
* latin2 commit messages. Test packages: mutt, audiocut. RESOLVED: see cvs2git.options
* cvs branches not imported Test package: audiocut. FIXED
* unnamed branches will be converted to tags: ''cvs-''. test packages: nagios-alert-jabber, nagios-plugins
* trim $Log:$ on importing?. DONE
* filter out imported archives: .tar, .gz, etc?
* http://pld.pastebin.com/xF5yzZAv - .tar, .gz files
* http://pld.pastebin.com/JT9RQJ2s - "extensions" from cvs server
* maybe these files should be removed in cvs server? they are still present in "old" SOURCES.old if you really want some
* maybe we should set Comitter to value other then Author during conversion, so could later identify cvs and git commits.
* remove %changelog from old commits. DONE
* what to fill to .git/description? just package name?
* what to do with removed packages. suggestion: clone them to ''pld-linux-obsolete'' organization in github and drop in ''pld-linux''
* ideas: register pld-projects for storage of non-packages from pld cvs/svn (geninitrd, rc-scripts, ...)
===== GitHub Related Tasks =====
We decided to try github hosting:
* supports organizations
* each dev is responsible for maintaining his own account (public key upload, password resets etc. handled by a web panel)
* has group-based ACL
* has commit hooks (can write our own and github will then enable them for all users)
* sent a request asking if they'd agree to host us for free, we have a green light
* github has polish interface translations, most devs should be happy? :D
* what to fill to Summary and URL fields (parse from .spec?)
* automate creation of new packages via [[http://develop.github.com/|GitHub API]]. DONE: ''pldpkg.py'' currently can add and create repos.
===== Unsorted =====
* builder script
* rewrite from scratch or patch current?\\ the patched version: https://github.com/draenog/PLDbuilder
* look into [[https://fedoraproject.org/wiki/Using_Fedora_GIT|fedpkg]]?
* git clone on carme should use --reference to local git copy to save diskspace
* pld builder automation (building, auto tagging)\\ minimal changes required; see: https://github.com/draenog/pld-builder.new
* restricting who can delete tags (auto-xxx tags should not be altered by humans)
* $log: keyword support for .spec, also $Revision: and $Date:
* $Revision and $Date dropped
* %changelog generated by git log in builder script (implemented)
* ciabot, mailinglist notification, commit acl rules
===== Changes to Developer =====
Adoption of new commit message formatting rules
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
^ Action ^ Before (CVS) ^ After (Git) ^
| add new package | ''../builder -a PKG'' or ''cvs add PKGDIR'' | Org Owner in github has to create it |
| rename package | send rename request to cvsadmin@ | rename in github yourself |
| delete package | remove all sources from cvs | package should be pushed to ''pld-linux-obsolete'' and Org Owner in github has to delete it in ''pld-linux'' |
| update from remote | cvs up
| git pull --rebase
|
| checkin single file | cvs ci file.foo
| git add file.foo; git commit; git push
|
| checkin all changes | cvs ci
| git commit -a; git push
|
| find string from all packages | grep -r oauth_ SPECS
| use web search. [[https://github.com/search?q=repo%3Amirumee%2F*+oauth_&type=Everything&repo=&langOverride=&start_value=1|Sample Search]] |
| list all pkgs | cvs ls packages
| use json api. [[https://github.com/api/v2/json/repos/show/pld-linux|sample]] |
| see old patches | look into ''Attic/'' in cvsweb | git log --pretty=format: --name-only --diff-filter=D
|
| restore old removed file | look into ''Attic/'' in cvsweb and \\ ''cvs up -jHEAD -j$DEAD_REV'' and commit | 1. get sha: git log -- FILE
2. get contents: git show HASH:FILE
|
Other Readling:
* [[https://fedoraproject.org/wiki/Using_Fedora_GIT|Using Fedora GIT]]
===== fedpkg =====
commands that work and have alternatives
| ./builder -g PACKAGE
| fedpkg co PACKAGE; cd PACKAGE; fedpkg sources
|
| ./builder -ba PACKAGE
| fedpkg local
|
| ./compile.sh PACKAGE
| fedpkg compile --short-circuit
|
| ./repackage.sh PACKAGE
| fedpkg install --short-circuit
|
| ./check-unused-files.py PACKAGE
| fedpkg unused-patches
|
| cvs diff
| fedpkg diff
|
| ./builder -bs PACKAGE
| fedpkg srpm
|
| rm -f *; cvs up
| fedpkg clean
|
==== todo ====
* switch _builddir, _srpmdir and _rpmdir to packages/NAME when invoked from fedpkg?