Download CPAN Repository. No Linux System with Internet Access - perl

our Linux Systems have no Internet Access.
Only Windows Clients have Internet Access.
I want to build a offline CPAN Repository.
I can't download each Module an picking all the dependencies.
Is there a way to download the Modules automated with dependencies to a Windows System?
Even a whole download of the CPAN Repository would be a solution for me.

You can create a local mirror of CPAN with minicpan. It's intended to distribute a copy of CPAN (or a subset of it) on media so you have it in case there is no internet available, e.g. a USB drive that you can use on a laptop while you are on an airplane so you can still install a dependency, even if it's outdated a bit.
Check out CPAN::Mini and the minicpan utility on CPAN as well as this guide on how to set up a mirror on perl.org. There is a guide on blogs.perl.org as well. Furthermore, this guide in German is very comprehensive and has a list of related material at the bottom.
In fact, there is a whole tag minicpan here on Stack Overflow. One of the very helpful reads (though not a full duplicate) is ysth's answer here.

Related

Building a local CPAN repository

I wonder if there are any options in Perl to build a local CPAN repository including the modules I want and then redistribute it with Perl distribution and then do not need to access CPAN at all.
If yes, could some me show an example?
I looked on CPAN and found a mincpan but it seems that minicpan bring all the mirror of CPAN. If it's possible to bring only a specific subset of modules using minicpan and in case I have a repository is it possible to copy it to another OS with the same type and install the relevant modules there with no headaches?
See Pinto (manages a local cpan-like repository) or Carton (can bundle up dependencies and provide them as needed, but you must run your application under carton after deployment.)
Alternatively, instead of a local minimal CPAN distribution, you can bundle requirements with your module, if you use the Module::Install installer.
The Pinto tools only work on Unix-like machines. However, Windows users can install modules from the repository as long as they can read the filesystem (like with NFS) or reach the host via HTTP (using pintod). So it is possible to use a Pinto repository with Windows, so long as you have one Unix-like machine to create and manage the repository.
Stratopan provides Pinto repositories hosted in the cloud. With Stratopan, you don't have to install any tools and everything can be managed through the browser. You can then install modules anywhere that has internet access using the standard tools. Stratopan doesn't yet support all the features Pinto has, but it is the most hassle-free solution for creating a private CPAN.
Disclaimer: I operate Stratopan.
This is addressed by How to mirror CPAN

Deploying Perl Application

What are the best practices for deploying a Perl application? Assume that you are deploying onto a vanilla box with little CPAN module installation. What are the ideal build, deploy methods? Module::Build, ExtUtils::MakeMaker, other? I am looking for some best practice ideas from those who have done this repeatedly for large scale applications.
The application is deploying onto a server. It's not CPAN or a script. It's actually a PSGI web application. That is, a ton of Perl packages.
I currently have a deployment script that uses Net::SSH::Expect to SSH into new servers, install some tools and configure the server, then pull down the desired application branch from source control. This feels right, but is this best practice?
The next step is building the application. What are the best practices for tracking and managing dependencies, installing those dependencies from CPAN, and ensuring the application is ready to run?
Thanks
The company that I work at currently build RPMs for each and every CPAN & Internal dependency of an application (quite a lot of packages!) that install into the system site_perl directory. This has a number of problems:
It is time consuming to keep building RPMs as versions get bumped across the CPAN.
Tying yourself to the system perl means that you are at the mercy of your distribution to make or break your perl ( in Centos 5 we have a max perl version of 5.8.8 ! ).
If you have multiple applications deployed to the same host, having a single perl library for all applications means that upgrading dependencies can be dangerous without retesting every application of the host. We deploy quite a lot of separate distributions all with varying degrees of maintenance attention, so this is a big deal for us.
We are moving away from building RPMs for every dependency and instead planning to use carton [1] to build a completely self contained perl library for every application we deploy. We're building these libraries into system packages, but you could just as easily tarball them up and manually copy them places if you don't want to deal with a package manager.
The problem with carton is that you'll need to setup an internal CPAN mirror that you can install your internal dependencies to if your application depends on modules that aren't on the CPAN. If you don't want to deal with that, you could always just manually install libs you need into local::lib [2] or perlbrew [3] and package the resulting libraries up for deployment to your production boxes.
With all of the prescribed solutions, be very careful of XS perl libs. You'll need to build your cartons/local:libs/perlbrews on the same architecture as the host you're deploying to and make sure your productions boxes have the same binary dependencies as what you used to build.
To answer the update to your question about whether it is best practice to source checkout and install onto you production host; I personally don't think that it is a good idea. The reasons why I believe that it is risky lays in the fact that it is hard to be completely sure that the set of libraries that you install exactly lines up to the libraries that you tested against, so deployments have the potential to be unpredictable. This issue can be exasperated by webapps as you are very likely to have the same code deployed to multiple production boxes that can get out of synch, also. While the perl community does a wonderful job of trying to release good quality code that is backwards compatible, when things go wrong it is normally quite an effort to figure things out. This is why carton is being developed, as this creates a cache of all the distribution tarballs that you need to install frozen at specific versions so that you can predictably deploy your code. All of that said though; if you are happy to accept that risk and fix things when they break then locally installing should be fine for you. However, at the very minimum I would strongly suggest installing to a local::lib so that you can back up the old local lib before installing updates so you have a rollback point if things get messed up.
Carton
local::lib
perlbrew
If it has some significant CPAN dependencies, then you might want to either write a small script that uses CPAN::Shell to install the necessary modules or edit the Makefile.PL of your application so that it reflects the necessary dependencies in the BUILD_REQUIRES portion of the file.
You may take a look at sparrowdo a perl6 configuration management tool, it comes with some handy plugins related to perl5 deployment, like installing cpan packages or deploying psgi application.
Update: this link https://dev.to/melezhik/deploying-perl5-application-by-sparrowdo-9mb could be useful.
Disclosure - I am the tool author.

