Posted by
michael
on from the my-own-catapult dept.
libertynews writes "KPLUG President Kevin Pedigo has just announced his latest project -- RPMPAN, an archive of CPAN Perl modules in RPM format, generated nightly."
perl with RPM lovin' ?
by
imag0
·
· Score: 5, Funny
I can see where this can go wrong...
# rpm -i myperl.rpm
warning: libsomeshit.so not installed
# rpm -i --force myperl.rpm
warning: libsomeshit.so not installed
# rpm -i --force --nodeps myperl.rpm
segfault. core dumped.
# rm -rf/
Re:perl with RPM lovin' ?
by
Aliencow
·
· Score: 5, Funny
It's more like:
# rpm -Uvh myperl.rpm
warning: libsomeshit.so not installed
# rpm -Uvh myperl.rpm someshitlib.rpm
warning: libXML is missing
# rpm -Uvh myperl.rpm someshitlib.rpm libxml.rpm
warning: mozilla is missing
Then you go berserk. You mirror rpmfind, rpm -Uvh *.rpm, end up with multiple versions of crap in different places, and corrupt the UNIVERSE.
Re:perl with RPM lovin' ?
by
cowbutt
·
· Score: 4, Insightful
Then you go berserk. You mirror rpmfind, rpm -Uvh *.rpm, end up with multiple versions of crap in different places, and corrupt the UNIVERSE.
I know you're exaggerating for dramatic effect, but therein lies your problem. If you're installing random packages from rpmfind.net, you deserve everything you get. Either stick to packages in your distro's native format and created for the version of the distro you're running (errata, install discs, freshrpms.net in that order) or build your own, newer packages, using your distro vendors src.rpms as a template.
If you do this, I promise you'll encounter zero problems.
Too many people think that RPMs are magically some kind of universal package. They aren't and were never intended to be.
--
Re:perl with RPM lovin' ?
by
cowbutt
·
· Score: 4, Interesting
The irony is that shared libraries make it *very* difficult to do a real small stripped down Red Hat installation.
It didn't take me too long (and hour or so, maybe) to get a minimal server-ready RH8 installation down to 300MB. If I removed the documentation under/usr/share/doc and a few other bits, I could probably get that down to about 222MB (this figure includes Perl and a bunch of commonly-used CPAN modules, BTW, so it's actually a trade-off between "minimal" and "actually-useful";-)
There are too many cascading dependencies. You would be better off compiling the stuff you want statically. You'd save space.
Yeah, and then when a security problem is found, you end up having to re-compile the lot. Eww.
--
Re:perl with RPM lovin' ?
by
Anonymous Coward
·
· Score: 4, Informative
Oh yeah, like any other package system is different. You want to experience the same fun on FreeBSD? Try the following which I did last week:
portinstall -v p5-DateTime-Format-ISO8601
Pretty innocent right? I mean what the fuck is involved in parsing dates? The library *I* wrote to parse an ISO8601 subset was about two pages long. You know, dates/times like '2003-05-24' '05-25' 'T12:23:45Z' etc.
Well, after a "little while" here's what it pulled in:
Can't wait to install some of these Perl RPMs on my Red Hat box........ (in this sentence, "can't wait" means "I'm not going to fucking touch this crap")
Re:perl with RPM lovin' ?
by
evil_roy
·
· Score: 4, Funny
Now don't go countering all this FUD with facts. This is/..Anti rpm posts are very important, it is yet another bias that helps the zealots feel better than others.
Re:perl with RPM lovin' ?
by
jonadab
·
· Score: 2, Interesting
He's exaggerating, but he has a point: CPAN is a *much* better package management solution than plain vanilla rpm. There are also tools that go on top of rpm and help somewhat with this, such as urpmi, but as yet none of the package repositories are anywhere near as robust as the CPAN system of mirrors. I have often wished that non-Perl packages were available via CPAN, though I certainly understand why they're not.
-- Cut that out, or I will ship you to Norilsk in a box.
Re:perl with RPM lovin' ?
by
jonadab
·
· Score: 3, Funny
> In fact, I'd go further and say that RPM is the primary tool of > a vast conspiracy plotted jointly by the Freemasons, the Zeta > Reticulans and the Bilderberg group.
No, you are mistaken. The Bilderberg group has nothing to do with it. The true ringleaders are the same nameless group who also mastermind the MVD/NSA/Bahrain connection.
Also, rpm is only their primary tool for one specific purpose (undermining OSS). They have plenty of other tools that they employ, to accomplish various nefarious purposes. For example, they also control the associated press.
-- Cut that out, or I will ship you to Norilsk in a box.
Re:perl with RPM lovin' ?
by
CaptnMArk
·
· Score: 2, Interesting
The problems occurs because software developers are not doing any packaging but the distributors are.
If the basic packaging system was used by developers too this would not be a problem.
Of course, establing one standard will take some time. Especially since different distros package things in slightly different ways.
Re:perl with RPM lovin' ?
by
jonadab
·
· Score: 2, Informative
If its only advantage were installing all dependencies for you, it wouldn't be any better than urpmi or apt. CPAN is better, more advanced than that, able to configure things in ways that rpm can't. It's more closely comparable to portage, if anything, except that CPAN has the additional advantage of a very large and robust mirror system to draw from, and, obviously, that CPAN only has Perl stuff, so you have to already have any _other_ dependencies. (For example, CPAN can update your Perl GTK+ bindings for you, but it can't update GTK+ itself; it can update the DBD::mysql interface, but it can't install or update MySQL itself. This is actually a pretty major limitation, and the best reason I can think of to use any other package management system.)
-- Cut that out, or I will ship you to Norilsk in a box.
How hard is it to install CPAN modules in the first place? This seems like a solution without a problem to me.
Maybe if it were easier to navigate than true CPAN, but according to that page, the way to find your module is by the first letter of that module. So what happened to browsing modules by category? This thing is useless if I need a module for a specific purpose, but I don't know the name of the specific module I'll need.
So, not only are they converting Perl modules to a format they don't really need to be in, but they're making the thing harder to use than CPAN is already.
1) CPAN isn't flawless: yesterday, I tried using it to install File::Temp and it tried upgrading perl from 5.6 to 5.8. That simply isn't the correct thing to do, under any circumstance.
2) Having used FreeBSD, which has perl modules in the ports/package system, I can absolutely say that it's a nice thing to have. Being able to pkg_add a perl module in half a second, no compile time, no dependency hell, it's a good thing.
If you want any programs to be under package control (e.g., Perl applications) it is nice to have their dependencies under package control as well. Otherwise you have to bundle all those dependencies.
Re:Huh?
by
Anonymous Coward
·
· Score: 5, Insightful
Well, since you are looking for a problem, this is it: We run our servers for 3 years minimum, 5 years ideally. During that time, we may or may not need to do updates (security & bugfixes driving that for the most part). During that time, the server + HW RAID + Backup could fail. During that time, we may need to clone the system. During that time we may have reason to verity the integrity of the files & the system. (You get the idea). During that time you may need to know why the heck file 'foo' is installed on the system, and how to get it to your end user systems (remember, just because it's there doesn't mean YOU put it there - many sites have multiple sysadmins).
RPMs serve as an excellent way to document what's on the system. As a benefit, you can keep them around and repeat the procedure if needed.
Imagine for a moment that you have a live production server that NEEDS to be there; you run nightly full system backups, you have mirrored hot swappable hard disks. Now, something goes wrong and you need to rebuild- terribly wrong, all 15 backup tapes were lost, and the mirrored drives are corrupt; it's 3am and you get the page to come into work. Can you put your system together again? That's but one possible scenario.
Imagine for a moment your sidekick admin, who's since quite, built the system without your knowledge. You need to do that again- what did he do? what's installed? how do you reproduce it? OH, and of course your coworker had almost next to no documentation on what specifically they did.
Having RPMS isn't about the 'ease of install' - installing the software is easy! It's about the ease of ongoing maintenance & accountability for the system. Debian packages fall into the same category.
In addition to above, a more familiar way of looking at it; look at all the crap that builds up in windows as you add/remove software. Eventually, you need to reformat, etc. Installing software on Linux is similar.
3 years down the road... did...humm... I... arg... install... Time::HiRes?
> 1) CPAN isn't flawless: yesterday, I tried using it to install File::Temp and it tried upgrading perl from 5.6 to 5.8. That simply isn't the correct thing to do, under any circumstance.
I've found through experience with just this very thing that the first command run through CPAN should be:
perl -MCPAN -e shell
install Bundle::CPAN
Upgrading to the newest version is necessary to get it to leave perl the hell alone.
So once you get past that hurdle, I find the worst part about CPAN is that some packages which everyone uses like mod_perl, DBI, and DBD::mysql fail to install unless Apache was compiled the correct way and currently running, or MYSQL is running and allows some bullshit nameless user to access all databases (!)
In RedHat Linux 7.x (maybe 8.x and later too), the mod_perl RPM is installed by default, but Apache isn't compiled correct to play nicely with it. So if you want to actually use mod_perl's features (i.e. install Bundle::apache in CPAN) then you have to uninstall apache and compile it by hand.
Frustrat-o-rama.
But in general, CPAN rocks. If it wasn't for CPAN then perl wouldn't be as popular as it is today. Why, just earlier this evening I was thinking that I'd love for users of a web app I'm working on to be able to import data from Excel files rather than just comma-delimited, I did a quick search at search.cpan.org and WHAM, one 'install Spreadsheet::ParseExcel::Simple' later and now users can upload Excel files. I can't think of any other language that makes it this easy to find and reuse libraries.
CPAN makes me look like I'm really good at what I do.
No real disagreements, but it *is* nice to have this sort of stuff managed by your package manager.
Except that there need to be different rpms for RedHat, Mandrake, SuSE... and for different versions of those distros. What's the probability that this archive will track all of that? 10 %? Lower?
Really, the cpan setup keeps track of its own dependencies, and gives you flippant comments like "yep, it's a nice idea to include this if you actually were to wish to use that" to boot. No rpm setup can get close to that.
How hard is it to install CPAN modules in the first place? This seems like a solution without a problem to me.
It isn't very hard to do "./configure && make install" either for normal software, yet we still haver package managers?
Why, you ask? Because we want to be able to uninstall stuff as well, because we want to have dependencies and because we want everything relating to software installation be handled by one program (apt or yum, for example).
So, not only are they converting Perl modules to a format they don't really need to be in
Perl modules are libraries and they need to be packaged just as much as C/C++ libraries!
but they're making the thing harder to use than CPAN is already.
Simply untrue, why would "apt-get install foo-bar" be any harder than "perl -MCPAN -e 'install foo::bar'" or whatever. Actually, Perl/CPAN version is bit harder to use.
You may not see it, but there was a problem and this is exactly the solution that was needed.
> So once you get past that hurdle, I find the worst part about CPAN > is that some packages which everyone uses like mod_perl, DBI, and > DBD::mysql fail to install unless Apache was compiled the correct > way and currently running, or MYSQL is running and allows some > bullshit nameless user to access all databases (!)
For DBD::mysql, I think you can say no when it asks if you want to test. mod_perl is a problem if you don't have the Apache sources installed, and IMO the correct solution is to include Apache on CPAN and make mod_perl depend on it. After all, Apache is basically a really big XS module, right? Oh, that same approach could be taken for MySQL and other packages that, while they aren't part of perl per se, exist primarily to be used by perl.
-- Cut that out, or I will ship you to Norilsk in a box.
seems a little wasteful..
by
nich37ways
·
· Score: 2, Interesting
Why exactly do they need to do this every night?? Surely it would be infinetly simpler to just rsync against the server with the CPAN modules and then only rebuild RPMS for new/modified modules.
You could even use perl to do this...
-- 37 - what does it stand for really...
What exactly was wrong with...
by
ultrapenguin
·
· Score: 3, Insightful
perl -MCPAN -e 'install SomePerlModule'?
It would get compiled for your system, warning you and/or downloading all the required dependencies.
Re:What exactly was wrong with...
by
jrp2
·
· Score: 2, Funny
I sort of agree, installing using the CPAN tool is pretty easy. But, I maintain some custom install RedHat CDs that need some PMs not installed by RedHat. I have the user install them using the MCPAN tool, but it sure would be easier just adding them to the list of RPMS for anaconda to install at system creation time.
I guess it would also be easier for perl developers creating RPMs to bundle these in with their RPMs for a single RPM based install rather than adding instructions for MCPAN.
I think it is a good thing to do this to make Linux one (albeit very small) step easier. Every little bit helps.
-- The only athletic sport I ever mastered was backgammon - Douglas William Jerrold
Re:What exactly was wrong with...
by
joe_fish
·
· Score: 4, Insightful
From having fought to get Bugzilla installed for about 2 days, most of the time being spent using -MCPAN can say with feeling - everything.
No uninstall.
It is yet another package system to learn
I didn't work without quite a bit of hacking (but perhaps you can blame Solaris for this)
It isn't exactly a logical syntax, compare
perl -MCPAN -e 'install "Foo::Bar"'
with
apt-get install foo-bar
And I want the dependency system to work with my systems dependency system, and not in a parallel universe.
The Java-RPM system over at JPackage.org is good and useful, I hope this will be similarly useful.
Perl programmers can (and probably will) carry on using cpan, the rest of us can have an easier life when red-carpet or apt-get just does the right thing.
Re:What exactly was wrong with...
by
Sax+Maniac
·
· Score: 2, Informative
I just went through the same thing. And, might I add:
When a binary module fails to compile, you have no idea what to do. You're SOL unless you feel like debugging perl's C code; which I don't, because the reason I'm installing bugzilla is because I have my own bugs to deal with.
When a module fails its tests, you have no idea what to do. Similarly SOL.
Lesson learned: never install a binary Perl package with CPAN. Go get the RPM for your distro, and hope it hasn't been EOL'd yet (trying to find RedHat 7.2 RPMs is a treat).
To its credit, CPAN worked for the perl-only modules, except it wants to download the 300K index file each time you start it. Hello!? Wouldn't once per day be enough?! And WTF is with using lynx to download stuff? What is wrong with wget?
-- I can explanate how to administrate your network. You must configurate and segmentate it, so it can computate.
Need the reverse of this
by
Julian+Morrison
·
· Score: 4, Insightful
I use Mandrake and it is So Bloody Annoying to be asked by RPM to install perl module RPMs that I already installed (or updated) via "perl -MCPAN -eshell".
Not that this is really this guy's problem, but if anyone from Mandrake is reading, please take note. Either there needs to be some magic added to RPM so it treats perl modules as installed RPMs - or else, the dependency checks need to be able to look for the presence of actual modules.
Having to use --nodeps is both annoying and dangerous.
Re:Need the reverse of this
by
nzkoz
·
· Score: 2, Insightful
This is the reason for the RPMPan project. You'll be able to install the modules as RPMs in the first place, and software that is not in CPAN will be able to list them as dependencies.
Sounds like a solution to your problem.
Alternatively, there's always --nodeps if you're sure.
-- Cheers
Koz
CPAN == RPM for Perl mods
by
Shut+the+fuck+up!
·
· Score: 2, Insightful
CPAN makes it so easy to install perl modules. Why do we need rpms?
Re:CPAN installs dependencies on the fly
by
eln
·
· Score: 3, Interesting
Except this thing requires a network connection too! And CPAN, IIRC, is a standard part of Perl, so if you don't have CPAN, then you don't have Perl, and thus have no use for CPAN.
In the FAQ, it states that the reasons for doing this are 1.) cool points and 2.) to hawk his book (okay he doesn't say that in as many words). Plus, it's written as a shell script, because shell scripts are portable. There is no explanation given as to why he couldn't have written it in Perl, since any system that would have any use for it at all would have Perl installed.
So, basically, he's taking the awesome resource that is CPAN, making it less useful, less portable (RedHat only), more obtuse, and more prone to error (only "around 90%" of the modules work right). Yah, this seems like a really great idea to me.
It solves a problem
by
cspenn
·
· Score: 5, Insightful
I see a lot of posts asking "Why" since perl -MCPAN -e shell is about as straightforward as it can get.
Obviously, it was created to scratch an itch, so cut the guy some slack. If you don't like it, don't install it. For him, and maybe for others who are new to it all and are just comfortable with one tool, it solves a problem.
I think this is what RedHat and Mandrake users would really like, the trick is probably in keeping all the RPMs up to date. Hope that there is a system that automatically creates RPMs from perl's CPAN module. then all one has to do is "perl -MCPAN -i " and this would download, compile, make a package and install. It would even better to make it package manager independent and add.deb support as well.
-- Unix, Computers and science fiction...
What else can one want in life ?
Re:CPAN == RPM for Perl mods
by
akedia
·
· Score: 5, Insightful
There are some cases where a strictly "binary-only" system would be wanted. It is possible to build RedHat servers without GCC and stripped-down C libraries for various reasons, such as really small hard drive, or security (kinda hard for users to compile rootkits if there's no C compilier available).
CPAN builds the Perl modules in the same way you would on a source-based distro. It downloads the tarball, unzips it, does a
./configure
, checks for dependencies, then does a
make
and
make install
. RPMS don't require compiliation, and for systems lacking a C compilier, or systems with many Perl modules to install, this can be very useful. Try to imagine downloading and compiling the entire CPAN archive. It would take a week even on a fast system. Let the developers build it on something massively distributed and release an RPM that takes a few minutes to install.
Already like this on FreeBSD systems. Called BSDPAN. Perl can be installed through the ports tree, and upgraded as easily.
I = Newb ... find RPM = Good .... usually
by
skogs
·
· Score: 2, Funny
I would definitely consider myself a newb to linux. been playing with it for a few months on and off. Can install them all and get them all working fully now. I can set up my webserver and link up my little homebrew website...I can serve email to myself.
I'll be honest. I am much more confident with the RPM package manager than the CPAN command you all are saying is so wonderful. Perhaps if I read an instruction book or something...but I don't generally program, so I don't have those books laying around.
I think its a good idea for newbs that can play around with the scripts and hopefully find something that works. Right now I'm working on learning PHP...but am obviously not competent on it yet.
It may be redundant for most of you well learned folks...but then so is that damn gui. I bet you all wish the gui didn't load either...since it is so redundant.:)
-- Who is this that even the wind and the waves obey Him? Surely this computer must submit also!
Already Done in Debian
by
EconomyGuy
·
· Score: 2, Informative
And its great! The best part is that.debs can specify dependencies on perl modules, which can then be met via apt. This has the added benefit of keeping all files under the control of the package manager... instead of floating around in limbo.
Of course, some of the more obscure modules never get packaged... so if this RPM database proves succesful, perhaps Debian could look into automating the package of all the smaller, less used modules.
-- Only 120 characters... who can summarize their entire world understanding in 120 characters?!
CPAN Shell makes installation easy, yes. Now show us what the command for uninstallation is.
Also, it would be helpful if the CPAN Shell command you'll show us could warn of lingering dependencies (where package A strictly depends on B and if you uninstall B you'll be warned that if you proceed package A will not work anymore).
Re:CPAN installs dependencies on the fly
by
Kymermosst
·
· Score: 2, Interesting
(RedHat only)
Oh, only RedHat uses RPM? I thought SuSE and Mandrake, as well as a few others did as well. Shows what I know.
Seriously, though. I use CPAN myself, but CPAN doesn't update the RPM database with dependency & file information and such. What would be a good solution is an optional extension to the CPAN module that allowed it to place files in the RPM database.
-- "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
Even better in Debian
by
addikt10
·
· Score: 3, Informative
Using dh-make-perl, you can automatically grab the latest source for any module on CPAN that isn't already included in the Debian distribution, and make a deb package for it, trivially managing future updates and installation.
- it lets me search, and read the module descriptions (assuming the lazy sod module creator has written one).
- it lets me check what's out-of-date with a single command ("r"). It automatically keeps in sync with CPAN's module repository. It even updates itself live (install Bundle::CPAN; reload cpan).
- it doesn't merely install binaries, it runs the compile (so the result is guaranteed to work with my libs, or at least complain sensibly) and often asks for config options.
- it already does all the dependency stuff that RPM could do, and it does it cleaner and better and in pure perl. It detects actual dependencies rather than merely advertised ones. It can fetch the required modules and install them, without needing to ask.
- it does all this from a friendly unified command line app that I can run remotely over SSH on a co-lo server.
- it's in every install of perl (well, Perl-for-Windows is a special case, but that's nothing new).
Perl on Debian
by
penguin7of9
·
· Score: 2, Insightful
Perl packages have been packaged as Debian packages for quite some time--the package and all dependencies are automatically downloaded and they are automatically kept updated.
How is this different from Debian?
by
Ramses0
·
· Score: 2, Insightful
I'm a little bit confused as to how this is different from Debian's handling of Perl modules? Most any perl package (ie: "Date::Manip") is available as: "lib-perl", like "libdate-manip-perl".
Since they're Debian packages, you get full dependency upgrades, security updates (ie, for CGI.pm) mostly for free, although I'm guessing you're not going to get all the newest / latest / minor / crappy modules. Is that the only advantage?
CPAN is banned from the servers I manage, because it likes to sometimes install shit into/usr and overwrite the OS's packaged perl libs. Bear in mind that this is after having edited the config file and pointing to/usr/local as the path to install shit into. Some modules install ok, but others just like to do whatever they want (as opposed to whatever you want). I've made it a rule that nobody with root access is to ever use CPAN to install anything (or else they get to clean up the fucking mess). Since these are all Debian servers, a lot of stuff is availabled in packaged format already, and those that aren't can be easily packaged thanks to dh-make-perl (it's so simple to use, there is no excuse not to.) And anyway, a lot of people already know CPAN sucks, which is why there exists CPAN++, but it's still in developement, or so was last I heard. Of course, if it's just some user installing modules in his home dir, then CPAN works alright... Otherwise, caveat emptor!
A lot of people seem to be really missing the point of this idea and seem to be making what I would call the "waaah! you can't be a real perl hacker if you like this idea" response.
First, a number of Perl packages already ship in RPM format and are distributed with Red Hat and other RPM-based distributions. This will integrate much more nicely and if package names are chosen well, it will avoid conflicts between CPAN-installed packages and RPM-installed packages. I myself use Debian and always use the Debian package instead of CPAN if it's available. It's easier, it's faster, and (in the case of Debian) you get various fixes that might not have made it into the upstream.
Once you're using some packages for Perl stuff, you might as well try to get everything in the distribution package format. In addition, I think the more appropriate question is why it's taken so long for someone to think of and then implement this idea. Why on earth would you want to use more than one package management system on your box, especially when CPAN is just for Perl packages. Using CPAN when RPM packages are available might even be silly (provided the packages are well-constructed, I don't know that they will be).
Plus, the truth is, CPAN is cool and all, but it's not all that great. The usage is bizarre and if an average user isn't a Perl person, then why should they need to learn perl to install some perl-based package that depends on some CPAN modules? CPAN also is just plain inferior to RPM and.deb when it comes to installation, deinstallation, configuration mangagement, upgrades, and just about everything else.
Now, I just hope they decide to do the same for Debian packages. (Debian provides quite a few already, but more is better.)
Perl Modules on FreeBSD
by
Anonymous Coward
·
· Score: 2, Informative
In 5.1-RELEASE at least, the CPAN module is integrated with the FreeBSD package system so that when you install a module via -MCPAN, it also registers in the package database. There are quite a few modules in the ports tree, but it seems easier simply to get the most up-to-date modules off of CPAN and then use pkg_* to deal with uninstalling modules and whatnot. Generating nightly RPMs of the entire CPAN tree seems like a fair amount of overhead. Are there enough uses for this to warrant it?
How to do this in Debian!
by
GoRK
·
· Score: 2, Informative
Debian has (for quite a number of years, anyway) had the ability to generate a debian package from CPAN souces with a very very very minimal effort.
Here's how to do it in three easy steps:
Step 1: Go to CPAN and figure out what you want.
Step 2: dh-make-perl --cpan --build --install
Step 3: There is no step three!
~GoRK
Just tried this today. My results.
by
deathcow
·
· Score: 2, Informative
Apparantly there is a major disconnect between package dependencies and what is actually installed on a box.
I wanted to add RPC::XML to my Mandrake box, so I tried installing the rpm version. It complained about a list of about 20 failed dependencies, missing packages.
So I grabbed the tar from CPAN and did the good old make install and it mentioned that only the XML-Parser was missing.
So... would the rpm have worked if I told it to ignore dependencies, since those perl lib's were already on the box?
Re:obligatory gentoo zealotry
by
lanalyst
·
· Score: 3, Informative
/usr/bin/g-cpan.pl Module::Name
Perl Modules as RPM Packages
by
moonbeam
·
· Score: 2, Insightful
Bad idea.
The Perl environment is installation dependant. The location of your siteperl, the C compiler version, the location of your libs, and even the version of your compilor are encoded into the makemaker environment.
The use of RPM to install modules will require that all distributions follow a standard.
What if I wnated to install perl 5.8 on/opt/perl/perl5.8 while my production 5.6 in running on/opt/perl/perl5.6?
What do I do if the RPM binary was built with incompatable paths and compilers?
Re:CPAN installs dependencies on the fly
by
LinuxGeek8
·
· Score: 2, Insightful
Oh, only RedHat uses RPM? I thought SuSE and Mandrake, as well as a few others did as well.
They do use different versions of perl. You could say every distribution, and every version of a distribution is different. A package made on Redhat isn't guaranteed to work on Mandrake, and vice-versa. So if this projects makes rpms for Redhat, then that's what it does.
What would be a good solution is an optional extension to the CPAN module that allowed it to place files in the RPM database.
Isn't that what cpan2rpm is for?
-- Well, don't worry about that. We can get you back before you leave. (Dr. Who)
Re:obligatory gentoo zealotry
by
lanalyst
·
· Score: 2, Informative
g-cpan.pl is part of portage.. on every gentoo system. It dynamically generates ebuild scripts, downloads the source, builds the package in sandbox, merges them, putting entries in the world file, etc.
It does not do updates - it doesn't 'sync' with anything. It's a mechanism to merge (and unmerge) anything that's available on CPAN.
Overall it's pretty sweet.. and needs exposure.
Re:CPAN == RPM for Perl mods
by
juhaz
·
· Score: 3, Informative
Because perl modules aren't (or shouldn't be) any different from other software and should be handled by same system that handles all the other software?
Why should we have different database for perl modules than rest of the system? While we're it for perl, why not make one for c, another for c++, yet one for java, then there should be one for python, etc etc. That'd be a frickin' nightmare and best of all those wouldn't have any knowledge of each other, so if my C program depends on perl modules it wouldn't have any way of knowing if it's installed or not because it uses different package manager.
Thanks but no thanks. I want one thing to keep track of ALL software, no matter what language it's written in.
Herein lies the problem of "parallel" package dependancy managers: Each package system, whether it is RPM,.deb, the FreeBSD ports collection, or any other system, maintains a database of what is installed. This creates the following problems:
Once you use a package management system, you are locked into that system.
If you use two (or more) different systems, one will not know about the other and you'll end up with an awful mess when you install things with similar dependencies.
If you manually build and install some software, the package managers won't know about it and you'll end up with a mess.
Instead of using a database of some sort in the package manager, why don't the package managers "search" for the proper dependencies? I know it might take significant resources to perform such a search, but it can be narrowed down by a simple configuration file (like/etc/dependencies or something) that tells all package managers where to look for stuff. All the package managers and ports collections out there will agree on some minimal standard and then regardless of the advantages or disadvantages of each system, they'll get along together as far as dependencies are concerned.
Once something like that takes place, you'll be able to download whichever package format(s) you choose at any time, and ideas like Perl Module RPMs will be a good idea.
I can see where this can go wrong...
/
# rpm -i myperl.rpm
warning: libsomeshit.so not installed
# rpm -i --force myperl.rpm
warning: libsomeshit.so not installed
# rpm -i --force --nodeps myperl.rpm
segfault. core dumped.
# rm -rf
How hard is it to install CPAN modules in the first place? This seems like a solution without a problem to me.
Maybe if it were easier to navigate than true CPAN, but according to that page, the way to find your module is by the first letter of that module. So what happened to browsing modules by category? This thing is useless if I need a module for a specific purpose, but I don't know the name of the specific module I'll need.
So, not only are they converting Perl modules to a format they don't really need to be in, but they're making the thing harder to use than CPAN is already.
Why exactly do they need to do this every night??
Surely it would be infinetly simpler to just rsync against the server with the CPAN modules and then only rebuild RPMS for new/modified modules.
You could even use perl to do this...
37 - what does it stand for really...
perl -MCPAN -e 'install SomePerlModule'?
It would get compiled for your system, warning you and/or downloading all the required dependencies.
OK Excuse me for being stupid but how is this any different from existing p5-Foo-Bar.rpm?
Rus
Cheap UK and US VPS
I use Mandrake and it is So Bloody Annoying to be asked by RPM to install perl module RPMs that I already installed (or updated) via "perl -MCPAN -eshell".
Not that this is really this guy's problem, but if anyone from Mandrake is reading, please take note. Either there needs to be some magic added to RPM so it treats perl modules as installed RPMs - or else, the dependency checks need to be able to look for the presence of actual modules.
Having to use --nodeps is both annoying and dangerous.
CPAN makes it so easy to install perl modules. Why do we need rpms?
Except this thing requires a network connection too! And CPAN, IIRC, is a standard part of Perl, so if you don't have CPAN, then you don't have Perl, and thus have no use for CPAN.
In the FAQ, it states that the reasons for doing this are 1.) cool points and 2.) to hawk his book (okay he doesn't say that in as many words). Plus, it's written as a shell script, because shell scripts are portable. There is no explanation given as to why he couldn't have written it in Perl, since any system that would have any use for it at all would have Perl installed.
So, basically, he's taking the awesome resource that is CPAN, making it less useful, less portable (RedHat only), more obtuse, and more prone to error (only "around 90%" of the modules work right). Yah, this seems like a really great idea to me.
I see a lot of posts asking "Why" since perl -MCPAN -e shell is about as straightforward as it can get.
Obviously, it was created to scratch an itch, so cut the guy some slack. If you don't like it, don't install it. For him, and maybe for others who are new to it all and are just comfortable with one tool, it solves a problem.
Chris
http://www.studentplatinum.com
Subscribe for free to my show!
I think this is what RedHat and Mandrake users would really like, the trick is probably in keeping all the RPMs up to date. Hope that there is a system that automatically creates RPMs from perl's CPAN module. then all one has to do is "perl -MCPAN -i " and this would download, compile, make a package and install. It would even better to make it package manager independent and add .deb support as well.
Unix, Computers and science fiction... What else can one want in life ?
CPAN builds the Perl modules in the same way you would on a source-based distro. It downloads the tarball, unzips it, does a , checks for dependencies, then does a and . RPMS don't require compiliation, and for systems lacking a C compilier, or systems with many Perl modules to install, this can be very useful. Try to imagine downloading and compiling the entire CPAN archive. It would take a week even on a fast system. Let the developers build it on something massively distributed and release an RPM that takes a few minutes to install.
Already like this on FreeBSD systems. Called BSDPAN. Perl can be installed through the ports tree, and upgraded as easily.
I'll be honest. I am much more confident with the RPM package manager than the CPAN command you all are saying is so wonderful. Perhaps if I read an instruction book or something...but I don't generally program, so I don't have those books laying around.
I think its a good idea for newbs that can play around with the scripts and hopefully find something that works. Right now I'm working on learning PHP...but am obviously not competent on it yet.
It may be redundant for most of you well learned folks...but then so is that damn gui. I bet you all wish the gui didn't load either...since it is so redundant. :)
Who is this that even the wind and the waves obey Him? Surely this computer must submit also!
And its great! The best part is that .debs can specify dependencies on perl modules, which can then be met via apt. This has the added benefit of keeping all files under the control of the package manager... instead of floating around in limbo.
Of course, some of the more obscure modules never get packaged... so if this RPM database proves succesful, perhaps Debian could look into automating the package of all the smaller, less used modules.
Only 120 characters... who can summarize their entire world understanding in 120 characters?!
CPAN Shell makes installation easy, yes. Now show us what the command for uninstallation is.
Also, it would be helpful if the CPAN Shell command you'll show us could warn of lingering dependencies (where package A strictly depends on B and if you uninstall B you'll be warned that if you proceed package A will not work anymore).
Digital Citizen
Uh, I'd just do:
What's the problem again?(RedHat only)
Oh, only RedHat uses RPM? I thought SuSE and Mandrake, as well as a few others did as well. Shows what I know.
Seriously, though. I use CPAN myself, but CPAN doesn't update the RPM database with dependency & file information and such. What would be a good solution is an optional extension to the CPAN module that allowed it to place files in the RPM database.
"Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
Using dh-make-perl, you can automatically grab the latest source for any module on CPAN that isn't already included in the Debian distribution, and make a deb package for it, trivially managing future updates and installation.
Mmmmmm, Debian
I like the CPAN shell interface.
- it lets me search, and read the module descriptions (assuming the lazy sod module creator has written one).
- it lets me check what's out-of-date with a single command ("r"). It automatically keeps in sync with CPAN's module repository. It even updates itself live (install Bundle::CPAN; reload cpan).
- it doesn't merely install binaries, it runs the compile (so the result is guaranteed to work with my libs, or at least complain sensibly) and often asks for config options.
- it already does all the dependency stuff that RPM could do, and it does it cleaner and better and in pure perl. It detects actual dependencies rather than merely advertised ones. It can fetch the required modules and install them, without needing to ask.
- it does all this from a friendly unified command line app that I can run remotely over SSH on a co-lo server.
- it's in every install of perl (well, Perl-for-Windows is a special case, but that's nothing new).
Perl packages have been packaged as Debian packages for quite some time--the package and all dependencies are automatically downloaded and they are automatically kept updated.
I'm a little bit confused as to how this is different from Debian's handling of Perl modules? Most any perl package (ie: "Date::Manip") is available as: "lib-perl", like "libdate-manip-perl".
Since they're Debian packages, you get full dependency upgrades, security updates (ie, for CGI.pm) mostly for free, although I'm guessing you're not going to get all the newest / latest / minor / crappy modules. Is that the only advantage?
--Robert
CPAN is banned from the servers I manage, because it likes to sometimes install shit into /usr and overwrite the OS's packaged perl libs. Bear in mind that this is after having edited the config file and pointing to /usr/local as the path to install shit into. Some modules install ok, but others just like to do whatever they want (as opposed to whatever you want). I've made it a rule that nobody with root access is to ever use CPAN to install anything (or else they get to clean up the fucking mess). Since these are all Debian servers, a lot of stuff is availabled in packaged format already, and those that aren't can be easily packaged thanks to dh-make-perl (it's so simple to use, there is no excuse not to.) And anyway, a lot of people already know CPAN sucks, which is why there exists CPAN++, but it's still in developement, or so was last I heard.
Of course, if it's just some user installing modules in his home dir, then CPAN works alright... Otherwise, caveat emptor!
First, a number of Perl packages already ship in RPM format and are distributed with Red Hat and other RPM-based distributions. This will integrate much more nicely and if package names are chosen well, it will avoid conflicts between CPAN-installed packages and RPM-installed packages. I myself use Debian and always use the Debian package instead of CPAN if it's available. It's easier, it's faster, and (in the case of Debian) you get various fixes that might not have made it into the upstream.
Once you're using some packages for Perl stuff, you might as well try to get everything in the distribution package format. In addition, I think the more appropriate question is why it's taken so long for someone to think of and then implement this idea. Why on earth would you want to use more than one package management system on your box, especially when CPAN is just for Perl packages. Using CPAN when RPM packages are available might even be silly (provided the packages are well-constructed, I don't know that they will be).
Plus, the truth is, CPAN is cool and all, but it's not all that great. The usage is bizarre and if an average user isn't a Perl person, then why should they need to learn perl to install some perl-based package that depends on some CPAN modules? CPAN also is just plain inferior to RPM and .deb when it comes to installation, deinstallation, configuration mangagement, upgrades, and just about everything else.
Now, I just hope they decide to do the same for Debian packages. (Debian provides quite a few already, but more is better.)
In 5.1-RELEASE at least, the CPAN module is integrated with the FreeBSD package system so that when you install a module via -MCPAN, it also registers in the package database. There are quite a few modules in the ports tree, but it seems easier simply to get the most up-to-date modules off of CPAN and then use pkg_* to deal with uninstalling modules and whatnot. Generating nightly RPMs of the entire CPAN tree seems like a fair amount of overhead. Are there enough uses for this to warrant it?
Debian has (for quite a number of years, anyway) had the ability to generate a debian package from CPAN souces with a very very very minimal effort.
Here's how to do it in three easy steps:
Step 1: Go to CPAN and figure out what you want.
Step 2: dh-make-perl --cpan --build --install
Step 3: There is no step three!
~GoRK
Apparantly there is a major disconnect between package dependencies and what is actually installed on a box.
I wanted to add RPC::XML to my Mandrake box, so I tried installing the rpm version. It complained about a list of about 20 failed dependencies, missing packages.
So I grabbed the tar from CPAN and did the good old make install and it mentioned that only the XML-Parser was missing.
So... would the rpm have worked if I told it to ignore dependencies, since those perl lib's were already on the box?
/usr/bin/g-cpan.pl Module::Name
Bad idea.
/opt/perl/perl5.8 while my production 5.6 in running on /opt/perl/perl5.6?
The Perl environment is installation dependant. The location of your siteperl, the C compiler version, the location of your libs, and even the version of your compilor are encoded into the makemaker environment.
The use of RPM to install modules will require that all distributions follow a standard.
What if I wnated to install perl 5.8 on
What do I do if the RPM binary was built with incompatable paths and compilers?
William
---- perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(
Oh, only RedHat uses RPM? I thought SuSE and Mandrake, as well as a few others did as well.
They do use different versions of perl. You could say every distribution, and every version of a distribution is different. A package made on Redhat isn't guaranteed to work on Mandrake, and vice-versa. So if this projects makes rpms for Redhat, then that's what it does.
What would be a good solution is an optional extension to the CPAN module that allowed it to place files in the RPM database.
Isn't that what cpan2rpm is for?
Well, don't worry about that. We can get you back before you leave. (Dr. Who)
g-cpan.pl is part of portage.. on every gentoo system. It dynamically generates ebuild scripts, downloads the source, builds the package in sandbox, merges them, putting entries in the world file, etc.
It does not do updates - it doesn't 'sync' with anything. It's a mechanism to merge (and unmerge) anything that's available on CPAN.
Overall it's pretty sweet.. and needs exposure.
Because perl modules aren't (or shouldn't be) any different from other software and should be handled by same system that handles all the other software?
Why should we have different database for perl modules than rest of the system? While we're it for perl, why not make one for c, another for c++, yet one for java, then there should be one for python, etc etc. That'd be a frickin' nightmare and best of all those wouldn't have any knowledge of each other, so if my C program depends on perl modules it wouldn't have any way of knowing if it's installed or not because it uses different package manager.
Thanks but no thanks. I want one thing to keep track of ALL software, no matter what language it's written in.
- Once you use a package management system, you are locked into that system.
- If you use two (or more) different systems, one will not know about the other and you'll end up with an awful mess when you install things with similar dependencies.
- If you manually build and install some software, the package managers won't know about it and you'll end up with a mess.
Instead of using a database of some sort in the package manager, why don't the package managers "search" for the proper dependencies? I know it might take significant resources to perform such a search, but it can be narrowed down by a simple configuration file (likeOnce something like that takes place, you'll be able to download whichever package format(s) you choose at any time, and ideas like Perl Module RPMs will be a good idea.