.spec file: creating an RPM: Files don't appear in designated paths
Code:
Name: foo Is there anything missing in my code? [EDIT]I can't find a solution on Google (probably because I don't know what my problem is :)) |
I think it would be easier for you if you post an actual spec file you work with (can test). If you run rpmbuild it no doubt will spit out informative messages. This rpm will contain no files (not even empty dirs since they're not mentioned in the files section).
|
[QUOTE=unSpawn]I think it would be easier for you if you post an actual spec file you work with (can test).
OK. The actual spec file follows: Code:
Name: bibledave Quote:
I also have noticed some people mentioning some rpmrc file. Should I create one? So, how would I mention the files in the files section?:confused: Thanks for your help so far :) |
I have run rpmbuild but I have not gotten any usefull files.
Because the spec file doesn't do nothing yet ;-p I also have noticed some people mentioning some rpmrc file. Should I create one? You don't have to create (=copy from default) a ~/.rpmrc. You may want to build RPM's as unprivileged user to keep from poisoning your buildsystem. Set up your own ~/.rpmmacros. It deals with setting your local RPM root (%_topdir ~/somedir) under which you'll have the source, build, temp dirs, etc, etc. For details see the excellent IBM developerWorks: Building without root, patching software, and distributing RPMs. Other docs to read would be the RPM HOWTO and any distribution-specific RPM docs. So, how would I mention the files in the files section? Basically what you do first is unpack the tarball (in this case a zipfile so watch your source directive), read the README or INSTALL files, run configure with appropriate args, run make and "make -n install" to see where it all goes to. 0. Download and unpack bibledave and in the bibledave_v0.6.6 dir there's no default configure(.in) (and or Makefile) but a file called "run.sh" which executes the game (python main.py) and when done deletes any compiled files (rm *.pyc -f). 1. Also all files and dirs are used in the current structure so you can't have it installed in /usr/share/games or /usr/games/bin but in /usr/share/games/bibledave or /usr/games/bin/bibledave 2. with a symlink from say /usr/local/bin/bibledave to /usr/share/games/bibledave/run.sh. 3. Decide on which dir and make the run.sh a proper Bash script: Code:
#!/bin/sh Code:
find . -type d -name CVS|xargs -iD rm -rf 'D' Code:
find . -type f -iname \*.bat -o -iname \*.ico -o -iname \*.nsi|xargs -iF rm -f 'F' 5. Make a files listing: Code:
find . | xargs -iX stat -c "attr(%a,root,root) %n" X|sed -e "s/^a/%\0/g" -e "s/) \./) \/usr\/share\/games\/bibledave/g" > spec_files 6. There's some more stuff but I guess it's time to finish off with a spec file, as always, YMMV(VM). Since LQ has a post limit I'll try and post in below. Edit: the spec file is too large. It will be available at this URI for aprox seven days from now. Please note: the build process and spec file described with all the kludges and workarounds are definately NONSTANDARD. Do not use this unless you are forced to. Also it's better to use well-packaged source tarballs ( bug your maintainers about packaging standards). |
For the most in-depth word on rpm, especially .spec files, see the book Maximum-RPM at the Red Hat website (somewhere under Documentation). You can read it on-line or download it.
|
Thanks for the links and getting me this far, but I have a few questions:
Code:
.... |
+ /usr/bin/unzip -qq /home/therat/rpm/SOURCES/bibledave_v0.6.6.zip
(..) /var/tmp/rpm-tmp.10768: line 36: cd: bibledave-0.6.6: No such file or directory "unzip -l /home/therat/rpm/SOURCES/bibledave_v0.6.6.zip" and you'll notice the directoryname is different. That's why I said: Code:
%prep |
Oops. :) Sorry about that.
Well I fixed a few new errors on my own, but I was wondering why I'm getting a few strange errors: Code:
... (huge list of duplicate names) I'll continue to play around with this though. Thanks. |
Well I fixed a few new errors on my own
I'm sure they are *your* errors because the rpm packaged w/o probs here. ... (huge list of duplicate names) ...well, yeah, OK, except for the duplicate names. But that won't keep rpm from building the package. error: Installed (but unpackaged) file(s) found: Sorry, you must have changed something because the rpm packaged w/o that specific prob here. IOW: find the differences. BTW, are you going to be the rpm maintainer for that app? |
Quote:
Quote:
|
Strange. I've started from the beginning, following your instructions to the letter and I come with errors (yes again :() This one feels familiar but I can't seem to solve it:
Code:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.96539 |
Let's just replace the install line with:
Code:
find ${RPM_BUILD_ROOT} -iname SF\*.ttf"|while read t; do |
When I swapped
Code:
install "SF Comic Script.ttf" ${RPM_BUILD_ROOT}/usr/share/games/bibledave Code:
find ${RPM_BUILD_ROOT} -iname SF\*.ttf"|while read t; do Code:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.67919 Quote:
|
Oh, nvm, I removed the quote after -iname SF\*.ttf" that was causing the problem.
But now I'm at another obstacle. rpmbuild stops and displays this message: Code:
Installed (but unpackaged) file(s) found: |
Oh, nvm, I removed the quote after -iname SF\*.ttf" that was causing the problem.
But now I'm at another obstacle. rpmbuild stops and displays this message: Code:
Installed (but unpackaged) file(s) found: |
Installed (but unpackaged) file(s) found:
Reference then in the %files section. Now lets try to build you a script that will get rid of all of this. What I would like you to do is attach your most recent .spec file by email, and also give the location of the source tarball and how you download it if it's not a browser (CVS etc). |
Quote:
Quote:
|
Here's your package...
Code:
H4sIAJjs0UQAA+1Z+1MbyRH2r96/or3A8Si0egCiSgQnmFfImUchsOtiHGq1Gkkb Good luck! |
It works! Thanks!
|
All times are GMT -5. The time now is 04:13 AM. |