Tuesday, January 25, 2011

SBR600 Mock and Koji Lab

Hello everybody,

Today, I will discuss about Mock and koji. In previous lab (please look at my last post), I made my package and tested with rpmlint command successfully. Now, next step is Mock command. Mock is used to test that the BuildRequires for a package are complete and accurate. In order to use Mock command, I ran the following commands:
                       yum install mock  ------------------------->Install Mock
                       usermod -G mock ktaraghi ---------->Add myself to the mock group

Then, I ran this command:

                       mock -r fedora-14-x86_64 nano-2.2.6-1.fc14.src.rpm

which nano-2.2.6-1.fc14.src.rpm is my SRPM and fedora-14-x86_64 are distribution-release-arch values. I wanted to test in fedora 14 distribution with x86_64 architecture. Hopefully, I didn't have any errors in my SRPM but, it took a long time to test it. I thought that my bash shell has crashed, but when I look at my log file with this command:

tail -f /var/lib/mock/fedora-13-x86_64/result/build.log


I understood that it was downloading something with 300 MB size. Next step was koji. I installed koji with this command: yum install fedora-packager
and then ran this command:  /usr/bin/fedora-packager-setup 
If you want to use Koji to build Fedora packages you should use this command. It shows you the necessary information for getting certificate and is very easy process.
To queue the build request on the main koji server, I used this command:
koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm 
and it was successful. Also, it worked with other architecture such as arm,sparc, and S390. These are the commands that I used for other architecture.  
s390-koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm 
sparc-koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm 
arm-koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm  
The followings are the output of my first and second commands that I mentioned above:

$ koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm
Uploading srpm: nano-2.2.6-1.fc14.src.rpm
[====================================] 100% 00:00:32   1.51 MiB  47.19 KiB/sec
Created task: 2742773
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2742773
Watching tasks (this may be safely interrupted)...
2742773 build (dist-f14, nano-2.2.6-1.fc14.src.rpm): open (ppc12.phx2.fedoraproject.org)
  2742776 buildArch (nano-2.2.6-1.fc14.src.rpm, i686): free
  2742774 buildArch (nano-2.2.6-1.fc14.src.rpm, x86_64): open (x86-14.phx2.fedoraproject.org)
  2742776 buildArch (nano-2.2.6-1.fc14.src.rpm, i686): free -> open (x86-11.phx2.fedoraproject.org)
  2742776 buildArch (nano-2.2.6-1.fc14.src.rpm, i686): open (x86-11.phx2.fedoraproject.org) -> closed
  0 free  2 open  1 done  0 failed
2742773 build (dist-f14, nano-2.2.6-1.fc14.src.rpm): open (ppc12.phx2.fedoraproject.org) -> closed
  0 free  1 open  2 done  0 failed
  2742774 buildArch (nano-2.2.6-1.fc14.src.rpm, x86_64): open (x86-14.phx2.fedoraproject.org) -> closed
  0 free  0 open  3 done  0 failed

2742773 build (dist-f14, nano-2.2.6-1.fc14.src.rpm) completed successfully



and also this:


$ s390-koji build dist-f14 --scratch nano-2.2.6-1.fc14.src.rpm
Uploading srpm: nano-2.2.6-1.fc14.src.rpm
[====================================] 100% 00:00:29   1.51 MiB  52.04 KiB/sec
Created task: 293830
Task info: http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=293830
Watching tasks (this may be safely interrupted)...
293830 build (dist-f14, nano-2.2.6-1.fc14.src.rpm): free
293830 build (dist-f14, nano-2.2.6-1.fc14.src.rpm): free -> open (fedora1.s390.bos.redhat.com)
  293831 buildArch (nano-2.2.6-1.fc14.src.rpm, s390): free
  293832 buildArch (nano-2.2.6-1.fc14.src.rpm, s390x): free
  293831 buildArch (nano-2.2.6-1.fc14.src.rpm, s390): free -> open (fedora2.s390.bos.redhat.com)
  293832 buildArch (nano-2.2.6-1.fc14.src.rpm, s390x): free -> open (fedora3.s390.bos.redhat.com)
  293832 buildArch (nano-2.2.6-1.fc14.src.rpm, s390x): open (fedora3.s390.bos.redhat.com) -> closed
  0 free  2 open  1 done  0 failed
293830 build (dist-f14, nano-2.2.6-1.fc14.src.rpm): open (fedora1.s390.bos.redhat.com) -> closed
  0 free  1 open  2 done  0 failed
  293831 buildArch (nano-2.2.6-1.fc14.src.rpm, s390): open (fedora2.s390.bos.redhat.com) -> closed
  0 free  0 open  3 done  0 failed

293830 build (dist-f14, nano-2.2.6-1.fc14.src.rpm) completed successfully



These are the screenshots of the above commands using web interface:




Finally, this is a link to my RPM and SRPM package. My RPM and SRPM
I will be glad if you send me your opinion about that.
Regards.

No comments:

Post a Comment