Saturday 15 December 2012

Final Release 0.3

This this the final release of Andora packages..

Andora Logo package

In this release, I tested the build on ARM and primary architecture by using koji. Both of them are successful.

Koji build for ARM: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1295748
Koji build for Primary architecture: http://koji.fedoraproject.org/koji/taskinfo?taskID=4794002


Download Link:

SPEC file: andora-logos.spec
SRPM: andora-logos-17.0.0-2.fc17.src.rpm
RPM: andora-logos-17.0.0-2.fc17.noarch.rpm
Tarball:  andora-logos-17.0.0.tar.bz2


andora-fedora-remix-release package

I signed the rpm and added the gpg key in the package. I hosted the repo on my matrix server.
The following are final release of this package.

Download Link:


Project Contrubition:

I've help Gloria with the andora release notes logo since we are working different packages of the same project.

Wallpaper:

I've designed a wallpaper for Andora. This can be used in the wallpaper package.





Links:

My Project Wiki page: Andora Project Wiki Page
Fedora Remix: Feodra Remix
Planet CDOT: http://zenit.senecac.on.ca/~chris.tyler/planet/

Release 0.2

 This is the 0.2 release of the Andora logo and Andora release package. In my previous release, (please refer to Release 0.1 blog for detail), I've mentioned that I will modify the Andora logo based on the Fedora Remix guildlines. So in this release, I've used the new logo design for Andora. Here's the new logo =)

The blue circue is "a" and it stands for andora. I picked the green color of Fedora Remix logo design to make it closer to Andriod's green color.




Links:

My Project Wiki page: Andora Project Wiki Page
Fedora Remix Logo Guildlines:  Legal:Secondary trademark usage guidelines
Fedora Remix: Feodra Remix

In release 2.0, I've changed the Andora logo, cleared rpmlint errors for both packages.

andora-logos package 

Package build successful:

Requires(post): /bin/sh coreutils
Requires(postun): /bin/sh
Conflicts: fedora-logos anaconda-images <= 10 redhat-artwork <= 5.0.5
Obsoletes: redhat-logos
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/wendy/rpmbuild/BUILDROOT/andora-logos-17.0.0-2.fc17.i386
Wrote: /home/wendy/rpmbuild/SRPMS/andora-logos-17.0.0-2.fc17.src.rpm
Wrote: /home/wendy/rpmbuild/RPMS/noarch/andora-logos-17.0.0-2.fc17.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.Nn3rcn
+ umask 022
+ cd /home/wendy/rpmbuild/BUILD
+ cd andora-logos-17.0.0
+ rm -rf /home/wendy/rpmbuild/BUILDROOT/andora-logos-17.0.0-2.fc17.i386 
+ exit 0


rpmlint result: (No error)

spec file 
 
[wendy@fedorakde SPECS]$ rpmlint andora-logos.spec 
andora-logos.spec:14: W: unversioned-explicit-obsoletes redhat-logos
0 packages and 1 specfiles checked; 0 errors, 1 warnings.
 

source rpm
 
[wendy@fedorakde SPECS]$ rpmlint ../SRPMS/andora-logos-17.0.0-2.fc17.src.rpm 
andora-logos.src: W: spelling-error %description -l en_US bootloader -> boot loader, boot-loader, boatload
andora-logos.src:14: W: unversioned-explicit-obsoletes redhat-logos
1 packages and 0 specfiles checked; 0 errors, 2 warnings.

rpm package
 
[wendy@fedorakde SPECS]$ rpmlint ../RPMS/noarch/andora-logos-17.0.0-2.fc17.noarch.rpm 
andora-logos.noarch: W: self-obsoletion redhat-logos obsoletes redhat-logos = 17.0.0-2.fc17
andora-logos.noarch: W: cross-directory-hard-link /usr/share/icons/oxygen/48x48/apps/anaconda.png /usr/share/icons/Fedora/48x48/apps/anaconda.png
andora-logos.noarch: W: cross-directory-hard-link /usr/share/anaconda/boot/splash.png /usr/share/anaconda/pixmaps/syslinux-vesa-splash.png
1 packages and 0 specfiles checked; 0 errors, 3 warnings.


Download Link:

SPEC file: andora-logos.spec
SRPM: andora-logos-17.0.0-2.fc17.src.rpm
RPM: andora-logos-17.0.0-2.fc17.noarch.rpm
Tarball:  andora-logos-17.0.0.tar.bz2
  
 andora-fedora-remix-release package 

I've changed the release package to follow the format of generic release. In the spec file, I also included several /etc/ files as well as the yum configs for Andora Fedora Remix release.


