LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-18-2011, 09:15 PM   #1
sandricky
LQ Newbie
 
Registered: Nov 2008
Posts: 14

Rep: Reputation: 0
How do I create a softlink when building an rpm in RHEL 5.5


I am trying to build an tk.8.4.19 with the rpmbuild command. In the spec file there is a make command that uses the supplied Makefile that builds tk and untars it to the build directory /usr/src/redhat/BUILD/tk_8.4.19/unix .

The issue is that /usr/bin/wish is compiled with the make command and renamed to wish8.4, , and when the rpm does build it does not contain the link /usr/bin/wish -> /usr/bin/wish8.4 and there are other custom rpms on our systems (built by other people) that call /usr/bin/wish.

I have tried adding the ldconfig ln -sf /usr/bin/wish8.4 /usr/bin/wish in the %install and %build directives, it is in the tar file. I have tested it by creating the tar with the link and creating a null file call wish but it never gets built into the rpm. Whenever I call out /usr/bin/wish in the %file directive the rpm wont build.

I believe it will install and create the link if I tell it to ignore or skip the prereq check. That requires options to the yum command but it creates a problem because I need to to work with yum -y install <tk> or yum -y upgrade <tk> through a unattended script.

Bottom line is that I need the file to exist in the rpm or after the install and yum needs to be aware that /usr/bin/wish link is there so it doesn't require an override option during install.

A bazillion thanks for your time and help!

Last edited by sandricky; 04-18-2011 at 09:21 PM. Reason: cleaning it up
 
Old 04-19-2011, 01:55 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,199

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Please have a look into the original EL5 tk-8.4.13 "tk.spec"
http://ftp.redhat.com/pub/redhat/lin...l5_1.1.src.rpm

Line 76
ln -s wish%{majorver} %{buildroot}%{_bindir}/wish

Line 106
%{_bindir}/wish*


Optional solution :
%post
ln -sf /usr/bin/wish8.4 /usr/bin/wish
 
  


Reply

Tags
links, rpmbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL: Create custom RPM block921 Linux - General 3 06-02-2011 03:51 PM
Building RPM in RHEL 5 Hi_This_is_Dev Linux - Software 1 09-03-2009 10:55 PM
Help create a softlink gate Linux - Newbie 1 03-20-2009 10:39 PM
Cannot create Linux softlink on smbfs neqboan Linux - General 0 07-30-2003 02:21 PM


All times are GMT -5. The time now is 12:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration