From d5a641dc2e28c0c944d5c4769d8171f79a187541 Mon Sep 17 00:00:00 2001 From: vicvbcun Date: Mon, 8 Aug 2022 17:45:40 +0200 Subject: gnu: lcalc: Update to 2.0.5. * gnu/packages/sagemath.scm (lcalc): Update to 2.0.5. * gnu/packages/patches/lcalc-default-parameters-1.patch, gnu/packages/patches/lcalc-default-parameters-2.patch, gnu/packages/patches/lcalc-lcommon-h.patch, gnu/packages/patches/lcalc-using-namespace-std.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Unregister files. Signed-off-by: Andreas Enge --- .../patches/lcalc-default-parameters-1.patch | 26 ---------- .../patches/lcalc-default-parameters-2.patch | 58 ---------------------- gnu/packages/patches/lcalc-lcommon-h.patch | 13 ----- .../patches/lcalc-using-namespace-std.patch | 43 ---------------- 4 files changed, 140 deletions(-) delete mode 100644 gnu/packages/patches/lcalc-default-parameters-1.patch delete mode 100644 gnu/packages/patches/lcalc-default-parameters-2.patch delete mode 100644 gnu/packages/patches/lcalc-lcommon-h.patch delete mode 100644 gnu/packages/patches/lcalc-using-namespace-std.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/lcalc-default-parameters-1.patch b/gnu/packages/patches/lcalc-default-parameters-1.patch deleted file mode 100644 index 19b0776320..0000000000 --- a/gnu/packages/patches/lcalc-default-parameters-1.patch +++ /dev/null @@ -1,26 +0,0 @@ -Patch taken from the Sage packaging system. - -diff -Naur lcalc-1.23-vanilla/include/Ldirichlet_series.h lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h ---- lcalc-1.23-vanilla/include/Ldirichlet_series.h 2012-08-08 23:21:55.000000000 +0200 -+++ lcalc-1.23-fixed-gcc.4.9/include/Ldirichlet_series.h 2014-04-21 14:37:59.027464849 +0200 -@@ -43,7 +43,7 @@ - //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - template - Complex L_function :: --dirichlet_series(Complex s, long long N=-1) -+dirichlet_series(Complex s, long long N) - { - Complex z=0.; - long long m,n; -diff -Naur lcalc-1.23-vanilla/include/L.h lcalc-1.23-fixed-gcc.4.9/include/L.h ---- lcalc-1.23-vanilla/include/L.h 2012-08-08 23:21:55.000000000 +0200 -+++ lcalc-1.23-fixed-gcc.4.9/include/L.h 2014-04-21 14:32:04.003467348 +0200 -@@ -491,7 +491,7 @@ - - //#include "Ldirichlet_series.h" //for computing Dirichlet series - Complex partial_dirichlet_series(Complex s, long long N1, long long N2); -- Complex dirichlet_series(Complex s, long long N); -+ Complex dirichlet_series(Complex s, long long N=-1LL); - - //#include "Ltaylor_series.h" //for computing taylor series for Dirichlet series - //void compute_taylor_series(int N, int K, Complex s_0, Complex *series); diff --git a/gnu/packages/patches/lcalc-default-parameters-2.patch b/gnu/packages/patches/lcalc-default-parameters-2.patch deleted file mode 100644 index 1d881ee0c4..0000000000 --- a/gnu/packages/patches/lcalc-default-parameters-2.patch +++ /dev/null @@ -1,58 +0,0 @@ -Patch taken from the Sage packaging system. - ---- lcalc-1.23/include/Lgamma.h 2012-08-08 23:21:55.000000000 +0200 -+++ lcalc-1.23/include/Lgamma.h 2014-05-18 21:15:27.786889718 +0200 -@@ -77,7 +77,7 @@ - //n=0 should just give log_GAMMA(z)... thus making log_GAMMA - //code obsolete. But leave log_GAMMA intact anyways. - template --precise(ttype) log_GAMMA (ttype z,int n=0) -+precise(ttype) log_GAMMA (ttype z,int n) - { - int M; - precise(ttype) log_G,r,r2,y; -@@ -230,7 +230,7 @@ - //value exp_w which holds exp(-w) - //computes G(z,w), so there's an extra w^(-z) factor. - template --Complex inc_GAMMA (ttype z,ttype w, const char *method="temme", ttype exp_w = 0, bool recycle=false) -+Complex inc_GAMMA (ttype z,ttype w, const char *method, ttype exp_w, bool recycle) - { - - Complex G; -@@ -334,7 +334,7 @@ - - - template --ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w=0, bool recycle=false) //computes G(z,w) via continued fraction -+ttype cfrac_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via continued fraction - { - - ttype G; -@@ -424,7 +424,7 @@ - } - - template --ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w = 0, bool recycle=false) //computes G(z,w) via asymptotic series -+ttype asympt_GAMMA (ttype z,ttype w, ttype exp_w, bool recycle) //computes G(z,w) via asymptotic series - { - - if(my_verbose>3) cout << "called asympt_GAMMA("< --ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w = 0, bool recycle=false) //computes g(z,w) -+ttype comp_inc_GAMMA (ttype z,ttype w,ttype exp_w, bool recycle) //computes g(z,w) - { - - ttype g; -@@ -604,7 +604,7 @@ - } - - template --Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta=1, const char *method="temme") -+Complex gamma_sum(Complex s, int what_type, ttype *coeff, int N, Double g, Complex l, Double Q, Long Period, Complex delta, const char *method) - { - Complex SUM=0; - diff --git a/gnu/packages/patches/lcalc-lcommon-h.patch b/gnu/packages/patches/lcalc-lcommon-h.patch deleted file mode 100644 index 897956de64..0000000000 --- a/gnu/packages/patches/lcalc-lcommon-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -Patch taken from the Sage packaging system. - ---- src/include/Lcommon.h 2010-01-31 15:16:45.000000000 +0000 -+++ src/include/Lcommon.h 2011-03-08 21:19:11.849443238 +0000 -@@ -25,7 +25,7 @@ - #ifdef USE_MPFR - inline double lcalc_to_double(const double& x) { return x; } - #endif --//inline double lcalc_to_double(const long double& x) { return x; } -+inline double lcalc_to_double(const long double& x) { return x; } - inline double lcalc_to_double(const int& x) { return x; } - inline double lcalc_to_double(const long long& x) { return x; } - inline double lcalc_to_double(const short& x) { return x; } diff --git a/gnu/packages/patches/lcalc-using-namespace-std.patch b/gnu/packages/patches/lcalc-using-namespace-std.patch deleted file mode 100644 index 6e0075fdc8..0000000000 --- a/gnu/packages/patches/lcalc-using-namespace-std.patch +++ /dev/null @@ -1,43 +0,0 @@ -Patch taken from the Sage packaging system. - -diff --git a/include/Lcommon.h b/include/Lcommon.h -index 1b3be43..bf40532 100644 ---- a/include/Lcommon.h -+++ b/include/Lcommon.h -@@ -48,7 +48,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th - - // Loop i from m to n - // Useful in tidying up most for loops --#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++) -+#define loop(i,m,n) for(auto i=(m); i!=(n); i++) - - // A class for calculations involving polynomials of small degree - // Not efficient enough for huge polynomials -diff --git a/include/Lcommon_ld.h b/include/Lcommon_ld.h -index 86ae4df..33c560c 100644 ---- a/include/Lcommon_ld.h -+++ b/include/Lcommon_ld.h -@@ -53,7 +53,7 @@ const bool outputSeries=true; // Whether to output the coefficients or just th - - // Loop i from m to n - // Useful in tidying up most for loops --#define loop(i,m,n) for(typeof(m) i=(m); i!=(n); i++) -+#define loop(i,m,n) for(auto i=(m); i!=(n); i++) - - // A class for calculations involving polynomials of small degree - // Not efficient enough for huge polynomials -diff --git a/include/Lglobals.h b/include/Lglobals.h -index 60002e4..ca2606c 100644 ---- a/include/Lglobals.h -+++ b/include/Lglobals.h -@@ -24,9 +24,9 @@ - #ifndef Lglobals_H - #define Lglobals_H - -+#include - using namespace std; - --#include - #ifdef USE_MPFR - #include "Lgmpfrxx.h" - typedef mpfr_class Double; -- cgit v1.2.3 From 2b34eccbf3bb4fd9b7490954f8d9a6f2e1132b4c Mon Sep 17 00:00:00 2001 From: vicvbcun Date: Mon, 8 Aug 2022 17:45:43 +0200 Subject: gnu: lrcalc: Update to 2.1. * gnu/packages/algebra.scm (lrcalc): Update to 2.1. [source]: Remove patch. * gnu/packages/patches/lrcalc-includes.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Unregister file. Signed-off-by: Andreas Enge --- gnu/local.mk | 1 - gnu/packages/algebra.scm | 12 +--- gnu/packages/patches/lrcalc-includes.patch | 92 ------------------------------ 3 files changed, 2 insertions(+), 103 deletions(-) delete mode 100644 gnu/packages/patches/lrcalc-includes.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bbc06326b8..2d32d85d47 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1469,7 +1469,6 @@ dist_patch_DATA = \ %D%/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch \ %D%/packages/patches/llvm-roc-5.0.0-linkdl.patch \ %D%/packages/patches/lm-sensors-hwmon-attrs.patch \ - %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lsh-fix-x11-forwarding.patch \ %D%/packages/patches/lsof-fatal-test-failures.patch \ %D%/packages/patches/lua-CVE-2014-5461.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index b3f0823daf..8ccb44c434 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1628,7 +1628,7 @@ John Cremona to compute his elliptic curve database.") (define-public lrcalc (package (name "lrcalc") - (version "1.2") + (version "2.1") (source (origin (method git-fetch) (uri (git-reference @@ -1637,18 +1637,10 @@ John Cremona to compute his elliptic curve database.") (file-name (git-file-name name version)) (sha256 (base32 - "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss")) - (patches (search-patches "lrcalc-includes.patch")))) + "0s3amf3z75hnrjyszdndrvk4wp5p630dcgyj341i6l57h43d1p4k")))) (build-system gnu-build-system) (native-inputs (list autoconf automake libtool)) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'fix-permission - (lambda _ - (chmod "lrcalc.maple.src" #o644) - #t))))) (synopsis "Littlewood-Richardson calculator in algebraic combinatorics") (description "The Littlewood-Richardson Calculator (lrcalc) is a program designed to compute Littlewood-Richardson coefficients. It computes diff --git a/gnu/packages/patches/lrcalc-includes.patch b/gnu/packages/patches/lrcalc-includes.patch deleted file mode 100644 index e15286905b..0000000000 --- a/gnu/packages/patches/lrcalc-includes.patch +++ /dev/null @@ -1,92 +0,0 @@ -Patch taken from the Sage packaging system. - -From 4a5e1c8c3c11efdb1cbb4239825a6bf4bf1c52f8 Mon Sep 17 00:00:00 2001 -From: Anders Skovsted Buch -Date: Sun, 29 Nov 2015 16:25:56 -0500 -Subject: [PATCH] Patch by Jeroen Demeyer to change include to - "vector.h", plus similar cases. - ---- - src/lrcalc.c | 2 +- - src/maple.c | 4 ++-- - src/schublib.h | 2 +- - src/symfcn.c | 6 +++--- - src/symfcn.h | 4 ++-- - 5 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/lrcalc.c b/src/lrcalc.c -index aff3f75..60df49e 100644 ---- a/src/lrcalc.c -+++ b/src/lrcalc.c -@@ -8,7 +8,7 @@ - #include - extern char *optarg; - --#include -+#include "vectarg.h" - - #include "symfcn.h" - #include "maple.h" -diff --git a/src/maple.c b/src/maple.c -index fdc0768..a5f4d14 100644 ---- a/src/maple.c -+++ b/src/maple.c -@@ -4,8 +4,8 @@ - */ - - #include --#include --#include -+#include "vector.h" -+#include "hashtab.h" - #include "maple.h" - - -diff --git a/src/schublib.h b/src/schublib.h -index a8e8511..864850c 100644 ---- a/src/schublib.h -+++ b/src/schublib.h -@@ -1,7 +1,7 @@ - #ifndef _SCHUBLIB_H - #define _SCHUBLIB_H - --#include -+#include "hashtab.h" - - hashtab *trans(vector *w, int vars, hashtab *res); - hashtab *monk(int i, hashtab *slc, int rank); -diff --git a/src/symfcn.c b/src/symfcn.c -index 4ffbe4b..fd5df5d 100644 ---- a/src/symfcn.c -+++ b/src/symfcn.c -@@ -5,9 +5,9 @@ - - #include - --#include --#include --#include -+#include "alloc.h" -+#include "vector.h" -+#include "hashtab.h" - - #include "symfcn.h" - -diff --git a/src/symfcn.h b/src/symfcn.h -index b8543b1..29bb00d 100644 ---- a/src/symfcn.h -+++ b/src/symfcn.h -@@ -1,8 +1,8 @@ - #ifndef _SYMFCN_H - #define _SYMFCN_H - --#include --#include -+#include "hashtab.h" -+#include "vector.h" - - int part_itr_sz(vector *part); - int part_itr_sub(vector *part, vector *outer); --- -2.1.1.1.g1fb337f - -- cgit v1.2.3 From de29a260082bb35881a6eec2260bb4c8a2d538b3 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sat, 23 Jul 2022 21:08:23 +0200 Subject: guile-fibers: Backport the ‘epoll instance is dead’ bugfix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes some indeterministic test failures for gnunet-scheme observed while developing gnunet-scheme. The following checks were made: All dependents compile for x86_64: $ ./pre-inst-env guix build shepherd gnunet-scheme guix-build-coordinator nar-herder guix-data-service guile-fibers --system=x86_64-linux Everything except guix-build-coordinator (which depends on the non-cross-compilable sqitch) cross-compile from x86_64 to aarch64-linux-gnu: $ ./pre-inst-env guix build shepherd gnunet-scheme nar-herder guile-fibers --system=x86_64-linux --target=aarch64-linux-gnu I tried testing for reproducibility but the check phase took to long. However, you can compare the hash you get against the hash I got: $ ./pre-inst-env guix hash --serializer=nar $(./pre-inst-env guix build guile-fibers --no-grafts --system=x86_64-linux) 0qsaqx27b6q2s22h7y93417ijpkwl6gc1fhhck8aha6bvmawk5h0 I tried an emulated build for another architecture, but there the tests took overly long. There were no lint warnings for guile-fibers. * gnu/packages/patches/guile-fibers-epoll-instance-is-dead.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register the patch. * gnu/packages/guile-xyz.scm (guile-fibers)[source]{patches}: Use the patch. Signed-off-by: Mathieu Othacehe --- gnu/local.mk | 1 + gnu/packages/guile-xyz.scm | 3 +- .../guile-fibers-epoll-instance-is-dead.patch | 99 ++++++++++++++++++++++ 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/guile-fibers-epoll-instance-is-dead.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2d32d85d47..882b13420b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1254,6 +1254,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-ac-d-bus-fix-tests.patch \ %D%/packages/patches/guile-cross-compilation.patch \ %D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \ + %D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \ %D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \ diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index fc6fa37f73..72b4b87d44 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -621,7 +621,8 @@ Unix-style DSV format and RFC 4180 format.") (base32 "0ll63d7202clapg1k4bilbnlmfa4qvpjnsd7chbkka4kxf5klilc")) (patches - (search-patches "guile-fibers-wait-for-io-readiness.patch")))) + (search-patches "guile-fibers-wait-for-io-readiness.patch" + "guile-fibers-epoll-instance-is-dead.patch")))) (build-system gnu-build-system) (native-inputs (list texinfo pkg-config autoconf automake libtool diff --git a/gnu/packages/patches/guile-fibers-epoll-instance-is-dead.patch b/gnu/packages/patches/guile-fibers-epoll-instance-is-dead.patch new file mode 100644 index 0000000000..ba191f765d --- /dev/null +++ b/gnu/packages/patches/guile-fibers-epoll-instance-is-dead.patch @@ -0,0 +1,99 @@ +From 5db4077e9f5166033637d2af9532ec6144b85646 Mon Sep 17 00:00:00 2001 +From: Maxime Devos +Date: Thu, 30 Jun 2022 14:21:47 +0000 +Subject: [PATCH 1/2] Fix behaviour of 'epoll-wake!' after 'run-fibers'. + +This avoids the "epoll instance is dead" error noticed in +GNUnet-Scheme's test suite, as reported at +. +A test is added in the next commit. + +This patch has been applied upstream, but there hasn't been +a new release yet at time of writing. + +* fibers/epoll.scm (epoll-wake!)[dead]: Instead of throwing an error, +just return #t. +--- + fibers/epoll.scm | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/fibers/epoll.scm b/fibers/epoll.scm +index d26db4d..eb63242 100644 +--- a/fibers/epoll.scm ++++ b/fibers/epoll.scm +@@ -1,6 +1,7 @@ + ;; epoll + + ;;;; Copyright (C) 2016 Andy Wingo ++;;;; Copyright (C) 2022 Maxime Devos + ;;;; + ;;;; This library is free software; you can redistribute it and/or + ;;;; modify it under the terms of the GNU Lesser General Public +@@ -135,7 +136,12 @@ epoll wait (if appropriate)." + ('waiting + (primitive-epoll-wake (fileno (epoll-wake-write-pipe epoll)))) + ('not-waiting #t) +- ('dead (error "epoll instance is dead")))) ++ ;; This can happen if a fiber was waiting on a condition and ++ ;; run-fibers completes before the fiber completes and afterwards ++ ;; the condition is signalled. In that case, we don't have to ++ ;; resurrect the fiber or something, we can just do nothing. ++ ;; (Bug report: https://github.com/wingo/fibers/issues/61) ++ ('dead #t))) + + (define (epoll-default-folder fd events seed) + (acons fd events seed)) + +From c01d3853eb56ea4adacc31f51f6e917f8c0abe1c Mon Sep 17 00:00:00 2001 +From: Maxime Devos +Date: Thu, 30 Jun 2022 14:18:36 +0000 +Subject: [PATCH 2/2] Test for issue #61. + +* tests/conditions.scm: Add a test. +--- + tests/conditions.scm | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/tests/conditions.scm b/tests/conditions.scm +index 505c42a..179605a 100644 +--- a/tests/conditions.scm ++++ b/tests/conditions.scm +@@ -1,6 +1,7 @@ + ;; Fibers: cooperative, event-driven user-space threads. + + ;;;; Copyright (C) 2016 Free Software Foundation, Inc. ++;;;; Copyright (C) 2022 Maxime Devos + ;;;; + ;;;; This library is free software; you can redistribute it and/or + ;;;; modify it under the terms of the GNU Lesser General Public +@@ -21,6 +22,7 @@ + #:use-module (fibers) + #:use-module (fibers conditions) + #:use-module (fibers operations) ++ #:use-module (fibers scheduler) + #:use-module (fibers timers)) + + (define failed? #f) +@@ -78,4 +80,22 @@ + (wait cv) + #t)) + ++;; Make a condition, wait for it inside a fiber, let the fiber abruptly ++;; terminate and signal the condition afterwards. This tests for the bug ++;; noticed at . ++(assert-equal #t ++ (let ((cv (make-condition))) ++ (run-fibers ++ (lambda () ++ (spawn-fiber (lambda () (wait cv))) ++ (yield-current-task)) ; let the other fiber wait forever ++ ;; This test relies on not draining -- this is the default, ++ ;; but let's make this explicit. ++ #:drain? #false ; ++ ;; For simplicity, disable concurrency and preemption. ++ ;; That way, we can use 'yield-current-task' instead of an ++ ;; arbitrary sleep time. ++ #:hz 0 #:parallelism 1) ++ (signal-condition! cv))) ++ + (exit (if failed? 1 0)) -- cgit v1.2.3 From 7e0116740b8d93ccd0d6d760dc89cbdc65598119 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 15 Aug 2022 22:13:53 +0200 Subject: gnu: python-mypy: Update to 0.971. * gnu/packages/patches/python-mypy-12332.patch, gnu/packages/patches/python-mypy-use-sys-path.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-check.scm (python-mypy): Update to 0.971. [source](patches): Remove. [arguments]: Skip one test. --- gnu/local.mk | 2 - gnu/packages/patches/python-mypy-12332.patch | 68 ----------- .../patches/python-mypy-use-sys-path.patch | 130 --------------------- gnu/packages/python-check.scm | 12 +- 4 files changed, 6 insertions(+), 206 deletions(-) delete mode 100644 gnu/packages/patches/python-mypy-12332.patch delete mode 100644 gnu/packages/patches/python-mypy-use-sys-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 882b13420b..4e4ad908ce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1731,8 +1731,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-versioneer-guix-support.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/python-werkzeug-tests.patch \ - %D%/packages/patches/python-mypy-12332.patch \ - %D%/packages/patches/python-mypy-use-sys-path.patch \ %D%/packages/patches/python-zeep-Fix-pytest_httpx-test-cases.patch \ %D%/packages/patches/qemu-build-info-manual.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ diff --git a/gnu/packages/patches/python-mypy-12332.patch b/gnu/packages/patches/python-mypy-12332.patch deleted file mode 100644 index d43cf42ed1..0000000000 --- a/gnu/packages/patches/python-mypy-12332.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 518c864805dd93e62d59439e665a0ce9d6778419 Mon Sep 17 00:00:00 2001 -From: Ekin Dursun -Date: Thu, 10 Mar 2022 22:06:48 +0300 -Subject: [PATCH] mypyc: Fix overflow in id function (CPyTagged_Id) - -In CPython, the id of an object is its address. It's computed by -converting the pointer to an unsigned integer (PyLong_FromVoidPtr). A -similar logic is present here, pointer is converted to a Py_ssize_t and -CPyTagged_FromSsize_t is called with that integer. - -There is a problem with that approach: Py_ssize_t cannot hold every -pointer value. Sometimes overflow happens and CPyTagged_FromSsize_t is -called with a negative integer. - -With the new approach, the number is checked: If it fits in a -Py_ssize_t, CPyTagged_FromSsize_t is called. If not, it is directly -converted to a PyObject using PyLong_FromVoidPtr. ---- - mypyc/lib-rt/CPy.h | 1 + - mypyc/lib-rt/int_ops.c | 9 +++++++++ - mypyc/lib-rt/misc_ops.c | 2 +- - 3 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/mypyc/lib-rt/CPy.h b/mypyc/lib-rt/CPy.h -index 987819154ab..9f5ae52d4e4 100644 ---- a/mypyc/lib-rt/CPy.h -+++ b/mypyc/lib-rt/CPy.h -@@ -121,6 +121,7 @@ static inline size_t CPy_FindAttrOffset(PyTypeObject *trait, CPyVTableItem *vtab - - - CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value); -+CPyTagged CPyTagged_FromVoidPtr(void *ptr); - CPyTagged CPyTagged_FromObject(PyObject *object); - CPyTagged CPyTagged_StealFromObject(PyObject *object); - CPyTagged CPyTagged_BorrowFromObject(PyObject *object); -diff --git a/mypyc/lib-rt/int_ops.c b/mypyc/lib-rt/int_ops.c -index 1275f2c1057..edf06314161 100644 ---- a/mypyc/lib-rt/int_ops.c -+++ b/mypyc/lib-rt/int_ops.c -@@ -26,6 +26,15 @@ CPyTagged CPyTagged_FromSsize_t(Py_ssize_t value) { - } - } - -+CPyTagged CPyTagged_FromVoidPtr(void *ptr) { -+ if ((uintptr_t)ptr > PY_SSIZE_T_MAX) { -+ PyObject *object = PyLong_FromVoidPtr(ptr); -+ return ((CPyTagged)object) | CPY_INT_TAG; -+ } else { -+ return CPyTagged_FromSsize_t((Py_ssize_t)ptr); -+ } -+} -+ - CPyTagged CPyTagged_FromObject(PyObject *object) { - int overflow; - // The overflow check knows about CPyTagged's width -diff --git a/mypyc/lib-rt/misc_ops.c b/mypyc/lib-rt/misc_ops.c -index cebd1cf997f..dcce89d9072 100644 ---- a/mypyc/lib-rt/misc_ops.c -+++ b/mypyc/lib-rt/misc_ops.c -@@ -437,7 +437,7 @@ CPyPickle_GetState(PyObject *obj) - } - - CPyTagged CPyTagged_Id(PyObject *o) { -- return CPyTagged_FromSsize_t((Py_ssize_t)o); -+ return CPyTagged_FromVoidPtr(o); - } - - #define MAX_INT_CHARS 22 diff --git a/gnu/packages/patches/python-mypy-use-sys-path.patch b/gnu/packages/patches/python-mypy-use-sys-path.patch deleted file mode 100644 index 1b12526456..0000000000 --- a/gnu/packages/patches/python-mypy-use-sys-path.patch +++ /dev/null @@ -1,130 +0,0 @@ -This patch fixes the annotation files search of mypy on non-FHS distributions. - -Submitted upstream: https://github.com/python/mypy/pull/12530 - -diff --git a/mypy/main.py b/mypy/main.py -index 3d9836587..f9b0cbd39 100644 ---- a/mypy/main.py -+++ b/mypy/main.py -@@ -1033,10 +1033,10 @@ def process_options(args: List[str], - # Set target. - if special_opts.modules + special_opts.packages: - options.build_type = BuildType.MODULE -- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) -+ site_packages = get_site_packages_dirs(options.python_executable) - search_paths = SearchPaths((os.getcwd(),), - tuple(mypy_path() + options.mypy_path), -- tuple(egg_dirs + site_packages), -+ tuple(site_packages), - ()) - targets = [] - # TODO: use the same cache that the BuildManager will -diff --git a/mypy/modulefinder.py b/mypy/modulefinder.py -index 94d2dd34c..337a2d59b 100644 ---- a/mypy/modulefinder.py -+++ b/mypy/modulefinder.py -@@ -629,7 +629,7 @@ def get_prefixes(python_executable: Optional[str]) -> Tuple[str, str]: - - - @functools.lru_cache(maxsize=None) --def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], List[str]]: -+def get_site_packages_dirs(python_executable: Optional[str]) -> List[str]: - """Find package directories for given python. - - This runs a subprocess call, which generates a list of the egg directories, and the site -@@ -648,51 +648,7 @@ def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], - site_packages = ast.literal_eval( - subprocess.check_output([python_executable, pyinfo.__file__, 'getsitepackages'], - stderr=subprocess.PIPE).decode()) -- return expand_site_packages(site_packages) -- -- --def expand_site_packages(site_packages: List[str]) -> Tuple[List[str], List[str]]: -- """Expands .pth imports in site-packages directories""" -- egg_dirs: List[str] = [] -- for dir in site_packages: -- if not os.path.isdir(dir): -- continue -- pth_filenames = sorted(name for name in os.listdir(dir) if name.endswith(".pth")) -- for pth_filename in pth_filenames: -- egg_dirs.extend(_parse_pth_file(dir, pth_filename)) -- -- return egg_dirs, site_packages -- -- --def _parse_pth_file(dir: str, pth_filename: str) -> Iterator[str]: -- """ -- Mimics a subset of .pth import hook from Lib/site.py -- See https://github.com/python/cpython/blob/3.5/Lib/site.py#L146-L185 -- """ -- -- pth_file = os.path.join(dir, pth_filename) -- try: -- f = open(pth_file, "r") -- except OSError: -- return -- with f: -- for line in f.readlines(): -- if line.startswith("#"): -- # Skip comment lines -- continue -- if line.startswith(("import ", "import\t")): -- # import statements in .pth files are not supported -- continue -- -- yield _make_abspath(line.rstrip(), dir) -- -- --def _make_abspath(path: str, root: str) -> str: -- """Take a path and make it absolute relative to root if not already absolute.""" -- if os.path.isabs(path): -- return os.path.normpath(path) -- else: -- return os.path.join(root, os.path.normpath(path)) -+ return site_packages - - - def add_py2_mypypath_entries(mypypath: List[str]) -> List[str]: -@@ -781,7 +737,7 @@ def compute_search_paths(sources: List[BuildSource], - if options.python_version[0] == 2: - mypypath = add_py2_mypypath_entries(mypypath) - -- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) -+ site_packages = get_site_packages_dirs(options.python_executable) - base_prefix, prefix = get_prefixes(options.python_executable) - is_venv = base_prefix != prefix - for site_dir in site_packages: -@@ -801,7 +757,7 @@ def compute_search_paths(sources: List[BuildSource], - - return SearchPaths(python_path=tuple(reversed(python_path)), - mypy_path=tuple(mypypath), -- package_path=tuple(egg_dirs + site_packages), -+ package_path=tuple(site_packages), - typeshed_path=tuple(lib_path)) - - -diff --git a/mypy/pyinfo.py b/mypy/pyinfo.py -index ab2d3286b..9fb0501a1 100644 ---- a/mypy/pyinfo.py -+++ b/mypy/pyinfo.py -@@ -24,16 +24,11 @@ def getprefixes(): - - def getsitepackages(): - # type: () -> List[str] -- res = [] -- if hasattr(site, 'getsitepackages'): -- res.extend(site.getsitepackages()) - -- if hasattr(site, 'getusersitepackages') and site.ENABLE_USER_SITE: -- res.insert(0, site.getusersitepackages()) -- else: -- from distutils.sysconfig import get_python_lib -- res = [get_python_lib()] -- return res -+ # Simply return sys.path, which has already been expanded -+ # correctly via Python's site.py module, which takes care of .pth, -+ # sitecustomize.py files, etc. -+ return sys.path - - - if __name__ == '__main__': diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index e196f2eccb..7cc266fbce 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1771,7 +1771,7 @@ supported by the MyPy typechecker.") (define-public python-mypy (package (name "python-mypy") - (version "0.942") + (version "0.971") (source (origin ;; Because of https://github.com/python/mypy/issues/9584, the @@ -1788,10 +1788,7 @@ supported by the MyPy typechecker.") (file-name (git-file-name name version)) (sha256 (base32 - "0hxnrqhvskiclwfj2s4gyfclzjas1dvpfxhyng8v7mq38rqps1j5")) - (patches - (search-patches "python-mypy-12332.patch" - "python-mypy-use-sys-path.patch")))) + "0i8swdynms1wpiprgqn24za6mx8rlgxr2jash3cb5xi8jyf58n97")))) (build-system python-build-system) (arguments `(#:phases @@ -1799,7 +1796,10 @@ supported by the MyPy typechecker.") (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "pytest" "mypyc"))))))) + (invoke "pytest" "-vv" "mypyc" + ;; XXX: This test gets an unexpected DeprecationWarning + ;; from recent versions of setuptools. Ignore for now. + "-k" "not testImports"))))))) (native-inputs (list python-attrs python-lxml -- cgit v1.2.3 From f31e55d0819064557b9a2af687f05b131f5c4f26 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Fri, 19 Aug 2022 21:06:50 -0700 Subject: gnu: perl-class-methodmaker: Build reproducibly. * gnu/packages/patches/perl-class-methodmaker-reproducible.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. * gnu/packages/perl.scm (perl-class-methodmaker)[source]: Use patch. --- gnu/local.mk | 1 + .../perl-class-methodmaker-reproducible.patch | 21 +++++++++++++++++++++ gnu/packages/perl.scm | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/perl-class-methodmaker-reproducible.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4e4ad908ce..26dfb6afe2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1624,6 +1624,7 @@ dist_patch_DATA = \ %D%/packages/patches/perl-5.14-module-pluggable-search.patch \ %D%/packages/patches/perl-5.14-no-sys-dirs.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ + %D%/packages/patches/perl-class-methodmaker-reproducible.patch \ %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ %D%/packages/patches/perl-image-exiftool-CVE-2021-22204.patch \ %D%/packages/patches/perl-net-amazon-s3-moose-warning.patch \ diff --git a/gnu/packages/patches/perl-class-methodmaker-reproducible.patch b/gnu/packages/patches/perl-class-methodmaker-reproducible.patch new file mode 100644 index 0000000000..29a71babd1 --- /dev/null +++ b/gnu/packages/patches/perl-class-methodmaker-reproducible.patch @@ -0,0 +1,21 @@ +Description: make build reproducible by sorting hash keys + cf. https://reproducible.debian.net/dbd/unstable/amd64/libclass-methodmaker-perl_2.21-1.debbindiff.html +Origin: vendor +Bug-Debian: https://bugs.debian.org/778979 +Author: Chris Lamb +Reviewed-by: gregor herrmann +Last-Update: 2015-05-02 +Forwarded: https://rt.cpan.org/Ticket/Display.html?id=104163 +Bug: https://rt.cpan.org/Ticket/Display.html?id=104163 + +--- a/lib/Class/MethodMaker/OptExt.pm ++++ b/lib/Class/MethodMaker/OptExt.pm +@@ -357,7 +357,7 @@ + + # ------------------------------------- + +-sub option_names { grep $_ ne 'DEFAULT', keys %{OPTEXT()} } ++sub option_names { grep $_ ne 'DEFAULT', sort keys %{OPTEXT()} } + + sub optcode { + my $class = shift; diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index f9a95e818d..42c7d18c9d 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -1601,7 +1601,9 @@ Class::Load.") version ".tar.gz")) (sha256 (base32 - "0a03i4k3a33qqwhykhz5k437ld5mag2vq52vvsy03gbynb65ivsy")))) + "0a03i4k3a33qqwhykhz5k437ld5mag2vq52vvsy03gbynb65ivsy")) + (patches (search-patches + "perl-class-methodmaker-reproducible.patch")))) (build-system perl-build-system) (home-page "https://metacpan.org/release/Class-MethodMaker") (synopsis "Create generic methods for OO Perl") -- cgit v1.2.3 From 1e16af13b02dfe4b56267af2258694f1baf09e6c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 24 Aug 2022 16:03:32 +0200 Subject: gnu: crawl: Update to 0.29.0. * gnu/packages/games.scm (crawl): Update to 0.29.0. [source]: Use GIT-FETCH method. [arguments]<#:make-flags>: Match new directory layout. <#:phases>: Add a phase to set version without calling GIT. * gnu/packages/patches/crawl-upgrade-saves.patch: Match new directory layout. --- gnu/packages/games.scm | 21 ++++++++++++++------- gnu/packages/patches/crawl-upgrade-saves.patch | 4 ++-- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index a3278b8918..71abc57dd2 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -6515,14 +6515,16 @@ fish. The whole game is accompanied by quiet, comforting music.") (define-public crawl (package (name "crawl") - (version "0.28.0") + (version "0.29.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/crawl/crawl/releases/download/" - version "/stone_soup-" version "-nodeps.tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/crawl/crawl") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "0irg5w4m127fxcj037kyp9vnyqyq1fi4q64rn6yq92w8z1lf2sss")) + (base32 "0cx67ln5qr4bawidi48ss63wflx7x22901da683c9wvy6m41vks8")) (patches (search-patches "crawl-upgrade-saves.patch")))) (build-system gnu-build-system) (inputs @@ -6552,12 +6554,17 @@ fish. The whole game is accompanied by quiet, comforting music.") "BUILD_LUA=" "BUILD_SQLITE=" "BUILD_ZLIB=" - "-Csource") + "-Ccrawl-ref/source") #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-version + (lambda _ + (call-with-output-file "crawl-ref/source/util/release_ver" + (lambda (port) + (display #$version port))))) (add-after 'unpack 'find-SDL-image (lambda _ - (substitute* "source/windowmanager-sdl.cc" + (substitute* "crawl-ref/source/windowmanager-sdl.cc" (("SDL_image.h") "SDL2/SDL_image.h")))) (delete 'configure) (replace 'check diff --git a/gnu/packages/patches/crawl-upgrade-saves.patch b/gnu/packages/patches/crawl-upgrade-saves.patch index 720a94f3e5..831f3c60be 100644 --- a/gnu/packages/patches/crawl-upgrade-saves.patch +++ b/gnu/packages/patches/crawl-upgrade-saves.patch @@ -6,8 +6,8 @@ upgrade is required, but guix nulls all file dates, and crawl would never upgrade saves. diff -ur a/source/database.cc b/source/database.cc ---- a/source/database.cc 2018-08-09 21:49:26.000000000 -0400 -+++ b/source/database.cc 2018-10-07 18:06:41.022445789 -0400 +--- a/crawl-ref/source/database.cc 2018-08-09 21:49:26.000000000 -0400 ++++ b/crawl-ref/source/database.cc 2018-10-07 18:06:41.022445789 -0400 @@ -24,6 +24,7 @@ #include "stringutil.h" #include "syscalls.h" -- cgit v1.2.3