http://trac.sagemath.org/sage_trac/ticket/8374
http://trac.sagemath.org/sage_trac/ticket/8375
http://trac.sagemath.org/sage_trac/ticket/8391
(all 3 awaiting review by the way).
How can I apply those patches before starting to build Sage? At the point the
tar file is extracted, I've no 'mercurial' package built, but I do have 'hg'
installed on 't2'. There is no 'devel' directory.
I'd like to be able to apply the patches, type
$ make testlong
and go away and leave it to run.
I tried extracting the file spkg/standard/sage-4.3.3.spkg, but could not work
out how to apply the 3 Mercurial patches.
One day I'll get the hang of Mercurial !!
Dave
> I want to build Sage on 't2', and know I need to apply 3 Mercurial
> patches to the Sage library - two fix numerical noise issues, the
> other replaces 'top' by 'prstat').
>
> http://trac.sagemath.org/sage_trac/ticket/8374
> http://trac.sagemath.org/sage_trac/ticket/8375
> http://trac.sagemath.org/sage_trac/ticket/8391
> (all 3 awaiting review by the way).
>
> How can I apply those patches before starting to build Sage? At the
> point the tar file is extracted, I've no 'mercurial' package built,
> but I do have 'hg' installed on 't2'. There is no 'devel' directory.
When you have an install of sage, there's a devel directory right
under sage root. I don't think it's there until you build sage. The
developers guide should be enough to go from there.
> I'd like to be able to apply the patches, type
>
> $ make testlong
>
> and go away and leave it to run.
>
> I tried extracting the file spkg/standard/sage-4.3.3.spkg, but could
> not work out how to apply the 3 Mercurial patches.
It should be possible to unpack the spkg, cd into it, run "hg import /
path/to/patch" then re-tar the spkg, and then run a make testlong, but
I've never done that. I find it much easier to patch in place. (Then
again, I want to try it out, not just run tests...)
- Robert
Yes, I've done that.
> In a Sage source tarball, the Sage library is wrapped up
> as the package
>
> SAGE_ROOT/spkg/standard/sage-x.y.z.spkg
>
> Uncompress that bzip2 compressed tarball to get a directory named
>
> SAGE_ROOT/spkg/standard/sage-x.y.z/
>
> Now delete
>
> SAGE_ROOT/spkg/standard/sage-x.y.z.spkg
I must admit, I always omit that step, as it will get overwritten
later, so there does not seem a lot of point in actually removing it
first.
> Next, patch the Sage library as if it had been built and found under
> SAGE_ROOT/devel:
>
> $ cd SAGE_ROOT/spkg/standard/sage-x.y.z/
> $ hg qimport /URL/or/path/to/patch.patch
> $ <repeat-previous-command-as-often-as-required>
>
> Once you're happy that you have applied all necessary patches, wrap up
> the patched Sage library:
>
> $ pwd
> SAGE_ROOT/spkg/standard/sage-x.y.z/
> $ hg qfinish -a
> $ cd ..
>
> And see this section
>
> http://www.sagemath.org/doc/developer/patching_spkgs.html#overview-of-patching-spkg-s
>
> of the Developer's Guide on find out how to package the newly patched
> Sage library, i.e. the directory
>
> SAGE_ROOT/spkg/standard/sage-x.y.z/
>
> Now you should have
>
> SAGE_ROOT/spkg/standard/sage-x.y.z.spkg
>
> so you could delete
>
> SAGE_ROOT/spkg/standard/sage-x.y.z/
>
> Finally, proceed to build Sage from source.
>
> --
> Regards
> Minh Van Nguyen
Thank you Minh. That was what I was looking for.
The point is though, if you know you need certain patches before Sage
will build, one might as well put them in now.
> It should be possible to unpack the spkg, cd into it, run "hg import
> /path/to/patch" then re-tar the spkg, and then run a make testlong, but I've
> never done that. I find it much easier to patch in place. (Then again, I
> want to try it out, not just run tests...)
>
> - Robert
I want to try it too, but I suspect the build will finish in the
middle of the night, so being able to run the tests immediately after
its built is useful.
I think this document I published
http://t2nb.math.washington.edu:8000/home/pub/7/
shows that even though that particular bit of the documentation passes
the test, the output viewed in a browser is rubbish. I'd love to see
some way of actually testing what the browser will display.
Dave
This is not working for me. I've put the patches in
/scratch/kirkby/sage-4.3.3/spkg/standard
'qimport' reports no issues, but 'qfinish -a' tells me there are no patches
applied. I've verified that indeed the patches are not applied.
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ rm -rf sage-4.3.3
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ tar xfj sage-4.3.3.spkg
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ cd sage-4.3.3
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../top-to-prstat.patch
adding top-to-prstat.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../8374-numerical-noise.patch
adding 8374-numerical-noise.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../numerical-noise-on-SPARC.patch
adding numerical-noise-on-SPARC.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qfinish -a
no patches applied
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $
Dave
Thank you. That has worked (I've put it below for the record). Now I can
repackage it, start the build and go to bed.
PS, if you want to check anything, feel free to use:
http://redstart.drkirkby.co.uk:8000
It is not fast (only 900 MHz), has only 2 GB RAM, and a slowish network
connection, but all patches are included, with the exception of the numerical
noise ones, as I forgot to add them to that build.
Dave
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ rm -rf sage-4.3.3
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ tar xfj sage-4.3.3.spkg
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard] $ cd sage-4.3.3
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../numerical-noise-on-SPARC.patch
adding numerical-noise-on-SPARC.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qpush
applying numerical-noise-on-SPARC.patch
now at: numerical-noise-on-SPARC.patch
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../8374-numerical-noise.patch
adding 8374-numerical-noise.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qpush
applying 8374-numerical-noise.patch
now at: 8374-numerical-noise.patch
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qimport
../top-to-prstat.patch
adding top-to-prstat.patch to series file
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qpush
applying top-to-prstat.patch
now at: top-to-prstat.patch
kirkby@t2:[/scratch/kirkby/sage-4.3.3/spkg/standard/sage-4.3.3] $ hg qapplied
numerical-noise-on-SPARC.patch
8374-numerical-noise.patch
top-to-prstat.patch
On Mar 3, 9:24 am, Minh Nguyen <nguyenmi...@gmail.com> wrote:
> Hi David,
>
> On Wed, Mar 3, 2010 at 12:17 PM, Dr. David Kirkby
>
> <david.kir...@onetel.net> wrote:
>
> <SNIP>
>
> > 'qimport' reports no issues, but 'qfinish -a' tells me there are no patches
> > applied. I've verified that indeed the patches are not applied.
>
> Correction:
>
> (1) hg qimport /URL/or/patch/to/patch.path # get/download the patch
> (2) hg qpush # really apply the patch
>
> Repeat (1) and (2) as often as necessary. After that, do this
>
> $ hg qapplied
>
> This should return the list of patches you have applied using "hg
> qpush". Once you are ready, do
>
> $ hg qfinish -a
>
> Apology for missing the "hg qpush" part.
>