bug#30095: substitute* decoding-error

2018-01-12 Thread nee
Hello, attached is a package definition that fails because substitute*
throws an error. The file I try to substitute* on has some names with
special signs like ë and é that might be related?
I also included a sed workaround which can be uncommented and works
perfectly fine, so the itself file is not too broken to be edited and
this is a bug with substitute*.

The file in question is: src/main.cc from
https://sourceforge.net/projects/eureka-editor/files/Eureka/1.21/eureka-121-source.tar.gz/download

I tested this on the latest guix master. git log says:

commit 7c0926ea7c6f0d0fa291251017704dfb6fb21924 (origin/master,
origin/HEAD, eureka)
Author: Ludovic Courtès 
Date:   Sat Jan 13 00:57:52 2018 +0100


From c92de18c559dac1be48f05ed39acbcd15120c0b6 Mon Sep 17 00:00:00 2001
From: nee 
Date: Sat, 13 Jan 2018 02:49:32 +0100
Subject: [PATCH] demonstrate substitute* bug in eureka package

---
 gnu/packages/game-development.scm | 70 ++-
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 363d9a253..1937d0a59 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -45,6 +45,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages fltk)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
@@ -78,7 +79,9 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  ;; TODO remove
+  #:use-module (gnu packages base))
 
 (define-public bullet
   (package
@@ -1150,3 +1153,68 @@ features design tools such as a visual editor, can import 3D models and
 provide high-quality 3D rendering, it contains an animation editor, and can be
 scripted in a Python-like language.")
 (license license:expat)))
