RPM Build Box
Jump to navigation
Jump to search
RPM build box setup
These are my notes from setting CentOS-4 for RPM package building on my home network. The same should apply for pretty much any version of CentOS or Red Hat.
- install base os
- update the os & kernel using yum update
- add my user mdf (uid 1000), add to wheel group
- add family group (gid 5000) just for grins
- setup sudoers by uncommenting line with #wheel nopasswd
- (If necessary) run lokkit and disable firewall (or enable just ssh)
- create build folders
mkdir -p redhat/{SPECS,SRPMS,RPMS,SOURCES,BUILD}
- configure ~/.rpmmacros
%_topdir /home/user/redhat %_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.el4.%%{ARCH}.rpm %_unpackaged_files_terminate_build 0 %_missing_doc_files_terminate_build 0
Adjust el4 in the %_rpmfilename to match the release, e.g. el3 or el5. Q. Is there an easier way?
Q. Is there are way to get the build packages to automatically go into el4/i386/RPMS/ ?)
- pull down rpmforge-release and install
- install development tools
yum groupinstall 'Development Tools'
- install screen and other packages not included in Development Tools
yum install screen openssl-devel newt-devel pcre-devel libpcap-devel cups-devel \ readline-devel postgresql-devel libxml2-devel cyrus-sasl-devel \ gdbm-devel pam-devel libacl-devel libattr-devel openldap-devel \ apr-util-devel byacc flex gtk2-devel xorg-x11-devel kernel-smp-devel \ createrepo repoview
Now I can drop into ~/redhat/SPECS and rpmbuild spec files.
cd redhat/SPECS rpmbuild -ba dnstop.spec
- Optional: install vmware-tools
Now see RPMBuilding