Maintain a private PPM (ppd) repository

Posted by jlholt on 2013-05-15 07:42
Forums: PPM | OS: All / Any

Has anyone published code for automating the maintenance for a ppm/ppd repository for multiple modules and multiple architectures? An additional question, for those interested, is this: is it better to centralize or distribute the solution? I see pros and cons for both but would appreciate feedback from anyone who has actually implemented at least one solution.

I've looked in this forum (and elsewhere) but haven't found anything yet.

I've found a few modules in the ActivePerl and ActiveState namespace that might help but I don't think they're designed to satisfy the all requirements I describe below.

I have a working private ppm web site for ppm-hosting my 3 XS based modules for 3 architectures. Recently, when I started building with ActivePerl Business Edition (ABE), I expanded the maintenance from 3 architectures to 8 of the 10 supported by ABE. To make matters more tedious, I have identified over 10 modules that my products required that aren't available from ActiveState for 4 of those 8 architectures.

You can imagine that when it comes to focusing on writing software that makes me money, I don't like getting interrupted with this maintenance task. Alternatively, I can just ask Graham if he would kindly build the modules and then wait. But in either case (me building them or me asking for someone else to build them), there is a big interruption in my creative process.

Just for review, this is what I have to do whenever a module update is required (which might be predicated by an upgrade of ActivePerl):

- determine if CPAN has a newer version
- download the source
- make test the module for each platform where an install will eventually take place
- tar -zcf mod.tar.gz blib
- transfer the tar.gz file to a specific directory
- edit the package.xml file to add the new version of the package that you just built

In an ideal world, here are most of the code that I would hope I would have to write if the solution were centralized:

use PPM::Blackbox;
my %mod = qw(TimeDate Text::Table Sort::Maker);
my %arch = (
   hostname1=>{user=>"username", password=>"password", perl=>"pathtoperl"},
   hostname2=>{user=>"username", password=>"password", perl=>"pathtoperl"},
my $server = new PPM::Blackbox(\%mod, \%arch);


jlholt | Wed, 2013-05-15 13:17

I found PPM::Make but I don't know if it's a good place to start. Comments encouraged.

by | Tue, 2013-07-16 21:41

I created a local repository at C:\Packages and .ppd files at packages folder
And created a folder with name x86 and placed tar files at that location
using ppm able to search local repository to get available packages in local repository
based on avaialable packages executed ppm install 'package'

output of command prompt:

C:\Rep>ppm install 1
Unpacking Module-Info-0.34...done
Updating files in site area...done

Its saying updating files in site area..but when we checked manually PPM didnot updated any folder/file.
Not able to understand why its happening,Please help us in finding out the problem

jlholt | Wed, 2013-07-17 06:54

@by 2013-07-17 00:41

The first thing that comes to mind is that ppm found no files that needed to be modified. The two variables that I imagine that it uses are module_name, and module_version. If those don't change, then the assumption should be that nothing has changed. I can imagine that even if the files were different it would still not update the files.

by | Wed, 2013-07-17 22:17

i donot have that module installed only, So when i am trying to install a new module there is no chance of same files.
And intrestingly it updates version number but not files.

jlholt | Thu, 2013-07-18 00:26

Maybe the files in the tar file are not organized properly with a blib directory at the top?

by | Fri, 2013-07-19 04:09

Ya they are not organised with blib at the top,But when we download modules directly from CPAN we have create this folder logic and all?

jlholt | Fri, 2013-07-19 09:01

Yes, when you download a module from CPAN you have to make the entire blib structure. But it is easy to do that. Most modules built with either ExtUtils::MakeMaker or Module::Build. If the module you want to put into a repository is built with ExtUtils::MakeMaker, then you do this:

perl Makefile.PL
make test # or just make if you do not mind the risk
tar -zcf MODULE_NAME-VERSION.tar.gz blib

It is as simple as that. IIRC, the commands would be just as easy if the module is build with Module::Build.

by | Mon, 2013-07-22 01:25

I am working on a windows using tar -zcf command won't be helpful for us.
Any specific procedure we have to follow for creating blib in windows?

jlholt | Mon, 2013-07-22 03:46

Then install cywgin. It's easy and free.