+
+(define-public eureka
+  (package
+(name "eureka")
+(version "1.21")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
+  version "/eureka-"
+  ;; version without dots e.g 1.21 => 121
+  (string-join (string-split version #\.) "")
+  "-source.tar.gz"))
+  (sha256
+   (base32
+"1a7pf7xi56fcz7jc8layih5gq5m66g2ss4x5j61kzgip07j6rkir"
+(build-system gnu-build-system)
+(arguments
+ '(#:tests?
+   #f
+   #:make-flags
+   (let ((out (assoc-ref %outputs "out")))
+ (list (string-append "PREFIX=" out)))
+   #:phases
+   (modify-phases
+   %standard-phases
+ (delete 'configure)
+ (add-before
+ 'build 'prepare-install-directories
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+   (mkdir-p (string-append out "/bin"))
+   (mkdir-p (string-append out "/share"))
+
+
+   ;; FIXME substitute* crashes because of an accent in the name of someone
+   ;; (system* (which "sed")
+   ;;  "-i" (string-append "s|/usr/local|" out "|")
+   ;;  "src/main.cc")
+   (substitute*
+   "./src/main.cc"
+ (("/usr/local")
+  out))
+
+
+   (substitute*
+   "Makefile"
+ (("-o root")
+  ""
+(inputs `(("mesa" ,mesa)
+  ("libxft" ,libxft)
+  ("libxinerama" ,libxinerama)
+  ("libfontconfig" ,fontconfig)
+  ("libjpeg" ,libjpeg)
+  ("libpng" ,libpng)
+  ("fltk" ,fltk)
+  ("zlib" ,zlib)))
+(native-inputs `(("pkg-config" ,pkg-config)
+ ("xdg-utils" ,xdg-utils)
+ ;; TODO remove when substitute* is fixed
+ ("sed" ,sed)
+ ("which" ,which)))
+(synopsis "gzdoom")
+(description "gzdoom")
+(home-page "https://zdoom.org/";)
+(license license:gpl3+)))
-- 
2.15.1

starting phase `prepare-install-directories'
Backtrace:
  11 (primitive-load "/gnu/store/fk2ms0qy9lxv1xjz3mr3a5zclcr…")
In ice-9/eval.scm:
   191:35 10 (_ _)
In srfi/srfi-1.scm:
   863:16  9 (every1 # …)
In /gnu/store/xhwmxry8kkmq7897558qmcmfsx8r1z45-module-import/guix/build/gnu-build-system.scm:
   684:27  8 (_ _)
In ice-9/eval.scm:
619:8  7 (_ #(#(#(#) ((# . #))) #))
In ice-9/boot-9.scm:
849:4  6 (with-throw-handler _ _ _)
In ice-9/ports.scm:
   444:17  5 (call-with-input-file _ _ #:binary

bug#29992: 'postgres' service doesn't stop

2018-01-12 Thread Danny Milosavljevic
Hi Catonano,

> When I run Tryton myself, I use this line:
> trytond -c trytond.conf
> this command doesn' t return a prompt

Does it stay in foreground with the tryton service, too?  It shouldn't do that 
for the service, see below.

make-forkexec-constructor should takes a pid-file argument which is supposed to 
refer to a file that trytond creates.  If that isn't specified, shepherd will 
default to the pid of the child process of shepherd that did the exec().  So it 
shouldn't have tryton in foreground in any case.

Note: make-forkexec-constructor also has a #:log-file keyword argument - which 
is handy for debugging.

> So, in order to stop Tryton I simply press Ctrl-C
> 
> In the definition of my sevice, I use
> #~(make-kill-destructor)
> 
> to stop the Tryton service
> 
> But I copied this from other services, I don't know what
> "make-kill-destructor" does

(define make-kill-destructor
  (lambda* (#:optional (signal SIGTERM))
(lambda (pid . args)
  (kill pid signal)
  #f)))

So it sends SIGTERM to the process.

What happens when you send SIGTERM manually ("kill -TERM ...")?

> My Trytond service is not working anyway, I launch a vm with my service
> running in it, I test  it with the client, I see it doesn't work, I stop it
> and then I'd like to launch it by hand to see something more

You can try finding its pid with "ps -ef |grep tryton" and then compare their 
/proc/ trees (manually started vs. service-started).

In your screenshot, that would be /proc/411, especially /proc/411/fd and its 
signal mask (in /proc/411/status).

> But then, because a tryton-real daemon is still running, the socket for
> that address is already bound, as you can see in the picture

That's good then.

Try "netstat -lpn | grep 411" (or whatever the pid is now) to find out whether 
it's actually listening.





bug#30093: Installing python-ipython breaks Gnome on Fedora.

2018-01-12 Thread Fis Trivial
* Environment
I am currently running Guix on top of Fedora 26, which comes with Gnome 3.24.2

As recommended(1), I source *~/.guix-profile/etc/profile* in *~/.bash_profile*
to make all the exported variables recognized by login shell.

* Issue
After installing python-ipython with guix, guix exported the following
variables:

GUIX_GTK3_PATH
PKG_CONFIG_PATH

The next time I login, Gnome was broken, displaying nothing but a black screen,
except for Owncloud client(which is based on Qt). And all the key bindings
are gone.

So, I used tty to move the `source` command from *.bash_profile* to *.bashrc*.
After that, Gnome came back and functions as usual.


* Version
$: guix --version
guix (GNU Guix) d9a38cc255d853b2694a01b5704c1daedbb56742


[1]: https://lists.gnu.org/archive/html/help-guix/2017-05/msg00072.html


bug#29992: 'postgres' service doesn't stop

2018-01-12 Thread Catonano
2018-01-08 22:55 GMT+01:00 Alex Kost :

> Ludovic Courtès (2018-01-08 11:59 +0100) wrote:
>
> > Perhaps the proper way to stop postgresql is via one of its client
> > commands, like we do for nginx?
>
> Regarding the commands: "pg_ctl" is the canonical tool to start/stop
> PostgreSQL server.
>
> Note: I don't use the Guix service for postgresql (instead I run
> postgres via my Shepherd user instance).
>
> --
> Alex
>

I'm sorry if this isn't the place to write about this

My Tryton service doesn't get stopped either

Here's a picture I took from a virtual machine
https://imgur.com/a/LJ2Cq

When I run Tryton myself, I use this line:
trytond -c trytond.conf

this command doesn' t return a prompt
So, in order to stop Tryton I simply press Ctrl-C

In the definition of my sevice, I use
#~(make-kill-destructor)

to stop the Tryton service

But I copied this from other services, I don't know what
"make-kill-destructor" does

My Trytond service is not working anyway, I launch a vm with my service
running in it, I test  it with the client, I see it doesn't work, I stop it
and then I'd like to launch it by hand to see something more

But then, because a tryton-real daemon is still running, the socket for
that address is already bound, as you can see in the picture

Of course this has nothing to do with the Postgresql not stopping bug, I
was only giving some context