twitter

davorg: @rozallin Fair point. Mitchell was an arse. #tboc

twitter

davorg: "How much do you think it costs to make a meal for 12 people?" http://bit.ly/bXDqME But it was for 10 people @nadine4mp can't count #tboc

twitter

davorg: "It dawned on my suddenly, that I could actually be making things worse" Dorries shows surprising self-awareness #thoc

twitter

davorg: Looks like balhampeople.co.uk is storing user passwords in plain text. Bad web site! No cookie! http://bit.ly/djATss

twitter

davorg: @berrange Link fixed now. Sorry about that.

perl hacks

Building RPMs from CPAN Distributions

Regular readers will know that in the past I've shown some interest in building RPMs from CPAN distributions. It's been a while since I did much work in this area (although I do still release the occasional module to my RPM repository.

Over the weekend I was at FOSDEM and I attended Gabor's talk on packaging CPAN modules for Linux distributions. This has rekindled my interest in this area and I spent most of the train journey back from Brussels hacking around the area.

There's one thing that has been bothering me in particular recently. The standard RPM building mechanism (or, at least, the way it's configured in Fedora and Centos) does something incredible brain dead when trying to work out what other modules the current module depends on. It does it by parsing the source code and looking for "use" statements. This means that a module that might only be used in really obscure cases is going to be listed as a mandatory requirement for your module.

Gabor and I actually saw an example of this over the weekend when the Fedora packaging team raised a bug against Padre because it requires Win32::API. Padre, of course, only uses Win32::API when being used on Windows. And for that reason Win32::API is not listed as a dependency in its META.yml.

And that's, of course, where the RPM builders should be going to get a list of dependencies. META.yml contains the list of other modules that the author wants the module to depend on. This should be seen as the definitive list. Of course, there might be errors in that list - but that should be addressed by raising a bug against the module.

I've poked at this problem a few times, trying to work out how the RPM system parses the code and trying to replace that with code that looks at META.yml instead. But the RPM system uses a baroque system of interdependent macros and eventually they all lead to a piece of rather clunky Perl code. So each time I've approached this problem, I've backed off again.

The problem became more urgent when I wanted to package Plack for Fedora. Plack supports all sorts of hosting environments and therefore includes "use" statements loading a number of modules that most people will never use. Fedora includes Apache2, so Apache::Request (which is for Apache1) will never be available. It's not listed in META.YML, but it is used by one of the modules. The RPM build system was therefore insisting that it should be present. An impasse was reached.

Then I decided to turn the problem on its head. RPM building has two steps. You create a spec file for the RPM and then you build the RPM using the spec file and your original tarball. I started wondering if I could ensure that the spec had all of the requirements (from the META.yml). Once I'd done that I would only need to find some way to turn off the RPM build system's default behaviour.

People packaging CPAN modules for Fedora (and Centos) use a program called 'cpanspec' to generate spec files. I started digging into the code there in order to find out how to insert the list of correct dependencies.

Only to find that it has already been done. cpanspec is already doing the right thing and generating a list of 'Requires' statements from the data in META.yml.

Then all I needed to do was to see if I could turn off the (broken) default RPM build behaviour which was adding spurious extra dependencies. That proved to be easy too. It's just a case of adding %__perl_requires %{nil} to your .rpmmacros files.

So now all of my RPMs will have only the correct dependencies listed. This makes me very happy.

I suppose I should go back and rebuild all of the older ones too.

Oh, and because I've worked out a really easy way to generate this - here's a spreadsheet listing which CPAN modules are available as RPMs for Fedora. I plan to keep this list up to date (and make it much longer). [Link now fixed]

p.s. More about my trip to FOSDEM and the Perl marketing push there over the next couple of days.
twitter

davorg: New writing: perl hacks: Building RPMs from CPAN Distributions: Regular readers will know that in t.. http://bit.ly/cArXWR

twitter

davorg: RT @therealsim_o: I can't wait to see what Nadine pulls out of her bra. I haven't seen a £50 note for ages. #tboc

twitter

davorg: Off to a recording of Just A Minute tonight. Hope I'm back in time for Tower Block of Commons #tboc

github

davorg pushed to master at davorg/rpm_stuff

HEAD is 4864b41baedd8859a66fdfb0f1ca78a4bbcf0414
  • Dave Cross committed 4864b41b:
    Various bug fixes.
github

davorg created branch master at davorg/rpm_stuff

New branch is at davorg/rpm_stuff/tree/master
github

davorg created repository rpm_stuff

New repository is at davorg/rpm_stuff
twitter

davorg: Home from Brussels. Knackered, but happy.

twitter

davorg: My Top 3 Weekly #lastfm artists: Fleetwood Mac (7), Beth Orton (4) and Julie Delpy (3) http://bit.ly/dazgcg

twitter

davorg: Turned up at the Eurostar terminal two hours too early. Couldn't get earlier train as my ticket is non-exchangable.

twitter

davorg: Discovered the #fosdem #Android application. Only about a day and a half late :-/

twitter

davorg: Having a projector at the #FOSDEM #perl stand was a good idea. It really draws attention. #marketinglessons

twitter

davorg: Yay. @neilhimself to write Dr Who episode http://bit.ly/b8o5uT #drwho

twitter

davorg: Pens going really quickly at the #fosdem #perl stand. Round tuits less successful. Too much explanation needed (esp to non-English speakers)

twitter

davorg: @miahfost Stop by the #perl stand and say hi. #fosdem

twitter

davorg: At the #perl stand at #FOSDEM. We have round tuis.

twitter

davorg: Someone (@iaindale perhaps) should tell @nadine4mp to change the twitter link on her blog. It's going to an imposter.

twitter

davorg: Judging by the people in the Eurostar departure lounge, the 12:57 to Brussels is the official #fosdem train today.

twitter

davorg: @antoniojl What's the date for the Balham gig? Need to put it in my calendar.

delicious

Petition to: encourage government departments to upgrade away from Internet Explorer 6. | Number10.gov.uk

Encourage the UK government to stop crippling itself be using IE6
perl hacks

Cultured Perl Blog

A couple of years ago I thought that one thing the Perl community was missing was a network of blog sites about Perl. I'm not talking about the individual blogs that are being shown off to such good effect by the Iron Man project, I'm talking about a set of multi-author blogs that covered particular facets of the Perl world. Something like a Perl-specific version of LifeHacker or BoingBoing. To that end, I registered a number of domains and set about installing Movable Type.

That bit was easy. That bit I can do. The next bit is harder.

The next bit involves getting authors interested in writing for the blogs on a regular basis. That bit I didn't do so well at and none of the blogs florished.

One of them didn't even get going. That was Cultured Perl. The idea behind Cultured Perl was that it would discuss Perl culture. That's all the non-technical bits of the Perl world. Perl Mongers, Perl conferences, things like that. I had a few authors signed up, but nothing ever really happened.

So why am I telling you this? Well, the Cultured Perl domains are up for renewal. And I'm trying to work out whether it's worth keeping them.

Would you be interested in reading a Cultured Perl blog? And would you be interested in writing for it?
sw12

The Balham Tup

I used to go into the Balham Tup over ten years, back when it was owned by Paddy Gallagher. Until very recently I hadn't been there for years. And then, a few months ago I met a friend who I hadn't been in touch with for years and he invited me to go along to the Tup on Sunday night for their pub quiz. My wife and I went along that week, enjoyed it and for the last two or three months we've been regulars there on a Sunday night. We've even won the quiz three or four times.

Last Sunday we were planning to go along to the quiz as normal. We'd invited the friend who first invited us to the quiz over to dinner and we were all going to go along later. When he arrived, he had big news. Other friends of his had been in the Tup the previous night and the news had broken that the Tup was being repossessed and that Sunday was going to be its last night.

So after dinner we headed off to the Tup expecting a slightly strange night. We weren't disappointed.

They had sold out of beer. All they had left was a rapidly decreasing stock of wine, spirits and soft drinks. And they were selling the spirits off at £1.50 a shot. Everyone was in a pretty weird mood and the quiz dragged on longer than it normally does. It was 11:30 when we left and the final results still hadn't been announced.

It's a shame that the Tup has closed. While we weren't frequent customers we always enjoyed our Sunday evenings there.

And now we're looking for another decent pub quiz in the Balham area. Does anyone have any suggestions?
github

davorg closed issue 55 on davorg/blogs.perl.org

My URL username is CLONEMASTER instead of andychilton
github

davorg closed issue 51 on davorg/blogs.perl.org

Can login, but clicking Post takes me to a Sign-in-page where I'm rejected
perl hacks

FOSDEM

This weekend is the annual FOSDEM conference in Brussels. I really enjoy FOSDEM but, for reasons I don't really understand, this will be the first time I've been since 2005. It will also be one of the rare occasions where I attend a conference without giving a talk - the organisers turned down my proposed talk on Modern Perl.

I like FOSDEM because it's not just a Perl conference. It's about the wider open source movement. In fact Perl is a really small part of of the conference. In many years it has been completely unrepresented. One of the things I mentioned in my "M Word" talk at the London Perl Workshop was that Perl needed to be better represented at non-Perl conferences. With that in mind, the Perl Foundation has booked a stand at the conference and various volunteers (including me) will be there telling people about how wonderful Perl is.

The main driver behind this push to get Perl represented at other conferences has been Gabor Szabo and he'll also be at FOSDEM giving a couple of talks. One is a lightning talk introducing people to Padre. The other is about packaging CPAN modules for Linux distributions. Those of you with long memories might remember me talking about this at YAPC in Copenhagen. I'm hoping that attending Gabor's talk will galvanise me into having another go at my project to automatically build RPMs of many more CPAN modules than are currently available.

So, as you can see, there are plenty of good reasons to be at FOSDEM this weekend. And that's even before considering that it takes place in one of my favourite European cities. I might even treat myself to a Kwak in one of the bars on the Grand Place.

If you're at FOSDEM next weekend, please stop by the Perl stand and say hello.

sources

Feed Subscribe
OPML OPML

Powered by Perlanet