From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: [PATCH] Add and use sqlite-legacy-for-python Date: Fri, 12 Feb 2016 16:13:52 -0800 Message-ID: <87h9hd8o2k.fsf@dustycloud.org> References: <20160208164641.GA28440@thebird.nl> <87ziv9poua.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUNqV-0003eM-BR for guix-devel@gnu.org; Fri, 12 Feb 2016 19:13:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUNqU-0003ci-0G for guix-devel@gnu.org; Fri, 12 Feb 2016 19:13:55 -0500 In-reply-to: <87ziv9poua.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Pjotr Prins skribis: > >> Patch b24765139c8940541b23f84592d3580d53f71d71 >> >> (define-public sqlite >> (package >> (name "sqlite") >> - (version "3.8.11.1") >> + (version "3.10.0") >> (source (origin >> >> is the cause of python(2|3)-sqlalchemy breaking. I confirmed that by >> regressing to the original sqlite package. Since the python binding is >> part of the interpreter, I suspect there may be more python modules >> vulnerable. I updated python-sqlalchemy to latest and that makes no >> difference. Its tests fail on sqlite 3.10.0 and pass on 3.8.11.1. >> >> What do we do? Revert on this sqlite patch for the new guix release? >> Or add a second sqlite package and have that as a python dependency? > > I would do the latter, assuming that soon a new python-sqlalchemy > release would solve the problem. WDYT? > > This is probably OK since python-sqlalchemy is a leaf, and so we=E2=80=99= re > unlikely to end up mixing two different SQLite versions. > > Ludo=E2=80=99. Will sqlalchemy really remain a leaf node? I hope not, since I'm working on packaging MediaGoblin now :) Regardless, I agree that the second approach seems to be the right one. I've built a modified package, sqlite-legacy-for-python, and put it to use. I built it and confirmed it builds fine and that the tests pass, and with it, the tests pass in python-sqlalchemy too. Ok to push? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-sqlite-legacy-for-python-and-use-it-in-pytho.patch Content-Transfer-Encoding: quoted-printable >From 20b9e3ac19b77b33f88d45e33ad9ceafacbdb1bd Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 12 Feb 2016 16:09:52 -0800 Subject: [PATCH] gnu: Add sqlite-legacy-for-python and use it in python's definition. * gnu/packages/database.scm (sqlite-legacy-for-python): New variable. * gnu/packages/python.scm (python): Use sqlite-legacy-for-python. --- gnu/packages/databases.scm | 30 ++++++++++++++++++++++++++++++ gnu/packages/python.scm | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index b36f5d8..c00cbb4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -8,6 +8,7 @@ ;;; Copyright =C2=A9 2015 Sou Bunnbu ;;; Copyright =C2=A9 2015 Leo Famulari ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2016 Christopher Allan Webber ;;; ;;; This file is part of GNU Guix. ;;; @@ -388,6 +389,35 @@ widely deployed SQL database engine in the world. T= he source code for SQLite is in the public domain.") (license public-domain))) =20 +;; Python packages (well, at least python-sqlalchemy) break with the lat= est +;; release of sqlite, so we need to keep this around for legacy purposes= ... +(define-public sqlite-legacy-for-python + (package + (inherit sqlite) + (version "3.8.11.1") + ;; Repeating a lot of the above definition... there's no way around = it! + (source (origin + (method url-fetch) + (uri (let ((numeric-version + (match (string-split version #\.) + ((first-digit other-digits ...) + (string-append first-digit + (string-pad-right + (string-concatenate + (map (cut string-pad <> 2 = #\0) + other-digits)) + 6 #\0)))))) + (list + (string-append + "https://fossies.org/linux/misc/sqlite-autoconf-" + numeric-version ".tar.gz") + (string-append + "http://distfiles.gentoo.org/distfiles/" + "/sqlite-autoconf-" numeric-version ".tar.gz")))) + (sha256 + (base32 + "1dnkl4qr1dgaprbyf3jddfiynkhxnin86qabni47wjlc0fnb16gv"))= )))) + (define-public tdb (package (name "tdb") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3758eed..8d6f520 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -233,7 +233,8 @@ `(("bzip2" ,bzip2) ("gdbm" ,gdbm) ("libffi" ,libffi) ; for ctypes - ("sqlite" ,sqlite) ; for sqlite extension + ;; Hopefully soon we'll have this back at vanilla sqlite + ("sqlite" ,sqlite-legacy-for-python) ; for sqlite extension ("openssl" ,openssl) ("readline" ,readline) ("zlib" ,zlib) --=20 2.6.3 --=-=-=--