Today in this post I will be talking about my experience using Mock and Koji. What these two tools do, Mock test the build requires section of the rpm and does a test install in a chroot environment that only test the basic build packages, while Koji is a client-server system that allows you to build in the Fedora farm, it lets you test your package on different architectures.
Starting off with my Mock testing I tested my package on Fedora 15+16 x86_64 distributions, here are my test results:
mock -r fedora-16-x86_64 m4-1.4.16-1.fc16.src.rpm
INFO: Done(m4-1.4.16-1.fc16.src.rpm) Config(fedora-16-x86_64) 2 minutes 16 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-16-x86_64/result
State Changed: end
mock -r fedora-15-x86_64 m4-1.4.16-1.fc16.src.rpm
INFO: Done(m4-1.4.16-1.fc16.src.rpm) Config(fedora-15-x86_64) 3 minutes 36 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-15-x86_64/result
State Changed: end
both test passed without any errors and didn't take too long to complete, overall everything went okay with Mock.
Now moving on to Koji I had to do some initial setup before I was able to use it. First I needed to install this
yum install fedora-packager
then run this script
/usr/bin/fedora-packager-setup
what this script does is links your FAS account to the system you are using by making certificates on that system, it also makes a SSL certificate so you can login to the web interface of each Fedora testing farm. After running the setup and adding my SSL certificate to my web browser I was now able to start my testing in Koji, below are my testing in different architectures:
Primary x86_64
[chris@localhost ~]$ koji build f16 --scratch ~/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm
Uploading srpm: /home/chris/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm
[====================================] 100% 00:00:04 1.58 MiB 397.33 KiB/sec
Created task: 3753781
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=3753781
Watching tasks (this may be safely interrupted)...
http://koji.fedoraproject.org/koji/taskinfo?taskID=3753781
S390 Mainframe
[chris@localhost ~]$ s390-koji build f16 --scratch ~/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm
Uploading srpm: /home/chris/rpmbuild/SRPMS/m4-1.4.16-1.fc16.src.rpm
[====================================] 100% 00:00:04 1.58 MiB 371.75 KiB/sec
Created task: 576359
Task info: http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=576359
Watching tasks (this may be safely interrupted)...
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=576359
ARM Architectures
[chris@localhost Downloads]$ arm-koji build f16 --scratch m4-1.4.16-1.fc16.src.rpm
Uploading srpm: m4-1.4.16-1.fc16.src.rpm
[====================================] 100% 00:00:28 1.58 MiB 56.60 KiB/sec
Created task: 321412
Task info: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=321412
Watching tasks (this may be safely interrupted)...
http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=321412
PowerPC Architecture
[chris@localhost Downloads]$ ppc-koji build f17 --scratch m4-1.4.16-1.fc16.src.rpm
Uploading srpm: m4-1.4.16-1.fc16.src.rpm
[====================================] 100% 00:00:31 1.58 MiB 50.62 KiB/sec
Created task: 366482
Task info: http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=366482
Watching tasks (this may be safely interrupted)...
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=366482
all of my test passed and was able to see them using the web interface and the command line, most of the builds took around the same time since I had to wait for each of my task to get into queue to be completed, in the end they all finished.
Going through and using Mock and Koji I found that these are great tools to use for testing your RPM packages to find any errors or compatibility issues on different architectures. The overall process of getting these tools to run was very simple and easy to use. In the end I had a great experience using Mock and Koji, I like the fact that Mock lets us test our RPM in a chroot environment so we don't mess anything up and Koji is great because we get to test on all kinds of architectures if we don't have physical access to those types of systems.
No comments:
Post a Comment