From 912be8ec342a04bd4f50c353f2776408fbcfea74 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 31 May 2020 18:55:51 +0200 Subject: gnu: biber: Update to 2.12. Fixes . Reported by Mikhail Tsykalov . This essentially reverts 40fd909e3ddee2c46a27a4fe92ed49d3e7ffb413. This is a followup to the TeX Live 2019 update in 85892948bd9fb5fcc3409a60204cc8b14a4eb030. * gnu/packages/tex.scm (biber): Update to 2.12. --- gnu/packages/patches/biber-sortinithash.patch | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/biber-sortinithash.patch b/gnu/packages/patches/biber-sortinithash.patch index 1f054d25e4..5a626705e6 100644 --- a/gnu/packages/patches/biber-sortinithash.patch +++ b/gnu/packages/patches/biber-sortinithash.patch @@ -17,6 +17,15 @@ index b4f641e..c6f86c7 100644 \field{extraname}{1} \field{sortinit}{L} - \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} ++ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c} + \field{labelnamesource}{author} + \field{labeltitlesource}{title} + \field{title}{The Title} +@@ -116,7 +116,7 @@ my $ann2 = q| \entry{ann2}{misc}{} + \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c} + \field{extraname}{2} + \field{sortinit}{L} +- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f} + \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c} \field{labelnamesource}{author} \field{labeltitlesource}{title} -- cgit v1.2.3 From 625cdb05d71fd60eecad5f4673fa94af3472061b Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 22 May 2020 16:02:26 +0200 Subject: gnu: Add pypy3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python.scm (pypy3): New public variable. * gnu/packages/patches/pypy3-7.3.1-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/pypy3-7.3.1-fix-tests.patch | 278 +++++++++++++++++++++++ gnu/packages/python.scm | 171 ++++++++++++++ 3 files changed, 450 insertions(+) create mode 100644 gnu/packages/patches/pypy3-7.3.1-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 768943a67a..fd787299d2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1439,6 +1439,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ + %D%/packages/patches/pypy3-7.3.1-fix-tests.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ diff --git a/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch new file mode 100644 index 0000000000..464aad967f --- /dev/null +++ b/gnu/packages/patches/pypy3-7.3.1-fix-tests.patch @@ -0,0 +1,278 @@ +Fix a few testcases. Adapted from python-3-fix-tests.patch. + +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_callbacks.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_callbacks.py 2020-05-21 14:19:14.827288853 +0200 +@@ -4,6 +4,7 @@ + from ctypes import * + from ctypes.test import need_symbol + import _ctypes_test ++import platform + + class Callbacks(unittest.TestCase): + functype = CFUNCTYPE +@@ -178,6 +179,8 @@ + + self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_issue_8959_a(self): + from ctypes.util import find_library + libc_path = find_library("c") +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/ctypes/test/test_libc.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/ctypes/test/test_libc.py 2020-05-21 14:19:14.827288853 +0200 +@@ -2,6 +2,7 @@ + + from ctypes import * + import _ctypes_test ++import platform + + lib = CDLL(_ctypes_test.__file__) + +@@ -17,6 +18,8 @@ + import math + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_qsort(self): + comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) + lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_archive_util.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_archive_util.py 2020-05-21 14:19:14.827288853 +0200 +@@ -333,6 +333,7 @@ + self.assertEqual(os.path.basename(res), 'archive.tar.xz') + self.assertEqual(self._tarinfo(res), self._created_files) + ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -362,6 +363,7 @@ + + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_tarfile_root_owner(self): + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/distutils/tests/test_sdist.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/distutils/tests/test_sdist.py 2020-05-21 14:19:14.827288853 +0200 +@@ -443,6 +443,7 @@ + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_asyncio/test_base_events.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_asyncio/test_base_events.py 2020-05-21 14:19:14.827288853 +0200 +@@ -1296,6 +1296,8 @@ + self._test_create_connection_ip_addr(m_socket, False) + + @patch_socket ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_create_connection_service_name(self, m_socket): + m_socket.getaddrinfo = socket.getaddrinfo + sock = m_socket.socket.return_value +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_generators.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_generators.py 2020-05-21 14:19:14.827288853 +0200 +@@ -35,6 +35,7 @@ + else: + return "FAILED" + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') + def test_raise_and_yield_from(self): + gen = self.generator1() + gen.send(None) +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/_test_multiprocessing.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/_test_multiprocessing.py 2020-05-21 14:19:14.827288853 +0200 +@@ -1212,6 +1212,7 @@ + if pid is not None: + os.kill(pid, signal.SIGINT) + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_wait_result(self): + if isinstance(self, ProcessesMixin) and sys.platform != 'win32': + pid = os.getpid() +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_normalization.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_normalization.py 2020-05-21 14:19:14.827288853 +0200 +@@ -2,6 +2,7 @@ + import unittest + + from http.client import HTTPException ++from urllib.error import URLError + import sys + from unicodedata import normalize, unidata_version + +@@ -43,6 +44,8 @@ + except PermissionError: + self.skipTest(f"Permission error when downloading {TESTDATAURL} " + f"into the test data directory") ++ except URLError: ++ self.skipTest("DNS lookups are not enabled.") + except (OSError, HTTPException): + self.fail(f"Could not retrieve {TESTDATAURL}") + +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pathlib.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pathlib.py 2020-05-21 14:19:14.827288853 +0200 +@@ -2130,8 +2130,7 @@ + self.assertEqual(given, expect) + self.assertEqual(set(p.rglob("FILEd*")), set()) + +- @unittest.skipUnless(hasattr(pwd, 'getpwall'), +- 'pwd module does not expose getpwall()') ++ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests") + def test_expanduser(self): + P = self.cls + support.import_module('pwd') +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_pdb.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_pdb.py 2020-05-21 14:20:24.377203281 +0200 +@@ -1136,11 +1136,11 @@ + > (6)test_function() + -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) + (Pdb) continue +- pdb 1: ++ pdb 1: Handlers.SIG_IGN + > (6)test_function() + -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) + (Pdb) continue +- pdb 2: ++ pdb 2: Handlers.SIG_IGN + """ + + class PdbTestCase(unittest.TestCase): +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_regrtest.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_regrtest.py 2020-05-21 14:19:14.827288853 +0200 +@@ -766,6 +766,7 @@ + output = self.run_tests('--fromfile', filename) + self.check_executed_tests(output, tests) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_interrupted(self): + code = TEST_INTERRUPTED + test = self.create_test('sigint', code=code) +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_resource.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_resource.py 2020-05-21 14:19:14.827288853 +0200 +@@ -146,6 +146,7 @@ + + @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') + @support.requires_linux_version(2, 6, 36) ++ @unittest.skipIf(True, "Bug: the PermissionError is not raised") + def test_prlimit(self): + self.assertRaises(TypeError, resource.prlimit) + self.assertRaises(ProcessLookupError, resource.prlimit, +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_shutil.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_shutil.py 2020-05-21 14:19:14.827288853 +0200 +@@ -1138,6 +1138,7 @@ + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + + @support.requires_zlib ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -1166,6 +1167,7 @@ + + + @support.requires_zlib ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + root_dir, base_dir = self._create_files() +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_socket.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_socket.py 2020-05-21 14:19:14.827288853 +0200 +@@ -815,6 +815,8 @@ + if not fqhn in all_host_names: + self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names))) + ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_host_resolution(self): + for addr in [support.HOST, '10.0.0.1', '255.255.255.255']: + self.assertEqual(socket.gethostbyname(addr), addr) +@@ -934,6 +936,8 @@ + self.assertRaises(OverflowError, socket.htonl, k) + self.assertRaises(OverflowError, socket.htons, k) + ++ @unittest.skipUnless(os.path.exists("/etc/services"), ++ "getservbyname uses /etc/services, which is not in the chroot") + def testGetServBy(self): + eq = self.assertEqual + # Find one service that exists, then check all the related interfaces. +@@ -1278,6 +1282,8 @@ + raise + self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + def testGetaddrinfo(self): + try: + socket.getaddrinfo('localhost', 80) +@@ -1357,6 +1363,8 @@ + # only IP addresses are allowed + self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + @unittest.skipUnless(support.is_resource_enabled('network'), + 'network is not enabled') + def test_idna(self): +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_spwd.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_spwd.py 2020-05-21 14:19:14.827288853 +0200 +@@ -5,8 +5,7 @@ + spwd = support.import_module('spwd') + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0, +- 'root privileges required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdRoot(unittest.TestCase): + + def test_getspall(self): +@@ -56,8 +55,7 @@ + self.assertRaises(TypeError, spwd.getspnam, bytes_name) + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0, +- 'non-root user required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdNonRoot(unittest.TestCase): + + def test_getspnam_exception(self): +diff -Naur pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py +--- pypy3.6-v7.3.1-src.orig/lib-python/3/test/test_tarfile.py 1970-01-01 01:00:01.000000000 +0100 ++++ pypy3.6-v7.3.1-src/lib-python/3/test/test_tarfile.py 2020-05-21 14:19:14.827288853 +0200 +@@ -2491,9 +2491,12 @@ + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] != 'root': +- return False +- if grp.getgrgid(0)[0] != 'root': ++ try: ++ if pwd.getpwuid(0)[0] != 'root': ++ return False ++ if grp.getgrgid(0)[0] != 'root': ++ return False ++ except KeyError: + return False + return True + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1ec002df73..9469f89bcf 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -80,12 +80,17 @@ (define-module (gnu packages python) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages certs) + #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages dbm) #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) + #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) + #:use-module (gnu packages shells) #:use-module (gnu packages sqlite) #:use-module (gnu packages tcl) #:use-module (gnu packages tls) @@ -631,3 +636,169 @@ (define-public micropython compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.") (license license:expat))) + +(define-public pypy3 + (package + (name "pypy3") + (version "7.3.1") + (source (origin + (method url-fetch) + (uri (string-append "https://bitbucket.org/pypy/pypy/downloads/" ; + "pypy3.6-v" version "-src.tar.bz2")) + (sha256 + (base32 + "10zsk8jby8j6visk5mzikpb1cidvz27qq4pfpa26jv53klic6b0c")) + (patches (search-patches "pypy3-7.3.1-fix-tests.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("python-2" ,python-2) + ("pkg-config" ,pkg-config) + ("tar" ,tar) ; Required for package.py + ("python2-pycparser" ,python2-pycparser) + ("python2-hypothesis" ,python2-hypothesis) + ("nss-certs" ,nss-certs) ; For ssl tests + ("gzip" ,gzip))) + (inputs + `(("libffi" ,libffi) + ("zlib" ,zlib) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("expat" ,expat) + ("bzip2" ,bzip2) + ("sqlite" ,sqlite) + ("gdbm" ,gdbm) + ("tcl" ,tcl) + ("tk" ,tk) + ("glibc" ,glibc) + ("bash-minimal" ,bash-minimal) ; Used as /bin/sh + ("xz" ,xz))) ; liblzma + (arguments + `(#:tests? #f ;FIXME: Disabled for now, there are many tests failing. + #:modules ((ice-9 ftw) (ice-9 match) + (guix build utils) (guix build gnu-build-system)) + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch-source + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* '("rpython/rlib/clibffi.py") + ;; find_library does not work for libc + (("ctypes\\.util\\.find_library\\('c'\\)") "'libc.so'")) + (substitute* '("lib_pypy/cffi/_pycparser/ply/cpp.py") + ;; Make reproducible (XXX: unused?) + (("time\\.localtime\\(\\)") "time.gmtime(0)")) + (substitute* '("pypy/module/sys/version.py") + ;; Make reproducible + (("t\\.gmtime\\(\\)") "t.gmtime(0)")) + (substitute* '("lib_pypy/_tkinter/tklib_build.py") + ;; Link to versioned libtcl and libtk + (("linklibs = \\['tcl', 'tk'\\]") + "linklibs = ['tcl8.6', 'tk8.6']") + (("incdirs = \\[\\]") + (string-append "incdirs = ['" + (assoc-ref inputs "tcl") + "/include', '" + (assoc-ref inputs "tk") + "/include']"))) + (substitute* '("lib_pypy/_curses_build.py") + ;; Find curses + (("/usr/local") (assoc-ref inputs "ncurses"))) + (substitute* '("lib_pypy/_sqlite3_build.py") + ;; Always use search paths + (("sys\\.platform\\.startswith\\('freebsd'\\)") "True") + ;; Find sqlite3 + (("/usr/local") (assoc-ref inputs "sqlite")) + (("libname = 'sqlite3'") + (string-append "libname = '" + (assoc-ref inputs "sqlite") + "/lib/libsqlite3.so.0'"))) + (substitute* '("lib-python/3/subprocess.py") + ;; Fix shell path + (("/bin/sh") + (string-append (assoc-ref inputs "bash-minimal") "/bin/sh"))) + (substitute* '("lib-python/3/distutils/unixccompiler.py") + ;; gcc-toolchain does not provide symlink cc -> gcc + (("\"cc\"") "\"gcc\"")) + #t)) + (add-after + 'unpack 'set-source-file-times-to-1980 + ;; copied from python package, required by zip testcase + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (ftw "." (lambda (file stat flag) + (utime file circa-1980 circa-1980) + #t)) + #t))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "pypy/goal" + ;; Build with jit optimization. + (invoke "python2" + "../../rpython/bin/rpython" + (string-append "--make-jobs=" + (number->string (parallel-job-count))) + "-Ojit" + "targetpypystandalone")) + ;; Build c modules and package everything, so tests work. + (with-directory-excursion "pypy/tool/release" + (unsetenv "PYTHONPATH") ; Do not use the system’s python libs: + ; AttributeError: module 'enum' has no + ; attribute 'IntFlag' + (invoke "python2" "package.py" + "--archive-name" "pypy-dist" + "--builddir" (getcwd))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (setenv "HOME" "/tmp") ; test_with_pip tries to + ; access ~/.cache/pip + ;; Run library tests only (no interpreter unit + ;; tests). This is what Gentoo does. + (invoke + "python2" + "pypy/test_all.py" + "--pypy=pypy/tool/release/pypy-dist/bin/pypy3" + "lib-python")) + (format #t "test suite not run~%")) + #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion "pypy/tool/release" + ;; Delete test data. + (for-each + (lambda (x) + (delete-file-recursively (string-append + "pypy-dist/lib-python/3/" x))) + '("tkinter/test" + "test" + "sqlite3/test" + "lib2to3/tests" + "idlelib/idle_test" + "distutils/tests" + "ctypes/test" + "unittest/test")) + ;; Patch shebang referencing python2 + (substitute* '("pypy-dist/lib-python/3/cgi.py" + "pypy-dist/lib-python/3/encodings/rot_13.py") + (("#!.+/bin/python") + (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3"))) + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (substitute* '("pypy-dist/lib_pypy/_md5.py" + "pypy-dist/lib_pypy/_sha1.py") + (("#!.+/bin/python") + (string-append "#!" (assoc-ref outputs "out") "/bin/pypy3")))) + (copy-recursively "pypy-dist" (assoc-ref outputs "out"))) + #t))))) + (home-page "https://www.pypy.org/") + (synopsis "Python implementation with just-in-time compilation") + (description "PyPy is a faster, alternative implementation of the Python +programming language employing a just-in-time compiler. It supports most +Python code natively, including C extensions.") + (license (list license:expat ; pypy itself; _pytest/ + license:psfl ; python standard library in lib-python/ + license:asl2.0 ; dotviewer/font/ and some of lib-python/ + license:gpl3+ ; ./rpython/rlib/rvmprof/src/shared/libbacktrace/dwarf2.* + license:bsd-3 ; lib_pypy/cffi/_pycparser/ply/ + (license:non-copyleft + "http://www.unicode.org/copyright.html"))))) + -- cgit v1.2.3 From 89c34f5e48431de070c057cf4162a4519afbb0ba Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 14 Jan 2020 23:20:31 -0500 Subject: gnu: Add lib2geom. * gnu/packages/graphics.scm (lib2geom): New variable. * gnu/packages/patches/lib2geom-enable-assertions.patch, lib2geom-link-tests-against-glib.patch, lib2geom-use-system-googletest.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new patches. --- gnu/local.mk | 3 + gnu/packages/graphics.scm | 77 ++++++++++++++++++ .../patches/lib2geom-enable-assertions.patch | 36 +++++++++ .../patches/lib2geom-link-tests-against-glib.patch | 34 ++++++++ .../patches/lib2geom-use-system-googletest.patch | 94 ++++++++++++++++++++++ 5 files changed, 244 insertions(+) create mode 100644 gnu/packages/patches/lib2geom-enable-assertions.patch create mode 100644 gnu/packages/patches/lib2geom-link-tests-against-glib.patch create mode 100644 gnu/packages/patches/lib2geom-use-system-googletest.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index fd787299d2..befe89ff3e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1159,6 +1159,9 @@ dist_patch_DATA = \ %D%/packages/patches/ldc-disable-phobos-tests.patch \ %D%/packages/patches/leela-zero-gtest.patch \ %D%/packages/patches/less-hurd-path-max.patch \ + %D%/packages/patches/lib2geom-enable-assertions.patch \ + %D%/packages/patches/lib2geom-link-tests-against-glib.patch \ + %D%/packages/patches/lib2geom-use-system-googletest.patch \ %D%/packages/patches/liba52-enable-pic.patch \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 664e3fab45..75e6d48196 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Raghav Gururajan +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +62,7 @@ (define-module (gnu packages graphics) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages jemalloc) + #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pdf) #:use-module (gnu packages perl) @@ -328,6 +330,81 @@ (define-public ilmbase exception-handling library.") (license license:bsd-3))) +(define-public lib2geom + ;; Use the latest master commit, as the 1.0 release suffer build problems. + (let ((revision "1") + (commit "42e119d94934a9514c61571cfb6b4af503ece082")) + (package + (name "lib2geom") + (version (git-version "1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/inkscape/lib2geom.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "195rs0kdbs8w62irha1nwy83bccz04wglmk578qrj1mky7fc4rjv")) + (patches + ;; Patch submitted to upstream (see: + ;; https://gitlab.com/inkscape/lib2geom/merge_requests/17). + (search-patches "lib2geom-enable-assertions.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix py2geom module initialization (see: + ;; https://gitlab.com/inkscape/lib2geom/merge_requests/18). + (substitute* "src/py2geom/__init__.py" + (("_py2geom") "py2geom._py2geom")) + #t)))) + (build-system cmake-build-system) + (arguments + `(#:imported-modules ((guix build python-build-system) + ,@%cmake-build-system-modules) + #:configure-flags '("-D2GEOM_BUILD_SHARED=ON" + "-D2GEOM_BOOST_PYTHON=ON" + ;; Compiling the Cython bindings fail (see: + ;; https://gitlab.com/inkscape/lib2geom/issues/21). + "-D2GEOM_CYTHON_BINDINGS=OFF") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-python-lib-install-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((python-version (@ (guix build python-build-system) + python-version)) + (python-maj-min-version (python-version + (assoc-ref inputs "python"))) + (site-package (string-append + (assoc-ref outputs "out") + "/lib/python" python-maj-min-version + "/site-packages"))) + (substitute* '("src/cython/CMakeLists.txt" + "src/py2geom/CMakeLists.txt") + (("PYTHON_LIB_INSTALL \"[^\"]*\"") + (format #f "PYTHON_LIB_INSTALL ~s" site-package)))) + #t))))) + (native-inputs `(("python" ,python-wrapper) + ("googletest" ,googletest) + ("pkg-config" ,pkg-config))) + (inputs `(("cairo" ,cairo) + ("pycairo" ,python-pycairo) + ("double-conversion" ,double-conversion) + ("glib" ,glib) + ("gsl" ,gsl))) + (propagated-inputs + `(("boost" ,boost))) ;referred to in 2geom/pathvector.h. + (home-page "https://gitlab.com/inkscape/lib2geom/") + (synopsis "C++ 2D graphics library") + (description "2geom is a C++ library of mathematics for paths, curves, +and other geometric calculations. Designed for vector graphics, it tackles +Bézier curves, conic sections, paths, intersections, transformations, and +basic geometries.") + ;; Because the library is linked with the GNU Scientific Library + ;; (GPLv3+), the combined work must be licensed as GPLv3+ (see: + ;; https://gitlab.com/inkscape/inkscape/issues/784). + (license license:gpl3+)))) + (define-public ogre (package (name "ogre") diff --git a/gnu/packages/patches/lib2geom-enable-assertions.patch b/gnu/packages/patches/lib2geom-enable-assertions.patch new file mode 100644 index 0000000000..8feb44acbf --- /dev/null +++ b/gnu/packages/patches/lib2geom-enable-assertions.patch @@ -0,0 +1,36 @@ +From 4aa78f52232682b353eb15c219171e466987bac7 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Thu, 16 Jan 2020 00:19:29 -0500 +Subject: [PATCH] build: Enable assertions for the RelWithDebugInfo build type. + +This fixes issue #5 (see: +https://gitlab.com/inkscape/lib2geom/issues/5). + +* CMakeLists.txt: Remove the "-DNDEBUG" CXX flag from the default +configuration for the RelWithDebugInfo build type. +--- + CMakeLists.txt | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfeb8f03..a663a1b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,6 +19,14 @@ enable_testing() + + include(CheckCXXSourceCompiles) + ++# Enable assertions for the RelWithDebugInfo build type. This is ++# useful as some tests make use of it (see: ++# https://gitlab.com/inkscape/lib2geom/issues/5). ++if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ++ string(REPLACE "-DNDEBUG" "" ++ CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") ++endif() ++ + # Find dependencies + find_package(Boost 1.40 REQUIRED) + find_package(DoubleConversion REQUIRED) +-- +2.24.1 + diff --git a/gnu/packages/patches/lib2geom-link-tests-against-glib.patch b/gnu/packages/patches/lib2geom-link-tests-against-glib.patch new file mode 100644 index 0000000000..2b4f7ca6bf --- /dev/null +++ b/gnu/packages/patches/lib2geom-link-tests-against-glib.patch @@ -0,0 +1,34 @@ +From f95925afef451755fc1449e57fbfdc2e7277f4b4 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Sat, 11 Jan 2020 00:44:55 -0500 +Subject: [PATCH 1/3] tests: Link against GLib. + +This resolves an error about not finding when linking the +tests that make use of GLib. + +* src/tests/CMakeLists.txt[2GEOM_GTESTS_SRC]: Add the glib library to +the link target libraries. +--- + src/tests/CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt +index 5ddf7f9c..626cfd87 100644 +--- a/src/tests/CMakeLists.txt ++++ b/src/tests/CMakeLists.txt +@@ -32,8 +32,10 @@ sbasis-test + + foreach(source ${2GEOM_GTESTS_SRC}) + add_executable(${source} ${source}.cpp) +- target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} ${GTK3_LIBRARIES}) ++ target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ++ ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS}) ++ target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} ++ ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach() + +-- +2.24.1 + diff --git a/gnu/packages/patches/lib2geom-use-system-googletest.patch b/gnu/packages/patches/lib2geom-use-system-googletest.patch new file mode 100644 index 0000000000..16cce1799f --- /dev/null +++ b/gnu/packages/patches/lib2geom-use-system-googletest.patch @@ -0,0 +1,94 @@ +From 6693b9c8ff1ae1ec02c9002c0a8f5f416f0c88f0 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Sun, 12 Jan 2020 23:23:33 -0500 +Subject: [PATCH 3/3] build: Prefer googletest from the system. + +Fixes issue #4. + +The build system now look for a system installed googletest or falls +back to the bundled copy of googletest otherwise. + +* CMakeLists.txt: Add call to find_package(GTest). +(include_directories): Remove "src/googletest/googletest/include" from +arg. +* src/CMakeLists.txt[NOT GTEST_FOUND]: Define the gtest and gtest_main +libraries when GTEST_FOUND is false. Globally include the googletest +headers here. Define aliases for the gtest and gtest_main libraries +that match those defined by the FindGTest module. +* src/tests/CMakeLists.txt: Replace references to gtest_main and gtest +by GTest::Main and GTest::GTest, respectively. +--- + CMakeLists.txt | 3 ++- + src/CMakeLists.txt | 15 +++++++++++---- + src/tests/CMakeLists.txt | 6 +++--- + 3 files changed, 16 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bfeb8f03..96fbd58c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,13 +25,14 @@ find_package(DoubleConversion REQUIRED) + find_package(PkgConfig REQUIRED) + find_package(Cython) + find_package(Threads) ++find_package(GTest) + pkg_check_modules(GTK3 gtk+-3.0) + pkg_check_modules(GLIB glib-2.0) + pkg_check_modules(CAIRO cairo) + pkg_check_modules(GSL gsl) + + # Add global include and link directories +-include_directories(src src/googletest/googletest/include ${CMAKE_CURRENT_BINARY_DIR}) ++include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) + link_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/2geom) + + check_cxx_source_compiles("#include \nint main() { double a=0.5,b=0.5,c=0.5; sincos(a, &b, &c); return 0; }" HAVE_SINCOS) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index eefb3ac5..941dc4c7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,14 @@ +-add_library(gtest SHARED googletest/googletest/src/gtest-all.cc) +-target_include_directories(gtest PRIVATE googletest/googletest) +-target_link_libraries(gtest Threads::Threads) +-add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc) ++if(NOT GTEST_FOUND) ++ message("No system googletest library: using bundled copy.") ++ add_library(gtest SHARED googletest/googletest/src/gtest-all.cc) ++ add_library(gtest_main STATIC googletest/googletest/src/gtest_main.cc) ++ target_include_directories(gtest PRIVATE googletest/googletest) ++ target_link_libraries(gtest Threads::Threads) ++ include_directories(SYSTEM googletest/googletest/include) ++ # Aliases to share the same nomenclature with FindGTest. ++ add_library(GTest::GTest ALIAS gtest) ++ add_library(GTest::Main ALIAS gtest_main) ++endif() + + add_subdirectory(2geom) + add_subdirectory(tests) +diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt +index 626cfd87..3538f8cf 100644 +--- a/src/tests/CMakeLists.txt ++++ b/src/tests/CMakeLists.txt +@@ -34,15 +34,15 @@ foreach(source ${2GEOM_GTESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} + ${GTK3_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest_main gtest ${GSL_LIBRARIES} +- ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) ++ target_link_libraries(${source} 2geom GTest::Main GTest::GTest ++ ${GSL_LIBRARIES} ${GTK3_LIBRARIES} ${GLIB_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach() + + foreach(source ${2GEOM_TESTS_SRC}) + add_executable(${source} ${source}.cpp) + target_include_directories(${source} PRIVATE ${GSL_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS}) +- target_link_libraries(${source} 2geom gtest ${GSL_LIBRARIES} ${GTK3_LIBRARIES}) ++ target_link_libraries(${source} 2geom GTest::GTest ${GSL_LIBRARIES} ${GTK3_LIBRARIES}) + add_test(NAME ${source} COMMAND ${source}) + endforeach(source) + +-- +2.24.1 + -- cgit v1.2.3 From f977fe92c4456c3a051832a96c5338e646771c05 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 24 Jan 2020 23:13:46 -0500 Subject: gnu: plotutils: Build libplotter. * gnu/packages/plotutils.scm (plotutils)[origin]: Port the patch to a snippet, which catches all the problematic occurrences. [configure-flags]: Pass "--enable-libplotter". [description]: Mention the newly added C++ libplotter library. --- gnu/local.mk | 1 - gnu/packages/patches/plotutils-libpng-jmpbuf.patch | 23 --------------------- gnu/packages/plotutils.scm | 24 ++++++++++++++-------- 3 files changed, 15 insertions(+), 33 deletions(-) delete mode 100644 gnu/packages/patches/plotutils-libpng-jmpbuf.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index befe89ff3e..6d775828e0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1377,7 +1377,6 @@ dist_patch_DATA = \ %D%/packages/patches/plink-endian-detection.patch \ %D%/packages/patches/plib-CVE-2011-4620.patch \ %D%/packages/patches/plib-CVE-2012-4552.patch \ - %D%/packages/patches/plotutils-libpng-jmpbuf.patch \ %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ diff --git a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch b/gnu/packages/patches/plotutils-libpng-jmpbuf.patch deleted file mode 100644 index 07ef60996c..0000000000 --- a/gnu/packages/patches/plotutils-libpng-jmpbuf.patch +++ /dev/null @@ -1,23 +0,0 @@ -Use the `png_jmpbuf' accessor, as recommended since libpng 1.4.0: -http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt . - ---- plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:12.000000000 +0200 -+++ plotutils-2.6/libplot/z_write.c 2013-07-12 17:19:07.000000000 +0200 -@@ -164,7 +164,7 @@ _pl_z_maybe_output_image (S___(Plotter * - } - - /* cleanup after libpng errors (error handler does a longjmp) */ -- if (setjmp (png_ptr->jmpbuf)) -+ if (setjmp (png_jmpbuf (png_ptr))) - { - png_destroy_write_struct (&png_ptr, (png_info **)NULL); - return -1; -@@ -444,7 +444,7 @@ _our_error_fn_stdio (png_struct *png_ptr - #endif - } - -- longjmp (png_ptr->jmpbuf, 1); -+ longjmp (png_jmpbuf (png_ptr), 1); - } - - static void diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index edd492c711..f6881f6776 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016, 2017, 2019, 2020 Nicolas Goaziou ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,7 +57,6 @@ (define-public plotutils (sha256 (base32 "1arkyizn5wbgvbh53aziv3s6lmd3wm9lqzkhxb3hijlp1y124hjg")) - (patches (search-patches "plotutils-libpng-jmpbuf.patch")) (modules '((guix build utils))) (snippet ;; Force the use of libXaw7 instead of libXaw. When not doing @@ -67,22 +67,28 @@ (define-public plotutils (substitute* "configure" (("-lXaw") "-lXaw7")) + ;; Use the `png_jmpbuf' accessor, as recommended since libpng + ;; 1.4.0 (see: + ;; http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt). + (substitute* "libplot/z_write.c" + (("png_ptr->jmpbuf") + "png_jmpbuf (png_ptr)")) #t)))) (build-system gnu-build-system) + (arguments + `(#:configure-flags (list "--enable-libplotter"))) (inputs `(("libpng" ,libpng) ("libx11" ,libx11) ("libxt" ,libxt) ("libxaw" ,libxaw))) - - (home-page - "https://www.gnu.org/software/plotutils/") + (home-page "https://www.gnu.org/software/plotutils/") (synopsis "Plotting utilities and library") (description - "GNU Plotutils is a package for plotting and working with 2D graphics. -It includes a library, \"libplot\", for C and C++ for exporting 2D vector -graphics in many file formats. It also has support for 2D vector graphics -animations. The package also contains command-line programs for plotting -scientific data.") + "GNU Plotutils is a package for plotting and working with 2D graphics. +It includes the C library @code{libplot} and the C++ @code{libplotter} library +for exporting 2D vector graphics in many file formats. It also has support +for 2D vector graphics animations. The package also contains command-line +programs for plotting scientific data.") (license license:gpl2+))) (define-public guile-charting -- cgit v1.2.3 From 7bc396bf353c5550c49b3f8791b34072ba417d90 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 2 Jun 2020 14:05:46 -0400 Subject: gnu: nss: Fix CVE-2020-12399 via graft. * gnu/packages/patches/nss-CVE-2020-12399.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/nss.scm (nss/fixed): New variable. (nss)[replacement]: Add field. --- gnu/local.mk | 1 + gnu/packages/nss.scm | 9 ++ gnu/packages/patches/nss-CVE-2020-12399.patch | 138 ++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 gnu/packages/patches/nss-CVE-2020-12399.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 6d775828e0..4a8a855502 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1297,6 +1297,7 @@ dist_patch_DATA = \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/network-manager-plugin-path.patch \ %D%/packages/patches/nsis-env-passthru.patch \ + %D%/packages/patches/nss-CVE-2020-12399.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ %D%/packages/patches/ntfs-3g-CVE-2019-9755.patch \ diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index e423bdd3a2..887860157d 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -73,6 +73,7 @@ (define-public nss (package (name "nss") (version "3.50") + (replacement nss/fixed) (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -191,3 +192,11 @@ (define-public nss PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards.") (license license:mpl2.0))) + +(define nss/fixed + (package + (inherit nss) + (source (origin + (inherit (package-source nss)) + (patches (append (search-patches "nss-CVE-2020-12399.patch") + (origin-patches (package-source nss)))))))) diff --git a/gnu/packages/patches/nss-CVE-2020-12399.patch b/gnu/packages/patches/nss-CVE-2020-12399.patch new file mode 100644 index 0000000000..0d91b655e2 --- /dev/null +++ b/gnu/packages/patches/nss-CVE-2020-12399.patch @@ -0,0 +1,138 @@ +Fix CVE-2020-12399 (Timing attack on DSA signature generation: NSS has +shown timing differences when performing DSA signatures, which was +exploitable and could eventually leak private keys.) + +Copied from upstream: + +but with "nss/" inserted into the file name to patch. + +# HG changeset patch +# User Robert Relyea +# Date 1589907685 0 +# Node ID daa823a4a29bcef0fec33a379ec83857429aea2e +# Parent d2cfb4ccdf167e5ea06d2bb5bc39c50f789929c8 +Bug 1631576 - Force a fixed length for DSA exponentiation r=pereida,bbrumley + +Differential Revision: https://phabricator.services.mozilla.com/D72011 + +diff --git a/nss/lib/freebl/dsa.c b/nss/lib/freebl/dsa.c +--- a/nss/lib/freebl/dsa.c ++++ b/nss/lib/freebl/dsa.c +@@ -308,23 +308,24 @@ DSA_NewKeyFromSeed(const PQGParams *para + SECItem seedItem; + seedItem.data = (unsigned char *)seed; + seedItem.len = PQG_GetLength(¶ms->subPrime); + return dsa_NewKeyExtended(params, &seedItem, privKey); + } + + static SECStatus + dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest, +- const unsigned char *kb) ++ const unsigned char *kbytes) + { + mp_int p, q, g; /* PQG parameters */ + mp_int x, k; /* private key & pseudo-random integer */ + mp_int r, s; /* tuple (r, s) is signature) */ + mp_int t; /* holding tmp values */ + mp_int ar; /* holding blinding values */ ++ mp_digit fuzz; /* blinding multiplier for q */ + mp_err err = MP_OKAY; + SECStatus rv = SECSuccess; + unsigned int dsa_subprime_len, dsa_signature_len, offset; + SECItem localDigest; + unsigned char localDigestData[DSA_MAX_SUBPRIME_LEN]; + SECItem t2 = { siBuffer, NULL, 0 }; + + /* FIPS-compliance dictates that digest is a SHA hash. */ +@@ -368,31 +369,46 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt + CHECK_MPI_OK(mp_init(&q)); + CHECK_MPI_OK(mp_init(&g)); + CHECK_MPI_OK(mp_init(&x)); + CHECK_MPI_OK(mp_init(&k)); + CHECK_MPI_OK(mp_init(&r)); + CHECK_MPI_OK(mp_init(&s)); + CHECK_MPI_OK(mp_init(&t)); + CHECK_MPI_OK(mp_init(&ar)); ++ + /* + ** Convert stored PQG and private key into MPI integers. + */ + SECITEM_TO_MPINT(key->params.prime, &p); + SECITEM_TO_MPINT(key->params.subPrime, &q); + SECITEM_TO_MPINT(key->params.base, &g); + SECITEM_TO_MPINT(key->privateValue, &x); +- OCTETS_TO_MPINT(kb, &k, dsa_subprime_len); ++ OCTETS_TO_MPINT(kbytes, &k, dsa_subprime_len); ++ ++ /* k blinding create a single value that has the high bit set in ++ * the mp_digit*/ ++ if (RNG_GenerateGlobalRandomBytes(&fuzz, sizeof(mp_digit)) != SECSuccess) { ++ PORT_SetError(SEC_ERROR_NEED_RANDOM); ++ rv = SECFailure; ++ goto cleanup; ++ } ++ fuzz |= 1ULL << ((sizeof(mp_digit) * PR_BITS_PER_BYTE - 1)); + /* + ** FIPS 186-1, Section 5, Step 1 + ** + ** r = (g**k mod p) mod q + */ +- CHECK_MPI_OK(mp_exptmod(&g, &k, &p, &r)); /* r = g**k mod p */ +- CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */ ++ CHECK_MPI_OK(mp_mul_d(&q, fuzz, &t)); /* t = q*fuzz */ ++ CHECK_MPI_OK(mp_add(&k, &t, &t)); /* t = k+q*fuzz */ ++ /* length of t is now fixed, bits in k have been blinded */ ++ CHECK_MPI_OK(mp_exptmod(&g, &t, &p, &r)); /* r = g**t mod p */ ++ /* r is now g**(k+q*fuzz) == g**k mod p */ ++ CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */ ++ + /* + ** FIPS 186-1, Section 5, Step 2 + ** + ** s = (k**-1 * (HASH(M) + x*r)) mod q + */ + if (DSA_NewRandom(NULL, &key->params.subPrime, &t2) != SECSuccess) { + PORT_SetError(SEC_ERROR_NEED_RANDOM); + rv = SECFailure; +@@ -406,25 +422,34 @@ dsa_SignDigest(DSAPrivateKey *key, SECIt + goto cleanup; + } + SECITEM_TO_MPINT(t2, &ar); /* ar <-$ Zq */ + SECITEM_FreeItem(&t2, PR_FALSE); + + /* Using mp_invmod on k directly would leak bits from k. */ + CHECK_MPI_OK(mp_mul(&k, &ar, &k)); /* k = k * ar */ + CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */ +- CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */ ++ /* k is now k*t*ar */ ++ CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */ ++ /* k is now (k*t*ar)**-1 */ + CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */ +- SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */ ++ /* k is now (k*ar)**-1 */ ++ SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */ + /* To avoid leaking secret bits here the addition is blinded. */ +- CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */ +- CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */ ++ CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */ ++ /* x is now x*ar */ ++ CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */ ++ /* x is now x*r*ar */ + CHECK_MPI_OK(mp_mulmod(&s, &ar, &q, &t)); /* t = s * ar mod q */ +- CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */ +- CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */ ++ /* t is now hash(M)*ar */ ++ CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */ ++ /* s is now (HASH(M)+x*r)*ar */ ++ CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */ ++ /* s is now (HASH(M)+x*r)*ar*(k*ar)**-1 = (k**-1)*(HASH(M)+x*r) */ ++ + /* + ** verify r != 0 and s != 0 + ** mentioned as optional in FIPS 186-1. + */ + if (mp_cmp_z(&r) == 0 || mp_cmp_z(&s) == 0) { + PORT_SetError(SEC_ERROR_NEED_RANDOM); + rv = SECFailure; + goto cleanup; + -- cgit v1.2.3 From 833252a88bd9a11b7bd431877130dd80f1d548f2 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 2 Jun 2020 00:24:56 -0400 Subject: gnu: icecat: Update to 68.9.0-guix0-preview1 [security fixes]. Includes fixes for CVE-2020-12399 and CVE-2020-12405. * gnu/packages/gnuzilla.scm (%icecat-version, %icecat-build-id): Update. (icecat-source): Update gnuzilla commit, base version, and hashes. * gnu/packages/patches/icecat-makeicecat.patch: Adapt to new version. --- gnu/packages/gnuzilla.scm | 12 ++++++------ gnu/packages/patches/icecat-makeicecat.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 7bf9850e97..e00a09e989 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -556,8 +556,8 @@ (define* (computed-origin-method gexp-promise hash-algo hash #:system system #:guile-for-build guile))) -(define %icecat-version "68.8.0-guix0-preview1") -(define %icecat-build-id "20200505000000") ;must be of the form YYYYMMDDhhmmss +(define %icecat-version "68.9.0-guix0-preview1") +(define %icecat-build-id "20200602000000") ;must be of the form YYYYMMDDhhmmss ;; 'icecat-source' is a "computed" origin that generates an IceCat tarball ;; from the corresponding upstream Firefox ESR tarball, using the 'makeicecat' @@ -579,11 +579,11 @@ (define icecat-source "firefox-" upstream-firefox-version ".source.tar.xz")) (sha256 (base32 - "0hp8cc7xk6qj4q1s8n97qv9sdrypkzvphik96m5qv1r5s9k24nzs")))) + "01s41p985g6v544lf08zch3myssn5c76jwmkzzd68zd9m3hhalck")))) - (upstream-icecat-base-version "68.8.0") ; maybe older than base-version + (upstream-icecat-base-version "68.9.0") ; maybe older than base-version ;;(gnuzilla-commit (string-append "v" upstream-icecat-base-version)) - (gnuzilla-commit "5358ff2963a6136f8acafdc598cad540231ad23e") + (gnuzilla-commit "d7acf32ad905a3382cb2353577a96d29aa58f589") (gnuzilla-source (origin (method git-fetch) @@ -595,7 +595,7 @@ (define icecat-source (string-take gnuzilla-commit 8))) (sha256 (base32 - "1bq0qzgkxz9q61g48bc05i0zx1z8k0pklxnmn54ch136aqgsyli4")))) + "0m49zm05m3n95diij2zyvpm74q66zxjhv9rp8zvaab0h7v2s09n9")))) (makeicecat-patch (local-file (search-patch "icecat-makeicecat.patch"))) diff --git a/gnu/packages/patches/icecat-makeicecat.patch b/gnu/packages/patches/icecat-makeicecat.patch index 2978a5789e..d3d95cbf28 100644 --- a/gnu/packages/patches/icecat-makeicecat.patch +++ b/gnu/packages/patches/icecat-makeicecat.patch @@ -25,7 +25,7 @@ index 8be2362..48716f2 100755 -wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc -gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 -gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc --echo -n fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +-echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - - -echo Extracting Firefox tarball -tar -xf firefox-${FFVERSION}esr.source.tar.xz @@ -37,7 +37,7 @@ index 8be2362..48716f2 100755 +# wget -N https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FFVERSION}esr/source/firefox-${FFVERSION}esr.source.tar.xz.asc +# gpg --recv-keys --keyserver keyserver.ubuntu.com 14F26682D0916CDD81E37B6D61B7B526D98F0353 +# gpg --verify firefox-${FFVERSION}esr.source.tar.xz.asc -+# echo -n fa5b2266d225878d4b35694678f79fd7e7a6d3c62759a40326129bd90f63e842 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - ++# echo -n 935105e1a8a97d64daffb372690e2b566b5f07641f01470929dbbc82d20d4407 firefox-${FFVERSION}esr.source.tar.xz |sha256sum -c - +# +# echo Extracting Firefox tarball +# tar -xf firefox-${FFVERSION}esr.source.tar.xz -- cgit v1.2.3 From 9a46e0dd843a2f4c832f74e9a503e7200c934eb7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 2 Jun 2020 23:40:19 +0200 Subject: gnu: dbus: Fix CVE-2020-12049. * gnu/packages/patches/dbus-CVE-2020-12049.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (dbus/fixed): New variable. (dbus)[replacement]: New field. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 10 +++++ gnu/packages/patches/dbus-CVE-2020-12049.patch | 58 ++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 gnu/packages/patches/dbus-CVE-2020-12049.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4a8a855502..babcb8f6ad 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -855,6 +855,7 @@ dist_patch_DATA = \ %D%/packages/patches/datefudge-gettimeofday.patch \ %D%/packages/patches/dbacl-include-locale.h.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ + %D%/packages/patches/dbus-CVE-2020-12049.patch \ %D%/packages/patches/dbus-c++-gcc-compat.patch \ %D%/packages/patches/dbus-c++-threading-mutex.patch \ %D%/packages/patches/dconf-meson-0.52.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 12ba6e939b..94dc6adf6f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -88,6 +88,7 @@ (define dbus (package (name "dbus") (version "1.12.16") + (replacement dbus/fixed) (source (origin (method url-fetch) (uri (string-append @@ -164,6 +165,15 @@ (define dbus shared NFS home directories.") (license license:gpl2+))) ; or Academic Free License 2.1 +;; Replacement package to fix CVE-2020-12049. +(define dbus/fixed + (package + (inherit dbus) + (source (origin + (inherit (package-source dbus)) + (patches (append (search-patches "dbus-CVE-2020-12049.patch") + (origin-patches (package-source dbus)))))))) + (define glib (package (name "glib") diff --git a/gnu/packages/patches/dbus-CVE-2020-12049.patch b/gnu/packages/patches/dbus-CVE-2020-12049.patch new file mode 100644 index 0000000000..71280144a1 --- /dev/null +++ b/gnu/packages/patches/dbus-CVE-2020-12049.patch @@ -0,0 +1,58 @@ +Fix CVE-2020-12049: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12049 +https://lists.freedesktop.org/archives/ftp-release/2020-June/000753.html + +Taken from upstream: + +https://gitlab.freedesktop.org/dbus/dbus/-/commit/272d484283883fa9ff95b69d924fff6cd34842f5 + +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -435,18 +435,6 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd, + struct cmsghdr *cm; + dbus_bool_t found = FALSE; + +- if (m.msg_flags & MSG_CTRUNC) +- { +- /* Hmm, apparently the control data was truncated. The bad +- thing is that we might have completely lost a couple of fds +- without chance to recover them. Hence let's treat this as a +- serious error. */ +- +- errno = ENOSPC; +- _dbus_string_set_length (buffer, start); +- return -1; +- } +- + for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) + if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) + { +@@ -501,6 +489,26 @@ _dbus_read_socket_with_unix_fds (DBusSocket fd, + if (!found) + *n_fds = 0; + ++ if (m.msg_flags & MSG_CTRUNC) ++ { ++ unsigned int i; ++ ++ /* Hmm, apparently the control data was truncated. The bad ++ thing is that we might have completely lost a couple of fds ++ without chance to recover them. Hence let's treat this as a ++ serious error. */ ++ ++ /* We still need to close whatever fds we *did* receive, ++ * otherwise they'll never get closed. (CVE-2020-12049) */ ++ for (i = 0; i < *n_fds; i++) ++ close (fds[i]); ++ ++ *n_fds = 0; ++ errno = ENOSPC; ++ _dbus_string_set_length (buffer, start); ++ return -1; ++ } ++ + /* put length back (doesn't actually realloc) */ + _dbus_string_set_length (buffer, start + bytes_read); + -- cgit v1.2.3 From d9ef5aeba757c6f86d2abafe6b62ef4c2516c2e6 Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Sat, 30 May 2020 19:09:43 +0200 Subject: gnu: java-openjfx-build: Add helpful patch. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/java.scm (java-openjfx-build)[source]: Use it. * gnu/packages/patches/java-openjfx-build-jdk_version.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Alexey Abramov Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/java.scm | 3 ++- .../patches/java-openjfx-build-jdk_version.patch | 27 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/java-openjfx-build-jdk_version.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index babcb8f6ad..01ec893310 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1111,6 +1111,7 @@ dist_patch_DATA = \ %D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch \ %D%/packages/patches/java-commons-collections-fix-java8.patch \ %D%/packages/patches/java-jeromq-fix-tests.patch \ + %D%/packages/patches/java-openjfx-build-jdk_version.patch \ %D%/packages/patches/java-powermock-fix-java-files.patch \ %D%/packages/patches/java-simple-xml-fix-tests.patch \ %D%/packages/patches/java-svg-salamander-Fix-non-det.patch \ diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index b12c3ca95c..d569ed57d6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2499,7 +2499,8 @@ (define-public java-openjfx-build #t)) (sha256 (base32 - "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")))) + "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f")) + (patches (search-patches "java-openjfx-build-jdk_version.patch")))) (build-system ant-build-system) (arguments `(#:jar-name "java-openjfx.jar" diff --git a/gnu/packages/patches/java-openjfx-build-jdk_version.patch b/gnu/packages/patches/java-openjfx-build-jdk_version.patch new file mode 100644 index 0000000000..7be954467a --- /dev/null +++ b/gnu/packages/patches/java-openjfx-build-jdk_version.patch @@ -0,0 +1,27 @@ +Subject: [PATCH] openjfx: Determine the version of Java in JDK_HOME + +Icedtea contains guix in its version, so build.gradle failes to run. Openjfx +packaging is not trivial, so you will probably need to try build it with +gradlew. + +--- + build.gradle | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/build.gradle b/build.gradle +index df82f63..2c626cd 100644 +--- a/build.gradle ++++ b/build.gradle +@@ -742,9 +742,9 @@ try { + if (inStream.readLine() != null) { + String v = inStream.readLine(); + if (v != null) { +- int ib = v.indexOf(" (build "); ++ int ib = v.indexOf(" (guix build "); + if (ib != -1) { +- String ver = v.substring(ib + 8, v.size() - 1); ++ String ver = v.substring(ib + 13, v.size() - 1); + + defineProperty("jdkRuntimeVersion", ver) + defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0]) +2.24.1 -- cgit v1.2.3 From 1860b4152360a18ac562690c1f541e53537bf262 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 5 Jun 2020 18:45:11 +0200 Subject: gnu: websocketpp: Update to 0.8.2. * gnu/packages/web.scm (websocketpp): Update to 0.8.2. [source]: Replace patch. * gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch: Delete file. * gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 2 +- .../patches/websocketpp-fix-for-boost-1.70.patch | 103 --------------------- .../patches/websocketpp-fix-for-cmake-3.15.patch | 17 ++++ gnu/packages/web.scm | 6 +- 4 files changed, 21 insertions(+), 107 deletions(-) delete mode 100644 gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch create mode 100644 gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 01ec893310..5dc0909efd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1588,7 +1588,7 @@ dist_patch_DATA = \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/webkitgtk-share-store.patch \ - %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ + %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \ %D%/packages/patches/wicd-urwid-1.3.patch \ diff --git a/gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch b/gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch deleted file mode 100644 index ece414a1cb..0000000000 --- a/gnu/packages/patches/websocketpp-fix-for-boost-1.70.patch +++ /dev/null @@ -1,103 +0,0 @@ -This patch for Boost >= 1.70 was made by merging two patches that -are in the 'develop' branch (c769c92 and f810ca2). - -diff -u b/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp ---- b/websocketpp/transport/asio/connection.hpp -+++ b/websocketpp/transport/asio/connection.hpp -@@ -311,9 +311,10 @@ - * needed. - */ - timer_ptr set_timer(long duration, timer_handler callback) { -- timer_ptr new_timer = lib::make_shared( -- lib::ref(*m_io_service), -- lib::asio::milliseconds(duration) -+ timer_ptr new_timer( -+ new lib::asio::steady_timer( -+ *m_io_service, -+ lib::asio::milliseconds(duration)) - ); - - if (config::enable_multithreading) { -@@ -461,8 +462,7 @@ - m_io_service = io_service; - - if (config::enable_multithreading) { -- m_strand = lib::make_shared( -- lib::ref(*io_service)); -+ m_strand.reset(new lib::asio::io_service::strand(*io_service)); - } - - lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, -diff -u b/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp ---- b/websocketpp/transport/asio/endpoint.hpp -+++ b/websocketpp/transport/asio/endpoint.hpp -@@ -195,8 +195,7 @@ - - m_io_service = ptr; - m_external_io_service = true; -- m_acceptor = lib::make_shared( -- lib::ref(*m_io_service)); -+ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); - - m_state = READY; - ec = lib::error_code(); -@@ -688,9 +687,7 @@ - * @since 0.3.0 - */ - void start_perpetual() { -- m_work = lib::make_shared( -- lib::ref(*m_io_service) -- ); -+ m_work.reset(new lib::asio::io_service::work(*m_io_service)); - } - - /// Clears the endpoint's perpetual flag, allowing it to exit when empty -@@ -854,8 +851,7 @@ - - // Create a resolver - if (!m_resolver) { -- m_resolver = lib::make_shared( -- lib::ref(*m_io_service)); -+ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); - } - - tcon->set_uri(u); -unchanged: ---- a/websocketpp/transport/asio/security/none.hpp -+++ b/websocketpp/transport/asio/security/none.hpp -@@ -168,8 +168,7 @@ protected: - return socket::make_error_code(socket::error::invalid_state); - } - -- m_socket = lib::make_shared( -- lib::ref(*service)); -+ m_socket.reset(new lib::asio::ip::tcp::socket(*service)); - - if (m_socket_init_handler) { - m_socket_init_handler(m_hdl, *m_socket); -unchanged: ---- a/websocketpp/transport/asio/security/tls.hpp -+++ b/websocketpp/transport/asio/security/tls.hpp -@@ -193,8 +193,7 @@ protected: - if (!m_context) { - return socket::make_error_code(socket::error::invalid_tls_context); - } -- m_socket = lib::make_shared( -- _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); -+ m_socket.reset(new socket_type(*service, *m_context)); - - if (m_socket_init_handler) { - m_socket_init_handler(m_hdl, get_socket()); -only in patch2: -unchanged: ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -202,7 +202,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES) - endif () - - if (NOT Boost_USE_STATIC_LIBS) -- add_definitions (/DBOOST_TEST_DYN_LINK) -+ add_definitions (-DBOOST_TEST_DYN_LINK) - endif () - - set (Boost_FIND_REQUIRED TRUE) diff --git a/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch b/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch new file mode 100644 index 0000000000..ea759d022b --- /dev/null +++ b/gnu/packages/patches/websocketpp-fix-for-cmake-3.15.patch @@ -0,0 +1,17 @@ +From: Tobias Geerinckx-Rice +Date: Fri, 05 Jun 2020 18:37:51 +0200 +Subject: [PATCH] gnu: websocketpp: Fix build with CMake >= 3.15. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57ed01e78..43c772d78 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -215,7 +215,7 @@ + set (Boost_USE_MULTITHREADED TRUE) + set (Boost_ADDITIONAL_VERSIONS "1.39.0" "1.40.0" "1.41.0" "1.42.0" "1.43.0" "1.44.0" "1.46.1") # todo: someone who knows better spesify these! + +- find_package (Boost 1.39.0 COMPONENTS "${WEBSOCKETPP_BOOST_LIBS}") ++ find_package (Boost 1.39.0 COMPONENTS ${WEBSOCKETPP_BOOST_LIBS}) + + if (Boost_FOUND) + # Boost is a project wide global dependency. diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index bd46ac9c2c..30ef341fa3 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1178,7 +1178,7 @@ (define-public wabt (define-public websocketpp (package (name "websocketpp") - (version "0.8.1") + (version "0.8.2") (source (origin (method git-fetch) @@ -1187,8 +1187,8 @@ (define-public websocketpp (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "12ffczcrryh74c1xssww35ic6yiy2l2xgdd30lshiq9wnzl2brgy")) - (patches (search-patches "websocketpp-fix-for-boost-1.70.patch")))) + (base32 "1ww4fhl8qf12hkv6jaild8zzsygdspxm1gqpk2f63gv1xfi31wpm")) + (patches (search-patches "websocketpp-fix-for-cmake-3.15.patch")))) (build-system cmake-build-system) (inputs `(("boost" ,boost) ("openssl" ,openssl))) -- cgit v1.2.3 From 0e96514e7b2ad11c201fa06f57457c8e33054120 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 6 Jun 2020 13:44:05 +0200 Subject: gnu: emacs-haskell-mode: Update to 17.1. * gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Update to 17.1. [arguments]: Add phase to skip failing tests. * gnu/packages/patches/haskell-mode-make-check.patch: * gnu/packages/patches/haskell-mode-unused-variables.patch: Delete files. * gnu/local.mk: Apply files removal. --- gnu/local.mk | 2 - gnu/packages/emacs-xyz.scm | 51 ++++++++++------------ gnu/packages/patches/haskell-mode-make-check.patch | 35 --------------- .../patches/haskell-mode-unused-variables.patch | 44 ------------------- 4 files changed, 23 insertions(+), 109 deletions(-) delete mode 100644 gnu/packages/patches/haskell-mode-make-check.patch delete mode 100644 gnu/packages/patches/haskell-mode-unused-variables.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5dc0909efd..5016d16d7a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1069,8 +1069,6 @@ dist_patch_DATA = \ %D%/packages/patches/gtksourceview-2-add-default-directory.patch \ %D%/packages/patches/gzdoom-search-in-installed-share.patch \ %D%/packages/patches/gzdoom-find-system-libgme.patch \ - %D%/packages/patches/haskell-mode-unused-variables.patch \ - %D%/packages/patches/haskell-mode-make-check.patch \ %D%/packages/patches/hdf4-architectures.patch \ %D%/packages/patches/hdf4-reproducibility.patch \ %D%/packages/patches/hdf4-shared-fortran.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 63cbff5ee0..3964891c7e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -822,26 +822,22 @@ (define-public emacs-unpackaged-el (define-public emacs-haskell-mode (package (name "emacs-haskell-mode") - (version "16.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/haskell/haskell-mode") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1qk36y0v9fzass6785il65c6wb5cfj4ihhwkvgnzmbafpa8p4dvq")) - (patches - (search-patches ; backport test failure fixes - "haskell-mode-unused-variables.patch" - "haskell-mode-make-check.patch")))) - (inputs - `(("emacs-el-search" ,emacs-el-search) ; for tests - ("emacs-stream" ,emacs-stream))) ; for tests + (version "17.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/haskell/haskell-mode") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0izcasi2v02zh08c863h43m8mmsldzy8pck43cllrfn0zf24v2qn")))) (propagated-inputs `(("emacs-dash" ,emacs-dash))) (native-inputs `(("emacs" ,emacs-minimal) + ("emacs-el-search" ,emacs-el-search) + ("emacs-stream" ,emacs-stream) ("texinfo" ,texinfo))) (build-system gnu-build-system) (arguments @@ -854,8 +850,7 @@ (define-public emacs-haskell-mode #:phases (modify-phases %standard-phases (delete 'configure) - (add-before - 'build 'pre-build + (add-before 'build 'pre-build (lambda* (#:key inputs #:allow-other-keys) (define (el-dir store-dir) (match (find-files store-dir "\\.el$") @@ -874,14 +869,17 @@ (define emacs-prefix? (cut string-prefix? "emacs-" <>)) (_ "")) inputs))) (substitute* (find-files "." "\\.el") (("/bin/sh") sh)) - ;; embed filename to fix test failure - (let ((file "tests/haskell-cabal-tests.el")) - (substitute* file - (("\\(buffer-file-name\\)") - (format #f "(or (buffer-file-name) ~s)" file)))) #t))) - (replace - 'install + (add-before 'check 'delete-failing-tests + ;; XXX: these tests require GHC executable, which would be a big + ;; native input. + (lambda _ + (with-directory-excursion "tests" + (for-each delete-file + '("haskell-customize-tests.el" + "inferior-haskell-tests.el"))) + #t)) + (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (el-dir (string-append out "/share/emacs/site-lisp")) @@ -898,9 +896,6 @@ (define (copy-to-dir dir files) (install-file "haskell-mode.info" info)) (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) (copy-to-dir el-dir (find-files "." "\\.elc?")) - ;; These are part of other packages. - (with-directory-excursion el-dir - (for-each delete-file '("dash.el" "ert.el"))) #t)))))) (home-page "https://github.com/haskell/haskell-mode") (synopsis "Haskell mode for Emacs") diff --git a/gnu/packages/patches/haskell-mode-make-check.patch b/gnu/packages/patches/haskell-mode-make-check.patch deleted file mode 100644 index a4d4d525f2..0000000000 --- a/gnu/packages/patches/haskell-mode-make-check.patch +++ /dev/null @@ -1,35 +0,0 @@ -Copied from upstream repository. -Hunk #2 is removed since it cannot be applied and it is not needed. - -From 7cead7137bf54851c1b7df5a3854351296d21276 Mon Sep 17 00:00:00 2001 -From: Vasantha Ganesh K -Date: Thu, 22 Jun 2017 23:38:40 +0530 -Subject: [PATCH] removed `check-conventions' from make - ---- - Makefile | 7 +- - tests/haskell-code-conventions.el | 165 ------------------------------ - 2 files changed, 1 insertion(+), 171 deletions(-) - delete mode 100644 tests/haskell-code-conventions.el - -diff --git a/Makefile b/Makefile -index b2c89d6..aa907c5 100644 ---- a/Makefile -+++ b/Makefile -@@ -79,12 +79,7 @@ build-$(EMACS_VERSION)/build-flag : build-$(EMACS_VERSION) $(patsubst %.el,build - check-%: tests/%-tests.el - $(BATCH) -l "$<" -f ert-run-tests-batch-and-exit; - --check: compile $(AUTOLOADS) check-ert check-conventions -- --check-conventions : -- $(BATCH) -l tests/haskell-code-conventions.el \ -- -f haskell-check-conventions-batch-and-exit -- @echo "conventions are okay" -+check: compile $(AUTOLOADS) check-ert - - check-ert: $(ELCHECKS) - $(BATCH) --eval "(when (= emacs-major-version 24) \ --- -2.18.0 - diff --git a/gnu/packages/patches/haskell-mode-unused-variables.patch b/gnu/packages/patches/haskell-mode-unused-variables.patch deleted file mode 100644 index b175fae28c..0000000000 --- a/gnu/packages/patches/haskell-mode-unused-variables.patch +++ /dev/null @@ -1,44 +0,0 @@ -Copied verbatim from upstream repository. - -From cee22450ee30e79952f594796721dc6b17798ee6 Mon Sep 17 00:00:00 2001 -From: Sascha Wilde -Date: Fri, 23 Sep 2016 15:35:59 +0200 -Subject: [PATCH] Removed unused lexical variables. - ---- - haskell-lexeme.el | 3 +-- - haskell-process.el | 4 +--- - 2 files changed, 2 insertions(+), 5 deletions(-) - -diff --git a/haskell-lexeme.el b/haskell-lexeme.el -index 4256a79..b832560 100644 ---- a/haskell-lexeme.el -+++ b/haskell-lexeme.el -@@ -138,8 +138,7 @@ When match is successful, match-data will contain: - (match-text 2) - whole qualified identifier - (match-text 3) - unqualified part of identifier - (match-text 4) - closing backtick" -- (let ((begin (point)) -- (match-data-old (match-data)) -+ (let ((match-data-old (match-data)) - first-backtick-start - last-backtick-start - qid-start -diff --git a/haskell-process.el b/haskell-process.el -index b4efba2..4f3f859 100644 ---- a/haskell-process.el -+++ b/haskell-process.el -@@ -160,9 +160,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." - (defun haskell-process-log (msg) - "Effective append MSG to the process log (if enabled)." - (when haskell-process-log -- (let* ((append-to (get-buffer-create "*haskell-process-log*")) -- (windows (get-buffer-window-list append-to t t)) -- move-point-in-windows) -+ (let* ((append-to (get-buffer-create "*haskell-process-log*"))) - (with-current-buffer append-to - ;; point should follow insertion so that it stays at the end - ;; of the buffer --- -2.18.0 - -- cgit v1.2.3 From c08a784c58bca8df048bc98276aa4fcf0d61d8b3 Mon Sep 17 00:00:00 2001 From: Steve Sprang Date: Fri, 5 Jun 2020 11:05:06 -0700 Subject: gnu: openscad: Add patch to fix build. * gnu/packages/patches/openscad-parser-boost-1.72.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/engineering.scm (openscad)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/engineering.scm | 4 +++- .../patches/openscad-parser-boost-1.72.patch | 26 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openscad-parser-boost-1.72.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5016d16d7a..92a2255893 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1326,6 +1326,7 @@ dist_patch_DATA = \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \ + %D%/packages/patches/openscad-parser-boost-1.72.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 2102f8d295..9d9c67b861 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2263,7 +2263,9 @@ (define-public openscad ".src.tar.gz")) (sha256 (base32 - "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha")))) + "0nbgk5q5pgnw53la0kccdcpz2f4xf6d6076rkn0q08z57hkc85ha")) + (patches (search-patches + "openscad-parser-boost-1.72.patch")))) (build-system cmake-build-system) (inputs `(("boost" ,boost) diff --git a/gnu/packages/patches/openscad-parser-boost-1.72.patch b/gnu/packages/patches/openscad-parser-boost-1.72.patch new file mode 100644 index 0000000000..35311e6173 --- /dev/null +++ b/gnu/packages/patches/openscad-parser-boost-1.72.patch @@ -0,0 +1,26 @@ +https://github.com/openscad/openscad/commit/b6c170cc5d.patch + +From b6c170cc5dd1bc677176ee732cdb0ddae57e5cf0 Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Fri, 25 Oct 2019 15:10:26 +0000 +Subject: [PATCH] Add missing header bootlegged by Boost < 1.72 + +src/parser.y:76:6: error: no template named 'stack' in namespace 'std' +std::stack scope_stack; +~~~~~^ +--- + src/parser.y | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/parser.y b/src/parser.y +index 7f4fd56ca7..4c77c989ea 100644 +--- a/src/parser.y ++++ b/src/parser.y +@@ -46,6 +46,7 @@ + #include "printutils.h" + #include "memory.h" + #include ++#include + #include + #include "boost-utils.h" + #include "feature.h" -- cgit v1.2.3 From 49b4a062f960b8299cd611e2fa6e922691405502 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 6 Jun 2020 16:07:14 +0200 Subject: gnu: emacs-zones: Update to 2019.7.13. * gnu/packages/emacs-xyz.scm (emacs-zones): Update to 2019.7.13. [source]: Use GNU ELPA repository instead of GitHub. Remove unnecessary patch. * gnu/packages/patches/emacs-zones-called-interactively.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Apply file deletion. --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 47 +++++++++------------- .../patches/emacs-zones-called-interactively.patch | 43 -------------------- 3 files changed, 20 insertions(+), 71 deletions(-) delete mode 100644 gnu/packages/patches/emacs-zones-called-interactively.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 92a2255893..ae8a2275f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -895,7 +895,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-telega-test-env.patch \ %D%/packages/patches/emacs-undohist-ignored.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ - %D%/packages/patches/emacs-zones-called-interactively.patch \ %D%/packages/patches/enjarify-setup-py.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ %D%/packages/patches/erlang-man-path.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9509bfd0b4..0871a14c64 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -9311,33 +9311,26 @@ (define-public emacs-alert (license license:gpl2+))) (define-public emacs-zones - (let ((commit "3169815c323966ff8e252b44e3558d6d045243fe") - (revision "2")) - (package - (name "emacs-zones") - (version (git-version "0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/emacsmirror/zones.git") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "039msns5596rz0my7fxpanpxwg1lkhpiibm9ppnlzaajx1hszbzl")) - (patches - (search-patches - "emacs-zones-called-interactively.patch")))) - (build-system emacs-build-system) - (home-page "https://www.emacswiki.org/emacs/Zones") - (synopsis "Define and act on multiple zones of buffer text") - (description "Library @file{zones.el} lets you easily define and -subsequently act on multiple zones of buffer text. You can think of this as -enlarging the notion of region. In effect, it can remove the requirement of -target text being a contiguous sequence of characters. A set of buffer zones -is, in effect, a (typically) noncontiguous set of text.") - (license license:gpl3+)))) + (package + (name "emacs-zones") + (version "2019.7.13") + (source + (origin + (method url-fetch) + (uri (string-append "https://elpa.gnu.org/packages/" + "zones-" version ".el")) + (sha256 + (base32 "0qp1ba2pkqx9d35g7z8hf8qs2k455krf2a92l4rka3ipsbnmq5k1")))) + (build-system emacs-build-system) + (home-page "https://www.emacswiki.org/emacs/Zones") + (synopsis "Define and act on multiple zones of buffer text") + (description + "Library @file{zones.el} lets you easily define and subsequently act on +multiple zones of buffer text. You can think of this as enlarging the notion +of region. In effect, it can remove the requirement of target text being +a contiguous sequence of characters. A set of buffer zones is, in effect, +a (typically) noncontiguous set of text.") + (license license:gpl3+))) (define-public emacs-mu4e-alert (package diff --git a/gnu/packages/patches/emacs-zones-called-interactively.patch b/gnu/packages/patches/emacs-zones-called-interactively.patch deleted file mode 100644 index eefcfdd12e..0000000000 --- a/gnu/packages/patches/emacs-zones-called-interactively.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 81603e53ebaae0f0b23c4c52c7dab83e808964ec Mon Sep 17 00:00:00 2001 -From: Brian Leung -Date: Sun, 17 Mar 2019 01:32:04 +0100 -Subject: [PATCH] This patch silences the byte-compiler. - ---- - zones.el | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/zones.el b/zones.el -index ca88d48..594ea36 100644 ---- a/zones.el -+++ b/zones.el -@@ -1075,7 +1075,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. - - This is a destructive operation. The list structure of the variable - value can be modified." -- (zz-narrow-advice (interactive-p))) -+ (zz-narrow-advice (called-interactively-p 'interactive))) - - (defadvice narrow-to-defun (after zz-add-zone--defun activate) - "Push the defun limits to the current `zz-izones-var'. -@@ -1083,7 +1083,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. - - This is a destructive operation. The list structure of the variable - value can be modified." -- (zz-narrow-advice (interactive-p))) -+ (zz-narrow-advice (called-interactively-p 'interactive))) - - ;; Call `zz-add-zone' if interactive or `zz-add-zone-anyway-p'. - ;; -@@ -1093,7 +1093,7 @@ You can use `C-x n x' to widen to a previous buffer restriction. - - This is a destructive operation. The list structure of the variable - value can be modified." -- (zz-narrow-advice (interactive-p))) -+ (zz-narrow-advice (called-interactively-p 'interactive))) - - ;;(@* "General Commands") - --- -2.22.0 - -- cgit v1.2.3