[K12OSN] OT - Thunderbird-1.0 rpm

Bimal Pandit bimal.pandit at indoasian.com
Wed Feb 2 07:07:03 UTC 2005


Dear All,

This is my experience that i would like to share with all, in case it
could help someone.

I tried to install thunderbird-1.0 on my system(RedHat 9), i started
with tar file but then it was accessible to the root user only, even i
tried making link as 

[root at bimal root]# cd /usr/local
[root at bimal local]# tar -xvzf
/tmp/thunderbird-1_0/thunderbird-1.0.tar.gz
[root at bimal local]# cd thunderbird
[root at bimal thunderbird]# ln -sf /usr/local/thunderbird/thunderbird
/usr/bin/

now, i switched as normal user and tried to execute thunderbird

[root at bimal thunderbird]#  su - bimal

[bimal at bimalserver bimal]$ thunderbird
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
(thunderbird-bin:9100): Gtk-WARNING **: cannot open display:
[bimal at bimalserver bimal]$

i could have overcome this too as

[root at bimal thunderbird]# xhost +localhost

but that's not the solution!!( i think..., you know this is 'X' and
security!!), so again i tried to search the net and came accross an
excellent site(tutorial) <http://fedoranews.org/tchung/thunderbird/> by
Mr.Thomas Chung, i tried it as per his suggestions but it seems that he
missed a point and hence i did all these as a root user, while here i
have also given a solution as how 
to buid the same package without root, ofcourse to install rpm package
you need to be the root
user!!

here is what and how i have done all this...

NOTE:-
------
1) all my packages are in /tmp directory so i am refering as of it.
2) packages used are 
	thunderbird-1.0.tar.gz
	thunderbird.png
	thunderbird.desktop
	thunderbird.spec

one can had thunderbird.png, thunderbird.desktop, thunderbird.spec files
from 
<http://fedoranews.org/tchung/thunderbird/> by Mr.Thomas Chung
3) buid on RedHat 9

PART - I -  AS A ROOT 
---------------------
here i have taken an example of creating this rpm package as superuser
"root"
so you need to login as root, on a terminal do as...

[root at bimal temp]# vi thunderbird.spec 
and changed "Release : 0.FC1"  to  "Release : 0.rh9" so that it will
remind me of RedHat 9 package though if you don't do this still no probs
as in this case you will get a package named as
"thunderbird-1.0-0.FC1.i386.rpm" instead of
"thunderbird-1.0-0.rh9.i386.rpm", while as far as i know there is no
much difference between RH9 and FC1, almost all the packages for FC1
gets installed on RH9 too!!, well here i goes...

[root at bimal temp]# cp thunderbird-1.0.tar.gz /usr/src/redhat/SOURCES/
[root at bimal temp]# cp thunderbird.png /usr/src/redhat/SOURCES/
[root at bimal temp]# cp thunderbird.desktop  /usr/src/redhat/SOURCES/
[root at bimal temp]# cp thunderbird.spec   /usr/src/redhat/SPECS/
[root at bimal temp]# rpmbuild -ba /usr/src/redhat/SPECS/thunderbird.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.58027
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ rm -rf /var/tmp/thunderbird-1.0-buildroot
+ cd /usr/src/redhat/BUILD
+ rm -rf thunderbird-1.0
+ /bin/mkdir -p thunderbird-1.0
+ cd thunderbird-1.0
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/thunderbird-1.0.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.7808
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd thunderbird-1.0
+ LANG=C
+ export LANG
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/lib
+ cp -a thunderbird /var/tmp/thunderbird-1.0-buildroot/usr/lib
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/share/applications
/var/tmp/thunderbird-1.0-buildroot/usr/share/pixmaps
+ cp -a /usr/src/redhat/SOURCES/thunderbird.desktop
/var/tmp/thunderbird-1.0-buildroot/usr/share/applications
+ cp -a /usr/src/redhat/SOURCES/thunderbird.png
/var/tmp/thunderbird-1.0-buildroot/usr/share/pixmaps
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/bin
+ ln -s /usr/lib/thunderbird/thunderbird
/var/tmp/thunderbird-1.0-buildroot/usr/bin/thunderbird
+ ln -s /usr/lib/thunderbird/thunderbird-bin
/var/tmp/thunderbird-1.0-buildroot/usr/bin/thunderbird-bin
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip
/usr/bin/objdump
Processing files: thunderbird-1.0-0.rh9
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/thunderbird-1.0-buildroot
Wrote: /usr/src/redhat/SRPMS/thunderbird-1.0-0.rh9.src.rpm
Wrote: /usr/src/redhat/RPMS/i386/thunderbird-1.0-0.rh9.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.61716
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd thunderbird-1.0
+ rm -rf /var/tmp/thunderbird-1.0-buildroot
+ exit 0
[root at bimal temp]#

so this will create a rpm package in /usr/src/redhat/RPMS/i386/
directory while src.rpm in /usr/src/redhat/SRPMS/ directory.

