RPM Package creation question
Hello all,
I am trying to create an RPM package. I just want a collection of config files to reside on this package and they should replace their counterparts on the ramdisk that I have created. Therefore, there is nothing to compile and link. Here is the spec file that I am using: Code:
%define name patches Code:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.32076 |
by the error it seems that the program tries to cd into patches-1.0
What I think is you are missing a patches-%{version}-%{release} "release part" Have you posted the complete spec file? |
...not only that but also:
- Don't use comments that make no sense. - Don't use "install -s" if there's nothing to strip. - Don't install configuration files with octal mode 0755. - Don't soil your own nest (build root) but use temp dir instead: (in your ~/.rpmmacros: %_topdir and %_tmppath). - Do clean up your mess when you're done (rm build root). * Do read the basic RPM.org docs and "Maximum RPM". It *will* help. Try this: Code:
%define debug_packages %{nil} |
The spec file that I posted was complete. Also, unSpawn thanks for your hints. I tried the spec file that you posted, however I still get the same error.
However, then I realized that the error there was my tar file was incorrect. I had named my folder simply patches wherein it was expected to be patches-1.0. Guess, I should have read the documentation but I am in a hurry. :) And that solved my problem. However, if it is not too much of a bother, could you also tell me how to create this package to be specific for the arm architecture. The architecture is called arm_v5t_le. So, if I just create a folder with the arch name, and put it in the folder RPMS, that would compile a package for this arch? Thanks for your answers and patience, I am quite a newbie when it comes to RPM in general. EDIT: rpmbuild --target .... Should have read the man pages. |
Quote:
Quote:
Posting your solution would be appreciated. |
Well, as I said the arm problem is solved. However, I need the RPM package to be relocatable. I am currently reading the docs for that but am not making much headway, if you could tell me how this is done it would be great.
|
Quote:
Quote:
|
Quote:
Quote:
|
Quote:
|
The revise spec file:
Code:
%define debug_packages %{nil} |
Two Changes and the problem is solved:
Prefix: / install -m 644 etc/resolv.conf $RPM_BUILD_ROOT/etc/resolv.conf Relieved and Thankful Rahul |
Again correction:
Prefix: . |
In a .spec file you use "Prefix" tags to mark directories for relocation, then on install you use for instance 'rpm --relocate /etc=/usr/local/etc package.rpm' to make stuff in /etc end up in /usr/local/etc. So using prefixes like you describe don't do *any* relocation as far as I know.
|
Yes, I know that as well. The thing is that I am not interested in relocation per se, it is just that the tool that I am using requires the package to be relocatable. In this case, it is a quick and dirty fix, and nothing more. :)
|
All times are GMT -5. The time now is 07:52 AM. |