Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-29 Thread Ben Woodcroft

Hi Raoul,


On 28/12/16 23:13, Ra wrote:

Hi Ben,
reading the comments from https://github.com/ewels/MultiQC/issues/376
it seems that in the upcoming release they will solve the problem.
Are we going to wait for the next v. 1.0 or include it now and update 
later ?


I just pushed an update to 0.9 as 
a29929b32caf9e437d18bdb0cd4d1b22bc096fed. I did not add nose as an input 
because the issue seems to be with matplotlib, not multiqc. 
Specifically, nose is listed in the 'requires.txt' file of matplotlib 
when should only be needed for testing.


So to test the updated package I ran
$ ./pre-inst-env guix environment --ad-hoc multiqc python python-nose 
glibc-locales -C --no-grafts --no-substitutes


[env] # LC_ALL=en_AU.UTF-8 LANG=en_AU.UTF-8 
GUIX_LOCPATH=/gnu/store/hyi7svs0ds79wrcg5l0nr36zzjikqj7i-glibc-locales-2.24/lib/locale/ 
multiqc -h


The use of click with python3 means that we must set locales or it will 
refuse to run. Please do tell if you find any issues with the update - 
I've not used this tool before so I only tested it superficially.

ben

PS. In future would you mind please bottom-posting your emails if 
possible? Around here, we've chosen a side of that debate :)


Re: asdf-build-system: Problem running tests for cl-unicode

2016-12-29 Thread ajpatter

Hi Ricardo,

On Thu, 29 Dec 2016 17:30:53 +0100
Ricardo Wurmus  wrote:


Hi,

I’m trying to build a package for sbcl-cl-unicode, which I need for a
JS uglifier (to be able to generate minified JS files in other
packages’ build processes).


Since I'm curious, what are you packaging =)?



Unfortunately, the tests fail with

"The name NIL does not designate any package."



The problem seems to have been fixed in the most recent commit, with
the commit logs since the last release suggesting that the definition
file was problematic.


“cl-unicode” seems to have more problems.  When I ignore the tests and
try to build “sbcl-cl-ppcre-unicode” (see below), I get an error about
“CL-UNICODE” not designating any package.



I think it's because there's another system in there for
cl-unicode/base, and asdf-build-system needs a package for this. Of
course, this exposes a severe problem with the way the build system
works currently: it can't handle a system with '/' in the name. I hope
to address that in the changes for the build system which I've been
working on.

For now, it's possible to work around it. Attached is a version of your
patch which can build cl-ppcre-unicode.


Here’s the definition of “sbcl-cl-ppcre-unicode”:

