Tuesday, October 20, 2009

RPM packaging and the J value

In the tests that I tried for the J value(value to change cpu setting) have not really had any big differences, where the fastest elapsed time for a build clocked in at 2:50.66 and that was for the J value of 9 on the 2nd iteration. This was not a very huge improvement as the longest elapsed time was 2:51.60 for the J value of 5 on the 1st iteration. This was all done on the Ireland CDOT machine using the following script with the MegaMek package-------->

##script to change the build values on the cpu to test which is the fastest optimal build setting
rm ~/value.log
for ((j=5; j<=9; j++))
do
mv ~/.rpmmacros ~/.rpmmacros.old
grep -v smp_mflags ~/.rpmmacros.old >~/.rpmmacros
echo "%_smp_mflags -j$j" >>~/.rpmmacros

for ((x=1; x<=3; x++))
do
echo "-j: $j x: $x" >> ~/value.log
echo "build J value $j, iteration $x"
/usr/bin/time -o value.log -a rpmbuild -ba --quiet ~/rpmbuild/SPECS/MegaMek.spec
done
done

---------------------------------------------------------

J Value

Iteration

1

2

3

5

2:51.60

2:50.75

2:51.15

6

2:50.80

2:51.01

2:50.92

7

2:50.89

2:50.74

2:50.87

8

2:50.86

2:50.82

2:50.71

9

2:50.80

2:50.66

2:50.83

Thursday, October 15, 2009

Creating my RPM repository

Almost all the information that I needed to complete this task I received from the notes my professor Chris Tyler gave in class which are here: Creating Repository Instructions

In addition to these notes I had to make sure to change the ownership of my directory in /var/www/html, and I did this using the command "sudo chown -R Adam:Adam ." while in /var/www/html/ashiltsrepo.

To make this repository into an RPM you must first have a build root for RPMs if you do not already have one. To do this run the command

rpmdev-setuptree

and this will create a "~/rpmbuild" directory.

Next you must create a SPEC file or use and existing one. I got a sample of a repo spec file from this website here. This website also has a whole walkthrough for creating a yum repo which is very clear and easy to follow. Put that spec file into your ~/rpmbuild/SPECS directory and edit the fields to fit your repo. Next create a "repoName.repo" file and place that ~/rpmbuild/SOURCES. My repo file looks like this

[ashilts]
name= ashilts repo for $releasever - $basearch
baseurl=http://scotland.proximity.on.ca/ashiltsrepo/
failovermethod=roundrobin
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ASHILTS


Along with this repo file should be the "RPM-GPG-KEY-'KEYNAME'" file that should have been made earlier from following the instructions in the links. After all these files are in place run the command

rpmbuild -ba ~/rpmbuild/SPECS/yourRepoSpec.spec

After this is done a RPM should be placed in your "~/rpmbuild/RPMS/" dir. I moved the file to my web directory "/var/www/html/ashiltsrepo" and made a simple web page with a link to the new rpm. Now anybody can download this rpm and install the rpms that I have packaged and uploaded to my server.

To Download My Repository click HERE.

Here is a picture of me downloading my repo: LINK

To use your repo to download your rpms if they are already in other yum repo's that have higher significance yuo will have to use the command

yum install --disablerepo=fedora,updates "yourPackageName"

Under the disable repos switch you will have to add any repos that you have on your machine that has the package that you do not want to install from.

And this a picture of me downloading one of the rpms I built and put in my repo: LINK

This should be it for setting up your repository, because mine works fine :)

Peace out

Tuesday, October 6, 2009

Filezilla, Mock and Koji

So to catch everyone up from my last blog, I have fixed the errors that I had by adding the lines :

rm -rf $RPM_BUILD_ROOT/usr/share/locale/gr
%find_lang %{name}

and thanks to my teacher Chris Tyler for this info.

So my next step was doing the mock build using the command "mock -r fedora-11-i386 --rebuild filezilla-3.0.3-1.fc11.src.rpm" and that went fine with no errors at all.

So just a few minutes ago I installed all the necessary stuff required for koji use by following the Fedora Koji Guide. This was a very easy and painless procedure. The next step was to try and do the koji build and to find how to do this I used fellow class mate Boris' blog where I got the command "koji build --scratch dist-f10 filezilla-3.0.3-1.fc11.src.rpm". When I ran that it went and did its thing, then and about five minutes later it was all successful. :)

Here are the links to my complete koji build and source rpm:

Koji build
Source RPM

P.S. While searching around on the Koji site I saw that Jesse Keating previously packaged filezilla. I just thought that was something cool to share with the class.

Till next time, Goodbye!

Thursday, October 1, 2009

Progress on Building Filezilla

So after having the all the problems in class with installing ettercap I decided to avoid it completely and instead build Filezilla.

So at first I just filled in the basic spec file, then ran the "rpmbuild -ba filezilla.spec" command, and it got stuck because it said that I didnt have gcc. I thought that I did have it so I of course did a quick google search are saw that I needed to install gcc-c++ so i did a quick yum install gcc-c++ and everything was fine for that error.

I recieved a few more errors later because I needed to install libidn-devel,
gnutls-devel, and wxGTK-devel. I found these specific packages using "yum provides "*errorInBuild*" command, replacing the error in the quotes of course.

It made it to the end of the build on my next try except it said that there was a whole load of files that were "unpackaged but not installed" or something along those lines. I did a google search of that error and I came to a forum that said to add the file paths of the files not being removed to the %files section of the SPEC file. So I added the following lines-

/usr/share/locale
/usr/share/filezilla
/usr/bin/filezilla
/usr/bin/fzsftp
/usr/share/applications/filezilla.desktop
/usr/share/pixmaps/filezilla.png

and the build finished successfully. I then ran rpmlint on the rpm, source rpm, and the spec file. First errors was that there was no documentation so I added README COPYING INSTALL after the %docs section. I found these files in the tarball and assumed they were what the error wanted me to add. So currently I am getting the errors -

filezilla.i386: E: incorrect-locale-el /usr/share/locale/gr/filezilla.mo
filezilla.i386: W: file-not-in-%lang /usr/share/locale/gr/filezilla.mo
filezilla.i386: W: file-not-in-%lang /usr/share/locale/he_IL/filezilla.mo

and there is about 40 lines like this. I am not really sure where to go from here so I plan on getting help in class today.

Heres my source rpm