Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-18 Thread David Craven
> I wonder, are there any drawbacks of making the linter check that the
> URL provides the data named by the hash?

That may be useful. I think if guix refresh would accept a version
flag, and possibly a force flag, that would also be useful.

The version flag would be used as follows:

guix refresh qtbase -u --version=5.7.0

If the version is already set to 5.7.0 a -f flag would download and
update the hash anyway. This is useful when the download url has
changed, but the version hasn't as in the snappy example. I think
these two features could make guix refresh more generally applicable,
to packages that don't have an automatic updater.



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-18 Thread Alex Kost
David Craven (2016-08-17 22:27 +0300) wrote:

>>> I don't believe you :-)
>>
>> Oh, that's embarrassing. I must have forgotten to change the hash and
>> guix cached the tarball. Is that possible?
>
> Sorry about that. I make many stupid mistakes, but I'm not a liar... ;-)

Oh, I didn't mean that!  I just wanted to say that it works as expected,
so you probably made some mistake.  As for the hash, yes it's possible
as Leo explained.

-- 
Alex



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread Leo Famulari
On Wed, Aug 17, 2016 at 09:20:42PM +0200, David Craven wrote:
> Oh, that's embarrassing. I must have forgotten to change the hash and
> guix cached the tarball. Is that possible?

If the hash is matched in the store, the URL is not used, so you won't
see an incorrect URL fail to match the hash.

This is a common cause of buggy patches.

I wonder, are there any drawbacks of making the linter check that the
URL provides the data named by the hash?



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
>> I don't believe you :-)
>
> Oh, that's embarrassing. I must have forgotten to change the hash and
> guix cached the tarball. Is that possible?

Sorry about that. I make many stupid mistakes, but I'm not a liar... ;-)



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
> I don't believe you :-)

Oh, that's embarrassing. I must have forgotten to change the hash and
guix cached the tarball. Is that possible?



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread Alex Kost
David Craven (2016-08-17 11:30 +0300) wrote:

>> Also there is a real release that shouldn't require autoreconf phase:
>> 
>> Did you try using it?
>
> Just did, and requires running autoreconf too...

I don't believe you :-)

I've just tried, and autoreconf is not needed for this tarball:

(define-public snappy
  (package
(name "snappy")
(version "1.1.3")
(source (origin
  (method url-fetch)
  (uri (string-append
"https://github.com/google/snappy/releases/download/;
version "/" name "-" version ".tar.gz"))
  (sha256
   (base32
"1wzf8yif5ym2gj52db6v5m1pxnmn258i38x7llk9x346y2nq47ig"
(build-system gnu-build-system)
(home-page "https://github.com/google/snappy;)
(synopsis "Fast compressor/decompressor")
(description "Snappy is a compression/decompression library. It does not
aim for maximum compression, or compatibility with any other compression 
library;
instead, it aims for very high speeds and reasonable compression. For instance,
compared to the fastest mode of zlib, Snappy is an order of magnitude faster
for most inputs, but the resulting compressed files are anywhere from 20% to
100% bigger.")
(license license:asl2.0)))

-- 
Alex



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
> Also there is a real release that shouldn't require autoreconf phase:
> 
> Did you try using it?

Just did, and requires running autoreconf too...



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-16 Thread Alex Kost
David Craven (2016-08-16 21:39 +0300) wrote:

> * gnu/packages/compression.scm (snappy): New variable.
> ---
>  gnu/packages/compression.scm | 36 
>  1 file changed, 36 insertions(+)
>
>
> diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> index e63c1af..cd1866b 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -11,6 +11,7 @@
>  ;;; Copyright © 2016 Ben Woodcroft 
>  ;;; Copyright © 2016 Danny Milosavljevic 
>  ;;; Copyright © 2016 Tobias Geerinckx-Rice 
> +;;; Copyright © 2016 David Craven 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -871,3 +872,38 @@ even LZMA can provide, or a higher speed than gzip while 
> compressing as
>  well as bzip2.")
>  (license (list license:gpl3+
> license:public-domain ; most files in lzma/
> +
> +(define-public snappy
> +  (package
> +(name "snappy")
> +(version "1.1.3")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append
> +"https://github.com/google/snappy/archive/;
> +version ".tar.gz"))
> +  (file-name (string-append name "-" version ".tar.gz"))
> +  (sha256
> +   (base32
> +"04lc9n1fr4kak8yd68v61w561zcbykfyj9f745smva8hcn0hyk7r"
> +(build-system gnu-build-system)
> +(native-inputs
> + `(("autoconf" ,autoconf)
> +   ("automake" ,automake)
> +   ("libtool" ,libtool)
> +   ("pkg-config" ,pkg-config)))
> +(arguments
> + `(#:phases
> +   (modify-phases %standard-phases
> + (add-after 'unpack 'autoconf
> +   (lambda _
> + (zero? (system* "autoreconf" "-vfi")))
> +(home-page "https://github.com/open-source-parsers/jsoncpp;)

I think you meant "https://github.com/google/snappy;

Also there is a real release that shouldn't require autoreconf phase:

Did you try using it?

> +(synopsis "Fast compressor/decompressor")
> +(description "Snappy is a compression/decompression library. It does not
> +aim for maximum compression, or compatibility with any other compression 
> library;
> +instead, it aims for very high speeds and reasonable compression. For 
> instance,
> +compared to the fastest mode of zlib, Snappy is an order of magnitude faster
> +for most inputs, but the resulting compressed files are anywhere from 20% to
> +100% bigger.")
> +(license license:asl2.0)))

-- 
Alex



[PATCH 07/24] gnu: compression: Add snappy.

2016-08-16 Thread David Craven
* gnu/packages/compression.scm (snappy): New variable.
---
 gnu/packages/compression.scm | 36 
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e63c1af..cd1866b 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2016 Ben Woodcroft 
 ;;; Copyright © 2016 Danny Milosavljevic 
 ;;; Copyright © 2016 Tobias Geerinckx-Rice 
+;;; Copyright © 2016 David Craven 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -871,3 +872,38 @@ even LZMA can provide, or a higher speed than gzip while 
compressing as
 well as bzip2.")
 (license (list license:gpl3+
license:public-domain ; most files in lzma/
+
+(define-public snappy
+  (package
+(name "snappy")
+(version "1.1.3")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"https://github.com/google/snappy/archive/;
+version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"04lc9n1fr4kak8yd68v61w561zcbykfyj9f745smva8hcn0hyk7r"
+(build-system gnu-build-system)
+(native-inputs
+ `(("autoconf" ,autoconf)
+   ("automake" ,automake)
+   ("libtool" ,libtool)
+   ("pkg-config" ,pkg-config)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'autoconf
+   (lambda _
+ (zero? (system* "autoreconf" "-vfi")))
+(home-page "https://github.com/open-source-parsers/jsoncpp;)
+(synopsis "Fast compressor/decompressor")
+(description "Snappy is a compression/decompression library. It does not
+aim for maximum compression, or compatibility with any other compression 
library;
+instead, it aims for very high speeds and reasonable compression. For instance,
+compared to the fastest mode of zlib, Snappy is an order of magnitude faster
+for most inputs, but the resulting compressed files are anywhere from 20% to
+100% bigger.")
+(license license:asl2.0)))
-- 
2.9.0