Download your favorite Linux distribution at LQ ISO.
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 11-28-2002, 09:43 AM   #1
LQ Newbie
Registered: Nov 2002
Posts: 3

Rep: Reputation: 0
RPM prefix problem


I have been using Redhat 8.0 which has RPM version 4.1. I am trying to build my own RPM package. My work does not involve any building/make. I just need to pack directories and tar files which inturn has binaries and libraries that is already prepared. I am able to create the package (%files) which includes the directories and tar files. But the problem that I am facing is, During installation I wanted to install the files in the location the user wishes to install. So I created the spec file with the "Prefix: %{defpref}" tag making it a relocatable package. When I try to install using "rpm -i --prefix=<newdir> <rpm>" it does not install in the <newdir>, but installs in the location of the file as it is in package ( ie. in %{defpref}) . I tried using --relocate as well, but it didn't work out. Can anyone tell me what I am missing here? and solve my problem. Do let me know in case the question asked is not clear.


Old 11-28-2002, 11:05 PM   #2
Registered: Nov 2001
Location: London, UK
Distribution: Fedora
Posts: 161

Rep: Reputation: 43
Have you included the prefix in the Makefile install section?
RPM will just pass the prefix on to your install script, usually make.
Old 11-29-2002, 02:39 AM   #3
LQ Newbie
Registered: Nov 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Hi DaveG,

As I have mentioned in my question, my spec file is just a simple one which has
1) the Preamble ( which has Prefix tag since I wanted to make it a relocatable package) and
2) the (%files) list of files/directories (my_dir) that is a part of the package.

$ cat mypack.spec
%define defpref /home/hema/test_pack
Summary: MYPACK on Linux
Name: Mypack
Version: 1.0
Release: 1
Copyright: GPL
Group: Applications
Prefix: %{defpref}
Distribution: Linux

This is just used for checking how rpm works.......


So here I have my binaries ready. I just need to package the binaries which are there in my_dir. R U able to trace out any problem from the spec file.


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
./configure --prefix= plan9 Slackware 5 01-03-2013 04:44 AM
Always -prefix=/usr? oneandoneis2 Linux From Scratch 5 07-28-2004 12:11 AM
Optimize/Prefix rogk Linux - Software 1 07-25-2004 05:04 AM
Sendmail prefix mikeyt_333 Linux - Software 0 07-17-2004 02:13 PM
prefix for rpm packages hfawzy Linux - Newbie 2 09-09-2002 03:42 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:26 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