Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New packages: python3-cysignals-1.11.2, python3-cypari2-2.1.2, python3-pplpy-0.8.7, python3-fpylll-0.5.6
Date: Tue, 18 Jan 2022 19:43:56 +0100	[thread overview]
Message-ID: <20220118184356.7r-3g-J5jAXtfNkA4IIF856wDLYuV06uhSkJrpp5Rmw@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-35088@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages cysignals
https://github.com/void-linux/void-packages/pull/35088

New packages: python3-cysignals-1.11.2, python3-cypari2-2.1.2, python3-pplpy-0.8.7, python3-fpylll-0.5.6
Dependencies of sagemath.

One PR since they all use cysignals; this also makes everything nocross. All testsuites work and pass.

I tested these with sagemath and everything seems to work ok.

Cc: @dkwo @leahneukirchen 

A patch file from https://github.com/void-linux/void-packages/pull/35088.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cysignals-35088.patch --]
[-- Type: text/x-diff, Size: 9156 bytes --]

From 95c9d7a827f8cf8769dceb780f69929dabb3f6bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 17:32:39 -0300
Subject: [PATCH 1/5] New package: python3-cysignals-1.11.2

---
 .../python3-cysignals/patches/fix-write.patch | 46 +++++++++++++++++++
 srcpkgs/python3-cysignals/template            | 19 ++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/python3-cysignals/patches/fix-write.patch
 create mode 100644 srcpkgs/python3-cysignals/template

diff --git a/srcpkgs/python3-cysignals/patches/fix-write.patch b/srcpkgs/python3-cysignals/patches/fix-write.patch
new file mode 100644
index 000000000000..18206bd808d7
--- /dev/null
+++ b/srcpkgs/python3-cysignals/patches/fix-write.patch
@@ -0,0 +1,46 @@
+Fix a doctest failure which triggers in i686.
+
+The example is in the function `test_bad_str()` in the file `tests.pyx`.
+The test pases a bad string to `sig_str()` and then raises `SIGILL`. The
+signal handler eventually raises a Python exception which in turn raises
+a `SIGSEGV` when accessing the bad string. An error message is expected,
+but that doesn't happen.
+
+Presumably the segfault happens inside some stdio function which leaves
+stdio buffers in an inconsistent state so the latter `fprintf` doesn't
+work properly. From signal-safety(7):
+
+    Suppose that the main program is in the middle of a call to a
+    stdio function such as printf(3) where the buffer and associated
+    variables have been partially updated.  If, at that moment, the
+    program is interrupted by a signal handler that also calls
+    printf(3), then the second call to printf(3) will operate on
+    inconsistent data, with unpredictable results.
+
+We fix this by replacing the `fprintf` by calls to `write`, which is
+async-signal-safe according to POSIX.
+
+--- a/src/cysignals/implementation.c      2022-01-16 22:36:45.143796872 +0000
++++ b/src/cysignals/implementation.c      2022-01-17 02:22:31.196695043 +0000
+@@ -638,12 +622,15 @@
+ #endif
+ 
+     if (s) {
++        /* Using fprintf from inside a signal handler is undefined, see signal-safety(7) */
++        const char * message =
++            "\n"
++            "This probably occurred because a *compiled* module has a bug\n"
++            "in it and is not properly wrapped with sig_on(), sig_off().\n"
++            "Python will now terminate.\n"
++            "------------------------------------------------------------------------\n";
++        write(2, s, strlen(s));
++        write(2, message, strlen(message));
+-        fprintf(stderr,
+-            "%s\n"
+-            "This probably occurred because a *compiled* module has a bug\n"
+-            "in it and is not properly wrapped with sig_on(), sig_off().\n"
+-            "Python will now terminate.\n", s);
+-        print_sep();
+     }
+ 
+ dienow:
diff --git a/srcpkgs/python3-cysignals/template b/srcpkgs/python3-cysignals/template
new file mode 100644
index 000000000000..4655eead2a9c
--- /dev/null
+++ b/srcpkgs/python3-cysignals/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cysignals'
+pkgname=python3-cysignals
+version=1.11.2
+revision=1
+wrksrc="cysignals-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython autoconf"
+makedepends="python3-devel pari-devel"
+short_desc="Interrupt and signal handling for Cython "
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-3.0-or-later"
+homepage="https://github.com/sagemath/cysignals"
+distfiles="${PYPI_SITE}/c/cysignals/cysignals-${version}.tar.gz"
+checksum=5858b1760fbe21848121b826b2463a67ac5a45caf3d73105497a68618c5a6fa6
+nocross=yes # runs binaries built for target
+
+do_check() {
+	make check
+}

From 7efc4ca40e4a9c3dde9ab624eb2d5dd151912547 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:28:55 -0300
Subject: [PATCH 2/5] New package: python3-cypari2-2.1.2

---
 srcpkgs/python3-cypari2/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-cypari2/template

diff --git a/srcpkgs/python3-cypari2/template b/srcpkgs/python3-cypari2/template
new file mode 100644
index 000000000000..18755ec020b4
--- /dev/null
+++ b/srcpkgs/python3-cypari2/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-cypari2'
+pkgname=python3-cypari2
+version=2.1.2
+revision=1
+wrksrc=cypari2-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython pari perl"
+makedepends="python3-devel python3-cysignals pari-devel gmp-devel"
+short_desc="Python interface to the number theory library PARI/GP"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/sagemath/cypari2"
+distfiles="${PYPI_SITE}/c/cypari2/cypari2-${version}.tar.gz"
+checksum=03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a
+
+do_check() {
+	PYTHONPATH="$(cd build/lib* && pwd)" \
+		make check
+}

From d172609b886700a81101dea9568c0e6736976010 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 15 Jan 2022 18:56:29 -0300
Subject: [PATCH 3/5] New package: python3-pplpy-0.8.7

---
 srcpkgs/python3-pplpy/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pplpy/template

diff --git a/srcpkgs/python3-pplpy/template b/srcpkgs/python3-pplpy/template
new file mode 100644
index 000000000000..1cb69ffe6a07
--- /dev/null
+++ b/srcpkgs/python3-pplpy/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pplpy'
+pkgname=python3-pplpy
+version=0.8.7
+revision=1
+wrksrc="pplpy-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-gmpy2 python3-devel gmp-devel
+ gmpxx-devel ppl-devel mpfr-devel libmpc-devel pari-devel"
+short_desc="Python wrapper to the C++ Parma Polyhedra Library (PPL)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.com/videlec/pplpy"
+changelog="https://gitlab.com/videlec/pplpy/-/raw/master/CHANGES.txt"
+distfiles="${PYPI_SITE}/p/pplpy/pplpy-${version}.tar.gz"
+checksum=500bd0f4ae1a76956fae7fcba77854f5ec3e64fce76803664983763c3f2bd8bd
+
+do_check() {
+	PYTHONPATH=$(cd build/lib* && pwd) \
+		python setup.py test
+}

From 633dbd689933ba68740de566a5fe7e8d828ef4d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 01:14:24 -0300
Subject: [PATCH 4/5] New package: python3-fpylll-0.5.6

---
 srcpkgs/python3-fpylll/template | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 srcpkgs/python3-fpylll/template

diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
new file mode 100644
index 000000000000..dd2adcee6fce
--- /dev/null
+++ b/srcpkgs/python3-fpylll/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-fpylll'
+pkgname=python3-fpylll
+version=0.5.6
+revision=1
+wrksrc="fpylll-${version}"
+build_style=python3-module
+hostmakedepends="python3-Cython"
+makedepends="python3-cysignals python3-devel gmp-devel mpfr-devel fplll-devel
+ pari-devel"
+checkdepends="python3-pytest python3-numpy"
+short_desc="Python wrapper to fplll (floating point lattice algorithms)"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/fplll/fpylll"
+distfiles="${PYPI_SITE}/f/fpylll/fpylll-${version}.tar.gz"
+checksum=6eb8a63fb933c0bf92f290dd66fd884807659214d0ce524afe3687a6a6b13a8b
+
+case $XBPS_TARGET_MACHINE in
+	# skip a test with numerical noise on 32 bit
+	i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
+esac
+
+pre_check() {
+	export PY_IGNORE_IMPORTMISMATCH=1
+}

From a139270a7065aba1d54262ac04d9d3dd2a57b860 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 17 Jan 2022 17:44:04 -0300
Subject: [PATCH 5/5] New package: python3-primecountpy-0.1.0

---
 srcpkgs/python3-primecountpy/template | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 srcpkgs/python3-primecountpy/template

diff --git a/srcpkgs/python3-primecountpy/template b/srcpkgs/python3-primecountpy/template
new file mode 100644
index 000000000000..fecc774b3983
--- /dev/null
+++ b/srcpkgs/python3-primecountpy/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-primecountpy'
+pkgname=python3-primecountpy
+version=0.1.0
+revision=1
+wrksrc=primecountpy-${version}
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-Cython"
+makedepends="python3-cysignals python3-devel primecount-devel pari-devel"
+short_desc="Python interface to the C++ library primecount"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dimpase/primecountpy"
+distfiles="${PYPI_SITE}/p/primecountpy/primecountpy-${version}.tar.gz"
+checksum=78fe7cc32115f0669a45d7c90faaf39f7ce3939e39e2e7e5f14c17fe4bff0676
+
+make_check=no # no way to check before installing

  reply	other threads:[~2022-01-18 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  5:05 [PR PATCH] " tornaria
2022-01-18 18:43 ` tornaria [this message]
2022-01-18 19:01 ` New packages: python3-cysignals-1.11.2, python3-cypari2-2.1.2, python3-pplpy-0.8.7, python3-fpylll-0.5.6, python3-primecountpy-0.1.0 tornaria
2022-01-19 14:58 ` [PR PATCH] [Merged]: " leahneukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118184356.7r-3g-J5jAXtfNkA4IIF856wDLYuV06uhSkJrpp5Rmw@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).