From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id krkWF7UQJF+xXgAA0tVLHw (envelope-from ) for ; Fri, 31 Jul 2020 12:38:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aJWVErUQJF8aWgAAB5/wlQ (envelope-from ) for ; Fri, 31 Jul 2020 12:38:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A7B49400BF for ; Fri, 31 Jul 2020 12:38:12 +0000 (UTC) Received: from localhost ([::1]:44028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1UIc-0002B0-Rg for larch@yhetil.org; Fri, 31 Jul 2020 08:38:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1UIV-0002Am-2S for guix-patches@gnu.org; Fri, 31 Jul 2020 08:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1UIU-0001q3-Po for guix-patches@gnu.org; Fri, 31 Jul 2020 08:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k1UIU-0002pC-MN for guix-patches@gnu.org; Fri, 31 Jul 2020 08:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42630] [PATCH] gnu: r-httpuv: Unvendor libuv. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 31 Jul 2020 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42630 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42630@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159619906110808 (code B ref -1); Fri, 31 Jul 2020 12:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jul 2020 12:37:41 +0000 Received: from localhost ([127.0.0.1]:37522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1UI4-0002oA-Ij for submit@debbugs.gnu.org; Fri, 31 Jul 2020 08:37:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:46480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1UHz-0002ny-C1 for submit@debbugs.gnu.org; Fri, 31 Jul 2020 08:37:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1UHz-000293-4t for guix-patches@gnu.org; Fri, 31 Jul 2020 08:37:31 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:51044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1UHu-0001k8-LV for guix-patches@gnu.org; Fri, 31 Jul 2020 08:37:30 -0400 Received: by mail-wm1-x331.google.com with SMTP id c80so8427775wme.0 for ; Fri, 31 Jul 2020 05:37:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leibniz-psychology-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=hOiHOhnX9OU+rWqTWfwSJx5ZmPoFlmLKPK805QlumJ4=; b=1cu7cg+Gu7ChteHrcKqNjr0GT9kEtpqYeks8lkT9Jn4xEs+DNFHYrcN+tQxs56bssI drWAv5eb7MWzXWRijLzFvVT4CgV6lun69hczLQy0XlyzxQVnQa6SL5lMrm6jRUx3JPKP Wt88+ka1bhNfggKKbH3TIAe4LGdPsaLPk7pkB9ztlgCEj2OXmXo2X9y4Ff/KBjyklA+j /+HlxpXeDex+8q5Uhg0AnhXQPCrGUZklU6yzNheIaZxqLMAMOF6mL2p2lRlBbOjhX16C BTitCk/rvlCor5FP15+ImOGJqa/k5Qpfl8oqJBfsxm/1vYMeYnqHnnC6rN5DRSuzv9M5 E6iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=hOiHOhnX9OU+rWqTWfwSJx5ZmPoFlmLKPK805QlumJ4=; b=Dl5ctUqBUwYU9deehcRFiVyzNGiBeo2G4ia2fezSRn2I0rYXM2hzVjXbAUJnLZ59WF ayZPTHZLD9bQiQs2+I2m/XEnMm+vH22Q0bAtE0ss2YHw1o6gGKwiQijSAVKXDUDMw4TE 2Fs0Wj9WAVL7rheDi6Qn9YsF8PIbV4QN8BlH1AAHvgOvQT5gj4D9pvBkNXwh2911J4k5 noYR9inpAEB/ginmjORPNwuNDDUFIbUujt/6jhap5zLd1sa/UGmdRw7FiPa3DlJrp1pZ G1ZCGCEZCJOJlwbNRzDv/SCau8ZktvIl+NwhIXB+iQCqMn+NlnAyCVeeDmB4vsnO7XQb /pCw== X-Gm-Message-State: AOAM53148D/VHrsvVIHEev4HYPl+q+N+l6aNWfxGeEVAvY99XyDCyqZQ zhyMGrRiAjl71U6E4Q8p/hv4EhQ6slkUh3v4cP1MhrTNw9TY4vgCwUfLwNncdSxxpri97g1P5A6 FlwGtya4tIacHuapYO7RWD4kChBRm+dDRkmJVcshXjrFD3JxduAjW5T/dvdNSLWDlupyT6T/o1o 1B+5ITG1M= X-Google-Smtp-Source: ABdhPJzOAxcpK8heY9eI5MABWuQMdDPOomJIK/5+zPAgj35lBPp25OWW0/zQDSxYVjagUujBI1P5qw== X-Received: by 2002:a1c:6a05:: with SMTP id f5mr3655056wmc.162.1596199041734; Fri, 31 Jul 2020 05:37:21 -0700 (PDT) Received: from localhost (dynamic-2a01-0c23-7895-8a00-65f9-00f7-6972-e040.c23.pool.telefonica.de. [2a01:c23:7895:8a00:65f9:f7:6972:e040]) by smtp.gmail.com with ESMTPSA id c10sm12098970wro.84.2020.07.31.05.37.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 05:37:20 -0700 (PDT) Date: Fri, 31 Jul 2020 14:37:20 +0200 From: Lars-Dominik Braun Message-ID: <20200731123720.GA14322@zpidnp36> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: none client-ip=2a00:1450:4864:20::331; envelope-from=ldb@leibniz-psychology.org; helo=mail-wm1-x331.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=leibniz-psychology-org.20150623.gappssmtp.com header.s=20150623 header.b=1cu7cg+G; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.61 X-TUID: PJJX1Yz3uUm8 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * gnu/packages/cran.scm (r-httpuv) [source]: Remove bundled libuv, add patch. [arguments] Rewrite header locations, fix pipe server issue. [inputs] Add libuv. * gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch: New file. * gnu/local.mk: Add it. --- gnu/local.mk | 1 + gnu/packages/cran.scm | 32 +++++++++- .../r-httpuv-1.5.4-unvendor-libuv.patch | 59 +++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch diff --git a/gnu/local.mk b/gnu/local.mk index a2a1caa709..41cec534e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1497,6 +1497,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ + %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 5ede11a4e3..c7619dc621 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -22,6 +22,7 @@ ;;; Copyright =A9 2020 Naga Malleswari ;;; Copyright =A9 2020 Eric Brown ;;; Copyright =A9 2020 Peter Lo +;;; Copyright =A9 2020 Lars-Dominik Braun ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +46,7 @@ #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system r) + #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages base) @@ -67,6 +69,7 @@ #:use-module (gnu packages imagemagick) #:use-module (gnu packages java) #:use-module (gnu packages javascript) + #:use-module (gnu packages libevent) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages machine-learning) #:use-module (gnu packages maths) @@ -800,8 +803,35 @@ into a pipeline of data manipulation and visualisation= =2E") (uri (cran-uri "httpuv" version)) (sha256 (base32 - "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm")))) + "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm")) + ;; Unvendor bundled libraries. As of 1.5.4 the vendored libuv + ;; only contains fixes for building on Solaris. + (patches (search-patches "r-httpuv-1.5.4-unvendor-libuv.patc= h")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + `(begin + (delete-file-recursively "src/libuv") + ;; Cannot unbundle http-parser, because it contains local + ;; modifications. + #t)))) (build-system r-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unbundle-libuv + (lambda* (#:key outputs #:allow-other-keys) + (substitute* (find-files "src" "\\.cpp$|\\.h$") + (("\"libuv/include/uv\\.h\"") + "")) + ;; Fix https://github.com/rstudio/httpuv/issues/282 + (substitute* "src/http.cpp" + (("uv_pipe_init\\(pLoop, &pSocket->handle\\.pipe, true\\);") + "uv_pipe_init(pLoop, &pSocket->handle.pipe, 0);")) + #t))))) + (inputs + `(("libuv" ,libuv))) (propagated-inputs `(("r-bh" ,r-bh) ("r-later" ,r-later) diff --git a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch b/gnu= /packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch new file mode 100644 index 0000000000..0947718059 --- /dev/null +++ b/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch @@ -0,0 +1,59 @@ +Removes references to bundled libuv. + +--- a/src/Makevars 2020-07-31 11:53:30.576484531 +0200 ++++ b/src/Makevars 2020-07-31 11:54:19.369863118 +0200 +@@ -5,7 +5,7 @@ +=20 + UNAME :=3D $(shell uname) +=20 +-PKG_LIBS =3D ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha= 1.o ./base64/base64.o -pthread ++PKG_LIBS =3D -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base= 64.o -pthread +=20 + ifeq ($(UNAME), Darwin) + PKG_LIBS +=3D -framework CoreServices +@@ -23,7 +23,7 @@ +=20 + PKG_CFLAGS =3D $(C_VISIBILITY) -DSTRICT_R_HEADERS + PKG_CXXFLAGS =3D $(CXX_VISIBILITY) -DSTRICT_R_HEADERS +-PKG_CPPFLAGS =3D -Ilibuv/include -pthread ++PKG_CPPFLAGS =3D -pthread +=20 + # To avoid spurious warnings from `R CMD check --as-cran`, about compiler + # warning flags like -Werror. +@@ -43,35 +43,5 @@ + # PKG_CPPFLAGS +=3D -D_GLIBCXX_ASSERTIONS +=20 +=20 +-$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base6= 4/base64.o ++$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o +=20 +-# We needed to rename lt~obsolete.m4 because the name causes problems wit= h R +-# CMD check. Here we rename it back. +-libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 +- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 +- +-# Run ./configure. We need to touch various autotools-related files to av= oid +-# it trying to run autotools programs again. We also need to make sure +-# configure is executable, because on some platforms, calling unzip() in R +-# does not preserve the executable bit. +-# +-# It's VERY IMPORTANT that mtime(aclocal.m4) <=3D mtime(configure), and a= lso +-# mtime(aclocal.m4) <=3D mtime(Makefile.in). On some platforms, passing m= ultiple +-# files to a single touch command gives them all the same time, but on ot= hers +-# (Solaris and possibly some Fedoras) the timestamps are slightly increas= ing +-# from one to the next, i.e. the order matters. To remove this fragility,= we +-# use "-r aclocal.m4" to ensure that all three files are guaranteed to ha= ve +-# precisely the same timestamp value. +-libuv/Makefile: libuv/m4/lt~obsolete.m4 +- (cd libuv \ +- && touch aclocal.m4 \ +- && touch -r aclocal.m4 configure Makefile.in \ +- && chmod +x configure \ +- && CC=3D"$(CC)" CFLAGS=3D"$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR=3D= "$(AR)" RANLIB=3D"$(RANLIB)" LDFLAGS=3D"$(LDFLAGS)" ./configure $(CONFIGURE= _FLAGS)) +- +-libuv/.libs/libuv.a: libuv/Makefile +- $(MAKE) --directory=3Dlibuv \ +- HAVE_DTRACE=3D0 +- +-clean: +- $(MAKE) --directory=3Dlibuv distclean --=20 2.26.2 --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEyk+M9DfXR4/aBV/UQhN3ARo3hEYFAl8kEH0ACgkQQhN3ARo3 hEaO1Av/QXeQmBpFpVZNHilThm22JYx94XAvgCwqhd6pQFzn3I8iC0PS0aUsFcCp zh88bZsadVSGv1otVESoRGdorznrFSov5zaYHPBhkEeRXC7RgA1prxxHIh22smSW FAM9a2ozXfuEVebMLa9L/w7NVcnnlW5etgf4ufFaMM9JjUqFcylOCSTtTKVW3RKA dclgxiVl7ZC54omhu6n8DXRpgKRCYjtXbCjsbQcx6r+M79MV2mWQ4/WobxPe9Cr7 f0WjXiWQwap96zy3WN9Ws9KJqq+x4zngCdz1ntS3GVKybhfOhmPVahVTh7W3T/zQ tb4PC9dP1KCMQe/Cy6eDMFv+FgAK+SDRl+VJQbOX6XRHJEmhDul7R79b3UHZMPJb Q7eHTsUUtiedcyIK4J/N6/174kaH986Q6HZYEXnkfSL/whFMPGVEmILNnF1Z1vbM NqnblC8diUKmkg5ozSDDtMnr45jPhf0J5UCUftJGn6Zh5msffuhPmIgIFOg1UUwF 31OCWU78 =YPqz -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--