This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: redhat-list@listman.redhat.com From: "Greg Stewart" <durbatullukk@hotmail.com> Subject: Installing source rpm, RH8.0 Date: Sat, 1 Mar 2003 11:15:33 -0000 I've installed RH psyche in order to learn how to program on linux, and I've been trying to install source code, particularly that for vim. Running: rpm -i -v vim-6.1-14.src.rpm (as root from the package dir) prints out vim-6.1-14 but rpm -q -v vim-6.1-14 indicates the package isn't installed. All that happens is that about 100 patch and tar.gz files etc are created in /usr/src/redhat/SOURCES/. It's as if some script was supposed to be run to amalgamate them and doesn't. Trying to install using redhat-config-packages doesn't do much better, except that an rpm -q will indicate the package installed - the files in /SOURCES/ remain the same unusable bunch... The machine isn't internet connected so I can't just download source willy nilly from the web. Any pointers would be very useful. === To: redhat-list@listman.redhat.com From: Michael Schwendt <ms0301rh@arcor.de> Subject: Re: Installing source rpm, RH8.0 Date: Sat, 1 Mar 2003 12:49:25 +0100 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 1 Mar 2003 11:15:33 -0000, Greg Stewart wrote: > I've installed RH psyche in order to learn how to program on linux, and I've > been trying to install source code, particularly that for vim. > > Running: > > rpm -i -v vim-6.1-14.src.rpm (as root from the package dir) prints out > > vim-6.1-14 > > but rpm -q -v vim-6.1-14 indicates the package isn't installed. Correct. Source rpms get extracted, not installed. > All > that happens is that about 100 patch and tar.gz files etc are created in > /usr/src/redhat/SOURCES/. Correct. That's expected behaviour, though you shouldn't extract source rpms as root. You write you want the source code for vim. It's in the tar.gz archive. > It's as if some script was supposed to be run to amalgamate them and > doesn't. Trying to install using redhat-config-packages doesn't do much > better, except that an rpm -q will indicate the package installed - the > files in /SOURCES/ remain the same unusable bunch... Installing a src.rpm will never make "rpm -q" report that the file is installed. === To: redhat-list@listman.redhat.com From: "Michael A. Peters" <mpeters@mac.com> Subject: Re: Installing source rpm, RH8.0 Date: 01 Mar 2003 05:19:55 -0800 A source rpm makes no entries to the rpm database, so rpm -q won't display anything. I have NO CLUE why Red Hat doesn't do this by default (they should) but you don't want to install src.rpm's as root (or build them as root). create a directory in your home directory called rpm Within that directory put the necessary subdirectories: rpm/SPECS rpm/BUILD rpm/SOURCES rpm/SRPMS rpm/RPMS/[i386,i486,i586,i686,athlon,noarch] rpm/tmp once those are created - create a file in your home directory called .rpmmacros and put the following in it: %_topdir /home/you_user_name/rpm %_tmppath %{_topdir}/tmp That way - you can install src.rpm's and build rpm's without being root, which is much safer to your system - especially if you are learning how to program and messing with creating rpm's yourself. === To: redhat-list@listman.redhat.com From: Michael Fratoni <mfratoni@tuxfan.homeip.net> Subject: Re: Installing source rpm, RH8.0 Date: Sat, 1 Mar 2003 09:39:42 -0500 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday 01 March 2003 06:15 am, Greg Stewart wrote: > I've installed RH psyche in order to learn how to program on linux, and > I've been trying to install source code, particularly that for vim. > > Running: > > rpm -i -v vim-6.1-14.src.rpm (as root from the package dir) prints out > > vim-6.1-14 > > but rpm -q -v vim-6.1-14 indicates the package isn't installed. > All that happens is that about 100 patch and tar.gz files etc are > created in /usr/src/redhat/SOURCES/. Correct, as others have pointed out. You should be doing this as a normal user, not root. A script to set up a non-root rpm environment in your home directory can be found here: http://www.tuxfan.homeip.net:8080/hack.html (usage instructions) http://www.tuxfan.homeip.net:8080/hacks/rpm_environment.tar.gz One thing it changes is that packages will place the sources, patches and spec file in ~/rpmbuild/SOURCES/package-name, rather than dumping all packages in the same directory. (the spec file will be in the same directory, instead of a SPECS directory.) This makes things much less confusing. > It's as if some script was supposed to be run to amalgamate them and > doesn't. Trying to install using redhat-config-packages doesn't do much > better, except that an rpm -q will indicate the package installed - the > files in /SOURCES/ remain the same unusable bunch... Once you have a non-root rpm environment set up, you can run 'rpmbuild -bp package_name.spec' which will extract the source and apply all the included patches. The complete patched source will then be available in ~/rpmbuild/BUILD/package_name/ Hope that helps, - -- - -Michael pgp key: http://www.tuxfan.homeip.net:8080/gpgkey.txt Red Hat Linux 7.{2,3}|8.0 in 8M of RAM: http://www.rule-project.org/ ===