Tuesday, November 17, 2009

Packaging Viewsource

For this project each member of the class was assigned something to do. Boris Chao and Adam Hilts were to package Dehydra and Jshydra, I was to package Viewsource, and Alex was to make the repo. At the moment the other classmates tasks elude me.

I started out wondering where I even get a tar file for viewsource so I was told I had to go to the viewsource directory. Downloading all these files and then putting them into a tarfile would have been a lot of work and time but I decided to do it UNTIL I found that there was a viewsource.tgz in scotland. In the interest of time and work I decided to use this. I made my spec file, with a certain difficulty I might add.

Chris Tyler, my professor, told me through IRC
"So you could tar these up and use that as
Source0, have an empty %build section, and then
custom-install files in the %install section (see
the nled spec file if you need to see how to do
that)."

So I used this tip to help make my spec file. I

My specfile can be found here.

The real issue I had was that my setup section looked like %setup -c -T when it should have looked like what I have there now. After this I had an issue that said certain files were installed but not unpackaged so all I had to do was add those files to the %files section.

After I finished this, I put my RPM into hongkong's /var/www/http directory and can be accessed here for the repo master to get.

Viewsource Rpm

That's all for now, cya later.

Tuesday, November 10, 2009

G++ and Modified G++

First thing we had to do was download a script called build-tools.sh, shortly after I started running the script I was told there was a revised version where some change was made to it so we were supposed to use that one. This revised version can be found here. This time running the script was much faster but I ran into a little problem.

Error: installation or configuration problem: C++ compiler cannot create executables. I asked chris tyler about this on IRC and he said "ctyler> well, someone deleted the c++/g++ links", so whoever was on scotland last doing this, this is your fault! :P lol

After I remade the links using the commands:
su -c "ln -s /usr/bin/g++.original /usr/bin/g++"
su -c "ln -s /usr/bin/c++.original /usr/bin/c++"
it started running again doing its compiling thing.

Someone decided to compile something at the exact same time and it was severely slowing down my compile so I decided to use the hongkong machine.
That presented a new problem, apparently the gcc symbolic link wasnt done correctly so I had to fix that AND the c++.original file was tampered with so Chris Tyler had to fix that.
After these were fixed I could finally move on.

Apparently everyone decided to use the Abiword because it had a lot of c in it, so I decided to use it as well, I used the command "yumdownloader --source abiword" and then "rpm -i abiword*".

After fiddling with dependencies I ran: time rpmbuild -ba abiword.spec three times and came out with this:

Using Original g++

Test 1 - real 7m11.373s
user 10m8.225s
sys 3m5.116s

Test 2 - real 3m58.134s
user 3m27.638s
sys 2m6.875s

Test 3 - real 3m56.867s
user 3m28.087s
sys 2m7.464s

Test 4 - real 3m56.037s
user 3m27.520s
sys 2m7.851s

Four tests were done because the first test seemed exponentially longer than the others.
Now its time to use the modified g++. I had to create a symbolic link to my modified g++ I did so with this command

su -c "ln -s /home/jddeni/tools/gcc-dehydra/installed/bin/[gc]++ /usr/bin"

I ran the build command again and here are the outputs:

Test 1 - real 6m38.812s
user 10m0.445s
sys 2m53.160s

Test 2 - real 3m31.770s
user 3m17.512s
sys 1m56.154s

Test 3 - real 3m31.757s
user 3m17.073s
sys 1m55.958s

Test 4 - real 3m29.787s
user 3m16.585s
sys 1m56.548s

As you can see in all of the cases the modified g++ produced faster results.
Nobody worry, I am putting the symbolic links backk in to their originals :)

Until next time!

Thursday, November 5, 2009

Fedora Live CD

Since I was so busy during reading week I did not get a chance to do the fedora live CD until very recently. I first went to the seneca wiki page and found links on how to do the live cd.

Using the live cd how to I tried the sample command there to see if it would work and it did, it started making a live cd but I had to make my own personal version so I stopped the process.

I first had to get a kickstart file to edit, I looked in the /usr/share/spin-kickstarts/ directory where i found fedora-livecd-desktop.ks, I then issued the command "cp fedora-livecd-desktop.ks /home/jddeni/" to save it to my home directory.

Before the %packages section I put a repo command to add the rpm from it into the live cd.

repo --name="jddeni" --baseurl=http://scotland.proximity.on.ca/jddeni/

In the packages section I took out the fedora branding and put my own by placing these lines in the kickstart file:

# add generic branding
generic-release
generic-logos
generic-release-notes

#Remove Fedora Branding
-fedora-release
-fedora-logos
-fedora-release-notes

When I ran it the first time using the command

livecd-creator --config=/home/jddeni/fedora-livecd-desktop.ks --fslabel=Refuge Live Cd --cache=/var/cache/live

it stopped working saying it couldn't find my package, I was completely confused about this because there were no typo's or anything. I later realized, due to Chris Tyler's help, that when I put the entire filename, jddeni-release-1-1-fc10.noarch.rpm it won't work, so I had to take off the 1-1-fc10.noarch.rpm and leave it as just "jddeni-release" and luckily it worked.

The whole process lasted about half an hour to make but it finally worked, I now have Refuge.iso and plan on putting in on a cd soon.

FSOSS 2009

So, I decided to sign up for the volunteering before FSOSS. Originally I believed that we were going to stuff bags with shirts and whatnot, however when the week approached I received an email that the Tuesday, should I choose to come in, we were going to be created the badges for FSOSS.

All throughout the reading week I was at training for a new job in Mississauga so I was pretty booked up, I decided to go to volunteering on the Thursday.

Thursdays job was pamphlet folding, after folding so many sheets someone in the office found a typo and we were asked to refold all of them. Since I had to go back to training for 3 pm - 9pm I had to leave and the rest of the folding job went to Alex V and another person.

They had so much folding to do, I am sort of glad I had training haha.

I came to FSOSS kind of late as I had something to do in the morning but I did pick up my shirt which was a bonus :).