[PATCH] gnu: Add cmark.

2016-09-20 Thread Erik Edrosa
* gnu/packages/markdown.scm (cmark): New variable.
---
 gnu/packages/markdown.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/markdown.scm b/gnu/packages/markdown.scm
index dab3d4e..d192e57 100644
--- a/gnu/packages/markdown.scm
+++ b/gnu/packages/markdown.scm
@@ -24,6 +24,7 @@
   #:use-module (guix packages)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system cmake)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages web)
@@ -99,3 +100,30 @@ you to write using an easy-to-read, easy-to-write plain 
text format, then
 convert it to structurally valid XHTML (or HTML).")
 (license (non-copyleft "file://License.text"
"See License.text in the distribution."
+
+(define-public cmark
+  (package
+(name "cmark")
+(version "0.26.1")
+(source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/jgm/cmark/archive/;
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+  (base32
+   "1mpmcy4bbmc8m058zqs9dwx49lcfi7bdnfszsr9y66cwgylia1mm"
+(build-system cmake-build-system)
+(arguments
+ '(#:test-target "test"))
+(native-inputs `(("python" ,python)))
+(synopsis "CommonMark C reference implementation")
+(description "CommonMark is a strongly defined, highly compatible
+specification of Markdown.  cmark is the C reference implementation of
+CommonMark.  It provides @code{libcmark} shared library for parsing
+CommonMark to an abstract syntax tree (AST) and rendering the document
+as HTML, groff man, LaTeX, CommonMark, or an XML representation of the
+AST.  The package also provides the command-line program @command{cmark}
+for parsing and rendering CommonMark.")
+(home-page "http://commonmark.org;)
+(license (list bsd-2 expat cc-by-sa4.0
-- 
2.10.0




Re: [PATCH 42/42] gnu: Add darcs.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:10:22PM +, ng0 wrote:
> * gnu/packages/version-control.scm (darcs): New variable.

> +;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
> +;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070
> +;; and results of search engines will show that if the protocol is http, 
> https
> +;; is never mentioned.
> +(define-public darcs
> +  (package
> +(name "darcs")
> +(version "2.12.4")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append 
> "https://hackage.haskell.org/package/darcs/;
> +  "darcs-" version ".tar.gz"))
> +  (sha256
> +   (base32
> +"0jfwiwl5k8wspciq1kpmvh5yap4japrf97s9pvhcybxxhaj3ds28"
> +(build-system haskell-build-system)
> +(arguments
> + `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
> +   "-fnetwork-uri" "-fhttp" "--flag=executable"
> +   "--flag=library")
> +   #:tests? #f)) ; 20 failing shell tests out of over 400

When the test suite fails, it provides a path to the log of the test
suite. I built with --keep-failed to inspect the log, but the file does
not exist.

Since the test suite is not passing, and there is no log of the tests,
it's hard to decide what to do :)

Does this darcs package work for your use case? Does anyone have advice?



Re: Ruby / OpenSSL security issue

2016-09-20 Thread Ben Woodcroft

On 21/09/16 05:05, Leo Famulari wrote:

On Tue, Sep 20, 2016 at 03:17:42PM +1000, Ben Woodcroft wrote:

On 20/09/16 12:06, Leo Famulari wrote:

Ruby users,

There is a bug report on Ruby's OpenSSL module regarding IV re-use in
AES-GCM mode [0].

Does anyone volunteer to investigate the bug report and decide what to
do about it for our Ruby package?

Thanks for the report Leo.  I don't think much can be done about this until
a fix is released, no? It is unfortunately been around since March on that
GitHub page, hopefully the report on oss-sec will spur some action.

Okay, do you volunteer to track this bug upstream? :)


Sure, OK.
ben



Re: [PATCH 23/42] gnu: ghc-fgl: Update to 5.5.3.0.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:10:03PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-fgl): Update to 5.5.3.0.

This should mention the new inputs. I made this change locally.

> +(inputs
> + `(("ghc-mtl" ,ghc-mtl)
> +   ("ghc-hspec" ,ghc-hspec)
> +   ("ghc-quickcheck" ,ghc-quickcheck)))



Re: [PATCH 21/42] gnu: Add ghc-process.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:10:01PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-process): New variable.
>From c844ea27ba69a62d68e1e57f68564e5a29f7a93a Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:58:03 -0400
Subject: [PATCH 8/8] ghc-process synopsis fix

---
 gnu/packages/haskell.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 3d6d806..c76b12f 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6961,7 +6961,7 @@ files and directories in a portable way.")
  "1v1bav5isqxq9fc4lw714x94qbfsjbm2nn12kjp69r1ql8jaaaqw"
 (build-system haskell-build-system)
 (home-page "http://hackage.haskell.org/package/process;)
-(synopsis "Process libraries")
+(synopsis "System process libraries")
 (description
  "This package contains libraries for dealing with system processes.")
 (license license:bsd-3)))
-- 
2.10.0



Re: [PATCH 16/42] gnu: Add ghc-patience.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:56PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-patience): New variable.
>From a342b7da722f4fe61ffdfcb4a162f1daac084764 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:54:49 -0400
Subject: [PATCH 6/8] ghc-patience description fix

---
 gnu/packages/haskell.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 9a457e8..d5de7f8 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6839,8 +6839,8 @@ an executable.")
  "This library implements the 'patience diff' algorithm, as well as the
 patience algorithm for the longest increasing subsequence problem.
 Patience diff computes the difference between two lists, for example the lines
-of two versions of a source file.  It provides a good balance of performance,
-nice output for humans, and implementation simplicity.")
+of two versions of a source file.  It provides a good balance between
+performance, nice output for humans, and simplicity of implementation.")
 (license license:bsd-3)))
 
 (define-public ghc-monads-tf
-- 
2.10.0



Re: [PATCH 19/42] gnu: Add ghc-colour.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:59PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-colour): New variable.
>From da7321230d6eb54565e44b2b62bd0c0064f4ce05 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:56:52 -0400
Subject: [PATCH 7/8] ghc-colour synopsis fix

---
 gnu/packages/haskell.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index d5de7f8..3d6d806 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6918,7 +6918,7 @@ from using 'String' to 'ByteString'.")
"1qmn1778xzg07jg9nx4k1spdz2llivpblf6wwrps1qpqjhsac5cd"
   (build-system haskell-build-system)
   (home-page "http://www.haskell.org/haskellwiki/Colour;)
-  (synopsis "Model for human colour/color perception")
+  (synopsis "Model for human colour perception")
   (description
"This package provides a data type for colours and transparency.
 Colours can be blended and composed.  Various colour spaces are
-- 
2.10.0



Re: [PATCH 15/42] gnu: Add ghc-findbin.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:55PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-findbin): New variable.
>From 3cb586749f2333d0885d20b70a72e4bb38e69c69 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:53:49 -0400
Subject: [PATCH 5/8] ghc-findbin synopsis fix

---
 gnu/packages/haskell.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 026cc32..9a457e8 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6811,9 +6811,9 @@ other transformers.")
  "197xvn05yysmibm1p5wzxfa256lvpbknr5d1l2ws6g40w1kpk717"
 (build-system haskell-build-system)
 (home-page "https://github.com/audreyt/findbin;)
-(synopsis "Locate directory of original program")
+(synopsis "Get the absolute path of the running program")
 (description
- "This module locates the full directory to the running program, to allow
+ "This module locates the full directory of the running program, to allow
 the use of paths relative to it.  FindBin supports invocation of Haskell
 programs via \"ghci\", via \"runhaskell/runghc\", as well as compiled as
 an executable.")
-- 
2.10.0



Re: [PATCH 27/42] gnu: Add ghc-findbin.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:10:07PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-findbin): New variable.

This package is added twice.



Re: [PATCH 10/42] gnu: Add ghc-tasty-th.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:50PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-tasty-th): New variable.
>From 9a0bf28ed9ba1189c455273613bfe98c6e6f0be1 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:48:25 -0400
Subject: [PATCH 3/8] ghc-tasty-th synopsis description fix

---
 gnu/packages/haskell.scm | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index eb103d1..cc320c1 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6661,9 +6661,12 @@ this problem.")
 (inputs
  `(("ghc-tasty" ,ghc-tasty)))
 (home-page "http://github.com/bennofs/tasty-th;)
-(synopsis "Automatic tasty test case discovery using TH")
+(synopsis "Automatically generate tasty TestTrees")
 (description
- "Generate tasty TestTrees automatically with TemplateHaskell.")
+  "Tasty-th automatically generates tasty TestTrees from functions of the
+current module, using TemplateHaskell.  This is a fork the original
+test-framework-th package, modified to work with tasty instead of
+test-framework.")
 (license license:bsd-3)))
 
 (define-public ghc-sandi
-- 
2.10.0



Re: [PATCH 13/42] gnu: Add ghc-tar.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:53PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-tar): New variable.
>From 897cdd72b8b5881d5ae40aa69a71a5599241ae06 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:50:11 -0400
Subject: [PATCH 4/8] ghc-tar synopsis description fix

---
 gnu/packages/haskell.scm | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index cc320c1..026cc32 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6746,12 +6746,12 @@ test-framework.")
 (synopsis "Reading, writing and manipulating \".tar\" archive files")
 (description
  "This library is for working with \\\"@.tar@\\\" archive files.
-It can read and write a range of common variations of archive format
-including V7, POSIX USTAR and GNU formats.  It provides support for
-packing and unpacking portable archives.  This makes it suitable for
-distribution but not backup because details like file ownership and exact
-permissions are not preserved.  It also provides features for random access
-to archive content using an index.")
+It can read and write a range of common variations of the tar archive format
+including V7, POSIX USTAR and GNU formats.  It provides support for packing and
+unpacking portable archives.  This makes it suitable for distribution but not
+backup because details like file ownership and exact permissions are not
+preserved.  It also provides features for random access to archive content 
using
+an index.")
 (license license:bsd-3)))
 
 (define-public ghc-transformers
-- 
2.10.0



Re: [PATCH 08/42] gnu: Add ghc-regex-tdfa.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:48PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-regex-tdfa): New variable.
>From 1fefd08e258b197b73a92145f3ab9dff0964bd0d Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:43:46 -0400
Subject: [PATCH 2/8] ghc-regex-tdfa synopsis description fix

---
 gnu/packages/haskell.scm | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 694fff1..eb103d1 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6611,9 +6611,11 @@ regular expressions.  Parsers can be built using 
Applicative interface.")
("ghc-parsec" ,ghc-parsec)
("ghc-regex-base" ,ghc-regex-base)))
 (home-page "https://github.com/ChrisKuklewicz/regex-tdfa;)
-(synopsis "Replaces/Enhances Text.Regex")
+(synopsis "POSIX extended regular expressions in Haskell.")
 (description
- "A new all Haskell \"tagged\" DFA regex engine, inspired by libtre")
+ "Regex-tdfa is a pure Haskell regular expression library implementing 
POSIX
+extended regular expressions.  It is a \"tagged\" DFA regex engine. It is
+inspired by libtre")
 (license license:bsd-3)))
 
 (define-public ghc-regex-compat-tdfa
-- 
2.10.0



Re: [PATCH 04/42] gnu: Add ghc-cryptohash.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:09:44PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-cryptohash): New variable.

Thanks for this patch series!

Most of the patches look good, but there are a few packages where I
think the synopsis or description need to be changed.

I'll attach my suggested changes to the patches that I think need them.
If you agree to the changes, I can make them locally before pushing;
there will be no need to send updated patches.
>From c45d168a96f94c92e5c4eb3ffaff69931739d0e6 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 20:35:35 -0400
Subject: [PATCH 1/8] ghc-cryptohash synopsis description fix

---
 gnu/packages/haskell.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index af7fc13..694fff1 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -6511,12 +6511,12 @@ been observed, so this library should be suitable for 
