[PATCH] gnu: gtk: Add clipit.

2016-08-31 Thread doncatnip
Hey Guix,

This patch adds ClipIt (clipit) to the repository. Tested with lint,
build rounds=2 and actual usability.>From 82051a27d1ca6131ad6295fad95e0bc19cc22bfa Mon Sep 17 00:00:00 2001
From: doncatnip 
Date: Thu, 1 Sep 2016 03:15:01 +0200
Subject: [PATCH] gnu: gtk: Add clipit.

* gnu/packages/gtk.scm (clipit): New variable.
---
 gnu/packages/gtk.scm | 36 
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 8feac11..c47a763 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1331,3 +1331,39 @@ glass artworks done by Venicians glass blowers.")
  "GtkSpell provides word-processor-style highlighting and replacement of
 misspelled words in a GtkTextView widget.")
 (license license:gpl2+)))
+
+(define-public clipit
+  (package
+(name "clipit")
+(version "1.4.2")
+(source (origin
+  (method url-fetch)
+  (file-name (string-append name "-" version ".tar.gz"))
+  (uri (string-append
+"https://github.com/CristianHenzel/ClipIt/archive/";
+version ".tar.gz"))
+  (sha256
+(base32 "0ni1xrzabs8685wv3fgranrw49bf6bjmrqmqpp6vjm70br7bm1h6"
+(build-system gnu-build-system)
+(arguments
+ '(#:phases (alist-cons-after
+ 'unpack 'autogen
+ (lambda _
+   (zero? (system* "sh" "autogen.sh")))
+ %standard-phases)))
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)
+   ("autoconf", autoconf)
+   ("automake", automake)
+   ("libtool", libtool)))
+(inputs
+ `(("gtk+" ,gtk+-2)))
+(home-page "https://github.com/CristianHenzel/ClipIt";)
+(synopsis "Lightweight GTK+ clipboard manager")
+(description
+ "Clipboard manager with features such as a history, search thereof, global
+hotkeys and clipboard item actions.  ClipIt was forked from Parcellite and adds
+many bugfixes and features to the project.  For a full list of changes see
+https://github.com/CristianHenzel/ClipIt/blob/master/ChangeLog";)
+(license license:gpl2+)))
-- 
2.9.3



[PATCH] gnu: awesome: Update to 3.5.9.

2016-09-01 Thread doncatnip
Hey Guix !

Let's try this again.>From 99ac37565b7a4826c9ca3c9f0545825924effc3d Mon Sep 17 00:00:00 2001
From: doncatnip 
Date: Thu, 1 Sep 2016 23:08:28 +0200
Subject: [PATCH 1/3] gnu: lua: Remove conflicting flag, pass MYCFLAGS

* gnu/packages/lua.scm (lua)[arguments]: Use MYCFLAGS instead of
CFLAGS and remove conflicting -DLUA_USE_POSIX since -DLUA_USE_LINUX
is passed implicitly for build target "linux".
---
 gnu/packages/lua.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 8bd67c5..9f19cc9 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -51,7 +51,7 @@
   (srfi srfi-1))
#:test-target "test"
#:make-flags
-   '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
+   '("MYCFLAGS=-fPIC -DLUA_DL_DLOPEN"
  "linux")
#:phases
(modify-phases %standard-phases
-- 
2.9.3

From 57a998f52e2d77e758ff339d03f26556b3b9c63f Mon Sep 17 00:00:00 2001
From: doncatnip 
Date: Thu, 1 Sep 2016 23:53:32 +0200
Subject: [PATCH 2/3] gnu: lua: Add lua-lgi.

* gnu/packages/lua.scm (lua-lgi): New variable.
---
 gnu/packages/lua.scm | 77 +++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 9f19cc9..cdc28b0 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Andreas Enge 
 ;;; Copyright © 2016 Efraim Flashner 
 ;;; Copyright © 2016 Ricardo Wurmus 
+;;; Copyright © 2016 doncatnip 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,7 +30,12 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages xorg)
+  #:use-module (gnu packages gtk))
 
 (define-public lua
   (package
@@ -259,3 +265,72 @@ directory structure and file attributes.")
 communication.  It takes an already established TCP connection and creates a
 secure session between the peers.")
 (license (package-license lua-5.1
+
+(define-public lua-lgi
+  (package
+(name "lua-lgi")
+(version "0.9.1")
+(source
+  (origin
+(method url-fetch)
+(uri (string-append
+  "https://github.com/pavouk/lgi/archive/";
+  version ".tar.gz"))
+(file-name (string-append name "-" version ".tar.gz"))
+(sha256
+  (base32
+"1fmgdl5y4ph3yc6ycg865s3vai1rjkyda61cgqxk6zd13hmznw0c"
+(build-system gnu-build-system)
+(arguments
+ '(#:phases
+  (modify-phases %standard-phases
+(delete 'configure) ; no configure script
+(add-before 'build 'set-env
+  (lambda* (#:key inputs #:allow-other-keys)
+; we need to load cairo dynamically
+(let* ((cairo (string-append
+(assoc-ref inputs "cairo") "/lib" )))
+  (setenv "LD_LIBRARY_PATH" cairo 
+(add-before 'build 'set-lua-version
+  (lambda _
+; lua version and therefore install directories are hardcoded
+; FIXME: This breaks when we update lua to >=5.3
+(substitute* "./lgi/Makefile"
+   (("LUA_VERSION=5.1") "LUA_VERSION=5.2"
+(add-before 'check 'skip-test-gtk
+  (lambda _
+; FIXME: Skip GTK tests:
+;   gtk3 - can't get it to run with the xorg-server config below
+;  and some non-gtk tests will also fail
+;   gtk2 - lots of functions aren't implemented
+; We choose gtk2 as the lesser evil and simply skip the test.
+; as of 01/09/2016 awesome is the only package dependent on lgi but
+; it doesn't need or interact with gtk using lgi.
+(substitute* "./tests/test.lua"
+   (("'gtk.lua',") "-- 'gtk.lua',"
+(add-before 'check 'start-xserver-instance
+  (lambda* (#:key inputs #:allow-other-keys)
+;; There must be a running X server during tests.
+(system (format #f "~a/bin/Xvfb :1 &"
+(assoc-ref inputs "xorg-server")))
+(setenv "DISPLAY" ":1"
+   #:make-flags (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")
+(inputs
+ `(("gobject-introspection" ,

Fwd: Re: /dev/urandom

2018-07-11 Thread doncatnip

Of course, I forgot the CC here too.




 Forwarded Message 
Subject:Re: /dev/urandom
Date:   Wed, 11 Jul 2018 17:38:52 +0200
From:   doncatnip 
To: Vincent Legoll 



I'd guess this is about the distribution of blocks within the image, so
that the load of each sector is different from image to image containing
the same data. Of course, I'm just speculating as I haven't looked into
it - but if that is the case, it would seem even more strange that this
random seed is generated during install and not during use of the program.


On 7/11/2018 5:07 PM, Vincent Legoll wrote:

On Wed, Jul 11, 2018 at 4:17 PM, Danny Milosavljevic
 wrote:

the randomness is necessary for NAND wear levelling,

Any pointers about that subject ?

This looks strange as I'd have thought that less writes => less wear.





Fwd: Re: /dev/urandom

2018-07-11 Thread doncatnip

Of course, I forgot the CC.



 Forwarded Message 
Subject:Re: /dev/urandom
Date:   Wed, 11 Jul 2018 09:58:14 +0100
From:   Steffen Schulz 
To: Leo Famulari 



I probably got it wrong.

but it seems the programs purpose is to build images (boot loaders). I
then wonder why it needs to do this during installation. If image
building is the programs purpose, it should happen during execution
after installation, no ?

Users would *most likely* prefer it's actual purpose (proper Images,
including optimization) instead of reproducibility.

On 10.07.2018 23:40, Leo Famulari wrote:

On Tue, Jul 10, 2018 at 08:58:43PM +0200, Danny Milosavljevic wrote:

It writes an image file.  Since that image is later written to flash storage
(by the user), the program randomizes the data in order to increase longevity.
Then it stores the random data used as well.

I see. Like Ludo and Mark, I think we should avoid doing tricky things
with urandom.

Could /dev/zero work here? Does it use urandom once, to get a seed, or
does it read urandom repeatedly, expecting different values each time?

Also, I wonder if Guix users would want reproducibility here instead of
longer-lived NAND storage.




Re: [PATCH] gnu: awesome: Add awesome-3.5

2016-08-25 Thread doncatnip
On Thu, 25 Aug 2016 14:50:29 +
ng0  wrote:

Hi !
Of course. I didn't notice.

> (Sending this back as a copy to the thread on the list.)
> 
> Hi,
> 
> Can you please CC the guix-devel@gnu.org list or just reply-to the
> list when replying with the intention to not message offlist?
> 
> I think gnu.org does not set a reply-to thing, my email client does
> not care or know about such settings though.
> 
> doncatnip  writes:
> 
> > On Thu, 25 Aug 2016 09:22:38 +
> > ng0  wrote:
> >  
> >> Hi,
> >> 
> >> gno  writes:
> >>   
> >> > Hi guix !
> >> >
> >> > Sure hope I'm doing this right as I'm new to this.
> >> > These patches add Awesome 3.5.9 to the repository. I decided
> >> > against updating since it may break peoples configurations.
> >> > Awesome had API changes in between 3.4 and 3.5.
> >> >
> >> > Please have a look.
> >> 
> >> Awesome! Many thanks for your first patch, I will test this in the
> >> next days, maybe even today. I still have an 3.5.9 config from
> >> another system in a backup.
> >> 
> >> Ah. I see what you mean by you decided against updating. I think
> >> this is tricky. In my opinion awesome should provide the latest
> >> version, while for example awesome-3.4.15 would provide an older
> >> version. I use awesome, and this is what I would expect. When
> >> there was a version update, it was up to me to figure out if my
> >> config still worked and how to make it work again.
> >> I would vote for 3.5 as the new awesome and 3.4 inherits from this.
> >> But this can be applied after 3.5 is added I think?  
> >
> > Yea, there might be a better (guix) way to do this. I just thought
> > it might be good if those changes don't interfere at all with
> > current system configs yet. Should be easy to change later on.
> >  
> >> I did send in a patch to shorten the bloated description of
> >> awesome a couple of days ago, please wait with applying my patch.
> >> I will send in an update once we have this new awesome version
> >> update in tree. 
> >> > From cd3175f242450169b269ead777be6c7835476fba Mon Sep 17 00:00:00
> >> > 2001 From: doncatnip 
> >> > Date: Thu, 25 Aug 2016 01:43:53 +0200
> >> > Subject: [PATCH 1/3] gnu: lua: Enable dynamic library support.
> >> >
> >> > * gnu/packages/lua.scm: (lua)[arguments]: Add make flags.
> >> 
> >> You do more than just adding make flags, maybe let the commit
> >> message say that you added the CFLAGS: -DLUA_USE_POSIX,
> >> -DLUA_USE_DLOPEN and added LDFLAGS? I'm not sure how to express
> >> that, if at all. the git log should have other cases.
> >> Otherwise it looks good to me, this is just a formality the person
> >> commiting your patch(es) could also change on your behalf.  
> >
> > Add make flags which enable ld support as per headline, but yea
> > maybe it's not descriptive enough. I took example from another
> > patch recently posted in this list. I'd apperciate the person
> > commiting the patch changing it to something more appropriate.
> >
> > Thanks for testing this !
> >  
> >> > ---
> >> >  gnu/packages/lua.scm | 6 +-
> >> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
> >> > index b4b5dee..c68a3ff 100644
> >> > --- a/gnu/packages/lua.scm
> >> > +++ b/gnu/packages/lua.scm
> >> > @@ -4,6 +4,7 @@
> >> >  ;;; Copyright © 2014 Mark H Weaver 
> >> >  ;;; Copyright © 2014 Andreas Enge 
> >> >  ;;; Copyright © 2016 Efraim Flashner 
> >> > +;;; Copyright © 2016 doncatnip 
> >> >  ;;;
> >> >  ;;; This file is part of GNU Guix.
> >> >  ;;;
> >> > @@ -51,7 +52,10 @@
> >> > (modify-phases %standard-phases
> >> >   (delete 'configure)
> >> >   (replace 'build
> >> > -   (lambda _ (zero? (system* "make" "CFLAGS=-fPIC"
> >> > "linux"
> >> > +   (lambda _ (zero? (system*
> >> > +  "make" "LDFLAGS=-ldl"
> >> > +  "CFLAGS=-fPIC -DLUA_USE_DLOPEN
> >> > -DLUA_USE_POSIX"
> >> > +   

Re: [PATCH] gnu: awesome: Add awesome-3.5

2016-08-25 Thread doncatnip
On Thu, 25 Aug 2016 14:47:19 +
ng0  wrote:

I'm sorry, I just don't really know what to say about this as my
experience with hardening is rather non-existant. I can sure find out
how to disable dbus and submit another patch.

> ng0  writes:
> 
> >> Works for me (written from inside a running awesome-3.5.9).  
> >
> > ng0@shadowwalker ~$ awesome --version
> > awesome v3.5.9 (Mighty Ravendark)
> > • Build: Sun Mar 06 14:05:54Z 2016 for x86_64 by gcc version 4.9.3
> > (@) • Compiled against Lua 5.2.4 (running with Lua 5.2)
> > • D-Bus support: ✔  
> 
> Great, the joy of a limited font... Nevermind this message then for
> obvious reasons but rather take it as a note that dbus and hardening
> is something we need to watch in the future ;)
> 
> > Having no dbus support will help with eventual hardening of Guix,
> > but why do we not have it in awesome? 
> > And why would we we need it (dbus support) at all? I don't even
> > know why I used to build it with dbus support before. Works either
> > way.  
> 




Re: [PATCH] gnu: awesome: Add awesome-3.5

2016-08-26 Thread doncatnip
On Thu, 25 Aug 2016 09:59:51 +
ng0  wrote:

> > Works for me (written from inside a running awesome-3.5.9).  
> 
> ng0@shadowwalker ~$ awesome --version
> awesome v3.5.9 (Mighty Ravendark)
> • Build: Sun Mar 06 14:05:54Z 2016 for x86_64 by gcc version 4.9.3 (@)
> • Compiled against Lua 5.2.4 (running with Lua 5.2)
> • D-Bus support: ✔
> 
> Having no dbus support will help with eventual hardening of Guix,
> but why do we not have it in awesome? 
> And why would we we need it (dbus support) at all? I don't even know
> why I used to build it with dbus support before. Works either way.

Actually, personally I'd perefer keeping dbus support for
notifications. Different variants would be nice. Something akin to
gentoo make flags, no ?