Differences between revisions 224 and 225
Revision 224 as of 2016-07-09 21:07:13
Size: 10249
Editor: ?TobiasHansen
Comment: We need cython 0.24 for f-strings.
Revision 225 as of 2016-07-09 21:53:13
Size: 10266
Editor: ?TobiasHansen
Comment: Add cython bug number
Deletions are marked like this. Additions are marked like this.
Line 56: Line 56:
|| [[https://packages.qa.debian.org/c/cython.html|cython]] || || Debian maintainer needs to apply [[https://git.sagemath.org/sage.git/tree/build/pkgs/cython/patches?id=7.1|these Sage patches]] and we need cython 0.24 (not yet in our APT) for its [[https://groups.google.com/d/msg/sage-release/ZKlw6Meolnc/KDZ1BSuYLgAJ|support for f-strings]]. || || [[https://packages.qa.debian.org/c/cython.html|cython]] || DebianBug:830645 || Debian maintainer needs to apply [[https://git.sagemath.org/sage.git/tree/build/pkgs/cython/patches?id=7.1|these Sage patches]] and we need cython 0.24 (not yet in our APT) for its [[https://groups.google.com/d/msg/sage-release/ZKlw6Meolnc/KDZ1BSuYLgAJ|support for f-strings]]. ||

Some people within DebianScience would like to package again Sage for Debian. An old version of Sage got packaged long time ago by Tim Abbott, but, because of lack of maintainance, it became totally unusable and was removed from Debian. The status pages (master branch, develop branch) give an overview about package versions in Sage and Debian. If you want to help out, pick one of the open tasks or issues below and get going. Or contact us via the mailing list or in #debian-science on irc.oftc.net.

Building Sage with Debian packages

We have a git repository (sagemath) to document the steps we currently do to experiment with building Sage against Debian packages. Important elements are the build dependencies of Sage, patches for Sage and a script called "pruner" that uses automake to determine if the necessary packages are installed (see also this mail).

To set up your system for working with our repo:

for d in deb deb-src; do \
    echo "$d https://debian-science.alioth.debian.org/apt sid-sage/"; done \
  | sudo tee /etc/apt/sources.list.d/deb-sci-sage.list

Add our unstable-sage repo for patched dependencies. This is optional; if you prefer you can build these yourself from the instructions in the table below.

torsocks gpg2 --recv-keys 0xD1188AF4A1398A5FCC3F576654B3F967097676A0

Get the repo key.

gpg2 --export 0xD1188AF4A1398A5FCC3F576654B3F967097676A0 | sudo apt-key add -

Install the repo key.

printf "Package: *\nPin: release n=sid-sage\nPin-Priority: 100\n" \
  | sudo tee /etc/apt/preferences.d/deb-sci-sage
sudo apt-get update

Pin our repo at a low priority so it doesn't mess with the rest of your system. OTOH, if you really really want this repo's packages, to make sure you get the latest and greatest efforts of the Debian Sage packaging team above all else (including maybe our patched dependency packages messing up your system) then you can set the Pin-Priority to a high number like 800.

git clone --recursive https://anonscm.debian.org/git/debian-science/packages/sagemath.git

Recursive git clone to also get sage which is included as a git submodule.

To build the package, run:

sudo mk-build-deps -ir debian/control

Install build dependencies that are in unstable and unstable-sage.

quilt push -a

Apply patches to Sage.

debian/rules prune

Run the pruner script.

debian/rules build

Build sage and run the test suite (includes pruning if necessary, but not patching).

The output of the pruner tells you in the end which dependencies were not found on the machine. These will be downloaded and built in the build step, before Sage itself is built. Currently (Jul 2016) the pruner should output something like the following.

cysignals will not come from debian!
libgap will not come from debian!
speaklater will not come from debian!
ipywidgets will not come from debian!
nbformat will not come from debian!
nbconvert will not come from debian!
notebook will not come from debian!
jmol will not come from debian!
138 system packages will be used

When building against our patched packages, the compilation of Sage 7.1 should finish. (See debian/README.Debian for any workarounds you might have to apply, such as patching local system files; we're working on reducing this down to nothing.)

The following commands clean everything up properly.

debian/rules clean

Clean up after prune and build.

quilt pop -a

Unapply patches.

cd sage && git clean -dfx

Clean sage folder (git does not show untracked files from the built due to .gitignore).

rm -rf ~/.sage/local/

Remove sage user-local libraries installed during our (temporary) build process.

Open tasks

Packages in our development APT repository:

Up-to-date information about the packages in the repo can be found on the status pages. (master branch, develop branch)

Package

Bug / Link

Reason for being in the repository

singular

PTS

singular 3.1.6 is packaged in our git and APT repo; 3.1.7 is what Sage 7.1 is using, hopefully it is still compatible with our 3.1.6. (Singular 4.0.3 is now in Debian but unfortunately its API is restructured from 3.1.7; we are waiting for Sage upstream to migrate.)

polybori/brial

PTS

polybori has been renamed to brial and upstream has not yet fully migrated.

maxima-sage

779804

Sage uses ECL as Common Lisp compiler, Debian uses GCL for Maxima and should be patched to support both.

pari-sage

777237

Sage uses development versions of Pari.

fplll

TBD

Sage uses development versions of libfplll.

eclib

Must be re-built against our version of pari.

lcalc

Must be re-built against our version of pari; use the branch pari-2.8

cython

830645

Debian maintainer needs to apply these Sage patches and we need cython 0.24 (not yet in our APT) for its support for f-strings.

ecl

777473

Debian maintainer needs to apply this upstream patch

sagenb

The current sagenb package ships a bunch of javascript libraries. It should use at least these Debian packages instead: mathjax, tinymce, jquery, jqueryui, codemirror

Other packages:

Package

Bug / Link

Assigned

Comments

Packages that need a new maintainer and an upload to Debian:

jmol

There is a request for help, see 719330

libgap

Can maybe be replaced by a wrapper for GAP.

sagetex

Packages that are (hopefully) not needed:

cephes

The Cephes Mathematical Library is only needed for systems where the libc doesn't provide appropriate mathematical functions (cygwin and FreeBSD) and so is not required for Debian.

iconv

is part of the libc

mpir

708391

mpir is supposed to be ABI-compatible with gmp. A lot of math packages use gmp and we hope we can have a purely gmp based Sage in Debian. Combining the two will most likely lead to conflicts, using mpir we would need an extra mpir version of many packages.

Uploading patched packages

We've set up a mini-dinstall APT repo to upload our patched Debian packages to, so that we can build sage against these. This is a temporary measure to make everything work more quickly, and these patched packages are unlikely to be added to Debian officially.

To upload, you must be a member of the debian-science group on alioth. Then, you should add this to your ~/.dput.cf:

[deb-sci-sage]
method = scp
fqdn = alioth.debian.org
incoming = /home/groups/debian-science/htdocs/apt/mini-dinstall/incoming/
post_upload_command = ssh alioth.debian.org /home/groups/debian-science/mini-dinstall

mini-dinstall is pretty forgiving and you should be able to overwrite any existing version in this repo or even downgrade versions. However, you must set the distribution in debian/changelog to sid-sage or unstable-sage, otherwise your package will get rejected. Alternatively, do the build without changing debian/changelog, then afterwards edit the .changes file to say Distribution: sid-sage, then debsign it and upload.

Links