How to push CPAN modules from Github to CPAN

As I’ve mentioned in my YAPC talk in Pittsburgh last week (slides are here, video parts 1-3 are here, here, and here), there’s an easy way to release the next version of your Github-hosted CPAN module via Pause on CPAN:

Let’s say that you’ve tagged the release with “rel_125″ in git and pushed the tag to github (git push –tags). Now github will create a tarball with the content of the repository if you go to the project’s download page at

http://github.com/mschilli/proc-simple-perl/tarball/rel_125

Now, this URL isn’t quite ready to be used on Pause, because Pause expects the name and the version of the module. But this can be fixed by using a URL like

http://github.com/mschilli/proc-simple-perl/tarball/rel_125/Proc-Simple-1.25.tgz

which a) adds the name/version Pause expects and b) doesn’t bother github, which just interprets “/Proc-Simple-1.25.tgz” as PATHINFO and ignores it. So all you need to do is fill out this form on Pause:

githubrelease

Then press the “Upload this URL” button, and Pause will go to github, fetch the tarball and release it on CPAN.

Caveats: Make sure everything you want in the tarball is checked into git. The repo needs to be structured just like the  CPAN module should look like later. Use Makefile.PL in the top dir, and don’t forget META.yml and MANIFEST. Also make sure that everything in your repo is safe to be published on CPAN. Enjoy! :)

Comments (2)

12% Fees to Sell on Ebay

Just sold a $49.90 item on Ebay, and got back $36.63.

How come this is so expensive?

Let’s break it down: $0.35 listing fee (buy-it-now), $3.99 “final value fee”, $1.75 Paypal fee. That’s 12% fees total that Ebay/Paypal are cashing in on a sale of this size!

ebay

Then I had offered free shipping, and it cost me $7.18 to ship a package that’s slightly over 1 pound to Texas. Here you see the downside of free shipping:  Ebay charges the “final value fee” on the factored-in shipping cost as well.

So, if you add everything up, I had 27% expenses to sell a $49.90 item on Ebay, holy moly!

Comments

The Dreamhost Auto-Fixer

Just had another issue with my hosting service Dreamhost: Their sshd daemon wasn’t responding, so I went to their support site and clicked through the “Get Support” menu.

As soon as the problem is identified, they seem to run some diagnostics. And indeed, they found a problem:

dhp2

Alas, the problem description is missing. But interestingly, they also seem to run self-healing scripts once they’ve identified the problem, as my ssh access started working 10 seconds afterwards! Phew.

Comments

Turn your Sourceforge Project into a Git Repo

Unless you’ve been hiding in a cave, you’ve probably heard by now that a lot of open source projects are moving from traditional source control systems like CVS and SVN to distributed systems like git.

Now, especially after attending a presentation by the Github guys at Yahoo  and reading Vlad’s comments on the PITA threshold, I’ve been thinking about moving the Log4perl project from Sourceforge to Github.

But will Github be around five years from now or will there be a better site to host open source projects on? Who knows. But what I know for sure is that I want to use git as a version control system now. It’s not like Log4perl uses a lot of branches, but it drives me crazy that I don’t have the entire project history wherever I am, in a hotel room with bad Internet connectivity or on a plane without any chance of talking to Sourceforge at all.

So what exactly does it take to move your Sourceforge CVS-based project to git? It’s surprisingly simple.

First, install the tools:

$ sudo apt-get install git-core git-cvs

Then, as described in the Sourceforge Help Manual, use rsync to make a ‘backup’ of your CVS root on Sourceforge like

$ mkdir cvsrepo
$ rsync -av log4perl.cvs.sourceforge.net::cvsroot/log4perl/* .

(replace ‘log4perl’ by your Sourceforge project id above) and then create another directory to put your new git repo in like

$ cd ..
$ mkdir gitrepo
$ cd gitrepo
$ git-cvsimport -d `pwd`/../cvsrepo Log-Log4perl

(replace ‘Log-Log4perl’ by the CVS module you want to import into git).

Presto, git starts crunching:


Initialized empty Git repository in /somepath/git/.git/
Counting objects: 5827, done.
Compressing objects: 100% (5237/5237), done.
Writing objects: 100% (5827/5827), done.
Total 5827 (delta 3393), reused 0 (delta 0)
Counting objects: 7546, done.
Compressing objects: 100% (3390/3390), done.
Writing objects: 100% (7546/7546), done.
Total 7546 (delta 4449), reused 5760 (delta 3393)

And after a few seconds (or minutes, depending on the history of your project), you’re done! The entire project history is now in git:

$ git log
commit f63d47a98d58df5c7283f63fefc92c05f4b08f50
Author: mschilli
Date: Fri Mar 20 01:49:25 2009 +0000


is_xxx() returned true prior to L4p initialization. Fixed it
and adapted test suite.


commit ca32d8049c25d2b50ae5a09e06342bd0d95259c6
Author: mschilli
Date: Tue Mar 17 06:35:20 2009 +0000


release notes

Fantastic, I’m in git heaven! Now, let me play around with that a bit, and decide if moving to github makes sense. The reduced PITA factor is a compelling argument. I wonder what the Google boyz are gonna come up with next to stop people leaving Google Code and heading to Github …

Comments

Quo vadis, Süddeutsche Zeitung?

For the last eight years in San Francisco, I’ve been subscribed to the Friday edition of the German newspaper “Süddeutsche Zeitung”, which, upon arrival, I immediately throw into the paper recycling bin.

SZ stops sending the "Magazin" supplement with its foreign editionThe only reason I’m paying about $4.50 per issue is the “Magazin”, a weekly supplement, which comes with the Friday edition. The “Magazin” is usually an interesting read, somewhat unique in the German media landscape, and I read each and every issue almost cover to cover, mostly in the bathtub.

But what happened last Friday? As indicated in the picture on the right, it “is not included in the entire foreign edition” anymore (“Liegt nicht der gesamten Auslandsauflage bei”).

Now my subscription is useless.

Holy crap! What are these people thinking?

Comments