[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] POPT (was Pilot link)
On Sun, 2 Mar 2008 13:11:05 , Edgar Aichinger <edgar.aichinger@aon.at> wrote:
> Hi Peter,
>
> I did quite some packaging for Sparemint several years ago (until my falcon's
> harddisk started to die and i had to make the move to linux/x86).
>
> I think the easiest way to do update popt would be:
>
> - install the existing old popt sparemint SRPM [1]
> - go to /usr/src/redhat/SPECS (or was it /usr/src/sparemint, can't remember...)
> - modify popt.spec
> - copy the new src tarball to /usr/src/redhat/SOURCES
> - run "rpm -ba popt.spec"
>
> Often the only changes needed in the .spec are to update the software version
> in the Version: header tag, and to write a new changelog entry.
>
> And there's a good chance you'll find fixes for porting problems like this wchar
> issue, which I somehow seem to remember to have seen before, could be it is used
> already with tho old popt rpm.
>
> Also if a new patch is needed, just make backup copies of the affected source
> files, using a descriptive extension (like .wchar in this case) or even just
> "something.c.orig" etc., then edit the source and finally run rpm's gendiff
> from outside the build tree to create the patch. Gendiff is a very convenient
> helper script IMO. See man gendiff or run "gendiff" to get a usage message.
> Then move the patch to SOURCES and edit the .spec file to include it.
>
> To learn rpm may need a bit of your time first, but later can save you a lot
> of it. I always thought it was worth the initial effort.
>
> Edgar
>
> [1] http://sparemint.atariforge.net/sparemint/SRPMS/popt-1.3-4.src.rpm
>
Thanks Edgar, that is really useful, I had forgotten quite a lot since I
last looked at rpm.
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.
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. Next it seems to have problems
with the file locations in the tmp file it creates. So far
no success. Below is the tmp file:
#!/bin/sh
RPM_SOURCE_DIR="/usr/src/redhat/SOURCES"
RPM_BUILD_DIR="/usr/src/redhat/BUILD"
RPM_OPT_FLAGS="-O2 -fomit-frame-pointer"
RPM_ARCH="m68kmint"
RPM_OS="mint"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="popt"
RPM_PACKAGE_VERSION="1.13"
RPM_PACKAGE_RELEASE="1"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/var/tmp/poptroot"
export RPM_BUILD_ROOT
set -x
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=$?
if [ $STATUS -ne 0 ]; then
exit $STATUS
fi
cd popt-1.13
[ `/usr/bin/id -u` = '0' ] && /bin/chown -Rf root .
[ `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rf wheel .
/bin/chmod -Rf a+rX,g-w,o-w .
exit 0
It is the cd popt-1.13 that it struggles with despite me copying
the spec file and tar.gz to various places in redhat/SOURCES/
At the moment the source is just patched in the way that Alan
hinted. Is there a more formal way of patching the code ?
Regards,
Peter