Goal
I have a rpm package, but I want to substitute several files in the rpm, and make a new rpm.
Backgroud
I couldn't find srpm of a certain software. What I could download is the rpm package.
Operations
a. I got the spec file from the rpm by
rpmrebuild --package --notest-install -sxxx.spec xxx.rpm
b. I got all the files in the rpm by
rpm2cpio pkgname | cpio -ivd
c. I copied the files from above into ~/rpmbuild/SOURCE, and copied the xxx.spec to ~/rpmbuild/SPECS
d. I did
rpmbuild -bb xxx.spec
but I foundFile not found:
for every file.Question
I don't know how to solve this problem. Should I make a tarball of the files from
rpm2cpio pkgname | cpio -ivd
and then go to modify the spec file?Or I must install the rpm first and then try to run
rpmrebuild
to create a new rpm?I want to know the traditional way to solve this problem, thanks very much.
I want to remake rpm package without srpm
414 views Asked by Lawrence At
1
You relly need to open up that spec and adapt it to the files it expects. The spec file itself holds the answer to most of your questions:
The
Source
tag(s) will tell you the source files that are needed and their names.The
%files
section will tell you what files are expected to be in the in the rpm after building it.I advise you to open another question and post the spec file and a list of the files you extracted wit
rpm2cpio