Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-18-2011, 10:15 PM   #1
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 10:21 PM. Reason: cleaning it up
Old 04-19-2011, 02:55 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,742

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Please have a look into the original EL5 tk-8.4.13 "tk.spec"

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

Line 106

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


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

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

All times are GMT -5. The time now is 01:24 AM.

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