Where do I get the MQ DLLs I need for Perl's MQClient::* and MQSeries:: modules?

I need to rejig some VERY old Windows code that uses Perl to talk to MQ. Specifically, I need to be able to install Perl's MQClient::MQSeries, MQSeries::QueueManager, MQSeries::Queue and MQSeries::Message modules.
When I fire up Strawberry Perl, go into CPAN and try to install them, I can see that there's several MQ client DLLs that are required for these Perl modules to build. However, they're not on my system, even after downloading and installing the current MQ Client from IBM.
It used to be that downloading and installing the MQ Client from IBM gave you the option to install a whole bunch of development libraries (presumably including the bits necessary to install the above Perl libraries), but it seems that's no longer the case. For example, there's no MQM.DLL file anywhere, which is one file that the Perl libraries seem to need to build correctly.
Suspect I've probably just not installed the correct MQ Client package to get this stuff, but have no idea where to find it (Google is no help). Any suggestions?
MQSeries 1.29 was released in 16 Jun 2009, so I guess you can just ask it's maintainer.
You can also ask in newsgroup news://news.software.ibm.com/ibm.software.websphere.mq , or ask IBM's support.
where'dja get the MQ download?
maybe you might try mqseries.net - it's a hotbed of MQ activity.
I'd suggest downloading the WMQ Client installation. Depending on which one you want, v7.0 is SupportPac MQC7 and v7.1 is SupportPac MQC71. This will get you the client libraries with which to build the Per module. If you need the server libs, the Evaluation download of WMQ Server v7.1 is here:

How to sync netbeans config/plugin/updates across multiple systems?

I use netbeans in both my desktop and my laptop. Updating and installing plugins on both systems is cumbersome, hence, it would be nice if there was a way to sync configurations, plugins, and updates across the systems.
I tried copying the ~/.netbeans directory, however, that also brings along the list of recent files and open projects in the other system.
Note: The OS, in both the machines, is Linux.
there are some possibilities
create your own linux package and manage the updates
check in subversion/cvs/git whatever your vcs is
or use a simple ftp/sftp solution

Are there any USB stick runnable, no-install, cross platform software frameworks (with GUI)?

Does anyone know of a good software development framework or similar that has the following properties?
Cross platform: it should be runnable on XP, Vista, OSX and common versions of Linux (such as Ubuntu and Kubuntu).
No installation: Be able to run the software from a USB stick without having to copy anything to the host machine.
Have good GUI support (this is why this question doesn't give a suitable answer, as far as I can tell).
Permissive licensing such as LGPL or BSD or such.
Among the softer requirements are having a set of abstractions for the most common backend functionality, such as sockets, file IO, and so on (There is usually some platform specific adaptations necessary), and supporting a good language such as Python or C++, though it is usually fun to learn a new one (i.e. not perl).
I think possible candidates are Qt 4.5 or above (but IFAIK Qt software will not run on Vista without any installation(?)), some wxWidgets or maybe wxPython solution, perhaps gtkmm. The examples I have found have failed on one or another of the requirements. This does not mean that no such examples exist, it just means that I have not found any. So I was wondering if anyone out there know of any existing solutions to this?
Some clarifications;
By "framework" I mean something like Qt or gtkmm or python with a widget package.
This is about being able to run the finished product on multiple platforms, from a stick, without installation, it is not about having a portable development environment.
It is not a boot stick.
It is ok to have to build the software specifically for the different targets, if necessary.
The use case I am seeing is that you have some software that you rely on (such as project planning, administration of information, analysis tools or similar) that:
does not rely on having an internet connection being available.
is run on different host machines where it is not really ok to install anything.
is moved by a user via a physical medium (such as a USB stick).
is run on different operating systems, such as Windows, Vista, Ubuntu, OSX.
works on the same data on these different hosts (the data can be stored on the host or on the stick).
is not really restricted in how big the bundled framework is (unless it is several gigabytes, which is not really realistic).
It is also ok to have parallel installations on the stick as long as the software behaves the same and can work on the same data when run on the different targets.
A different view on the use case would be that I have five newly installed machines with Vista, XP, OSX, Ubuntu and Kubuntu respectively in front of me. I would like to, without having to install anything new on the machines, be able to run the same software from a single USB stick (meeting the above GUI requirements and so on) on each of these five machines (though, if necessary from different bundles on the stick).
Is this possible?
Edit:
I have experimented a little with a Qt app that uses some widgets and a sqlite database. It was easy to get it to work on an ubuntu dist and on osx. For windows xp and vista I had to copy QtCored4.dll, QtGuid4.dll, QtSqld4.dll and mingwm10.dll to distribution directory (this was debug code) and I copied the qsqlited4.dll to a folder named "sqldrivers" in the distribution directory.
You mention wxWidgets but dismiss it as failing at least one of the requirements.
I don't know what your requirements are and in what way wxWidgets wouldn't work for you, but IMO it does fulfill them:
Cross platform: it should be runnable on XP, Vista, OSX and common versions of Linux.
It does run on those platforms, but "common versions of Linux" isn't good enough, as you can never be sure that the necessary GUI libraries for wxGTK (which should not be linked to statically) will be installed. This is however a problem for other solutions as well, unless you plan to put everything onto the stick.
No installation: Be able to run the software from a USB stick without having to copy anything to the host machine.
See the previous point, you would need to specify which libraries are needed on Linux. Also you could specify at build time not to use some of the system-provided libraries (for example for graphics, compression, regexes) but to use the wxWidgets-internal libraries instead.
Have good GUI support
Check.
Permissive licensing such as LGPL or BSD or such.
Check. You can statically link wxWidgets into your application too.
supporting a good language such as Python or C++
Supports both, and there are bindings to other languages as well.
having a set of abstractions for the most common backend functionality, such as sockets, file IO, and so on
It does have some abstractions like that, but you can link to other cross-platform libraries as well.
We use wxWidgets for FlameRobin, a graphical administration program for the Firebird SQL server. It has active ports to Windows, Linux and Mac OS X, and has been compiled for at least some BSD variant and Solaris as well. It definitely runs from a stick on Windows, I haven't tried with Linux or Mac OS X, but I don't see why it shouldn't there too.
Java.
It has GUI support.
It provides your network/file/etc. abstractions.
It is cross-platform. Most platforms you can think of have a JRE available.
No need to install a JRE. Most users probably already have one, and if not, you can run the appropriate JRE right off the stick.
You can provide several startup scripts for various platforms to run the app under the appropriate JRE.
Something else to consider is HTML+Javascript. :D
You can look at Mono it cross platform, has GUI (GTK+, or Winforms 2.0) and I can execute code without installing.
This might not be crossplatform, but is maybe even better, it dont even use the platform : linux on a stick :-)
The subtitle is
Take your Java workspaces wherever you go on a USB key
Here with java and eclipse, but nothing stops you there of course.
http://knol.google.com/k/inderjeet-singh/installing-a-ubuntu-hardy-heron-java/1j9pj7d01g86i/2#
Well, it depends on what you mean by 'package'. Kylix came close to being such a thing. It was QT based, and it allowed you to write once and compile for Windows + Linux. However, it was not an open source solution.
I asked a similar question in this link
http://www.24hsoftware.com/DevelopersForum/CrossPlatform-C-Library.html
and the best asnswer seems to be QT.
I have started using QT, but it is not as easy as I expected mainly due to deployment problems due to the DLL hell, Winsxs hell and manifest hell.
Tclkit is a single-file, self-contained Tcl/Tk system. The mac version I have is about 3.8 megs. You can get a version for just about any modern OS. I carry around a thumb drive that has mac, windows and linux binaries so I can run my scripts on any platform. No install is required, just copy one file wherever you want.
The most recent versions of tcklit use native, themed widgets (though, on *nix there really isn't a single "native" set of widgets...)