From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH] tar bombs and muscle Date: Sun, 17 Jan 2016 11:30:03 +1000 Message-ID: <569AEE9B.6070709@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080205030901010801060007" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKcAZ-0007cc-0Z for guix-devel@gnu.org; Sat, 16 Jan 2016 20:30:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKcAV-0001Ld-Pb for guix-devel@gnu.org; Sat, 16 Jan 2016 20:30:14 -0500 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:36134 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKcAV-0001KN-6A for guix-devel@gnu.org; Sat, 16 Jan 2016 20:30:11 -0500 Received: from smtp1.soe.uq.edu.au (smtp1.soe.uq.edu.au [10.138.113.40]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id u0H1U6GB027589 for ; Sun, 17 Jan 2016 11:30:07 +1000 Received: from [192.168.1.105] (static.customers.nuskope.com.au [103.25.181.216] (may be forged)) (authenticated bits=0) by smtp1.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id u0H1U4dc030036 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sun, 17 Jan 2016 11:30:05 +1000 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" This is a multi-part message in MIME format. --------------080205030901010801060007 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, There is a somewhat popular bioinformatics program muscle whose download tgz is a tar bomb. The bomb moniker seems especially appropriate here, since it made the gnu-build-system error out, and patching gnu-build-system requires a lot of rebuilding. In the attached patches I fixed gnu-build-system so that the "chdir" is omitted when there is no directory to chdir into, and then added muscle itself. Is it OK in these rare instances to put the archive contents into the directory as-is, or is something more complex like making a directory and moving everything there more appropriate? I imagine it might be best to let this slide into the next core-updates. Thanks, ben --------------080205030901010801060007 Content-Type: text/x-patch; name="0002-gnu-Add-muscle.patch" Content-Disposition: attachment; filename="0002-gnu-Add-muscle.patch" Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by newmailhub.uq.edu.au id u0H1U6GB027589 >From 9400f88a9f70d47f1e835a98842b894e640d0e4a Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 16 Jan 2016 22:12:23 +1000 Subject: [PATCH 2/2] gnu: Add muscle. * gnu/packages/bioinformatics.scm (muscle): New variable. --- gnu/packages/bioinformatics.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatic= s.scm index a905ccf..4a7a2c2 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2176,6 +2176,37 @@ the ability to go from raw sequences to the genera= tion of visualization tools to describe ecological =CE=B1 and =CE=B2 diversity measurements.") (license license:gpl3))) =20 +(define-public muscle + (package + (name "muscle") + (version "3.8.1551") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.drive5.com/muscle/muscle_src_" + version ".tar.gz")) + (sha256 + (base32 + "0bj8kj7sdizy3987zx6w7axihk40fk8rn76mpbqqjcnd64i5a367"))= )) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list "LDLIBS =3D -lm") + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "muscle" bin))))))) + (home-page "http://www.drive5.com/muscle") + (synopsis "Multiple sequence alignment program") + (description + "MUSCLE aims to be a fast and accurate multiple sequence +alignment program for nucleotide and protein sequences.") + (license license:public-domain))) + (define-public orfm (package (name "orfm") --=20 2.6.3 --------------080205030901010801060007 Content-Type: text/x-patch; name="0001-build-Accept-source-archives-that-do-not-contain-a-d.patch" Content-Disposition: attachment; filename*0="0001-build-Accept-source-archives-that-do-not-contain-a-d.pa"; filename*1="tch" Content-Transfer-Encoding: 7bit >From 9e272374a3531d1df6d36e595dad0b715731e4cd Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 16 Jan 2016 22:02:22 +1000 Subject: [PATCH 1/2] build: Accept source archives that do not contain a directory. * guix/build/gnu-build-system.scm (unpack): Do not attempt to change directory after extracting archive if the archive does not contain any directories. --- guix/build/gnu-build-system.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ff7646b..f1a84ef 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -142,7 +142,10 @@ working directory." (and (if (string-suffix? ".zip" source) (zero? (system* "unzip" source)) (zero? (system* "tar" "xvf" source))) - (chdir (first-subdirectory "."))))) + (let ((subdirectory (first-subdirectory "."))) + (if subdirectory + (chdir (first-subdirectory ".")) + #t))))) ;; See . (define* (patch-usr-bin-file #:key native-inputs inputs -- 2.6.3 --------------080205030901010801060007--