I have java application with pom.xml. I am making rpm package with prefixes tags .
When I am querying on prefix tags of rpm :
sudo rpm -qp --queryformat "%{prefixes}\n" java-hbase-processor-1.0-SNAPSHOT20160330060627.noarch.rpm
I got ==> /var
IF I run following command :
rpm -qi java-hbase-processor | grep Relocations
I got :
Relocations : /opt /tmp
Relocations : /var /tmp
All above shows that rpm is relocatable . But if run install command
sudo rpm -i --prefix=/home/sohanvir/ java-hbase-processor-1.0-SNAPSHOT20160330060627.noarch.rpm
It will give error with message:
error: package java-hbase-processor is not relocatable
Thanks in advance .
Best Answer
According to RPM.org:
However, it goes on to say that there are a number of things that can go wrong in building a relocatable RPM (even if you see the
Prefix
tags). If you only want to extract files from the RPM, there are tools for that (such asrpmunpack
,rpm2cpio
orunrpm
).Further reading:
Chapter 15. Making a Relocatable Package
HowTo: Extract an RPM Package Files Without Installing It