high performance scenarios
("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
("ghc-tasty-hunit" ,ghc-tasty-hunit)))
 (home-page "http://github.com/vincenthz/hs-cryptohash;)
-(synopsis "Collection of crypto hashes, fast, pure and practical")
+(synopsis "Collection of cryptographic hashes in Haskell")
 (description
  "A collection of crypto hashes, with a practical incremental and one-pass,
 pure APIs, with performance close to the fastest implementations available in
 other languages.  The implementations are made in C with a haskell FFI wrapper
-that hide the C implementation.")
+that hides the C implementation.")
 (license license:bsd-3)))
 
 (define-public ghc-data-ordlist
-- 
2.10.0



Re: [PATCH 41/42] gnu: Add ghc-directory@1.2.2.0.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 04:10:21PM +, ng0 wrote:
> * gnu/packages/haskell.scm (ghc-directory@1.2.2.0): New variable.

I don't see this variable used anywhere. Did I miss it?

Either way, I think the variable should be called ghc-directory-1.2.2.0.

The convention seems to be that we use 'foo@version' on the
command-line, and 'foo-version' when naming variables.



Re: [PATCH 1/2] gnu: Add sqlcipher.

2016-09-20 Thread Andy Patterson
On Tue, 20 Sep 2016 11:42:44 +0300
Efraim Flashner  wrote:

> I'm a little confused how much of this is actually upstream sqlite and
> how much is their own code. The commit messages look like they're
> continually merging in sqlite. Also, many of the files in the src
> folder I checked are public-domain and not bsd-3 licensed.
> 

You're right; it seems to be the new files which the project has added
which fall under the bsd-3 license. I'll do some investigation in order
to make the license field more descriptive, and send an updated patch.

Thanks,

--
Andy



Re: [PATCH 1/2] gnu: Add sqlcipher.

2016-09-20 Thread Leo Famulari
On Tue, Sep 20, 2016 at 11:42:44AM +0300, Efraim Flashner wrote:
> On Wed, Sep 14, 2016 at 03:30:13PM -0400, Andy Patterson wrote:
> > +   ;; tests are un-maintained in this fork
> > +   #:tests? #f))
> > +(home-page "https://www.zetetic.net/sqlcipher/;)
> > +(synopsis
> > + "Library providing transparent encryption of SQLite database files")
> > +(description "SQLCipher is an SQLite extension that provides 
> > transparent
> > +256-bit AES encryption of database files.  Pages are encrypted before being
> > +written to disk and are decrypted when read back.  It’s well suited for
> > +protecting embedded application databases and for mobile development.")
> > +(license license:bsd-3)))
> > -- 
> > 2.10.0
> > 
> 
> I'm a little confused how much of this is actually upstream sqlite and
> how much is their own code. The commit messages look like they're
> continually merging in sqlite. Also, many of the files in the src folder
> I checked are public-domain and not bsd-3 licensed.

I'm also wondering what the relationship is between this project and
SQLite. The comment about disabling tests describes SQLCipher as a fork,
but the SQLCipher home page describe it as an extension.


signature.asc
Description: PGP signature


Re: [PATCH] gnu: boost: Update to 1.61.0.

2016-09-20 Thread Leo Famulari
On Tue, Sep 20, 2016 at 03:58:18PM -0500, Eric Bavier wrote:
> Given that this upgrade forces a rebuild of libreoffice, should it be
> applied to core-updates?

We do make changes that affect libreoffice on the master branch, at
least so far.



Re: e2fsprogs update

2016-09-20 Thread Leo Famulari
On Mon, Sep 19, 2016 at 07:37:39AM +, ng0 wrote:
> Leo Famulari  writes:
> 
> > On Sun, Sep 18, 2016 at 11:07:34PM +, ng0 wrote:
> >> Hi,
> >> 
> >> why don't we package e2fsprogs-libs? I tried to update it, which fails
> >> with a file which apparently got renamed and/or moved into -libs.
> >> Is there any reason why e2fsprogs-libs was not packaged?
> >
> > Is e2fsprogs-lib a separate package? Or just another distro's method of
> > splitting their e2fsprogs package?
> 
> Upstream. 
> https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.43.3/

Okay, then I think we should add e2fsprogs-libs as a package.



Re: reduceLCS ... inclusion in master or not?

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 06:20:47PM +, ng0 wrote:
> Just because I found this in a search for something else I packaged
> this. Is this desirable for master? It is very small.

Sure, send it in!



Re: [PATCH] small patchseries to add the irc bot limnoria.

2016-09-20 Thread Leo Famulari
On Sun, Sep 18, 2016 at 02:14:32PM +, ng0 wrote:
> This is a small patchseries to add the bot limnoria, based on supybot.

Thanks!

> * gnu/packages/python.scm (python-socksipy-branch): New variable.

> +(home-page "http://code.google.com/p/socksipy-branch/;)

Error 404.

> +(define-public python2-socksipy-branch
> +  (package-with-python2
> +   (strip-python2-variant python-socksipy-branch)))

I don't think this needs strip-python2-variant. It should be enough to
use package-with-python2.

> Subject: [PATCH 2/4] license: Add freebsd-doc.
> 
> * guix/licenses.scm (freebsd-doc): New variable.

LGTM

> Subject: [PATCH 3/4] gnu: Add python-feedparser.
> 
> * gnu/packages/python.scm (python-feedparser): New variable.

LGTM

> Subject: [PATCH 4/4] gnu: Add limnoria.
> 
> * gnu/packages/irc.scm (limnoria): New variable.

LGTM. It would be nice to figure out how to run the tests, if they are
meant to be run by distributions.


signature.asc
Description: PGP signature


[PATCH 2/2] utils: Support defaults in substitute-keyword-arguments.

2016-09-20 Thread Eric Bavier
From: Eric Bavier 

* guix/utils.scm (substitute-keyword-arguments): Allow default value
declarations.
* tests/utils.scm (substitute-keyword-arguments): New test.
---
 guix/utils.scm  | 34 --
 tests/utils.scm | 20 
 2 files changed, 40 insertions(+), 14 deletions(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index ded3114..1fd6725 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -376,21 +376,27 @@ keywords not already present in ARGS."
args
 
 (define-syntax substitute-keyword-arguments
-  (syntax-rules ()
+  (lambda (x)
 "Return a new list of arguments where the value for keyword arg KW is
-replaced by EXP.  EXP is evaluated in a context where VAR is boud to the
-previous value of the keyword argument."
-((_ original-args ((kw var) exp) ...)
- (let loop ((argsoriginal-args)
-(before '()))
-   (match args
- ((kw var rest (... ...))
-  (loop rest (cons* exp kw before)))
- ...
- ((x rest (... ...))
-  (loop rest (cons x before)))
- (()
-  (reverse before)))
+replaced by EXP.  EXP is evaluated in a context where VAR is bound to the
+previous value of the keyword argument, or DFLT if given."
+(syntax-case x ()
+  ((_ original-args ((kw var dflt ...) exp) ...)
+   #`(let loop ((args (default-keyword-arguments
+original-args
+(list #,@(append-map (match-lambda
+   ((k) '())
+   (x x))
+ #'((kw dflt ...) ...)
+(before '()))
+   (match args
+ ((kw var rest (... ...))
+  (loop rest (cons* exp kw before)))
+ ...
+ ((x rest (... ...))
+  (loop rest (cons x before)))
+ (()
+  (reverse before
 
 (define (delkw kw lst)
   "Remove KW and its associated value from LST, a keyword/value list such
diff --git a/tests/utils.scm b/tests/utils.scm
index 960928c..bcfaa14 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -123,6 +123,26 @@
 (default-keyword-arguments '(#:bar 3) '(#:foo 2))
 (default-keyword-arguments '(#:foo 2 #:bar 3) '(#:bar 6
 
+(test-equal "substitute-keyword-arguments"
+  '((#:foo 3)
+(#:foo 3)
+(#:foo 3 #:bar (1 2))
+(#:bar (1 2) #:foo 3)
+(#:foo 3))
+  (list (substitute-keyword-arguments '(#:foo 2)
+  ((#:foo f) (1+ f)))
+(substitute-keyword-arguments '()
+  ((#:foo f 2) (1+ f)))
+(substitute-keyword-arguments '(#:foo 2 #:bar (2))
+  ((#:foo f) (1+ f))
+  ((#:bar b) (cons 1 b)))
+(substitute-keyword-arguments '(#:foo 2)
+  ((#:foo _) 3)
+  ((#:bar b '(2)) (cons 1 b)))
+(substitute-keyword-arguments '(#:foo 2)
+  ((#:foo f 1) (1+ f))
+  ((#:bar b) (cons 42 b)
+
 (test-assert "filtered-port, file"
   (let* ((file  (search-path %load-path "guix.scm"))
  (input (open-file file "r0b")))
-- 
2.9.3




Re: Superseded packages

2016-09-20 Thread Leo Famulari
On Sun, Sep 11, 2016 at 10:39:08PM +0200, Ludovic Courtès wrote:
> > There are other incompatibilities, for example in the repository format.
> > Borg provides a `borg upgrade` tool that performs a one-way conversion
> > of Attic repos to Borg repos. Just creating an 'attic -> borg' alias
> > would not be enough; any automated backup scripts would still fail.
> 
> Then I don’t know.  Either we mark Attic as superseded by Borg anyway,
> or we need another mechanism to mark a package as “discouraged”?

I've attached a patch that marks Attic as superseded by Borg. I'd like
to put it on core-updates. That way, we can mention it in the release
notes of the next Guix release, and hopefully people will notice the
change.

WDYT?
From 374f81963d3ba4ec4a5e48c12848032ca8085aaf Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Tue, 20 Sep 2016 16:59:59 -0400
Subject: [PATCH] gnu: attic: Superseded by borg.

* gnu/packages/backup.scm (attic): Superseded by borg.
* gnu/packages/python.scm (python-llfuse-0.41): Remove variable.
---
 gnu/packages/backup.scm | 47 +--
 gnu/packages/python.scm | 16 
 2 files changed, 5 insertions(+), 58 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index dcab95f..c5908c8 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -321,48 +321,6 @@ to a remote location, and only the differences will be 
transmitted.  Finally,
 rdiff-backup is easy to use and settings have sensible defaults.")
 (license license:gpl2+)))
 
-(define-public attic
-  (package
-(name "attic")
-(version "0.16")
-(source (origin
-  (method url-fetch)
-  (uri (string-append
-"https://pypi.python.org/packages/source/A/Attic/Attic-;
-version ".tar.gz"))
-  (sha256
-   (base32
-"0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36"
-(build-system python-build-system)
-(arguments
- `(#:phases
-   (modify-phases %standard-phases
- (add-before
-  'build 'set-openssl-prefix
-  (lambda* (#:key inputs #:allow-other-keys)
-(setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
-#t)
-(inputs
- `(("acl" ,acl)
-   ("openssl" ,openssl)
-   ("python-msgpack" ,python-msgpack)
-
-   ;; Attic is probably incompatible with llfuse > 0.41.
-   ;; These links are to discussions of llfuse compatibility from
-   ;; the borg project. Borg is a recent fork of attic, and attic
-   ;; has not been updated since the fork, so it's likely that
-   ;; llfuse compatibility requirements are still the same.
-   ;; https://github.com/borgbackup/borg/issues/642
-   ;; https://github.com/borgbackup/borg/issues/643
-   ("python-llfuse" ,python-llfuse-0.41)))
-(synopsis "Deduplicating backup program")
-(description "Attic is a deduplicating backup program.  The main goal of
-Attic is to provide an efficient and secure way to backup data.  The data
-deduplication technique used makes Attic suitable for daily backups since only
-changes are stored.")
-(home-page "https://attic-backup.org/;)
-(license license:bsd-3)))
-
 (define-public libchop
   (package
 (name "libchop")
@@ -456,3 +414,8 @@ stored.  The authenticated encryption technique makes it 
suitable for backups
 to not fully trusted targets.  Borg is a fork of Attic.")
 (home-page "https://borgbackup.github.io/borgbackup/;)
 (license license:bsd-3)))
+
+(define-public attic
+  (package (inherit borg)
+(name "attic")
+(properties `((superseded . ,borg)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f6ea28d..557e1d6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5516,22 +5516,6 @@ should be stored on various operating systems.")
  (strip-python2-variant python-llfuse)))
 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)
 
-;; For attic-0.16
-(define-public python-llfuse-0.41
-  (package (inherit python-llfuse)
-(version "0.41.1")
-(source (origin
-  (method url-fetch)
-  (uri (string-append
-"https://bitbucket.org/nikratio/python-llfuse/downloads/;
-"llfuse-" version ".tar.bz2"))
-  (sha256
-   (base32
-"1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"
-;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
-;; licensed.  The rest of the package is licensed under LGPL2.0 or later.
-(license (list license:expat license:lgpl2.0+
-
 (define-public python-msgpack
   (package
 (name "python-msgpack")
-- 
2.10.0



signature.asc
Description: PGP signature


[PATCH 1/2] utils: Fix default-keyword-arguments.

2016-09-20 Thread Eric Bavier
From: Eric Bavier 

* guix/utils.scm (default-keyword-arguments): Properly test for present
keywords.
* tests/utils.scm (default-keyword-arguments): New test.
---
 guix/utils.scm  |  2 +-
 tests/utils.scm | 12 
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index c68094c..ded3114 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -369,7 +369,7 @@ keywords not already present in ARGS."
 (match defaults
   ((kw value rest ...)
(loop rest
- (if (assoc-ref kw args)
+ (if (memq kw args)
  args
  (cons* kw value args
   (()
diff --git a/tests/utils.scm b/tests/utils.scm
index 6590ed9..960928c 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -111,6 +111,18 @@
 (ensure-keyword-arguments '(#:foo 2) '(#:bar 3))
 (ensure-keyword-arguments '(#:foo 2) '(#:bar 3 #:foo 42
 
+(test-equal "default-keyword-arguments"
+  '((#:foo 2)
+(#:foo 2)
+(#:foo 2 #:bar 3)
+(#:foo 2 #:bar 3)
+(#:foo 2 #:bar 3))
+  (list (default-keyword-arguments '() '(#:foo 2))
+(default-keyword-arguments '(#:foo 2) '(#:foo 4))
+(default-keyword-arguments '() '(#:bar 3 #:foo 2))
+(default-keyword-arguments '(#:bar 3) '(#:foo 2))
+(default-keyword-arguments '(#:foo 2 #:bar 3) '(#:bar 6
+
 (test-assert "filtered-port, file"
   (let* ((file  (search-path %load-path "guix.scm"))
  (input (open-file file "r0b")))
-- 
2.9.3




Re: [PATCH] gnu: boost: Update to 1.61.0.

2016-09-20 Thread Eric Bavier
On Tue, 20 Sep 2016 11:10:02 +0200
Roel Janssen  wrote:

> Eric Bavier writes:
> 
> > On 2016-09-19 05:11, Roel Janssen wrote:  
> >> Roel Janssen writes:
> >>   
> >>> Dear Guix,
> >>> 
> >>> I don't know what the impact of the following upgrade is, but I think 
> >>> it
> >>> would be good to update Boost to the latest stable version that was
> >>> released on May 13th, 2016.
> >>> 
> >>> What do you think?
> >>> 
> >>> Kind regards,
> >>> Roel Janssen
> >>>   
>  From a6409b0648352cac86a3ceb205ee183c034085f5 Mon Sep 17 00:00:00 
>  2001  
> >>> From: Roel Janssen 
> >>> Date: Mon, 19 Sep 2016 10:08:52 +0200
> >>> Subject: [PATCH] gnu: boost: Update to 1.61.0.
> >>> 
> >>> * gnu/packages/boost.scm (boost): Update to 1.61.0.
> >>> ---
> >>>  gnu/packages/boost.scm | 4 ++--
> >>>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>> 
> >>> diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
> >>> index 8fe8c8e..ccc1f06 100644
> >>> --- a/gnu/packages/boost.scm
> >>> +++ b/gnu/packages/boost.scm
> >>> @@ -34,7 +34,7 @@
> >>>  (define-public boost
> >>>(package
> >>>  (name "boost")
> >>> -(version "1.60.0")
> >>> +(version "1.61.0")
> >>>  (source (origin
> >>>(method url-fetch)
> >>>(uri (string-append
> >>> @@ -43,7 +43,7 @@
> >>>  ".tar.bz2"))
> >>>(sha256
> >>> (base32
> >>> -
> >>> "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8"
> >>> +
> >>> "0h5nk7pgxf7xsvvshj9qfpsfp9wx6gq9r78n3nx736pxq83bsix5"
> >>>  (build-system gnu-build-system)
> >>>  (inputs `(("zlib" ,zlib)))
> >>>  (native-inputs  
> >> 
> >> It looks like an upgrade to 1.61.0 causes a build failure for MySQL:
> >> 
> >> -- BUILD OUTPUT LOG FOR MYSQL 
> >> --
> >> -- BOOST_VERSION_NUMBER is #define BOOST_VERSION 106100
> >> CMake Warning at cmake/boost.cmake:266 (MESSAGE):
> >>   Boost minor version found is 61 we need 60
> >> Call Stack (most recent call first):
> >>   CMakeLists.txt:455 (INCLUDE)
> >> 
> >> 
> >> -- BOOST_INCLUDE_DIR /gnu/store/...fzzl-boost-1.61.0/include
> >> -- LOCAL_BOOST_DIR
> >> -- LOCAL_BOOST_ZIP
> >> -- Could not find (the correct version of) boost.
> >> -- MySQL currently requires boost_1_60_0
> >> 
> >> CMake Error at cmake/boost.cmake:81 (MESSAGE):
> >>   You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=
> >>  END BUILD OUTPUT LOG FOR MYSQL 
> >> 
> >> 
> >> So I guess the impact is too large to just go for it.
> >> 
> >> Do we have a Guix command to find out which packages are dependent on
> >> a package (in this case Boost)?
> >> 
> >> Kind regards,
> >> Roel Janssen  
> >
> > I looked at this upgrade a few weeks ago.  I took a stab at building the 
> > complete dependency set, and, for the most part, mysql is the only 
> > package that breaks.  I fixed this with the below patch (which also 
> > enable parallel builds that can improve build times significantly):
> >
> > diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
> > index bb123d3..f3288d1 100644
> > --- a/gnu/packages/boost.scm
> > +++ b/gnu/packages/boost.scm
> > @@ -34,7 +34,7 @@
> >   (define-public boost
> > (package
> >   (name "boost")
> > -(version "1.60.0")
> > +(version "1.61.0")
> >   (source (origin
> > (method url-fetch)
> > (uri (string-append
> > @@ -43,7 +43,7 @@
> >   ".tar.bz2"))
> > (sha256
> >  (base32
> > -
> > "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8"
> > +
> > "0h5nk7pgxf7xsvvshj9qfpsfp9wx6gq9r78n3nx736pxq83bsix5"
> >   (build-system gnu-build-system)
> >   (inputs `(("zlib" ,zlib)))
> >   (native-inputs
> > @@ -53,6 +53,7 @@
> >   (arguments
> >(let ((build-flags
> >   `("threading=multi" "link=shared"
> > +  (format #f "-j~a" (parallel-job-count))
> >
> > ;; Set the RUNPATH to $libdir so that the libs find each 
> > other.
> > (string-append "linkflags=-Wl,-rpath="
> > diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
> > index e05232d..5d7fe13 100644
> > --- a/gnu/packages/databases.scm
> > +++ b/gnu/packages/databases.scm
> > @@ -202,7 +202,7 @@ SQL, Key/Value, XML/XQuery or Java Object storage 
> > for their data model.")
> >  
> > "11qbib1xpy0zkki7j9ip17hks5kp5zgpcj7x8gy3a4m66lb1mgsh"
> >   (build-system cmake-build-system)
> >   (arguments
> > - '(#:configure-flags
> > + `(#:configure-flags
> >  '("-DBUILD_CONFIG=mysql_release"
> >"-DWITH_SSL=system"
> >"-DWITH_ZLIB=system"
> > @@ -229,7 +229,9 @@ SQL, Key/Value, XML/XQuery or Java Object storage 
> > for their data model.")
> >

CVE-2016-0634 code execution in Bash prompt when expanding hostname

2016-09-20 Thread Leo Famulari
Any advice on how we should handle CVE-2016-0634?

http://seclists.org/oss-sec/2016/q3/534



Re: [PATCH 0/2] Perl: Enable threading support.

2016-09-20 Thread Eric Bavier
On Tue, 20 Sep 2016 14:56:05 +1000
Ben Woodcroft  wrote:

> Hi,
> 
> I found that our Perl was giving "Error: This Perl not built to support
> threads" when trying to use threads.  I added '-Dusethreads' to the configure
> phase, but had to copy across the old configure phase to the inheriting
> 'perl-boot0' where we cannot use threads as pthreads is apparently
> unavailable.  Perhaps there is a better way than simply copying the configure
> phase code, though I did add comments pointing out the duplication.
> 
> I'm a little lost as to where we are in the cycle.  If the patches are OK do I
> push this 'rebuild the world' change to 'core-updates', or make a new
> 'core-updates-next'?
> 
> Thanks in advance.  It might help to view the second patch with 'git diff -w'.
> ben
> 
> [PATCH 1/2] gnu: perl: Split configure phase.
> [PATCH 2/2] gnu: perl: Enable threading support.
> 

Could you instead have perl's configure phase honor a #:threads?
keyword, and have perl-boot0 put "#:threads? #f" in its arguments?

`~Eric



Re: [PATCH] gnu: rottlog: rotate messages daily.

2016-09-20 Thread Jan Nieuwenhuizen
Ludovic Courtès writes:

Hi Ludo,!

> The current ‘tweak-rc-weekly’ phase “fixes a bug” in etc/weekly, but I
> don’t think we should do customization in the package itself.  Instead,
> it would be more appropriate to generate/provide the configuration files
> that we need, without further modifying the package itself.  WDYT?

I was thinking it does make some sense to have the installed
...-rottlog/etc/weekly file be functional and somewhat sensible for
GuixSD.  Otoh, patching rottlog with our specific configuration feels
wrong.

So let's do it like you suggest, I think that makes just a bit more
sense.

>> I'm not sure if sending SIGHUP to syslog is ok for shepherd.log or
>> that would need to be a kill 1?  See attached.
>
> GuixSD runs syslogd from Inetutils, so it’s not PID 1, fortunately.  ;-)
>
> However, shepherd.log is written by PID_1, indeed, and we shouldn’t send
> SIGHUP to PID 1.  However, I don’t think anything bad will happen if
> rottlog moves shepherd.log and Shepherd doesn’t reopen this file.

Ok, so no kill then for shepherd.log.

> Yes.  Instead, you have to write:
>
>   (services (cons* (service rottlog-service-type
> (rottlog-configuration …))
>…))

Okay.

> I hope the above sheds some light on this.  WDYT of this idea?

>> * gnu/packages/admin.scm (rottlog): Install guix-specific etc/weekly
>> for rotating /var/log/{messages,secureshepherd.log}.
>
> As discussed above, I think this is the wrong place for this.

Sure, removed.

>> +  (periodic-rotations rottlog-periodic-rotations ; list of (name file) 
>> tuples
>> +  (default `(("weekly"
>> +  ,(file-append rottlog "/etc/weekly")
>
> Here I would suggest adding somewhere:
>
>
>   (define %rotated-files
> '("/var/log/messages" …))
>
>   (define (syslog-rotation-config file)
> (string-append file " {
> …
> kill -HUP …
> …")))

I did not get `.*/bin/kill' right.  There's a big FIXME in the patch.
My first naive attempt (string-append coreutils "/bin/kill") does not
work and I tried several #~ things but I don't really know what I'm
doing there...thats still mostly magic to me.

>   (define (simple-rotation-config file)
> ;; Same as above, but without “kill -HUP”.
> …)
>
>   (define %default-rotations
> `(("weekly" . ,(plain-file "rottlog.weekly"
>(string-append (string-join
>(map syslog-rotation-config
> '("/var/log/messages"…)))
>   (simple-rotation-config
>"shepherd.log"))
>
> Does that make sense?

Yes, better.  Added something like this.

>> +  (jobs rottlog-jobs ; list of 
>> +(default
>> +  (list #~(job
>> +   '(next-hour '(0))
>> +   (lambda ()
>> + (system (string-append #$rottlog "/sbin/rottlog"
>> +#~(job
>> +   '(next-hour '(12))
>> +   (lambda ()
>> + (system (string-append #$rottlog 
>> "/sbin/rottlog"
>
> Please move (list …) to a global variable, to avoid code duplication
> when the macro is expanded.

...moved to a function now...but I don't see what macro you mean (#~ ?)
and when it gets expanded and how that leads to duplication.

I'm not sure if we should export the %default-rotations or if we should
describe their contents in the manual.

> Use ‘system*’ instead of ‘system’ (the latter does “/bin/sh -c”, which
> is unnecessary here.)

Ok.

> Also, this should use the ‘rottlog’ package of ,
> which cannot be referred to from the default value, which is a constant.
> Thus, you may have to change the default to #f, and generate the default
> value upon #f.

Ahh.  Okay, (I think!).

Greetings,
Jan

>From ee1be88f60d70de46009069da020c1bdc4993fd8 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen 
Date: Thu, 8 Sep 2016 01:20:43 +0200
Subject: [PATCH] gnu: services: add rottlog.

* gnu/services/admin.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Log Rotation): Document it.
---
 doc/guix.texi  |  55 ++-
 gnu/local.mk   |   1 +
 gnu/services/admin.scm | 116 +
 3 files changed, 171 insertions(+), 1 deletion(-)
 create mode 100644 gnu/services/admin.scm

diff --git a/doc/guix.texi b/doc/guix.texi
index d5ece55..735e8ac 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -26,7 +26,8 @@ Copyright @copyright{} 2016 Ben Woodcroft@*
 Copyright @copyright{} 2016 Chris Marusich@*
 Copyright @copyright{} 2016 Efraim Flashner@*
 Copyright @copyright{} 2016 John Darrington@*
-Copyright @copyright{} 2016 ng0
+Copyright @copyright{} 2016 ng0@*
+Copyright @copyright{} 2016 Jan 

Re: [PATCH] gnu: Add linux-pam.

2016-09-20 Thread rennes
Hello,

> Then I think we can install the patch (in core-updates), making sure
> it
> contains a reference to the above ticket.
> 
> Could you send the updated patch?

attached the updated patch.From b4753711aabcefa410b2eb4ced9d25e084bb7658 Mon Sep 17 00:00:00 2001
From: Rene Saavedra 
Date: Tue, 20 Sep 2016 14:59:20 -0500
Subject: [PATCH] gnu: Add linux-pam.

	* gnu/packages/linux.scm (linux-pam): Use it.
	* gnu/packages/patches/linux-pam-no-setfsuid.patch: New file.
	* gnu/local.mk (dist_patch_DATA): Add it.

---
 gnu/local.mk |  2 +
 gnu/packages/linux.scm   |  7 ++-
 gnu/packages/patches/linux-pam-no-setfsuid.patch | 75 
 3 files changed, 83 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/linux-pam-no-setfsuid.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..f0415f6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -5,6 +5,7 @@
 # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver 
 # Copyright © 2016 Chris Marusich 
 # Copyright © 2016 Kei Kebreau 
+# Copyright © 2016 Rene Saavedra 
 #
 # This file is part of GNU Guix.
 #
@@ -658,6 +659,7 @@ dist_patch_DATA =		\
   %D%/packages/patches/libwmf-CVE-2015-4695.patch		\
   %D%/packages/patches/libwmf-CVE-2015-4696.patch		\
   %D%/packages/patches/libxslt-generated-ids.patch		\
+  %D%/packages/patches/linux-pam-no-setfsuid.patch		\
   %D%/packages/patches/lirc-localstatedir.patch			\
   %D%/packages/patches/llvm-for-extempore.patch			\
   %D%/packages/patches/lm-sensors-hwmon-attrs.patch		\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5e9263e..e5dbc42 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus 
 ;;; Copyright © 2016 David Craven 
 ;;; Copyright © 2016 John Darrington 
+;;; Copyright © 2016 Rene Saavedra 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -371,7 +372,11 @@ It has been modified to remove all non-free binary blobs.")
 version ".tar.bz2")))
   (sha256
(base32
-"1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"
+"1n9lnf9gjs72kbj1g354v1xhi2j27aqaah15vykh7cnkq08i4arl"))
+  ;; On the Hurd system in the 'build' phase seeks fsuid.h file.
+  ;; See the patch for details.
+  (patches (search-patches
+"linux-pam-no-setfsuid.patch"
 (build-system gnu-build-system)
 (native-inputs
  `(("flex" ,flex)
diff --git a/gnu/packages/patches/linux-pam-no-setfsuid.patch b/gnu/packages/patches/linux-pam-no-setfsuid.patch
new file mode 100644
index 000..c14721d
--- /dev/null
+++ b/gnu/packages/patches/linux-pam-no-setfsuid.patch
@@ -0,0 +1,75 @@
+On systems without setfsuid(), use setreuid() instead.
+
+The patch originates from the Debian project for the Hurd system.
+Authors: Steve Langasek 
+Upstream status: A ticket was opened to request apply the patch,
+ticket: 'https://fedorahosted.org/linux-pam/ticket/64'.
+
+--- Linux-PAM-1.2.1/libpam/pam_modutil_priv.c	2015-03-24 06:02:32.0 -0600
 pam_modutil_priv-mod.c	2016-09-20 13:36:53.150663205 -0500
+@@ -14,7 +14,9 @@
+ #include 
+ #include 
+ #include 
++#ifdef HAVE_SYS_FSUID_H
+ #include 
++#endif /* HAVE_SYS_FSUID_H */
+ 
+ /*
+  * Two setfsuid() calls in a row are necessary to check
+@@ -22,17 +24,55 @@
+  */
+ static int change_uid(uid_t uid, uid_t *save)
+ {
++#ifdef HAVE_SYS_FSUID_H  
+ 	uid_t tmp = setfsuid(uid);
+ 	if (save)
+ 		*save = tmp;
+ 	return (uid_t) setfsuid(uid) == uid ? 0 : -1;
++#else
++	uid_t euid = geteuid();
++	uid_t ruid = getuid();
++	if (save)
++		*save = ruid;
++	if (ruid == uid && uid != 0)
++		if (setreuid(euid, uid))
++			return -1;
++	else {
++		setreuid(0, -1);
++		if (setreuid(-1, uid)) {
++			setreuid(-1, 0);
++			setreuid(0, -1);
++			if (setreuid(-1, uid))
++return -1;
++		}
++	}
++#endif
+ }
+ static int change_gid(gid_t gid, gid_t *save)
+ {
++#ifdef HAVE_SYS_FSUID_H  
+ 	gid_t tmp = setfsgid(gid);
+ 	if (save)
+ 		*save = tmp;
+ 	return (gid_t) setfsgid(gid) == gid ? 0 : -1;
++#else
++	gid_t egid = getegid();
++	gid_t rgid = getgid();
++	if (save)
++		*save = rgid;
++	if (rgid == gid)
++		if (setregid(egid, gid))
++			return -1;
++	else {
++		setregid(0, -1);
++		if (setregid(-1, gid)) {
++			setregid(-1, 0);
++			setregid(0, -1);
++			if (setregid(-1, gid))
++return -1;
++		}
++	}
++#endif	
+ }
+ 
+ static int cleanup(struct pam_modutil_privs *p)
-- 
2.6.3



Re: [PATCH 3/3] gnu: vlc: Add inputs.

2016-09-20 Thread Leo Famulari
On Sat, Sep 10, 2016 at 11:08:18AM +0800, Alex Vong wrote:
> From b9e30604e432586c89c5e33b27ba609852efd399 Mon Sep 17 00:00:00 2001
> From: Alex Vong 
> Date: Tue, 30 Aug 2016 02:30:57 +0800
> Subject: [PATCH 3/3] gnu: vlc: Add inputs.
> 
> * gnu/packages/video.scm (vlc)[inputs]: Add eudev, faad2, fluidsynth,
>   gnome-vfs, gst-plugins-base, gtk+-2, jack-2, libass, libavc1394,
>   libbluray, libcaca, libdca, libdvdnav, libdvdread, libmpeg2,
>   libmodplug, libmtp, libnotify, libraw1394, libshout, librsvg, libupnp,
>   libva, libvdpau, samba, taglib, twolame.

My question is similar to the one for the last patch. Can you check on
 if these packages build for all our supported
architectures? If so, okay for me.



Re: [PATCH 2/3] gnu: vlc: Add configure flags.

2016-09-20 Thread Leo Famulari
On Sat, Sep 10, 2016 at 11:07:29AM +0800, Alex Vong wrote:
> From 066bee5d7795c6caf2376be4a38e2cf0b397ef98 Mon Sep 17 00:00:00 2001
> From: Alex Vong 
> Date: Sat, 10 Sep 2016 00:32:03 +0800
> Subject: [PATCH 2/3] gnu: vlc: Add configure flags.
> 
> * gnu/packages/video.scm (vlc)[arguments]: Add configure flags to enable
>   most fast-math optimizations.
> ---
>  gnu/packages/video.scm | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 858e007..a041666 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -650,7 +650,10 @@ audio/video codec library.")
> `(;; Gross workaround for 
> .
>   ;; In our case, this led to a test failure:
>   ;;   test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: 
> Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, 
> u_bands))' failed.
> + ;; FIXME: This bug is fixed upstream. For now, we enable:
>   "ac_cv_c_fast_math=no"
> + "CFLAGS=-ffast-math -fno-finite-math-only"
> + "CXXFLAGS=-ffast-math -fno-finite-math-only"

I don't know much about this subject. Can anyone say if we can expect
this to work on all our supported architectures?



Re: [PATCH 1/3] gnu: vlc: Add liba52 as inputs.

2016-09-20 Thread Leo Famulari
On Sat, Sep 10, 2016 at 11:06:16AM +0800, Alex Vong wrote:
> Hi,
> 
> I split the patches into 3 parts following David's suggestion. The first
> patch removes the old FIXME by adding liba52 as inputs. The second patch
> adds some configure flags. The third patch adds many new inputs.
> 
> Regarding Efraim's concern of closure size, the old closure size is
> 1459.3 MiB, the new closure size (without samba) is 1589.5 MiB and the
> new closure size (with samba) is 1681.8 MiB.
> 
> Thanks,
> Alex
> 

> From 6ed11031c136d7cff6fef60cc8e8fdb22dfb342e Mon Sep 17 00:00:00 2001
> From: Alex Vong 
> Date: Sat, 10 Sep 2016 00:06:26 +0800
> Subject: [PATCH 1/3] gnu: vlc: Add liba52 as inputs.
> 
> * gnu/packages/video.scm (vlc)[inputs]: Add liba52.
> [arguments]: Remove configure flag "--disable-a52".

Pushed as 8824da4c8bc34b131d5920d577f406db300a921b



Re: using Cuirass to track a guix packages' git

2016-09-20 Thread Mathieu Lirzin
Hello Jan,

Jan Nieuwenhuizen  writes:

> I have been playing with Cuirass and I like it a lot!

Cool. :)

I want to let you know that I have just started looking at your patches.
I have been quite busy lately.  Sorry for the latency.

Next time I will let you know sooner if you should expect a delay.

> Next to replacing Hydra for GuixSD, there is another use case that I'd
> like Cuirass to support: tracking an (any) upstream packages' git.

This is highly desirable indeed.

> When the target of your continuous integration is not Guix itself but
> some specific package, you may well want to allow usage of substitutes
> (patch 1).

Agreed.

> Assuming you have checked-out guix and cuirass in ~/src/guix and
> ~/src/cuirass, doing
>
>./pre-inst-env cuirass --use-substitutes 
> --specifications=tests/hello-git.scm
>
> will monitor any changes to Cuirass' git repository and rebuild the
> latest commit of the Cuirass package using Guix (patch 2 and 3).
>
> Of course, a build a failure should not crash cuirass and also be
> noted/stamped, not repeated every heartbeat (patch 4).

yes :)

> I had some trouble with the #:no-compile? option, it's currently
> specified twice.  On the Cuirass side I think it should be a property
> of the spec, but it seems it gets only passed as part of the
> arguments.  Ideas?

No idea for now.  I will comment/review your code in details in a
following mail.  I should be able to do that in the next 48H.

Thank you for your patches, patience and courage!

-- 
Mathieu Lirzin



Re: [PATCH 3/3] gnu: Duplicity: Update to 0.7.10

2016-09-20 Thread Eric Bavier
On Tue, 20 Sep 2016 21:36:02 +1000
Brendan Tildesley  wrote:

> * gnu/packages/backup.scm (duplicity): Update to 0.7.10.
> * gnu/packages/patches/duplicity-piped-password.patch: Deleted.
> * gnu/packages/patches/duplicity-test_selection-tmp.patch: Deleted.

These patches need to also be removed from gnu/local.mk
(dist_patch_DATA).  And there should be a [source] note that mentions
the patch removal.

> ---
>  gnu/packages/backup.scm| 82 
> +-
>  .../patches/duplicity-piped-password.patch | 20 --
>  .../patches/duplicity-test_selection-tmp.patch | 18 -
>  3 files changed, 47 insertions(+), 73 deletions(-)
>  delete mode 100644 gnu/packages/patches/duplicity-piped-password.patch
>  delete mode 100644 gnu/packages/patches/duplicity-test_selection-tmp.patch
> 
> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> index e77c4f2..408389a 100644
> --- a/gnu/packages/backup.scm
> +++ b/gnu/packages/backup.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2014, 2015 Eric Bavier 
>  ;;; Copyright © 2014 Ian Denhardt 
>  ;;; Copyright © 2015, 2016 Leo Famulari 
> +;;; Copyright © 2016 Brendan Tildesley 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -33,6 +34,7 @@
>#:use-module (gnu packages compression)
>#:use-module (gnu packages databases)
>#:use-module (gnu packages dejagnu)
> +  #:use-module (gnu packages ftp)
>#:use-module (gnu packages glib)
>#:use-module (gnu packages gnupg)
>#:use-module (gnu packages gperf)
> @@ -51,53 +53,63 @@
>  (define-public duplicity
>(package
>  (name "duplicity")
> -(version "0.6.26")
> +(version "0.7.10")
>  (source
>   (origin
> -  (method url-fetch)
> -  (uri (string-append "https://code.launchpad.net/duplicity/;
> -  (version-major+minor version)
> -  "-series/" version "/+download/duplicity-"
> -  version ".tar.gz"))
> -  (sha256
> -   (base32
> -"0jh79syhr8n3l81jxlwsmwm1pklb4d923m2lgqbswyavh1fqmvwb"))
> -  (patches (search-patches "duplicity-piped-password.patch"
> -   "duplicity-test_selection-tmp.patch"
> +   (method url-fetch)
> +   (uri (string-append "https://code.launchpad.net/duplicity/;
> +   (version-major+minor version)
> +   "-series/" version "/+download/duplicity-"
> +   version ".tar.gz"))
> +   (sha256
> +(base32
> + "0hj8451gpndyqdfxwhbxwr9ddxvc47g0iv003q33q5kda8ayyps8"

This includes a lot of unnecessary whitespace changes.

>  (build-system python-build-system)
>  (native-inputs
>   `(("python2-setuptools" ,python2-setuptools)
> -   ("util-linux" ,util-linux))) ;setsid command, for the tests
> +   ("python2-mock" ,python2-mock)
> +   ("util-linux" ,util-linux))) ; setsid command, for the tests
>  (inputs
>   `(("python" ,python-2)
> ("librsync" ,librsync)
> -   ("mock" ,python2-mock)   ;for testing
> -   ("lockfile" ,python2-lockfile)
> -   ("gnupg" ,gnupg-1)   ;gpg executable needed
> -   ("util-linux" ,util-linux)   ;for setsid
> -   ("tzdata" ,tzdata)))
> +   ("python2-lockfile" ,python2-lockfile)
> +   ("python2-pexpect" ,python2-pexpect)
> +   ("python2-paramiko" ,python2-paramiko)
> +   ("python2-pycrypto" ,python2-pycrypto)
> +   ("python2-botocore" ,python2-botocore)
> +   ("python2-dropbox" ,python2-dropbox)

Could you move the new inputs to a separate commit?  I.e. upgrade
duplicity in one commit, then followup with another commit that adds
the new backend inputs?

> +   ("lftp" ,lftp)
> +   ("gnupg" ,gnupg-1)
> +   ("ncftp" ,ncftp)
> +   ("tzdata" ,tzdata)
> +   ("par2cmdline" ,par2cmdline)))
>  (arguments
> - `(#:python ,python-2   ;setup assumes Python 2
> + `(#:python ,python-2

Why remove this comment?

> #:test-target "test"
> -   #:phases (alist-cons-before
> - 'check 'check-setup
> - (lambda* (#:key inputs #:allow-other-keys)
> -   (substitute* "testing/functional/__init__.py"
> - (("/bin/sh") (which "sh")))
> -   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
> -   (setenv "TZDIR"  ;some timestamp checks need TZDIR
> -   (string-append (assoc-ref inputs "tzdata")
> -  "/share/zoneinfo")))
> - %standard-phases)))
> +   #:phases
> +   (modify-phases %standard-phases

Could you make the transition to modify-phases in a separate commit?

> + (add-before 'check 'check-setup
> + 

Re: Ruby / OpenSSL security issue

2016-09-20 Thread Leo Famulari
On Tue, Sep 20, 2016 at 03:17:42PM +1000, Ben Woodcroft wrote:
> On 20/09/16 12:06, Leo Famulari wrote:
> > Ruby users,
> > 
> > There is a bug report on Ruby's OpenSSL module regarding IV re-use in
> > AES-GCM mode [0].
> > 
> > Does anyone volunteer to investigate the bug report and decide what to
> > do about it for our Ruby package?
> 
> Thanks for the report Leo.  I don't think much can be done about this until
> a fix is released, no? It is unfortunately been around since March on that
> GitHub page, hopefully the report on oss-sec will spur some action.

Okay, do you volunteer to track this bug upstream? :)



Re: [PATCH] gnu: awesome: Update to 3.5.9.

2016-09-20 Thread Leo Famulari
On Fri, Sep 02, 2016 at 12:59:53AM +0200, doncatnip wrote:
> Hey Guix !
> 
> Let's try this again.

Okay!

> Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS
> 
> * gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of
> CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX
> is passed implicitly for build target "linux".

I made the commit title into a complete sentence and pushed.

> Subject: [PATCH 2/3] gnu: lua: Add lua-lgi.
> 
> * gnu/packages/lua.scm (lua-lgi): New variable.

I took ng0's advice about the comment styles:

https://www.gnu.org/software/guile/manual/html_node/Comments.html

I also made the phases 'set-env', 'set-lua-version', 'skip-test-gtk',
and 'start-xserver-instance' return #t. We want successful phases to
return #t, but things like setenv and substitute* do not specify a
return value, so we explicity return #t.

I moved #:make-flags to the top of the arguments block, which kept
it shorter than 80 columns. And I corrected the indentation of
#:phases by one column.

Pushed!

> Subject: [PATCH 3/3] gnu: awesome: Update to 3.5.9.
> 
> * gnu/packages/wm.scm (awesome): Update to 3.5.9.
> (awesome)[inputs]: Add gobject-introspection, lua-lgi, cairo. Use
> latest available lua.
> (awesome)[arguments]: Set lua search paths. Add cairo to
> LD_LIBRARY_PATH. Wrap binary in respect to those paths plus
> GI_TYPELIB_PATH.

The commit message only needs to refer to the (awesome) variable once in
this case.  Referring to the fields [inputs] and [arguments] later does
not require the variable to be mentioned again. Fixed before pushing.

I sorted the new inputs alphabetically, since the pre-existing inputs
were already sorted. I made the comment about loading Cairo dynamically
into a complete sentence. I made the phase 'set-lua-paths' return #t.

Finally, since the new 'wrap' phase had a too-long line that was ugly to
break up, I shifted the indentation of #:phases down one line and to the
left, giving some more room to breathe on the right.

Pushed as 22037a327a0340341df7ae71a9c1d3551c28c705 !



Re: cracklib: Fix buffer overflow

2016-09-20 Thread Leo Famulari
On Tue, Sep 20, 2016 at 12:32:02PM +0300, Efraim Flashner wrote:
> > +diff --git a/src/lib/rules.c b/src/lib/rules.c
> > +index d193cc0..3a2aa46 100644
> > +--- a/lib/rules.c
> >  b/lib/rules.c
> > +@@ -434,9 +434,8 @@ Mangle(input, control) /* returns a pointer to 
> > a controlled Mangle */
> > + {
> > + int limit;
> > + register char *ptr;
> > +-static char area[STRINGSIZE];
> > +-char area2[STRINGSIZE];
> > +-area[0] = '\0';
> > ++static char area[STRINGSIZE * 2] = {0};
> > ++char area2[STRINGSIZE * 2] = {0};
> > + strcpy(area, input);
> > + 
> > + for (ptr = control; *ptr; ptr++)
> > -- 
> > 2.10.0
> > 
> 
> not having looked at the full source of lib/rules.c, is there a maximum
> value to STRINGSIZE to make sure STRINGSIZE * 2 doesn't wrap around?

STRINGSIZE is defined in 'lib/packer.h' as 1024:

https://github.com/cracklib/cracklib/blob/cracklib-2.9.6/src/lib/packer.h#L11

I just looked at all the uses of STRINGSIZE in order to give a brief
overview of how it's used, but I'm not skilled enough to recognize every
case where it might be dangerous and overflow.

STRINGSIZE is used to declare many char arrays, an array of pointers,
and as an argument to fgets, snprintf, and strncpy. Also the object
macro TRUNCSTRINGSIZE is defined as (STRINGSIZE / 4).


signature.asc
Description: PGP signature


Re: Four thousand!

2016-09-20 Thread John Darrington
On Mon, Sep 19, 2016 at 11:12:17AM +, ng0 wrote:

 Heh, correction: 11137. (https://nixos.org/nixos/packages.html)
 They don't keep some parts of their web site up to date.

I see that Guix now has more than 10 packages!!

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



signature.asc
Description: Digital signature


Re: [PATCH] gnu: openldap: Use gnutls.

2016-09-20 Thread Efraim Flashner
On Sat, Sep 17, 2016 at 12:21:10AM +0800, Alex Vong wrote:
> Hello,
> 
> The following patch does what the title says. The link of the bug
>  is no
> longer accessible, so I assume the bug is fixd since I cannot find it on
> the internet. In addition, I have checked debian's version, which is
> slightly older (2.4.42), which also uses gnutls. So I think we are safe
> here. Please object if there is a problem!
> 
> Please note that openldap is an input for curl, so I guess it is causing
> the openssl dependency problem for octave I mentioned earlier. I haven't
> test to build octave with curl though, which takes a while.
> 

I built it out. With this patch, octave will build with curl and
cyrus-sasl added as inputs, and will retain references to gnutls and
cyrus-sasl, as checked with `guix gc --references /gnu/store/...octave'


-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


[PATCH] guix: gnu-build-system: add new phase patch-dot-desktop-files

2016-09-20 Thread John Darrington

Ludo wanted something like this, I think.  To be pushed to core-updates of 
course...




* guix/build/gnu-build-system.scm (patch-dot-desktop-files): New procedure.
---
 guix/build/gnu-build-system.scm | 45 +
 1 file changed, 45 insertions(+)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 34edff7..ebd0f7b 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -552,6 +552,50 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
 outputs)
   #t)
 
+
+(define* (patch-dot-desktop-files #:key outputs inputs #:allow-other-keys)
+  "Replace any references to executables in .desktop files with their absolute
+path names."
+(define (find-binary binary output-dir inputs)
+  "Search for BINARY first in OUTPUT-DIR, then in the directories
+of INPUTS.  INPUTS is an alist where the directories are the cdrs.  If no
+suitable BINARY cannot be found return BINARY unchanged."
+
+  ;; Search for BINARY in the output directory,
+  ;; then all the input directories.
+  (let lp ((dir-list (cons output-dir (map (lambda (i) (cdr i)) inputs
+(if (null? dir-list)
+;; Leave unchanged if we cannot find the binary.
+binary
+(let ((resolv (find-files
+   (car dir-list)
+   (lambda (file stat)
+ ;; The candidate file must be a regular file,
+ ;; have execute permission and the correct name.
+ (and stat
+  (eq? 'regular (stat:type stat))
+  (not (zero? (logand #o001 (stat:perms 
stat
+  ((file-name-predicate
+(string-append "^" binary "$")) file 
stat))
+
+  (if (null? resolv)
+  (lp (cdr dir-list))
+  (car resolv))
+
+(for-each (match-lambda
+(( _ . output-dir)
+ (for-each (lambda (f)
+ (substitute* f
+   (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary 
rest)
+(string-append
+ "Exec=" (find-binary binary output-dir 
inputs) rest))
+
+   (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary 
rest)
+(string-append
+ "TryExec=" (find-binary binary output-dir 
inputs) rest
+   (find-files output-dir ".desktop$"
+  outputs) #t)
+
 (define %standard-phases
   ;; Standard build phases, as a list of symbol/procedure pairs.
   (let-syntax ((phases (syntax-rules ()
@@ -564,6 +608,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
 validate-runpath
 validate-documentation-location
 delete-info-dir-file
+patch-dot-desktop-files
 compress-documentation)))
 
 
-- 
2.10.0




[PATCH v2 0/4] Add GCC cross compiler for arm-none-eabi.

2016-09-20 Thread Theodoros Foradis

Hello Guix and Ricardo,

The original patch series was working correctly and producing working binaries. 
Some
flags (that I had been using with 6.2.0) are missing from that version of GCC 
4.9,
so I added 6.2.0 as an extra option. I have tested it to produce working 
binaries.

Here are some modifications to Ricardo's patches for the arm-none-eabi
bare metal cross compiler. The following changes have been made:

- I have modified xbinutils to use binutils 2.25.1 from cross-base, as it 
compiles
correctly with it. The version from the svn commit that was used by Ricardo is 
compiling
correct binaries as well. Thus, if it is deemed appropriate, the source for 
xbinutils can
be swapped for the previous one, with (seemingly) no difference.

- The xgcc of the original, was failing to find the headers that newlib 
provided.
I have set the native-cross-paths as a workaround. Not sure if there is a better
alternative, or if the failure was my mistake.

- A package for cross GCC 6.2.0 is added, with appropriate patches for multilib
support.

- Newlib-arm-none-eabi and newlib-nano-arm-none-eabi have been changed to
procedures, taking an xgcc as argument, so as to facilitate building with
either version of gcc.

- An arm-none-eabi-toolchain procedure is declared, to create toolchain packages
for both gcc and newlib version. The four toolchain variables follow. Not sure
if it's a mistake to include "nano" in the toolchain version.


This is the first patch that I send in guix-devel, so please bear with me.

Regards,
Theodoros Foradis


* gnu: Add arm-none-eabi-toolchain.
* gnu: Add newlib-arm-none-eabi.
* gnu: Add arm-none-eabi-gcc-6 and patches.
* gnu: Add arm-none-eabi cross compiler.

 gnu/local.mk |   1 +
 gnu/packages/bootstrap.scm   |   1 +
 gnu/packages/embedded.scm| 226 
+++
 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch  | 201 
+++
 gnu/packages/patches/gcc-6-cross-environment-variables.patch |  65 
+++
 5 files changed, 494 insertions(+)
 create mode 100644 gnu/packages/embedded.scm
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch



Re: [PATCH 1/2] gnu: wm: Add python-i3-py.

2016-09-20 Thread Alex Kost
Ivan Vilata i Balaguer (2016-09-19 14:44 +0200) wrote:

> Thanks to Brendan Tildesley, Leo Famulari and Hartmut Goebel for testing and
> advice.
>
> * gnu/packages/wm.scm (python-i3-py, python2-i3-py): New variables.
> ---
>  gnu/packages/wm.scm | 44 
>  1 file changed, 44 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 6275e6f..39ecb20 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -34,6 +34,7 @@
>#:use-module (guix build-system cmake)
>#:use-module (guix build-system gnu)
>#:use-module (guix build-system haskell)
> +  #:use-module (guix build-system python)
>#:use-module (gnu packages haskell)
>#:use-module (gnu packages base)
>#:use-module (gnu packages pkg-config)
> @@ -202,6 +203,49 @@ from scratch.  i3 is primarily targeted at advanced 
> users and
>  developers.")
>  (license license:bsd-3)))
>  
> +(define-public python-i3-py
> +  (package
> +(name "python-i3-py")
> +(version "0.6.5")
> +(source
> + (origin
> +   ;; The latest release is not tagged in Git nor has an entry in PyPi,
> +   ;; but there is still a clear commit for it, and it's been the last 
> one
> +   ;; for years.
> +   (method git-fetch)
> +   (uri (git-reference
> + (url "https://github.com/ziberna/i3-py.git;)
> + (commit "27f88a616e9ecc340e7d041d3d00782f8a1964c1")))
> +   (sha256
> +(base32
> + "1nm719dc2xqlll7vj4c4m7mpjb27lpn3bg3c66gajvnrz2x1nmxs"))
> +   (file-name (string-append name "-" version "-checkout"
> +(build-system python-build-system)
> +(arguments
> + `(#:tests? #f ; no tests yet
> +   #:phases
> +   (alist-cons-after
> +'install 'install-doc

Nowadays we use 'modify-syntax' instead of calling 'alist-...'
procedures directly:

  (modify-phases %standard-phases
(add-after 'install 'install-doc
  (lambda ...)))

> +;; Copy readme file to documentation directory.
> +(lambda* (#:key outputs #:allow-other-keys)
> +  (let ((doc (string-append (assoc-ref outputs "out")
> +"/share/doc/" ,name "-" ,version)))

I think it is uncommon to put doc files in a versioned directory, I
would just use "share/doc/"

> +(mkdir-p doc)
> +(copy-file "README.md" (string-append doc "/README.md"

I think 'instal-file' is more suitable here:

  (install-file "README.md" doc)

Also, please add #t in the end of the phase: if a phase succeeds it
should return non-false value, and the value of 'copy-file' (and
'install-file') is not specified.

> +%standard-phases)))
> +(propagated-inputs
> + `(("i3-wm" ,i3-wm)))
> +(home-page "https://github.com/ziberna/i3-py;)
> +(synopsis "Python interface to the i3 window manager")
> +(description "This package allows you to interact from a Python program
> +with the i3 window manager via its IPC socket.  It can send commands and 
> other
> +kinds of messages to i3, select the affected containers, filter results and
> +subscribe to events.")
> +(license license:gpl3+)))
> +
> +(define-public python2-i3-py
> +  (package-with-python2 python-i3-py))
> +
>  (define-public xmonad
>(package
>  (name "xmonad")
> -- 
>
> 2.10.0

-- 
Alex



Re: Customizing /etc

2016-09-20 Thread Alex Kost
Ludovic Courtès (2016-09-19 23:08 +0900) wrote:

> Alex Kost  skribis:
>
>> Ludovic Courtès (2016-09-14 16:58 +0200) wrote:
[...]
>>> However, we failed to build consensus around the approach of this patch,
>>> so we did not apply it.  If you have ideas, please email
>>> 20...@debbugs.gnu.org.  :-)
>>
>> I think I was the one who prevents the consensus.  To make it clear, I'm
>> for the suggested solution, but only *after* giving a user a freedom to
>> avoid loading such a heavy command as "guix package --search-paths".  On
>> a "usual" GNU/Linux distro a user can edit /etc/profile, but on GuixSD
>> it is not possible currently.  That's why I think there should be
>> provided a possibility to override /etc/profile at first.
>
> Indeed, thanks for the reminder!
>
> In fact, we have this through ‘etc-service-type’, except that currently
> /etc/profile is systematically added.
>
> So an idea that comes to mind is to allow ‘etc-service-type’ to be
> extended with procedures that would be able to filter or otherwise
> change the /etc entries (similar to what we do for PAM):
>
> diff --git a/gnu/services.scm b/gnu/services.scm
> index 7e322c5..9397232 100644
> --- a/gnu/services.scm
> +++ b/gnu/services.scm
> @@ -426,9 +426,13 @@ directory."
>  (extensions
>   (list
>(service-extension activation-service-type
> - (lambda (files)
> -   (let ((etc
> -  (files->etc-directory files)))
> + (lambda (files+procs)
> +   (let* ((proc (apply compose
> +   (filter procedure?
> +   
> files+procs)))
> +  (files (filter pair? 
> files+procs))
> +  (etc
> +   (files->etc-directory (proc 
> files
>   #~(activate-etc #$etc
>(service-extension system-service-type etc-entry)))
>  (compose concatenate)
>
>
> In your config, you could have something like:
>
>   (services (cons (simple-service 'rm-/etc/profile etc-service-type
>   (const (lambda (files)
>(assoc-delete "profile" files
>   %base-services))
>
> WDYT?

I think it would be great!  I didn't realize it can be implemented this
way.

> In fact I think we would need to have a more generic mechanism to hook
> into ‘fold-services’, but I’m not sure what it should look like.

Yeah, a more generic way would be better of course, but I think this
mixing of files and procedures is already good enough for now, as it
provides a freedom in customizing a system that we didn't have before.
Besides I will no longer object against the "search-paths" fix for the
bug 20255 :-)

-- 
Alex



Re: User-profile search paths should include system-profile directories

2016-09-20 Thread Carlos Sánchez de La Lama
Alex Kost  writes:

> Carlos Sánchez de La Lama (2016-09-20 09:39 +0200) wrote:
>
>> Hi,
>>
 Is this the intended behaviour? I am wondering whether packages with
 search paths should include both the user-profile directories and the
 system-profile ones.
>>>
>>> I think you’re right.  This was discussed at
>>> , leading to a patch (for GuixSD).
>>>
>>> However, we failed to build consensus around the approach of this patch,
>>> so we did not apply it.  If you have ideas, please email
>>> 20...@debbugs.gnu.org.  :-)
>>
>> what about something like:
>>
>> - /etc/profile
>>   # [...]
>>   GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"
>>   . /run/current-system/profile/etc/profile
>>   # [...]
>>   . "$HOME/.guix-profile/etc/profile"
>>   # [...]
>>
>> - /run/current-system/profile/etc/profile
>>   profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
>>   export PATH="${profiles//:/\/bin}/bin ${profiles//:/\/sbin}/sbin"
>>   # [...]
>>
>>
>> - $HOME/.guix-profile/etc/profile
>>   profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
>>   export ACLOCAL_PATH="${profiles//:/\/share/aclocal}/share/aclocal"
>>   # [...]
>>
>> That is, each profile adds all its search paths to all the profile roots
>> passed in the colon separated variable GUIX_PROFILES. If GUIX_PROFILES
>> is empty, it adds the search paths inside its own directory only (as
>> until now).
>
> I think it was mentioned somewhere in the bug discussion: this will not
> work for some things.  For example, if a user has 'guile' in a system
> profile, and several guile packages (but not 'guile' itself) in
> ~/.guix-profile, then GUILE_LOAD_PATH will include
> "/share/guile/site/2.0" but not
> "/share/guile/site/2.0".  That's why combining profiles
> inside "guix package --search-paths" command looks like the only
> solution.

It will actually solve it, that is the case I was trying to fix in
fact. The code I show will include /share/guile/site/2.0 prefixed
by every root in the colon-separated list GUIX_PROFILES (note the
difference with current code with has GUIX_PROFILE, singular). If
GUIX_PROFILES is (as in the example):

GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"

And guile is in the system profile, the line

export 
GUILE_LOAD_PATH="${profiles//://share/guile/site/2.0:}/share/guile/site/2.0"

will produce:

export 
GUILE_LOAD_PATH=/run/current-system/profile/share/guile/site/2.0:$HOME/.guix-profile/share/guile/site/2.0

As desired. Same result if guile is only in user profile, or if it is on
both. Try the following in bash:

profiles="/run/current-system/profile:$HOME/.guix-profile:/my/third/profile"
echo "${profiles//://share/guile/site/2.0:}/share/guile/site/2.0"

BR

Carlos



[PATCH v2 4/4] gnu: Add arm-none-eabi-toolchain.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (arm-none-eabi-toolchain): New procedure.
(arm-none-eabi-toolchain-4.9, arm-none-eabi-toolchain-nano-4.9): New variables.
(arm-none-eabi-toolchain-6, arm-none-eabi-toolchain-nano-6): New variables.
---
 gnu/packages/embedded.scm | 36 
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 29033b9..0adbcfa 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -188,3 +188,39 @@ usable on embedded products.")
"--enable-newlib-nano-formatted-io"
"--disable-nls"))
 
+(define (arm-none-eabi-toolchain xgcc newlib-arm-none-eabi)
+  (let ((newlib (newlib-arm-none-eabi xgcc)))
+(package
+  (name "arm-none-eabi-toolchain")
+  (version
+   (cond ((string=? (package-name newlib) "newlib")
+  (package-version xgcc))
+ ((string=? (package-name newlib) "newlib-nano")
+  (string-append "nano-" (package-version xgcc)
+  (source #f)
+  (build-system trivial-build-system)
+  (arguments '(#:builder (mkdir %output)))
+  (propagated-inputs
+   `(("binutils" ,xbinutils-arm-none-eabi)
+ ("gcc" ,xgcc)
+ ("newlib" ,newlib)))
+  (synopsis "Complete GCC tool chain for ARM bare metal development")
+  (description "This package provides a complete GCC tool chain for ARM
+bare metal development.  This includes the GCC arm-none-eabi cross compiler and
+newlib (or newlib-nano) as the C library.  The supported programming languages
+are C and C++.")
+  (home-page (package-home-page xgcc))
+  (license (package-license xgcc)
+
+(define-public arm-none-eabi-toolchain-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-6
+  (arm-none-eabi-toolchain  gcc-arm-none-eabi-6  newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-nano-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-6
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-6 newlib-nano-arm-none-eabi))
+
-- 
2.9.3




[PATCH v2 3/4] gnu: Add newlib-arm-none-eabi.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (newlib-arm-none-eabi): New procedure.
(newlib-nano-arm-none-eabi): New procedure.
---
 gnu/packages/embedded.scm | 59 +++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 56fbafb..29033b9 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -129,3 +129,62 @@
   (cons
(search-patch "gcc-6-cross-environment-variables.patch")
(search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
+
+(define (newlib-arm-none-eabi xgcc)
+  (package
+(name "newlib")
+(version "2.4.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-;
+  version ".tar.gz"))
+  (sha256
+   (base32
+"01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"
+(build-system gnu-build-system)
+(arguments
+ `(#:out-of-source? #t
+   #:configure-flags '("--target=arm-none-eabi"
+   "--enable-newlib-io-long-long"
+   "--enable-newlib-register-fini"
+   "--disable-newlib-supplied-syscalls"
+   "--disable-nls")
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'fix-shell-shebangs
+   (lambda _
+ (for-each patch-makefile-SHELL
+   (find-files "." "Makefile.in")))
+(native-inputs
+ `(("xbinutils" ,xbinutils-arm-none-eabi)
+   ("xgcc" ,xgcc)
+   ("texinfo" ,texinfo)))
+(home-page "http://www.sourceware.org/newlib/;)
+(synopsis "C library for use on embedded systems")
+(description "Newlib is a C library intended for use on embedded
+systems.  It is a conglomeration of several library parts that are easily
+usable on embedded products.")
+(license (license:non-copyleft
+  "https://www.sourceware.org/newlib/COPYING.NEWLIB;
+
+(define (newlib-nano-arm-none-eabi xgcc)
+  (package
+(inherit (newlib-arm-none-eabi xgcc))
+(name "newlib-nano")
+(arguments
+ (substitute-keyword-arguments (package-arguments (newlib-arm-none-eabi 
xgcc))
+   ((#:configure-flags flags)
+``("--target=arm-none-eabi"
+   "--enable-multilib"
+   "--disable-newlib-supplied-syscalls"
+   "--enable-newlib-reent-small"
+   "--disable-newlib-fvwrite-in-streamio"
+   "--disable-newlib-fseek-optimization"
+   "--disable-newlib-wide-orient"
+   "--enable-newlib-nano-malloc"
+   "--disable-newlib-unbuf-stream-opt"
+   "--enable-lite-exit"
+   "--enable-newlib-global-atexit"
+   "--enable-newlib-nano-formatted-io"
+   "--disable-nls"))
+
-- 
2.9.3




Re: User-profile search paths should include system-profile directories

2016-09-20 Thread Alex Kost
Carlos Sánchez de La Lama (2016-09-20 09:39 +0200) wrote:

> Hi,
>
>>> Is this the intended behaviour? I am wondering whether packages with
>>> search paths should include both the user-profile directories and the
>>> system-profile ones.
>>
>> I think you’re right.  This was discussed at
>> , leading to a patch (for GuixSD).
>>
>> However, we failed to build consensus around the approach of this patch,
>> so we did not apply it.  If you have ideas, please email
>> 20...@debbugs.gnu.org.  :-)
>
> what about something like:
>
> - /etc/profile
>   # [...]
>   GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"
>   . /run/current-system/profile/etc/profile
>   # [...]
>   . "$HOME/.guix-profile/etc/profile"
>   # [...]
>
> - /run/current-system/profile/etc/profile
>   profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
>   export PATH="${profiles//:/\/bin}/bin ${profiles//:/\/sbin}/sbin"
>   # [...]
>
>
> - $HOME/.guix-profile/etc/profile
>   profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
>   export ACLOCAL_PATH="${profiles//:/\/share/aclocal}/share/aclocal"
>   # [...]
>
> That is, each profile adds all its search paths to all the profile roots
> passed in the colon separated variable GUIX_PROFILES. If GUIX_PROFILES
> is empty, it adds the search paths inside its own directory only (as
> until now).

I think it was mentioned somewhere in the bug discussion: this will not
work for some things.  For example, if a user has 'guile' in a system
profile, and several guile packages (but not 'guile' itself) in
~/.guix-profile, then GUILE_LOAD_PATH will include
"/share/guile/site/2.0" but not
"/share/guile/site/2.0".  That's why combining profiles
inside "guix package --search-paths" command looks like the only
solution.

-- 
Alex



[PATCH v2 4/4] gnu: Add arm-none-eabi-toolchain.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (arm-none-eabi-toolchain): New procedure.
(arm-none-eabi-toolchain-4.9, arm-none-eabi-toolchain-nano-4.9): New variables.
(arm-none-eabi-toolchain-6, arm-none-eabi-toolchain-nano-6): New variables.
---
 gnu/packages/embedded.scm | 36 
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 29033b9..0adbcfa 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -188,3 +188,39 @@ usable on embedded products.")
"--enable-newlib-nano-formatted-io"
"--disable-nls"))
 
+(define (arm-none-eabi-toolchain xgcc newlib-arm-none-eabi)
+  (let ((newlib (newlib-arm-none-eabi xgcc)))
+(package
+  (name "arm-none-eabi-toolchain")
+  (version
+   (cond ((string=? (package-name newlib) "newlib")
+  (package-version xgcc))
+ ((string=? (package-name newlib) "newlib-nano")
+  (string-append "nano-" (package-version xgcc)
+  (source #f)
+  (build-system trivial-build-system)
+  (arguments '(#:builder (mkdir %output)))
+  (propagated-inputs
+   `(("binutils" ,xbinutils-arm-none-eabi)
+ ("gcc" ,xgcc)
+ ("newlib" ,newlib)))
+  (synopsis "Complete GCC tool chain for ARM bare metal development")
+  (description "This package provides a complete GCC tool chain for ARM
+bare metal development.  This includes the GCC arm-none-eabi cross compiler and
+newlib (or newlib-nano) as the C library.  The supported programming languages
+are C and C++.")
+  (home-page (package-home-page xgcc))
+  (license (package-license xgcc)
+
+(define-public arm-none-eabi-toolchain-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-6
+  (arm-none-eabi-toolchain  gcc-arm-none-eabi-6  newlib-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-4.9
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 newlib-nano-arm-none-eabi))
+
+(define-public arm-none-eabi-toolchain-nano-6
+  (arm-none-eabi-toolchain gcc-arm-none-eabi-6 newlib-nano-arm-none-eabi))
+
-- 
2.9.3




[PATCH v2 2/4] gnu: Add arm-none-eabi-gcc-6 and patches.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable.
* gnu/packages/patches/gcc-arm-none-eabi-multilib.patch : New file.
* gnu/packages/patches/gcc-6-cross-environment-variables.patch : New file.
---
 gnu/packages/embedded.scm  |  12 ++
 .../patches/gcc-6-arm-none-eabi-multilib.patch | 201 +
 .../gcc-6-cross-environment-variables.patch|  65 +++
 3 files changed, 278 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8650817..56fbafb 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -117,3 +117,15 @@
  (search-path-specification
   (variable "CROSS_LIBRARY_PATH")
   (files '("arm-none-eabi/lib"
+
+(define-public gcc-arm-none-eabi-6
+  (package
+(inherit gcc-arm-none-eabi-4.9)
+(version (package-version gcc-6))
+(source (origin (inherit (package-source gcc-6))
+(patches
+ (append
+  (origin-patches (package-source gcc-6))
+  (cons
+   (search-patch "gcc-6-cross-environment-variables.patch")
+   (search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch 
b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
new file mode 100644
index 000..442f52b
--- /dev/null
+++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
@@ -0,0 +1,201 @@
+From Anatol Pomozov 
+Taken from Arch Linux arm-none-eabi-gcc package.
+
+Modified version of ARM patch 
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 4ab7405..6e1ea2c 100644
+--- a/gcc/Makefile.in
 b/gcc/Makefile.in
+@@ -535,6 +535,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt 
$(srcdir)/common.opt
+ lang_specs_files=@lang_specs_files@
+ lang_tree_files=@lang_tree_files@
+ target_cpu_default=@target_cpu_default@
++with_multilib_list=@with_multilib_list@
+ OBJC_BOEHM_GC=@objc_boehm_gc@
+ extra_modes_file=@extra_modes_file@
+ extra_opt_files=@extra_opt_files@
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index cb08a5c..7bded02 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1072,7 +1072,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+   case ${target} in
+   arm*-*-eabi*)
+ tm_file="$tm_file newlib-stdint.h"
+-tmake_file="${tmake_file} arm/t-bpabi"
++tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs"
+ use_gcc_stdint=wrap
+ ;;
+   arm*-*-rtems*)
+@@ -3684,42 +3684,6 @@ case "${target}" in
+   exit 1
+   fi
+ 
+-  # Add extra multilibs
+-  if test "x$with_multilib_list" != x; then
+-  arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ 
/g'`
+-  for arm_multilib in ${arm_multilibs}; do
+-  case ${arm_multilib} in
+-  aprofile)
+-  # Note that arm/t-aprofile is a
+-  # stand-alone make file fragment to be
+-  # used only with itself.  We do not
+-  # specifically use the
+-  # TM_MULTILIB_OPTION framework because
+-  # this shorthand is more
+-  # pragmatic. Additionally it is only
+-  # designed to work without any
+-  # with-cpu, with-arch with-mode
+-  # with-fpu or with-float options.
+-  if test "x$with_arch" != x \
+-  || test "x$with_cpu" != x \
+-  || test "x$with_float" != x \
+-  || test "x$with_fpu" != x \
+-  || test "x$with_mode" != x ; then
+-  echo "Error: You cannot use any of 
--with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
+-  exit 1
+-  fi
+-  tmake_file="${tmake_file} 
arm/t-aprofile"
+-  break
+-  ;;
+-  default)
+-  ;;
+-  *)
+-  echo "Error: 
--with-multilib-list=${with_multilib_list} not supported." 1>&2
+- 

[PATCH v2 0/1] Add GCC cross compiler for arm-none-eabi.

2016-09-20 Thread Theodoros Foradis

Hello Guix and Ricardo,

The original patch series was working correctly and producing working binaries. 
There were
some path issues, which I mention later. Some features and flags (present in 
6.2.0)
are missing from that version of GCC 4.9, so I added GCC 6.2.0 as an extra 
option.

Here are the modifications to Ricardo's patches for the arm-none-eabi
bare metal cross compiler:

- Cross-binutils is modified to use binutils 2.5.1, that cross-base provides,
as it is producing working binaries. The version of binutils from the svn commit
that was used by Ricardo is compiling correct binaries as well. Thus, if it is
deemed appropriate, the source for xbinutils can be swapped for the previous 
one,
with (seemingly) no difference.

- The cross-gcc of the original, was failing to find the newlib-provided 
headers in
my system. I have set the native-cross-paths as a workaround. Not sure if there
is a better alternative, or if that behavior is my mistake.

- A package for cross GCC 6.2.0 is added, with appropriate patches for multilib
support, taken from the arch linux version of the package.

- Newlib-arm-none-eabi and newlib-nano-arm-none-eabi have been changed to
procedures, taking a cross-gcc as an argument, so as to facilitate building with
either version of gcc.

- An arm-none-eabi-toolchain procedure is declared, to create toolchain packages
for both gcc and newlib versions. The four toolchain variables follow. Not sure
if it's a mistake to include "nano" in the toolchain version.

This is the first patch that I send in guix-devel, so please bear with my 
mistakes.

Regards,
Theodoros Foradis


* gnu: Add arm-none-eabi-toolchain.
* gnu: Add newlib-arm-none-eabi.
* gnu: Add arm-none-eabi-gcc-6 and patches.
* gnu: Add arm-none-eabi cross compiler.

 gnu/local.mk |   1 +
 gnu/packages/bootstrap.scm   |   1 +
 gnu/packages/embedded.scm| 226 
+++
 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch  | 201 
+++
 gnu/packages/patches/gcc-6-cross-environment-variables.patch |  65 
+++
 5 files changed, 494 insertions(+)
 create mode 100644 gnu/packages/embedded.scm
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch



[PATCH v2 2/4] gnu: Add arm-none-eabi-gcc-6 and patches.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (gcc-arm-none-eabi-6): New variable.
* gnu/packages/patches/gcc-arm-none-eabi-multilib.patch : New file.
* gnu/packages/patches/gcc-6-cross-environment-variables.patch : New file.
---
 gnu/packages/embedded.scm  |  12 ++
 .../patches/gcc-6-arm-none-eabi-multilib.patch | 201 +
 .../gcc-6-cross-environment-variables.patch|  65 +++
 3 files changed, 278 insertions(+)
 create mode 100644 gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
 create mode 100644 gnu/packages/patches/gcc-6-cross-environment-variables.patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8650817..56fbafb 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -117,3 +117,15 @@
  (search-path-specification
   (variable "CROSS_LIBRARY_PATH")
   (files '("arm-none-eabi/lib"
+
+(define-public gcc-arm-none-eabi-6
+  (package
+(inherit gcc-arm-none-eabi-4.9)
+(version (package-version gcc-6))
+(source (origin (inherit (package-source gcc-6))
+(patches
+ (append
+  (origin-patches (package-source gcc-6))
+  (cons
+   (search-patch "gcc-6-cross-environment-variables.patch")
+   (search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
diff --git a/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch 
b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
new file mode 100644
index 000..442f52b
--- /dev/null
+++ b/gnu/packages/patches/gcc-6-arm-none-eabi-multilib.patch
@@ -0,0 +1,201 @@
+From Anatol Pomozov 
+Taken from Arch Linux arm-none-eabi-gcc package.
+
+Modified version of ARM patch 
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00083/enable-with-multilib-list-for-arm.patch
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 4ab7405..6e1ea2c 100644
+--- a/gcc/Makefile.in
 b/gcc/Makefile.in
+@@ -535,6 +535,7 @@ lang_opt_files=@lang_opt_files@ $(srcdir)/c-family/c.opt 
$(srcdir)/common.opt
+ lang_specs_files=@lang_specs_files@
+ lang_tree_files=@lang_tree_files@
+ target_cpu_default=@target_cpu_default@
++with_multilib_list=@with_multilib_list@
+ OBJC_BOEHM_GC=@objc_boehm_gc@
+ extra_modes_file=@extra_modes_file@
+ extra_opt_files=@extra_opt_files@
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index cb08a5c..7bded02 100644
+--- a/gcc/config.gcc
 b/gcc/config.gcc
+@@ -1072,7 +1072,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
+   case ${target} in
+   arm*-*-eabi*)
+ tm_file="$tm_file newlib-stdint.h"
+-tmake_file="${tmake_file} arm/t-bpabi"
++tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs"
+ use_gcc_stdint=wrap
+ ;;
+   arm*-*-rtems*)
+@@ -3684,42 +3684,6 @@ case "${target}" in
+   exit 1
+   fi
+ 
+-  # Add extra multilibs
+-  if test "x$with_multilib_list" != x; then
+-  arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ 
/g'`
+-  for arm_multilib in ${arm_multilibs}; do
+-  case ${arm_multilib} in
+-  aprofile)
+-  # Note that arm/t-aprofile is a
+-  # stand-alone make file fragment to be
+-  # used only with itself.  We do not
+-  # specifically use the
+-  # TM_MULTILIB_OPTION framework because
+-  # this shorthand is more
+-  # pragmatic. Additionally it is only
+-  # designed to work without any
+-  # with-cpu, with-arch with-mode
+-  # with-fpu or with-float options.
+-  if test "x$with_arch" != x \
+-  || test "x$with_cpu" != x \
+-  || test "x$with_float" != x \
+-  || test "x$with_fpu" != x \
+-  || test "x$with_mode" != x ; then
+-  echo "Error: You cannot use any of 
--with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
+-  exit 1
+-  fi
+-  tmake_file="${tmake_file} 
arm/t-aprofile"
+-  break
+-  ;;
+-  default)
+-  ;;
+-  *)
+-  echo "Error: 
--with-multilib-list=${with_multilib_list} not supported." 1>&2
+- 

[PATCH v2 3/4] gnu: Add newlib-arm-none-eabi.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/embedded.scm (newlib-arm-none-eabi): New procedure.
(newlib-nano-arm-none-eabi): New procedure.
---
 gnu/packages/embedded.scm | 59 +++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 56fbafb..29033b9 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -129,3 +129,62 @@
   (cons
(search-patch "gcc-6-cross-environment-variables.patch")
(search-patches 
"gcc-6-arm-none-eabi-multilib.patch"
+
+(define (newlib-arm-none-eabi xgcc)
+  (package
+(name "newlib")
+(version "2.4.0")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-;
+  version ".tar.gz"))
+  (sha256
+   (base32
+"01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl"
+(build-system gnu-build-system)
+(arguments
+ `(#:out-of-source? #t
+   #:configure-flags '("--target=arm-none-eabi"
+   "--enable-newlib-io-long-long"
+   "--enable-newlib-register-fini"
+   "--disable-newlib-supplied-syscalls"
+   "--disable-nls")
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'fix-shell-shebangs
+   (lambda _
+ (for-each patch-makefile-SHELL
+   (find-files "." "Makefile.in")))
+(native-inputs
+ `(("xbinutils" ,xbinutils-arm-none-eabi)
+   ("xgcc" ,xgcc)
+   ("texinfo" ,texinfo)))
+(home-page "http://www.sourceware.org/newlib/;)
+(synopsis "C library for use on embedded systems")
+(description "Newlib is a C library intended for use on embedded
+systems.  It is a conglomeration of several library parts that are easily
+usable on embedded products.")
+(license (license:non-copyleft
+  "https://www.sourceware.org/newlib/COPYING.NEWLIB;
+
+(define (newlib-nano-arm-none-eabi xgcc)
+  (package
+(inherit (newlib-arm-none-eabi xgcc))
+(name "newlib-nano")
+(arguments
+ (substitute-keyword-arguments (package-arguments (newlib-arm-none-eabi 
xgcc))
+   ((#:configure-flags flags)
+``("--target=arm-none-eabi"
+   "--enable-multilib"
+   "--disable-newlib-supplied-syscalls"
+   "--enable-newlib-reent-small"
+   "--disable-newlib-fvwrite-in-streamio"
+   "--disable-newlib-fseek-optimization"
+   "--disable-newlib-wide-orient"
+   "--enable-newlib-nano-malloc"
+   "--disable-newlib-unbuf-stream-opt"
+   "--enable-lite-exit"
+   "--enable-newlib-global-atexit"
+   "--enable-newlib-nano-formatted-io"
+   "--disable-nls"))
+
-- 
2.9.3




[PATCH v2 1/4] gnu: Add arm-none-eabi cross compiler.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for "arm-eabi".
* gnu/packages/embedded.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk   |   1 +
 gnu/packages/bootstrap.scm |   1 +
 gnu/packages/embedded.scm  | 119 +
 3 files changed, 121 insertions(+)
 create mode 100644 gnu/packages/embedded.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 4076121..caecfa2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -110,6 +110,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/education.scm   \
   %D%/packages/elf.scm \
   %D%/packages/elixir.scm  \
+  %D%/packages/embedded.scm\
   %D%/packages/emacs.scm   \
   %D%/packages/enchant.scm \
   %D%/packages/engineering.scm \
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index f47a343..f6faba3 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -171,6 +171,7 @@ successful, or false to signal an error."
 
 ;; XXX: This one is used bare-bones, without a libc, so add a case
 ;; here just so we can keep going.
+((string=? system "arm-eabi") "no-ld.so")
 ((string=? system "xtensa-elf") "no-ld.so")
 ((string=? system "avr") "no-ld.so")
 ((string=? system "i686-mingw") "no-ld.so")
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
new file mode 100644
index 000..8650817
--- /dev/null
+++ b/gnu/packages/embedded.scm
@@ -0,0 +1,119 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Ricardo Wurmus 
+;;; Copyright © 2016 Theodoros Foradis 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages embedded)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix svn-download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages texinfo))
+
+(define-public xbinutils-arm-none-eabi
+  (let ((parent (cross-binutils "arm-none-eabi")))
+(package
+  (inherit parent)
+  (native-inputs
+   `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("bison" ,bison)
+ ("flex" ,flex)
+ ,@(package-native-inputs parent)))
+  (arguments
+   `(,@(substitute-keyword-arguments (package-arguments parent)
+ ((#:configure-flags flags)
+  `(cons "--enable-multilib"
+ (delete "--disable-multilib" ,flags)
+
+;; Commit hashes and SVN revisions for xgcc 4.9 are taken
+;; from https://launchpadlibrarian.net/209776344/release.txt
+;; We must not use the released GCC 4.9 sources here, because the 
cross-compiler
+;; does not produce working binaries.  Instead we take the very same SVN
+;; revision from the branch that is used for a release of the "GCC ARM
+;; embedded" project on launchpad.
+(define-public gcc-arm-none-eabi-4.9
+  (let ((xgcc (cross-gcc "arm-none-eabi"
+ xbinutils-arm-none-eabi))
+(revision "1")
+(svn-revision 224288))
+(package (inherit xgcc)
+  (version (string-append (package-version xgcc) "-"
+  revision "." (number->string svn-revision)))
+  (source
+   (origin
+ (method svn-fetch)
+ (uri (svn-reference
+   (url 
"svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/")
+   (revision svn-revision)))
+ (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
+ (sha256
+  (base32
+   "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))
+ (patches (origin-patches (package-source xgcc)
+  (native-inputs
+   `(("flex" ,flex)
+ ,@(package-native-inputs xgcc)))
+  

[PATCH v2 1/4] gnu: Add arm-none-eabi cross compiler.

2016-09-20 Thread Theodoros Foradis
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add case for "arm-eabi".
* gnu/packages/embedded.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk   |   1 +
 gnu/packages/bootstrap.scm |   1 +
 gnu/packages/embedded.scm  | 119 +
 3 files changed, 121 insertions(+)
 create mode 100644 gnu/packages/embedded.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 4076121..caecfa2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -110,6 +110,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/education.scm   \
   %D%/packages/elf.scm \
   %D%/packages/elixir.scm  \
+  %D%/packages/embedded.scm\
   %D%/packages/emacs.scm   \
   %D%/packages/enchant.scm \
   %D%/packages/engineering.scm \
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index f47a343..f6faba3 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -171,6 +171,7 @@ successful, or false to signal an error."
 
 ;; XXX: This one is used bare-bones, without a libc, so add a case
 ;; here just so we can keep going.
+((string=? system "arm-eabi") "no-ld.so")
 ((string=? system "xtensa-elf") "no-ld.so")
 ((string=? system "avr") "no-ld.so")
 ((string=? system "i686-mingw") "no-ld.so")
diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
new file mode 100644
index 000..8650817
--- /dev/null
+++ b/gnu/packages/embedded.scm
@@ -0,0 +1,119 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Ricardo Wurmus 
+;;; Copyright © 2016 Theodoros Foradis 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages embedded)
+  #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix svn-download)
+  #:use-module (guix git-download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages bison)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages texinfo))
+
+(define-public xbinutils-arm-none-eabi
+  (let ((parent (cross-binutils "arm-none-eabi")))
+(package
+  (inherit parent)
+  (native-inputs
+   `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("bison" ,bison)
+ ("flex" ,flex)
+ ,@(package-native-inputs parent)))
+  (arguments
+   `(,@(substitute-keyword-arguments (package-arguments parent)
+ ((#:configure-flags flags)
+  `(cons "--enable-multilib"
+ (delete "--disable-multilib" ,flags)
+
+;; Commit hashes and SVN revisions for xgcc 4.9 are taken
+;; from https://launchpadlibrarian.net/209776344/release.txt
+;; We must not use the released GCC 4.9 sources here, because the 
cross-compiler
+;; does not produce working binaries.  Instead we take the very same SVN
+;; revision from the branch that is used for a release of the "GCC ARM
+;; embedded" project on launchpad.
+(define-public gcc-arm-none-eabi-4.9
+  (let ((xgcc (cross-gcc "arm-none-eabi"
+ xbinutils-arm-none-eabi))
+(revision "1")
+(svn-revision 224288))
+(package (inherit xgcc)
+  (version (string-append (package-version xgcc) "-"
+  revision "." (number->string svn-revision)))
+  (source
+   (origin
+ (method svn-fetch)
+ (uri (svn-reference
+   (url 
"svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/")
+   (revision svn-revision)))
+ (file-name (string-append "gcc-arm-embedded-" version "-checkout"))
+ (sha256
+  (base32
+   "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr"))
+ (patches (origin-patches (package-source xgcc)
+  (native-inputs
+   `(("flex" ,flex)
+ ,@(package-native-inputs xgcc)))
+  

Re: “guile-next” failed — but actually didn’t

2016-09-20 Thread Ludovic Courtès
Hi,

Alex Vong  skribis:

> Ricardo Wurmus  writes:
>
>> Hi Guix,
>>
>> Hydra lists the build for “guile-next” at version 2.1.4 as failed, even
>> though, according to the logs, it has been built successfully.  This
>> causes the “guile2.2-*” packages to be marked as failed, too.
>>
>> See https://hydra.gnu.org/build/1473033
>>
>> What’s going on there?  Should we restart the build or can we mark it as
>> successful somehow?

That can happen when, say, the SSH connection to the build machine fails
before the result has been retrieved on hydra.gnu.org (dunno if that is
the case here.)

> The status is now "Success" on .

Presumably somebody restarted it in the meantime.  :-)

Ludo’.



Re: [PATCH 1/2] gnu: Add femtolisp.

2016-09-20 Thread Ludovic Courtès
Andreas Enge  skribis:

> femtolisp fails on mips and arm:
>http://hydra.gnu.org:3000/build/1472987/nixlog/2/tail-reload
> with the message
> In file included from llt/llt.h:6:0,
>  from string.c:16:
> llt/utils.h:27:4: error: #error "unknown architecture"
>  #  error "unknown architecture"
>
> Should it be disabled there?

Definitely.  It would be worth checking in that file the set of
supported architectures, and putting them in ‘supported-platforms’.

Ludo’.



Re: [PATCH] Clean all .go in clean-go

2016-09-20 Thread Ludovic Courtès
Hi,

Eric Bavier  skribis:

> So, with the attached patch, I get the following output after `make
> clean-go`:
>
> warning: stray .go files: ./guix/scripts/import/cpan.go ./gnu/services/dmd.go
> ./gnu/system/linux.go ./gnu/packages/yasm.go ./gnu/packages/cursynth.go 
> ./gnu/packages/lightning.go ./gnu/packages/doxygen.go ./gnu/packages/tre.go 
> ./gnu/packages/asciidoc.go ./gnu/packages/texlive.go ./gnu/packages/i3.go 
> ./gnu/packages/fish.go ./gnu/packages/slim.go ./gnu/packages/tcsh.go 
> ./gnu/packages/zsh.go ./gnu/packages/lsh.go ./gnu/packages/rc.go 
> ./gnu/packages/openssl.go ./gnu/packages/aria2.go ./gnu/packages/gdbm.go 
> ./gnu/packages/gnutls.go ./gnu/packages/grue-hunter.go 
> ./gnu/packages/aarddict.go

Looks good, surely an improvement!

> Another issue that I thought of that's posed by these stray .go files,
> which isn't only a problem when acting as a wizard: introducing a new
> module import when adding a package, only to have that module
> moved/renamed before pushing your change.  I suppose it is a corner
> case, but it did happen to me recently, in 2e3f18511, which 宋文武
> kindly fixed in 19b2ea1b6. The problem was that between the time I
> originally packaged tomb and the time I pushed the commit,
> gnu/packages/zsh.scm was consolidated into gnu/packages/shells.scm.  I
> had done a `make clean-go && make` before pushing, as I always do, but
> since clean-go didn't remove gnu/packages/zsh.go the subsequent `make`
> didn't complain of a missing module.

Indeed, that’s happened to me before.

> From ffe1710d5a91cd9906f2419d21944b1375b1b842 Mon Sep 17 00:00:00 2001
> From: Eric Bavier 
> Date: Thu, 15 Sep 2016 23:31:41 -0500
> Subject: [PATCH] build: clean-go: warn about stray .go files.
>
> * Makefile.am (clean-go): Warn of .go files remaining in builddir.

LGTM, thank you!

Ludo’.



Re: [PATCH] gnu: rottlog: rotate messages daily.

2016-09-20 Thread Ludovic Courtès
Hello Jan!

Jan Nieuwenhuizen  skribis:

> Ludovic Courtès writes:
>
>> I would add /var/log/{secure,shepherd.log}, but weekly is probably
>> enough.
>
> Ok.  I implemented this by changing the rottlog package that already
> modifies etc/weekly.

The current ‘tweak-rc-weekly’ phase “fixes a bug” in etc/weekly, but I
don’t think we should do customization in the package itself.  Instead,
it would be more appropriate to generate/provide the configuration files
that we need, without further modifying the package itself.  WDYT?

> I'm not sure if sending SIGHUP to syslog is ok for shepherd.log or
> that would need to be a kill 1?  See attached.

GuixSD runs syslogd from Inetutils, so it’s not PID 1, fortunately.  ;-)

However, shepherd.log is written by PID_1, indeed, and we shouldn’t send
SIGHUP to PID 1.  However, I don’t think anything bad will happen if
rottlog moves shepherd.log and Shepherd doesn’t reopen this file.

>>> +(define* (rottlog-service
>>
>> This can be omitted.  It’s enough to expose ‘rottlog-service-type’ and
>> ‘rottlog-configuration’.
>
> Hmm.  I removed all the defaulting here and then removed the function
> alltogether, but then I cannot seem to do
>
>   (services (cons* (mcron-service) (rottlog-service) %base-services)))
>
> anymore.  Is that right?

Yes.  Instead, you have to write:

  (services (cons* (service rottlog-service-type
(rottlog-configuration …))
   …))

> I'm feeling a bit stubborn keeping this but I thought that's what we
> want and my test showed me that this is needed.  So I kept a minimal of
> this function.  Please just remove+enlighten me how to use it if this
> can really go :-)

I hope the above sheds some light on this.  WDYT of this idea?

> From e8e489db62337c6e8ef03e745a56938566e078c8 Mon Sep 17 00:00:00 2001
> From: Jan Nieuwenhuizen 
> Date: Wed, 14 Sep 2016 19:04:38 +0200
> Subject: [PATCH 1/2] gnu: update rottlog: install guix-specific etc/weekly.
>
> * gnu/packages/admin.scm (rottlog): Install guix-specific etc/weekly
> for rotating /var/log/{messages,secureshepherd.log}.

As discussed above, I think this is the wrong place for this.

> From 59213cce5d6d4e41f9b6f321e3fef0567c22 Mon Sep 17 00:00:00 2001
> From: Jan Nieuwenhuizen 
> Date: Thu, 8 Sep 2016 01:20:43 +0200
> Subject: [PATCH 2/2] gnu: services: add rottlog.
>
> * gnu/services/admin.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * doc/guix.texi (Log Rotation): Document it.

[...]

> +  (periodic-rotations rottlog-periodic-rotations ; list of (name file) tuples
> +  (default `(("weekly"
> +  ,(file-append rottlog "/etc/weekly")

Here I would suggest adding somewhere:


  (define %rotated-files
'("/var/log/messages" …))

  (define (syslog-rotation-config file)
(string-append file " {
…
kill -HUP …
…")))

  (define (simple-rotation-config file)
;; Same as above, but without “kill -HUP”.
…)

  (define %default-rotations
`(("weekly" . ,(plain-file "rottlog.weekly"
   (string-append (string-join
   (map syslog-rotation-config
'("/var/log/messages"…)))
  (simple-rotation-config
   "shepherd.log"))

Does that make sense?

> +  (jobs rottlog-jobs ; list of 
> +(default
> +  (list #~(job
> +   '(next-hour '(0))
> +   (lambda ()
> + (system (string-append #$rottlog "/sbin/rottlog"
> +#~(job
> +   '(next-hour '(12))
> +   (lambda ()
> + (system (string-append #$rottlog "/sbin/rottlog"

Please move (list …) to a global variable, to avoid code duplication
when the macro is expanded.

Use ‘system*’ instead of ‘system’ (the latter does “/bin/sh -c”, which
is unnecessary here.)

Also, this should use the ‘rottlog’ package of ,
which cannot be referred to from the default value, which is a constant.
Thus, you may have to change the default to #f, and generate the default
value upon #f.

TIA!

Ludo’.



[PATCH 3/3] gnu: Duplicity: Update to 0.7.10

2016-09-20 Thread Brendan Tildesley
May as well put my name on this now that I have 2 packages in
backup.scm. The test_selection patch is no longer needed, as the patch
is already in the code. The piped password-patch I'm less sure about. It
seemed to work fine without. Is this the kind of thing that would fail
on Hydra but not in a interactive terminal? Maybe it is needed.
>From 88a87a8c6ba19ba66f2a7cfb2efe9fd707d4d9e2 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley 
Date: Tue, 20 Sep 2016 20:41:30 +1000
Subject: [PATCH 3/3] gnu: Update duplicity.

* gnu/packages/backup.scm (duplicity): Update to 0.7.10.
* gnu/packages/patches/duplicity-piped-password.patch: Deleted.
* gnu/packages/patches/duplicity-test_selection-tmp.patch: Deleted.
---
 gnu/packages/backup.scm| 82 +-
 .../patches/duplicity-piped-password.patch | 20 --
 .../patches/duplicity-test_selection-tmp.patch | 18 -
 3 files changed, 47 insertions(+), 73 deletions(-)
 delete mode 100644 gnu/packages/patches/duplicity-piped-password.patch
 delete mode 100644 gnu/packages/patches/duplicity-test_selection-tmp.patch

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index e77c4f2..408389a 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier 
 ;;; Copyright © 2014 Ian Denhardt 
 ;;; Copyright © 2015, 2016 Leo Famulari 
+;;; Copyright © 2016 Brendan Tildesley 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages ftp)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
@@ -51,53 +53,63 @@
 (define-public duplicity
   (package
 (name "duplicity")
-(version "0.6.26")
+(version "0.7.10")
 (source
  (origin
-  (method url-fetch)
-  (uri (string-append "https://code.launchpad.net/duplicity/;
-  (version-major+minor version)
-  "-series/" version "/+download/duplicity-"
-  version ".tar.gz"))
-  (sha256
-   (base32
-"0jh79syhr8n3l81jxlwsmwm1pklb4d923m2lgqbswyavh1fqmvwb"))
-  (patches (search-patches "duplicity-piped-password.patch"
-   "duplicity-test_selection-tmp.patch"
+   (method url-fetch)
+   (uri (string-append "https://code.launchpad.net/duplicity/;
+   (version-major+minor version)
+   "-series/" version "/+download/duplicity-"
+   version ".tar.gz"))
+   (sha256
+(base32
+ "0hj8451gpndyqdfxwhbxwr9ddxvc47g0iv003q33q5kda8ayyps8"
 (build-system python-build-system)
 (native-inputs
  `(("python2-setuptools" ,python2-setuptools)
-   ("util-linux" ,util-linux))) ;setsid command, for the tests
+   ("python2-mock" ,python2-mock)
+   ("util-linux" ,util-linux))) ; setsid command, for the tests
 (inputs
  `(("python" ,python-2)
("librsync" ,librsync)
-   ("mock" ,python2-mock)   ;for testing
-   ("lockfile" ,python2-lockfile)
-   ("gnupg" ,gnupg-1)   ;gpg executable needed
-   ("util-linux" ,util-linux)   ;for setsid
-   ("tzdata" ,tzdata)))
+   ("python2-lockfile" ,python2-lockfile)
+   ("python2-pexpect" ,python2-pexpect)
+   ("python2-paramiko" ,python2-paramiko)
+   ("python2-pycrypto" ,python2-pycrypto)
+   ("python2-botocore" ,python2-botocore)
+   ("python2-dropbox" ,python2-dropbox)
+   ("lftp" ,lftp)
+   ("gnupg" ,gnupg-1)
+   ("ncftp" ,ncftp)
+   ("tzdata" ,tzdata)
+   ("par2cmdline" ,par2cmdline)))
 (arguments
- `(#:python ,python-2   ;setup assumes Python 2
+ `(#:python ,python-2
#:test-target "test"
-   #:phases (alist-cons-before
- 'check 'check-setup
- (lambda* (#:key inputs #:allow-other-keys)
-   (substitute* "testing/functional/__init__.py"
- (("/bin/sh") (which "sh")))
-   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
-   (setenv "TZDIR"  ;some timestamp checks need TZDIR
-   (string-append (assoc-ref inputs "tzdata")
-  "/share/zoneinfo")))
- %standard-phases)))
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'check 'check-setup
+   (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("testing/functional/__init__.py"
+"testing/overrides/bin/lftp")
+   (("/bin/sh") (which 

[PATCH 2/3] gnu: Add python-dropbox

2016-09-20 Thread Brendan Tildesley

>From b76af9fa56ebd49147d91e9944281ea0da55a752 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley 
Date: Tue, 20 Sep 2016 20:07:31 +1000
Subject: [PATCH 2/3] gnu: Add python-dropbox.

* gnu/packages/python.scm (python-dropbox): New variable.
* gnu/packages/python.scm (python2-dropbox): New variable.
---
 gnu/packages/python.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 77fcdf6..d80e710 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10918,3 +10918,31 @@ and runtime type checkers, static analyzers, IDEs and other tools.")
 
 (define-public python2-typing
   (package-with-python2 python-typing))
+
+(define-public python-dropbox
+  (package
+(name "python-dropbox")
+(version "6.8.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "dropbox" version))
+   (sha256
+(base32
+ "0csd2mgsppmfw66c8mk0309p9w05wnqisqsn0qaqmcxygq156nhi"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(inputs
+ `(("python-requests" ,python-requests)
+   ("python-six" ,python-six)
+   ("python-urllib3" ,python-urllib3)))
+(propagated-inputs
+ `(("python-typing" ,python-typing)))
+(home-page "http://www.dropbox.com/developers;)
+(synopsis "Official Dropbox API Client")
+(description "Python SDK for integrating with the Dropbox API")
+(license license:expat)))
+
+(define-public python2-dropbox
+  (package-with-python2 python-dropbox))
-- 
2.9.3



[PATCH 1/3] gnu: Add python-typing

2016-09-20 Thread Brendan Tildesley

>From 3536a1cecbd10a499b1a76c34b7cd7b1b11c5f61 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley 
Date: Tue, 20 Sep 2016 19:45:28 +1000
Subject: [PATCH 1/3] gnu: Add python-typing.

* gnu/packages/python.scm (python-typing): New variable.
* gnu/packages/python.scm (python2-typing): New variable.
---
 gnu/packages/python.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 96589fc..77fcdf6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10891,3 +10891,30 @@ with an associated set of resolve methods that know how to fetch data.")
 provide extendible implementations of common aspects of a cloud so that you can
 focus on building massively scalable web applications.")
 (license license:expat)))
+
+(define-public python-typing
+  (package
+(name "python-typing")
+(version "3.5.2.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append (pypi-uri "typing" version)))
+   (sha256
+(base32
+ "0bvpqkmrnl5qs5491yb4irrkd8sha84g6xy8cclp3bsk4qlk9kib"
+(build-system python-build-system)
+(inputs
+ `(("python-setuptools" ,python-setuptools)))
+(arguments
+ `(#:tests? #f)) ; no setup.py test
+(home-page "https://docs.python.org/3.5/library/typing.html;)
+(synopsis "Type Hints for Python")
+(description "Typing defines a standard notation for Python function and
+variable type annotations.  The notation can be used for documenting code in a
+concise, standard format, and it has been designed to also be used by static
+and runtime type checkers, static analyzers, IDEs and other tools.")
+(license license:psfl)))
+
+(define-public python2-typing
+  (package-with-python2 python-typing))
-- 
2.9.3



[PATCH 0/3] gnu: Duplicity: Update to 0.7.10

2016-09-20 Thread Brendan Tildesley
Hi, I've been working on an update for Duplicity. Updating duplicity its
self was easy, but I also tried adding some more backend support. I was
able to get python-dropbox working although it may not be packaged
properly, for example, the documentation seems to be on readthedocs.org
but not in the package? Python-six claims to be required, but It doesn't
look like any tests are even run by default. Strangely, I could not find
the same package in debian's repository. What's up with that? I found it
in Archlinux's repo for comparison. Note that this is not the
proprietary Dropbox program and that is not required by python-dropbox.
I also tried packaging python2-gdata but that was a disaster. It hasn't
been updated in a year or two ago, possibly obsolete? I can't package
these backends well when I don't even use them, so I was wondering there
was anyone around interested in packaging them. Regardless, this
provides a much needed upgrade from the obsolete 0.6.x series of
Duplicity that can be used without any such backend.

https://packages.debian.org/search?suite=all=all=any=names=dropbox

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/python-dropbox




Re: [PATCH] gnu: openldap: Use gnutls.

2016-09-20 Thread Jan Synáček
On Fri, Sep 16, 2016 at 6:21 PM, Alex Vong  wrote:
> Hello,

Hi,

> The following patch does what the title says. The link of the bug
>  is no
> longer accessible, so I assume the bug is fixd since I cannot find it on
> the internet.

The #7430 was fixed in 2013.

> ==
> # Download the upstream source and make changes as required for DFSG reasons.
> # Assumes wget is available, as this is generally only used by the package
> # maintainers.
> get-orig-source:
> @if [ ! -d "debian/schema" ] ; then \
> echo 'Run this from the top directory of the Debian source' >&2; \
> exit 1; \
> fi
> wget $(URL)/openldap-$(VERSION).tgz
> tar xzf openldap-$(VERSION).tgz
> rm -r openldap-$(VERSION)/doc/drafts
> rm -r openldap-$(VERSION)/doc/rfc
> set -e; for schema in debian/schema/*.schema debian/schema/*.ldif ; 
> do \
> file=`basename "$$schema"`; \
> rm openldap-$(VERSION)/servers/slapd/schema/$$file; \
> done
> mv openldap-$(VERSION) openldap-$(VERSION)+dfsg
> tar cf openldap_$(VERSION)+dfsg.orig.tar openldap-$(VERSION)+dfsg
> rm -r openldap-$(VERSION)+dfsg
> gzip -9 openldap_$(VERSION)+dfsg.orig.tar
> ==

as a former OpenLDAP maintainer on Fedora and RHEL, I strongly suggest
you link it against openssl. It's basically the only really supported
crypto upstream.

-- 
Jan Synáček



Re: [PATCH] gnu: openldap: Use gnutls.

2016-09-20 Thread Efraim Flashner
On Sat, Sep 17, 2016 at 12:21:10AM +0800, Alex Vong wrote:
> Hello,
> 
> The following patch does what the title says. The link of the bug
>  is no
> longer accessible, so I assume the bug is fixd since I cannot find it on
> the internet. In addition, I have checked debian's version, which is
> slightly older (2.4.42), which also uses gnutls. So I think we are safe
> here. Please object if there is a problem!
> 
> Please note that openldap is an input for curl, so I guess it is causing
> the openssl dependency problem for octave I mentioned earlier. I haven't
> test to build octave with curl though, which takes a while.
> 
> Finally, I have checked debian's build script and find the following:
> 
> ==
> # Download the upstream source and make changes as required for DFSG reasons.
> # Assumes wget is available, as this is generally only used by the package
> # maintainers.
> get-orig-source:
>   @if [ ! -d "debian/schema" ] ; then \
>   echo 'Run this from the top directory of the Debian source' >&2; \
>   exit 1; \
>   fi
>   wget $(URL)/openldap-$(VERSION).tgz
>   tar xzf openldap-$(VERSION).tgz
>   rm -r openldap-$(VERSION)/doc/drafts
>   rm -r openldap-$(VERSION)/doc/rfc
>   set -e; for schema in debian/schema/*.schema debian/schema/*.ldif ; do \
>   file=`basename "$$schema"`; \
>   rm openldap-$(VERSION)/servers/slapd/schema/$$file; \
>   done
>   mv openldap-$(VERSION) openldap-$(VERSION)+dfsg
>   tar cf openldap_$(VERSION)+dfsg.orig.tar openldap-$(VERSION)+dfsg
>   rm -r openldap-$(VERSION)+dfsg
>   gzip -9 openldap_$(VERSION)+dfsg.orig.tar
> ==
> 
> Is the rfc documents considered fsf-free? Otherwise, we will have to
> remove them and repack the source.
> 

I believe that Debian doesn't consider them to be DFSG compliant because
they cannot be modified, just like the invariant sections of the GFDL
run afoul of the DFSG. So without actually checking I'd assume that
they're ok to distribute in Guix.


-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: cracklib: Fix buffer overflow

2016-09-20 Thread Efraim Flashner
On Thu, Sep 15, 2016 at 11:36:46AM -0400, Leo Famulari wrote:
> This patch cherry-picks an upstream commit to fix a buffer overflow in
> cracklib. Please see the patch file for more information about the bug.

> From 62f8f1763ba1766e92e8dc05686bd9353eaf2ad5 Mon Sep 17 00:00:00 2001
> From: Leo Famulari 
> Date: Thu, 15 Sep 2016 11:34:49 -0400
> Subject: [PATCH] gnu: cracklib: Fix buffer overflow.
> 
> * gnu/packages/patches/cracklib-fix-buffer-overflow.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/password-utils.scm (cracklib)[source]: Use it.
> ---
>  gnu/local.mk   |  1 +
>  gnu/packages/password-utils.scm|  3 +-
>  .../patches/cracklib-fix-buffer-overflow.patch | 39 
> ++
>  3 files changed, 42 insertions(+), 1 deletion(-)
>  create mode 100644 gnu/packages/patches/cracklib-fix-buffer-overflow.patch
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index a7006cb..ab052af 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -473,6 +473,7 @@ dist_patch_DATA = 
> \
>%D%/packages/patches/cpio-CVE-2016-2037.patch  \
>%D%/packages/patches/cpufrequtils-fix-aclocal.patch\
>%D%/packages/patches/cracklib-CVE-2016-6318.patch  \
> +  %D%/packages/patches/cracklib-fix-buffer-overflow.patch\
>%D%/packages/patches/crda-optional-gcrypt.patch\
>%D%/packages/patches/crossmap-allow-system-pysam.patch \
>%D%/packages/patches/csound-header-ordering.patch  \
> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
> index 7288da6..40ed933 100644
> --- a/gnu/packages/password-utils.scm
> +++ b/gnu/packages/password-utils.scm
> @@ -160,7 +160,8 @@ and vice versa.")
>(uri (string-append "https://github.com/cracklib/cracklib/;
>"releases/download/" name "-" version "/"
>name "-" version ".tar.gz"))
> -  (patches (search-patches "cracklib-CVE-2016-6318.patch"))
> +  (patches (search-patches "cracklib-CVE-2016-6318.patch"
> +   "cracklib-fix-buffer-overflow.patch"))
>(sha256
> (base32
>  "0hrkb0prf7n92w6rxgq0ilzkk6rkhpys2cfqkrbzswp27na7dkqp"
> diff --git a/gnu/packages/patches/cracklib-fix-buffer-overflow.patch 
> b/gnu/packages/patches/cracklib-fix-buffer-overflow.patch
> new file mode 100644
> index 000..b1c990f
> --- /dev/null
> +++ b/gnu/packages/patches/cracklib-fix-buffer-overflow.patch
> @@ -0,0 +1,39 @@
> +Fix buffer overflow processing long words in Mangle().
> +
> +Patch adpated from upstream commit, omitting changes to 'NEWS':
> +
> +https://github.com/cracklib/cracklib/commit/33d7fa4585247cd2247a1ffa032ad245836c6edb
> +
> +From 33d7fa4585247cd2247a1ffa032ad245836c6edb Mon Sep 17 00:00:00 2001
> +From: Jan Dittberner 
> +Date: Thu, 25 Aug 2016 17:17:53 +0200
> +Subject: [PATCH] Fix a buffer overflow processing long words
> +
> +A buffer overflow processing long words has been discovered. This commit
> +applies the patch from
> +https://build.opensuse.org/package/view_file/Base:System/cracklib/0004-overflow-processing-long-words.patch
> +by Howard Guo.
> +
> +See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835386 and
> +http://www.openwall.com/lists/oss-security/2016/08/23/8
> +---
> + src/NEWS| 1 +
> + src/lib/rules.c | 5 ++---
> + 2 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/lib/rules.c b/src/lib/rules.c
> +index d193cc0..3a2aa46 100644
> +--- a/lib/rules.c
>  b/lib/rules.c
> +@@ -434,9 +434,8 @@ Mangle(input, control)   /* returns a pointer to 
> a controlled Mangle */
> + {
> + int limit;
> + register char *ptr;
> +-static char area[STRINGSIZE];
> +-char area2[STRINGSIZE];
> +-area[0] = '\0';
> ++static char area[STRINGSIZE * 2] = {0};
> ++char area2[STRINGSIZE * 2] = {0};
> + strcpy(area, input);
> + 
> + for (ptr = control; *ptr; ptr++)
> -- 
> 2.10.0
> 

not having looked at the full source of lib/rules.c, is there a maximum
value to STRINGSIZE to make sure STRINGSIZE * 2 doesn't wrap around?


-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: [PATCH] gnu: boost: Update to 1.61.0.

2016-09-20 Thread Roel Janssen

Eric Bavier writes:

> On 2016-09-19 05:11, Roel Janssen wrote:
>> Roel Janssen writes:
>> 
>>> Dear Guix,
>>> 
>>> I don't know what the impact of the following upgrade is, but I think 
>>> it
>>> would be good to update Boost to the latest stable version that was
>>> released on May 13th, 2016.
>>> 
>>> What do you think?
>>> 
>>> Kind regards,
>>> Roel Janssen
>>> 
 From a6409b0648352cac86a3ceb205ee183c034085f5 Mon Sep 17 00:00:00 
 2001
>>> From: Roel Janssen 
>>> Date: Mon, 19 Sep 2016 10:08:52 +0200
>>> Subject: [PATCH] gnu: boost: Update to 1.61.0.
>>> 
>>> * gnu/packages/boost.scm (boost): Update to 1.61.0.
>>> ---
>>>  gnu/packages/boost.scm | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
>>> index 8fe8c8e..ccc1f06 100644
>>> --- a/gnu/packages/boost.scm
>>> +++ b/gnu/packages/boost.scm
>>> @@ -34,7 +34,7 @@
>>>  (define-public boost
>>>(package
>>>  (name "boost")
>>> -(version "1.60.0")
>>> +(version "1.61.0")
>>>  (source (origin
>>>(method url-fetch)
>>>(uri (string-append
>>> @@ -43,7 +43,7 @@
>>>  ".tar.bz2"))
>>>(sha256
>>> (base32
>>> -
>>> "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8"
>>> +
>>> "0h5nk7pgxf7xsvvshj9qfpsfp9wx6gq9r78n3nx736pxq83bsix5"
>>>  (build-system gnu-build-system)
>>>  (inputs `(("zlib" ,zlib)))
>>>  (native-inputs
>> 
>> It looks like an upgrade to 1.61.0 causes a build failure for MySQL:
>> 
>> -- BUILD OUTPUT LOG FOR MYSQL 
>> --
>> -- BOOST_VERSION_NUMBER is #define BOOST_VERSION 106100
>> CMake Warning at cmake/boost.cmake:266 (MESSAGE):
>>   Boost minor version found is 61 we need 60
>> Call Stack (most recent call first):
>>   CMakeLists.txt:455 (INCLUDE)
>> 
>> 
>> -- BOOST_INCLUDE_DIR /gnu/store/...fzzl-boost-1.61.0/include
>> -- LOCAL_BOOST_DIR
>> -- LOCAL_BOOST_ZIP
>> -- Could not find (the correct version of) boost.
>> -- MySQL currently requires boost_1_60_0
>> 
>> CMake Error at cmake/boost.cmake:81 (MESSAGE):
>>   You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=
>>  END BUILD OUTPUT LOG FOR MYSQL 
>> 
>> 
>> So I guess the impact is too large to just go for it.
>> 
>> Do we have a Guix command to find out which packages are dependent on
>> a package (in this case Boost)?
>> 
>> Kind regards,
>> Roel Janssen
>
> I looked at this upgrade a few weeks ago.  I took a stab at building the 
> complete dependency set, and, for the most part, mysql is the only 
> package that breaks.  I fixed this with the below patch (which also 
> enable parallel builds that can improve build times significantly):
>
> diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
> index bb123d3..f3288d1 100644
> --- a/gnu/packages/boost.scm
> +++ b/gnu/packages/boost.scm
> @@ -34,7 +34,7 @@
>   (define-public boost
> (package
>   (name "boost")
> -(version "1.60.0")
> +(version "1.61.0")
>   (source (origin
> (method url-fetch)
> (uri (string-append
> @@ -43,7 +43,7 @@
>   ".tar.bz2"))
> (sha256
>  (base32
> -
> "0fzx6dwqbrkd4bcd8pjv0fpapwmrxxwr8yx9g67lihlsk3zzysk8"
> +
> "0h5nk7pgxf7xsvvshj9qfpsfp9wx6gq9r78n3nx736pxq83bsix5"
>   (build-system gnu-build-system)
>   (inputs `(("zlib" ,zlib)))
>   (native-inputs
> @@ -53,6 +53,7 @@
>   (arguments
>(let ((build-flags
>   `("threading=multi" "link=shared"
> +  (format #f "-j~a" (parallel-job-count))
>
> ;; Set the RUNPATH to $libdir so that the libs find each 
> other.
> (string-append "linkflags=-Wl,-rpath="
> diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
> index e05232d..5d7fe13 100644
> --- a/gnu/packages/databases.scm
> +++ b/gnu/packages/databases.scm
> @@ -202,7 +202,7 @@ SQL, Key/Value, XML/XQuery or Java Object storage 
> for their data model.")
>  
> "11qbib1xpy0zkki7j9ip17hks5kp5zgpcj7x8gy3a4m66lb1mgsh"
>   (build-system cmake-build-system)
>   (arguments
> - '(#:configure-flags
> + `(#:configure-flags
>  '("-DBUILD_CONFIG=mysql_release"
>"-DWITH_SSL=system"
>"-DWITH_ZLIB=system"
> @@ -229,7 +229,9 @@ SQL, Key/Value, XML/XQuery or Java Object storage 
> for their data model.")
>  (lambda _
>;; Mysql wants boost-1.59.0 specifically
>(substitute* "cmake/boost.cmake"
> -  (("59") "60"
> +   (("59")
> +,(match (string-split (package-version boost) 
> #\.)
> +   ((_ minor . _) 

Re: [PATCH 1/2] gnu: Add sqlcipher.

2016-09-20 Thread Efraim Flashner
On Wed, Sep 14, 2016 at 03:30:13PM -0400, Andy Patterson wrote:
> * gnu/packages/database.scm (sqlcipher): New variable.
> ---
>  gnu/packages/databases.scm | 37 +
>  1 file changed, 37 insertions(+)
> 
> diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
> index fc31653..d424848 100644
> --- a/gnu/packages/databases.scm
> +++ b/gnu/packages/databases.scm
> @@ -11,6 +11,7 @@
>  ;;; Copyright © 2016 ng0 
>  ;;; Copyright © 2016 Roel Janssen 
>  ;;; Copyright © 2016 David Craven 
> +;;; Copyright © 2016 Andy Patterson 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -33,11 +34,13 @@
>#:use-module (gnu packages avahi)
>#:use-module (gnu packages bash)
>#:use-module (gnu packages boost)
> +  #:use-module (gnu packages crypto)
>#:use-module (gnu packages gettext)
>#:use-module (gnu packages glib)
>#:use-module (gnu packages perl)
>#:use-module (gnu packages language)
>#:use-module (gnu packages linux)
> +  #:use-module (gnu packages tcl)
>#:use-module (gnu packages tls)
>#:use-module (gnu packages compression)
>#:use-module (gnu packages ncurses)
> @@ -1094,3 +1097,37 @@ trees (LSM), for sustained throughput under random 
> insert workloads.")
>  (synopsis "Lightning memory-mapped database library")
>  (description "Lightning memory-mapped database library.")
>  (license license:openldap2.8)))
> +
> +(define-public sqlcipher
> +  (package
> +(name "sqlcipher")
> +(version "3.4.0")
> +(source
> + (origin
> +   (method url-fetch)
> +   (uri (string-append "https://github.com/sqlcipher/; name
> +   "/archive/v" version ".tar.gz"))
> +   (sha256
> +(base32 "1l23lbp9pmf20xkshrs45gbg0igixr6dwdbvgfzh5plnyzn05dwr"))
> +   (file-name (string-append name "-" version ".tar.gz"
> +(build-system gnu-build-system)
> +(inputs
> + `(("libcrypto" ,openssl)))
> +(native-inputs
> + `(("tcl" ,tcl)))
> +(arguments
> + '(#:configure-flags
> +   '("--enable-tempstore=yes"
> + "CFLAGS=-DSQLITE_HAS_CODEC"
> + "LDFLAGS=-lcrypto"
> + "--disable-tcl")
> +   ;; tests are un-maintained in this fork
> +   #:tests? #f))
> +(home-page "https://www.zetetic.net/sqlcipher/;)
> +(synopsis
> + "Library providing transparent encryption of SQLite database files")
> +(description "SQLCipher is an SQLite extension that provides transparent
> +256-bit AES encryption of database files.  Pages are encrypted before being
> +written to disk and are decrypted when read back.  It’s well suited for
> +protecting embedded application databases and for mobile development.")
> +(license license:bsd-3)))
> -- 
> 2.10.0
> 

I'm a little confused how much of this is actually upstream sqlite and
how much is their own code. The commit messages look like they're
continually merging in sqlite. Also, many of the files in the src folder
I checked are public-domain and not bsd-3 licensed.

-- 
Efraim Flashner      אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: User-profile search paths should include system-profile directories

2016-09-20 Thread Carlos Sánchez de La Lama
Hi,

>> Is this the intended behaviour? I am wondering whether packages with
>> search paths should include both the user-profile directories and the
>> system-profile ones.
>
> I think you’re right.  This was discussed at
> , leading to a patch (for GuixSD).
>
> However, we failed to build consensus around the approach of this patch,
> so we did not apply it.  If you have ideas, please email
> 20...@debbugs.gnu.org.  :-)

what about something like:

- /etc/profile
  # [...]
  GUIX_PROFILES="/run/current-system/profile:$HOME/.guix-profile"
  . /run/current-system/profile/etc/profile 
  # [...]
  . "$HOME/.guix-profile/etc/profile"
  # [...]

- /run/current-system/profile/etc/profile
  profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
  export PATH="${profiles//:/\/bin}/bin ${profiles//:/\/sbin}/sbin"
  # [...]

  
- $HOME/.guix-profile/etc/profile
  profiles="${GUIX_PROFILES:=/gnu/store/-profile}"
  export ACLOCAL_PATH="${profiles//:/\/share/aclocal}/share/aclocal"
  # [...]

That is, each profile adds all its search paths to all the profile roots
passed in the colon separated variable GUIX_PROFILES. If GUIX_PROFILES
is empty, it adds the search paths inside its own directory only (as
until now).

No need to expand recursively (no ":$OLD_VALUE" at then end of each
assignment) as we are generating the profile, user additions will come
later. Should be fast enough, and a user can do the (slower) guix
--search-paths in its own profile if he wants to.

If you think it's fine, I will prepare a patch.

Thoughts?

Carlos




Re: [PATCH 2/2] gnu: python: Add i3-quickswitch.

2016-09-20 Thread Ivan Vilata i Balaguer
Leo Famulari (2016-09-19 17:39:37 -0400) wrote:

> On Mon, Sep 19, 2016 at 11:24:02AM +0200, Ivan Vilata i Balaguer wrote:
> > Thanks Leo and Brendan for your comments, I'm writing new versions
> > of the packages following your suggestions, unfortunately I found
> > out that ``quickswitch.py`` makes use of the Debian-specific
> > ``which`` tool, so I'm also working on including a small patch
> > (which I've also [reported][1] for completeness).  More things to
> > learn!`;)`
> 
> `which` is not a Debian tool, and we do sometimes have to add it as an
> input to packages. Our package name is 'which'. It might be enough to
> just add the 'which' package to quickswitch-for-i3's inputs (or
> native-inputs, if `which` is only used while building).
> 
> www.gnu.org/software/which/

Oh my, I missed the actual ``which`` package, sorry!  Anyway it's only
used to check that ``dmenu`` is there, and the function that does the
check is pretty broken anyway, causing other errors (see [my PR][1]).
However I found a [simpler PR][2] that fixes all the errors and also
does away with the dependency on ``which``, so I closed my PR and will
use the latter.

[1]: https://github.com/proxypoke/quickswitch-for-i3/pull/28
[2]: https://github.com/proxypoke/quickswitch-for-i3/pull/24

Leo Famulari (2016-09-19 17:42:18 -0400) wrote:

> On Mon, Sep 19, 2016 at 08:20:26PM +1000, Brendan Tildesley wrote:
> > I'm not a fan of "quickswitch-for-i3" and "python-i3-py". Perhaps a
> > better solution is to ensure "i3-py" in the description or synopsis
> > so that `guix package -s' finds it. As for quickswitch, isn't the
> > upstream name also simply "quickswitch-i3"?
> 
> Our packaging guidelines say that we should use the "project name chosen
> upstream" [0], which in this case appears to be quickswitch-for-i3 [1].

The PyPi package, the ``setup(name=...)`` argument in ``setup.py`` and
the content of the readme use ``quickswitch-i3`` as the project short
name, while the GitHub URL and readme title use "quickswitch for i3" as
a more descriptive name.  In this case I consider the former name to be
the "official" short name, also compatible with ``pip`` and others.  Is
there any other similar case already in Guix?

> And python-i3-py does follow our conventions for naming Python modules
> [2].
> 
> [0]
> https://www.gnu.org/software/guix/manual/html_node/Package-Naming.html
> 
> [1]
> https://github.com/proxypoke/quickswitch-for-i3
> 
> [2]
> https://www.gnu.org/software/guix/manual/html_node/Python-Modules.html

So I can do a third iteration with the PR#24 patch and package names
``python-i3-py`` and ``quickswitch-i3``.  What do you think?

One more time, thanks for your help and comments!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/



Re: [PATCH 2/3] gnu: Add python-pyxb.

2016-09-20 Thread Ben Woodcroft

Hi again,


On 20/09/16 16:34, Ben Woodcroft wrote:

Oops, forgot to cc the list.


On 20/09/16 16:02, Ben Woodcroft wrote:

Hi Marius,

Thanks for the patches.

On 17/09/16 20:10, Marius Bakke wrote:

[..]
+ (add-after 'unpack 'fix-tests
+   (lambda _
+ ;; See https://github.com/pabigot/pyxb/issues/26 ...
+ (delete-file "tests/trac/test-trac-0091.py")


The fix for that test failing seems straightforward enough, might be 
better to include as a patch so those tests are run.
https://github.com/pabigot/pyxb/commit/d4bdd5a1c712cd70f96264ae13b55d015cbf3335 

Actually, 1.2.5 just got released which has both of these fixes. Can you 
send an updated patch please?


Thanks.



Re: [PATCH 2/3] gnu: Add python-pyxb.

2016-09-20 Thread Ben Woodcroft

Oops, forgot to cc the list.


On 20/09/16 16:02, Ben Woodcroft wrote:

Hi Marius,

Thanks for the patches.

On 17/09/16 20:10, Marius Bakke wrote:

[..]
+ (add-after 'unpack 'fix-tests
+   (lambda _
+ ;; See https://github.com/pabigot/pyxb/issues/26 ...
+ (delete-file "tests/trac/test-trac-0091.py")


The fix for that test failing seems straightforward enough, might be 
better to include as a patch so those tests are run.
https://github.com/pabigot/pyxb/commit/d4bdd5a1c712cd70f96264ae13b55d015cbf3335 




+ ;; ...and https://github.com/pabigot/pyxb/pull/58 .
+ (substitute* "tests/utils/test-utility.py"
+   (("__NoExt_re = re.compile.*$")
+"__NoExt_re = re.compile('(^|\\%s)[^\\.]+$' % 
os.sep)\n"))


Good catch there. It would be preferable to add this change as a patch 
as well, because it is more likely to apply correctly (not that it 
won't here), and also because when it is no longer needed after this 
package gets updated the patch will fail to apply alerting the updater 
to the fact it should be removed. As a bonus, my experience is that 
working with patches easier than using substitute* so require less 
builds before getting to a happy package.


I have not actually built these packages, but they look fine 
otherwise. Would you mind sending an updated patch for pyxb, and then 
I'll probably apply all three (assuming I find nothing else, which I 
don't anticipate).


Thanks,
ben