unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
@ 2019-09-19 10:35 Pierre Neidhardt
  2019-09-26 21:09 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Neidhardt @ 2019-09-19 10:35 UTC (permalink / raw)
  To: 37457

* gnu/packages/compression.scm (makeself-safeextract): New variable.
---
 gnu/packages/compression.scm | 49 +++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index bda43bfd18..9785fa7a60 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -22,7 +22,7 @@
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -48,6 +48,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
@@ -2000,3 +2001,49 @@ external compressors: the compressor to be used for each format is configurable
 at run time, and must be installed separately.")
     (license (list license:bsd-2        ; arg_parser.{cc,h}
                    license:gpl2+))))    ; the rest
+
+(define-public makeself-safeextract
+  (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
+    (package
+      (name "makeself-safeextract")
+      (version (git-version "0.0.0" "1" commit))
+      (home-page "https://github.com/ssokolow/makeself_safeextract")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
+      (build-system trivial-build-system)
+      (inputs
+       `(("python" ,python-2)
+         ("p7zip" ,p7zip)
+         ("unzip" ,unzip)))
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder
+         (begin
+           (use-modules (guix build utils))
+           (let* ((name "makeself_safeextract")
+                  (source (string-append (assoc-ref %build-inputs "source")
+                                         "/" name ".py"))
+                  (bin (string-append (assoc-ref %outputs "out") "/bin"))
+                  (target (string-append bin "/" name))
+                  (python (string-append (assoc-ref %build-inputs "python") "/bin"))
+                  (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
+                  (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+             (setenv "PATH" (string-append (getenv "PATH") ":" python))
+             (mkdir-p bin)
+             (copy-file source target)
+             (substitute* target
+               (("'7z'") (format #f "'~a'" 7z))
+               (("'unzip'") (format #f "'~a'" unzip)))
+             (patch-shebang target)))))
+      (synopsis "Extract makeself and mojo archives without running untrusted code")
+      (description "A simple script to unpack makeself-generated
+self-extractors without running the possibly untrusted shell script.")
+      (license license:gpl3+))))
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
  2019-09-19 10:35 [bug#37457] [PATCH] gnu: Add makeself-safeextract Pierre Neidhardt
@ 2019-09-26 21:09 ` Ludovic Courtès
  2019-09-27  7:58   ` Pierre Neidhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2019-09-26 21:09 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 37457

Hello,

Pierre Neidhardt <mail@ambrevar.xyz> skribis:

> * gnu/packages/compression.scm (makeself-safeextract): New variable.

[...]

> +      (synopsis "Extract makeself and mojo archives without running untrusted code")
> +      (description "A simple script to unpack makeself-generated
> +self-extractors without running the possibly untrusted shell script.")

What about:

  This package provides a script to unpack self-extracting archives
  generated by @command{makeself} or @command{mojo} without running the
  possibly untrusted extraction shell script.

?

(I didn’t know about these things.)

Otherwise LGTM, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
  2019-09-26 21:09 ` Ludovic Courtès
@ 2019-09-27  7:58   ` Pierre Neidhardt
  2019-09-27 20:01     ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Neidhardt @ 2019-09-27  7:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37457

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

Done, thanks!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
  2019-09-27  7:58   ` Pierre Neidhardt
@ 2019-09-27 20:01     ` Ricardo Wurmus
  2019-09-27 20:07       ` Pierre Neidhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2019-09-27 20:01 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 37457-done


Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Done, thanks!

Thanks, closing.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
  2019-09-27 20:01     ` Ricardo Wurmus
@ 2019-09-27 20:07       ` Pierre Neidhardt
  2019-09-27 21:58         ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Neidhardt @ 2019-09-27 20:07 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 37457-done

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Ricardo Wurmus <rekado@elephly.net> writes:

> Thanks, closing.

Hmm?  I had already closed it, hadn't I?
I received a confirmation from control@debbugs.gnu.org.

--8<---------------cut here---------------start------------->8---
Processing commands for control@debbugs.gnu.org:

> close 37457
bug#37457: [PATCH] gnu: Add makeself-safeextract.
bug closed, send any further explanations to
37457@debbugs.gnu.org and Pierre Neidhardt <mail@ambrevar.xyz>

> quit
Stopping processing here.
--8<---------------cut here---------------end--------------->8---

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#37457] [PATCH] gnu: Add makeself-safeextract.
  2019-09-27 20:07       ` Pierre Neidhardt
@ 2019-09-27 21:58         ` Ricardo Wurmus
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2019-09-27 21:58 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 37457-done


Pierre Neidhardt <mail@ambrevar.xyz> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Thanks, closing.
>
> Hmm?  I had already closed it, hadn't I?
> I received a confirmation from control@debbugs.gnu.org.

Oh, my bad.  I only saw a last email without message to
*-done@debbugs.gnu.org; didn’t stop to check the current status of the
issue first.

--
Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-27 21:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19 10:35 [bug#37457] [PATCH] gnu: Add makeself-safeextract Pierre Neidhardt
2019-09-26 21:09 ` Ludovic Courtès
2019-09-27  7:58   ` Pierre Neidhardt
2019-09-27 20:01     ` Ricardo Wurmus
2019-09-27 20:07       ` Pierre Neidhardt
2019-09-27 21:58         ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).