Thursday, November 4, 2010

Local Fedora ARM Reprository

The repository is located over seas we will be hosting the RPMs locally for faster speeds.
This isn't hard to do but it does take some configurations to get it working.

Signing RPM packages
Generate a GPG key
user#gpg --gen-key
Get public key ~/.ssh
ADD the e-mail address assocoated with my gpg key to
the %_gpg_name macro in ~/.rpmmacros -- the line will look like this: %_gpg_name "e-mail-address
Sign those package
user#rpm --adsign phpMyAdmin-3.3.7-1.fc13.src.rpm

[ycshon@localhost rpmbuild]$ rpm --addsign phpMyAdmin-3.3.7-1.fc13.src.rpm
Enter pass phrase:
Pass phrase is good.
phpMyAdmin-3.3.7-1.fc13.src.rpm:
How to get GPG key

Wednesday, October 27, 2010

BUILDING WITH KOJI

KOJI Setup
We use Koji to build a package on different architectures such as i386, x86_64, ppc32, and ppc64. This will allow us to check if the rpm package we created will work on different machines with different architectures. When building for the 'Fedora Project' they will provide you with a certificate so you could use their servers. Using Koji can also be a good way to monitor errors and to get stats of how long it takes to build.
root#yum install fedora-packager
The command uses to help maintain and setup koji environment. So, it will be included in the main koji packager.
And, default the koji tool authenticates to the central server uing Kerberos.
Firstly,We can create an account with Fedora Project. click here to start creatting account. And, We get certificate of Fedora project.

click here start creating your account
Your account is done click here create your certificate
Then, save it your build user's home directory. Let's install Koji as root before we do anything else.
Run this build user.
user#fedora-packager-setup
[ycshon@localhost ~]$ fedora-packager-setup
Setting up Fedora packager environment
You need a client certificate from the Fedora Account System, lets get one now
FAS Username: ycshon
FAS Password:
Saved: /home/ycshon/.fedora-server-ca.cert
Linking: ~/.fedora-server-ca.cert to ~/.fedora-upload-ca.cert
Wrote sparc koji config file
Wrote arm koji config file
Wrote alpha koji config file
Wrote s390 koji config file
Wrote hppa koji config file
Wrote ppc koji config file
Wrote mips koji config file
Setting up Browser Certificates
Enter Export Password:
Verifying - Enter Export Password:

Browser certificate exported to ~/fedora-browser-cert.p12
To import the certificate into Firefox:

Edit -> Preferences -> Advanced
Click "View Certificates"
On "Your Certificates" tab, click "Import"
Select ~/fedora-browser-cert.p12
Type the export passphrase you chose earlier

Once imported, you should see a certificate named "Fedora Project".
Your username should appear underneath this.


We can build for all Fedora-supported architectures
user#koji build dist-f12 --scratch phpMyAdmin*.src.rpm
Now, We should be able to click the webpage
So, user will need to run fedora-packager-setup with own certificates.


Koji is the software that builds packages for the Fedora project . To download the source code, report bugs, join the mailing list etc., see the Koji project website .

BUILDING RPMs 2

Using MOCK

rpmlint: Checking for a clean spec file,SRPM and RPM

Command rpmlint is a sepc file,SRPM (.src.rpm), and RPM (.rpm) checker. To do the names of the file and argument.
user#rpmlint phpMyAdmin.spec PhpMyAdmin*rpm
only 1 warings. So,I ignored it.

MOCK
TO do create mock to user. Someone can not access file to user
The best thing to do is create a user to do the mock builds because you don't want people to have access to your files while they test with mock. Add this also gives the user permissions to use mock using group permissions


root# adduser -m -G mock build

Just add username to the mock group

root#usermod -a -G mock ycshon

To build with mock

user#mock -r fedora-13-x86_64 --rebuild phpMyAdmin*.src.rpm

The value fedora-13-x86_64 can be changed to the config files in /etc/mock in order to test building based on the
libraaries and avalibale pakckges for the specific architecture and fedora release.

The error report views the log files.
user#cat /var/lib/mock/fedora-13-x86_64/result/build.log

Ween we find the required libraries, we can find out the names to install with "yum" spec fil that say "BuildRequires" and add the library package name there.

Friday, October 22, 2010

BUILDING RPMs

creating a RPM in fedora 13.
RPMs are the binary packages that Red Hat, Fedora, Suse and other distros use to install software. In most cases you can find a rpm packages somewhere on the web but for those rare occasions where you can only find the tar.gz source code than you can simply compile it using ./configure, make, make install.
I build a software "phpMyAdmin" because phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields.

