Subject: bug#60266: closed (Re: [bug#60266] [PATCH] gnu: Add form.)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 22 Mar 2023 04:55:02 +0000

Your bug report

#60266: [PATCH] gnu: Add form.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60266: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60266
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#60266] [PATCH] gnu: Add form.
From: Eric Bavier <[email-masked]>
To: Antero Mejr <[email-masked]>, Liliana Marie Prikler <[email-masked]>
Cc: [email-masked]
Date: Wed, 22 Mar 2023 04:54:00 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Antero,

Thank you for your effort in this review.

On Tue, 2023-03-21 at 18:53 +0000, Antero Mejr wrote:
> > > > Guix usually assumes `SSE2` capabilities for x86_64 targets, iirc. 
> > It does, but not for i386 to i686, which also often see sse2 flags in 
> > build systems.
> 
> I did some benchmarks on a few workloads with millions of terms. The
> "tunable" optimizations didn't consistently improve the
> performance. Sometimes it would be a couple percent faster, sometimes
> slower. So I didn't mark the package as tunable.

I was watching my system load while `parform` was running its tests, and things did not
seem compute bound, so the package being not tunable seems fine to me.

> > > I used the other homepage so people can skip the weird "license
> > > agreement" page at https://www.nikhef.nl/~form/.
> > Calling the GPL a license agreement is weird, and it doesn't help that 
> > https://www.nikhef.nl/~form/maindir/ also refers to it.  Perhaps we can
> > raise an issue about that upstream?
> 
> I would prefer not to bother upstream further regarding the website,
> since I already had to ask them to change an invalid license statement
> in a file header (which they did).

Version 1 of the GPL used the term "license agreement" when describing itself, so the
phrasing is not *super* weird, just maybe a bit outdated.  There are also plenty of free
software projects, e.g. nodejs, that present users with an "accept this license agreement"
prompt in their M$ installers.

I've pushed these patches in 

  15ee08ebf23ea6bc5be9fa157889419aa079076a and
  31bed61b8278d3736cc29055d60db068a1160071

with a small adjustment to appease `guix lint`:

--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1873,6 +1873,9 @@ (define-public form
 answers are returned in a textual mathematical representation.  The size of
 the considered expressions in FORM is only limited by the available disk space
 and not by the available RAM.")
+      ;; XXX: Ignore this CVE to work around a name clash with the unrelated
+      ;; "neos/forms" package.
+      (properties '((lint-hidden-cve . ("CVE-2021-32697"))))
       ;; x86_64 only due to test failures on other platforms.
       ;; Developers say other platforms are not "tier 1" supported:
       ;; https://github.com/vermaseren/form/issues/426

Thanks again,
`~Eric

Subject: [PATCH] gnu: Add form.
From: Antero Mejr <[email-masked]>
To: [email-masked]
Cc: Antero Mejr <[email-masked]>
Date: Fri, 23 Dec 2022 01:15:51 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/maths.scm (form): New variable.
---
x86_64 only due to test failures on other platforms. Developers
say other platforms are not "tier 1" supported:
https://github.com/vermaseren/form/issues/426

 gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 050450e12c..08ddd2ecb4 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -8161,3 +8161,58 @@ (define-public optizelle
 provided for applications written in C++ and Python.  Parallel
 computation is supported via MPI.")
     (license license:bsd-2))))
+
+(define-public form
+  (let ((commit "28e15eaf0856a0a012795298d6a4b570e764a8b1")
+        (revision "0"))
+    (package
+      (name "form")
+      (version (git-version "4.3.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/vermaseren/form")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "04i932lqwng2hmknvai1gmmb5j17rwrhlj11nr96w9bmj4sq736x"))
+                (modules '((guix build utils)))
+                (snippet #~(substitute* "check/examples.frm"
+                             (("#pend_if valgrind\\?")
+                              "#pend_if 0")))))
+      (build-system gnu-build-system)
+      (native-inputs (list autoconf automake doxygen ruby))
+      (inputs (list bash openmpi))
+      (arguments
+       (list #:configure-flags #~(list "--enable-parform")
+             #:phases #~(modify-phases %standard-phases
+                          (add-after 'unpack 'fix-hardcoded-path
+                            (lambda _
+                              (substitute* "sources/extcmd.c"
+                                (("/bin/sh")
+                                 (string-append #$(this-package-input "bash")
+                                                "/bin/sh")))))
+                          (add-after 'build 'build-doxygen
+                            (lambda _
+                              (with-directory-excursion "doc/doxygen"
+                                (invoke "make" "html"))))
+                          (add-before 'check 'mpi-setup
+                            #$%openmpi-setup)
+                          (add-after 'install 'install-docs
+                            (lambda _
+                              (let ((doc (string-append #$output "/share/doc/"
+                                                        #$name "-" #$version
+                                                        "/html")))
+                                (mkdir-p doc)
+                                (copy-recursively "doc/doxygen/html" doc)))))))
+      (home-page "https://www.nikhef.nl/~form/maindir/maindir.html")
+      (synopsis "Symbolic manipulation system for very big expressions")
+      (description
+       "FORM is a symbolic manipulation system.  It reads symbolic expressions
+from files and executes symbolic/algebraic transformations upon them.  The
+answers are returned in a textual mathematical representation.  The size of the
+considered expressions in FORM is only limited by the available disk space and
+not by the available RAM.")
+      (supported-systems '("x86_64-linux"))
+      (license license:gpl3+))))
-- 
2.38.1