spec file 
 
[wendy@fedorakde SPECS]$ rpmlint andora-fedora-remix-release.spec 
andora-fedora-remix-release.spec:12: W: unversioned-explicit-obsoletes redhat-release
0 packages and 1 specfiles checked; 0 errors, 1 warnings.
[wendy@fedorakde SPECS]$ 
 
source rpm
 
[wendy@fedorakde SPECS]$ rpmlint ../SRPMS/andora-fedora-remix-release-17-2.src.rpm 
andora-fedora-remix-release.src: W: spelling-error %description -l en_US configs -> con figs, con-figs, configure
andora-fedora-remix-release.src:12: W: unversioned-explicit-obsoletes redhat-release
1 packages and 0 specfiles checked; 0 errors, 2 warnings. 
 
 
rpm package
 
[wendy@fedorakde SPECS]$ rpmlint ../RPMS/noarch/andora-fedora-remix-release-17-2.noarch.rpm 
andora-fedora-remix-release.noarch: W: spelling-error %description -l en_US configs -> con figs, con-figs, configure
andora-fedora-remix-release.noarch: W: self-obsoletion redhat-release obsoletes redhat-release = 17-2
andora-fedora-remix-release.noarch: W: conffile-without-noreplace-flag /etc/andora-fedora-remix-release
andora-fedora-remix-release.noarch: W: conffile-without-noreplace-flag /etc/system-release-cpe
andora-fedora-remix-release.noarch: W: conffile-without-noreplace-flag /etc/rpm/macros.dist
andora-fedora-remix-release.noarch: W: conffile-without-noreplace-flag /etc/os-release
andora-fedora-remix-release.noarch: W: non-conffile-in-etc /etc/pki/rpm-gpg/RPM-GPG-KEY-andora-fedora-remix-17
1 packages and 0 specfiles checked; 0 errors, 7 warnings.



 Download Link:



Saturday 10 November 2012

Project Release 0.1 Updates..

I will post two packages in this blog. For more infomation related to release 0.1 please check my previous blog.

==>Release 0.1

I still need to modifiy the andora logo in order for it to meet the requirement. It seems like I can keep using the Andoid Robot logo if follow their guidelines.
==>Brand Guidelines

To build the logo package, I installed a new Fedora 17 with KDE environment since the package requires KDE package.

p.s. I start to like the KDE more than Gnome desktop. :)

andora-logos package 

The following shows the successful build of logo package.
attachment (584×423)
Download link:
 andora-logos-17.0.0-1.fc17.src.rpm
 andora-logos.spec


andora-fedora-remix-release package 


 attachment (572×475)
Download link:

andora-fedora-remix-release-17-1.fc17.noarch.rpm
andora-fedora-remix-release.spec  

Friday 2 November 2012

Python Experience



I found Python is a powerful language and is restricted in the formatting. There are some script format are really different from my experience with other languages like bash scripting, C, and PHP. When executing a script, it looks for the correct indentation. If not, an error message will be generated and exit the script. I think it is due to the format of compound statements. Python uses ":" for any compound statement and there is no closing symbol. In order for the system to recognize the condition block correctly, indentation is really important. Since I usually do indentation on all of my scripts, so it didn't give me lots of trouble.




Here's the final output of my first python script.
It checks the user input and loop until the correct number is provided.



 If you want to test my script, here is the link to download. Don't forget to add execution permission before running. :) Download Me






Tuesday 30 October 2012

Andora Project Plan

I've decided to work on Andora Project Release project. I will be working on the andora logos and andora release package.


For now we had a meeting with John Selmys and we talked about the basic requirements for this project and also the expectation of this project.

I have checked the current Fedora Andora Remix from school and the first thing I'm planning to do is to design a new logo to replace the current "Hotdog" logo. 

 

I've updated the project plan on Wiki page.

Project Details

This part of project is to design custom logos and wallpaper to replace all of the existing Andora Fedora Remix, as well as the package of Andora-Fedora Remix release files that define the release. 

Project Plan 

0.1 Research what logos and wallpaper need to be changed. How the logos and wallpaper will be integrated into Andora Remix. Provide several logo drafts. Also do research on which release packages need to be released.
0.2 Take the 0.1 release and make any changes or correction that need to be done and test it and release the beta package.
0.3 Final logos, wallpaper and release packages release. (2 packages in total) 


RPM Signing and Repo Creation lab

Purpose

The purpose of this lab is to know the steps to sign RPM packages and create the RPM package repository for use with yum.

Signing RPM packages

First I created my own GPG key by the following command and completed the required infomation.


| gpg --gen-key




