LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help on RPM --rebuild (https://www.linuxquestions.org/questions/linux-software-2/help-on-rpm-rebuild-52162/)

ztopher 03-28-2003 04:25 AM

Help on RPM --rebuild
 
Hi

When i try to make a binary from a src.rpm with command:
rpm --rebuild I get the following response. Installing <prg_name>. But nothing is installed and i cannot figure out how to make a binary from source. Really hope someone can help me out a bit.


/Ztopher

UserName 03-28-2003 06:35 AM

i think rpm --rebuild is absolete
try rpmbuild --rebuild and let us know


cheers

wapcaplet 03-28-2003 06:35 AM

When you use rpm --rebuild, you ought to see a whole bunch of garbage scrolling up the screen. Most of it is just compiler messages, but towards the end, after it finishes (and assuming it doesn't end with error messages), you should see a line something like:

Wrote RPM to /usr/src/RPM/RPMS/i386/something.rpm

The directory may be different, but you get the idea. Anyway, the point is that using --rebuild does not actually install the software - it just builds the RPM, and you will need to install it yourself after that. Sometimes it'll build more than one RPM (for example, it'll build the software itself, but also some add-on, or development libraries, or whatever). So, from this point, just type:

rpm -ivh /directory/it/gave/you/above/whatever.rpm
or
rpm -Uvh (etc.) if you are upgrading from a previous version.

Hope this helps!

bigrigdriver 03-28-2003 06:46 AM

When you install a .src.rpm, you do get something installed, but not in the way you expect if you're new to rpm's. A .src.rpm installs two files: a spec file in /usr/src/<distroname>/SPECS, and a tarball in /usr/src/<distroname>/SOURCES. When you run rpm --rebuild, your binary rpm will be written to /usr/src/<distroname>/RPMS/arch/i386.


The rpm --rebuild command gives you an installable binary, and should install the binary (according to the man pages, anyway). But, I've never seen the binary installed, only written to the above name directory. I then had an rpm to install. That may be a variation on rpm done by certain distros (controlled by a script somewhere, maybe?). It's a minor hassle for me. I'd rather do it that way anyhow. Build it now; install it after i've had a chance to test it (rpm --test). Hope this helps.:cool:


All times are GMT -5. The time now is 09:50 PM.