Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7068 closed Bug/Something is broken (fixed)

move the ir codebase from SVN to git

Reported by: https://id.mayfirst.org/dkg Owned by: https://id.mayfirst.org/dkg
Priority: Medium Component: Tech
Keywords: svn-to-git ir Cc:
Sensitive: no

Description (last modified by https://id.mayfirst.org/dkg)

the ir codebase should be moved from svn to git. I suspect this means that we also need to update http://members.mayfirst.org/, since it is a public deployment of the code. this is related to #7046

Change History (9)

comment:1 Changed 6 years ago by https://id.mayfirst.org/dkg

  • Owner set to https://id.mayfirst.org/dkg
  • Status changed from new to assigned

comment:2 Changed 6 years ago by https://id.mayfirst.org/dkg

I created an empty ir repository on moses, with a user account to manage it:

0 moses:~# adduser --disabled-password --gecos 'MF/PL ir webapp git synchronization,,,' git-ir
Adding user `git-ir' ...
Adding new group `git-ir' (1005) ...
Adding new user `git-ir' (1005) with group `git-ir' ...
Creating home directory `/home/git-ir' ...
Copying files from `/etc/skel' ...
0 moses:~# git init --bare /srv/git/ir
Initialized empty Git repository in /srv/git/ir/
0 moses:~# chown -R git-ir /srv/git/ir
0 moses:~# cat > ~git-ir/.monkeysphere/authorized_user_ids 
gitosis@git.mayfirst.org
 command="/usr/local/bin/gitserve",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty
0 moses:~# monkeysphere-authentication u git-ir
0 moses:~# 

Then i converted the svn project to git locally, using the workflow and scripts outlined on #7046:

git init ir
cd ir
git svn init https://svn.mayfirst.org/mfpl --trunk trunk/ir --tags tags/ir --branches branches/ir
git svn fetch --authors-file=../svn-authors-for-git
../convert-git-svn-tags

I created an ir repository on git.mayfirst.org (referenced by gitosis@git.tachanka.org:mfpl/ir), and pushed to it from alice. Then i updated that repository to update the one on SMO:

cygnus:/srv/gitosis/repositories/mfpl/ir.git# cat > hooks/post-receive
#!/bin/sh
SSH_AUTH_SOCK=/var/run/gitosis-ssh-agent/socket2 git push smo
cygnus:/srv/gitosis/repositories/mfpl/ir.git# chmod a+x hooks/post-receive
cygnus:/srv/gitosis/repositories/mfpl/ir.git# su - gitosis -s /bin/bash
gitosis@cygnus:~$ cd /srv/gitosis/repositories/mfpl/ir.git/
gitosis@cygnus:~/repositories/mfpl/ir.git$ git remote add --push smo git-ir@moses.mayfirst.org:/srv/git/ir
gitosis@cygnus:~/repositories/mfpl/ir.git$ SSH_AUTH_SOCK=/var/run/gitosis-ssh-agent/socket2 git push smo master
Counting objects: 2093, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (619/619), done.
Writing objects: 100% (2093/2093), 4.59 MiB, done.
Total 2093 (delta 1265), reused 2093 (delta 1265)
To git-ir@moses.mayfirst.org:/srv/git/ir
 * [new branch]      master -> master
 * [new branch]      multilang -> multilang
gitosis@cygnus:~/repositories/mfpl/ir.git$ ./hooks/post-receive
Everything up-to-date
gitosis@cygnus:~/repositories/mfpl/ir.git$ logout
cygnus:/srv/gitosis/repositories/mfpl/ir.git# 
Last edited 6 years ago by https://id.mayfirst.org/dkg (previous) (diff)

comment:3 Changed 6 years ago by https://id.mayfirst.org/dkg

and i updated SMO's configuration to be able to see it here:

diff --git a/conf/trac.ini b/conf/trac.ini
index 16e638b..3c3d9a2 100644
--- a/conf/trac.ini
+++ b/conf/trac.ini
@@ -105,6 +105,10 @@ puppet.dir = /srv/git/puppet
 puppet.description = MF/PL puppet configuration
 puppet.type = git

+ir.dir = /srv/git/ir
+ir.description = Collaborative Democracy Software
+ir.type = git
+
 .alias = mfplsvn

 [search]

And now the git repo can be seen with links like source:/ir.

what remains to be done is to convert meetings.mayfirst.org, and then to remove source:mfplsvn/trunk/ir

comment:4 Changed 6 years ago by https://id.mayfirst.org/dkg

Ah: i also did (as root@cygnus):

ln -s /srv/gitosis/repositories/mfpl/ir.git /var/cache/git/mfpl/

So the repo is now readable via:

git clone git://git.mayfirst.org/mfpl/ir

looking into meetings.mayfirst.org:

this is hosted on peltier, so i'm looking at that now.

comment:5 Changed 6 years ago by https://id.mayfirst.org/dkg

testing the current (svn-based) installation on peltier, i'm seeing some existing php bugs, (e.g. #7071) even with the current setup.

/var/www/user.meetings.mayfirst.org/include/ir appears to be an svn checkout; and /var/www/user.meetings.mayfirst.org/web is a subtree svn checkout, i think.

also, these checkouts have diverged from upstream svn, and their changes haven't been merged back in. and there are non-tracked files as well. :/

comment:6 Changed 6 years ago by https://id.mayfirst.org/dkg

I made a signed tag ir/ir-0.1 so that we could cryptographically verify the pull.

As ir@peltier.mayfirst.org, i cloned the git repo and verified the tag.

I saved the divergences in our svn working copy into /home/ir/tickets/7068/ir-changes.diff.

I moved /var/www/user.meetings.mayfirst.org/include/ir out of the way (to /home/ir/tickets/7068) and placed the git clone in its place.

I moved /var/www/user.meetings.mayfirst.org/web out of the way as well, and replaced it with a symlink into the git clone.

I reapplied the local divergences to the git checkout (though we left out the changes to web/index.php, which didn't seem to be needed).

http://monkey2012.meetings.mayfirst.org/ seems to be working now.

Joseph and i are working on maintaining the drupal install at http://meetings.mayfirst.org/ now...

comment:7 Changed 6 years ago by https://id.mayfirst.org/joseph

Modified peltier's puppet config to add squeeze backports and to set the preferences to use drush from squeeze backports. Upgrade drush from version 3.3 to 4.5. Moved the webroot backup directory to ~/drush-backups. Updated ctools.

Then dkg and I created a meeting to test. Everything tested fine.

comment:8 Changed 6 years ago by https://id.mayfirst.org/dkg

  • Resolution set to fixed
  • Status changed from assigned to closed

and with [2558/mfplsvn] i removed ir from the svn repository.

comment:9 Changed 6 years ago by https://id.mayfirst.org/dkg

  • Description modified (diff)

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.