At the end the script required 284 more bytes to generate the key. So I had typed some random words in order to complete.

After that, I edited the ~/.rpmmarcos file to add my email address associated with the gpg key in %_gpg_name macro.

I added this line in the bottom of ~/.rpmmarcos file.


%_gpg_name "myemailaddresshere"




With that done I proceed to sign packages. First I installed the rpm-sign package.

| yum install rpm-sign


Then sign the package by using this command.

| rpm --addsign which-2.20-1.fc17.x86_64.rpm



After entering the pass phrase, the signing process was successfully completed. Next step is to create my own yum repo.

Creating the Repository

Move the signed RPM to repo directory and create the repo.


| createrepo .




Then besides the RPM package, the command created a rpmrepo folder which is for creating yum repo.

The last part was to create a new repository file in /etc/yum.repos.d. I copied the existing Fedora repo file and made the following edits.

[wendy]
name=wendy
Baseurl=file:///home/wendy/repo
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/wendy-gpg-key-rpm

The /etc/pki/rpm-gpg/wendy-gpg-key-rpm file was made by exporting my public key file to /home/wendy/repo with the following command.

| gpg --export --armour "myemailaddress" > wendy-gpg-key-rpm


(* Do this with regular user account)

Finally I tested the install by YUM.


It worked! YUM was trying to install the package from my own repository ("wendy").

Repodata directory:



Mock and Koji

Today I'm going to build my packages with mock and koji. Mock is a toll to test that the BuildRequires for the package are complete and accurate. While koji is a client-server system that builds the package on multiple different architectures within the Fedora build farm. It is useful when you don't have access to the machines of each architecture.
 
Let's start with mock.

Mock

Mock takes a srpm and builds it in a chroot. It will tests your BuildRequries lines are correct and no missing dependencies.

Install mock on Fedora, and add current user into mock group.

| yum install mock
| usermod -aG mock wendy

Then I tested to build my SRPM package for Fedora 17 on 64-bit architecture by using mock

| mock -r fedora-17-x86_64 rpmbuild/SRPMS/which-2.20-1.fc17.src.rpm
| mock -r fedora-17-x86_64 rpmbuild/SRPMS/hello-2.80-1.fc17.src.rpm
( * Note: the distribution-release-arch value must correspond to a config file in /etc/mock)

The mock build took longer than the rpmbuild time.

which
real    5m41.030s
user    0m6.307s
sys    0m11.108s

hello

real    1m38.404s
user    0m11.832s
sys    0m20.338s

To check the result and any error during the testing process. I checked the following file, and both of them were good.

| vi /var/lib/mock/fedora-17-x86_64/result/build.log




There was no error so my mock build was successful.

Mock is easy to use since it's only one command, but I like rpmbuild better. For rpmbuild, I can see the source code file and spec file located in separate directories and it is clear and well structured when building the RPM files.

Koji

Koji setup

| yum install fedora-packager

then run this script to setup my certificate that authenticate the package.


| /usr/bin/fedora-packager-setup

This links my FAS account to my Fedora system by making certificate on it. Also it makes a SSL certificate so I can login to the web interface of each Fedora testing farm. After the setup, I imported my certificate into Firefox browser in order to manage the koji web interfaces.


Below are my testing in different architechtures.

Primary i386 and x86_64 

| koji build f17 --scratch SRPMS/which2.20-1.fc17.src.rpm



http://koji.fedoraproject.org/koji/taskinfo?taskID=4605785


ARM armv5tel and armv7hl

| arm-koji build f18 --scratch SRPMS/which2.20-1.fc17.src.rpm

 http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1207902

| arm-koji build f18 --scratch SRPMS/hello-2.8-1.fc17.src.rpm

http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1217061


s390 mainframe

| s390-koji build f18 --scratch SRPMS/which2.20-1.fc17.src.rpm

 http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=833648


PowerPC

| ppc-koji build f18 --scratch SRPMS/which2.20-1.fc17.src.rpm

 http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=754315

| ppc-koji build f18 --scratch SRPMS/hello-2.8-1.fc17.src.rpm

 http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=761608

All of my testing builds are passed without any error. The job was sent to each building machine and sent in the queue. It took around 10 to 20 minutes to finish each building depended on the size of package and how busy the queue was.

Done!
 
Overall I think mock and koji are great tools to build RPM packages. It's bacially automated process. They are simply and user friendly to use and especially for beginner packagers. I like the fact that mock allows us to test packages in a chroot environment so we don't need to worry about messing up our own OS. Koji is also a great tool to test all kinds of architectures without accessing the physical hardware of each architecture.