Tuesday, October 20, 2009

Repository - Done.

After the initial setup (gpg --gen-key), I added the macros to the ~/.rpmmacros file as needed. Once the key was generated successfully I was able to move on to the actual repository creation.

Using the class wiki and some help from Boris Chao's blog I began to create the repo.

I only faced one problem after the newly built rpm, and that was when I ran rpmlint. The error read "E: invalid-spec-name". After a quick google search I realized my spec file had to match the name of the "Name:" line in the actual spec file (DUH!) Sooo after running the build again and re running rpmlint...success!

Here is the results of the rpmlint:




And finally, here is the link to my RPM REPO.

Sunday, October 18, 2009

Successful Koji Build!

After a successful mock build... I followed the steps on the fedora wiki to upload and build in koji.

Since others prior to me have already explained what commands they used, here is just a screenshot of the results of my koji build.

Thursday, October 15, 2009

What the MOCK!

After several days of struggling, I have finally successfully built my package (wireshark) in mock.

First problem: required flex
Solution: added flex under the build requires in my spec file.

Just when I thought everything was okay, I find out I had to take a step back. My %files section of my spec file was incomplete. After reading up on it and getting much needed help from Prof. Tyler, I added the required macros that would grab all the files I needed for that section.

Finally, I built again without mock (rpmbuild -ba wireshark.spec) and had a successful build. I ran rpmlint to ensure no errors (which there weren't).

NOW that I was back on track, I copied my src rpm onto the CDOT machine (Scotland) and ran the mock build.

SUCCESS!

Next up... KOJI!

Wednesday, October 14, 2009

Testing -j value - Faster is better!

The task: to test the -j value when it came to building a package to see which value was optimal on a specific CDOT machine.

I was assigned the Australia machine and the package I built was coreutils.

The script:
for ((j=5; j<=9; j++)) do mv ~/.rpmmacros ~/.rpmmacros.old grep -v smp_flags ~/.rpmmacros.old >~/.rpmmacros
echo "%_smp_mflags -j$j" >>~/.rpmmacros

for ((x=1; x<=3; x++)) do echo "Time for j value $j Number of Tries: $x" >> value.log
/usr/bin/time -f "%e:$U:%s" -o value.log -a rpmbuild --rebuild coreutils-6.12-20.fc10.src.rpm

done

done


The script runs a loop to try values 5 - 9 and runs the build multiple times while outputting the results to a log file (value.log).

The results:

Time for j value 5 Number of Tries: 1
279.45::0
Time for j value 5 Number of Tries: 2
218.96::0
Time for j value 5 Number of Tries: 3
232.26::0
Time for j value 6 Number of Tries: 1
221.72::0
Time for j value 6 Number of Tries: 2
217.99::0
Time for j value 6 Number of Tries: 3
232.01::0
Time for j value 7 Number of Tries: 1
224.02::0
Time for j value 7 Number of Tries: 2
229.97::0
Time for j value 7 Number of Tries: 3
220.06::0
Time for j value 8 Number of Tries: 1
222.91::0
Time for j value 8 Number of Tries: 2
216.99::0
Time for j value 8 Number of Tries: 3
229.98::0
Time for j value 9 Number of Tries: 1
253.05::0
Time for j value 9 Number of Tries: 2
232.96::0
Time for j value 9 Number of Tries: 3
217.98::0


As you can see the differences in time aren't that different, the only time it showed any significant difference in speed was between values 8 and 9. The results of values 5-7 are pretty similar.