Source rpms and suse_update_config
![](https://seccdn.libravatar.org/avatar/dde14ae637ae8f7452e3a6cf286272fc.jpg?s=120&d=mm&r=g)
Sometimes it's necessary for one reason or another to install a SuSE rpm package by going back to the source and rebuilding the object RPM. It's remarkably easy. Here are the steps: 1. Get the source RPM from the SuSE online archives or your installation media. 2. Move the package foo.src.rpm to the directory /usr/src/packages/SRPMS. 3. cd to that directory and do rpm -ihv foo.src.rpm 4. cd up and across to /usr/src/packages/SPECS 5. Do rpm -bb foo.spec which will invoke a lot of whirring machinery. 6. The newly built package foo.rpm will show up in /usr/src/packages/RPMS. However, I encountered a "gotcha" pertaining to a SuSE-defined rpm macro suse_update_config. The process in step 5 may die because that macro is undefined (if that's the problem, a glance at the end of the output will make that obvious). A likely cause is that you have a file /etc/rpmrc left over from some older SuSE installation. If you do, delete it. It belongs to no package in current SuSE systems and will not be missed. That will make the definition of suse_update_config visible again. (It took me a couple of days to discover all that.) SuSE folks, please put something about suse_update_config in your support database. Paul Abrahams
![](https://seccdn.libravatar.org/avatar/d70f8a8240c69007852b9d1bf27e170b.jpg?s=120&d=mm&r=g)
* Paul W. Abrahams (abrahams@acm.org) [020328 07:27]:
3. cd to that directory and do
rpm -ihv foo.src.rpm
4. cd up and across to /usr/src/packages/SPECS
5. Do
rpm -bb foo.spec
Or just rpm --rebuild foo.src.rpm which does steps 3-5 for you.
SuSE folks, please put something about suse_update_config in your support database.
There already is: http://sdb.suse.de/en/sdb/html/ke_source-rpm.html -- -ckm
participants (2)
-
Christopher Mahmood
-
Paul W. Abrahams