[PATCH] gnu : Add unshield.

  • Done
  • quality assurance status badge
Details
3 participants
  • Alex Kost
  • manolis837
  • Marius Bakke
Owner
unassigned
Submitted by
manolis837
Severity
normal
M
M
manolis837 wrote on 23 Apr 2017 19:23
(address . guix-patches@gnu.org)(name . Manolis Ragkousis)(address . manolis837@gmail.com)
20170423172345.9116-1-manolis837@gmail.com
From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/compression.scm (unshield): New variable.
---
gnu/packages/compression.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 4793755c2..79029df5f 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,6 +41,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (guix build-system cmake)
#:use-module (gnu packages)
#:use-module (gnu packages assembly)
#:use-module (gnu packages autotools)
@@ -50,6 +52,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages valgrind)
+ #:use-module (gnu packages tls)
#:use-module (ice-9 match)
#:use-module ((srfi srfi-1) #:select (last)))
@@ -1159,6 +1162,28 @@ or junctions, and always follows hard links.")
;; expat-licenced (or ‘MIT’) code.
license:expat))))
+(define-public unshield
+ (package
+ (name "unshield")
+ (version "1.4.2")
+ (source
+ (origin (method url-fetch)
+ (uri (string-append "http://github.com/twogood/unshield/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("zlib" ,zlib)
+ ("openssl" ,openssl)))
+ (arguments
+ `(#:tests? #f)) ; no test target
+ (home-page "https://github.com/twogood/unshield")
+ (synopsis "Tool to extract CAB files.")
+ (description "Extracts CAB files from InstallShield installers")
+ (license license:expat)))
+
(define-public unrar
(package
(name "unrar")
--
2.12.2
M
M
Marius Bakke wrote on 24 Apr 2017 16:52
87zif5zwlb.fsf@fastmail.com
manolis837@gmail.com writes:

Toggle quote (2 lines)
> * gnu/packages/compression.scm (unshield): New variable.

[...]

Toggle quote (14 lines)
> @@ -40,6 +41,7 @@
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system perl)
> #:use-module (guix build-system python)
> + #:use-module (guix build-system cmake)
> #:use-module (gnu packages)
> #:use-module (gnu packages assembly)
> #:use-module (gnu packages autotools)
> @@ -50,6 +52,7 @@
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages python)
> #:use-module (gnu packages valgrind)
> + #:use-module (gnu packages tls)

Please try to keep module imports, inputs, etc alphabetically sorted,
when they are so from before.
Toggle quote (18 lines)
> +(define-public unshield
> + (package
> + (name "unshield")
> + (version "1.4.2")
> + (source
> + (origin (method url-fetch)
> + (uri (string-append "http://github.com/twogood/unshield/archive/"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x"))))
> + (build-system cmake-build-system)
> + (inputs
> + `(("zlib" ,zlib)
> + ("openssl" ,openssl)))
> + (arguments
> + `(#:tests? #f)) ; no test target

There is a test script shipped with the source, can you try replacing
the "check" phase with code that executes "./run_tests"?

Toggle quote (4 lines)
> + (synopsis "Tool to extract CAB files.")
> + (description "Extracts CAB files from InstallShield installers")

So synopses should not end with punctuations, but descriptions do. `guix
lint` should warn about this. It would be good to have a little more
information here as well.

Maybe something like this (minimal variant):

(synopsis "Extract CAB files from InstallShield installers")
(description
"@command{unshield} is a tool and library for extracting @file{.cab}
archives from InstallShield installers.")

If this software works with the "normal" .cab files commonly found in MS
Windows systems, it would be good to encapsulate that information too.
Otherwise LGTM.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlj+EUAACgkQoqBt8qM6
VPphpgf7BXdaTgGljU2tuKzD+zMpZDNXretrdh+rHoAjjBRllGKA70q5mNJ5DfPN
CQVJ5rupsAOy4b6RSpnbXoZn7E3AX5e+BcWuZ4g24/GeJJKHRVWx2spUA0+yfLv1
+zlK6p3cjBXEGFm6J7N567a1qMnoGmxgDU9yHD25vgHX1LIxETy/TfEyHHXjuHve
+aoxY4RyQCq3P5KJVkjPjNG2uR6vX9IIQ8vs0cuumyynIq2Pg4A0TNAhqFqqVNaW
zYmD8AxAIGHJTGk8ZPcBSALk7Ca6L4jUjwmqpy7wX0J/xdWlZGMh4jZRp9GYty7d
DOKZ/qREUBF0i6WXbhTQyWgffN1CDg==
=SBGn
-----END PGP SIGNATURE-----

M
M
manolis837 wrote on 2 May 2017 12:57
bug#26625: [PATCH] gnu : Add unshield.
(address . 26625@debbugs.gnu.org)
20170502105725.30391-1-manolis837@gmail.com
Hello Marius,

Thank you for looking into the patch.

The tests needed some work to be able to run in guix, but they work now.

If everythin is okay, I will push it to master.

Thank you,
Manolis
M
M
manolis837 wrote on 2 May 2017 12:57
[PATCH] gnu : Add unshield.
(address . 26625@debbugs.gnu.org)(name . Manolis Ragkousis)(address . manolis837@gmail.com)
20170502105725.30391-2-manolis837@gmail.com
From: Manolis Ragkousis <manolis837@gmail.com>

* gnu/packages/compression.scm (unshield): New variable.
---
gnu/packages/compression.scm | 76 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)

Toggle diff (114 lines)
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 4793755c2..b333e6ded 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,6 +38,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
@@ -46,10 +48,13 @@
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
#:use-module (gnu packages check)
+ #:use-module (gnu packages curl)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
+ #:use-module (gnu packages zip)
#:use-module (ice-9 match)
#:use-module ((srfi srfi-1) #:select (last)))
@@ -1159,6 +1164,77 @@ or junctions, and always follows hard links.")
;; expat-licenced (or ‘MIT’) code.
license:expat))))
+(define-public unshield
+ (package
+ (name "unshield")
+ (version "1.4.2")
+ (source
+ (origin (method url-fetch)
+ (uri (string-append "http://github.com/twogood/unshield/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x"))))
+ (build-system cmake-build-system)
+ (inputs
+ `(("zlib" ,zlib)
+ ("openssl" ,openssl)
+ ;; test data that is otherwise downloaded with curl
+ ("unshield-avigomanager11b22.zip"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://www.dropbox.com/s/8r4b6752swe3nhu/\"
+unshield-avigomanager11b22.zip?dl=1"))
+ (sha256
+ (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
+ (file-name "unshield-avigomanager11b22.zip")))
+ ("unshield-the-feeble-files-spanish.zip"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/\"
+unshield-the-feeble-files-spanish.zip?dl=1"))
+ (sha256
+ (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
+ (file-name "unshield-the-feeble-files-spanish.zip")))))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (arguments
+ `(#:out-of-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each (lambda (i)
+ (copy-file (assoc-ref inputs i)
+ (string-append "test/v0/" i)))
+ '("unshield-avigomanager11b22.zip"
+ "unshield-the-feeble-files-spanish.zip"))
+ (substitute* (find-files "test/" "/*\\.sh")
+ ;; Tests expect the unshield binary in a specific
+ ;; location.
+ (("/var/tmp/unshield/bin/unshield")
+ (string-append (getcwd) "/src/unshield"))
+ ;; We no longer need to download the data.
+ ((".?URL=.*$") "")
+ (("curl -(|f)sSL -o test.zip .*") ""))
+ (substitute* "test/v0/avigomanager.sh"
+ (("test.zip")
+ (string-append (getcwd)
+ "/test/v0/unshield-avigomanager11b22.zip")))
+ (substitute* "test/v0/the-feeble-files-spanish.sh"
+ (("test.zip")
+ (string-append (getcwd)
+ "/test/v0/unshield-the-feeble-files-spanish.zip")))))
+ (replace 'check
+ (lambda _
+ (zero? (system* "./run-tests.sh")))))))
+ (home-page "https://github.com/twogood/unshield")
+ (synopsis "Extract CAB files from InstallShield installers")
+ (description
+ "@command{unshield} is a tool and library for extracting @file{.cab}
+ archives from InstallShield installers.")
+ (license license:expat)))
+
(define-public unrar
(package
(name "unrar")
--
2.12.2
M
M
Manolis Ragkousis wrote on 4 Jun 2017 10:06
(address . mbakke@fastmail.com)(address . 26625@debbugs.gnu.org)
f2c9dfed-e11d-f672-d584-12e9dd9965ef@gmail.com
Hey Marius,

I don't know if you have seen the updated version of the patch so I am
pinging you :)

If you don't have any objections to the updated version, I will push it
to master.

Manolis

On 05/02/2017 01:57 PM, manolis837@gmail.com wrote:
Toggle quote (11 lines)
> Hello Marius,
>
> Thank you for looking into the patch.
>
> The tests needed some work to be able to run in guix, but they work now.
>
> If everythin is okay, I will push it to master.
>
> Thank you,
> Manolis
>
M
M
Marius Bakke wrote on 4 Jun 2017 14:03
(name . Manolis Ragkousis)(address . manolis837@gmail.com)(address . 26625@debbugs.gnu.org)
87k24syn7c.fsf@fastmail.com
Manolis Ragkousis <manolis837@gmail.com> writes:

Toggle quote (8 lines)
> Hey Marius,
>
> I don't know if you have seen the updated version of the patch so I am
> pinging you :)
>
> If you don't have any objections to the updated version, I will push it
> to master.

Please add a #t at the end of the pre-check phase since (substitute*...)
has an unspecified return value. The rest LGTM, thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkz9wcACgkQoqBt8qM6
VPrWJgf6A088woovBfiibsf5z9sj05azqjqEhnRj31d7Tj2Ndw8haHoJngXXSQwc
LIuvuNgkpOqLhcNabHxp4iePh8BWW4SajtwzZLMSAzCSFpRv7LNIU4mNO5xQLC+l
8zu7icqqhWOA5vD4nYoHjxqe21SO8PvNfIozkociV+gl0C9vFKrQOUTOuhJ0bRbi
A5BfXmY+wvJOueKujpycVQSEA6EP0qSA4qBKQMXOTlnv3rAC2WgMEZ30lNVGPQF7
0P1PndZIZznYfVxw5HEvWeBYkabs9/XnL4u+e3M78triKA5kzQ/Ye6FMLdnE5Fp5
dipuERlVwRqJWPgeIK7jBPE1Kt16yg==
=VbeR
-----END PGP SIGNATURE-----

M
M
Manolis Ragkousis wrote on 4 Jun 2017 17:11
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 26625@debbugs.gnu.org)
dbecf60a-fb4d-a482-dafc-908f8ae4bc03@gmail.com
Done and pushed to master.

Thank you,
Manolis
Attachment: signature.asc
A
A
Alex Kost wrote on 7 Jun 2017 21:52
control message for bug #26625
(address . control@debbugs.gnu.org)
87zidjy3ql.fsf@gmail.com
tags 26625 fixed
close 26625
?
Your comment

This issue is archived.

To comment on this conversation send an email to 26625@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 26625
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch