16 October 2011 - 11:32pm — Chris Ess
Thursday night, I wrote about building packages with Mock. After working on copying the built packages into my local repository, I've decided there's a better way.
The old way does this to build the RPMs:
mock -r epel-6-x86_64 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm mock -r epel-6-i386 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm mock -r epel-6-x86_64 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm --arch=noarch --no-clean
And then this to copy the files into the repository:
cp /var/lib/mock/epel-6-x86_64/result/*.noarch.rpm $REPOSITORY/x86_64/ cp /var/lib/mock/epel-6-x86_64/result/*.noarch.rpm $REPOSITORY/i386/ cp /var/lib/mock/epel-6-x86_64/result/*.x86_64.rpm $REPOSITORY/x86_64/ cp /var/lib/mock/epel-6-i386/result/*.{i386,i686}.rpm $REPOSITORY/i386/
The new way, instead, does this to build the RPMs:
mock -r epel-6-x86_64 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm mock -r epel-6-x86_64 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm --arch=noarch --no-clean mock -r epel-6-i386 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm mock -r epel-6-i386 rebuild kernel-2.6.32.46-1.el6.oberon.src.rpm --arch=noarch --no-clean
And then this to copy the files into the repository:
cp /var/lib/mock/epel-6-x86_64/result/*.{noarch,x86_64}.rpm $REPOSITORY/x86_64/ cp /var/lib/mock/epel-6-i386/result/*.{noarch,i386,i686}.rpm $REPOSITORY/i386/
This builds the noarch packages in both the 32-bit and 64-bit environments. It's a tradeoff between time and having the deployment step make more sense.
- ‹ Previous: Building RPMs with Mock
- Next: A thought on using RSpec for behavior-driven system administration ›
Topics:
Add new comment