From 7c6bf660d8a455090f4c140c5b2849f1b58f2fe3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 16 Dec 2016 14:32:34 +0100 Subject: gnu: python-pyopenssl: Enable tests. * gnu/packages/patches/python-pyopenssl-skip-network-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python.scm (python-pyopenssl, python2-pyopenssl)[source]: Use it. [arguments]: Replace 'check' with custom phase. --- .../python-pyopenssl-skip-network-test.patch | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 gnu/packages/patches/python-pyopenssl-skip-network-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-pyopenssl-skip-network-test.patch b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch new file mode 100644 index 0000000000..a24eaf69a0 --- /dev/null +++ b/gnu/packages/patches/python-pyopenssl-skip-network-test.patch @@ -0,0 +1,50 @@ +This test tries connecting to an external server which is not supported +in the build environment. See discussion at: + +https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00650.html + +diff --git a/tests/test_ssl.py b/tests/test_ssl.py +index ee849fd..60048b8 100644 +--- a/tests/test_ssl.py ++++ b/tests/test_ssl.py +@@ -1180,40 +1180,6 @@ class ContextTests(TestCase, _LoopbackMixin): + TypeError, context.load_verify_locations, None, None, None + ) + +- @pytest.mark.skipif( +- platform == "win32", +- reason="set_default_verify_paths appears not to work on Windows. " +- "See LP#404343 and LP#404344." +- ) +- def test_set_default_verify_paths(self): +- """ +- :py:obj:`Context.set_default_verify_paths` causes the +- platform-specific CA certificate locations to be used for +- verification purposes. +- """ +- # Testing this requires a server with a certificate signed by one +- # of the CAs in the platform CA location. Getting one of those +- # costs money. Fortunately (or unfortunately, depending on your +- # perspective), it's easy to think of a public server on the +- # internet which has such a certificate. Connecting to the network +- # in a unit test is bad, but it's the only way I can think of to +- # really test this. -exarkun +- +- # Arg, verisign.com doesn't speak anything newer than TLS 1.0 +- context = Context(SSLv23_METHOD) +- context.set_default_verify_paths() +- context.set_verify( +- VERIFY_PEER, +- lambda conn, cert, errno, depth, preverify_ok: preverify_ok) +- +- client = socket() +- client.connect(("encrypted.google.com", 443)) +- clientSSL = Connection(context, client) +- clientSSL.set_connect_state() +- clientSSL.do_handshake() +- clientSSL.send(b"GET / HTTP/1.0\r\n\r\n") +- self.assertTrue(clientSSL.recv(1024)) +- + def test_set_default_verify_paths_signature(self): + """ + :py:obj:`Context.set_default_verify_paths` takes no arguments and -- cgit v1.2.3 From bb6043fe9f0198c1e253ae2a8adeea1337830265 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 14 Feb 2017 00:01:59 +0100 Subject: gnu: python-pygit2: Skip tests requiring network access. * gnu/packages/python.scm (python-pygit2, python2-pygit2)[source](patches): New field. * gnu/packages/patches/python-pygit2-disable-network-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../python-pygit2-disable-network-tests.patch | 64 ++++++++++++++++++++++ gnu/packages/python.scm | 4 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pygit2-disable-network-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 8615d12b08..0b9b5b1a1e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -861,6 +861,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ + %D%/packages/patches/python-pygit2-disable-network-tests.patch \ %D%/packages/patches/python-pyopenssl-skip-network-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ diff --git a/gnu/packages/patches/python-pygit2-disable-network-tests.patch b/gnu/packages/patches/python-pygit2-disable-network-tests.patch new file mode 100644 index 0000000000..e46d244807 --- /dev/null +++ b/gnu/packages/patches/python-pygit2-disable-network-tests.patch @@ -0,0 +1,64 @@ +Disable tests trying to look up remote servers. + +diff --git a/test/test_credentials.py b/test/test_credentials.py +index 92482d9..9a281e5 100644 +--- a/test/test_credentials.py ++++ b/test/test_credentials.py +@@ -68,39 +68,5 @@ class CredentialCreateTest(utils.NoRepoTestCase): + self.assertEqual((username, None, None, None), cred.credential_tuple) + + +-class CredentialCallback(utils.RepoTestCase): +- def test_callback(self): +- class MyCallbacks(pygit2.RemoteCallbacks): +- @staticmethod +- def credentials(url, username, allowed): +- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) +- raise Exception("I don't know the password") +- +- url = "https://github.com/github/github" +- remote = self.repo.create_remote("github", url) +- +- self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks())) +- +- def test_bad_cred_type(self): +- class MyCallbacks(pygit2.RemoteCallbacks): +- @staticmethod +- def credentials(url, username, allowed): +- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) +- return Keypair("git", "foo.pub", "foo", "sekkrit") +- +- url = "https://github.com/github/github" +- remote = self.repo.create_remote("github", url) +- self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks())) +- +-class CallableCredentialTest(utils.RepoTestCase): +- +- def test_user_pass(self): +- credentials = UserPass("libgit2", "libgit2") +- callbacks = pygit2.RemoteCallbacks(credentials=credentials) +- +- url = "https://bitbucket.org/libgit2/testgitrepository.git" +- remote = self.repo.create_remote("bb", url) +- remote.fetch(callbacks=callbacks) +- + if __name__ == '__main__': + unittest.main() +diff --git a/test/test_repository.py b/test/test_repository.py +index cfdf01e..c0d8de4 100644 +--- a/test/test_repository.py ++++ b/test/test_repository.py +@@ -538,13 +538,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase): + self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references()) + self.assertIsNotNone(repo.remotes["custom_remote"]) + +- def test_clone_with_credentials(self): +- repo = clone_repository( +- "https://bitbucket.org/libgit2/testgitrepository.git", +- self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2"))) +- +- self.assertFalse(repo.is_empty) +- + def test_clone_with_checkout_branch(self): + # create a test case which isolates the remote + test_repo = clone_repository('./test/data/testrepo.git', diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 13dc698341..c9cf347373 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3580,7 +3580,9 @@ association studies (GWAS) on extremely large data sets.") (uri (pypi-uri "pygit2" version)) (sha256 (base32 - "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny")))) + "0wf5rp0fvrw7j3j18dvwjq6xqlbm611wd55aphrfpps0v1gxh3ny")) + (patches + (search-patches "python-pygit2-disable-network-tests.patch")))) (build-system python-build-system) (propagated-inputs `(("python-six" ,python-six) -- cgit v1.2.3 From a1e3ed6e8b57c1920d01e357fb2a8e545d4acc33 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sat, 18 Feb 2017 16:43:37 +0100 Subject: gnu: python-pbr: Support python-sphinx>=1.2.1. * gnu/packages/patches/python-pbr-fix-man-page-support.patch: New file. * gnu/packages/python.scm (python-pbr-minimal): Use the new patch file. --- .../patches/python-pbr-fix-man-page-support.patch | 28 ++++++++++++++++++++++ gnu/packages/python.scm | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pbr-fix-man-page-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-pbr-fix-man-page-support.patch b/gnu/packages/patches/python-pbr-fix-man-page-support.patch new file mode 100644 index 0000000000..b9036f5b01 --- /dev/null +++ b/gnu/packages/patches/python-pbr-fix-man-page-support.patch @@ -0,0 +1,28 @@ +See: https://bugs.launchpad.net/oslosphinx/+bug/1661861 +diff -ur orig/pbr-1.10.0/pbr/builddoc.py pbr-1.10.0/pbr/builddoc.py +--- orig/pbr-1.10.0/pbr/builddoc.py 2016-05-23 21:38:18.000000000 +0200 ++++ pbr-1.10.0/pbr/builddoc.py 2017-02-18 14:01:37.424434317 +0100 +@@ -138,7 +138,8 @@ + sphinx_config.init_values(warnings.warn) + else: + sphinx_config.init_values() +- if self.builder == 'man' and len(sphinx_config.man_pages) == 0: ++ if self.builder == 'man' and len( ++ getattr(sphinx_config, 'man_pages', '')) == 0: + return + app = application.Sphinx( + self.source_dir, self.config_dir, +diff -ur orig/pbr-1.10.0/pbr/util.py pbr-1.10.0/pbr/util.py +--- orig/pbr-1.10.0/pbr/util.py 2016-05-23 21:38:18.000000000 +0200 ++++ pbr-1.10.0/pbr/util.py 2017-02-18 15:36:32.951196795 +0100 +@@ -211,7 +211,9 @@ + parser.read(path) + config = {} + for section in parser.sections(): +- config[section] = dict(parser.items(section)) ++ config[section] = dict() ++ for k, value in parser.items(section): ++ config[section][k.replace('-', '_')] = value + + # Run setup_hooks, if configured + setup_hooks = has_get_option(config, 'global', 'setup_hooks') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 5bcdc6d0c7..93e18b2fb9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2130,7 +2130,8 @@ protocol.") (uri (pypi-uri "pbr" version)) (sha256 (base32 - "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q")))) + "177kd9kbv1hvf2ban7l3x9ymzbi1md4hkaymwbgnz7ihf312hr0q")) + (patches (search-patches "python-pbr-fix-man-page-support.patch")))) (build-system python-build-system) (arguments `(#:tests? #f)) -- cgit v1.2.3 From 1c851cbe0c562894bd38c0f9f39d12be306b3e59 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 23 Feb 2017 14:35:00 -0500 Subject: gnu: shadow: Fix CVE-2017-2616. * gnu/packages/patches/shadow-CVE-2017-2616.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (shadow): Use it. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 3 +- gnu/packages/patches/shadow-CVE-2017-2616.patch | 72 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/shadow-CVE-2017-2616.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ca415ec48f..2954549759 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -901,6 +901,7 @@ dist_patch_DATA = \ %D%/packages/patches/serf-comment-style-fix.patch \ %D%/packages/patches/serf-deflate-buckets-test-fix.patch \ %D%/packages/patches/shadow-4.4-su-snprintf-fix.patch \ + %D%/packages/patches/shadow-CVE-2017-2616.patch \ %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ %D%/packages/patches/slim-sigusr1.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index b2207a1205..d9c7ba3b73 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -276,7 +276,8 @@ client and server, a telnet client and server, and an rsh client and server.") (uri (string-append "https://github.com/shadow-maint/shadow/releases/" "download/" version "/shadow-" version ".tar.xz")) - (patches (search-patches "shadow-4.4-su-snprintf-fix.patch")) + (patches (search-patches "shadow-4.4-su-snprintf-fix.patch" + "shadow-CVE-2017-2616.patch")) (sha256 (base32 "0g7hf55ar2pafg5g3ldx0fwzjk36wf4xb21p4ndanbjm3c2a9ab1")))) diff --git a/gnu/packages/patches/shadow-CVE-2017-2616.patch b/gnu/packages/patches/shadow-CVE-2017-2616.patch new file mode 100644 index 0000000000..f88aac40bc --- /dev/null +++ b/gnu/packages/patches/shadow-CVE-2017-2616.patch @@ -0,0 +1,72 @@ +Fix CVE-2017-2616: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-2616 +http://seclists.org/oss-sec/2017/q1/490 +http://seclists.org/oss-sec/2017/q1/474 + +Patch copied from upstream source repository: + +https://github.com/shadow-maint/shadow/commit/08fd4b69e84364677a10e519ccb25b71710ee686 + +From 08fd4b69e84364677a10e519ccb25b71710ee686 Mon Sep 17 00:00:00 2001 +From: Tobias Stoeckmann +Date: Thu, 23 Feb 2017 09:47:29 -0600 +Subject: [PATCH] su: properly clear child PID + +If su is compiled with PAM support, it is possible for any local user +to send SIGKILL to other processes with root privileges. There are +only two conditions. First, the user must be able to perform su with +a successful login. This does NOT have to be the root user, even using +su with the same id is enough, e.g. "su $(whoami)". Second, SIGKILL +can only be sent to processes which were executed after the su process. +It is not possible to send SIGKILL to processes which were already +running. I consider this as a security vulnerability, because I was +able to write a proof of concept which unlocked a screen saver of +another user this way. +--- + src/su.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/src/su.c b/src/su.c +index f20d230..d86aa86 100644 +--- a/src/su.c ++++ b/src/su.c +@@ -379,11 +379,13 @@ static void prepare_pam_close_session (void) + /* wake child when resumed */ + kill (pid, SIGCONT); + stop = false; ++ } else { ++ pid_child = 0; + } + } while (!stop); + } + +- if (0 != caught) { ++ if (0 != caught && 0 != pid_child) { + (void) fputs ("\n", stderr); + (void) fputs (_("Session terminated, terminating shell..."), + stderr); +@@ -393,9 +395,22 @@ static void prepare_pam_close_session (void) + snprintf (wait_msg, sizeof wait_msg, _(" ...waiting for child to terminate.\n")); + + (void) signal (SIGALRM, kill_child); ++ (void) signal (SIGCHLD, catch_signals); + (void) alarm (2); + +- (void) wait (&status); ++ sigemptyset (&ourset); ++ if ((sigaddset (&ourset, SIGALRM) != 0) ++ || (sigprocmask (SIG_BLOCK, &ourset, NULL) != 0)) { ++ fprintf (stderr, _("%s: signal masking malfunction\n"), Prog); ++ kill_child (0); ++ } else { ++ while (0 == waitpid (pid_child, &status, WNOHANG)) { ++ sigsuspend (&ourset); ++ } ++ pid_child = 0; ++ (void) sigprocmask (SIG_UNBLOCK, &ourset, NULL); ++ } ++ + (void) fputs (_(" ...terminated.\n"), stderr); + } + -- cgit v1.2.3 From 1d311009fe34a7b22814cc6a3386375ff9142d51 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 23 Feb 2017 14:49:47 -0500 Subject: gnu: util-linux: Fix CVE-2017-2616. * gnu/packages/patches/util-linux-CVE-2017-2616.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/linux.scm (util-linux)[replacement]: New field. (util-linux/fixed): New variable. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 12 ++++ .../patches/util-linux-CVE-2017-2616.patch | 65 ++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 gnu/packages/patches/util-linux-CVE-2017-2616.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 2954549759..515b154b9a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -953,6 +953,7 @@ dist_patch_DATA = \ %D%/packages/patches/unzip-overflow-long-fsize.patch \ %D%/packages/patches/unzip-remove-build-date.patch \ %D%/packages/patches/util-linux-tests.patch \ + %D%/packages/patches/util-linux-CVE-2017-2616.patch \ %D%/packages/patches/upower-builddir.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/vdirsyncer-test-suite-slow-machines.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a6c564b275..304c9f0512 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -495,6 +495,7 @@ providing the system administrator with some help in common tasks.") (define-public util-linux (package (name "util-linux") + (replacement util-linux/fixed) (version "2.28.1") (source (origin (method url-fetch) @@ -575,6 +576,17 @@ block devices, UUIDs, TTYs, and many other tools.") (license (list license:gpl3+ license:gpl2+ license:gpl2 license:lgpl2.0+ license:bsd-4 license:public-domain)))) +(define util-linux/fixed + (package + (inherit util-linux) + (source + (origin + (inherit (package-source util-linux)) + (patches + (append + (origin-patches (package-source util-linux)) + (search-patches "util-linux-CVE-2017-2616.patch"))))))) + (define-public procps (package (name "procps") diff --git a/gnu/packages/patches/util-linux-CVE-2017-2616.patch b/gnu/packages/patches/util-linux-CVE-2017-2616.patch new file mode 100644 index 0000000000..2c82fb06d2 --- /dev/null +++ b/gnu/packages/patches/util-linux-CVE-2017-2616.patch @@ -0,0 +1,65 @@ +Fix CVE-2017-2616: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-2616 +http://seclists.org/oss-sec/2017/q1/474 + +Patch copied from upstream source repository: + +https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=dffab154d29a288aa171ff50263ecc8f2e14a891 + +From b018571132cb8c9fece3d75ed240cc74cdb5f0f7 Mon Sep 17 00:00:00 2001 +From: Karel Zak +Date: Wed, 1 Feb 2017 11:58:09 +0100 +Subject: [PATCH] su: properly clear child PID +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reported-by: Tobias Stöckmann +Signed-off-by: Karel Zak +--- + login-utils/su-common.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/login-utils/su-common.c b/login-utils/su-common.c +index 0ea4e40bd..b1720f037 100644 +--- a/login-utils/su-common.c ++++ b/login-utils/su-common.c +@@ -376,6 +376,9 @@ create_watching_parent (void) + } + else + status = WEXITSTATUS (status); ++ ++ /* child is gone, don't use the PID anymore */ ++ child = (pid_t) -1; + } + else if (caught_signal) + status = caught_signal + 128; +@@ -385,7 +388,7 @@ create_watching_parent (void) + else + status = 1; + +- if (caught_signal) ++ if (caught_signal && child != (pid_t)-1) + { + fprintf (stderr, _("\nSession terminated, killing shell...")); + kill (child, SIGTERM); +@@ -395,9 +398,12 @@ create_watching_parent (void) + + if (caught_signal) + { +- sleep (2); +- kill (child, SIGKILL); +- fprintf (stderr, _(" ...killed.\n")); ++ if (child != (pid_t)-1) ++ { ++ sleep (2); ++ kill (child, SIGKILL); ++ fprintf (stderr, _(" ...killed.\n")); ++ } + + /* Let's terminate itself with the received signal. + * +-- +2.11.1 + -- cgit v1.2.3 From 42945fb58c4652943a036c99f9bcc59fab61909b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Feb 2017 18:24:06 +0100 Subject: gnu: python-fake-factory: Fix build on 32bit. * gnu/packages/patches/python-fake-factory-fix-build-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python.scm (python-fake-factory, python2-fake-factory)[source]: Use it. --- gnu/local.mk | 1 + .../python-fake-factory-fix-build-32bit.patch | 36 ++++++++++++++++++++++ gnu/packages/python.scm | 5 ++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-fake-factory-fix-build-32bit.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0b9b5b1a1e..63eb56cc51 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -859,6 +859,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ + %D%/packages/patches/python-fake-factory-fix-build-32bit.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pygit2-disable-network-tests.patch \ diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch new file mode 100644 index 0000000000..cb60896fad --- /dev/null +++ b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch @@ -0,0 +1,36 @@ +These tests fail on 32-bit due to an overflow. + +Upstream bug URL: https://github.com/joke2k/faker/issues/408 + +diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py +index 6026772..58b6b83 100644 +--- a/faker/tests/__init__.py ++++ b/faker/tests/__init__.py +@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase): + provider = Provider + # test century + self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) +- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) + # test decade + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) +@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase): + + # ensure all methods provide timezone aware datetimes + with self.assertRaises(TypeError): +- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now() +- with self.assertRaises(TypeError): + provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now() + with self.assertRaises(TypeError): + provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now() +@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase): + + # test century + self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) +- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) + # test decade + self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) + self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) +-- +2.11.1 + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8353ca178f..e26e442e58 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11228,7 +11228,10 @@ parsing UK postcodes.") (uri (pypi-uri "fake-factory" version)) (sha256 (base32 - "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g")))) + "0vs0dkmg0dlaxf8w6q2i3k0i03gmp56ablldv7ci9x3nbadkn71g")) + (patches + (search-patches + "python-fake-factory-fix-build-32bit.patch")))) (build-system python-build-system) (arguments '(#:phases -- cgit v1.2.3 From 1885bb0c08e943a2e0e37c5c0a83473c8af904d0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 21 Feb 2017 18:28:21 +0100 Subject: gnu: python-dendropy: Fix failing tests. * gnu/packages/patches/python-dendropy-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/bioinformatics.scm (python-dendropy)[source]: Add patch. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 3 +- .../patches/python-dendropy-fix-tests.patch | 41 ++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-dendropy-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 63eb56cc51..899dc06b8e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -853,6 +853,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3.4-fix-tests.patch \ %D%/packages/patches/python-3.5-fix-tests.patch \ + %D%/packages/patches/python-dendropy-fix-tests.patch \ %D%/packages/patches/python-file-double-encoding-bug.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-parse-too-many-fields.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 5a1738b936..de6186de27 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1981,7 +1981,8 @@ accessing bigWig files.") (uri (pypi-uri "DendroPy" version)) (sha256 (base32 - "15c7s3d5gf19ljsxvq5advaa752wfi7pwrdjyhzmg85hccyvp47p")))) + "15c7s3d5gf19ljsxvq5advaa752wfi7pwrdjyhzmg85hccyvp47p")) + (patches (search-patches "python-dendropy-fix-tests.patch")))) (build-system python-build-system) (home-page "http://packages.python.org/DendroPy/") (synopsis "Library for phylogenetics and phylogenetic computing") diff --git a/gnu/packages/patches/python-dendropy-fix-tests.patch b/gnu/packages/patches/python-dendropy-fix-tests.patch new file mode 100644 index 0000000000..30ab618ff1 --- /dev/null +++ b/gnu/packages/patches/python-dendropy-fix-tests.patch @@ -0,0 +1,41 @@ +This patch fixes two test failures. It was downloaded from: +https://github.com/jeetsukumaran/DendroPy/commit/93f984bba7a6c588a28ca87f4e557ce283809453 + +From 93f984bba7a6c588a28ca87f4e557ce283809453 Mon Sep 17 00:00:00 2001 +From: jeetsukumaran +Date: Tue, 21 Feb 2017 16:41:01 -0500 +Subject: [PATCH] Update to Python 3 container and iteration semantics + +--- + dendropy/dataio/newickreader.py | 3 ++- + dendropy/datamodel/treemodel.py | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/dendropy/dataio/newickreader.py b/dendropy/dataio/newickreader.py +index 6dcf3c5..f978729 100644 +--- a/dendropy/dataio/newickreader.py ++++ b/dendropy/dataio/newickreader.py +@@ -303,7 +303,8 @@ def tree_iter(self, + taxon_symbol_map_fn=taxon_symbol_mapper.require_taxon_for_symbol) + yield tree + if tree is None: +- raise StopIteration ++ # raise StopIteration ++ return + + def _read(self, + stream, +diff --git a/dendropy/datamodel/treemodel.py b/dendropy/datamodel/treemodel.py +index 0ecfe31..73146f0 100644 +--- a/dendropy/datamodel/treemodel.py ++++ b/dendropy/datamodel/treemodel.py +@@ -772,6 +772,9 @@ def __hash__(self): + def __eq__(self, other): + return self is other + ++ def __lt__(self, other): ++ return id(self) < id(other) ++ + ########################################################################### + ### Basic Structure + -- cgit v1.2.3 From ffa771d2b4c069c1fcf6d226d330ce1f514d7a49 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 26 Feb 2017 11:48:20 -0500 Subject: gnu: vim: Use upstream fix for CVE-2017-5953. * gnu/packages/patches/vim-CVE-2017-5953.patch: Adjust to match upstream changes. --- gnu/packages/patches/vim-CVE-2017-5953.patch | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/vim-CVE-2017-5953.patch b/gnu/packages/patches/vim-CVE-2017-5953.patch index 7b66f1bf16..070f98c2cb 100644 --- a/gnu/packages/patches/vim-CVE-2017-5953.patch +++ b/gnu/packages/patches/vim-CVE-2017-5953.patch @@ -3,20 +3,28 @@ Fix CVE-2017-5953: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5953 https://groups.google.com/forum/#!topic/vim_dev/t-3RSdEnrHY -Patch adapted from upstream commit, correcting the transcription error -in the bounds check: +This change is adapted from the upstream source repository: -https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d +https://github.com/vim/vim/commit/6d3c8586fc81b022e9f06c611b9926108fb878c7 diff --git a/src/spellfile.c b/src/spellfile.c -index c7d87c6..8b1a3a6 100644 +index c7d87c6..00ef019 100644 --- a/src/spellfile.c +++ b/src/spellfile.c +@@ -1585,7 +1585,7 @@ spell_read_tree( + int prefixtree, /* TRUE for the prefix tree */ + int prefixcnt) /* when "prefixtree" is TRUE: prefix count */ + { +- int len; ++ long len; + int idx; + char_u *bp; + idx_T *ip; @@ -1595,6 +1595,9 @@ spell_read_tree( len = get4c(fd); if (len < 0) return SP_TRUNCERROR; -+ if (len >= 0x3fffffff) ++ if (len >= LONG_MAX / (long)sizeof(int)) + /* Invalid length, multiply with sizeof(int) would overflow. */ + return SP_FORMERROR; if (len > 0) -- cgit v1.2.3 From b01a89854ba1bd22b94c2373662bc07d035be2c1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 26 Feb 2017 21:19:39 +0100 Subject: gnu: Remove unused patch. This is a followup to 6f9d5b2e8c861c3a1243937a26400f8394946346. * gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../patches/libssh-0.6.5-CVE-2016-0739.patch | 77 ---------------------- 2 files changed, 78 deletions(-) delete mode 100644 gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 515b154b9a..0538601734 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -692,7 +692,6 @@ dist_patch_DATA = \ %D%/packages/patches/libmad-frame-length.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \ %D%/packages/patches/libpng-CVE-2016-10087.patch \ - %D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch \ %D%/packages/patches/libtar-CVE-2013-4420.patch \ %D%/packages/patches/libtheora-config-guess.patch \ %D%/packages/patches/libtiff-CVE-2016-10092.patch \ diff --git a/gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch b/gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch deleted file mode 100644 index a5fdd7ffff..0000000000 --- a/gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch +++ /dev/null @@ -1,77 +0,0 @@ -Fix CVE-2016-0739 (Weak Diffie-Hellman secret generation in -dh_generate_x() and dh_generate_y()). - -"Due to a byte/bit confusion, the DH secret was too short. This file was -completely reworked and will be commited in a future version." -Source: -https://git.libssh.org/projects/libssh.git/commit/?id=f8d0026c65fc8a55748ae481758e2cf376c26c86 - -This patch was created by upstream for libssh-0.7.3, but applied without -modification to libssh-0.6.3 by Debian. In Guix, we apply it without -modification to libssh-0.6.5. - -References: -https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2016-0739 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-0739 -https://security-tracker.debian.org/tracker/CVE-2016-0739 - ---- - src/dh.c | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/src/dh.c b/src/dh.c -index e489a1d..d27b66e 100644 ---- a/src/dh.c -+++ b/src/dh.c -@@ -227,15 +227,21 @@ void ssh_crypto_finalize(void) { - } - - int dh_generate_x(ssh_session session) { -+ int keysize; -+ if (session->next_crypto->kex_type == SSH_KEX_DH_GROUP1_SHA1) { -+ keysize = 1023; -+ } else { -+ keysize = 2047; -+ } - session->next_crypto->x = bignum_new(); - if (session->next_crypto->x == NULL) { - return -1; - } - - #ifdef HAVE_LIBGCRYPT -- bignum_rand(session->next_crypto->x, 128); -+ bignum_rand(session->next_crypto->x, keysize); - #elif defined HAVE_LIBCRYPTO -- bignum_rand(session->next_crypto->x, 128, 0, -1); -+ bignum_rand(session->next_crypto->x, keysize, -1, 0); - #endif - - /* not harder than this */ -@@ -248,15 +254,21 @@ int dh_generate_x(ssh_session session) { - - /* used by server */ - int dh_generate_y(ssh_session session) { -- session->next_crypto->y = bignum_new(); -+ int keysize; -+ if (session->next_crypto->kex_type == SSH_KEX_DH_GROUP1_SHA1) { -+ keysize = 1023; -+ } else { -+ keysize = 2047; -+ } -+ session->next_crypto->y = bignum_new(); - if (session->next_crypto->y == NULL) { - return -1; - } - - #ifdef HAVE_LIBGCRYPT -- bignum_rand(session->next_crypto->y, 128); -+ bignum_rand(session->next_crypto->y, keysize); - #elif defined HAVE_LIBCRYPTO -- bignum_rand(session->next_crypto->y, 128, 0, -1); -+ bignum_rand(session->next_crypto->y, keysize, -1, 0); - #endif - - /* not harder than this */ --- -cgit v0.12 - -- cgit v1.2.3 From 1d8e7273578e95f6b5e4293ac34c4f6fe5d5c579 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 26 Feb 2017 19:46:48 -0500 Subject: gnu: gst-plugins-base: Update to 1.10.4. * gnu/packages/gstreamer.scm (gst-plugins-base): Update to 1.10.4. [source]: Remove obsolete patch 'gst-plugins-base-fix-test-on-32bit.patch' * gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gstreamer.scm | 10 ++++--- .../gst-plugins-base-fix-test-on-32bit.patch | 32 ---------------------- 3 files changed, 6 insertions(+), 37 deletions(-) delete mode 100644 gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0538601734..b408cc29d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -605,7 +605,6 @@ dist_patch_DATA = \ %D%/packages/patches/grub-gets-undeclared.patch \ %D%/packages/patches/grub-freetype.patch \ %D%/packages/patches/gsl-test-i686.patch \ - %D%/packages/patches/gst-plugins-base-fix-test-on-32bit.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-arm-fixes.patch \ %D%/packages/patches/guile-default-utf8.patch \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index d81aad6f88..025f665782 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -146,7 +146,7 @@ This package provides the core library and elements.") (define-public gst-plugins-base (package (name "gst-plugins-base") - (version "1.10.3") + (version "1.10.4") (source (origin (method url-fetch) @@ -154,9 +154,11 @@ This package provides the core library and elements.") name "-" version ".tar.xz")) (sha256 (base32 - "040pifl4cgsqqz2si4s1y5khj3zwm39w21siagxwp805swbrcag6")) - (patches - (search-patches "gst-plugins-base-fix-test-on-32bit.patch")))) + "1dsyjf6rncsbg4rfj40cvf1wwpjj9h3j3c7bh4zp7jylnfv4blpn")) +; (patches +; (search-patches "gst-plugins-base-fix-test-on-32bit.patch")) + + )) (build-system gnu-build-system) (outputs '("out" "doc")) (propagated-inputs diff --git a/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch b/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch deleted file mode 100644 index 4c6c7ed06e..0000000000 --- a/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch +++ /dev/null @@ -1,32 +0,0 @@ -This fixes a test failure on i686. - -Patch copied from upstream source repository: - -https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=5e2e111627871c566ffc6607eda8f4ef4699d040 - -From 5e2e111627871c566ffc6607eda8f4ef4699d040 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= -Date: Thu, 2 Feb 2017 14:56:39 +0200 -Subject: [PATCH] multifdsink: Make sure to use a 64 bit integer for the - units-max property - ---- - tests/check/elements/multifdsink.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/check/elements/multifdsink.c b/tests/check/elements/multifdsink.c -index af138cc92..951b1b9fa 100644 ---- a/tests/check/elements/multifdsink.c -+++ b/tests/check/elements/multifdsink.c -@@ -869,7 +869,7 @@ GST_START_TEST (test_client_kick) - gint i, initial_buffers = 3, num_buffers = 0; - - sink = setup_multifdsink (); -- g_object_set (sink, "units-max", initial_buffers, NULL); -+ g_object_set (sink, "units-max", (gint64) initial_buffers, NULL); - - fail_if (pipe (pfd1) == -1); - fail_if (pipe (pfd2) == -1); --- -2.11.0 - -- cgit v1.2.3 From 13e4a6c8636779e26de52c796ea75832c71826a2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 28 Feb 2017 20:34:09 +0200 Subject: gnu: screen: Update to 4.5.1. * gnu/packages/screen.scm (screen): Update to 4.5.1. [source]: Remove patch. * gnu/packages/patches/screen-CVE-2017-5618.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/screen-CVE-2017-5618.patch | 40 ------------------------- gnu/packages/screen.scm | 6 ++-- 3 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 gnu/packages/patches/screen-CVE-2017-5618.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b408cc29d9..f356a124b3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -893,7 +893,6 @@ dist_patch_DATA = \ %D%/packages/patches/sed-hurd-path-max.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ - %D%/packages/patches/screen-CVE-2017-5618.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/serf-comment-style-fix.patch \ diff --git a/gnu/packages/patches/screen-CVE-2017-5618.patch b/gnu/packages/patches/screen-CVE-2017-5618.patch deleted file mode 100644 index 1b95e428c8..0000000000 --- a/gnu/packages/patches/screen-CVE-2017-5618.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fixes CVE-2017-5618 (privilege escalation via opening the logfile when -screen is installed setuid root): - -https://savannah.gnu.org/bugs/?50142 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5618 - -This patch reverts the upstream commit that introduced the bug: - -https://git.savannah.gnu.org/cgit/screen.git/commit/?id=5460f5d28c01a9a58e021eb1dffef2965e629d58 - -From f55b0cc29a0ac2a1c54e8a5e886b7393edd4a76c Mon Sep 17 00:00:00 2001 -From: Leo Famulari -Date: Sat, 11 Feb 2017 22:40:24 -0500 -Subject: [PATCH] Revert "adding permissions check for the logfile name" - -This reverts commit 5460f5d28c01a9a58e021eb1dffef2965e629d58. ---- - src/screen.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/src/screen.c b/src/screen.c -index 64650e9..283c305 100644 ---- a/src/screen.c -+++ b/src/screen.c -@@ -673,12 +673,6 @@ int main(int ac, char** av) - Panic(0, "-L: logfile name can not start with \"-\" symbol"); - if (strlen(screenlogfile) > PATH_MAX) - Panic(0, "-L: logfile name too long. (max. %d char)", PATH_MAX); -- -- FILE *w_check; -- if ((w_check = fopen(screenlogfile, "w")) == NULL) -- Panic(0, "-L: logfile name access problem"); -- else -- fclose(w_check); - } - nwin_options.Lflag = 1; - break; --- -2.11.1 - diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index 57e6cb595e..f5c914e88a 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm @@ -35,15 +35,13 @@ (define-public screen (package (name "screen") - (version "4.5.0") + (version "4.5.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/screen/screen-" version ".tar.gz")) - (patches (search-patches "screen-CVE-2017-5618.patch")) - (patch-flags '("-p2")) (sha256 - (base32 "1c7grw03a9iwvqbxfd6hmjb681rp8gb55zsxm7b3apqqcb1sghq1")))) + (base32 "0bbv16gpxrh64sn4bvjy3qjy7jsxjlqlilyysin02fwnvla23nwp")))) (build-system gnu-build-system) (native-inputs `(("makeinfo" ,texinfo))) -- cgit v1.2.3 From d8bcf080883ac72457bf099a936dc7b87b1ed421 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 1 Mar 2017 22:32:02 -0500 Subject: gnu: vdirsyncer: Update to 0.15.0. * gnu/packages/dav.scm (vdirsyncer): Update to 0.15.0. [source]: Remove obsolete patch 'vdirsyncer-test-suite-slow-machines.patch'. * gnu/packages/patches/vdirsyncer-test-suite-slow-machines.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/dav.scm | 6 ++-- .../vdirsyncer-test-suite-slow-machines.patch | 42 ---------------------- 3 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 gnu/packages/patches/vdirsyncer-test-suite-slow-machines.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f356a124b3..406e0dc963 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -953,7 +953,6 @@ dist_patch_DATA = \ %D%/packages/patches/util-linux-CVE-2017-2616.patch \ %D%/packages/patches/upower-builddir.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ - %D%/packages/patches/vdirsyncer-test-suite-slow-machines.patch \ %D%/packages/patches/vim-CVE-2017-5953.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \ diff --git a/gnu/packages/dav.scm b/gnu/packages/dav.scm index 546597c617..7901e1c1d8 100644 --- a/gnu/packages/dav.scm +++ b/gnu/packages/dav.scm @@ -55,15 +55,13 @@ clients.") (define-public vdirsyncer (package (name "vdirsyncer") - (version "0.14.1") + (version "0.15.0") (source (origin (method url-fetch) (uri (pypi-uri name version)) - (patches - (search-patches "vdirsyncer-test-suite-slow-machines.patch")) (sha256 (base32 - "044f01fjd8dpz4y9dm3qcc1a8cihcxxbr1sz6y6fkvglpb6k85y5")))) + "08aa5yxcj7ziz2r0hz4p554q8hgpfl2bh8r6r85f4g24mg6arxsj")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/patches/vdirsyncer-test-suite-slow-machines.patch b/gnu/packages/patches/vdirsyncer-test-suite-slow-machines.patch deleted file mode 100644 index 03093e8330..0000000000 --- a/gnu/packages/patches/vdirsyncer-test-suite-slow-machines.patch +++ /dev/null @@ -1,42 +0,0 @@ -Fix test failures caused by some build machines running more slowly than -expected, which manifest like this: - ------- -> raise FailedHealthCheck(message) -E hypothesis.errors.FailedHealthCheck: Data generation is extremely slow: Only produced 4 valid examples in 1.08 seconds (1 invalid ones and 0 exceeded maximum size). Try decreasing size of the data you're generating (with e.g.average_size or max_leaves parameters). -E See http://hypothesis.readthedocs.org/en/latest/healthchecks.html for more information about this. If you want to disable just this health check, add HealthCheck.too_slowto the suppress_health_check settings for this test. - -/gnu/store/b8d1r8bilvm3jkncgrpvmg3dni9cgcr1-python-hypothesis-3.1.0/lib/python3.5/site-packages/hypothesis/core.py:296: FailedHealthCheck ------- - -Patch copied from upstream source repository: - -https://github.com/pimutils/vdirsyncer/commit/10490a12f13f03495e0945eb9d45d7aed9ab0a6c - -From 10490a12f13f03495e0945eb9d45d7aed9ab0a6c Mon Sep 17 00:00:00 2001 -From: Markus Unterwaditzer -Date: Sat, 18 Feb 2017 15:45:06 +0100 -Subject: [PATCH] Unconditionally disable HealthCheck.too_slow - ---- - tests/conftest.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/tests/conftest.py b/tests/conftest.py -index e0a07d5..3afd7cd 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -26,10 +26,12 @@ def benchmark(): - else: - del pytest_benchmark - -+ -+settings.suppress_health_check = [HealthCheck.too_slow] -+ - settings.register_profile("ci", settings( - max_examples=1000, - verbosity=Verbosity.verbose, -- suppress_health_check=[HealthCheck.too_slow] - )) - settings.register_profile("deterministic", settings( - derandomize=True, -- cgit v1.2.3 From 479c4273e6ae899f16da2ebcb36e11baca1af9c8 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 26 Feb 2017 20:28:48 +0100 Subject: gnu: Add jacal. * gnu/packages/maths.scm (jacal): New variable. * gnu/packages/patches/jacal-fix-texinfo.patch: New file. --- gnu/packages/maths.scm | 52 ++++++++++++++++ gnu/packages/patches/jacal-fix-texinfo.patch | 92 ++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 gnu/packages/patches/jacal-fix-texinfo.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 913a403dab..9533f5f0a8 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -83,6 +83,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages tbb) + #:use-module (gnu packages scheme) #:use-module (gnu packages shells) #:use-module (gnu packages tcl) #:use-module (gnu packages texinfo) @@ -2958,3 +2959,54 @@ algorithm for LCS. It is a fast program to compute the approximate Longest Commons Subsequence of a set of strings.") (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") (license license:gpl3+)))) + +(define-public jacal + (package + (name "jacal") + (version "1c4") + (source (origin + (method url-fetch) + (uri (string-append + "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-" + version ".zip")) + (sha256 (base32 + "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q")) + (patches (search-patches "jacal-fix-texinfo.patch")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'pre-build + ;; Don't use upstream's script - it really doesn't fit into + ;; Guix's functional paradigm. + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile" + (("^install: install-script") "install: ")))) + (add-after 'install 'post-install + ;; Instead, we provide our own simplified script. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((wrapper (string-append (assoc-ref outputs "out") + "/bin/jacal"))) + (format (open wrapper (logior O_WRONLY O_CREAT)) + (string-append "#!~a\nexec ~a/bin/scm -ip1 " + "-e '(slib:load \"~a/lib/jacal/math\") " + "(math)' \"$@\"\n") + (which "bash") + (assoc-ref inputs "scm") + (assoc-ref outputs "out")) + (chmod wrapper #o555)))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (zero? (system* "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out"))))))))) + (inputs `(("scm" ,scm))) + (native-inputs `(("unzip" ,unzip) + ("texinfo" ,texinfo))) + (synopsis "Symbolic mathematics system") + (description "GNU JACAL is an interactive symbolic mathematics program based on +Scheme. It manipulate and simplify a range of mathematical expressions such +as equations, scalars, vectors, and matrices.") + (home-page "http://www.gnu.org/software/jacal") + (license license:gpl3+))) + diff --git a/gnu/packages/patches/jacal-fix-texinfo.patch b/gnu/packages/patches/jacal-fix-texinfo.patch new file mode 100644 index 0000000000..83e44a3164 --- /dev/null +++ b/gnu/packages/patches/jacal-fix-texinfo.patch @@ -0,0 +1,92 @@ +Fix the broken Texinfo in the Jacal package documentation + +--- jacal/jacal.texi,orig 2017-02-23 20:35:55.303980444 +0100 ++++ jacal/jacal.texi 2017-02-23 20:53:14.539024674 +0100 +@@ -343,7 +343,7 @@ + + With the standard input grammar, the precedence of @samp{-} as a prefix + behaves strangely. @code{a^-b*c} becomes @code{a^(-b*c)} while +-@code{@result{a^b*c} (a^b)*c}. ++@code{a^b*c @result{} (a^b)*c}. + + Using @code{divide} to divide a polynomial by an integer does not work. + +@@ -675,8 +675,9 @@ + e1: --------- + a + @end example ++@end deffn + +-@deffnx Command suchthat var exp ++@deffn Command suchthat var exp + + If an expression rather than an equation is given to @code{suchthat}, it + is as though the equation @code{@var{exp}=0} was given. +@@ -688,8 +689,9 @@ + e2: --------- + a + @end example ++@end deffn + +-@deffnx Operator | var exp_or_eqn ++@deffn Operator | var exp_or_eqn + + An alternative infix notation is also available for @code{suchthat}. + +@@ -857,8 +859,9 @@ + + Returns the degree of polynomial or equation @var{poly} in variable + @var{var}. ++@end deffn + +-@deffnx Operator degree poly ++@deffn Operator degree poly + + Returns the total-degree, the degree of its highest degree monomial, + of polynomial or equation @var{poly}. +@@ -1016,10 +1019,12 @@ + Returns @var{poly1} reduced with respect to @var{poly2} (or @var{eqn}) + and @var{var}. If @var{poly2} is univariate, the third argument is not + needed. ++@end deffn + +-@deffnx Command mod poly1 n ++@deffn Command mod poly1 n + Returns @var{poly1} with all the coefficients taken modulo @var{n}. +-@deffnx Command mod poly1 ++@end deffn ++@deffn Command mod poly1 + Returns @var{poly1} with all the coefficients taken modulo the + current modulus. + +@@ -1220,8 +1225,9 @@ + e1: -1 2 3 5 + @end group + @end example ++@end deffn + +-@deffnx Command factor polyratio ++@deffn Command factor polyratio + Given a univariate ratio of polynomials @var{polyratio}, returns a + matrix of factors and exponents. + +@@ -2028,7 +2034,7 @@ + formed from the pair-wise products of components of the inputs. For + example, for the input tensors @code{x[a,b]} and @code{y[c]} + @example +-@result{z:tmult(x,y);} z[a,b,c] = x[a,b]*y[c] ++z:tmult(x,y); @result{} z[a,b,c] = x[a,b]*y[c] + @end example + + With an additional argument, @code{tmult} will produce the inner product +@@ -2464,8 +2470,9 @@ + If you do not wish to return to Jacal but really want to terminate the + session and return to the operating system, then after typing + @code{qed();}, type @code{(slib:exit)} or use @code{quit}. ++@end deffn + +-@deffnx Command quit ++@deffn Command quit + Exit directly from Jacal to the operating system. You will not be able + to continue your Jacal session. + -- cgit v1.2.3 From 92ae98e2a0c2ffc807111dbf7616df47a9d3b31c Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Thu, 2 Mar 2017 19:59:05 +0800 Subject: gnu: mupdf: Fix CVE-2017-{5896,5991}. * gnu/packages/patches/mupdf-CVE-2017-5896.patch, gnu/packages/patches/mupdf-CVE-2017-5991.patch: New files. * gnu/packages/pdf.scm (mupdf/fixed)[source]: Add patches. * gnu/local.mk (dist_patch_DATA): Add them. Signed-off-by: Leo Famulari --- gnu/local.mk | 2 + gnu/packages/patches/mupdf-CVE-2017-5896.patch | 63 +++++++++++++++ gnu/packages/patches/mupdf-CVE-2017-5991.patch | 101 +++++++++++++++++++++++++ gnu/packages/pdf.scm | 5 +- 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mupdf-CVE-2017-5896.patch create mode 100644 gnu/packages/patches/mupdf-CVE-2017-5991.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 406e0dc963..584ab75a57 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -764,6 +764,8 @@ dist_patch_DATA = \ %D%/packages/patches/mupdf-build-with-openjpeg-2.1.patch \ %D%/packages/patches/mupdf-mujs-CVE-2016-10132.patch \ %D%/packages/patches/mupdf-mujs-CVE-2016-10133.patch \ + %D%/packages/patches/mupdf-CVE-2017-5896.patch \ + %D%/packages/patches/mupdf-CVE-2017-5991.patch \ %D%/packages/patches/mupen64plus-ui-console-notice.patch \ %D%/packages/patches/musl-CVE-2016-8859.patch \ %D%/packages/patches/mutt-store-references.patch \ diff --git a/gnu/packages/patches/mupdf-CVE-2017-5896.patch b/gnu/packages/patches/mupdf-CVE-2017-5896.patch new file mode 100644 index 0000000000..1537ecc896 --- /dev/null +++ b/gnu/packages/patches/mupdf-CVE-2017-5896.patch @@ -0,0 +1,63 @@ +Fix CVE-2017-5896: + +https://bugs.ghostscript.com/show_bug.cgi?id=697515 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5896 +http://www.openwall.com/lists/oss-security/2017/02/10/1 +https://security-tracker.debian.org/tracker/CVE-2017-5896 +https://blogs.gentoo.org/ago/2017/02/09/mupdf-use-after-free-in-fz_subsample_pixmap-pixmap-c/ + +Patch lifted from upstream source repository: + +http://git.ghostscript.com/?p=mupdf.git;h=2c4e5867ee699b1081527bc6c6ea0e99a35a5c27 + +From 2c4e5867ee699b1081527bc6c6ea0e99a35a5c27 Mon Sep 17 00:00:00 2001 +From: Robin Watts +Date: Thu, 9 Feb 2017 07:12:16 -0800 +Subject: [PATCH] bug 697515: Fix out of bounds read in fz_subsample_pixmap + +Pointer arithmetic for final special case was going wrong. +--- + source/fitz/pixmap.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c +index a8317127..f1291dc2 100644 +--- a/source/fitz/pixmap.c ++++ b/source/fitz/pixmap.c +@@ -1104,6 +1104,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int h, int f, int factor, + "@STACK:r1,<9>,factor,n,fwd,back,back2,fwd2,divX,back4,fwd4,fwd3,divY,back5,divXY\n" + "ldr r4, [r13,#4*22] @ r4 = divXY \n" + "ldr r5, [r13,#4*11] @ for (nn = n; nn > 0; n--) { \n" ++ "ldr r8, [r13,#4*17] @ r8 = back4 \n" + "18: @ \n" + "mov r14,#0 @ r14= v = 0 \n" + "sub r5, r5, r1, LSL #8 @ for (xx = x; xx > 0; x--) { \n" +@@ -1120,7 +1121,7 @@ fz_subsample_pixmap_ARM(unsigned char *ptr, int w, int h, int f, int factor, + "mul r14,r4, r14 @ r14= v *= divX \n" + "mov r14,r14,LSR #16 @ r14= v >>= 16 \n" + "strb r14,[r9], #1 @ *d++ = r14 \n" +- "sub r0, r0, r8 @ s -= back2 \n" ++ "sub r0, r0, r8 @ s -= back4 \n" + "subs r5, r5, #1 @ n-- \n" + "bgt 18b @ } \n" + "21: @ \n" +@@ -1249,6 +1250,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor) + x += f; + if (x > 0) + { ++ int back4 = x * n - 1; + div = x * y; + for (nn = n; nn > 0; nn--) + { +@@ -1263,7 +1265,7 @@ fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor) + s -= back5; + } + *d++ = v / div; +- s -= back2; ++ s -= back4; + } + } + } +-- +2.12.0 + diff --git a/gnu/packages/patches/mupdf-CVE-2017-5991.patch b/gnu/packages/patches/mupdf-CVE-2017-5991.patch new file mode 100644 index 0000000000..1fa6dc3466 --- /dev/null +++ b/gnu/packages/patches/mupdf-CVE-2017-5991.patch @@ -0,0 +1,101 @@ +Fix CVE-2017-5991: + +https://bugs.ghostscript.com/show_bug.cgi?id=697500 +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5991 +https://security-tracker.debian.org/tracker/CVE-2017-5991 + +Patch lifted from upstream source repository: + +http://git.ghostscript.com/?p=mupdf.git;h=1912de5f08e90af1d9d0a9791f58ba3afdb9d465 + +From 1912de5f08e90af1d9d0a9791f58ba3afdb9d465 Mon Sep 17 00:00:00 2001 +From: Robin Watts +Date: Thu, 9 Feb 2017 15:49:15 +0000 +Subject: [PATCH] Bug 697500: Fix NULL ptr access. + +Cope better with errors during rendering - avoid letting the +gstate stack get out of sync. + +This avoids us ever getting into the situation of popping +a clip when we should be popping a mask or a group. This was +causing an unexpected case in the painting. +--- + source/pdf/pdf-op-run.c | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c +index a3ea895d..f1eac8d3 100644 +--- a/source/pdf/pdf-op-run.c ++++ b/source/pdf/pdf-op-run.c +@@ -1213,6 +1213,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf + pdf_run_processor *pr = (pdf_run_processor *)proc; + pdf_gstate *gstate = NULL; + int oldtop = 0; ++ int oldbot = -1; + fz_matrix local_transform = *transform; + softmask_save softmask = { NULL }; + int gparent_save; +@@ -1232,16 +1233,17 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf + fz_var(cleanup_state); + fz_var(gstate); + fz_var(oldtop); ++ fz_var(oldbot); + + gparent_save = pr->gparent; + pr->gparent = pr->gtop; ++ oldtop = pr->gtop; + + fz_try(ctx) + { + pdf_gsave(ctx, pr); + + gstate = pr->gstate + pr->gtop; +- oldtop = pr->gtop; + + pdf_xobject_bbox(ctx, xobj, &xobj_bbox); + pdf_xobject_matrix(ctx, xobj, &xobj_matrix); +@@ -1302,12 +1304,25 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf + + doc = pdf_get_bound_document(ctx, xobj->obj); + ++ oldbot = pr->gbot; ++ pr->gbot = pr->gtop; ++ + pdf_process_contents(ctx, (pdf_processor*)pr, doc, resources, xobj->obj, NULL); + } + fz_always(ctx) + { ++ /* Undo any gstate mismatches due to the pdf_process_contents call */ ++ if (oldbot != -1) ++ { ++ while (pr->gtop > pr->gbot) ++ { ++ pdf_grestore(ctx, pr); ++ } ++ pr->gbot = oldbot; ++ } ++ + if (cleanup_state >= 3) +- pdf_grestore(ctx, pr); /* Remove the clippath */ ++ pdf_grestore(ctx, pr); /* Remove the state we pushed for the clippath */ + + /* wrap up transparency stacks */ + if (transparency) +@@ -1341,13 +1356,8 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_xobject *xobj, pdf + pr->gstate[pr->gparent].ctm = gparent_save_ctm; + pr->gparent = gparent_save; + +- if (gstate) +- { +- while (oldtop < pr->gtop) +- pdf_grestore(ctx, pr); +- ++ while (oldtop < pr->gtop) + pdf_grestore(ctx, pr); +- } + + pdf_unmark_obj(ctx, xobj->obj); + } +-- +2.12.0 + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index a229d689dd..13dbd0ecd1 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -11,6 +11,7 @@ ;;; Coypright © 2016 Julien Lepiller ;;; Copyright © 2016 Arun Isaac ;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2017 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -550,7 +551,9 @@ and examining the file structure (pdfshow).") (append (origin-patches (package-source mupdf)) (search-patches "mupdf-mujs-CVE-2016-10132.patch" - "mupdf-mujs-CVE-2016-10133.patch"))))))) + "mupdf-mujs-CVE-2016-10133.patch" + "mupdf-CVE-2017-5896.patch" + "mupdf-CVE-2017-5991.patch"))))))) (define-public qpdf (package -- cgit v1.2.3 From 3b175eab84f9899804b466506a57b5807285150a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 3 Mar 2017 17:21:58 +0100 Subject: gnu: nss, nss-certs: Update to 3.29.2. * gnu/packages/certs.scm (nss-certs): Update to 3.29.2. * gnu/packages/gnuzilla.scm (nss): Update to 3.29.2. * gnu/packages/patches/nss-pkgconfig.patch: Adapt to context changes. --- gnu/packages/certs.scm | 4 ++-- gnu/packages/gnuzilla.scm | 4 ++-- gnu/packages/patches/nss-pkgconfig.patch | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/certs.scm b/gnu/packages/certs.scm index b27577bbec..246e5ca14a 100644 --- a/gnu/packages/certs.scm +++ b/gnu/packages/certs.scm @@ -73,7 +73,7 @@ (define-public nss-certs (package (name "nss-certs") - (version "3.27.1") + (version "3.29.2") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -84,7 +84,7 @@ "nss-" version ".tar.gz"))) (sha256 (base32 - "0sraxk26swlgl7rl742rkfp5k251v5z3lqw9k8ikin0cjfhkfdpx")))) + "149807rmzb76hnh48rw4m9jw83iw0168njzchz0hmbsgc8mk0i5w")))) (build-system gnu-build-system) (outputs '("out")) (native-inputs diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 45a6f9338b..c4543aa7d9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -186,7 +186,7 @@ in the Mozilla clients.") (define-public nss (package (name "nss") - (version "3.27.1") + (version "3.29.2") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -197,7 +197,7 @@ in the Mozilla clients.") "nss-" version ".tar.gz"))) (sha256 (base32 - "0sraxk26swlgl7rl742rkfp5k251v5z3lqw9k8ikin0cjfhkfdpx")) + "149807rmzb76hnh48rw4m9jw83iw0168njzchz0hmbsgc8mk0i5w")) ;; Create nss.pc and nss-config. (patches (search-patches "nss-pkgconfig.patch")))) (build-system gnu-build-system) diff --git a/gnu/packages/patches/nss-pkgconfig.patch b/gnu/packages/patches/nss-pkgconfig.patch index e611f69bea..a33e05fcf2 100644 --- a/gnu/packages/patches/nss-pkgconfig.patch +++ b/gnu/packages/patches/nss-pkgconfig.patch @@ -221,5 +221,5 @@ Later adapted to apply cleanly to nss-3.21. RELEASE = nss --DIRS = coreconf lib cmd external_tests -+DIRS = coreconf lib cmd external_tests config +-DIRS = coreconf lib cmd gtests ++DIRS = coreconf lib cmd gtests config -- cgit v1.2.3 From 21abf092a49f0ce80cbfff5cccabb7dbf53abf96 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 3 Mar 2017 17:02:12 +0100 Subject: gnu: arb: Update to 2.10.0. * gnu/packages/algebra.scm (arb): Update to 2.10.0. * gnu/packages/patches/arb-ldconfig.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 3 +-- gnu/packages/algebra.scm | 7 +++---- gnu/packages/patches/arb-ldconfig.patch | 22 ---------------------- 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/arb-ldconfig.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 15003bcab0..ce8ea3d37b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1,6 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès -# Copyright © 2013, 2014, 2015, 2016 Andreas Enge +# Copyright © 2013, 2014, 2015, 2016, 2017 Andreas Enge # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver # Copyright © 2016 Chris Marusich @@ -482,7 +482,6 @@ dist_patch_DATA = \ %D%/packages/patches/alsa-lib-mips-atomic-fix.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ - %D%/packages/patches/arb-ldconfig.patch \ %D%/packages/patches/artanis-fix-Makefile.in.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index be4c48f72d..e244644c40 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge ;;; Copyright © 2013, 2015, 2017 Ludovic Courtès ;;; Copyright © 2016 Nicolas Goaziou ;;; Copyright © 2014 Mark H Weaver @@ -311,7 +311,7 @@ fast arithmetic.") (define-public arb (package (name "arb") - (version "2.8.1") + (version "2.10.0") (source (origin (method url-fetch) (uri (string-append @@ -320,8 +320,7 @@ fast arithmetic.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "04hhcpshfkcq9fr4hixbhpps50yf9drk62xgkvlcaj5kb4nyrx7l")) - (patches (search-patches "arb-ldconfig.patch")))) + "0jwcv9ssvi8axb1y7m2h4ykgyl015cl6g28gfl92l4dgnag585ak")))) (build-system gnu-build-system) (propagated-inputs `(("flint" ,flint))) ; flint.h is included by arf.h diff --git a/gnu/packages/patches/arb-ldconfig.patch b/gnu/packages/patches/arb-ldconfig.patch deleted file mode 100644 index 478ec5a6f0..0000000000 --- a/gnu/packages/patches/arb-ldconfig.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -u -r arb-2.8.1.orig/configure arb-2.8.1/configure ---- arb-2.8.1.orig/configure 2015-12-31 17:30:01.000000000 +0100 -+++ arb-2.8.1/configure 2016-01-20 16:41:41.336726596 +0100 -@@ -647,6 +647,7 @@ - echo "ARB_SHARED=$SHARED" >> Makefile - echo "ARB_LIB=$ARB_LIB" >> Makefile - echo "ARB_LIBNAME=$ARB_LIBNAME" >> Makefile -+echo "ARB_MAJOR=$ARB_MAJOR" >> Makefile - echo "ARB_SOLIB=$ARB_SOLIB" >> Makefile - echo "EXEEXT=$EXEEXT" >> Makefile - echo "PREFIX=$PREFIX" >> Makefile -diff -u -r arb-2.8.1.orig/Makefile.in arb-2.8.1/Makefile.in ---- arb-2.8.1.orig/Makefile.in 2015-12-31 17:30:01.000000000 +0100 -+++ arb-2.8.1/Makefile.in 2016-01-20 16:30:32.575298517 +0100 -@@ -101,6 +101,7 @@ - $(LDCONFIG) -n "$(CURDIR)"; \ - fi - ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME)"; \ -+ ln -sf "$(ARB_LIB)" "$(ARB_LIBNAME).$(ARB_MAJOR)"; \ - - libarb.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces - $(AT)$(foreach ext, $(EXTENSIONS), $(foreach dir, $(patsubst $(ext)/%.h, %, $(wildcard $(ext)/*.h)), mkdir -p build/$(dir); BUILD_DIR=$(CURDIR)/build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f $(CURDIR)/Makefile.subdirs -C $(ext)/$(dir) static || exit $$?;)) -- cgit v1.2.3 From c35745edc4e78defba4a82e32974d729cf159c34 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Thu, 2 Mar 2017 17:35:43 -0500 Subject: gnu: kio: Fix CVE-2017-6410. * gnu/packages/patches/kio-CVE-2017-6410.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde-frameworks.scm (kio)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/kde-frameworks.scm | 1 + gnu/packages/patches/kio-CVE-2017-6410.patch | 53 ++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 gnu/packages/patches/kio-CVE-2017-6410.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ce8ea3d37b..a44c4072b0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -648,6 +648,7 @@ dist_patch_DATA = \ %D%/packages/patches/jq-CVE-2015-8863.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/khmer-use-libraries.patch \ + %D%/packages/patches/kio-CVE-2017-6410.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kobodeluxe-paths.patch \ %D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \ diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index 36c2851567..ba4ead2d67 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -2206,6 +2206,7 @@ makes starting KDE applications faster and reduces memory consumption.") "mirror://kde/stable/frameworks/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "kio-CVE-2017-6410.patch")) (sha256 (base32 "1hqc88c2idi9fkb7jy82csb0i740lghv0p2fg1gaglcarjdz7nia")))) diff --git a/gnu/packages/patches/kio-CVE-2017-6410.patch b/gnu/packages/patches/kio-CVE-2017-6410.patch new file mode 100644 index 0000000000..748636f806 --- /dev/null +++ b/gnu/packages/patches/kio-CVE-2017-6410.patch @@ -0,0 +1,53 @@ +Fix CVE-2017-6410, "Information Leak when accessing https when using a +malicious PAC file": + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-6410 +https://www.kde.org/info/security/advisory-20170228-1.txt + +Patch copied from upstream source repository: + +https://cgit.kde.org/kio.git/commit/?id=f9d0cb47cf94e209f6171ac0e8d774e68156a6e4 + +From f9d0cb47cf94e209f6171ac0e8d774e68156a6e4 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Tue, 28 Feb 2017 19:00:48 +0100 +Subject: Sanitize URLs before passing them to FindProxyForURL + +Remove user/password information +For https: remove path and query + +Thanks to safebreach.com for reporting the problem + +CCMAIL: yoni.fridburg@safebreach.com +CCMAIL: amit.klein@safebreach.com +CCMAIL: itzik.kotler@safebreach.com +--- + src/kpac/script.cpp | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/kpac/script.cpp b/src/kpac/script.cpp +index a0235f7..2485c54 100644 +--- a/src/kpac/script.cpp ++++ b/src/kpac/script.cpp +@@ -754,9 +754,16 @@ QString Script::evaluate(const QUrl &url) + } + } + ++ QUrl cleanUrl = url; ++ cleanUrl.setUserInfo(QString()); ++ if (cleanUrl.scheme() == QLatin1String("https")) { ++ cleanUrl.setPath(QString()); ++ cleanUrl.setQuery(QString()); ++ } ++ + QScriptValueList args; +- args << url.url(); +- args << url.host(); ++ args << cleanUrl.url(); ++ args << cleanUrl.host(); + + QScriptValue result = func.call(QScriptValue(), args); + if (result.isError()) { +-- +cgit v0.11.2 + -- cgit v1.2.3 From 40c611a41df35877c91a6b1ef66bdc84e6355ec7 Mon Sep 17 00:00:00 2001 From: rennes Date: Fri, 17 Feb 2017 19:16:36 -0600 Subject: gnu: wxwidgets: Fix for Filezilla client. * gnu/packages/patches/wxwidgets-fix-windowGTK.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari --- gnu/local.mk | 3 ++- gnu/packages/patches/wxwidgets-fix-windowGTK.patch | 18 ++++++++++++++++++ gnu/packages/wxwidgets.scm | 5 ++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/wxwidgets-fix-windowGTK.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a44c4072b0..c88892df54 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -5,7 +5,7 @@ # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver # Copyright © 2016 Chris Marusich # Copyright © 2016, 2017 Kei Kebreau -# Copyright © 2016 Rene Saavedra +# Copyright © 2016, 2017 Rene Saavedra # Copyright © 2016 Adonay "adfeno" Felipe Nogueira # Copyright © 2016, 2017 Ricardo Wurmus # Copyright © 2016 Ben Woodcroft @@ -976,6 +976,7 @@ dist_patch_DATA = \ %D%/packages/patches/wordnet-CVE-2008-2149.patch \ %D%/packages/patches/wordnet-CVE-2008-3908-pt1.patch \ %D%/packages/patches/wordnet-CVE-2008-3908-pt2.patch \ + %D%/packages/patches/wxwidgets-fix-windowGTK.patch \ %D%/packages/patches/xdotool-fix-makefile.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ %D%/packages/patches/xf86-video-ast-remove-mibstore.patch \ diff --git a/gnu/packages/patches/wxwidgets-fix-windowGTK.patch b/gnu/packages/patches/wxwidgets-fix-windowGTK.patch new file mode 100644 index 0000000000..1255835d01 --- /dev/null +++ b/gnu/packages/patches/wxwidgets-fix-windowGTK.patch @@ -0,0 +1,18 @@ +This patch allow Filezilla client to resize window. +The patch was adapted from upstream source repository: +'' + +--- a/src/gtk/toplevel.cpp 2014-10-06 16:33:44.000000000 -0500 ++++ b/src/gtk/toplevel.cpp 2017-02-16 21:33:27.779907810 -0600 +@@ -1216,8 +1216,9 @@ + int hints_mask = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; + hints.min_width = 1; + hints.min_height = 1; +- hints.max_width = INT_MAX; +- hints.max_height = INT_MAX; ++ // using INT_MAX for size will lead to integer overflow with HiDPI scaling ++ hints.max_width = INT_MAX / 16; ++ hints.max_height = INT_MAX / 16; + const int decorSize_x = m_decorSize.left + m_decorSize.right; + const int decorSize_y = m_decorSize.top + m_decorSize.bottom; + if (minSize.x > decorSize_x) diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 5285037ffe..52fa8184dd 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2016 Theodoros Foradis ;;; Copyright © 2016 Danny Milosavljevic +;;; Copyright © 2017 Rene Saavedra ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,7 +51,9 @@ "releases/download/v" version "/wxWidgets-" version ".tar.bz2")) (sha256 - (base32 "0paq27brw4lv8kspxh9iklpa415mxi8zc117vbbbhfjgapf7js1l")))) + (base32 "0paq27brw4lv8kspxh9iklpa415mxi8zc117vbbbhfjgapf7js1l")) + (patches (search-patches + "wxwidgets-fix-windowGTK.patch")))) (build-system glib-or-gtk-build-system) (inputs `(("glu" ,glu) -- cgit v1.2.3 From e20784e65efa7c783792e8a830d4b4aaf35750d5 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 5 Mar 2017 20:41:36 -0500 Subject: gnu: texlive: Fix CVE-2016-10243. * gnu/packages/patches/texlive-texmf-CVE-2016-10243.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/tex.scm (texlive-texmf-src): Use it. --- gnu/local.mk | 1 + .../patches/texlive-texmf-CVE-2016-10243.patch | 18 ++++++++++++++++++ gnu/packages/tex.scm | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/texlive-texmf-CVE-2016-10243.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c88892df54..9f83c2bcae 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -930,6 +930,7 @@ dist_patch_DATA = \ %D%/packages/patches/tcsh-fix-autotest.patch \ %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ + %D%/packages/patches/texlive-texmf-CVE-2016-10243.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/tidy-CVE-2015-5522+5523.patch \ diff --git a/gnu/packages/patches/texlive-texmf-CVE-2016-10243.patch b/gnu/packages/patches/texlive-texmf-CVE-2016-10243.patch new file mode 100644 index 0000000000..3a9ae993f6 --- /dev/null +++ b/gnu/packages/patches/texlive-texmf-CVE-2016-10243.patch @@ -0,0 +1,18 @@ +Fix CVE-2016-10243: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10243 + +Patch adapted from upstream commit: + +https://www.tug.org/svn/texlive?view=revision&revision=42605 + +--- trunk/Master/texmf-dist/web2c/texmf.cnf 2016/11/29 23:10:33 42604 ++++ trunk/Master/texmf-dist/web2c/texmf.cnf 2016/11/29 23:27:53 42605 +@@ -568,7 +568,6 @@ extractbb,\ + gregorio,\ + kpsewhich,\ + makeindex,\ +-mpost,\ + repstopdf,\ + + % we'd like to allow: diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 7c84ed7194..404fd03393 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -72,6 +72,8 @@ (origin (method url-fetch) (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz") + (patches (search-patches "texlive-texmf-CVE-2016-10243.patch")) + (patch-flags '("-p2")) (sha256 (base32 "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr")))) -- cgit v1.2.3 From 550bd98b41c2bf3bfdcf3da29a41f0933b102266 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Mar 2017 21:58:19 +0100 Subject: gnu: Add python2-subprocess32. * gnu/packages/python.scm (python2-subprocess32): New variable. * gnu/packages/patches/python2-subprocess32-disable-input-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../python2-subprocess32-disable-input-test.patch | 18 ++++++++++ gnu/packages/python.scm | 41 ++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 gnu/packages/patches/python2-subprocess32-disable-input-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9f83c2bcae..5fd7c778fc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -871,6 +871,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ + %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/qemu-CVE-2016-10155.patch \ %D%/packages/patches/qemu-CVE-2017-2615.patch \ %D%/packages/patches/qemu-CVE-2017-5525.patch \ diff --git a/gnu/packages/patches/python2-subprocess32-disable-input-test.patch b/gnu/packages/patches/python2-subprocess32-disable-input-test.patch new file mode 100644 index 0000000000..05b4eef1ba --- /dev/null +++ b/gnu/packages/patches/python2-subprocess32-disable-input-test.patch @@ -0,0 +1,18 @@ +This test tries to send a KeyboardInterrupt, which does +not work in the build environment. + +--- a/test_subprocess32.py 2017-03-06 22:21:49.334045485 +0100 ++++ b/test_subprocess32.py 2017-03-06 22:22:02.490439949 +0100 +@@ -1299,12 +1299,6 @@ + getattr(p, method)(*args) + return p + +- def test_send_signal(self): +- p = self._kill_process('send_signal', signal.SIGINT) +- _, stderr = p.communicate() +- self.assertIn('KeyboardInterrupt', stderr) +- self.assertNotEqual(p.wait(), 0) +- + def test_kill(self): + p = self._kill_process('kill') + _, stderr = p.communicate() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f2c16c252a..56c16fd73f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9044,6 +9044,47 @@ authenticated session objects providing things like keep-alive.") 3.2.3 for use with older versions of Python and PyPy.") (license license:expat))) +(define-public python2-subprocess32 + (package + (name "python2-subprocess32") + (version "3.2.7") + (source (origin + (method url-fetch) + (uri (pypi-uri "subprocess32" version)) + (sha256 + (base32 + "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y")) + (patches + (search-patches "python2-subprocess32-disable-input-test.patch")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/sh + (lambda _ + (substitute* '("subprocess32.py" + "test_subprocess32.py") + (("/bin/sh") (which "sh"))) + #t)) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; For some reason this package fails to import + ;; _posixsubprocess.so when PYTHONPATH is set to the build + ;; directory. Running tests after install is easier. + (add-installed-pythonpath inputs outputs) + (zero? (system* "python" "test_subprocess32.py"))))))) + (home-page "https://github.com/google/python-subprocess32") + (synopsis "Backport of the subprocess module from Python 3.2") + (description + "This is a backport of the @code{subprocess} standard library module +from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some +new features. On POSIX systems it is guaranteed to be reliable when used +in threaded applications. It includes timeout support from Python 3.3 but +otherwise matches 3.2’s API.") + (license license:psfl))) + (define-public python2-futures (package (name "python2-futures") -- cgit v1.2.3 From 4535a93adb225a8b0ed777b922e45bd59068f440 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert Date: Tue, 21 Feb 2017 22:18:45 +0100 Subject: gnu: python-matplotlib: Update to 2.0.0. * gnu/packages/python.scm (python-matplotlib, python2-matplotlib): Update to 2.0.0. [source]: Remove Tk backend patch, use Github instead of Sourceforge. [outputs]: Remove "doc" output. [inputs]: Add python-pyqt. [propagated-inputs]: Add python-cycler. [native-inputs]: Remove python-sphinx, python-numpydoc, texlive and texinfo. (python2-matplotlib)[native-inputs]: Add python2-functools32 and python2-subprocess32. (python-matplotlib-documentation, python2-matplotlib-documentation): New variables. * gnu/packages/patches/matplotlib-setupext-tk.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove patch. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 - gnu/packages/patches/matplotlib-setupext-tk.patch | 34 ------ gnu/packages/python.scm | 120 +++++++++++++--------- 3 files changed, 69 insertions(+), 86 deletions(-) delete mode 100644 gnu/packages/patches/matplotlib-setupext-tk.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5fd7c778fc..5dec691d01 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -746,7 +746,6 @@ dist_patch_DATA = \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mars-install.patch \ %D%/packages/patches/mars-sfml-2.3.patch \ - %D%/packages/patches/matplotlib-setupext-tk.patch \ %D%/packages/patches/maxima-defsystem-mkdir.patch \ %D%/packages/patches/mcron-install.patch \ %D%/packages/patches/mcrypt-CVE-2012-4409.patch \ diff --git a/gnu/packages/patches/matplotlib-setupext-tk.patch b/gnu/packages/patches/matplotlib-setupext-tk.patch deleted file mode 100644 index 37c3d686e0..0000000000 --- a/gnu/packages/patches/matplotlib-setupext-tk.patch +++ /dev/null @@ -1,34 +0,0 @@ -Use 'pkg-config' instead of heuristics to find 'tk' flags. - ---- matplotlib-1.4.3/setupext.py.orig 2015-12-01 14:21:19.554417453 +0100 -+++ matplotlib-1.4.3/setupext.py 2015-12-02 10:39:47.282363530 +0100 -@@ -1457,7 +1457,7 @@ - p = subprocess.Popen( - '. %s ; eval echo ${%s}' % (file, varname), - shell=True, -- executable="/bin/sh", -+ executable="sh", - stdout=subprocess.PIPE) - result = p.communicate()[0] - return result.decode('ascii') -@@ -1601,8 +1601,19 @@ - # of distros. - - # Query Tcl/Tk system for library paths and version string -+ def getoutput(s): -+ ret = os.popen(s).read().strip() -+ return ret - try: -- tcl_lib_dir, tk_lib_dir, tk_ver = self.query_tcltk() -+ pkg_config_libs = getoutput('pkg-config --libs-only-L tk').split() -+ # drop '-L' part of strings -+ pkg_config_libs = [s[2:] for s in pkg_config_libs] -+ pkg_config_ver = getoutput('pkg-config --modversion tk') -+ tk_ver = re.match(r"(\d+.\d+)[\d.]*", pkg_config_ver).group(1) -+ tcl_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tcl-.*", s)) + '/tcl' + tk_ver -+ tk_lib_dir = next(s for s in pkg_config_libs -+ if re.match(r".*-tk-.*", s)) + '/tk' + tk_ver - except: - tk_ver = '' - result = self.hardcoded_tcl_config() diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 56c16fd73f..7315df7325 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -89,6 +89,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) + #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages shells) @@ -3869,21 +3870,20 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. (define-public python-matplotlib (package (name "python-matplotlib") - (version "1.4.3") + (version "2.0.0") (source (origin (method url-fetch) - (uri (string-append "mirror://sourceforge/matplotlib/matplotlib" - "/matplotlib-" version - "/matplotlib-" version ".tar.gz")) + (uri (string-append + "https://github.com/matplotlib/matplotlib/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1dn05cvd0g984lzhh72wa0z93psgwshbbg93fkab6slx5m3l95av")) - (patches (search-patches "matplotlib-setupext-tk.patch")))) + "0w3k5m5qb3wsd7yhvmg042xddvligklvcq2visk2c5wnph3hhsln")))) (build-system python-build-system) - (outputs '("out" "doc")) (propagated-inputs ; the following packages are all needed at run time - `(("python-pyparsing" ,python-pyparsing) + `(("python-cycler" ,python-cycler) + ("python-pyparsing" ,python-pyparsing) ("python-pygobject" ,python-pygobject) ("gobject-introspection" ,gobject-introspection) ("python-tkinter" ,python "tk") @@ -3915,17 +3915,13 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. ("glib" ,glib) ;; FIXME: Add backends when available. ;("python-wxpython" ,python-wxpython) - ;("python-pyqt" ,python-pyqt) + ("python-pyqt" ,python-pyqt) ("tcl" ,tcl) ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-sphinx" ,python-sphinx-1.2.3) - ("python-numpydoc" ,python-numpydoc) ("python-nose" ,python-nose) - ("python-mock" ,python-mock) - ("texlive" ,texlive) - ("texinfo" ,texinfo))) + ("python-mock" ,python-mock))) (arguments `(#:phases (modify-phases %standard-phases @@ -3944,26 +3940,68 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc. basedirlist = ~a,~a~% [rc_options]~% backend = TkAgg~%" - (assoc-ref inputs "tcl") - (assoc-ref inputs "tk")))) - #t))) - (add-after 'install 'install-doc + (assoc-ref inputs "tcl") + (assoc-ref inputs "tk"))))) + #t))))) + (home-page "http://matplotlib.org") + (synopsis "2D plotting library for Python") + (description + "Matplotlib is a Python 2D plotting library which produces publication +quality figures in a variety of hardcopy formats and interactive environments +across platforms. Matplotlib can be used in Python scripts, the python and +ipython shell, web application servers, and six graphical user interface +toolkits.") + (license license:psfl) + (properties `((python2-variant . ,(delay python2-matplotlib)))))) + +(define-public python2-matplotlib + (let ((matplotlib (package-with-python2 + (strip-python2-variant python-matplotlib)))) + (package (inherit matplotlib) + ;; Make sure to use special packages for Python 2 instead + ;; of those automatically rewritten by package-with-python2. + (propagated-inputs + `(("python2-pycairo" ,python2-pycairo) + ("python2-functools32" ,python2-functools32) + ("python2-pygobject-2" ,python2-pygobject-2) + ("python2-subprocess32" ,python2-subprocess32) + ("python2-tkinter" ,python-2 "tk") + ,@(fold alist-delete (package-propagated-inputs matplotlib) + '("python-pycairo" "python-pygobject" "python-tkinter"))))))) + +(define-public python-matplotlib-documentation + (package + (name "python-matplotlib-documentation") + (version (package-version python-matplotlib)) + (source (package-source python-matplotlib)) + (build-system python-build-system) + (native-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-colorspacious" ,python-colorspacious) + ("python-sphinx" ,python-sphinx) + ("python-numpydoc" ,python-numpydoc) + ("python-ipython" ,python-ipython) + ("texlive" ,texlive) + ("texinfo" ,texinfo) + ,@(package-native-inputs python-matplotlib))) + (arguments + `(#:tests? #f ; we're only generating documentation + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (let* ((data (string-append (assoc-ref outputs "out") "/share")) (doc (string-append data "/doc/" ,name "-" ,version)) (info (string-append data "/info")) (html (string-append doc "/html"))) ;; Make installed package available for building the ;; documentation - (add-installed-pythonpath inputs outputs) (with-directory-excursion "doc" ;; Produce pdf in 'A4' format. (substitute* (find-files "." "conf\\.py") (("latex_paper_size = 'letter'") "latex_paper_size = 'a4'")) - (substitute* "users/intro.rst" - ;; Fix reST markup error (see ) - (("[[][*][]]") "[#]")) (mkdir-p html) (mkdir-p info) ;; The doc recommends to run the 'html' target twice. @@ -3985,35 +4023,15 @@ backend = TkAgg~%" (copy-file "build/texinfo/matplotlib.info" (string-append info "/matplotlib.info")) (copy-file "build/latex/Matplotlib.pdf" - (string-append doc "/Matplotlib.pdf"))) - #t)))))) - (home-page "http://matplotlib.org") - (synopsis "2D plotting library for Python") - (description - "Matplotlib is a Python 2D plotting library which produces publication -quality figures in a variety of hardcopy formats and interactive environments -across platforms. Matplotlib can be used in Python scripts, the python and -ipython shell, web application servers, and six graphical user interface -toolkits.") - (license license:psfl) - (properties `((python2-variant . ,(delay python2-matplotlib)))))) + (string-append doc "/Matplotlib.pdf")))) + #t))))) + (home-page (package-home-page python-matplotlib)) + (synopsis "Documentation for the python-matplotlib package") + (description (package-description python-matplotlib)) + (license (package-license python-matplotlib)))) -(define-public python2-matplotlib - (let ((matplotlib (package-with-python2 - (strip-python2-variant python-matplotlib)))) - (package (inherit matplotlib) - ;; Make sure to use special packages for Python 2 instead - ;; of those automatically rewritten by package-with-python2. - (native-inputs - `(("python2-sphinx" ,python2-sphinx-1.2.3) - ,@(fold alist-delete (package-native-inputs matplotlib) - '("python-sphinx")))) - (propagated-inputs - `(("python2-pycairo" ,python2-pycairo) - ("python2-pygobject-2" ,python2-pygobject-2) - ("python2-tkinter" ,python-2 "tk") - ,@(fold alist-delete (package-propagated-inputs matplotlib) - '("python-pycairo" "python-pygobject" "python-tkinter"))))))) +(define-public python2-matplotlib-documentation + (package-with-python2 python-matplotlib-documentation)) (define-public python2-pysnptools (package -- cgit v1.2.3 From 6cb747769915e8ecef04fd5c5a625d535f4db1d7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Mar 2017 16:09:23 +0100 Subject: gnu: python-statsmodels: Update to 0.8.0. * gnu/packages/statistics.scm (python-statsmodels, python2-statsmodels): Update to 0.8.0. [source]: Use 'pypi-uri'. [arguments]: Add more files to matplotlib backend substitution. * gnu/packages/patches/python-statsmodels-fix-tests.patch: Drop test that fails with numpy 1.12. Remove previous contents. --- .../patches/python-statsmodels-fix-tests.patch | 224 +++------------------ gnu/packages/statistics.scm | 11 +- 2 files changed, 34 insertions(+), 201 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-statsmodels-fix-tests.patch b/gnu/packages/patches/python-statsmodels-fix-tests.patch index 3315ddbd5f..f910b4b5a5 100644 --- a/gnu/packages/patches/python-statsmodels-fix-tests.patch +++ b/gnu/packages/patches/python-statsmodels-fix-tests.patch @@ -1,196 +1,28 @@ -This patch fixes a couple of test failures introduced by changes to the pandas -package. It was extracted from this pull request: - -https://github.com/statsmodels/statsmodels/pull/2675 - - -From c9ef60a7bc4407766ab9e9f12c8a6b89013046ee Mon Sep 17 00:00:00 2001 -From: Ralf Gommers -Date: Tue, 20 Oct 2015 07:34:11 +0200 -Subject: [PATCH 1/4] MAINT: fix use of old_behavior kw for numpy.correlate. - Was removed in 1.10.0 - -Numpy PR that removed it: https://github.com/numpy/numpy/pull/5991 - -Closes gh-2667. ---- - statsmodels/tsa/ar_model.py | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py -index 087a9e0..02984bd 100644 ---- a/statsmodels/tsa/ar_model.py -+++ b/statsmodels/tsa/ar_model.py -@@ -261,10 +261,8 @@ def _presample_varcov(self, params): - - Vpinv = np.zeros((p, p), dtype=params.dtype) - for i in range(1, p1): -- Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i], -- old_behavior=False)[:-1] -- Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0, -- old_behavior=False)[:-1] -+ Vpinv[i-1, i-1:] = np.correlate(params0, params0[:i],)[:-1] -+ Vpinv[i-1, i-1:] -= np.correlate(params0[-i:], params0,)[:-1] - - Vpinv = Vpinv + Vpinv.T - np.diag(Vpinv.diagonal()) - return Vpinv - -From f1dc8979b09bc1736149993f895943b3158ee2db Mon Sep 17 00:00:00 2001 -From: Ralf Gommers -Date: Wed, 21 Oct 2015 22:05:52 +0200 -Subject: [PATCH 2/4] MAINT: fix graphics module for changes in recent pandas - versions. - ---- - statsmodels/graphics/tests/test_mosaicplot.py | 2 +- - statsmodels/graphics/tests/test_tsaplots.py | 6 +++--- - statsmodels/graphics/tsaplots.py | 2 +- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/statsmodels/graphics/tests/test_mosaicplot.py b/statsmodels/graphics/tests/test_mosaicplot.py -index cb9bbbe..e41020e 100644 ---- a/statsmodels/graphics/tests/test_mosaicplot.py -+++ b/statsmodels/graphics/tests/test_mosaicplot.py -@@ -113,7 +113,7 @@ def test_mosaic(): - # sort by the marriage quality and give meaningful name - # [rate_marriage, age, yrs_married, children, - # religious, educ, occupation, occupation_husb] -- datas = datas.sort(['rate_marriage', 'religious']) -+ datas = datas.sort_values(by=['rate_marriage', 'religious']) - num_to_desc = {1: 'awful', 2: 'bad', 3: 'intermediate', - 4: 'good', 5: 'wonderful'} - datas['rate_marriage'] = datas['rate_marriage'].map(num_to_desc) -diff --git a/statsmodels/graphics/tests/test_tsaplots.py b/statsmodels/graphics/tests/test_tsaplots.py -index 511f18f..365be82 100644 ---- a/statsmodels/graphics/tests/test_tsaplots.py -+++ b/statsmodels/graphics/tests/test_tsaplots.py -@@ -1,4 +1,4 @@ --from statsmodels.compat.python import lmap, lzip, map -+from statsmodels.compat.python import lmap, map - import numpy as np - import pandas as pd - from numpy.testing import dec -@@ -51,8 +51,8 @@ def test_plot_month(): - dta = sm.datasets.elnino.load_pandas().data - dta['YEAR'] = dta.YEAR.astype(int).apply(str) - dta = dta.set_index('YEAR').T.unstack() -- dates = lmap(lambda x : pd.datetools.parse('1 '+' '.join(x)), -- dta.index.values) -+ dates = lmap(lambda x : pd.datetools.parse_time_string('1 '+' '.join(x))[0], -+ dta.index.values) - - # test dates argument - fig = month_plot(dta.values, dates=dates, ylabel='el nino') -diff --git a/statsmodels/graphics/tsaplots.py b/statsmodels/graphics/tsaplots.py -index 3d04692..94626c9 100644 ---- a/statsmodels/graphics/tsaplots.py -+++ b/statsmodels/graphics/tsaplots.py -@@ -200,7 +200,7 @@ def seasonal_plot(grouped_x, xticklabels, ylabel=None, ax=None): - ticks = [] - for season, df in grouped_x: - df = df.copy() # or sort balks for series. may be better way -- df.sort() -+ df.sort_values(inplace=True) - nobs = len(df) - x_plot = np.arange(start, start + nobs) - ticks.append(x_plot.mean()) - -From 4cfbef6af137629c6953f1f025d9cfc781874256 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers -Date: Wed, 21 Oct 2015 22:15:25 +0200 -Subject: [PATCH 3/4] MAINT: work around pandas breaking backwards compat for - pandas.version - ---- - setup.py | 5 ++++- - statsmodels/tools/testing.py | 6 ++---- - 2 files changed, 6 insertions(+), 5 deletions(-) - -diff --git a/setup.py b/setup.py -index 0002840..74aefb8 100644 ---- a/setup.py -+++ b/setup.py -@@ -134,7 +134,10 @@ def check_dependency_versions(min_versions): - (spversion, min_versions['scipy'])) - - try: -- from pandas.version import short_version as pversion -+ import pandas -+ #FIXME: this will break for pandas 1.0.0. Needs elaborate parsing now, -+ # due to pandas removing version.short_version -+ pversion = pandas.__version__[:6] - except ImportError: - install_requires.append('pandas') - else: -diff --git a/statsmodels/tools/testing.py b/statsmodels/tools/testing.py -index e207e44..643f79f 100644 ---- a/statsmodels/tools/testing.py -+++ b/statsmodels/tools/testing.py -@@ -16,10 +16,8 @@ def strip_rc(version): - - - def is_pandas_min_version(min_version): -- '''check whether pandas is at least min_version -- ''' -- from pandas.version import short_version as pversion -- return StrictVersion(strip_rc(pversion)) >= min_version -+ '''check whether pandas is at least min_version ''' -+ return StrictVersion((pandas.__version__[:6])) >= min_version - - - # local copies, all unchanged - -From c894c3f4882d570efb517950069d83afa9794db8 Mon Sep 17 00:00:00 2001 -From: Ralf Gommers -Date: Mon, 26 Oct 2015 20:47:51 +0100 -Subject: [PATCH 4/4] BUG: fix use of Series.sort_values for older pandas. - -Some failing tests in the previous commits because older ``pandas`` versions -don't have ``Series.sort_values``. That method was only added in pandas 0.17, -in https://github.com/pydata/pandas/pull/10726 ---- - statsmodels/graphics/tests/test_mosaicplot.py | 6 +++++- - statsmodels/graphics/tsaplots.py | 6 +++++- - 2 files changed, 10 insertions(+), 2 deletions(-) - -diff --git a/statsmodels/graphics/tests/test_mosaicplot.py b/statsmodels/graphics/tests/test_mosaicplot.py -index e41020e..2a873e7 100644 ---- a/statsmodels/graphics/tests/test_mosaicplot.py -+++ b/statsmodels/graphics/tests/test_mosaicplot.py -@@ -113,7 +113,11 @@ def test_mosaic(): - # sort by the marriage quality and give meaningful name - # [rate_marriage, age, yrs_married, children, - # religious, educ, occupation, occupation_husb] -- datas = datas.sort_values(by=['rate_marriage', 'religious']) -+ if pandas.__version__ < '0.17.0': -+ datas = datas.sort(['rate_marriage', 'religious']) -+ else: -+ datas = datas.sort_values(by=['rate_marriage', 'religious']) -+ - num_to_desc = {1: 'awful', 2: 'bad', 3: 'intermediate', - 4: 'good', 5: 'wonderful'} - datas['rate_marriage'] = datas['rate_marriage'].map(num_to_desc) -diff --git a/statsmodels/graphics/tsaplots.py b/statsmodels/graphics/tsaplots.py -index 94626c9..217724f 100644 ---- a/statsmodels/graphics/tsaplots.py -+++ b/statsmodels/graphics/tsaplots.py -@@ -2,6 +2,7 @@ - - - import numpy as np -+import pandas - - from statsmodels.graphics import utils - from statsmodels.tsa.stattools import acf, pacf -@@ -200,7 +201,10 @@ def seasonal_plot(grouped_x, xticklabels, ylabel=None, ax=None): - ticks = [] - for season, df in grouped_x: - df = df.copy() # or sort balks for series. may be better way -- df.sort_values(inplace=True) -+ if pandas.__version__ < '0.17.0': -+ df.sort() -+ else: -+ df.sort_values(inplace=True) - nobs = len(df) - x_plot = np.arange(start, start + nobs) - ticks.append(x_plot.mean()) +This drops a test that fails with numpy 1.12. + +Upstream bug URL: https://github.com/statsmodels/statsmodels/issues/3541 + +--- a/statsmodels/discrete/tests/test_discrete.py 2017-03-06 15:29:19.947343331 +0000 ++++ b/statsmodels/discrete/tests/test_discrete.py 2017-03-06 15:29:37.759328845 +0000 +@@ -1329,21 +1329,6 @@ + res = mod.fit(start_params=-np.ones(4), method='newton', disp=0) + assert_(not res.mle_retvals['converged']) + +-def test_issue_339(): +- # make sure MNLogit summary works for J != K. +- data = sm.datasets.anes96.load() +- exog = data.exog +- # leave out last exog column +- exog = exog[:,:-1] +- exog = sm.add_constant(exog, prepend=True) +- res1 = sm.MNLogit(data.endog, exog).fit(method="newton", disp=0) +- # strip the header from the test +- smry = "\n".join(res1.summary().as_text().split('\n')[9:]) +- cur_dir = os.path.dirname(os.path.abspath(__file__)) +- test_case_file = os.path.join(cur_dir, 'results', 'mn_logit_summary.txt') +- test_case = open(test_case_file, 'r').read() +- np.testing.assert_equal(smry, test_case[:-1]) +- + def test_issue_341(): + data = sm.datasets.anes96.load() + exog = data.exog diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 139ac71834..bfa4cafe1e 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -1437,15 +1437,14 @@ building design matrices.") (define-public python-statsmodels (package (name "python-statsmodels") - (version "0.6.1") + (version "0.8.0") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/" - "s/statsmodels/statsmodels-" version ".tar.gz")) + (uri (pypi-uri "statsmodels" version)) (sha256 (base32 - "0xn67sqr0cc1lmlhzm71352hrb4hw7g318p5ff5q97pc98vl8kmy")) + "0j30v3932shnj9368c9jr3svkyrvfj90h2l7nxnqkbpv0svilhr6")) (patches (search-patches "python-statsmodels-fix-tests.patch")))) (build-system python-build-system) (arguments @@ -1457,7 +1456,9 @@ building design matrices.") (lambda _ ;; Set the matplotlib backend to Agg to avoid problems using the ;; GTK backend without a display. - (substitute* (find-files "statsmodels/graphics/tests" "\\.py") + (substitute* (append (find-files "statsmodels/graphics/tests" "\\.py") + '("statsmodels/tsa/vector_ar/tests/test_var.py" + "statsmodels/duration/tests/test_survfunc.py")) (("import matplotlib\\.pyplot as plt" line) (string-append "import matplotlib;matplotlib.use('Agg');" line))) -- cgit v1.2.3 From f11275c9e52bca7964c86f3c7d9daee2dd4771a0 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 4 Mar 2017 18:07:26 -0500 Subject: gnu: gnupg: Update to 2.1.19. * gnu/packages/gnupg.scm (gnupg): Update to 2.1.19. [arguments]: Add 'patch-test-paths' phase and remove 'set-gnupg-home' phase. Add '--enable-gnupg-builddir-envvar' to #:configure-flags. [source]: Add 'gnupg-2.1-fix-Y2038-test-failure.patch'. * gnu/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/gnupg.scm | 37 +++++++++--- .../patches/gnupg-2.1-fix-Y2038-test-failure.patch | 67 ++++++++++++++++++++++ 3 files changed, 97 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 5dec691d01..e3bf241c8e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -596,6 +596,7 @@ dist_patch_DATA = \ %D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gnome-tweak-tool-search-paths.patch \ %D%/packages/patches/gnucash-price-quotes-perl.patch \ + %D%/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index befd29961c..4fc9f38521 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -217,14 +217,15 @@ compatible to GNU Pth.") (define-public gnupg (package (name "gnupg") - (version "2.1.18") + (version "2.1.19") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnupg/gnupg-" version ".tar.bz2")) + (patches (search-patches "gnupg-2.1-fix-Y2038-test-failure.patch")) (sha256 (base32 - "157rrv3ly9j2k0acz43nhiba5hfl6h7048jvj55wwqjmgsmnyk6h")))) + "1w4vccmb5l50lm4yrz9vkdj7whbfvzx543r55362kkj1aqgyvk26")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -243,7 +244,11 @@ compatible to GNU Pth.") ("sqlite" ,sqlite) ("zlib" ,zlib))) (arguments - `(#:configure-flags '("--enable-gpg2-is-gpg") + `(#:configure-flags '("--enable-gpg2-is-gpg" + ;; Otherwise, the test suite looks for the `gpg` + ;; executable in its installation directory in + ;; /gnu/store before it has been installed. + "--enable-gnupg-builddir-envvar") #:phases (modify-phases %standard-phases (add-before 'configure 'patch-paths @@ -259,11 +264,27 @@ compatible to GNU Pth.") (("/usr/bin/env gpgscm") (string-append (getcwd) "/tests/gpgscm/gpgscm"))) #t)) - ;; If this variable is undefined, /bin/pwd is invoked. - (add-before 'check 'set-gnupg-home - (lambda _ - (setenv "GNUPGHOME" (getcwd)) - #t))))) + (add-before 'build 'patch-test-paths + (lambda* (#:key inputs #:allow-other-keys) + (let* ((coreutils (assoc-ref inputs "coreutils")) + (cat (string-append coreutils "/bin/cat")) + (pwd (string-append coreutils "/bin/pwd")) + (true (string-append coreutils "/bin/true")) + (false (string-append coreutils "/bin/false"))) + (substitute* '("tests/inittests" + "tests/pkits/inittests" + "tests/Makefile" + "tests/pkits/common.sh" + "tests/pkits/Makefile" + ) + (("/bin/pwd") pwd)) + (substitute* "common/t-exectool.c" + (("/bin/cat") cat)) + (substitute* "common/t-exectool.c" + (("/bin/true") true)) + (substitute* "common/t-exectool.c" + (("/bin/false") false)) + #t)))))) (home-page "https://gnupg.org/") (synopsis "GNU Privacy Guard") (description diff --git a/gnu/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch b/gnu/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch new file mode 100644 index 0000000000..b3a198c499 --- /dev/null +++ b/gnu/packages/patches/gnupg-2.1-fix-Y2038-test-failure.patch @@ -0,0 +1,67 @@ +Fix a Y2038 test failure on systems where time_t is a signed 32-bit value: + +https://bugs.gnupg.org/gnupg/issue2988 + +Patch copied from upstream source repository: + +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=de3838372ae3cdecbd83eea2c53c8e2656d93052 + +From de3838372ae3cdecbd83eea2c53c8e2656d93052 Mon Sep 17 00:00:00 2001 +From: Justus Winter +Date: Tue, 7 Mar 2017 12:18:59 +0100 +Subject: [PATCH] tests: Avoid overflowing signed 32 bit time_t. + +* tests/openpgp/quick-key-manipulation.scm: Use expiration times in +the year 2038 instead of 2105 to avoid overflowing 32 bit time_t. +time_t is used internally to parse the expiraton time from the iso +timestamp. + +GnuPG-bug-id: 2988 +Signed-off-by: Justus Winter +--- + tests/openpgp/quick-key-manipulation.scm | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm +index 10f0bfe21..08ef62613 100755 +--- a/tests/openpgp/quick-key-manipulation.scm ++++ b/tests/openpgp/quick-key-manipulation.scm +@@ -125,8 +125,13 @@ + (default default never) + (rsa "sign auth encr" "seconds=600") ;; GPGME uses this + (rsa "auth,encr" "2") ;; "without a letter, days is assumed" +- (rsa "sign" "2105-01-01") ;; "last year GnuPG can represent is 2105" +- (rsa "sign" "21050101T115500") ;; "last year GnuPG can represent is 2105" ++ ;; Sadly, the timestamp is truncated by the use of time_t on ++ ;; systems where time_t is a signed 32 bit value. ++ (rsa "sign" "2038-01-01") ;; unix millennium ++ (rsa "sign" "20380101T115500") ;; unix millennium ++ ;; Once fixed, we can use later timestamps: ++ ;; (rsa "sign" "2105-01-01") ;; "last year GnuPG can represent is 2105" ++ ;; (rsa "sign" "21050101T115500") ;; "last year GnuPG can represent is 2105" + (rsa sign "2d") + (rsa1024 sign "2w") + (rsa2048 encr "2m") +@@ -157,7 +162,8 @@ + (lambda (subkey) + (assert (= 1 (:alg subkey))) + (assert (string-contains? (:cap subkey) "s")) +- (assert (time-matches? 4260207600 ;; 2105-01-01 ++ (assert (time-matches? 2145916800 ;; 2038-01-01 ++ ;; 4260207600 ;; 2105-01-01 + (string->number (:expire subkey)) + ;; This is off by 12h, but I guess it just + ;; choses the middle of the day. +@@ -165,7 +171,8 @@ + (lambda (subkey) + (assert (= 1 (:alg subkey))) + (assert (string-contains? (:cap subkey) "s")) +- (assert (time-matches? 4260254100 ;; UTC 2105-01-01 11:55:00 ++ (assert (time-matches? 2145959700 ;; UTC 2038-01-01 11:55:00 ++ ;; 4260254100 ;; UTC 2105-01-01 11:55:00 + (string->number (:expire subkey)) + (minutes->seconds 5)))) + (lambda (subkey) +-- +2.12.0 + -- cgit v1.2.3 From 9bb766e70d03164cb902122f3bbfbf46547f6cda Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 7 Mar 2017 15:58:26 +0100 Subject: gnu: pcre2: Update to 10.23. * gnu/packages/pcre.scm (pcre2): Update to 10.23. [source]: Remove patch. [arguments]: Add phase to substitute /bin/echo reference. * gnu/packages/patches/pcre2-CVE-2016-3191.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/pcre2-CVE-2016-3191.patch | 179 ------------------------- gnu/packages/pcre.scm | 15 ++- 3 files changed, 11 insertions(+), 184 deletions(-) delete mode 100644 gnu/packages/patches/pcre2-CVE-2016-3191.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index e3bf241c8e..ee40c1bd30 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -811,7 +811,6 @@ dist_patch_DATA = \ %D%/packages/patches/patchutils-xfail-gendiff-tests.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/pcre-CVE-2016-3191.patch \ - %D%/packages/patches/pcre2-CVE-2016-3191.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ diff --git a/gnu/packages/patches/pcre2-CVE-2016-3191.patch b/gnu/packages/patches/pcre2-CVE-2016-3191.patch deleted file mode 100644 index 80f9d3d4f1..0000000000 --- a/gnu/packages/patches/pcre2-CVE-2016-3191.patch +++ /dev/null @@ -1,179 +0,0 @@ -Fixes CVE-2016-3191 (remote execution of arbitrary code or denial of -service (stack-based buffer overflow) via a crafted regular expression). - -See . - -This is svn r489 at , omitting the -changes to 'testdata/testoutput8-16-4', which does not exist in the -source tarball. - -git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@489 6239d852-aaf2-0410-a92c-79f79f948069 ---- - ChangeLog | 4 ++++ - src/pcre2_compile.c | 16 ++++++++++++++-- - testdata/testinput8 | 2 ++ - testdata/testoutput8-16-2 | 3 +++ - testdata/testoutput8-16-3 | 3 +++ - testdata/testoutput8-16-4 | 3 +++ - testdata/testoutput8-32-2 | 3 +++ - testdata/testoutput8-32-3 | 3 +++ - testdata/testoutput8-32-4 | 3 +++ - testdata/testoutput8-8-2 | 3 +++ - testdata/testoutput8-8-3 | 3 +++ - testdata/testoutput8-8-4 | 3 +++ - 12 files changed, 47 insertions(+), 2 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 3ce0207..65e333e 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -58,6 +58,10 @@ some head-scratching the next time this happens. - assertion, caused pcre2test to output a very large number of spaces when the - callout was taken, making the program appearing to loop. - -+12. A pattern that included (*ACCEPT) in the middle of a sufficiently deeply -+nested set of parentheses of sufficient size caused an overflow of the -+compiling workspace (which was diagnosed, but of course is not desirable). -+ - - Version 10.21 12-January-2016 - ----------------------------- -diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c -index e33d620..887fbfd 100644 ---- a/src/pcre2_compile.c -+++ b/src/pcre2_compile.c -@@ -5901,10 +5901,22 @@ for (;; ptr++) - goto FAILED; - } - cb->had_accept = TRUE; -+ -+ /* In the first pass, just accumulate the length required; -+ otherwise hitting (*ACCEPT) inside many nested parentheses can -+ cause workspace overflow. */ -+ - for (oc = cb->open_caps; oc != NULL; oc = oc->next) - { -- *code++ = OP_CLOSE; -- PUT2INC(code, 0, oc->number); -+ if (lengthptr != NULL) -+ { -+ *lengthptr += CU2BYTES(1) + IMM2_SIZE; -+ } -+ else -+ { -+ *code++ = OP_CLOSE; -+ PUT2INC(code, 0, oc->number); -+ } - } - setverb = *code++ = - (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT; -diff --git a/testdata/testinput8 b/testdata/testinput8 -index ca3b1b9..7e2a1f0 100644 ---- a/testdata/testinput8 -+++ b/testdata/testinput8 -@@ -182,4 +182,6 @@ - - /((?1)(?2)(?3)(?4)(?5)(?6)(?7)(?8)(?9)(?9)(?8)(?7)(?6)(?5)(?4)(?3)(?2)(?1)(?0)){2,}()()()()()()()()()/debug - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+ - # End of testinput8 -diff --git a/testdata/testoutput8-16-2 b/testdata/testoutput8-16-2 -index 05669bb..a5e8dec 100644 ---- a/testdata/testoutput8-16-2 -+++ b/testdata/testoutput8-16-2 -@@ -1027,4 +1027,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 186 at offset 490: regular expression is too complicated -+ - # End of testinput8 -diff --git a/testdata/testoutput8-16-3 b/testdata/testoutput8-16-3 -index 31884e1..36133b3 100644 ---- a/testdata/testoutput8-16-3 -+++ b/testdata/testoutput8-16-3 -@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-32-2 b/testdata/testoutput8-32-2 -index babd0c7..99c4fad 100644 ---- a/testdata/testoutput8-32-2 -+++ b/testdata/testoutput8-32-2 -@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-32-3 b/testdata/testoutput8-32-3 -index babd0c7..99c4fad 100644 ---- a/testdata/testoutput8-32-3 -+++ b/testdata/testoutput8-32-3 -@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-32-4 b/testdata/testoutput8-32-4 -index babd0c7..99c4fad 100644 ---- a/testdata/testoutput8-32-4 -+++ b/testdata/testoutput8-32-4 -@@ -1023,4 +1023,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-8-2 b/testdata/testoutput8-8-2 -index 6a9aa0a..6dc1f42 100644 ---- a/testdata/testoutput8-8-2 -+++ b/testdata/testoutput8-8-2 -@@ -1026,4 +1026,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-8-3 b/testdata/testoutput8-8-3 -index 2fe1168..ae14946 100644 ---- a/testdata/testoutput8-8-3 -+++ b/testdata/testoutput8-8-3 -@@ -1024,4 +1024,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 -diff --git a/testdata/testoutput8-8-4 b/testdata/testoutput8-8-4 -index 91993b2..6c79956 100644 ---- a/testdata/testoutput8-8-4 -+++ b/testdata/testoutput8-8-4 -@@ -1022,4 +1022,7 @@ Capturing subpattern count = 10 - May match empty string - Subject length lower bound = 0 - -+/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/ -+Failed: error 114 at offset 509: missing closing parenthesis -+ - # End of testinput8 --- -2.8.3 - diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm index fe9157af12..8b92e47a4d 100644 --- a/gnu/packages/pcre.scm +++ b/gnu/packages/pcre.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -73,16 +74,15 @@ POSIX regular expression API.") (define-public pcre2 (package (name "pcre2") - (version "10.21") + (version "10.23") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pcre/pcre2/" version "/pcre2-" version ".tar.bz2")) - (patches (search-patches "pcre2-CVE-2016-3191.patch")) (sha256 (base32 - "1q6lrj9b08l1q39vxipb0fi88x6ybvkr6439h8bjb9r8jd81fsn6")))) + "0vn5g0mkkp99mmzpissa06hpyj6pk9s4mlwbjqrjvw3ihy8rpiyz")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) ("readline" ,readline) @@ -95,7 +95,14 @@ POSIX regular expression API.") "--enable-unicode-properties" "--enable-pcre2-16" "--enable-pcre2-32" - "--enable-jit"))) + "--enable-jit") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda _ + (substitute* "RunGrepTest" + (("/bin/echo") (which "echo"))) + #t))))) (synopsis "Perl Compatible Regular Expressions") (description "The PCRE library is a set of functions that implement regular expression -- cgit v1.2.3 From ce7911ddae5d30ba73c8c9552b7d4e71268e5db3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 24 Feb 2017 17:21:07 +0100 Subject: gnu: Add python-faker. * gnu/packages/patches/python-fake-factory-fix-build-32bit.patch: Adjust paths. Also rename to ... * gnu/packages/patches/python-faker-fix-build-32bit.patch: ... this. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-faker, python2-faker): New variables. (python-fake-factory)[properties]: Superseded by PYTHON-FAKER. (python2-fake-factory)[properties]: Superseded by PYTHON2-FAKER. (python-orator, python2-orator)[propagated-inputs]: Replace PYTHON-FAKE-FACTORY with PYTHON-FAKER. --- gnu/local.mk | 2 +- .../python-fake-factory-fix-build-32bit.patch | 36 -------------- .../patches/python-faker-fix-build-32bit.patch | 36 ++++++++++++++ gnu/packages/python.scm | 55 +++++++++++++++++++++- 4 files changed, 90 insertions(+), 39 deletions(-) delete mode 100644 gnu/packages/patches/python-fake-factory-fix-build-32bit.patch create mode 100644 gnu/packages/patches/python-faker-fix-build-32bit.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ee40c1bd30..819fb4fcd3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -862,7 +862,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ - %D%/packages/patches/python-fake-factory-fix-build-32bit.patch \ + %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pygit2-disable-network-tests.patch \ diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch deleted file mode 100644 index cb60896fad..0000000000 --- a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch +++ /dev/null @@ -1,36 +0,0 @@ -These tests fail on 32-bit due to an overflow. - -Upstream bug URL: https://github.com/joke2k/faker/issues/408 - -diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py -index 6026772..58b6b83 100644 ---- a/faker/tests/__init__.py -+++ b/faker/tests/__init__.py -@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase): - provider = Provider - # test century - self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) -- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) - # test decade - self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) - self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) -@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase): - - # ensure all methods provide timezone aware datetimes - with self.assertRaises(TypeError): -- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now() -- with self.assertRaises(TypeError): - provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now() - with self.assertRaises(TypeError): - provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now() -@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase): - - # test century - self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) -- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) - # test decade - self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) - self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) --- -2.11.1 - diff --git a/gnu/packages/patches/python-faker-fix-build-32bit.patch b/gnu/packages/patches/python-faker-fix-build-32bit.patch new file mode 100644 index 0000000000..466b289012 --- /dev/null +++ b/gnu/packages/patches/python-faker-fix-build-32bit.patch @@ -0,0 +1,36 @@ +These tests fail on 32-bit due to an overflow. + +Upstream bug URL: https://github.com/joke2k/faker/issues/408 + +diff --git a/tests/__init__.py b/tests/__init__.py +index 6026772..58b6b83 100644 +--- a/tests/__init__.py ++++ b/tests/__init__.py +@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase): + provider = Provider + # test century + self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) +- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) + # test decade + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) +@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase): + + # ensure all methods provide timezone aware datetimes + with self.assertRaises(TypeError): +- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now() +- with self.assertRaises(TypeError): + provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now() + with self.assertRaises(TypeError): + provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now() +@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase): + + # test century + self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) +- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) + # test decade + self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) + self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) +-- +2.11.1 + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 70fd1557b4..76e6ead644 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11434,6 +11434,55 @@ parsing UK postcodes.") (define-public python2-ukpostcodeparser (package-with-python2 python-ukpostcodeparser)) +(define-public python-faker + (package + (name "python-faker") + (version "0.7.9") + (source (origin + (method url-fetch) + (uri (pypi-uri "Faker" version)) + (sha256 + (base32 + "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm")) + (patches + (search-patches "python-faker-fix-build-32bit.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file (find-files "." "\\.pyc$")) + #t)))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (zero? (system* "python" "-m" "unittest" "-v" "tests"))))))) + (native-inputs + `(;; For testing + ("python-email-validator" ,python-email-validator) + ("python-mock" ,python-mock) + ("python-ukpostcodeparser" ,python-ukpostcodeparser))) + (propagated-inputs + `(("python-dateutil" ,python-dateutil) + ("python-six" ,python-six))) + (home-page "https://github.com/joke2k/faker") + (synopsis "Python package that generates fake data") + (description + "Faker is a Python package that generates fake data such as names, +addresses, and phone numbers.") + (license license:expat) + (properties `((python2-variant . ,(delay python2-faker)))))) + +(define-public python2-faker + (let ((base (package-with-python2 (strip-python2-variant + python-faker)))) + (package + (inherit base) + (propagated-inputs + `(("python2-ipaddress" ,python2-ipaddress) + ,@(package-propagated-inputs base)))))) + (define-public python-fake-factory (package (name "python-fake-factory") @@ -11468,13 +11517,15 @@ parsing UK postcodes.") "Faker is a Python package that generates fake data such as names, addresses, and phone numbers.") (license license:expat) - (properties `((python2-variant . ,(delay python2-fake-factory)))))) + (properties `((python2-variant . ,(delay python2-fake-factory)) + (superseded . ,python-faker))))) (define-public python2-fake-factory (let ((base (package-with-python2 (strip-python2-variant python-fake-factory)))) (package (inherit base) + (properties `((superseded . ,python2-faker))) (propagated-inputs `(("python2-ipaddress" ,python2-ipaddress) ,@(package-propagated-inputs base)))))) @@ -11541,7 +11592,7 @@ mocks, stubs and fakes.") `(("python-arrow" ,python-arrow) ("python-blinker" ,python-blinker) ("python-cleo" ,python-cleo) - ("python-fake-factory" ,python-fake-factory) + ("python-faker" ,python-faker) ("python-inflection" ,python-inflection) ("python-lazy-object-proxy" ,python-lazy-object-proxy) ("python-pyaml" ,python-pyaml) -- cgit v1.2.3 From b03ee02f0d111bf75f8a87c9948c372974dcb243 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Mar 2017 17:54:48 +0100 Subject: gnu: python-pandas: Fix build on 32-bit. * gnu/packages/patches/python-pandas-skip-failing-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python.scm (python-pandas, python2-pandas): Use it. --- gnu/local.mk | 1 + .../patches/python-pandas-skip-failing-tests.patch | 59 ++++++++++++++++++++++ gnu/packages/python.scm | 4 +- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pandas-skip-failing-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 819fb4fcd3..4297cbb965 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -863,6 +863,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ + %D%/packages/patches/python-pandas-skip-failing-tests.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pygit2-disable-network-tests.patch \ diff --git a/gnu/packages/patches/python-pandas-skip-failing-tests.patch b/gnu/packages/patches/python-pandas-skip-failing-tests.patch new file mode 100644 index 0000000000..31fc912d00 --- /dev/null +++ b/gnu/packages/patches/python-pandas-skip-failing-tests.patch @@ -0,0 +1,59 @@ +These tests fail on 32bit architectures. + +Upstream bug URL: https://github.com/pandas-dev/pandas/issues/14866 + +--- a/pandas/tests/test_base.py 2017-03-08 17:49:44.422282717 +0100 ++++ b/pandas/tests/test_base.py 2017-03-08 17:50:59.476701799 +0100 +@@ -363,30 +363,6 @@ + self.assertFalse(result.iat[0]) + self.assertFalse(result.iat[1]) + +- def test_ndarray_compat_properties(self): +- +- for o in self.objs: +- +- # check that we work +- for p in ['shape', 'dtype', 'flags', 'T', 'strides', 'itemsize', +- 'nbytes']: +- self.assertIsNotNone(getattr(o, p, None)) +- self.assertTrue(hasattr(o, 'base')) +- +- # if we have a datetimelike dtype then needs a view to work +- # but the user is responsible for that +- try: +- self.assertIsNotNone(o.data) +- except ValueError: +- pass +- +- self.assertRaises(ValueError, o.item) # len > 1 +- self.assertEqual(o.ndim, 1) +- self.assertEqual(o.size, len(o)) +- +- self.assertEqual(Index([1]).item(), 1) +- self.assertEqual(Series([1]).item(), 1) +- + def test_ops(self): + for op in ['max', 'min']: + for o in self.objs: +--- a/pandas/tools/tests/test_tile.py 2017-03-08 17:47:39.762261841 +0100 ++++ b/pandas/tools/tests/test_tile.py 2017-03-08 17:48:26.831780495 +0100 +@@ -271,19 +271,6 @@ + np.array([0, 0, 1, 1], dtype=np.int8)) + tm.assert_numpy_array_equal(bins, np.array([0, 1.5, 3])) + +- def test_single_bin(self): +- # issue 14652 +- expected = Series([0, 0]) +- +- s = Series([9., 9.]) +- result = cut(s, 1, labels=False) +- tm.assert_series_equal(result, expected) +- +- s = Series([-9., -9.]) +- result = cut(s, 1, labels=False) +- tm.assert_series_equal(result, expected) +- +- + def curpath(): + pth, _ = os.path.split(os.path.abspath(__file__)) + return pth diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 76e6ead644..15c8a8eff4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1171,7 +1171,9 @@ datetime module, available in Python 2.3+.") (method url-fetch) (uri (pypi-uri "pandas" version)) (sha256 - (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg")))) + (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg")) + (patches + (search-patches "python-pandas-skip-failing-tests.patch")))) (build-system python-build-system) (propagated-inputs `(("python-numpy" ,python-numpy) -- cgit v1.2.3 From 7b1866d7835423554308f54e7736734731cfc0cb Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 9 Mar 2017 06:08:18 -0500 Subject: gnu: python-fake-factory: Add back missing patch file. This reverts the removal of "python-fake-factory-fix-build-32bit.patch" by commit ce7911ddae5d30ba73c8c9552b7d4e71268e5db3. * gnu/packages/patches/python-fake-factory-fix-build-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../python-fake-factory-fix-build-32bit.patch | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gnu/packages/patches/python-fake-factory-fix-build-32bit.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4297cbb965..cbd61e0972 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -862,6 +862,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ + %D%/packages/patches/python-fake-factory-fix-build-32bit.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ %D%/packages/patches/python-pandas-skip-failing-tests.patch \ %D%/packages/patches/python-paste-remove-website-test.patch \ diff --git a/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch new file mode 100644 index 0000000000..cb60896fad --- /dev/null +++ b/gnu/packages/patches/python-fake-factory-fix-build-32bit.patch @@ -0,0 +1,36 @@ +These tests fail on 32-bit due to an overflow. + +Upstream bug URL: https://github.com/joke2k/faker/issues/408 + +diff --git a/faker/tests/__init__.py b/faker/tests/__init__.py +index 6026772..58b6b83 100644 +--- a/faker/tests/__init__.py ++++ b/faker/tests/__init__.py +@@ -384,7 +384,6 @@ class FactoryTestCase(unittest.TestCase): + provider = Provider + # test century + self.assertTrue(self._datetime_to_time(provider.date_time_this_century(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) +- self.assertTrue(self._datetime_to_time(provider.date_time_this_century(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) + # test decade + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(after_now=False)) <= self._datetime_to_time(datetime.datetime.now())) + self.assertTrue(self._datetime_to_time(provider.date_time_this_decade(before_now=False, after_now=True)) >= self._datetime_to_time(datetime.datetime.now())) +@@ -413,8 +412,6 @@ class FactoryTestCase(unittest.TestCase): + + # ensure all methods provide timezone aware datetimes + with self.assertRaises(TypeError): +- provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now() +- with self.assertRaises(TypeError): + provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now() + with self.assertRaises(TypeError): + provider.date_time_this_year(after_now=False, tzinfo=utc) <= datetime.datetime.now() +@@ -423,7 +420,6 @@ class FactoryTestCase(unittest.TestCase): + + # test century + self.assertTrue(provider.date_time_this_century(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) +- self.assertTrue(provider.date_time_this_century(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) + # test decade + self.assertTrue(provider.date_time_this_decade(after_now=False, tzinfo=utc) <= datetime.datetime.now(utc)) + self.assertTrue(provider.date_time_this_decade(before_now=False, after_now=True, tzinfo=utc) >= datetime.datetime.now(utc)) +-- +2.11.1 + -- cgit v1.2.3