[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] POPT (was Pilot link)



On Tue, 4 Mar 2008 09:07:51 , Frank Naumann <fnaumann@boerde.de> wrote:
> Hello!
>
> > The 1.3 srpm includes a file popt-1.3-mintcnf.patch  I am not sure
> > what to do with this, if anything is required.
>
> It belong to the SOURCES directory too. rpm use this to build the package
> (it's mentioned inside the spec file).

Hello Frank,

I can't see a reference to the patch file in the 1.3 spec file.

> > I copied the 1.13 sources to \usr\src\redhat\SOURCES\popt-1.13\
> > and tried the spec file from 1.13.  It requires the source to
> > be in a tar.gz so I compressed it.
>
> The right way is to modify the spec file, not to recompress the source
> archive. rpm can perfectly handle bzip2 too.

I thought it was unusual too. The SRPM has a tar.gz and that it what
both versions of the spec files expect to find, I think. Without
the file I just get:

bash-2.05a# rpm -ba popt.spec
File /usr/src/redhat/SOURCES/popt-1.13.tar.gz: No such file or directory

> > with the file locations in the tmp file it creates. So far
> > no success. Below is the tmp file:
>
> That't don't help much. What's the exact error message rpm produce?

It tries to cd to pop-1.13 but fails because it can't find it:

bash-2.05a# cd /usr/src/redhat/SOURCES/popt-1.13
bash-2.05a# rpm -ba popt.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.37439
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf popt-1.13
+ /bin/gzip -dc /usr/src/redhat/SOURCES/popt-1.13.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd popt-1.13
/var/tmp/rpm-tmp.37439: cd: popt-1.13: No such file or directory
Bad exit status from /var/tmp/rpm-tmp.37439 (%prep)

or if I cd ..

bash-2.05a# pwd
/usr/src/redhat/SOURCES
bash-2.05a# rpm -ba popt.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.48385
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd /usr/src/redhat/BUILD
+ rm -rf popt-1.13
+ /bin/gzip -dc /usr/src/redhat/SOURCES/popt-1.13.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd popt-1.13
/var/tmp/rpm-tmp.48385: cd: popt-1.13: No such file or directory
Bad exit status from /var/tmp/rpm-tmp.48385 (%prep)

> > At the moment the source is just patched in the way that Alan
> > hinted. Is there a more formal way of patching the code ?
>
> Sure. Create a patch file like the popt-1.3-mintcnf.patch, copy it to the
> SOURCES folder and add it to the spec file so rpm automatically apply it
> while building the package. And never modify the original source archive
> that is used by rpm.

Was the 1.3 patch file generated by something like diff ?

Is it necessary to include the old patch (or parts of it) into the new
patch ?

Regards,

Peter