Mock

From VVCWiki
Jump to navigationJump to search

Configuration

/etc/mock/site-defaults.cfg
config_opts['macros']['%vendor'] = 'Vadym Chepkov'
config_opts['macros']['%packager'] = 'Vadym Chepkov <vvc@chepkov.com>'
/etc/mock/epel-5-x86_64.cfg
[vvc]
name=vvc
baseurl=http://vvc.homeunix.net:8080/rpms/redhat/5/x86_64/
cost=500

~/.rpmmacros
%_topdir      %(echo $HOME)/rpmbuild
%_smp_mflags  -j3
%__arch_install_post   /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot
%_gpg_name vvc@chepkov.com
%vendor Vadym Chepkov
%packager Vadym Chepkov <vvc@chepkov.com>

Build drbd kernel module rpm

mock -v -r epel-5-x86_64 --init
mock -v -r epel-5-x86_64 --install kernel-xen kernel-devel
mock -v -r epel-5-x86_64 --no-clean --define='kernelversion 2.6.18-194.3.1.el5xen' drbd-km-8.3.7-13.el5.src.rpm