(define-public sbcl-cl-ppcre-unicode
 (package (inherit sbcl-cl-ppcre)
   (name "sbcl-cl-ppcre-unicode")
   (arguments
`(#:asd-file "cl-ppcre-unicode.asd"))
   (inputs
`(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
  ("sbcl-cl-unicode" ,sbcl-cl-unicode)


You'll also need a #:tests? #f here. I'm not fully sure how to fix the
problem - you could drop the #:asd-file but then you'd rebuild
cl-ppcre.

Let me know if this works for the package you're working on.

Thanks,

--
Andy


From 7739d883078d0be71f07d28c6863688d4f19cdcd Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 29 Dec 2016 17:30:53 +0100
Subject: [PATCH] WIP gnu: Add sbcl-cl-unicode.

* gnu/packages/lisp.scm (sbcl-cl-unicode-base, sbcl-cl-unicode): New
variables.
---
 gnu/packages/lisp.scm | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ec0bdaaa5..0887de54a 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -702,6 +702,49 @@ compatible with ANSI-compliant Common Lisp
implementations.") (define-public ecl-cl-ppcre
   (sbcl-package->ecl-package sbcl-cl-ppcre))

+(define sbcl-cl-unicode-base
+  (let ((revision "1")
+(commit "9fcd06fba1ddc9e66aed2f2d6c32dc9b764f03ea"))
+(package
+  (name "sbcl-cl-unicode-base")
+  (version "0.1.5")
+  (source
+   (origin
+ (method git-fetch)
+ (uri
+  (git-reference
+   (url "https://github.com/edicl/cl-unicode.git;)
+   (commit commit)))
+ (file-name (string-append "cl-unicode-" version "-checkout"))
+ (sha256
+  (base32
+   "1jicprb5b3bv57dy1kg03572gxkcaqdjhak00426s76g0plmx5ki"))
+ (modules '((guix build utils)))
+ (snippet
+  '(substitute* "cl-unicode.asd"
+ (("cl-unicode/base") "cl-unicode-base")
+  (build-system asdf-build-system/sbcl)
+  (arguments
+   '(#:asd-file "cl-unicode.asd"))
+  (inputs
+   `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)))
+  (home-page "http://weitz.de/cl-unicode/;)
+  (synopsis "Portable Unicode library for Common Lisp")
+  (description "CL-UNICODE is a portable Unicode library Common
Lisp, which +is compatible with perl.  It is pretty fast, thread-safe,
and compatible with +ANSI-compliant Common Lisp implementations.")
+  (license license:bsd-2
+
+(define-public sbcl-cl-unicode
+  (package
+(inherit sbcl-cl-unicode-base)
+(name "sbcl-cl-unicode")
+(inputs
+ `(("sbcl-cl-unicode-base" ,sbcl-cl-unicode-base)
+   ,@(package-inputs sbcl-cl-unicode-base)))
+(native-inputs
+ `(("tests:cl-flexi-streams" ,sbcl-flexi-streams)
+
 (define-public sbcl-clx
   (let ((revision "1")
 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
--
2.11.0






Re: asdf-build-system: Problem running tests for cl-unicode

2016-12-29 Thread ajpatter

Hi Ricardo,

On Thu, 29 Dec 2016 17:30:53 +0100
Ricardo Wurmus  wrote:


Hi,

I’m trying to build a package for sbcl-cl-unicode, which I need for a
JS uglifier (to be able to generate minified JS files in other
packages’ build processes).


Since I'm curious, what are you packaging =)?



Unfortunately, the tests fail with

"The name NIL does not designate any package."



The problem seems to have been fixed in the most recent commit, with
the commit logs since the last release suggesting that the definition
file was problematic.


“cl-unicode” seems to have more problems.  When I ignore the tests and
try to build “sbcl-cl-ppcre-unicode” (see below), I get an error about
“CL-UNICODE” not designating any package.



I think it's because there's another system in there for
cl-unicode/base, and asdf-build-system needs a package for this. Of
course, this exposes a severe problem with the way the build system
works currently: it can't handle a system with '/' in the name. I hope
to address that in the changes for the build system which I've been
working on.

For now, it's possible to work around it. Attached is a version of your
patch which can build cl-ppcre-unicode.


Here’s the definition of “sbcl-cl-ppcre-unicode”:

(define-public sbcl-cl-ppcre-unicode
 (package (inherit sbcl-cl-ppcre)
   (name "sbcl-cl-ppcre-unicode")
   (arguments
`(#:asd-file "cl-ppcre-unicode.asd"))
   (inputs
`(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
  ("sbcl-cl-unicode" ,sbcl-cl-unicode)


You'll also need a #:tests? #f here. I'm not fully sure how to fix the
problem - you could drop the #:asd-file but then you'd rebuild
cl-ppcre.

Let me know if this works for the package you're working on.

Thanks,

--
Andy


From 7739d883078d0be71f07d28c6863688d4f19cdcd Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 29 Dec 2016 17:30:53 +0100
Subject: [PATCH] WIP gnu: Add sbcl-cl-unicode.

* gnu/packages/lisp.scm (sbcl-cl-unicode-base, sbcl-cl-unicode): New
variables.
---
 gnu/packages/lisp.scm | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ec0bdaaa5..0887de54a 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -702,6 +702,49 @@ compatible with ANSI-compliant Common Lisp
implementations.") (define-public ecl-cl-ppcre
   (sbcl-package->ecl-package sbcl-cl-ppcre))

+(define sbcl-cl-unicode-base
+  (let ((revision "1")
+(commit "9fcd06fba1ddc9e66aed2f2d6c32dc9b764f03ea"))
+(package
+  (name "sbcl-cl-unicode-base")
+  (version "0.1.5")
+  (source
+   (origin
+ (method git-fetch)
+ (uri
+  (git-reference
+   (url "https://github.com/edicl/cl-unicode.git;)
+   (commit commit)))
+ (file-name (string-append "cl-unicode-" version "-checkout"))
+ (sha256
+  (base32
+   "1jicprb5b3bv57dy1kg03572gxkcaqdjhak00426s76g0plmx5ki"))
+ (modules '((guix build utils)))
+ (snippet
+  '(substitute* "cl-unicode.asd"
+ (("cl-unicode/base") "cl-unicode-base")
+  (build-system asdf-build-system/sbcl)
+  (arguments
+   '(#:asd-file "cl-unicode.asd"))
+  (inputs
+   `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)))
+  (home-page "http://weitz.de/cl-unicode/;)
+  (synopsis "Portable Unicode library for Common Lisp")
+  (description "CL-UNICODE is a portable Unicode library Common
Lisp, which +is compatible with perl.  It is pretty fast, thread-safe,
and compatible with +ANSI-compliant Common Lisp implementations.")
+  (license license:bsd-2
+
+(define-public sbcl-cl-unicode
+  (package
+(inherit sbcl-cl-unicode-base)
+(name "sbcl-cl-unicode")
+(inputs
+ `(("sbcl-cl-unicode-base" ,sbcl-cl-unicode-base)
+   ,@(package-inputs sbcl-cl-unicode-base)))
+(native-inputs
+ `(("tests:cl-flexi-streams" ,sbcl-flexi-streams)
+
 (define-public sbcl-clx
   (let ((revision "1")
 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
--
2.11.0






Re: [PATCH] gnu: Add kakoune

2016-12-29 Thread Carlo Zancanaro

It turns out emacs decided to destroy my whitespace!

I'll attach it this time.

From 57b2f9e6af20606e302fc4040515d7a92bde73fc Mon Sep 17 00:00:00 2001
From: Carlo Zancanaro 
Date: Fri, 30 Dec 2016 02:15:59 +1100
Subject: [PATCH] gnu: Add kakoune
To: guix-devel@gnu.org

* gnu/packages/patches/kakoune-fix-bash-path.patch: New file.
* gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patches.
* gnu/packages/text-editors.scm (kakoune): New variable.
---
 gnu/local.mk   |  2 +
 gnu/packages/patches/kakoune-fix-bash-path.patch   | 34 ++
 .../kakoune-leave-manpages-uncompressed.patch  | 65 +++
 gnu/packages/text-editors.scm  | 73 +-
 4 files changed, 173 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/kakoune-fix-bash-path.patch
 create mode 100644 gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 106adb235..5517be2de 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -640,6 +640,8 @@ dist_patch_DATA =		\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\
   %D%/packages/patches/jbig2dec-ignore-testtest.patch		\
   %D%/packages/patches/jq-CVE-2015-8863.patch			\
+  %D%/packages/patches/kakoune-fix-bash-path.patch		\
+  %D%/packages/patches/kakoune-leave-manpages-uncompressed.patch		\
   %D%/packages/patches/kdbusaddons-kinit-file-name.patch	\
   %D%/packages/patches/khmer-use-libraries.patch\
   %D%/packages/patches/kmod-module-directory.patch		\
diff --git a/gnu/packages/patches/kakoune-fix-bash-path.patch b/gnu/packages/patches/kakoune-fix-bash-path.patch
new file mode 100644
index 0..35b076d57
--- /dev/null
+++ b/gnu/packages/patches/kakoune-fix-bash-path.patch
@@ -0,0 +1,34 @@
+--- a/src/shell_manager.cc
 b/src/shell_manager.cc
+@@ -22,30 +22,7 @@
+ 
+ ShellManager::ShellManager()
+ {
+-// Get a guaranteed to be POSIX shell binary
+-{
+-auto size = confstr(_CS_PATH, 0, 0);
+-String path; path.resize(size-1, 0);
+-confstr(_CS_PATH, path.data(), size);
+-for (auto dir : StringView{path} | split(':'))
+-{
+-String candidate = format("{}/sh", dir);
+-struct stat st;
+-if (stat(candidate.c_str(), ))
+-continue;
+-
+-bool executable = (st.st_mode & S_IXUSR)
+-| (st.st_mode & S_IXGRP)
+-| (st.st_mode & S_IXOTH);
+-if (S_ISREG(st.st_mode) and executable)
+-{
+-m_shell = std::move(candidate);
+-break;
+-}
+-}
+-if (m_shell.empty())
+-throw runtime_error{format("unable to find a posix shell in {}", path)};
+-}
++m_shell = "__BASH_PATH__/bin/sh";
+ 
+ // Add Kakoune binary location to the path to guarantee that %sh{ ... }
+ // have access to the kak command regardless of if the user installed it
diff --git a/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch b/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch
new file mode 100644
index 0..f7118c309
--- /dev/null
+++ b/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch
@@ -0,0 +1,65 @@
+--- a/src/Makefile
 b/src/Makefile
+@@ -22,7 +22,7 @@
+ objects := $(addprefix ., $(sources:.cc=$(suffix).o))
+ deps := $(addprefix ., $(sources:.cc=$(suffix).d))
+ docs := $(wildcard ../doc/manpages/*.asciidoc)
+-mandocs := $(docs:.asciidoc=.gz)
++mandocs := $(docs:.asciidoc=.1)
+ 
+ PREFIX ?= /usr/local
+ DESTDIR ?= # root dir
+@@ -76,19 +76,17 @@
+ 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -MP -MF $(addprefix ., $(<:.cc=$(suffix).d)) -c -o $@ $<
+ 
+ # Generate the man page
+-../doc/kak.1.gz: ../doc/kak.1.txt
++../doc/kak.1: ../doc/kak.1.txt
+ 	a2x --no-xmllint -f manpage $<
+-	gzip -f $(basename $<)
+ 
+ # Generate the editor's documentation pages
+ # Since `a2x` won't generate man pages if some sections are missing (which we don't need),
+-# we generate the pages, patch them and then compress them
+-../doc/manpages/%.gz: ../doc/manpages/%.asciidoc
++# we generate the pages and patch them
++../doc/manpages/%.1: ../doc/manpages/%.asciidoc
+ 	a2x --no-xmllint -f manpage $<
+ 	sed -i -r -e "s,^\.TH .+,.TH KAKOUNE 1 \"\" \"\" \"$(basename $(notdir $<))\"," \
+-	-e "/^\.SH \"NAME\"/{N;d;}" $(@:.gz=.1)
+-	gzip -f $(@:.gz=.1)
+-	mv -f $(@:.gz=.1.gz) $@
++	-e "/^\.SH \"NAME\"/{N;d;}" $@
++
+ 
+ check: test
+ test:
+@@ -97,7 +95,7 @@
+ TAGS: tags
+ tags:
+ 	ctags -R
+-man: ../doc/kak.1.gz
++man: ../doc/kak.1
+ doc: $(mandocs)
+ 
+ clean:
+@@ -124,8 +122,8 @@
+ 	[ -e $(sharedir)/autoload ]	|| ln -s rc	$(sharedir)/autoload
+ 	install	-m 0644	../colors/*	$(sharedir)/colors
+ 	install	-m 0644	../README.asciidoc $(docdir)
+-	install	-m 0644	../doc/manpages/*.gz 

[PATCH] gnu: Add kakoune

2016-12-29 Thread Carlo Zancanaro


* gnu/packages/patches/kakoune-fix-bash-path.patch: New file. 
* gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch: 
* New file.  gnu/local.mk (dist_patch_DATA): Register patches. 
* gnu/packages/text-editors.scm (kakoune): New variable.  --- 
gnu/local.mk   |  2 + 
gnu/packages/patches/kakoune-fix-bash-path.patch   | 34 
++ .../kakoune-leave-manpages-uncompressed.patch  | 
65 +++ gnu/packages/text-editors.scm 
| 73 +- 4 files changed, 173 insertions(+), 1 
deletion(-) create mode 100644 
gnu/packages/patches/kakoune-fix-bash-path.patch create mode 
100644 
gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch 

diff --git a/gnu/local.mk b/gnu/local.mk index 
106adb235..5517be2de 100644 --- a/gnu/local.mk +++ b/gnu/local.mk 
@@ -640,6 +640,8 @@ dist_patch_DATA = 
\ 
  %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\ 
  %D%/packages/patches/jbig2dec-ignore-testtest.patch		\ 
  %D%/packages/patches/jq-CVE-2015-8863.patch			\ 
+  %D%/packages/patches/kakoune-fix-bash-path.patch		\ 
+  %D%/packages/patches/kakoune-leave-manpages-uncompressed.patch 
\ 
  %D%/packages/patches/kdbusaddons-kinit-file-name.patch	\ 
  %D%/packages/patches/khmer-use-libraries.patch\ 
  %D%/packages/patches/kmod-module-directory.patch		\ 
diff --git a/gnu/packages/patches/kakoune-fix-bash-path.patch 
b/gnu/packages/patches/kakoune-fix-bash-path.patch new file mode 
100644 index 0..35b076d57 --- /dev/null +++ 
b/gnu/packages/patches/kakoune-fix-bash-path.patch @@ -0,0 +1,34 
@@ +--- a/src/shell_manager.cc  b/src/shell_manager.cc +@@ 
-22,30 +22,7 @@ +  + ShellManager::ShellManager() + { +-// Get 
a guaranteed to be POSIX shell binary +-{ +-auto size 
= confstr(_CS_PATH, 0, 0); +-String path; 
path.resize(size-1, 0); +-confstr(_CS_PATH, path.data(), 
size); +-for (auto dir : StringView{path} | 
split(':')) +-{ +-String candidate 
= format("{}/sh", dir); +-struct stat st; +- 
if (stat(candidate.c_str(), )) +-continue; +- 
+-bool executable = (st.st_mode & S_IXUSR) +- 
| (st.st_mode & S_IXGRP) +-| 
(st.st_mode & S_IXOTH); +-if (S_ISREG(st.st_mode) and 
executable) +-{ +-m_shell = 
std::move(candidate); +-break; +-} +- 
} +-if (m_shell.empty()) +-throw 
runtime_error{format("unable to find a posix shell in {}", path)}; 
+-} ++m_shell = "__BASH_PATH__/bin/sh"; +  + // Add 
Kakoune binary location to the path to guarantee that %sh{ ... } + 
// have access to the kak command regardless of if the user 
installed it diff --git 
a/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch 
b/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch 
new file mode 100644 index 0..f7118c309 --- /dev/null +++ 
b/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch 
@@ -0,0 +1,65 @@ +--- a/src/Makefile  b/src/Makefile +@@ -22,7 
+22,7 @@ + objects := $(addprefix ., $(sources:.cc=$(suffix).o)) + 
deps := $(addprefix ., $(sources:.cc=$(suffix).d)) + docs := 
$(wildcard ../doc/manpages/*.asciidoc) +-mandocs := 
$(docs:.asciidoc=.gz) ++mandocs := $(docs:.asciidoc=.1) +  + 
PREFIX ?= /usr/local + DESTDIR ?= # root dir +@@ -76,19 +76,17 @@ 
+ 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -MP -MF $(addprefix ., 
$(<:.cc=$(suffix).d)) -c -o $@ $< +  + # Generate the man page 
+-../doc/kak.1.gz: ../doc/kak.1.txt ++../doc/kak.1: 
../doc/kak.1.txt + 	a2x --no-xmllint -f manpage $< +- 
gzip -f $(basename $<) +  + # Generate the editor's documentation 
pages + # Since `a2x` won't generate man pages if some sections 
are missing (which we don't need), +-# we generate the pages, 
patch them and then compress them +-../doc/manpages/%.gz: 
../doc/manpages/%.asciidoc ++# we generate the pages and patch 
them ++../doc/manpages/%.1: ../doc/manpages/%.asciidoc + 
a2x --no-xmllint -f manpage $< + 	sed -i -r -e "s,^\.TH 
.+,.TH KAKOUNE 1 \"\" \"\" \"$(basename $(notdir $<))\"," \ +-	-e 
"/^\.SH \"NAME\"/{N;d;}" $(@:.gz=.1) +-	gzip -f $(@:.gz=.1) +-	mv 
-f $(@:.gz=.1.gz) $@ ++	-e "/^\.SH \"NAME\"/{N;d;}" $@ ++ +  + 
check: test + test: +@@ -97,7 +95,7 @@ + TAGS: tags + tags: + 
ctags -R +-man: ../doc/kak.1.gz ++man: ../doc/kak.1 + doc: 
$(mandocs) +  + clean: +@@ -124,8 +122,8 @@ + 	[ -e 
$(sharedir)/autoload ]	|| ln -s rc	$(sharedir)/autoload + 
install	-m 0644	../colors/*	$(sharedir)/colors + 	install	-m 
0644	../README.asciidoc $(docdir) +-	install	-m 0644 
../doc/manpages/*.gz $(docdir)/manpages +-	install	-m 0644 
../doc/kak.1.gz	$(mandir) ++	install	-m 0644 
../doc/manpages/*.1 $(docdir)/manpages ++	install	-m 0644 
../doc/kak.1	$(mandir) +  + install-strip: install + 
strip -s $(bindir)/kak +@@ -134,7 +132,7 @@ + 	rm -rf 
$(bindir)/kak \ + 		$(sharedir)	\ + 
$(docdir) \ +-		

Re: Let non-root users use MTP devices (Attempt #2)

2016-12-29 Thread Chris Marusich
l...@gnu.org (Ludovic Courtès) writes:

> Chris Marusich  skribis:
>
>> Chris Marusich  writes:
>>
>>> Here's a second attempt to fix MTP support for GuixSD.  It's simple and
>>> requires no special group permissions.
>>>
>>> It turns out that elogind (like systemd's logind) can be compiled with
>>> support for ACLs (provided by libacl), in which case elogind will
>>> automatically set an ACL on a device file granting access to a user when
>>> that user is logged in using a seat to which the device is attached.  In
>>> short, by adding acl as an input to elogind, users will be able to
>>> access devices without running programs as root, and without being a
>>> member of any special group.
>>>
>>> That's just one piece of the puzzle, though.  The other piece is the
>>> udev rules provided by libmtp.  It's necessary to install those udev
>>> rules; if we don't, then the MTP device won't be tagged properly, so
>>> elogind will not set any ACLs for it.  I've chosen to install those
>>> rules by modifying the base services in desktop.scm so that all desktops
>>> will get the rules, not just GNOME; if you know of a better way to
>>> install them, please let me know.
>>>
>>> This patch has a happy side effect.  Namely: because elogind is now
>>> setting ACLs, it gives a user access to other devices that are attached
>>> to their seat.  For instance, after this change, I can access /dev/kvm
>>> and /dev/cdrom (and other devices) without being root, and without being
>>> in any special group.  How nice!
>>
>> After sending this, I've noticed something odd: sometimes, it can take
>> quite a while for elogind to set the ACLs.  It's a bit of a mystery to
>> me.  I'm not sure how/when elogind decides to update the ACLs; I assumed
>> it was continuously checking for changes in the hardware or receiving
>> notifications about hardware changes, but it seems like elogind isn't
>> noticing when I plug in my phone.  Even though the device file shows up,
>> elogind doesn't set the ACLs unless I do something.
>>
>> By "do something," I mean: Apparently, logging out and logging back in
>> seems to trigger elogind to set the ACLs.  Even just switching virtual
>> terminals (i.e., Control + F1, followed by Control + F7) seems to
>> trigger it, which is weird.  Even when elogind has not yet set the ACLs,
>> the "uaccess" tag has in fact been correctly set for the device (as
>> reported by e.g. "udevadm info /dev/libmtp-1-1"), which leads me to
>> suspect that elogind is either failing to notice or just ignoring the
>> hardware change.  I wonder if this might be a bug of some kind.
>>
>> What do you think we should do?
>
> Good question!  I don’t know.  Does this happen only for MTP devices or
> also with other things (KVM?)?

Yes, this happens for other devices, too.  For example, I observe
exactly the same behavior for /dev/sr0 when I plug in an external CD-ROM
drive (via USB cable) after logging in.  The ACL doesn't get set until
after I do something like switch to another virtual terminal and back.

> Does “udevadm settle” trigger the ACL change?

No, neither "udevadm settle" nor "sudo udevadm settle" triggers the ACL
change.  I suspect that maybe elogind is ignoring or failing to notice
the new device, or perhaps the mechanism that elogind relies on to learn
about new devices is not working for some reason.

It looks like elogind sets the ACLs via devnode_acl_all, defined in
src/login/logind-acl.c.  Ultimately it seems this gets called while in
seat_set_active (specifically, invoked at src/login/logind-seat.c:213),
under certain conditions.  That's as far as I got.

I cannot reproduce this issue on Ubuntu; there, the ACL gets set
promptly.

-- 
Chris


signature.asc
Description: PGP signature


Re: Let non-root users use MTP devices (Attempt #2)

2016-12-29 Thread Ludovic Courtès
Chris Marusich  skribis:

> Chris Marusich  writes:
>
>> Here's a second attempt to fix MTP support for GuixSD.  It's simple and
>> requires no special group permissions.
>>
>> It turns out that elogind (like systemd's logind) can be compiled with
>> support for ACLs (provided by libacl), in which case elogind will
>> automatically set an ACL on a device file granting access to a user when
>> that user is logged in using a seat to which the device is attached.  In
>> short, by adding acl as an input to elogind, users will be able to
>> access devices without running programs as root, and without being a
>> member of any special group.
>>
>> That's just one piece of the puzzle, though.  The other piece is the
>> udev rules provided by libmtp.  It's necessary to install those udev
>> rules; if we don't, then the MTP device won't be tagged properly, so
>> elogind will not set any ACLs for it.  I've chosen to install those
>> rules by modifying the base services in desktop.scm so that all desktops
>> will get the rules, not just GNOME; if you know of a better way to
>> install them, please let me know.
>>
>> This patch has a happy side effect.  Namely: because elogind is now
>> setting ACLs, it gives a user access to other devices that are attached
>> to their seat.  For instance, after this change, I can access /dev/kvm
>> and /dev/cdrom (and other devices) without being root, and without being
>> in any special group.  How nice!
>
> After sending this, I've noticed something odd: sometimes, it can take
> quite a while for elogind to set the ACLs.  It's a bit of a mystery to
> me.  I'm not sure how/when elogind decides to update the ACLs; I assumed
> it was continuously checking for changes in the hardware or receiving
> notifications about hardware changes, but it seems like elogind isn't
> noticing when I plug in my phone.  Even though the device file shows up,
> elogind doesn't set the ACLs unless I do something.
>
> By "do something," I mean: Apparently, logging out and logging back in
> seems to trigger elogind to set the ACLs.  Even just switching virtual
> terminals (i.e., Control + F1, followed by Control + F7) seems to
> trigger it, which is weird.  Even when elogind has not yet set the ACLs,
> the "uaccess" tag has in fact been correctly set for the device (as
> reported by e.g. "udevadm info /dev/libmtp-1-1"), which leads me to
> suspect that elogind is either failing to notice or just ignoring the
> hardware change.  I wonder if this might be a bug of some kind.
>
> What do you think we should do?

Good question!  I don’t know.  Does this happen only for MTP devices or
also with other things (KVM?)?

Does “udevadm settle” trigger the ACL change?

Thanks,
Ludo’.



Re: Let non-root users use MTP devices (Attempt #2)

2016-12-29 Thread Ludovic Courtès
Chris Marusich  skribis:

> Here's a second attempt to fix MTP support for GuixSD.  It's simple and
> requires no special group permissions.
>
> It turns out that elogind (like systemd's logind) can be compiled with
> support for ACLs (provided by libacl), in which case elogind will
> automatically set an ACL on a device file granting access to a user when
> that user is logged in using a seat to which the device is attached.  In
> short, by adding acl as an input to elogind, users will be able to
> access devices without running programs as root, and without being a
> member of any special group.

Cool!

> * gnu/packages/freedesktop.scm (elogind) [inputs]: Add acl.

Applied with a short comment.

Thank you!

Ludo’.



Re: Trouble setting up hplip and cups - printer ppd fails

2016-12-29 Thread ng0
Ludovic Courtès  writes:

> Hello!
>
> Danny Milosavljevic  skribis:
>
>> On Sat, 24 Dec 2016 14:08:44 +
>> ng0  wrote:
>>
>>> > Traceback (most recent call last):
>>> >   File 
>>> > "/gnu/store/95vp3r6n9z7s85achc7a0b8aay1k73qq-hplip-3.16.11/share/hplip/setup.py",
>>> >  line 560, in 
>>> > desc = nickname_pat.search(nickname).group(1)
>>> > TypeError: cannot use a string pattern on a bytes-like object
>>
>> The reason that fails is because gzip.GzipFile always provides reads in 
>> binary mode. However, ppd files are not binary and nickname_pat is not 
>> binary either. So not sure what they were thinking...
>
> Could it be that Python 3 support in hplip is incomplete?  (ISTR that
> Python 3 treats Unicode sequences differently compared to Python 2.)
>
> The hplip recipe has this comment:
>
> ;; Python3 support is available starting from hplip@3.15.2.
>
> Ludo’.

It works in Gentoo with python3, so maybe their one patch on this
is not just cosmetic.

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: [PATCH 2/2] services: desktop: Use libmtp udev rules.

2016-12-29 Thread Ludovic Courtès
Chris Marusich  skribis:

> * gnu/services/desktop.scm (%modified-base-services): New variable.
>   (%desktop-services): Use it.

I pushed a slightly more concise version of that in
3547a5effecfa19f73af29f0d503f5a231025672 (it also makes “mtp” show up in
‘guix system extension-graph’).

Thanks for the thorough investigation!

Ludo’.



Re: Trouble setting up hplip and cups - printer ppd fails

2016-12-29 Thread Ludovic Courtès
Hello!

Danny Milosavljevic  skribis:

> On Sat, 24 Dec 2016 14:08:44 +
> ng0  wrote:
>
>> > Traceback (most recent call last):
>> >   File 
>> > "/gnu/store/95vp3r6n9z7s85achc7a0b8aay1k73qq-hplip-3.16.11/share/hplip/setup.py",
>> >  line 560, in 
>> > desc = nickname_pat.search(nickname).group(1)
>> > TypeError: cannot use a string pattern on a bytes-like object
>
> The reason that fails is because gzip.GzipFile always provides reads in 
> binary mode. However, ppd files are not binary and nickname_pat is not binary 
> either. So not sure what they were thinking...

Could it be that Python 3 support in hplip is incomplete?  (ISTR that
Python 3 treats Unicode sequences differently compared to Python 2.)

The hplip recipe has this comment:

;; Python3 support is available starting from hplip@3.15.2.

Ludo’.



Re: [PATCH] Add r-scran 1.2.0 and all its dependencies

2016-12-29 Thread Ricardo Wurmus

Ra  writes:

> Hi Ricardo,
> there was an issue with the r-shiny patch, the license was wrong. So this
> is the new set of patches.

Thank you.  I updated and pushed all patches up to r-shiny.  The changes
are:

* Changed the descriptions, so that they are made up of full sentences.
* Added a proper commit message.

Please take a look at those changes for future reference.

I didn’t push r-shiny, because it contains a lot of minified Javascript
files without corresponding source files.

Here is an edited list:

  shiny/inst/www/shared/babel-polyfill.min.js
  shiny/inst/www/shared/highlight/highlight.pack.js
  shiny/inst/www/shared/json2-min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.nb.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.th.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.pt.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.az.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.en-AU.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ms.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.id.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.me.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.hr.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.bs.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.lv.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ka.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ja.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.sk.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.nl.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.is.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.fr.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.mk.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.fr-CH.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.sq.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.pt-BR.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.vi.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ru.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.fo.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ko.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.it-CH.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.cs.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ca.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.mn.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.kk.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.fa.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.nl-BE.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.sl.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.zh-CN.min.js
  
shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.rs-latin.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.tr.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.zh-TW.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.cy.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.pl.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.lt.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.el.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.no.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.da.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.gl.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.uk.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.eu.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.hy.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.ro.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.et.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.kh.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.eo.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.he.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.it.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.es.min.js
  shiny/inst/www/shared/datepicker/js/locales/bootstrap-datepicker.bg.min.js
  

Re: [PATCH] Remove Emacs interface.

2016-12-29 Thread Alex Kost
Ludovic Courtès (2016-12-29 18:40 +0100) wrote:

> Hi!
>
> Alex Kost  skribis:
>
>> The attached patch removes Emacs UI and its documentation (12000 lines
>> removed, hooray!).  I added the only mention about 'emacs-guix' package
>> in "Package Management" chapter.
>
> OK!
>
> I was thinking that, even if the Emacs-Guix manual isn’t available
> online currently, this change would lead users following the link in the
> HTML manual to the Emacs-Guix home page (with a wrong anchor), which is
> better than 404:
>
> diff --git a/doc/htmlxref.cnf b/doc/htmlxref.cnf
> index bd2eb5f..999edfe 100644
> --- a/doc/htmlxref.cnf
> +++ b/doc/htmlxref.cnf
> @@ -219,6 +219,8 @@ emacs node${EMACS}/html_node/emacs/
>  easejs   mono${GS}/easejs/manual/easejs.html
>  easejs   node${GS}/easejs/manual/
>  
> +emacs-guix   monohttps://notabug.org/...
> +
>  emacs-muse   node${GS}/emacs-muse/manual/muse.html
>  emacs-muse   node${GS}/emacs-muse/manual/html_node/
>  
>
> Feel free to add it to the patch!

Added, thanks!

>> Now 'emacs' directory contains a single git-controlled file -
>> "guix-emacs.el".  It is used to patch our 'emacs' package (to find emacs
>> packages in "share/emacs/site-lisp/guix.d").  But it is misplaced.
>
> I agree.  May you can commit this patch first while we look for a
> solution?

Committed.

>> What about making "gnu/packages/files" (or another dirname) directory,
>> and putting "guix-emacs.el" and kernel configs ("linux-libre-*.conf")
>> there?
>>
>> I mean "gnu/packages/patches" is not always enough, sometimes we want to
>> use real files in the package recipes (configs for 'linux-libre' or
>> "guix-emacs.el" for 'emacs'), so having "gnu/packages/files" seems
>> reasonable to me, WDYT?
>
> Sounds good.
>
> In general, we can create other subdirectories alongside patches/ and
> bootstrap/.  So we could have linux-conf/ and emacs/ there.

But we keep all patches in a single directory, why should there be
multiple dirs for auxiliary files?

> We can also
> add regular files like guix-emacs.el directly under gnu/packages (like
> ld-wrapper.in, linux-conf.*, etc.)
>
> All this is fine as long as the files get installed in the right place
> wrt. %load-path.
>
> I’m not sure a catch-all files/ (or aux-files/?) directory is helpful
> though.  There’s a case for having a linux-conf/ subdirectory now; for
> guix-emacs.el, I am slightly inclined to put it directly in
> gnu/packages, but no strong opinion.
>
> Thoughts?

I don't like keeping such files in "gnu/packages" the most!  My opinion
is that only .scm files should be placed there.

I vote either for a single "aux-files" (I like this name) directory, or
for its sub-directories ("aux-files/emacs", "aux-files/linux").

-- 
Alex



Re: rust: Crate Dependencies

2016-12-29 Thread ng0
David Craven  writes:

>> Same here for libc crate after the update, but I guess that's
>> because cargo is currently packaged and used from the bootstrap
>> rust, which is dated one version before the actual rustc you can
>> use now, so 0.13.0 cargo and 0.14.0 rustc.
>
> I submitted some experimental patches to the ML which fix this.

Thanks, I will try them out next week.

> Since you have I assume a web application that is written in rust, and
> you want to deploy it using guixsd, I think that vendoring the
> dependencies like the example cargo package is what you should do. The
> goal of using guixsd is fixing the deployment problem. If you vendor
> your dependencies and deploy your application like the example cargo
> package you should get an environment that is controlled 100% by your
> company. Would be awesome to see some real commercial webapps deployed
> using guixsd!

I don't really get the "vendoring" term, but I will when I look
at the cargo package and its source.
To give context to my packaging, it is for the current secushare
(see secushare.org or its .onion) prototype. This is not a web
application (I understand web application as something which runs
just in the browser), it's an extendable application using GNUnet
and PSYC2, more or less a social network (and more).

If I remember correctly, we do not bundle and everything which
might currently be bundled is because of rusts limitations in
some parts. And even then, this is nothing intended to be
packaged publicly at the present state ("prototype"), but what I
do work on this will get integrated into GuixSD (secushare+gnunet
live-system).
-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: [PATCH] gnu: Add php-hello-world.

2016-12-29 Thread Hartmut Goebel
Am 29.12.2016 um 18:44 schrieb Ludovic Courtès:
> Given the popularity of PHP, I would expect tutorials and examples to
> abound already, no?
>
> You can of course roll your own and Guix could distribute it, that’s
> fine.  I’m just surprised we even have to do that in the first place.

I was surprised, too. Otherwise I'd not write a own package.

But I see no benefit of putting a project to github, just do not have a
"home grown" package at guix. IMHO implementing this is just a waste of
time.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH] gnu: libtermkey: Update to 0.19.

2016-12-29 Thread Leo Famulari
On Thu, Dec 29, 2016 at 07:38:24PM +0100, José Miguel Sánchez García wrote:
> Just changed the version string from 0.18 to 0.19.

This is unusual; isn't there new source code for version 0.19, which
would require the source hash to be updated as well?



Re: [PATCH 1/2] gnu: libpng: Fix a null pointer dereference [fixes security issue].

2016-12-29 Thread Leo Famulari
On Thu, Dec 29, 2016 at 07:26:16PM +0100, Marius Bakke wrote:
> Leo Famulari  writes:
> 
> > * gnu/packages/patches/libpng-fix-null-ptr-dereference.patch: New file.
> > * gnu/local.mk (dist_patch_DATA): Add it.
> > * gnu/packages/image.scm (libpng)[replacement]: New field.
> > (libpng/fixed): New variable.
> 
> That was quick! Both patches LGTM.

I realized that since libpng-1.2 only has one user, it's not necessary
to graft the update. So I simply updated it to 1.2.57.

Thanks for the review!


signature.asc
Description: PGP signature


Re: Staging freeze

2016-12-29 Thread Leo Famulari
On Thu, Dec 29, 2016 at 06:51:46PM +0100, Ludovic Courtès wrote:
> Hi!
> 
> John Darrington  skribis:
> 
> > For what it's worth, I find that building *anything* related to qemu fails
> > for different reasons in about 2/3 attempts. So I think there is a 
> > fundamental, yet to be diagnosed problem.
> 
> Yet to be diagnosed… and yet to be reported?  :-)
> 
> This ‘qemu-image’ job has been failing since Dec. 11, apparently because
> the closure of the OS in build-aux/hydra/demo-os.scm has become more
> than 1.4G (the size specified in build-aux/hydra/gnu-system.scm):
> 
>   https://hydra.gnu.org/job/gnu/master/qemu-image.x86_64-linux
> 
> I’m tempted to simply remove this job because it doesn’t buy us anything
> compared to the system tests.

Okay!

> Objections?

None here :)



[PATCH] gnu: libtermkey: Update to 0.19.

2016-12-29 Thread José Miguel Sánchez García

Just changed the version string from 0.18 to 0.19.

--
José Miguel Sánchez GarcíaFrom 89893f7c39c64a12a5b0f82e96c3cc9fac982730 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
 
Date: Thu, 29 Dec 2016 19:08:13 +
Subject: [PATCH] gnu: libtermkey: Update to 0.19.

* gnu/packages/terminals.scm (libtermkey): Update to 0.19.
---
 gnu/packages/terminals.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index efedba480..9a70e109e 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -266,7 +266,7 @@ multi-seat support, a replacement for @command{mingetty}, and more.")
 (define-public libtermkey
   (package
 (name "libtermkey")
-(version "0.18")
+(version "0.19")
 (source (origin
   (method url-fetch)
   (uri (string-append "http://www.leonerd.org.uk/code/;
-- 
2.11.0



Re: [PATCH 0/1] MPD: Install systemd service files

2016-12-29 Thread Leo Famulari
On Thu, Dec 29, 2016 at 07:24:19PM +0100, Marius Bakke wrote:
> Leo Famulari  writes:
> 
> > I noticed that MPD 0.19.21 adds a systemd service file for unprivileged
> > users:
> >
> > http://git.musicpd.org/cgit/master/mpd.git/plain/NEWS?h=v0.19.21
> >
> > It works for me! 
> >
> > This patch installs both the privileged and unprivileged service files.
> >
> > I wonder, is this installation path correct? Should they be at
> >
> > ~/.guix-profile/etc/systemd[...] (my patch does this)
> 
> Yes. Unit names in managed packages should not conflict, so no further
> namespacing necessary. This way users can just sync/link units from
> /etc/systemd/{user,system} to the respective system
> locations.

Good point, thank you!

> Btw, Shepherd works in user mode too ;-)

I use it myself :)

> Here is a config that defines a service for "mcron":
> 
> $ cat ~/.config/shepherd/init.scm
> (define mcron (make 
> #:provides '(mcron)
> #:start (make-forkexec-constructor
>  (list "/run/current-system/profile/bin/mcron"))
> #:stop (make-kill-destructor)))
> (register-services mcron)

I'm glad to see this example here. It took me a long time to find an
example of a user service when I was getting started.


signature.asc
Description: PGP signature


Re: [PATCH 1/2] gnu: libpng: Fix a null pointer dereference [fixes security issue].

2016-12-29 Thread Marius Bakke
Leo Famulari  writes:

> * gnu/packages/patches/libpng-fix-null-ptr-dereference.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/image.scm (libpng)[replacement]: New field.
> (libpng/fixed): New variable.

That was quick! Both patches LGTM.


signature.asc
Description: PGP signature


Re: 03/03: gnu: nss, nss-certs: Update to 3.27.2.

2016-12-29 Thread Leo Famulari
On Wed, Dec 21, 2016 at 11:38:00AM -0500, Leo Famulari wrote:
> From e19cd9120b7e62f88dd5b0a1fae099d1e01650eb Mon Sep 17 00:00:00 2001
> From: Leo Famulari 
> Date: Tue, 20 Dec 2016 21:29:19 -0500
> Subject: [PATCH] gnu: nss: Fix build failure caused by expired test
>  certificate.

I pushed this to the staging branch. We can see if it works in the next
evaluation.


signature.asc
Description: PGP signature


Re: [PATCH 0/1] MPD: Install systemd service files

2016-12-29 Thread Marius Bakke
Leo Famulari  writes:

> I noticed that MPD 0.19.21 adds a systemd service file for unprivileged
> users:
>
> http://git.musicpd.org/cgit/master/mpd.git/plain/NEWS?h=v0.19.21
>
> It works for me! 
>
> This patch installs both the privileged and unprivileged service files.
>
> I wonder, is this installation path correct? Should they be at
>
> ~/.guix-profile/etc/systemd[...] (my patch does this)

Yes. Unit names in managed packages should not conflict, so no further
namespacing necessary. This way users can just sync/link units from
/etc/systemd/{user,system} to the respective system
locations.

Btw, Shepherd works in user mode too ;-)

Here is a config that defines a service for "mcron":

$ cat ~/.config/shepherd/init.scm
(define mcron (make 
#:provides '(mcron)
#:start (make-forkexec-constructor
 (list "/run/current-system/profile/bin/mcron"))
#:stop (make-kill-destructor)))
(register-services mcron)

I guess it would be better to re-use the Guix service definition, but
haven't gotten that far yet.


signature.asc
Description: PGP signature


Re: [PATCH] gnu: gnome-tweak-tool: Use glib-or-gtk-build-system

2016-12-29 Thread Ludovic Courtès
Hi!

Christopher Baines  skribis:

> * gnu/packages/gnome.scm (gnome-tweak-tool): Switch from the gnu build
> system to the glib-or-gtk build system, to fix missing gobject
> introspection namespaces.

Using ‘glib-or-gtk-build-system’ sounds right here, but with this patch,
I get:

--8<---cut here---start->8---
$ ./pre-inst-env guix build gnome-tweak-tool 
/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1
ludo@pluto ~/src/guix$ 
/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/bin/gnome-tweak-tool
 
Traceback (most recent call last):
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/bin/..gnome-tweak-tool-real-real",
 line 24, in 
gi.require_version("Gtk", "3.0")
  File 
"/gnu/store/dhcvv1qczvqwsj7fdi1qpny8myrqydb8-python2-pygobject-3.20.0/lib/python2.7/site-packages/gi/__init__.py",
 line 102, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
--8<---cut here---end--->8---

and:

--8<---cut here---start->8---
$ ./pre-inst-env guix environment --ad-hoc gnome-tweak-tool -- gnome-tweak-tool

[...]

** (..gnome-tweak-tool-real-real:27638): WARNING **: Error retrieving 
accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name 
org.a11y.Bus was not provided by any .service files
WARNING : Shell not installed or running
Traceback (most recent call last):
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/lib/python2.7/site-packages/gtweak/app.py",
 line 39, in do_activate
self.win = Window(self, model)
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/lib/python2.7/site-packages/gtweak/tweakview.py",
 line 58, in __init__
self._model.load_tweaks(self)
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/lib/python2.7/site-packages/gtweak/tweakmodel.py",
 line 125, in load_tweaks
mods = __import__("gtweak.tweaks", globals(), locals(), tweak_files, 0)
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_shell.py",
 line 98, in 
sw = StaticWorkspaceTweak(size_group=sg, loaded=_shell_loaded)
  File 
"/gnu/store/p6g06x6l1b3iw7hm447ys9sqr8bh2nbp-gnome-tweak-tool-3.20.1/lib/python2.7/site-packages/gtweak/tweaks/tweak_group_shell.py",
 line 50, in __init__
default = 
self.STATUS.keys()[self.STATUS.values().index(self.settings[self.key_name])]
ValueError: None is not in list
--8<---cut here---end--->8---

Is this a different error?

Thanks!

Ludo’.



[PATCH 2/2] gnu: libpng-1.2: Fix a null pointer dereference [fixes security issue].

2016-12-29 Thread Leo Famulari
* gnu/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/image.scm (libpng-1.2)[replacement]: New field.
(libpng-1.2/fixed): New variable.
---
 gnu/local.mk   |  1 +
 gnu/packages/image.scm |  9 ++
 .../libpng-1.2-fix-null-ptr-dereference.patch  | 36 ++
 3 files changed, 46 insertions(+)
 create mode 100644 
gnu/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 38c1b0b94..fee497b0e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -676,6 +676,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/libmad-frame-length.patch   \
   %D%/packages/patches/libmad-mips-newgcc.patch\
   %D%/packages/patches/libpng-fix-null-ptr-dereference.patch   \
+  %D%/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch   \
   %D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch\
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch\
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 69eeaed58..a576ae71a 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -100,6 +100,7 @@ library.  It supports almost all PNG features and is 
extensible.")
 (define-public libpng-1.2
   (package
 (inherit libpng)
+(replacement libpng-1.2/fixed)
 (version "1.2.56")
 (source
  (origin
@@ -113,6 +114,14 @@ library.  It supports almost all PNG features and is 
extensible.")
(sha256
 (base32 "1ghd03p353x0vi4dk83n1nlldg11w7vqdk3f99rkgfb82ic59ki4"))
 
+(define libpng-1.2/fixed
+  (package
+(inherit libpng-1.2)
+(source
+  (origin
+(inherit (package-source libpng-1.2))
+(patches (search-patches 
"libpng-1.2-fix-null-ptr-dereference.patch"))
+
 (define-public libjpeg
   (package
(name "libjpeg")
diff --git a/gnu/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch 
b/gnu/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch
new file mode 100644
index 0..e6220eed8
--- /dev/null
+++ b/gnu/packages/patches/libpng-1.2-fix-null-ptr-dereference.patch
@@ -0,0 +1,36 @@
+Fix a null pointer dereference in png_set_text_2():
+
+http://seclists.org/oss-sec/2016/q4/777
+
+Patch adapted from upstream source repository:
+
+https://sourceforge.net/p/libpng/code/ci/794a15fad6add4d636369d0b46f603a02995b2e2/
+
+From 794a15fad6add4d636369d0b46f603a02995b2e2 Mon Sep 17 00:00:00 2001
+From: Glenn Randers-Pehrson 
+Date: Thu, 29 Dec 2016 07:34:51 -0600
+Subject: [PATCH] [libpng12] Fixed a potential null pointer dereference in
+ png_set_text_2()
+
+(bug report and patch by Patrick Keshishian).
+---
+ ANNOUNCE | 2 ++
+ CHANGES  | 4 +++-
+ png.c| 1 +
+ 3 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/png.c b/png.c
+index 08d7e86b7..a4934d1d5 100644
+--- a/png.c
 b/png.c
+@@ -393,6 +393,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, 
png_uint_32 mask,
+  png_free(png_ptr, info_ptr->text);
+  info_ptr->text = NULL;
+  info_ptr->num_text=0;
++ info_ptr->max_text=0;
+   }
+}
+ #endif
+-- 
+2.11.0
+
-- 
2.11.0




[PATCH 1/2] gnu: libpng: Fix a null pointer dereference [fixes security issue].

2016-12-29 Thread Leo Famulari
* gnu/packages/patches/libpng-fix-null-ptr-dereference.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/image.scm (libpng)[replacement]: New field.
(libpng/fixed): New variable.
---
 gnu/local.mk   |  1 +
 gnu/packages/image.scm |  9 ++
 .../patches/libpng-fix-null-ptr-dereference.patch  | 36 ++
 3 files changed, 46 insertions(+)
 create mode 100644 gnu/packages/patches/libpng-fix-null-ptr-dereference.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 106adb235..38c1b0b94 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -675,6 +675,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/libmad-armv7-thumb-pt2.patch\
   %D%/packages/patches/libmad-frame-length.patch   \
   %D%/packages/patches/libmad-mips-newgcc.patch\
+  %D%/packages/patches/libpng-fix-null-ptr-dereference.patch   \
   %D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch\
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch\
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 1c500b334..69eeaed58 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -64,6 +64,7 @@
 (define-public libpng
   (package
(name "libpng")
+   (replacement libpng/fixed)
(version "1.6.25")
(source (origin
 (method url-fetch)
@@ -88,6 +89,14 @@ library.  It supports almost all PNG features and is 
extensible.")
(license license:zlib)
(home-page "http://www.libpng.org/pub/png/libpng.html;)))
 
+(define libpng/fixed
+  (package
+(inherit libpng)
+(source
+  (origin
+(inherit (package-source libpng))
+(patches (search-patches "libpng-fix-null-ptr-dereference.patch"))
+
 (define-public libpng-1.2
   (package
 (inherit libpng)
diff --git a/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch 
b/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch
new file mode 100644
index 0..192459162
--- /dev/null
+++ b/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch
@@ -0,0 +1,36 @@
+Fix a null pointer dereference in png_set_text_2():
+
+http://seclists.org/oss-sec/2016/q4/777
+
+Patch adapted from upstream source repository:
+
+https://sourceforge.net/p/libpng/code/ci/812768d7a9c97345d454634496b25ed415eb/
+
+From 812768d7a9c97345d454634496b25ed415eb Mon Sep 17 00:00:00 2001
+From: Glenn Randers-Pehrson 
+Date: Thu, 29 Dec 2016 07:51:33 -0600
+Subject: [PATCH] [libpng16] Fixed a potential null pointer dereference in
+ png_set_text_2()
+
+(bug report and patch by Patrick Keshishian).
+---
+ ANNOUNCE | 2 ++
+ CHANGES  | 2 ++
+ png.c| 1 +
+ 3 files changed, 5 insertions(+)
+
+diff --git a/png.c b/png.c
+index 8afc28fc2..2e05de159 100644
+--- a/png.c
 b/png.c
+@@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp 
info_ptr, png_uint_32 mask,
+  png_free(png_ptr, info_ptr->text);
+  info_ptr->text = NULL;
+  info_ptr->num_text = 0;
++ info_ptr->max_text = 0;
+   }
+}
+ #endif
+-- 
+2.11.0
+
-- 
2.11.0




Re: [ANN] Emacs-Guix 0.2.1

2016-12-29 Thread Ludovic Courtès
Hi!

Alex Kost  skribis:

> Hello, I have updated ‘emacs-guix’ package to 0.2.1.
>
> It is released mainly to keep it in sync with the Guix release.
> Particularly, it supports "d3js" graph backend (thanks Ricardo for
> this graph type!) in "M-x guix G".
>
> Also there is a new command – "M-x guix-about".  It displays a
> "splash screen" similar to the Emacs one (that you can see by
> pressing "C-h C-a").  Nothing useful there, just another opportunity
> to look at the Guix(SD) logo (thanks to Luis Felipe López Acevedo
> for the great logos!).
>
> You may find the screenshot of "M-x guix-about" here:
> 

Pretty cool.  :-)

Thanks for sending the announcement here, it’s very useful!

Ludo’.



Re: Staging freeze

2016-12-29 Thread Ludovic Courtès
Hi!

John Darrington  skribis:

> For what it's worth, I find that building *anything* related to qemu fails
> for different reasons in about 2/3 attempts. So I think there is a 
> fundamental, yet to be diagnosed problem.

Yet to be diagnosed… and yet to be reported?  :-)

This ‘qemu-image’ job has been failing since Dec. 11, apparently because
the closure of the OS in build-aux/hydra/demo-os.scm has become more
than 1.4G (the size specified in build-aux/hydra/gnu-system.scm):

  https://hydra.gnu.org/job/gnu/master/qemu-image.x86_64-linux

I’m tempted to simply remove this job because it doesn’t buy us anything
compared to the system tests.

Objections?

Ludo’.



Re: [PATCH] gnu: Add php-hello-world.

2016-12-29 Thread Ludovic Courtès
Hi Hartmut!

Hartmut Goebel  skribis:

> Am 21.12.2016 um 17:38 schrieb Ludovic Courtès:
>> For other tools we provide what upstream provides.  For example, Qt
>> comes with examples, which we provide in the ‘qt’ package (IIRC).
>
> The php source package does not provide any example. I also searched the
> internet for some hello-world-package, but did not find one.
>
> If you know of one, feel free to replace this one.
>
> If you dislike "home-made" packages so much, I can set up a
> "php-hello-world" project at github. But what should be the benefit?

Given the popularity of PHP, I would expect tutorials and examples to
abound already, no?

You can of course roll your own and Guix could distribute it, that’s
fine.  I’m just surprised we even have to do that in the first place.

Thoughts?

Ludo’.



Re: [PATCH] Remove Emacs interface.

2016-12-29 Thread Ludovic Courtès
Hi!

Alex Kost  skribis:

> The attached patch removes Emacs UI and its documentation (12000 lines
> removed, hooray!).  I added the only mention about 'emacs-guix' package
> in "Package Management" chapter.

OK!

I was thinking that, even if the Emacs-Guix manual isn’t available
online currently, this change would lead users following the link in the
HTML manual to the Emacs-Guix home page (with a wrong anchor), which is
better than 404:

diff --git a/doc/htmlxref.cnf b/doc/htmlxref.cnf
index bd2eb5f..999edfe 100644
--- a/doc/htmlxref.cnf
+++ b/doc/htmlxref.cnf
@@ -219,6 +219,8 @@ emacs		node	${EMACS}/html_node/emacs/
 easejs		mono	${GS}/easejs/manual/easejs.html
 easejs		node	${GS}/easejs/manual/
 
+emacs-guix	mono	https://notabug.org/...
+
 emacs-muse	node	${GS}/emacs-muse/manual/muse.html
 emacs-muse	node	${GS}/emacs-muse/manual/html_node/
 

Feel free to add it to the patch!

> Now 'emacs' directory contains a single git-controlled file -
> "guix-emacs.el".  It is used to patch our 'emacs' package (to find emacs
> packages in "share/emacs/site-lisp/guix.d").  But it is misplaced.

I agree.  May you can commit this patch first while we look for a
solution?

> What about making "gnu/packages/files" (or another dirname) directory,
> and putting "guix-emacs.el" and kernel configs ("linux-libre-*.conf")
> there?
>
> I mean "gnu/packages/patches" is not always enough, sometimes we want to
> use real files in the package recipes (configs for 'linux-libre' or
> "guix-emacs.el" for 'emacs'), so having "gnu/packages/files" seems
> reasonable to me, WDYT?

Sounds good.

In general, we can create other subdirectories alongside patches/ and
bootstrap/.  So we could have linux-conf/ and emacs/ there.  We can also
add regular files like guix-emacs.el directly under gnu/packages (like
ld-wrapper.in, linux-conf.*, etc.)

All this is fine as long as the files get installed in the right place
wrt. %load-path.

I’m not sure a catch-all files/ (or aux-files/?) directory is helpful
though.  There’s a case for having a linux-conf/ subdirectory now; for
guix-emacs.el, I am slightly inclined to put it directly in
gnu/packages, but no strong opinion.

Thoughts?

Thank you!

Ludo’.


Re: rust: Crate Dependencies

2016-12-29 Thread David Craven
> Same here for libc crate after the update, but I guess that's
> because cargo is currently packaged and used from the bootstrap
> rust, which is dated one version before the actual rustc you can
> use now, so 0.13.0 cargo and 0.14.0 rustc.

I submitted some experimental patches to the ML which fix this.

Since you have I assume a web application that is written in rust, and
you want to deploy it using guixsd, I think that vendoring the
dependencies like the example cargo package is what you should do. The
goal of using guixsd is fixing the deployment problem. If you vendor
your dependencies and deploy your application like the example cargo
package you should get an environment that is controlled 100% by your
company. Would be awesome to see some real commercial webapps deployed
using guixsd!



Re: [PATCH] Elpa importer improvements

2016-12-29 Thread Ludovic Courtès
Hello Guix!

Alex Kost  skribis:

> Carlo Zancanaro (2016-12-14 13:04 +1100) wrote:
>
>> I was trying to import some elpa packages recently and found some
>> issues, so here are some patches to fix them.
>>
>> 1. call-with-downloaded-file had behaviour different to how it was
>> documented to behave. This was primarily a problem when trying to import
>> packages with no description (eg. color-theme-solarized on melpa).
>>
>> 2. Package dependencies need to be propagated so that emacs can find
>> them.
>
>> Has anyone looked at this? This is relatively minor, but now that the
>> 0.12.0 release is done I thought a ping might be appropriate.
>
> Thanks for pinging!  I've also Cc-ed Federico and Ludovic who wrote and
> changed this part of code.

Sorry for the delay!

>> From 0e561aee91b5d389d72906d059ddf486a322f20a Mon Sep 17 00:00:00 2001
>> From: Carlo Zancanaro 
>> Date: Wed, 14 Dec 2016 12:31:12 +1100
>> Subject: [PATCH 1/2] import: elpa: Fix call-with-downloaded-file
>>
>> * guix/import/elpa.scm (call-with-downloaded-file): Make function behaviour
>> match documentation string.
>> ---
>>  guix/import/elpa.scm | 8 +++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
>> index 320a09e8c..5f8b7a9e5 100644
>> --- a/guix/import/elpa.scm
>> +++ b/guix/import/elpa.scm
>> @@ -89,7 +89,13 @@ NAMES (strings)."
>>"Fetch URL, store the content in a temporary file and call PROC with that
>>  file.  Returns the value returned by PROC.  On error call ERROR-THUNK and
>>  return its value or leave if it's false."
>> -  (proc (http-fetch/cached (string->uri url
>> +  (catch #t
>> +(lambda ()
>> +  (proc (http-fetch/cached (string->uri url
>> +(lambda (key . args)
>> +  (if error-thunk
>> +  (error-thunk)
>> +  (apply throw key args)
>
> So here you fixed a regression introduced by commit 218622a73¹, thanks!
> I think it's better to call 'leave' on the last line as it was done
> originally.
>
> ¹ 
> http://git.savannah.gnu.org/cgit/guix.git/commit/?id=218622a73794c3b0d0d81db9176a59125c58df41

‘http-fetch/cached’ raises an  condition (or a
‘getaddrinfo-error’ Guile exception), which I thought would be handled
at the top level, but apparently they’re not.

So I’ve applied the latest version of this change.

>> From 88f23b9c369841837a83225b52e19f4c029906ab Mon Sep 17 00:00:00 2001
>> From: Carlo Zancanaro 
>> Date: Wed, 14 Dec 2016 12:34:15 +1100
>> Subject: [PATCH 2/2] import: elpa: Import dependencies as propagated-inputs
>>
>> * guix/import/elpa.scm (elpa-package->sexp): Import dependencies as
>> propagated-inputs.
>> ---
>>  guix/import/elpa.scm | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm
>> index 5f8b7a9e5..897ce6a69 100644
>> --- a/guix/import/elpa.scm
>> +++ b/guix/import/elpa.scm
>> @@ -228,7 +228,7 @@ type ''."
>>  (bytevector->nix-base32-string (file-sha256 
>> tarball))
>>  "failed to download package")
>> (build-system emacs-build-system)
>> -   ,@(maybe-inputs 'inputs dependencies)
>> +   ,@(maybe-inputs 'propagated-inputs dependencies)
>> (home-page ,(elpa-package-home-page pkg))
>> (synopsis ,(elpa-package-synopsis pkg))
>> (description ,(elpa-package-description pkg))
>
> Using 'propagated-inputs' looks right to me.

Applied.

Thank you!

Ludo’.



Re: Staging freeze

2016-12-29 Thread Leo Famulari
On Wed, Dec 28, 2016 at 10:17:31AM +0100, John Darrington wrote:
> On Tue, Dec 27, 2016 at 11:13:05PM -0500, Leo Famulari wrote:
>  On Tue, Dec 27, 2016 at 06:56:44PM -0500, Leo Famulari wrote:
>  > On Fri, Dec 23, 2016 at 12:23:39AM -0500, Leo Famulari wrote:
>  > > The last staging branch was merged into the master branch on December
>  > > 11.
>  > > 
>  > > According to the 3 week staging cycle we are trying to adhere to [0],
>  > > this would mean we freeze the current branch on December 25 and try 
> to
>  > > merge it on January 1.
>  > > 
>  > > These dates are inconvenient for many people. I propose we freeze the
>  > > branch and start building on December 27, and try to merge on 
> January 3.
>  > 
>  > And the build failures are rolling in :)
>  > 
>  > https://hydra.gnu.org/eval/109410?full=1=master#tabs-now-fail
>  
>  The 'qemu-image' build failed due to a lack of disk space, presumably on
>  the VM image file:
>  
>  --
>  registering closures...
>  error: setting journal mode: database or disk is full
>  ERROR: In procedure scm-error:
>  ERROR: failed to register store items "/xchg/system"
>  --
>  https://hydra.gnu.org/build/1741220
>  
>  Any advice? I'm not sure where to start looking in the code.
> 
> For what it's worth, I find that building *anything* related to qemu fails
> for different reasons in about 2/3 attempts. So I think there is a 
> fundamental, yet to be diagnosed problem.

I've seen this error before when I fail to create a large enough blank
QEMU image. I think that's the problem here, but I'm not sure where this
qemu-image derivation comes from in the Guix code base, so I'm not sure
what to try adjusting or even how to replicate the failure.


signature.asc
Description: PGP signature


Re: Bad signature on commit 6a34f4ccc8a5d (gnu: python-prompt-toolkit: Update to 1.0.9.)

2016-12-29 Thread Leo Famulari
On Thu, Dec 29, 2016 at 04:04:49AM +0100, Tobias Geerinckx-Rice wrote:
> Signing seems to fail both seldom and pseudo-randomly. Oh, and
> silently[1]. My favourite kind of bug.
> 
> I'm guessing this is what happens:
> 
>   $
>   $ git commit, am or cherry-pick && git log --show-signatures
>   ...everything looks good and signed! Let's push!
>   $ git fetch --all && git rebase upstream/master
>   ...now signing some non-HEAD commit silently fails...
>   $ git push upstream
>   ...badness.
> 
> Good night,
> 
> T G-R
> 
> [1]: until you check the log, of course.
> 
> PS:
>   nckx@ubuntu~$ $ /usr/bin/gpg2 --version
>   gpg (GnuPG) 2.1.15
>   libgcrypt 1.7.2-beta
> but I doubt that matters much now. I don't use Guix's gpg [yet].

It would be nice to figure out why it fails. It seems specific to your
setup somehow (since there are no other broken signatures in the log),
but I have no idea where to start. Perhaps with the beta version of
libgcrypt.

Especially since it seems specific to your setup, can you evaluate the
pre-push hook that's attached, and start using the hook if you're
satisfied that it's correct?
#!/bin/sh

# A hook script that prevents the user from pushing unsigned commits.

# Called by "git push" after it has checked the remote status, but before
# anything has been pushed.  If this script exits with a non-zero status nothing
# will be pushed.
#
# This hook is called with the following parameters:
#
# $1 -- Name of the remote to which the push is being done
# $2 -- URL to which the push is being done
#
# If pushing without using a named remote those arguments will be equal.
#
# Information about the commits which are being pushed is supplied as lines to
# the standard input in the form:
#
#  

z40=

# Only use the hook when pushing to Savannah.
case "$2" in
*git.sv.gnu.org*)
break
;;
*)
exit 0
;;
esac

while read local_ref local_sha remote_ref remote_sha
do
if [ "$local_sha" = $z40 ]
then
# Handle delete
:
else
if [ "$remote_sha" = $z40 ]
then
# New branch, examine all commits
range="$local_sha"
else
# Update to existing branch, examine new commits
range="$remote_sha..$local_sha"
fi

# Check if push candidate commits are PGP signed.
git verify-commit $(git rev-list $range) >/dev/null 2>&1

exit $?
fi
done

exit 0


signature.asc
Description: PGP signature


[PATCH 1/1] gnu: mpd: Install systemd service files.

2016-12-29 Thread Leo Famulari
* gnu/packages/mpd.scm (mpd)[arguments]: Add 'install-service-files' phase.
---
 gnu/packages/mpd.scm | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/mpd.scm b/gnu/packages/mpd.scm
index 36a31048a..5231c3f7f 100644
--- a/gnu/packages/mpd.scm
+++ b/gnu/packages/mpd.scm
@@ -85,6 +85,17 @@ interfacing MPD in the C, C++ & Objective C languages.")
(base32
 "0c0p61p3jfh89pnqwd9nrw55krfvvnzhkpdq53g6njvg0aybh1c3"
 (build-system gnu-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'install 'install-service-files
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(systemd (string-append out "/etc/systemd/system"))
+(systemd-user (string-append out "/etc/systemd/user")))
+   (install-file "systemd/system/mpd.service" systemd)
+   (install-file "systemd/user/mpd.service" systemd-user)
+   #t))
 (inputs `(("ao" ,ao)
   ("alsa-lib" ,alsa-lib)
   ("avahi" ,avahi)
-- 
2.11.0




[PATCH 0/1] MPD: Install systemd service files

2016-12-29 Thread Leo Famulari
I noticed that MPD 0.19.21 adds a systemd service file for unprivileged
users:

http://git.musicpd.org/cgit/master/mpd.git/plain/NEWS?h=v0.19.21

It works for me! 

This patch installs both the privileged and unprivileged service files.

I wonder, is this installation path correct? Should they be at

~/.guix-profile/etc/systemd[...] (my patch does this)

or should the path be "namespaced" to MPD, like this:

~/.guix-profile/etc/mpd/systemd[...]

?

Leo Famulari (1):
  gnu: mpd: Install systemd service files.

 gnu/packages/mpd.scm | 11 +++
 1 file changed, 11 insertions(+)

-- 
2.11.0




asdf-build-system: Problem running tests for cl-unicode

2016-12-29 Thread Ricardo Wurmus
Hi,

I’m trying to build a package for sbcl-cl-unicode, which I need for a JS
uglifier (to be able to generate minified JS files in other packages’
build processes).

Unfortunately, the tests fail with

"The name NIL does not designate any package."

“cl-unicode” seems to have more problems.  When I ignore the tests and
try to build “sbcl-cl-ppcre-unicode” (see below), I get an error about
“CL-UNICODE” not designating any package.

Here’s the definition of “sbcl-cl-ppcre-unicode”:

(define-public sbcl-cl-ppcre-unicode
  (package (inherit sbcl-cl-ppcre)
(name "sbcl-cl-ppcre-unicode")
(arguments
 `(#:asd-file "cl-ppcre-unicode.asd"))
(inputs
 `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
   ("sbcl-cl-unicode" ,sbcl-cl-unicode)

Attached is the patch for “sbcl-cl-unicode”.

>From 3633ecb568c6dc3ca46758796470f7154ccae70d Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus 
Date: Thu, 29 Dec 2016 17:26:40 +0100
Subject: [PATCH] WIP gnu: Add sbcl-cl-unicode.

* gnu/packages/lisp.scm (sbcl-cl-unicode): New variable.
---
 gnu/packages/lisp.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ec0bdaaa5..35faa2459 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -702,6 +702,33 @@ compatible with ANSI-compliant Common Lisp implementations.")
 (define-public ecl-cl-ppcre
   (sbcl-package->ecl-package sbcl-cl-ppcre))
 
+(define-public sbcl-cl-unicode
+  (package
+(name "sbcl-cl-unicode")
+(version "0.1.5")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://github.com/edicl/cl-unicode/;
+   "archive/v" version ".tar.gz"))
+   (file-name (string-append "cl-unicode-" version ".tar.gz"))
+   (sha256
+(base32
+ "1qvy6wfyvn0n4hscg75q4004q98h2k0gwf7n157ckhrka7d1v7wy"
+(build-system asdf-build-system/sbcl)
+;; FIXME: Tests fail to load:
+;; "The name NIL does not designate any package."
+;(arguments `(#:tests? #f))
+(native-inputs
+ `(("sbcl-cl-ppcre" ,sbcl-cl-ppcre)
+   ("tests:cl-flexi-streams" ,sbcl-flexi-streams)))
+(home-page "http://weitz.de/cl-unicode/;)
+(synopsis "Portable Unicode library for Common Lisp")
+(description "CL-UNICODE is a portable Unicode library Common Lisp, which
+is compatible with perl.  It is pretty fast, thread-safe, and compatible with
+ANSI-compliant Common Lisp implementations.")
+(license license:bsd-2)))
+
 (define-public sbcl-clx
   (let ((revision "1")
 (commit "1c62774b03c1cf3fe6e5cb532df8b14b44c96b95"))
-- 
2.11.0


-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net


[PATCH 1/2] gnu: Add cargo.

2016-12-29 Thread David Craven
* gnu/packages/rust.scm (cargo): New variable.
---
 gnu/packages/rust.scm | 55 +++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 8aa867317..c6c4f3171 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -23,11 +23,15 @@
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages ssh)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages version-control)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
@@ -265,3 +269,54 @@ safety and thread safety guarantees.")
 (home-page "https://www.rust-lang.org;)
 ;; Dual licensed.
 (license (list license:asl2.0 license:expat
+
+(define-public cargo
+  (package
+(name "cargo")
+(version (cargo-version (rustc-version %rust-bootstrap-binaries-version)))
+(source (origin
+  (method url-fetch)
+  ;; Use a cargo tarball with vendored dependencies and a cargo
+  ;; config file.
+  (uri (string-append
+"https://github.com/dvc94ch/cargo;
+"/archive/" version "-cargo-vendor.tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0hpix5hwz10pm1wh65gimhsy9nxjvy7yikgbpw8afwglqr3bl856"
+(build-system cargo-build-system)
+(inputs
+ `(("cmake" ,cmake)
+   ("curl" ,curl)
+   ("libgit2" ,libgit2)
+   ("libssh2" ,libssh2)
+   ("openssl" ,openssl)
+   ("pkg-config" ,pkg-config)
+   ("python-2" ,python-2)
+   ("zlib" ,zlib)))
+(arguments
+ `(#:cargo ,cargo-bootstrap
+   #:tests? #f ; FIXME
+   #:phases
+   (modify-phases %standard-phases
+ ;; Avoid cargo complaining about missmatched checksums.
+ (delete 'patch-source-shebangs)
+ (delete 'patch-generated-file-shebangs)
+ (delete 'patch-usr-bin-file)
+ ;; Set CARGO_HOME to use the vendored dependencies.
+ (add-after 'unpack 'set-cargo-home
+   (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((gcc (assoc-ref inputs "gcc"))
+(cc (string-append gcc "/bin/gcc")))
+   (setenv "CARGO_HOME" (string-append (getcwd) "/cargohome"))
+   (setenv "CMAKE_C_COMPILER" cc)
+   (setenv "CC" cc))
+ #t)
+(home-page "https://github.com/rust-lang/cargo;)
+(synopsis "Build tool and package manager for Rust")
+(description "Cargo downloads your Rust project’s dependencies and compiles
+your project.")
+;; Cargo is dual licensed Apache and MIT. Also contains
+;; code from openssl which is GPL2 with linking exception.
+(license (list license:asl2.0 license:expat license:gpl2+
-- 
2.11.0



[PATCH 2/2] build-system: cargo: Use correct cargo.

2016-12-29 Thread David Craven
* gnu/packages/rust.scm (cargo-bootstrap): Make private.
* guix/build-system/cargo.scm (default-cargo): Use cargo.
* guix/build/cargo-build-system.scm (install): Pass correct path to
  --root.
---
 gnu/packages/rust.scm | 4 +---
 guix/build-system/cargo.scm   | 3 +--
 guix/build/cargo-build-system.scm | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index c6c4f3171..215030a7e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -121,9 +121,7 @@
 which can in turn be used to build the final Rust compiler.")
 (license license:asl2.0)))
 
-;; FIXME: Make private once cargo is packaged. Is currently used by the
-;; cargo-build-system.
-(define-public cargo-bootstrap
+(define cargo-bootstrap
   (package
 (name "cargo-bootstrap")
 (version (cargo-version %rust-bootstrap-binaries-version))
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 8d835dda1..1ee28bcfe 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -46,8 +46,7 @@ to NAME and VERSION."
   "Return the default Cargo package."
   ;; Lazily resolve the binding to avoid a circular dependency.
   (let ((rust (resolve-interface '(gnu packages rust
-;; FIXME: Package cargo and replace cargo-bootstrap with cargo.
-(module-ref rust 'cargo-bootstrap)))
+(module-ref rust 'cargo)))
 
 (define (default-rustc)
   "Return the default Rustc package."
diff --git a/guix/build/cargo-build-system.scm 
b/guix/build/cargo-build-system.scm
index 460d829b3..6357812f9 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -85,7 +85,7 @@
 ;; When the package includes executables we install
 ;; it using cargo install. This fails when the crate
 ;; doesn't contain an executable.
-(system* "cargo" "install" "--root" bin)
+(system* "cargo" "install" "--root" out)
 #t))
 
 (define %standard-phases
-- 
2.11.0



[PATCH 2/2] gnu: hplip: Add policykit support.

2016-12-29 Thread ng0
* gnu/packages/cups.scm (hplip): Add policykit support.
[arguments](configure-flags): Add "--enable-dbus-build", "--enable-policykit".
[arguments](make-flags): Add "policykit_dbus_etcdir", "policykit_dir",
"policykit_dbus_sharedir".
(inputs): Add "polkit".
---
 gnu/packages/cups.scm | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index d264d6b12..ae975504b 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages polkit)
   #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
@@ -351,8 +352,9 @@ device-specific programs to convert and print many types of 
files.")
  "--enable-gui-build"
  "--disable-qt4"
  "--enable-qt5"
+ "--enable-dbus-build"
+ "--enable-policykit"
  ;; TODO add foomatic drv install eventually.
- ;; TODO --enable-policykit eventually.
  ,(string-append "--with-cupsfilterdir="
  (assoc-ref %outputs "out") "/lib/cups/filter")
  ,(string-append "--with-cupsbackenddir="
@@ -362,6 +364,19 @@ device-specific programs to convert and print many types 
of files.")
  ,(string-append "--with-systraydir="
  (assoc-ref %outputs "out") "/etc/xdg"))
 
+   #:make-flags
+   ;; Already set in 'fix-hard-coded-file-names phase:
+   ;; "rulesdir" and "halpredir".
+   `(,(string-append "policykit_dbus_etcdir="
+ (assoc-ref %outputs "out")
+ "/etc/dbus-1/system.d")
+ ,(string-append "policykit_dir="
+ (assoc-ref %outputs "out")
+ "/share/polkit-1/actions")
+ ,(string-append "policykit_dbus_sharedir="
+ (assoc-ref %outputs "out")
+ "/share/dbus-1/system-services"))
+
#:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules)
#:modules ((guix build gnu-build-system)
@@ -429,5 +444,6 @@ device-specific programs to convert and print many types of 
files.")
   ("python-pygobject" ,python-pygobject)
   ("python-sip" ,python-sip)
   ;; TODO: Make hp-setup find python-dbus.
-  ("python-dbus" ,python-dbus)))
+  ("python-dbus" ,python-dbus)
+  ("polkit" ,polkit)))
 (native-inputs `(("pkg-config" ,pkg-config)
-- 
2.11.0




[PATCH 1/2] gnu: hplip: Add qt5 gui.

2016-12-29 Thread ng0
* gnu/packages/cups.scm (hplip): Add gui.
[arguments](configure-flags): Add "--enable-gui-build", "--disable-qt4",
"--enable-qt5".
[inputs]: Add python-pyqt, python-pygobject and python-sip.
---
 gnu/packages/cups.scm | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index baa77f7aa..d264d6b12 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Ludovic Courtès 
 ;;; Copyright © 2015, 2016 Efraim Flashner 
 ;;; Copyright © 2016 Danny Milosavljevic 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,8 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
 (define ghostscript/cups
@@ -346,6 +348,9 @@ device-specific programs to convert and print many types of 
files.")
  "--enable-new-hpcups"
  "--enable-cups_ppd_install"
  "--enable-cups_drv_install"
+ "--enable-gui-build"
+ "--disable-qt4"
+ "--enable-qt5"
  ;; TODO add foomatic drv install eventually.
  ;; TODO --enable-policykit eventually.
  ,(string-append "--with-cupsfilterdir="
@@ -420,6 +425,9 @@ device-specific programs to convert and print many types of 
files.")
   ("dbus" ,dbus)
   ("python-wrapper" ,python-wrapper)
   ("python" ,python)
+  ("python-pyqt" ,python-pyqt)
+  ("python-pygobject" ,python-pygobject)
+  ("python-sip" ,python-sip)
   ;; TODO: Make hp-setup find python-dbus.
   ("python-dbus" ,python-dbus)))
 (native-inputs `(("pkg-config" ,pkg-config)
-- 
2.11.0




hplip: Add qt5 gui, try to fix policykit support

2016-12-29 Thread ng0
[PATCH 1/2] gnu: hplip: Add qt5 gui.

Same as before, removed the --enable-dbus and ...

[PATCH 2/2] gnu: hplip: Add policykit support.

... moved it here, with the additional policykit stuff.
I really have no idea how hplip is supposed to be used in Guix after reading 
the note about the base service. So we are not supposed to run and install it 
as users in profiles? Will it be in the cups service where I would have no idea 
how to add it in there?
I have cups running but my printer absolutely requires hplip.



Re: staging: django fails to build

2016-12-29 Thread Hartmut Goebel
Am 29.12.2016 um 02:21 schrieb Leo Famulari:
> Django is failing its test suite on the staging branch:
>
I can reproduce this here, too.

It's a subtle bug in Django related to leap years :-( The test suite
only fails in the last week of a leap year. So the test-suite will work
again in three days.

I filed a bug report at Djnago:


-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: hplip: Add qt5 gui.

2016-12-29 Thread ng0
ng0  writes:

> We need to explicitly tell the configure to disable qt3 and qt4 to make it 
> accept qt5 which is annoying.
> Tested was just running hp-setup, worked for me.

I just fixed the policykit issue (in theory, no more errors in
the build), so I change this patch a bit and send in both patches
in series.

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: rust: Crate Dependencies

2016-12-29 Thread ng0
Danny Milosavljevic  writes:

> Hi David,
>
> On Thu, 29 Dec 2016 11:49:19 +0100
> David Craven  wrote:
>
>> It matters very
>> much which versions of rustc and cargo are used
>
> I used the versions in your v2 patch. I also tried ng0's update which didn't 
> improve things.

Same here for libc crate after the update, but I guess that's
because cargo is currently packaged and used from the bootstrap
rust, which is dated one version before the actual rustc you can
use now, so 0.13.0 cargo and 0.14.0 rustc.
I hope packaging cargo on its own will add the support for
namespaces.

>
> How does rustc find the (Rust) dependencies when building a package in 
> cargo-build-system? There doesn't seem to be a RUST* or CARGO* environment 
> variable or anything when I do "guix environment rust-c-vec --fallback". 
> (Note that I picked rust-c-vec to fix first because it has only rust-libc as 
> dependency)
>
> I read that there are actual Rust binary libraries, seldomly used, and 
> everything-included-only-as-source otherwise. How do I specify which it is?
>
> Or is that not implemented yet?
>
> I tried specifying the latter as native-inputs - which doesn't seems to work 
> either...
>
>

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: [PATCH] gnu: hplip: Add qt5 gui.

2016-12-29 Thread ng0
Danny Milosavljevic  writes:

> Hi,
>
>> + "--enable-dbus-build"
>>;; TODO: Make hp-setup find python-dbus.
>
> Does that mean that dbus now works in hp-setup?
>

I don't know. Before and afterwards I ran into the problem where
no user (in groups lp and lpadmin, even root) is authenticated
enough to finally add the printer (hp-setup -i -a -g).
I guess this is the source of this problem...?

I'm still looking into some problems with the gui, possibly
caused by some Guix specifics. The gui works in general, but what
doesn't work is adding your own ppd (you can select it in the
file-browser but it never gets displayed, therefore you can not
proceed beyond the first page), so I really assume this is dbus
or some other problem too. Nothing new, but the gui functionality
is expected by (some) users.
-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: Dependencies of pagure, revision of 2016-12-21

2016-12-29 Thread ng0
Leo Famulari  writes:

> On Wed, Dec 21, 2016 at 11:47:08AM +, ng0 wrote:
>> [PATCH 01/11] gnu: Add python-flask-wtf.
>> 
>> > Danny Milosavljevic: 
>> > Subject: Re: [PATCH 01/11] gnu: Add python-flask-wtf.  
>> > 
>> > Date: Wed, 21 Dec 2016 00:10:39 +0100  
>> > 
>> > Since flask-WTF directly imports flask, this package should also propagate 
>> > flask.
>> 
>> Addressed in this new revision of the patch series, thanks Danny!
>> 
>> [PATCH 02/11] gnu: Add python-flask-multistatic.
>> [PATCH 03/11] gnu: Add python-kitchen.
>> [PATCH 04/11] gnu: Add python-munch.
>> [PATCH 05/11] gnu: Add python-pygit2.
>> [PATCH 06/11] gnu: Add python2-openid.
>> [PATCH 07/11] gnu: Add python-openid-cla.
>> [PATCH 08/11] gnu: Add python-openid-teams.
>> [PATCH 09/11] gnu: Add python-straight-plugin.
>> [PATCH 10/11] gnu: Add python-trollius-redis.
>
> Thanks! Pushed with these changes:
>
> For python-flask-wtf, I made python-wtforms a propagated-input because
> it sounds like flask-wtf needs to use it at run-time.
>
> I also added some detail to a some of the descriptions.
>
> In the commit messages, I mentioned the python-2 variants of the packages.
>

Thanks! CC Harmut as this can be ticked off your todo list.
-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org



Re: [PATCH] gnu: hplip: Add qt5 gui.

2016-12-29 Thread Danny Milosavljevic
Hi,

> + "--enable-dbus-build"
>;; TODO: Make hp-setup find python-dbus.

Does that mean that dbus now works in hp-setup?



hplip: Add qt5 gui.

2016-12-29 Thread ng0
We need to explicitly tell the configure to disable qt3 and qt4 to make it 
accept qt5 which is annoying.
Tested was just running hp-setup, worked for me.




[PATCH] gnu: hplip: Add qt5 gui.

2016-12-29 Thread ng0
* gnu/packages/cups.scm (hplip): Add gui.
[arguments](configure-flags): Add "--enable-gui-build", "--disable-qt3",
"--disable-qt4", "--enable-qt5", "--enable-dbus-build".
[inputs]: Add python-pyqt, python-pygobject and python-sip.
---
 gnu/packages/cups.scm | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index baa77f7aa..7069d6b66 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Ludovic Courtès 
 ;;; Copyright © 2015, 2016 Efraim Flashner 
 ;;; Copyright © 2016 Danny Milosavljevic 
+;;; Copyright © 2016 ng0 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,8 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
 (define ghostscript/cups
@@ -346,6 +348,11 @@ device-specific programs to convert and print many types 
of files.")
  "--enable-new-hpcups"
  "--enable-cups_ppd_install"
  "--enable-cups_drv_install"
+ "--enable-gui-build"
+ "--disable-qt3"
+ "--disable-qt4"
+ "--enable-qt5"
+ "--enable-dbus-build"
  ;; TODO add foomatic drv install eventually.
  ;; TODO --enable-policykit eventually.
  ,(string-append "--with-cupsfilterdir="
@@ -420,6 +427,9 @@ device-specific programs to convert and print many types of 
files.")
   ("dbus" ,dbus)
   ("python-wrapper" ,python-wrapper)
   ("python" ,python)
+  ("python-pyqt" ,python-pyqt)
+  ("python-pygobject" ,python-pygobject)
+  ("python-sip" ,python-sip)
   ;; TODO: Make hp-setup find python-dbus.
   ("python-dbus" ,python-dbus)))
 (native-inputs `(("pkg-config" ,pkg-config)
-- 
2.11.0




Re: [PATCH] gnu: rustc: Update to 1.14.0.

2016-12-29 Thread David Craven
Thanks! Pushed as b9542563375fbd5f25bb77fd476b762916b63bd1.



Re: rust: Crate Dependencies

2016-12-29 Thread David Craven
Hi Danny,

> How does rustc find the (Rust) dependencies when building a package in 
> cargo-build-system?

You should be able to override the default rust or cargo version by
passing #:rustc or/and #:cargo as arguments to the build-system. See
guix/build-system/cargo.scm.

> I read that there are actual Rust binary libraries, seldomly used, and 
> everything-included-only-as-source otherwise. How do I specify which it is?

By actual Rust binary library I assume you mean a library with a C ABI
that can be dynamically linked against, written in rust.

A library like that should or would contain a Cargo.lock file nailing
down all the crate versions required, making sure that the project can
be built using the same rustc and cargo versions.

With a Cargo.lock file present the only remaining issue is figuring
out whether it can be built with the rustc release or if it requires
features from beta/nightly.

I don't know a specific example of one, but I also read that it is
possible. I think that the cargo install should take care of
installing such a library, but I don't think it's implemented yet.

HTH!



Re: rust: Crate Dependencies

2016-12-29 Thread Danny Milosavljevic
Hi David,

On Thu, 29 Dec 2016 11:49:19 +0100
David Craven  wrote:

> It matters very
> much which versions of rustc and cargo are used

I used the versions in your v2 patch. I also tried ng0's update which didn't 
improve things.

How does rustc find the (Rust) dependencies when building a package in 
cargo-build-system? There doesn't seem to be a RUST* or CARGO* environment 
variable or anything when I do "guix environment rust-c-vec --fallback". (Note 
that I picked rust-c-vec to fix first because it has only rust-libc as 
dependency)

I read that there are actual Rust binary libraries, seldomly used, and 
everything-included-only-as-source otherwise. How do I specify which it is?

Or is that not implemented yet?

I tried specifying the latter as native-inputs - which doesn't seems to work 
either...



Re: rust: Crate Dependencies

2016-12-29 Thread David Craven
> What does the error message mean? How to fix it?

Hard to tell from that description. Using the recursive importer is
not supported - use at your own risk ;) There is a reason why it's not
in master... While Makefiles and the C standard are defined, the rust
language and the Cargo.toml files are a moving target. It matters very
much which versions of rustc and cargo are used, for a moderately
complex crate the output of the recursive importer is going to be
completely unusable.



Re: Let non-root users use MTP devices (Attempt #2)

2016-12-29 Thread Chris Marusich
Chris Marusich  writes:

> Here's a second attempt to fix MTP support for GuixSD.  It's simple and
> requires no special group permissions.
>
> It turns out that elogind (like systemd's logind) can be compiled with
> support for ACLs (provided by libacl), in which case elogind will
> automatically set an ACL on a device file granting access to a user when
> that user is logged in using a seat to which the device is attached.  In
> short, by adding acl as an input to elogind, users will be able to
> access devices without running programs as root, and without being a
> member of any special group.
>
> That's just one piece of the puzzle, though.  The other piece is the
> udev rules provided by libmtp.  It's necessary to install those udev
> rules; if we don't, then the MTP device won't be tagged properly, so
> elogind will not set any ACLs for it.  I've chosen to install those
> rules by modifying the base services in desktop.scm so that all desktops
> will get the rules, not just GNOME; if you know of a better way to
> install them, please let me know.
>
> This patch has a happy side effect.  Namely: because elogind is now
> setting ACLs, it gives a user access to other devices that are attached
> to their seat.  For instance, after this change, I can access /dev/kvm
> and /dev/cdrom (and other devices) without being root, and without being
> in any special group.  How nice!

After sending this, I've noticed something odd: sometimes, it can take
quite a while for elogind to set the ACLs.  It's a bit of a mystery to
me.  I'm not sure how/when elogind decides to update the ACLs; I assumed
it was continuously checking for changes in the hardware or receiving
notifications about hardware changes, but it seems like elogind isn't
noticing when I plug in my phone.  Even though the device file shows up,
elogind doesn't set the ACLs unless I do something.

By "do something," I mean: Apparently, logging out and logging back in
seems to trigger elogind to set the ACLs.  Even just switching virtual
terminals (i.e., Control + F1, followed by Control + F7) seems to
trigger it, which is weird.  Even when elogind has not yet set the ACLs,
the "uaccess" tag has in fact been correctly set for the device (as
reported by e.g. "udevadm info /dev/libmtp-1-1"), which leads me to
suspect that elogind is either failing to notice or just ignoring the
hardware change.  I wonder if this might be a bug of some kind.

What do you think we should do?

-- 
Chris


signature.asc
Description: PGP signature


Let non-root users use MTP devices (Attempt #2)

2016-12-29 Thread Chris Marusich
Here's a second attempt to fix MTP support for GuixSD.  It's simple and
requires no special group permissions.

It turns out that elogind (like systemd's logind) can be compiled with
support for ACLs (provided by libacl), in which case elogind will
automatically set an ACL on a device file granting access to a user when
that user is logged in using a seat to which the device is attached.  In
short, by adding acl as an input to elogind, users will be able to
access devices without running programs as root, and without being a
member of any special group.

That's just one piece of the puzzle, though.  The other piece is the
udev rules provided by libmtp.  It's necessary to install those udev
rules; if we don't, then the MTP device won't be tagged properly, so
elogind will not set any ACLs for it.  I've chosen to install those
rules by modifying the base services in desktop.scm so that all desktops
will get the rules, not just GNOME; if you know of a better way to
install them, please let me know.

This patch has a happy side effect.  Namely: because elogind is now
setting ACLs, it gives a user access to other devices that are attached
to their seat.  For instance, after this change, I can access /dev/kvm
and /dev/cdrom (and other devices) without being root, and without being
in any special group.  How nice!

-- 
Chris




[PATCH 2/2] services: desktop: Use libmtp udev rules.

2016-12-29 Thread Chris Marusich
* gnu/services/desktop.scm (%modified-base-services): New variable.
  (%desktop-services): Use it.
---
 gnu/services/desktop.scm | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 7555780ad..72f35950b 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 Andy Wingo 
 ;;; Copyright © 2015 Mark H Weaver 
 ;;; Copyright © 2016 Sou Bunnbu 
+;;; Copyright © 2016 Chris Marusich 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,6 +41,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages suckless)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages libusb)
   #:use-module (guix records)
   #:use-module (guix packages)
   #:use-module (guix store)
@@ -745,6 +747,16 @@ with the administrator's password."
 ;;; The default set of desktop services.
 ;;;
 
+(define %modified-base-services
+  (modify-services %base-services
+;; Add the rules from libmtp.
+(udev-service-type config =>
+   (udev-configuration
+(inherit config)
+(rules
+ (cons* libmtp
+(udev-configuration-rules config)))
+
 (define %desktop-services
   ;; List of services typically useful for a "desktop" use case.
   (cons* (slim-service)
@@ -766,6 +778,6 @@ with the administrator's password."
 
  (ntp-service)
 
- %base-services))
+ %modified-base-services))
 
 ;;; desktop.scm ends here
-- 
2.11.0




[PATCH 1/2] gnu: elogind: Enable ACL support.

2016-12-29 Thread Chris Marusich
* gnu/packages/freedesktop.scm (elogind) [inputs]: Add acl.
---
 gnu/packages/freedesktop.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 37707796e..ddbac762a 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -211,7 +211,8 @@ the freedesktop.org XDG Base Directory specification.")
("shepherd" ,shepherd);for 'halt' and 'reboot', invoked
  ;when pressing the power button
("dbus" ,dbus)
-   ("eudev" ,eudev)))
+   ("eudev" ,eudev)
+   ("acl" ,acl)))
 (home-page "https://github.com/wingo/elogind;)
 (synopsis "User, seat, and session management service")
 (description "Elogind is the systemd project's \"logind\" service,
-- 
2.11.0