So,To begin the procedure reauried a rpm package
rpm-build
rpmdevtools
rpmlint

root#yum install rpm-build rpmdevtools

After, created a directory to do all work.

user#rpmdev-setuptree

Delelted a source from the directory to do all work.
user#rpmdev-wipetree

Firstly,I need the source rpmfile.
user#yumdownloader --source phpMyAdmin
Source in ~/rpmbuild/SOURCES

secondly,I install the source rpm
user#rpm -i phpMyAdmin-3.3.7-1.fc13*.src.rpm

Rebuild on local machine
takes a source RPM as input, prodece binary and source RPMs
user#rpmbuild --rebuild phpMyAdmin-3.3.7-1.fc13.src.rpm

Building from the spec file
takes a specfile and source code as input, produces binary and source RPMs as output
in ~/rpmbuild/SPECS

user#rpmbuild -ba phpMyAdmin.spec
I will try to build spec file that had no problem because display exot code was 0.

Friday, September 24, 2010

SRB600-Lab2 -J values in .rpmmacros

I did this Lab. I was used in my lab top and used fedora13.
This output rebuilding a package to base -j value
I installed and rebuild software mediawiki.
This source size was
-rw-r--r--. 1 ycshon ycshon 11528751 Jul 5 15:05 mediawiki-1.15.4-54.fc13.src.rpm
[root@localhost ~]# cat ~/.rpmmacros
%_topdir %(echo $HOME)/rpmbuild
%_smp_mflags -j1--> Change value 1 to 5
%__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot


-j1
real 1m3.124s
user 0m43.467s
sys 0m19.241s
-j2
real 1m5.417s
user 0m44.490s
sys 0m21.499s
-j3
real 1m7.819s
user 0m44.787s
sys 0m23.487s
-j4
real 1m8.440s
user 0m45.184s
sys 0m24.231s
-j5
real 1m9.077s
user 0m45.641s
sys 0m25.203s
So, if rebuild software, j1 value was more faster then other value.

Tuesday, September 14, 2010

SBR600-Lab1 install 2 package

1.NLED
The Neat Little EDitor is a text mode, full-screen programmer's editor
1.I downlodaded the NLED source.
http://cdot.senecac.on.ca/software/nled/
The file extracts command tar -xf neld_2_52_src.tgz
 change directory command neld-2.52
Error message below
[ycshon@localhost nled-2.52]$ make
cc -O -c -o nled.o nled.c
make: cc: Command not found
make: *** [nled.o] Error 127
Nled may need C compiler beacuse NLED is using C programming
I install yum install "*/ncurses.h" and yum install gcc

[ycshon@localhost nled-2.52]$ make
cc -O -c -o nled.o nled.c
cc -O -c -o nledisp.o nledisp.c
cc -O -c -o nledit.o nledit.c
cc -O -c -o nledio.o nledio.c
cc -O -c -o nledmisc.o nledmisc.c
cc -O -c -o nledata.o nledata.c
cc -O -c -o qkdisp.o qkdisp.c
cc -o nled nled.o nledisp.o nledit.o nledio.o \
     nledmisc.o nledata.o qkdisp.o -lcurses
Now,made NLED editor.
2.aMSN
A very nice MSN compatible messenger application, aMSN Messenger is a multiplatform MSN messenger clone.
Works pretty much like its Windows based counterpart.
Perfect for keeping in touch with those friends who have not yet seen the light.
I downloded from http://sourceforge.net/projects/amsn/files/amsn/0.98.3/amsn-0.98.3-src.tar.bz2/download
command: tar -xvf amsn-0.98.3-src.tar.bz2
command:yum install gcc-c++
command:yum install tcl-devel
command:yum install tk-devel
command:yum install libpng-devel
command:yum install libpeg-devel
command:yum install gstreamer-devel
command:yum install farsight2-devel

compile time options summary
============================

    X11          : yes
    Tcl         : 8.5
    TK          : 8.5
    DEBUG        : no
    STATIC       : no
    FARSIGHT     : yes
    LIBV4L       : no
    GUPNP-IGD    : no

command:./configure and make
rum programming ./amsn



Monday, September 13, 2010

SBR600 for my first blog

, there.
I'm Young Chol,Shon in CTY. Also, I was PBX engineer in Korea. I managed Customer Service Center
in Korea.
Have a fun semester.





Seneca Wiki is:




Fedora wiki: