This is an old revision of the document!
We have decided to try migrationg PLD Linux CVS Packages repository to 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 <login>@pld-linux.org
as e-mail alias in GitHub (Account Settings→Email Addresses)
Migration test was done using cvs2git
, that is not incremental (but semi-incremental achieved with rsync.log).
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/
cvs-<BRANCHPOINT»'. 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 GitHub API probably. Currently done manually as:
- Create new repo
- push changes: <code>
git remote add origin git@github.com:pld-linux/alien.git
git push –mirror
</code>
===== Unsorted =====
* builder script
* rewrite from scratch or patch current?
* look into fedpkg?
* git clone on carme should use –reference to local git copy to save diskspace
* pld builder automation (building, auto tagging)
* 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 | <code>cvs up</code> | <code>git pull –rebase</code> |
| checkin single file | <code>cvs ci file.foo</code> | <code>git add file.foo; git commit; git push</code> |
| checkin all changes | <code>cvs ci</code> | <code>git commit -a; git push</code> |
| find string from all packages | <code>grep -r oauth_ SPECS</code> | use web search. Sample Search |
| list all pkgs | <code>cvs ls packages</code> | use json api. sample |
| see old patches | look into
Attic/ in cvsweb | <code>git log –pretty=format: –name-only –diff-filter=D</code> |
| restore old removed file | look into
Attic/ in cvsweb and
cvs up -jHEAD -j$DEAD_REV'' and commit | 1. get sha: <code>git log – FILE</code> 2. get contents: <code>git show HASH:FILE</code> |
Other Readling:
* Using Fedora GIT
===== fedpkg =====
commands that work and have alternatives
| <code>./builder -g PACKAGE</code> | <code>fedpkg co PACKAGE; cd PACKAGE; fedpkg sources</code> |
| <code>./builder -ba PACKAGE</code> | <code>fedpkg local</code> |
| <code>./compile.sh PACKAGE</code> | <code>fedpkg compile –short-circuit</code> |
| <code>./repackage.sh PACKAGE</code> | <code>fedpkg install –short-circuit</code> |
| <code>./check-unused-files.py PACKAGE</code> | <code>fedpkg unused-patches</code> |
| <code>cvs diff</code> | <code>fedpkg diff</code> |
| <code>./builder -bs PACKAGE</code> | <code>fedpkg srpm</code> |
| <code>rm -f *; cvs up</code> | <code>fedpkg clean</code> |
==== todo ====
* switch _builddir, _srpmdir and _rpmdir to packages/NAME when invoked from fedpkg?