yes, i've read the online docs and followed a link or two to find a simple way to do this, such as: http://sourceware.org/systemtap/wiki/SystemTapOnCentOS so, these days, is that the canonical way to download source rpms? now, note that i'm not arguing about whether this is a good idea. in my circumstances, i want the ability to just "yum download" source rpms so that i can have my students poke around in a source rpm and learn how to build one, nothing more. so, is that reasonable? to just manually add an extra repo file according to that link above (which appears to work perfectly well). frankly, the wiki page on downloading from source: http://wiki.centos.org/PackageManagement/SourceInstalls seems just a touch on the hysterical side. i don't disagree that installing packages from the source rpm is probably a questionable idea. but that doesn't justify simply not explaining how to do it easily. my plan is to install yum-utils to get yumdownloader, add the repo file suggested above, then have students: $ yumdownloader --source <package> so they can examine the source of some packages. is the approach i'm suggesting reasonable? thanks. rday -- =======================================================================Robert P. J. Day Waterloo, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
On Sun, 10 Oct 2010, Robert P. J. Day wrote:> so, these days, is that the canonical way to download source rpms?I am substantially certain we have a wiki article on mirroring, and certainly I've written about mirroring over and over again from many approaches [my most recent blog post, aggregated by http://planet.centos.org/ has a recap at the bottom of some of those articles]. wget, lftp, and lynx all work fine. Of course RPM itself is a fine retrieval tool as well and has been __forever__> so, is that reasonable? to just manually add an extra repo file > according to that link above (which appears to work perfectly well).It is reasonable only if the user also has the willingness and skills to self-support. We don't (and cannot) support what we dont ship> frankly, the wiki page on downloading from source: > > http://wiki.centos.org/PackageManagement/SourceInstalls > > seems just a touch on the hysterical side. i don't disagree that > installing packages from the source rpm is probably a questionable > idea. but that doesn't justify simply not explaining how to do it > easily."Here is a gun, and bullets. Leave it unloaded and in a locked case" and it is perfectly harmless Add another random 'find' and 'great tip to stop RPM from carping about dependencies'with the "--nodeps", and BANG, your system is dead. It is all CentOS and RPM's fault, of course - "dependency hell, don't you know" Yeah -- I know where I am going to send support load, going forward, who is not so hysterical WHAT? you don't want to handle that load RIGHT NOT and for FREE, and on a newbies mis- and partial-information? hunh -- Russ herrold
On Sun, 2010-10-10 at 17:56 -0400, Robert P. J. Day wrote:> so, is that reasonable? to just manually add an extra repo file > according to that link above (which appears to work perfectly well).In my opinion, in most cases there is no particularly good reason to bother compiling a source rpm yourself unless it's something that's not already in a repository. If what you need is not in one of the repositories, then my next step is to either download a src.rpm from somewhere else (fedora, etc.) and see what it takes to compile that, or download the tar archive and see if I can find a .spec file somewhere that does something close to what I'm trying to accomplish. Sometimes there is an old version or a MDK source rpm that contains a .spec file that will provide a starting point. If not, then if it's not a really complex install you can just copy a spec file from another not really complex rpm and use that for a framework.> frankly, the wiki page on downloading from source: > > http://wiki.centos.org/PackageManagement/SourceInstalls > > seems just a touch on the hysterical side.Sounds like pretty good advice to me. I try really hard to install stuff through rpm's. The only exception is with single-executable programs that can just be tossed into /usr/local/bin or ~/bin or whatever; those are generally programs that I have written myself or little utilities downloaded from here and there. If it's a single-executable program without a bunch of support files and whatnot, and if I'm planning to install it on only one or two computers, then it's probably not worth the effort to create a rpm for it. Anything else, is. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
On Sun, 2010-10-10 at 17:56 -0400, Robert P. J. Day wrote:> so they can examine the source of some packages. is the approach i'm > suggesting reasonable? thanks. > > rday--- All on Debian ? John
On Sun, Oct 10, 2010 at 05:56:47PM -0400, Robert P. J. Day wrote:> > my plan is to install yum-utils to get yumdownloader, add the repo > file suggested above, then have students:Are these students paying for whatever training you are supplying? John -- The price we pay for money is paid in liberty. -- Robert Louis Stevenson (1850-1894), novelist, essayist, and poet -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20101010/ae276026/attachment-0002.sig>
On Sun, 10 Oct 2010, John R. Dennison wrote:> On Sun, Oct 10, 2010 at 05:56:47PM -0400, Robert P. J. Day wrote: > > > > my plan is to install yum-utils to get yumdownloader, add the repo > > file suggested above, then have students: > > Are these students paying for whatever training you are > supplying?and on that patronizing, condescending note, this list has pretty much outlived its usefulness. rday -- =======================================================================Robert P. J. Day Waterloo, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
Before yum and when I used to have time for it, I compiled from source everything on my machine. It wasn't that big of a deal. Just took some time. The pay-off was significant in performance and speed... reason being that, if you configure gcc for your particular cpu, the code is able to take advantage of the hard-wired instruction set particular to your cpu which don't exist in the generic cpu the repo binaries are compiled for. IIRC, just to get the source code out of an rpm you could download the source rpm and simply do rpm -i /path/to/package.src.rpm or in one step do rpm -i ftp://path/to/package.src.rpm Alternatively, you could also check out Slackware. The last time I looked at it (several years ago) it didn't use rpm or apt or any package management system at all, just tgz files. This is what Linux used to be before there was a redhat... and it's generally how code files are handled in development before they become rpms... or whatever. Source code shouldn't scare anyone. It's interesting stuff and harmless... just text files, after all. If your students are going to hack around with it and compile it (which I would hope they would do), then of course you'll want to take appropriate measures. More people should be doing this kind of stuff. The world needs more open source developers. Looking at existing code is a great tool for learning.
Robert P. J. Day wrote on 10/10/2010 05:56 PM: ...> http://wiki.centos.org/PackageManagement/SourceInstalls > > seems just a touch on the hysterical side. i don't disagree that > installing packages from the source rpm is probably a questionable > idea. but that doesn't justify simply not explaining how to do it > easily.I think you missed the main point of that page. It is about (not) installing from source tarballs, although using packages from a reliable repo if available is good advice anyway. Perhaps that page would benefit from a link to http://wiki.centos.org/HowTos/RebuildSRPM That is only one hop away via the RPMs link that is on the SourceInstalls page. Any comments on the latter page are welcome, but probably best done on the centos-docs list. Phil
On Sunday, October 10, 2010 05:56:47 pm Robert P. J. Day wrote:> frankly, the wiki page on downloading from source: > http://wiki.centos.org/PackageManagement/SourceInstalls > seems just a touch on the hysterical side.For certain uses and certain software stacks from source is the only sane way. For other stacks and uses the opposite is true. Plone from the Plone.org UnifiedInstaller is one stack where you simply want to stay with a from-source managed-by-zc.buildout setup, not from RPM's. It is one of the very few cases where this is so. In that case you have to balance support from the OS versus support from the Plone upstream; in the case of Plone upstream is preferred. YMMV.> i don't disagree that > installing packages from the source rpm is probably a questionable > idea. but that doesn't justify simply not explaining how to do it > easily.The referenced wiki page has nothing to do with rebuilding a source RPM, but has to do with the 'traditional' ./configure&&make&& sudo make install mantra that is a support nightmare. Properly controlling from source-rpm builds is a sane activity, as long as you take the responsibility for the package, set the EVR for the RPM properly, etc. Good info on how to do this is in the Fedora developer docs. EPEL contains all the rpm developer tools you need, so enable EPEL, load rpmdevtools, and have fun. Support is in your own hands, of course. When there are specific options I need (like building a package with a non-default set of compile-time arguments or modules) I'll do this myself, and keep all the changes in my own setup with EVR > the CentOS package EVR (twiddling epoch, though really really ugly, is quite effective to make you package always win the comparison). But I packaged PostgreSQL for five years, and am not a novice. I'm not as in practice as I once was, but I do try to keep up with most of the current ways of doing things. And I always try to start with the CentOS base package where possible.> my plan is to install yum-utils to get yumdownloader, add the repo > file suggested above, then have students: > > $ yumdownloader --source <package> > > so they can examine the source of some packages. is the approach i'm > suggesting reasonable? thanks.Very reasonable for a learning tool, which is what your question was really asking. Not as reasonable for a production server. Do use the Fedora/EPEL rpmdevtools, though.