RPM Building
(Redirected from User:Delimiter/RPMBuilding)
Jump to navigation
Jump to search
Once the host(s) have been setup as per RPMBuildBox, building of RPM packages can commence.
For example, to build dnstop I need only to:
cd /share2/redhat/SPECS rpmbuild -bb dnstop.spec
Afterwards, move the generated packages into their final destination
mv /share2/redhat/RPMS/i386/dnstop.*.el4*.rpm /share2/redhat/PUB/4/i386/RPMS/
Update the repo and repoview metadata (the whole shebang). Do this from c4 where repoview is installed and working...
cd /share2/redhat/PUB/5/i386/RPMS/ createrepo -v . repoview -f --template-dir=/share2/redhat/PUB/templates -t 'Centos-5 i386 Packages by mdf' . cd /share2/redhat/PUB/4/i386/RPMS/ createrepo -v . repoview -f --template-dir=/share2/redhat/PUB/templates -t 'Centos-4 i386 Packages by mdf' . cd /share2/redhat/PUB/3/i386/RPMS createrepo -v . repoview -f --template-dir=/share2/redhat/PUB/templates -t 'Centos-3 i386 Packages by mdf' .
Finally, sync the tree up to dango
cd /share2/redhat/PUB ./syncout
Note that the KID templates for repoview can be customized by copying the templates folder from the distribution into /share2/redhat/PUB then using the --template-dir arg to repoview.
Misc. Tips
Using the "Obsoletes:" tag in a SPEC file ensures the package replaces some other package name. For instance, openntpd could specify this...
Obsoletes: ntp