aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-04-17 01:43:22 -0400
committerMark H Weaver <mhw@netris.org>2018-04-17 02:15:06 -0400
commit6c293a809bba57d4363517fa0bd8ebc34247c577 (patch)
treeec23e10d518b465eb727a59ffe75ccb083d7ac42
parent891199c67d750e38a7ccd96792501d661dc727ce (diff)
downloadguix-6c293a809bba57d4363517fa0bd8ebc34247c577.tar
guix-6c293a809bba57d4363517fa0bd8ebc34247c577.tar.gz
download: Fix 'url-fetch/tarbomb' and 'url-fetch/zipbomb'.
Fixes a regression introduced in 20927c9331b493eaf94211ad9f8a5055e11b4588. Reported by Eric Bavier <ericbavier@centurylink.net>. * guix/download.scm (url-fetch/tarbomb, url-fetch/zipbomb): Within the gexp, import (guix build utils) for 'invoke'.
-rw-r--r--guix/download.scm26
1 files changed, 15 insertions, 11 deletions
diff --git a/guix/download.scm b/guix/download.scm
index a91d924af8..377e8186f3 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -510,12 +510,14 @@ own. This helper makes it easier to deal with \"tar bombs\"."
#:guile guile)))
;; Take the tar bomb, and simply unpack it as a directory.
(gexp->derivation (or name file-name)
- #~(begin
- (mkdir #$output)
- (setenv "PATH" (string-append #$gzip "/bin"))
- (chdir #$output)
- (invoke (string-append #$tar "/bin/tar")
- "xf" #$drv))
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir #$output)
+ (setenv "PATH" (string-append #$gzip "/bin"))
+ (chdir #$output)
+ (invoke (string-append #$tar "/bin/tar")
+ "xf" #$drv)))
#:local-build? #t)))
(define* (url-fetch/zipbomb url hash-algo hash
@@ -540,11 +542,13 @@ own. This helper makes it easier to deal with \"zip bombs\"."
#:guile guile)))
;; Take the zip bomb, and simply unpack it as a directory.
(gexp->derivation (or name file-name)
- #~(begin
- (mkdir #$output)
- (chdir #$output)
- (invoke (string-append #$unzip "/bin/unzip")
- #$drv))
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir #$output)
+ (chdir #$output)
+ (invoke (string-append #$unzip "/bin/unzip")
+ #$drv)))
#:local-build? #t)))
(define* (download-to-store store url #:optional (name (basename url))