PART - II -  as a GENERAL USER 
------------------------------
here i have taken an example of creating this rpm package as a general
user "bimal"
so you need to login as bimal, on a terminal do as...

[bimal at bimal bimal]$ mkdir rpm

[bimal at bimal bimal]$ cd rpm

[bimal at bimal bimal]$ mkdir SOURCES SPECS BUILD RPMS RPMS/i386 SRPMS

create a file ".rpmmacros" in the home directory with the entry as shown

[bimal at bimal bimal]$ vi .rpmmacros
%_topdir /home/bimal/rpm

[bimal at bimal bimal]$ cd /tmp

[bimal at bimal temp]$ vi thunderbird.spec 
and changed "Release : 0.FC1"  to  "Release : 0.rh9" so that it will
remind me of RedHat 9 package though if you don't do this still no probs
as in this case you will get a package named as
"thunderbird-1.0-0.FC1.i386.rpm" instead of
"thunderbird-1.0-0.rh9.i386.rpm", while as far as i know there is no
much difference between RH9 and FC1, almost all the packages for FC1
gets installed on RH9 too!!, well here i goes...

[bimal at bimal temp]$ cp thunderbird.spec /home/bimal/rpm/SPECS/

[bimal at bimal temp]$ cp thunderbird.desktop /home/bimal/rpm/SOURCES/

[bimal at bimal temp]$ cp thunderbird.png /home/bimal/rpm/SOURCES/

[bimal at bimal temp]$ cp thunderbird-1.0.tar.gz /home/bimal/rpm/SOURCES/

[bimal at bimal temp]$ rpmbuild -ba /home/bimal/rpm/SPECS/thunderbird.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.62736
+ umask 022
+ cd /home/bimal/rpm/BUILD
+ LANG=C
+ export LANG
+ rm -rf /var/tmp/thunderbird-1.0-buildroot
+ cd /home/bimal/rpm/BUILD
+ rm -rf thunderbird-1.0
+ /bin/mkdir -p thunderbird-1.0
+ cd thunderbird-1.0
+ /usr/bin/gzip -dc /home/bimal/rpm/SOURCES/thunderbird-1.0.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.15114
+ umask 022
+ cd /home/bimal/rpm/BUILD
+ cd thunderbird-1.0
+ LANG=C
+ export LANG
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/lib
+ cp -a thunderbird /var/tmp/thunderbird-1.0-buildroot/usr/lib
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/share/applications
/var/tmp/thunderbird-1.0-buildroot/usr/share/pixmaps
+ cp -a /home/bimal/rpm/SOURCES/thunderbird.desktop
/var/tmp/thunderbird-1.0-buildroot/usr/share/applications
+ cp -a /home/bimal/rpm/SOURCES/thunderbird.png
/var/tmp/thunderbird-1.0-buildroot/usr/share/pixmaps
+ mkdir -p /var/tmp/thunderbird-1.0-buildroot/usr/bin
+ ln -s /usr/lib/thunderbird/thunderbird
/var/tmp/thunderbird-1.0-buildroot/usr/bin/thunderbird
+ ln -s /usr/lib/thunderbird/thunderbird-bin
/var/tmp/thunderbird-1.0-buildroot/usr/bin/thunderbird-bin
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip
/usr/bin/objdump
Processing files: thunderbird-1.0-0.rh9
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/thunderbird-1.0-buildroot
Wrote: /home/bimal/rpm/SRPMS/thunderbird-1.0-0.rh9.src.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.27873
+ umask 022
+ cd /home/bimal/rpm/BUILD
+ cd thunderbird-1.0
+ rm -rf /var/tmp/thunderbird-1.0-buildroot
+ exit 0
[bimal at bimal temp]$

so this will create a rpm package in /home/bimal/rpm/RPMS/i386/
directory while src.rpm in /home/bimal/rpm/SRPMS/ directory.

now to install this rpm package do as(needs root access)

[root at bimal temp]# rpm -ivh
/usr/src/redhat/RPMS/i386/thunderbird-1.0-0.rh9.i386.rpm 
					OR
[root at bimal temp]# rpm -ivh
/home/bimal/rpm/RPMS/i386/thunderbird-1.0-0.rh9.i386.rpm

now this package(thunderbird-1.0) is available to all i mean to any
common/general user!!

To check this out, login as normal user(gui mode), click on
redhat(main/start icon)
--> Internet --> Mozilla Thunderbird Mail Client

in the last, many many thanks to FedoraNEWS.ORG team especially to
Mr.Thomas Chung and please dont forget to visit this site
http://fedoranews.org/tchung/thunderbird/ , it has got lot of 
important/useful tutorials for duffers like me.

So... Got it, OK, enjoy!!! mailing...

-- 
regards,

Bimal Pandit
bimal.pandit at indoasian.com
IndoAsian Fusegear Ltd.
Noida, U.P – 201305
Phone:- +91-120-2568472/2568093-098
Fax:- +91-120-2568473
Website:- www.indoasian.com

Never be afraid to try something new. Remember, amateurs built the ark;
professionals built the Titanic.   --   Anonymous




More information about the K12OSN mailing list