<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div><span>i did</span></div><div><span>%prep<br>%setup -qn pcore<br></span></div><div><br><span></span></div><div><span>that is how i got make to run.</span></div><div><span><br></span></div><div>but i get :</div><div> cp: cannot create regular file `/pcore-0.1/usr/bin/': No such file <br></div><div><br></div><div>as a result of :</div><div>%install<br></div><div>cp obj/ggsnc/ggsnc $RPM_BUILD_ROOT%{_bindir}/</div><div><br></div><div>What i want to know id that ( as far as i think ) </div><div>that %install <br></div><div>happens in a chroot</div><div>and if i give the correct folder, the copy should happen ?</div><div>plus i WANT to copy the binary executable in /usr/bin</div><div>not sure HOW to do that</div><div><br></div><div>Thanks,</div><div>-Kamal.<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left:
5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jon Ciesla <limburgher@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Kamal Ahmed <kamal2222ahmed@yahoo.com>; Discussion of RPM packaging standards and practices for Fedora <packaging@lists.fedoraproject.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, April 12, 2012 3:48 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Fedora-packaging] Cannot cd to %{name}-%{version}<br> </font> </div> <br>
2012/4/12 Kamal Ahmed <<a ymailto="mailto:kamal2222ahmed@yahoo.com" href="mailto:kamal2222ahmed@yahoo.com">kamal2222ahmed@yahoo.com</a>>:<br>> Jon,<br>><br>> with:<br>> cp obj/ggsnc/ggsnc $RPM_BUILD_ROOT%{_bindir}/<br>><br>> i get:<br>><br>> + cp obj/ggsnc/ggsnc /pcore-0.1/usr/bin/<br>> cp: cannot create regular file `/pcore-0.1/usr/bin/': No such file or<br>> directory<br>> error: Bad exit status from /var/tmp/rpm-tmp.93551 (%install)<br>><br>> The problem being that even though my Version is 0.1 , but when i untar ,<br>> the directory gets created is pcore and not pcore-0.1.<br>> Any solution for this ?<br><br>use: %setup -qn pcore<br><br>> -Kamal.<br>><br>> ________________________________<br>> From: Jon Ciesla <<a ymailto="mailto:limburgher@gmail.com" href="mailto:limburgher@gmail.com">limburgher@gmail.com</a>><br>> To: Kamal Ahmed <<a ymailto="mailto:kamal2222ahmed@yahoo.com"
href="mailto:kamal2222ahmed@yahoo.com">kamal2222ahmed@yahoo.com</a>>; Discussion of RPM packaging<br>> standards and practices for Fedora <<a ymailto="mailto:packaging@lists.fedoraproject.org" href="mailto:packaging@lists.fedoraproject.org">packaging@lists.fedoraproject.org</a>><br>> Sent: Thursday, April 12, 2012 3:01 PM<br>> Subject: Re: [Fedora-packaging] Cannot cd to %{name}-%{version}<br>><br>> 2012/4/12 Kamal Ahmed <<a ymailto="mailto:kamal2222ahmed@yahoo.com" href="mailto:kamal2222ahmed@yahoo.com">kamal2222ahmed@yahoo.com</a>>:<br>>> i found out the directory name "pcore" but outside of rpm/spec<br>>> I wish there was a way inside the rpm , that i could find out the name of<br>>> the directory that got created as a result of make<br>>> in any case.<br>>><br>>> now i AM able to od a make, but when trying to copy the binaries ( lets<br>>> say<br>>> one of the
binaries "ggsnc" in /usr/bin) i get error message on permission<br>>><br>>> ibcm_td.a ./libmt_td.a -lpthread -lnsl -lrt -o ./hnbgw<br>>> make[1]: Leaving directory `/home/kahmed/rpmbuild/BUILD/pcore/obj/hnbgw'<br>>> + exit 0<br>>> Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32400<br>>> + umask 022<br>>> + cd /home/kahmed/rpmbuild/BUILD<br>>> + cd pcore<br>>> + LANG=C<br>>> + export LANG<br>>> + unset DISPLAY<br>>> + cp obj/ggsnc/ggsnc /usr/bin<br>>> cp: cannot create regular file `/usr/bin/ggsnc': Permission denied<br>>> error: Bad exit status from /var/tmp/rpm-tmp.32400 (%install)<br>><br>> You need to copy it to the buildroot, rather than the running system,<br>> so it should be:<br>><br>> cp obj/ggsnc/ggsnc $RPM_BUILD_ROOT%{_bindir}/<br>><br>> Or the like.<br>><br>> -J<br>><br>>><br>>> RPM build
errors:<br>>> Bad exit status from /var/tmp/rpm-tmp.32400 (%install)<br>>> 1. Am i doing the right thing which is to copy the binaries ( since we do<br>>> NOT have a make install ) to /usr/bin<br>>> or this should be done in chroot<br>>> 2. i am copying binaries in %install section, is this ok ?<br>>><br>>> %install<br>>> cp obj/ggsnc/ggsnc %{_bindir}<br>>><br>>> Thanks,<br>>> -Kamal.<br>>><br>>> ________________________________<br>>> From: zxq9 <<a ymailto="mailto:zxq9@zxq9.com" href="mailto:zxq9@zxq9.com">zxq9@zxq9.com</a>><br>>> To: <a ymailto="mailto:packaging@lists.fedoraproject.org" href="mailto:packaging@lists.fedoraproject.org">packaging@lists.fedoraproject.org</a><br>>> Sent: Thursday, April 12, 2012 11:00 AM<br>>> Subject: Re: [Fedora-packaging] Cannot cd to %{name}-%{version}<br>>><br>>>>2012/4/12 Kamal
Ahmed <<a ymailto="mailto:kamal2222ahmed@yahoo.com" href="mailto:kamal2222ahmed@yahoo.com">kamal2222ahmed@yahoo.com</a>>:<br>>>>><br>>>>> %prep<br>>>>> mkdir %{name}-%{version}<br>>>><br>>>>Find out what the directory is really called after extraction, i.e.<br>>>>foo-somethingelse and change<br>>>><br>>>>> %setup -q<br>>>><br>>>>to<br>>>><br>>>>%setup -qn foo-somethingelse<br>>><br>>> Whatever the extraction directory is gets removed prior to the build to<br>>> keep<br>>> the space clean. So what he's saying is that your problem (isolated below)<br>>> will stop happening if you name the build one something else.<br>>><br>>>>> rpmbuild -bb pcore.spec<br>>><br>>> Everything is fine here...<br>>><br>>>>> Executing(%prep): /bin/sh -e
/var/tmp/rpm-tmp.66518<br>>>>> + umask 022<br>>>>> + cd /home/kahmed/rpmbuild/BUILD<br>>>>> + LANG=C<br>>>>> + export LANG<br>>>>> + unset DISPLAY<br>>>>> + mkdir pcore-0.1<br>>><br>>> And here the working directory is made based on the default extraction<br>>> directory (that is, {% name %}-{% version %}).<br>>><br>>>>> + cd /home/kahmed/rpmbuild/BUILD<br>>>>> + rm -rf pcore-0.1<br>>><br>>> And here it gets removed! So you need to name the one you really want to<br>>> use<br>>> something different, which is what Jon is saying about "setup -qn<br>>> something-else".<br>>><br>>>>> + /bin/gzip -dc /home/kahmed/rpmbuild/SOURCES/pcore-0.1.tar.gz<br>>>>> + tar -xf -<br>>>>> + STATUS=0<br>>>>> + '[' 0 -ne 0 ']'<br>>>>> + cd
pcore-0.1<br>>><br>>> And of course this step doesn't work because pcore-0.1 has already been<br>>> "rm -rf"d<br>>><br>>>>> /var/tmp/rpm-tmp.66518: line 37: cd: pcore-0.1: No such file or<br>>>>> directory<br>>><br>>> Hope this makes more sense now. Packaging is a little mysterious until you<br>>> play with it a bit on your own. And once you do, you'll find that Fedora<br>>> has the best all-around guidelines for it, all told. They are strict and a<br>>> little difficult to understand "why" at first, but there is a *lot* of<br>>> experience expressed in the packaging guidelines, tutorials, rpm itself<br>>> and<br>>> this list (most of the time...).<br>>> --<br>>> packaging mailing list<br>>> <a ymailto="mailto:packaging@lists.fedoraproject.org" href="mailto:packaging@lists.fedoraproject.org">packaging@lists.fedoraproject.org</a><br>>>
<a href="https://admin.fedoraproject.org/mailman/listinfo/packaging" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/packaging</a><br>>><br>>><br>>> --<br>>> packaging mailing list<br>>> <a ymailto="mailto:packaging@lists.fedoraproject.org" href="mailto:packaging@lists.fedoraproject.org">packaging@lists.fedoraproject.org</a><br>>> <a href="https://admin.fedoraproject.org/mailman/listinfo/packaging" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/packaging</a><br>><br>><br>><br>> --<br>> in your fear, seek only peace<br>> in your fear, seek only love<br>><br>> -d. bowie<br>><br>><br>><br>> --<br>> packaging mailing list<br>> <a ymailto="mailto:packaging@lists.fedoraproject.org" href="mailto:packaging@lists.fedoraproject.org">packaging@lists.fedoraproject.org</a><br>> <a href="https://admin.fedoraproject.org/mailman/listinfo/packaging"
target="_blank">https://admin.fedoraproject.org/mailman/listinfo/packaging</a><br><br><br><br>-- <br>in your fear, seek only peace<br>in your fear, seek only love<br><br>-d. bowie<br><br><br> </div> </div> </blockquote></div> </div></body></html>