* bug#27083: screen-lockers: i3lock-color and i3lock-fancy
@ 2017-05-26 11:33 ng0
2017-11-17 9:55 ` [bug#27083] " Chris Marusich
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-05-26 11:33 UTC (permalink / raw)
To: 27083
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
I have no idea about the error of i3lock-fancy (password is not accepted).
An commented phase in i3lock-color is still included where I tried to fix this, but I don't know much about PAM at this point.
Finishing touches welcome!
[-- Attachment #2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: application/octet-stream, Size: 7166 bytes --]
From 0e8c97f5a7d9cc12edbd45aa41693eedfb31a736 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 13:03:42 +0000
Subject: [PATCH 1/2] gnu: Add i3lock-color.
* gnu/packages/wm.scm (i3lock-color): New variable.
* gnu/packages/patches/i3lock-color-fix-makefile.patch: New file
---
gnu/local.mk | 3 +
.../patches/i3lock-color-fix-makefile.patch | 38 ++++++++++
gnu/packages/wm.scm | 80 +++++++++++++++++++++-
3 files changed, 120 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 178ad3548..cd14ad046 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -679,6 +679,9 @@ dist_patch_DATA = \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
%D%/packages/patches/hydra-disable-darcs-test.patch \
+ %D%/packages/patches/hypre-doc-tables.patch \
+ %D%/packages/patches/hypre-ldflags.patch \
+ %D%/packages/patches/i3lock-color-fix-makefile.patch \
%D%/packages/patches/icecat-avoid-bundled-libraries.patch \
%D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
%D%/packages/patches/icu4c-reset-keyword-list-iterator.patch \
diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
new file mode 100644
index 000000000..8243dc548
--- /dev/null
+++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
@@ -0,0 +1,38 @@
+From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
+From: ng0 <ng0@no-reply.pragmatique.xyz>
+Date: Mon, 22 May 2017 18:22:19 +0000
+Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
+ build on Guix.
+
+---
+ Makefile | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c0fe888..b4b6cd9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
+ PKG_CONFIG=pkg-config
+ MANDIR=/usr/share/man
+
+-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
+-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
+-$(error "$(PKG_CONFIG) was not found")
+-endif
+-
+ CFLAGS += -std=c99
+ CFLAGS += -pipe
+ CFLAGS += -Wall
+@@ -18,7 +13,7 @@ CFLAGS += -O2
+ SIMD_CFLAGS += -funroll-loops
+ SIMD_CFLAGS += -msse2
+ CPPFLAGS += -D_GNU_SOURCE
+-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
++CPPFLAGS += -DXKBCOMPOSE=1
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += -lpam
+--
+2.13.0
+
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 607ef2b0e..7ea5673bd 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2016 Al McElrath <hello@yrns.org>
;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
@@ -65,6 +65,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages suckless)
#:use-module (guix download)
#:use-module (guix git-download))
@@ -332,6 +333,83 @@ and locate windows on all your workspaces, using an interactive dmenu
prompt.")
(license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
+;; The last release is from 2015, use the git commit.
+(define-public i3lock-color
+ (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
+ (revision "1"))
+ (package
+ (name "i3lock-color")
+ (version (string-append "2.8-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chrjguill/i3lock-color")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (snippet
+ ;; The Makefile is read-only, we are going to patch it.
+ '(chmod "Makefile" #o755))
+ (patches (search-patches "i3lock-color-fix-makefile.patch"))
+ (sha256
+ (base32
+ "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests included.
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man"))
+ (etc (string-append out "/etc")))
+ (substitute* "Makefile"
+ (("PREFIX=/usr")
+ (string-append "PREFIX=" out))
+ (("SYSCONFDIR=/etc")
+ (string-append "SYSCONFDIR=" etc))
+ (("MANDIR=/usr/share/man")
+ (string-append "MANDIR=" man)))
+ #t)))
+ ;; (add-before 'build 'fix-pam-file
+ ;; (lambda _
+ ;; (substitute* "i3lock.pam"
+ ;; (("login") "system-auth"))
+ ;; #t))
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((i3lock (assoc-ref outputs "out"))
+ (libev (string-append
+ (assoc-ref inputs "libev") "/lib")))
+ (wrap-program (string-append i3lock "/bin/i3lock")
+ `("LD_LIBRARY_PATH" suffix (, libev)))))))))
+ (inputs
+ `(("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xcb-util" ,xcb-util)
+ ("libxcb" ,libxcb)
+ ("linux-pam" ,linux-pam)
+ ("libev" ,libev)
+ ("libx11" ,libx11)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("libxkbcommon" ,libxkbcommon)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/chrjguill/i3lock-color")
+ (synopsis "Screenlocker with color configuration support")
+ (description
+ "I3lock-color is a screen locker. It is a re-patched version of
+i3lock, which is a simple screen locker like slock. Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or PNG image to be displayed in the lock screen
+@item many additional color options
+@end enumerate\n")
+ (license license:bsd-3))))
+
(define-public xmonad
(package
(name "xmonad")
--
2.13.0
[-- Attachment #3: 0002-gnu-Add-i3lock-fancy.patch --]
[-- Type: application/octet-stream, Size: 4171 bytes --]
From c79b0cdc921f86e4ca64367608a19ebbdb91bc4c Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 15:57:13 +0000
Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
* gnu/packages/wm.scm (i3lock-fancy): New variable.
---
gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 7ea5673bd..3d52caed6 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -41,6 +41,7 @@
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (gnu packages haskell)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
@@ -410,6 +411,76 @@ i3lock, which is a simple screen locker like slock. Features include:
@end enumerate\n")
(license license:bsd-3))))
+(define-public i3lock-fancy
+ (package
+ (name "i3lock-fancy")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests included
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (icons (string-append out "/share/i3lock-fancy/icons/"))
+ (i3lock (string-append (assoc-ref inputs "i3lock-color")
+ "/bin/i3lock"))
+ (wmctrl (string-append (assoc-ref inputs "wmctrl")
+ "/bin/wmctrl"))
+ (mconvert (string-append (assoc-ref inputs "imagemagick")
+ "/bin/convert"))
+ (mimport (string-append (assoc-ref inputs "imagemagick")
+ "/bin/import"))
+ (awk (string-append (assoc-ref inputs "gawk")
+ "/bin/gawk")))
+
+ (substitute* "lock"
+ (("if ! i3lock") (string-append "if ! " i3lock))
+ (("i3lock -n") (string-append i3lock " -n"))
+ (("$(which wmctrl)") wmctrl)
+ (("convert") mconvert)
+ (("shot=\\(import") (string-append "shot=\(" mimport))
+ (("awk -F") (string-append awk " -F"))
+ ((" awk") awk)
+ (("\\$scriptpath/icons/") icons))
+ #t)))
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (icons (string-append out "/share/i3lock-fancy/icons/")))
+
+ (install-file "lock" bin)
+ (rename-file (string-append bin "/lock")
+ (string-append bin "/i3lock-fancy"))
+ (copy-recursively "icons" icons)
+ #t))))))
+ (native-inputs
+ `(("imagemagick" ,imagemagick)
+ ("i3lock-color" ,i3lock-color)
+ ("wmctrl" ,wmctrl)
+ ("gawk" ,gawk)))
+ (home-page "https://github.com/meskarune/i3lock-fancy")
+ (synopsis "Screenlocker with screenshot function")
+ (description
+ "@code{i3lock-fancy} is a Bash script that takes a screenshot of
+the desktop, blurs the background and adds a lock icon and text.
+It makes use of @code{i3lock-color} and can optionally be passed any
+screenshot util like @code{scrot}. This screenlocker can be used with
+any window manager or desktop environment.")
+ (license license:expat)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.13.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-05-26 11:33 bug#27083: screen-lockers: i3lock-color and i3lock-fancy ng0
@ 2017-11-17 9:55 ` Chris Marusich
2017-11-17 10:18 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: Chris Marusich @ 2017-11-17 9:55 UTC (permalink / raw)
To: ng0; +Cc: 27083
[-- Attachment #1.1: Type: text/plain, Size: 4292 bytes --]
<ng0@pragmatique.xyz> writes:
> I have no idea about the error of i3lock-fancy (password is not
> accepted). An commented phase in i3lock-color is still included where
> I tried to fix this, but I don't know much about PAM at this point.
When I checked using "guix system vm", the reason i3lock refused to
accept the password was because it could not read /etc/shadow. One
solution to this problem is to do both of the following:
1) Do not wrap i3lock in a wrapper script.
2) Install the i3lock executable as setuid-root.
When installing i3lock as a setuid-root program, it is important not to
wrap it in a script. It is common in UNIX-like systems to ignore the
setuid bit when the program is an interpreted script instead of an
executable (a simple Internet search for a phrase like "setuid bash
script" will provide lots of supporting information about this). If you
do (2) without also removing the wrapping logic that you put into the
package definition, you will find that i3lock still rejects your
password - this is because it still can't read /etc/shadow.
The attached patch is a revised version of your first patch to add
i3lock-color. I have basically just removed the wrapping phase. To
install it setuid-root along with an appropriate PAM configuration file,
just add a screen-locker service like the following to your services in
your operating system declaration:
(screen-locker-service i3lock-color "i3lock")
Note that this will create an appropriate PAM configuration file at
/etc/pam.d/i3lock, so you don't need to bother messing around with the
PAM configuration file that comes with i3lock-color.
I haven't looked at the fancy version yet. I'll check it out when I get
a little more time.
> + %D%/packages/patches/hypre-doc-tables.patch \
> + %D%/packages/patches/hypre-ldflags.patch \
Did you intend to include these in the patch? They aren't used, so I've
removed them in my version of the patch.
> +---
> + Makefile | 7 +------
> + 1 file changed, 1 insertion(+), 6 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index c0fe888..b4b6cd9 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> + PKG_CONFIG=pkg-config
> + MANDIR=/usr/share/man
> +
> +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> +-$(error "$(PKG_CONFIG) was not found")
> +-endif
> +-
> + CFLAGS += -std=c99
> + CFLAGS += -pipe
> + CFLAGS += -Wall
> +@@ -18,7 +13,7 @@ CFLAGS += -O2
> + SIMD_CFLAGS += -funroll-loops
> + SIMD_CFLAGS += -msse2
> + CPPFLAGS += -D_GNU_SOURCE
> +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> ++CPPFLAGS += -DXKBCOMPOSE=1
> + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> + LIBS += -lpam
> +--
> +2.13.0
FYI, it looks like maybe we could probably remove this patch file
entirely, and just use substitute* to modify the Makefile, if we
provided the "which" program as an input. Specifically, if the which
program were present, then probably the check you removed would
succeed. I haven't tried it myself, though.
> -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
FYI, the contact.ng0@cryptolab.net email address is still mentioned in
multiple other files, too.
> + (description
> + "I3lock-color is a screen locker. It is a re-patched version of
> +i3lock, which is a simple screen locker like slock. Features include:
> +
> +@enumerate
> +@item forking process, the locked screen is preserved when you suspend from RAM
> +@item specify background color or PNG image to be displayed in the lock screen
> +@item many additional color options
> +@end enumerate\n")
I'm not sure if the trailing newline is necessary. Unless you beat me
to it, I'll check on this detail the next time I return to this thread.
--
Chris
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: text/x-patch, Size: 6252 bytes --]
From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
From: ng0 <ng0@no-reply.pragmatique.xyz>
Date: Fri, 17 Nov 2017 01:38:14 -0800
Subject: [PATCH] gnu: Add i3lock-color.
* gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
* gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
* gnu/packages/wm.scm: Add i3lock-color.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
gnu/local.mk | 1 +
.../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
gnu/packages/wm.scm | 66 ++++++++++++++++++++++
3 files changed, 105 insertions(+)
create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 61bebe662..575d88506 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -738,6 +738,7 @@ dist_patch_DATA = \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
%D%/packages/patches/hydra-disable-darcs-test.patch \
+ %D%/packages/patches/i3lock-color-fix-makefile.patch \
%D%/packages/patches/icecat-avoid-bundled-libraries.patch \
%D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
%D%/packages/patches/icu4c-CVE-2017-14952.patch \
diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
new file mode 100644
index 000000000..8243dc548
--- /dev/null
+++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
@@ -0,0 +1,38 @@
+From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
+From: ng0 <ng0@no-reply.pragmatique.xyz>
+Date: Mon, 22 May 2017 18:22:19 +0000
+Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
+ build on Guix.
+
+---
+ Makefile | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c0fe888..b4b6cd9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
+ PKG_CONFIG=pkg-config
+ MANDIR=/usr/share/man
+
+-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
+-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
+-$(error "$(PKG_CONFIG) was not found")
+-endif
+-
+ CFLAGS += -std=c99
+ CFLAGS += -pipe
+ CFLAGS += -Wall
+@@ -18,7 +13,7 @@ CFLAGS += -O2
+ SIMD_CFLAGS += -funroll-loops
+ SIMD_CFLAGS += -msse2
+ CPPFLAGS += -D_GNU_SOURCE
+-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
++CPPFLAGS += -DXKBCOMPOSE=1
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+ LIBS += -lpam
+--
+2.13.0
+
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 09c10eaa0..3d5a0ef7a 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -66,6 +66,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages suckless)
#:use-module (guix download)
#:use-module (guix git-download))
@@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
prompt.")
(license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
+;; The last release is from 2015, use the git commit.
+(define-public i3lock-color
+ (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
+ (revision "1"))
+ (package
+ (name "i3lock-color")
+ (version (string-append "2.8-" revision "." (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chrjguill/i3lock-color")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (snippet
+ ;; The Makefile is read-only, we are going to patch it.
+ '(chmod "Makefile" #o755))
+ (patches (search-patches "i3lock-color-fix-makefile.patch"))
+ (sha256
+ (base32
+ "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests included.
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (man (string-append out "/share/man"))
+ (etc (string-append out "/etc")))
+ (substitute* "Makefile"
+ (("PREFIX=/usr")
+ (string-append "PREFIX=" out))
+ (("SYSCONFDIR=/etc")
+ (string-append "SYSCONFDIR=" etc))
+ (("MANDIR=/usr/share/man")
+ (string-append "MANDIR=" man)))
+ #t))))))
+ (inputs
+ `(("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xcb-util" ,xcb-util)
+ ("libxcb" ,libxcb)
+ ("linux-pam" ,linux-pam)
+ ("libev" ,libev)
+ ("libx11" ,libx11)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("libxkbcommon" ,libxkbcommon)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/chrjguill/i3lock-color")
+ (synopsis "Screenlocker with color configuration support")
+ (description
+ "I3lock-color is a screen locker. It is a re-patched version of
+i3lock, which is a simple screen locker like slock. Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or PNG image to be displayed in the lock screen
+@item many additional color options
+@end enumerate\n")
+ (license license:bsd-3))))
+
(define-public xmonad
(package
(name "xmonad")
--
2.14.2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 9:55 ` [bug#27083] " Chris Marusich
@ 2017-11-17 10:18 ` ng0
2017-11-17 20:17 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-11-17 10:18 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 11977 bytes --]
Hi Chris,
thanks for your input. I think I was just stuck by too many
repetive attempts. Thanks for a fresh view :)
I'll send applied changes as soon as I can (probably next week).
Chris Marusich transcribed 11K bytes:
> <ng0@pragmatique.xyz> writes:
>
> > I have no idea about the error of i3lock-fancy (password is not
> > accepted). An commented phase in i3lock-color is still included where
> > I tried to fix this, but I don't know much about PAM at this point.
>
> When I checked using "guix system vm", the reason i3lock refused to
> accept the password was because it could not read /etc/shadow. One
> solution to this problem is to do both of the following:
>
> 1) Do not wrap i3lock in a wrapper script.
>
> 2) Install the i3lock executable as setuid-root.
Oh, 2 was what I was thinking of that might fix
it. I just had no time to test it.
> When installing i3lock as a setuid-root program, it is important not to
> wrap it in a script. It is common in UNIX-like systems to ignore the
> setuid bit when the program is an interpreted script instead of an
> executable (a simple Internet search for a phrase like "setuid bash
> script" will provide lots of supporting information about this). If you
> do (2) without also removing the wrapping logic that you put into the
> package definition, you will find that i3lock still rejects your
> password - this is because it still can't read /etc/shadow.
>
> The attached patch is a revised version of your first patch to add
> i3lock-color. I have basically just removed the wrapping phase. To
> install it setuid-root along with an appropriate PAM configuration file,
> just add a screen-locker service like the following to your services in
> your operating system declaration:
>
> (screen-locker-service i3lock-color "i3lock")
>
> Note that this will create an appropriate PAM configuration file at
> /etc/pam.d/i3lock, so you don't need to bother messing around with the
> PAM configuration file that comes with i3lock-color.
>
> I haven't looked at the fancy version yet. I'll check it out when I get
> a little more time.
The fancy version is basically a fork with some more fancy visual elements.
It should be similar.
> > + %D%/packages/patches/hypre-doc-tables.patch \
> > + %D%/packages/patches/hypre-ldflags.patch \
>
> Did you intend to include these in the patch? They aren't used, so I've
> removed them in my version of the patch.
Many weeks ago, I don't know what happened there.
Maybe a mistake in rebase.
> > +---
> > + Makefile | 7 +------
> > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > +
> > +diff --git a/Makefile b/Makefile
> > +index c0fe888..b4b6cd9 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > + PKG_CONFIG=pkg-config
> > + MANDIR=/usr/share/man
> > +
> > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > +-$(error "$(PKG_CONFIG) was not found")
> > +-endif
> > +-
> > + CFLAGS += -std=c99
> > + CFLAGS += -pipe
> > + CFLAGS += -Wall
> > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > + SIMD_CFLAGS += -funroll-loops
> > + SIMD_CFLAGS += -msse2
> > + CPPFLAGS += -D_GNU_SOURCE
> > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > ++CPPFLAGS += -DXKBCOMPOSE=1
> > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > + LIBS += -lpam
> > +--
> > +2.13.0
>
> FYI, it looks like maybe we could probably remove this patch file
> entirely, and just use substitute* to modify the Makefile, if we
> provided the "which" program as an input. Specifically, if the which
> program were present, then probably the check you removed would
> succeed. I haven't tried it myself, though.
Okay, I will give it a try.
> > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
>
> FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> multiple other files, too.
Yes. I'm only changing addresses once I touch the file. So old
addresses might be in there for a long time. Otoh, I will
prepare a patch and change all my header addresses.
> > + (description
> > + "I3lock-color is a screen locker. It is a re-patched version of
> > +i3lock, which is a simple screen locker like slock. Features include:
> > +
> > +@enumerate
> > +@item forking process, the locked screen is preserved when you suspend from RAM
> > +@item specify background color or PNG image to be displayed in the lock screen
> > +@item many additional color options
> > +@end enumerate\n")
>
> I'm not sure if the trailing newline is necessary. Unless you beat me
> to it, I'll check on this detail the next time I return to this thread.
I've seen this multiple times before and have just followed this style.
> --
> Chris
> From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@no-reply.pragmatique.xyz>
> Date: Fri, 17 Nov 2017 01:38:14 -0800
> Subject: [PATCH] gnu: Add i3lock-color.
>
> * gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
> * gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
> * gnu/packages/wm.scm: Add i3lock-color.
>
> Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> ---
> gnu/local.mk | 1 +
> .../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
> gnu/packages/wm.scm | 66 ++++++++++++++++++++++
> 3 files changed, 105 insertions(+)
> create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 61bebe662..575d88506 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -738,6 +738,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hubbub-sort-entities.patch \
> %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> %D%/packages/patches/hydra-disable-darcs-test.patch \
> + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
> %D%/packages/patches/icu4c-CVE-2017-14952.patch \
> diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> new file mode 100644
> index 000000000..8243dc548
> --- /dev/null
> +++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> @@ -0,0 +1,38 @@
> +From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
> +From: ng0 <ng0@no-reply.pragmatique.xyz>
> +Date: Mon, 22 May 2017 18:22:19 +0000
> +Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
> + build on Guix.
> +
> +---
> + Makefile | 7 +------
> + 1 file changed, 1 insertion(+), 6 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index c0fe888..b4b6cd9 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> + PKG_CONFIG=pkg-config
> + MANDIR=/usr/share/man
> +
> +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> +-$(error "$(PKG_CONFIG) was not found")
> +-endif
> +-
> + CFLAGS += -std=c99
> + CFLAGS += -pipe
> + CFLAGS += -Wall
> +@@ -18,7 +13,7 @@ CFLAGS += -O2
> + SIMD_CFLAGS += -funroll-loops
> + SIMD_CFLAGS += -msse2
> + CPPFLAGS += -D_GNU_SOURCE
> +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> ++CPPFLAGS += -DXKBCOMPOSE=1
> + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> + LIBS += -lpam
> +--
> +2.13.0
> +
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 09c10eaa0..3d5a0ef7a 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -66,6 +66,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages linux)
> #:use-module (gnu packages suckless)
> #:use-module (guix download)
> #:use-module (guix git-download))
> @@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
> prompt.")
> (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
>
> +;; The last release is from 2015, use the git commit.
> +(define-public i3lock-color
> + (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
> + (revision "1"))
> + (package
> + (name "i3lock-color")
> + (version (string-append "2.8-" revision "." (string-take commit 7)))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/chrjguill/i3lock-color")
> + (commit commit)))
> + (file-name (string-append name "-" version "-checkout"))
> + (snippet
> + ;; The Makefile is read-only, we are going to patch it.
> + '(chmod "Makefile" #o755))
> + (patches (search-patches "i3lock-color-fix-makefile.patch"))
> + (sha256
> + (base32
> + "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; No tests included.
> + #:make-flags (list "CC=gcc")
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (man (string-append out "/share/man"))
> + (etc (string-append out "/etc")))
> + (substitute* "Makefile"
> + (("PREFIX=/usr")
> + (string-append "PREFIX=" out))
> + (("SYSCONFDIR=/etc")
> + (string-append "SYSCONFDIR=" etc))
> + (("MANDIR=/usr/share/man")
> + (string-append "MANDIR=" man)))
> + #t))))))
> + (inputs
> + `(("xcb-util-image" ,xcb-util-image)
> + ("xcb-util-keysyms" ,xcb-util-keysyms)
> + ("xcb-util" ,xcb-util)
> + ("libxcb" ,libxcb)
> + ("linux-pam" ,linux-pam)
> + ("libev" ,libev)
> + ("libx11" ,libx11)
> + ("cairo" ,cairo)))
> + (native-inputs
> + `(("libxkbcommon" ,libxkbcommon)
> + ("pkg-config" ,pkg-config)))
> + (home-page "https://github.com/chrjguill/i3lock-color")
> + (synopsis "Screenlocker with color configuration support")
> + (description
> + "I3lock-color is a screen locker. It is a re-patched version of
> +i3lock, which is a simple screen locker like slock. Features include:
> +
> +@enumerate
> +@item forking process, the locked screen is preserved when you suspend from RAM
> +@item specify background color or PNG image to be displayed in the lock screen
> +@item many additional color options
> +@end enumerate\n")
> + (license license:bsd-3))))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.14.2
>
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 10:18 ` ng0
@ 2017-11-17 20:17 ` ng0
2017-11-17 20:57 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-11-17 20:17 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1.1: Type: text/plain, Size: 12830 bytes --]
New version appended. i3lock-fancy needs some fixes, but I can confirm
that i3lock-color works!
ng0 transcribed 12K bytes:
> Hi Chris,
>
> thanks for your input. I think I was just stuck by too many
> repetive attempts. Thanks for a fresh view :)
> I'll send applied changes as soon as I can (probably next week).
>
> Chris Marusich transcribed 11K bytes:
> > <ng0@pragmatique.xyz> writes:
> >
> > > I have no idea about the error of i3lock-fancy (password is not
> > > accepted). An commented phase in i3lock-color is still included where
> > > I tried to fix this, but I don't know much about PAM at this point.
> >
> > When I checked using "guix system vm", the reason i3lock refused to
> > accept the password was because it could not read /etc/shadow. One
> > solution to this problem is to do both of the following:
> >
> > 1) Do not wrap i3lock in a wrapper script.
> >
> > 2) Install the i3lock executable as setuid-root.
>
> Oh, 2 was what I was thinking of that might fix
> it. I just had no time to test it.
>
> > When installing i3lock as a setuid-root program, it is important not to
> > wrap it in a script. It is common in UNIX-like systems to ignore the
> > setuid bit when the program is an interpreted script instead of an
> > executable (a simple Internet search for a phrase like "setuid bash
> > script" will provide lots of supporting information about this). If you
> > do (2) without also removing the wrapping logic that you put into the
> > package definition, you will find that i3lock still rejects your
> > password - this is because it still can't read /etc/shadow.
> >
> > The attached patch is a revised version of your first patch to add
> > i3lock-color. I have basically just removed the wrapping phase. To
> > install it setuid-root along with an appropriate PAM configuration file,
> > just add a screen-locker service like the following to your services in
> > your operating system declaration:
> >
> > (screen-locker-service i3lock-color "i3lock")
> >
> > Note that this will create an appropriate PAM configuration file at
> > /etc/pam.d/i3lock, so you don't need to bother messing around with the
> > PAM configuration file that comes with i3lock-color.
> >
> > I haven't looked at the fancy version yet. I'll check it out when I get
> > a little more time.
>
> The fancy version is basically a fork with some more fancy visual elements.
> It should be similar.
>
> > > + %D%/packages/patches/hypre-doc-tables.patch \
> > > + %D%/packages/patches/hypre-ldflags.patch \
> >
> > Did you intend to include these in the patch? They aren't used, so I've
> > removed them in my version of the patch.
>
> Many weeks ago, I don't know what happened there.
> Maybe a mistake in rebase.
>
> > > +---
> > > + Makefile | 7 +------
> > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > +
> > > +diff --git a/Makefile b/Makefile
> > > +index c0fe888..b4b6cd9 100644
> > > +--- a/Makefile
> > > ++++ b/Makefile
> > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > + PKG_CONFIG=pkg-config
> > > + MANDIR=/usr/share/man
> > > +
> > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > +-$(error "$(PKG_CONFIG) was not found")
> > > +-endif
> > > +-
> > > + CFLAGS += -std=c99
> > > + CFLAGS += -pipe
> > > + CFLAGS += -Wall
> > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > + SIMD_CFLAGS += -funroll-loops
> > > + SIMD_CFLAGS += -msse2
> > > + CPPFLAGS += -D_GNU_SOURCE
> > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > + LIBS += -lpam
> > > +--
> > > +2.13.0
> >
> > FYI, it looks like maybe we could probably remove this patch file
> > entirely, and just use substitute* to modify the Makefile, if we
> > provided the "which" program as an input. Specifically, if the which
> > program were present, then probably the check you removed would
> > succeed. I haven't tried it myself, though.
>
> Okay, I will give it a try.
>
> > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
> >
> > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> > multiple other files, too.
>
> Yes. I'm only changing addresses once I touch the file. So old
> addresses might be in there for a long time. Otoh, I will
> prepare a patch and change all my header addresses.
>
> > > + (description
> > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > +i3lock, which is a simple screen locker like slock. Features include:
> > > +
> > > +@enumerate
> > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > +@item specify background color or PNG image to be displayed in the lock screen
> > > +@item many additional color options
> > > +@end enumerate\n")
> >
> > I'm not sure if the trailing newline is necessary. Unless you beat me
> > to it, I'll check on this detail the next time I return to this thread.
>
> I've seen this multiple times before and have just followed this style.
>
> > --
> > Chris
>
> > From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
> > From: ng0 <ng0@no-reply.pragmatique.xyz>
> > Date: Fri, 17 Nov 2017 01:38:14 -0800
> > Subject: [PATCH] gnu: Add i3lock-color.
> >
> > * gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
> > * gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
> > * gnu/packages/wm.scm: Add i3lock-color.
> >
> > Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> > ---
> > gnu/local.mk | 1 +
> > .../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
> > gnu/packages/wm.scm | 66 ++++++++++++++++++++++
> > 3 files changed, 105 insertions(+)
> > create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
> >
> > diff --git a/gnu/local.mk b/gnu/local.mk
> > index 61bebe662..575d88506 100644
> > --- a/gnu/local.mk
> > +++ b/gnu/local.mk
> > @@ -738,6 +738,7 @@ dist_patch_DATA = \
> > %D%/packages/patches/hubbub-sort-entities.patch \
> > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
> > %D%/packages/patches/icu4c-CVE-2017-14952.patch \
> > diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > new file mode 100644
> > index 000000000..8243dc548
> > --- /dev/null
> > +++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > @@ -0,0 +1,38 @@
> > +From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
> > +From: ng0 <ng0@no-reply.pragmatique.xyz>
> > +Date: Mon, 22 May 2017 18:22:19 +0000
> > +Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
> > + build on Guix.
> > +
> > +---
> > + Makefile | 7 +------
> > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > +
> > +diff --git a/Makefile b/Makefile
> > +index c0fe888..b4b6cd9 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > + PKG_CONFIG=pkg-config
> > + MANDIR=/usr/share/man
> > +
> > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > +-$(error "$(PKG_CONFIG) was not found")
> > +-endif
> > +-
> > + CFLAGS += -std=c99
> > + CFLAGS += -pipe
> > + CFLAGS += -Wall
> > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > + SIMD_CFLAGS += -funroll-loops
> > + SIMD_CFLAGS += -msse2
> > + CPPFLAGS += -D_GNU_SOURCE
> > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > ++CPPFLAGS += -DXKBCOMPOSE=1
> > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > + LIBS += -lpam
> > +--
> > +2.13.0
> > +
> > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > index 09c10eaa0..3d5a0ef7a 100644
> > --- a/gnu/packages/wm.scm
> > +++ b/gnu/packages/wm.scm
> > @@ -66,6 +66,7 @@
> > #:use-module (gnu packages gperf)
> > #:use-module (gnu packages imagemagick)
> > #:use-module (gnu packages lua)
> > + #:use-module (gnu packages linux)
> > #:use-module (gnu packages suckless)
> > #:use-module (guix download)
> > #:use-module (guix git-download))
> > @@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
> > prompt.")
> > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> >
> > +;; The last release is from 2015, use the git commit.
> > +(define-public i3lock-color
> > + (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
> > + (revision "1"))
> > + (package
> > + (name "i3lock-color")
> > + (version (string-append "2.8-" revision "." (string-take commit 7)))
> > + (source
> > + (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + (url "https://github.com/chrjguill/i3lock-color")
> > + (commit commit)))
> > + (file-name (string-append name "-" version "-checkout"))
> > + (snippet
> > + ;; The Makefile is read-only, we are going to patch it.
> > + '(chmod "Makefile" #o755))
> > + (patches (search-patches "i3lock-color-fix-makefile.patch"))
> > + (sha256
> > + (base32
> > + "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
> > + (build-system gnu-build-system)
> > + (arguments
> > + `(#:tests? #f ; No tests included.
> > + #:make-flags (list "CC=gcc")
> > + #:phases
> > + (modify-phases %standard-phases
> > + (replace 'configure
> > + (lambda* (#:key outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (man (string-append out "/share/man"))
> > + (etc (string-append out "/etc")))
> > + (substitute* "Makefile"
> > + (("PREFIX=/usr")
> > + (string-append "PREFIX=" out))
> > + (("SYSCONFDIR=/etc")
> > + (string-append "SYSCONFDIR=" etc))
> > + (("MANDIR=/usr/share/man")
> > + (string-append "MANDIR=" man)))
> > + #t))))))
> > + (inputs
> > + `(("xcb-util-image" ,xcb-util-image)
> > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > + ("xcb-util" ,xcb-util)
> > + ("libxcb" ,libxcb)
> > + ("linux-pam" ,linux-pam)
> > + ("libev" ,libev)
> > + ("libx11" ,libx11)
> > + ("cairo" ,cairo)))
> > + (native-inputs
> > + `(("libxkbcommon" ,libxkbcommon)
> > + ("pkg-config" ,pkg-config)))
> > + (home-page "https://github.com/chrjguill/i3lock-color")
> > + (synopsis "Screenlocker with color configuration support")
> > + (description
> > + "I3lock-color is a screen locker. It is a re-patched version of
> > +i3lock, which is a simple screen locker like slock. Features include:
> > +
> > +@enumerate
> > +@item forking process, the locked screen is preserved when you suspend from RAM
> > +@item specify background color or PNG image to be displayed in the lock screen
> > +@item many additional color options
> > +@end enumerate\n")
> > + (license license:bsd-3))))
> > +
> > (define-public xmonad
> > (package
> > (name "xmonad")
> > --
> > 2.14.2
> >
>
>
>
>
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://dl.n0.is/dist/keys/
> WWW: https://we.make.ritual.n0.is
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #1.2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: text/plain, Size: 4434 bytes --]
From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 13:03:42 +0000
Subject: [PATCH 1/2] gnu: Add i3lock-color.
* gnu/packages/wm.scm (i3lock-color): New variable.
---
gnu/local.mk | 1 +
gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 54d1ac91c..2ec5844dc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -744,6 +744,7 @@ dist_patch_DATA = \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
%D%/packages/patches/hydra-disable-darcs-test.patch \
+ %D%/packages/patches/i3lock-color-fix-makefile.patch \
%D%/packages/patches/icecat-avoid-bundled-libraries.patch \
%D%/packages/patches/icecat-bug-1348660-pt5.patch \
%D%/packages/patches/icecat-bug-1415133.patch \
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 62a5b5460..e4db72a6f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages suckless)
#:use-module (guix download)
#:use-module (guix git-download))
@@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
prompt.")
(license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
+(define-public i3lock-color
+ (package
+ (name "i3lock-color")
+ (version "2.9.1-c")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/chrjguill/i3lock-color/"
+ "archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests included.
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (etc (string-append out "/etc"))
+ (man (string-append out "/share/man"))
+ (xkb (assoc-ref inputs "libxkbcommon"))
+ (xkbheader (string-append xkb
+ "/include/xkbcommon/"
+ "xkbcommon-compose.h")))
+ (substitute* "Makefile"
+ (("PKG_CONFIG=pkg-config")
+ (string-append "PKG_CONFIG="
+ (which "pkg-config")))
+ (("/usr/include/xkbcommon/xkbcommon-compose.h")
+ xkbheader)
+ (("PREFIX=/usr")
+ (string-append "PREFIX=" out))
+ (("SYSCONFDIR=/etc")
+ (string-append "SYSCONFDIR=" etc))
+ (("MANDIR=/usr/share/man")
+ (string-append "MANDIR=" man)))
+ #t))))))
+ (inputs
+ `(("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xcb-util" ,xcb-util)
+ ("libxcb" ,libxcb)
+ ("linux-pam" ,linux-pam)
+ ("libev" ,libev)
+ ("libx11" ,libx11)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("libxkbcommon" ,libxkbcommon)
+ ("pkg-config" ,pkg-config)
+ ("which" ,which)))
+ (home-page "https://github.com/chrjguill/i3lock-color")
+ (synopsis "Screenlocker with color configuration support")
+ (description
+ "I3lock-color is a screen locker. It is a re-patched version of
+i3lock, which is a simple screen locker like slock. Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or PNG image to be displayed in the lock screen
+@item many additional color options
+@end enumerate\n")
+ (license license:bsd-3)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.0
[-- Attachment #1.3: 0002-gnu-Add-i3lock-fancy.patch --]
[-- Type: text/plain, Size: 4276 bytes --]
From 49f8940d64ecab73d246d7652ba7358b748d0c2d Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 15:57:13 +0000
Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
* gnu/packages/wm.scm (i3lock-fancy): New variable.
---
gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e4db72a6f..cf861e77e 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -44,6 +44,7 @@
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
@@ -403,6 +404,76 @@ i3lock, which is a simple screen locker like slock. Features include:
@end enumerate\n")
(license license:bsd-3)))
+(define-public i3lock-fancy
+ (package
+ (name "i3lock-fancy")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests included
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (icons (string-append out "/share/i3lock-fancy/icons/"))
+ (i3lock (string-append (assoc-ref inputs "i3lock-color")
+ "/bin/i3lock"))
+ (wmctrl (string-append (assoc-ref inputs "wmctrl")
+ "/bin/wmctrl"))
+ (mconvert (string-append (assoc-ref inputs "imagemagick")
+ "/bin/convert"))
+ (mimport (string-append (assoc-ref inputs "imagemagick")
+ "/bin/import"))
+ (awk (string-append (assoc-ref inputs "gawk")
+ "/bin/gawk")))
+
+ (substitute* "lock"
+ (("if ! i3lock") (string-append "if ! " i3lock))
+ (("i3lock -n") (string-append i3lock " -n"))
+ (("$(which wmctrl)") wmctrl)
+ (("convert") mconvert)
+ (("shot=\\(import") (string-append "shot=\(" mimport))
+ (("awk -F") (string-append awk " -F"))
+ ((" awk") awk)
+ (("\\$scriptpath/icons/") icons))
+ #t)))
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (icons (string-append out "/share/i3lock-fancy/icons/")))
+
+ (install-file "lock" bin)
+ (rename-file (string-append bin "/lock")
+ (string-append bin "/i3lock-fancy"))
+ (copy-recursively "icons" icons)
+ #t))))))
+ (native-inputs
+ `(("imagemagick" ,imagemagick)
+ ("i3lock-color" ,i3lock-color)
+ ("wmctrl" ,wmctrl)
+ ("gawk" ,gawk)))
+ (home-page "https://github.com/meskarune/i3lock-fancy")
+ (synopsis "Screenlocker with screenshot function")
+ (description
+ "@code{i3lock-fancy} is a Bash script that takes a screenshot of
+the desktop, blurs the background and adds a lock icon and text.
+It makes use of @code{i3lock-color} and can optionally be passed any
+screenshot util like @code{scrot}. This screenlocker can be used with
+any window manager or desktop environment.")
+ (license license:expat)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 20:17 ` ng0
@ 2017-11-17 20:57 ` ng0
2017-11-17 21:02 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-11-17 20:57 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 23260 bytes --]
ng0 transcribed 22K bytes:
> New version appended. i3lock-fancy needs some fixes, but I can confirm
> that i3lock-color works!
in i3lock-fancy script:
# try to use a forked version of i3lock with prepared parameters
if ! /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock "${param_add[@]}" "${param[@]}" -i "$image" > /dev/null 2>&1; then
# We have failed, lets get back to stock one
i3lock "${param_add[@]}" -i "$image"
fi
Would /run/current-system/profile/bin/i3lock-fancy be better?
The most realistic scenario I see is to just set 'i3lock' and
propagate i3lock-color with i3lock-fancy.
> ng0 transcribed 12K bytes:
> > Hi Chris,
> >
> > thanks for your input. I think I was just stuck by too many
> > repetive attempts. Thanks for a fresh view :)
> > I'll send applied changes as soon as I can (probably next week).
> >
> > Chris Marusich transcribed 11K bytes:
> > > <ng0@pragmatique.xyz> writes:
> > >
> > > > I have no idea about the error of i3lock-fancy (password is not
> > > > accepted). An commented phase in i3lock-color is still included where
> > > > I tried to fix this, but I don't know much about PAM at this point.
> > >
> > > When I checked using "guix system vm", the reason i3lock refused to
> > > accept the password was because it could not read /etc/shadow. One
> > > solution to this problem is to do both of the following:
> > >
> > > 1) Do not wrap i3lock in a wrapper script.
> > >
> > > 2) Install the i3lock executable as setuid-root.
> >
> > Oh, 2 was what I was thinking of that might fix
> > it. I just had no time to test it.
> >
> > > When installing i3lock as a setuid-root program, it is important not to
> > > wrap it in a script. It is common in UNIX-like systems to ignore the
> > > setuid bit when the program is an interpreted script instead of an
> > > executable (a simple Internet search for a phrase like "setuid bash
> > > script" will provide lots of supporting information about this). If you
> > > do (2) without also removing the wrapping logic that you put into the
> > > package definition, you will find that i3lock still rejects your
> > > password - this is because it still can't read /etc/shadow.
> > >
> > > The attached patch is a revised version of your first patch to add
> > > i3lock-color. I have basically just removed the wrapping phase. To
> > > install it setuid-root along with an appropriate PAM configuration file,
> > > just add a screen-locker service like the following to your services in
> > > your operating system declaration:
> > >
> > > (screen-locker-service i3lock-color "i3lock")
> > >
> > > Note that this will create an appropriate PAM configuration file at
> > > /etc/pam.d/i3lock, so you don't need to bother messing around with the
> > > PAM configuration file that comes with i3lock-color.
> > >
> > > I haven't looked at the fancy version yet. I'll check it out when I get
> > > a little more time.
> >
> > The fancy version is basically a fork with some more fancy visual elements.
> > It should be similar.
> >
> > > > + %D%/packages/patches/hypre-doc-tables.patch \
> > > > + %D%/packages/patches/hypre-ldflags.patch \
> > >
> > > Did you intend to include these in the patch? They aren't used, so I've
> > > removed them in my version of the patch.
> >
> > Many weeks ago, I don't know what happened there.
> > Maybe a mistake in rebase.
> >
> > > > +---
> > > > + Makefile | 7 +------
> > > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > > +
> > > > +diff --git a/Makefile b/Makefile
> > > > +index c0fe888..b4b6cd9 100644
> > > > +--- a/Makefile
> > > > ++++ b/Makefile
> > > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > > + PKG_CONFIG=pkg-config
> > > > + MANDIR=/usr/share/man
> > > > +
> > > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > > +-$(error "$(PKG_CONFIG) was not found")
> > > > +-endif
> > > > +-
> > > > + CFLAGS += -std=c99
> > > > + CFLAGS += -pipe
> > > > + CFLAGS += -Wall
> > > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > > + SIMD_CFLAGS += -funroll-loops
> > > > + SIMD_CFLAGS += -msse2
> > > > + CPPFLAGS += -D_GNU_SOURCE
> > > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > + LIBS += -lpam
> > > > +--
> > > > +2.13.0
> > >
> > > FYI, it looks like maybe we could probably remove this patch file
> > > entirely, and just use substitute* to modify the Makefile, if we
> > > provided the "which" program as an input. Specifically, if the which
> > > program were present, then probably the check you removed would
> > > succeed. I haven't tried it myself, though.
> >
> > Okay, I will give it a try.
> >
> > > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> > > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
> > >
> > > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> > > multiple other files, too.
> >
> > Yes. I'm only changing addresses once I touch the file. So old
> > addresses might be in there for a long time. Otoh, I will
> > prepare a patch and change all my header addresses.
> >
> > > > + (description
> > > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > > +i3lock, which is a simple screen locker like slock. Features include:
> > > > +
> > > > +@enumerate
> > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > > +@item specify background color or PNG image to be displayed in the lock screen
> > > > +@item many additional color options
> > > > +@end enumerate\n")
> > >
> > > I'm not sure if the trailing newline is necessary. Unless you beat me
> > > to it, I'll check on this detail the next time I return to this thread.
> >
> > I've seen this multiple times before and have just followed this style.
> >
> > > --
> > > Chris
> >
> > > From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
> > > From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > Date: Fri, 17 Nov 2017 01:38:14 -0800
> > > Subject: [PATCH] gnu: Add i3lock-color.
> > >
> > > * gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
> > > * gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
> > > * gnu/packages/wm.scm: Add i3lock-color.
> > >
> > > Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> > > ---
> > > gnu/local.mk | 1 +
> > > .../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
> > > gnu/packages/wm.scm | 66 ++++++++++++++++++++++
> > > 3 files changed, 105 insertions(+)
> > > create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
> > >
> > > diff --git a/gnu/local.mk b/gnu/local.mk
> > > index 61bebe662..575d88506 100644
> > > --- a/gnu/local.mk
> > > +++ b/gnu/local.mk
> > > @@ -738,6 +738,7 @@ dist_patch_DATA = \
> > > %D%/packages/patches/hubbub-sort-entities.patch \
> > > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > > %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
> > > %D%/packages/patches/icu4c-CVE-2017-14952.patch \
> > > diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > new file mode 100644
> > > index 000000000..8243dc548
> > > --- /dev/null
> > > +++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > @@ -0,0 +1,38 @@
> > > +From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
> > > +From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > +Date: Mon, 22 May 2017 18:22:19 +0000
> > > +Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
> > > + build on Guix.
> > > +
> > > +---
> > > + Makefile | 7 +------
> > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > +
> > > +diff --git a/Makefile b/Makefile
> > > +index c0fe888..b4b6cd9 100644
> > > +--- a/Makefile
> > > ++++ b/Makefile
> > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > + PKG_CONFIG=pkg-config
> > > + MANDIR=/usr/share/man
> > > +
> > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > +-$(error "$(PKG_CONFIG) was not found")
> > > +-endif
> > > +-
> > > + CFLAGS += -std=c99
> > > + CFLAGS += -pipe
> > > + CFLAGS += -Wall
> > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > + SIMD_CFLAGS += -funroll-loops
> > > + SIMD_CFLAGS += -msse2
> > > + CPPFLAGS += -D_GNU_SOURCE
> > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > + LIBS += -lpam
> > > +--
> > > +2.13.0
> > > +
> > > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > > index 09c10eaa0..3d5a0ef7a 100644
> > > --- a/gnu/packages/wm.scm
> > > +++ b/gnu/packages/wm.scm
> > > @@ -66,6 +66,7 @@
> > > #:use-module (gnu packages gperf)
> > > #:use-module (gnu packages imagemagick)
> > > #:use-module (gnu packages lua)
> > > + #:use-module (gnu packages linux)
> > > #:use-module (gnu packages suckless)
> > > #:use-module (guix download)
> > > #:use-module (guix git-download))
> > > @@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
> > > prompt.")
> > > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> > >
> > > +;; The last release is from 2015, use the git commit.
> > > +(define-public i3lock-color
> > > + (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
> > > + (revision "1"))
> > > + (package
> > > + (name "i3lock-color")
> > > + (version (string-append "2.8-" revision "." (string-take commit 7)))
> > > + (source
> > > + (origin
> > > + (method git-fetch)
> > > + (uri (git-reference
> > > + (url "https://github.com/chrjguill/i3lock-color")
> > > + (commit commit)))
> > > + (file-name (string-append name "-" version "-checkout"))
> > > + (snippet
> > > + ;; The Makefile is read-only, we are going to patch it.
> > > + '(chmod "Makefile" #o755))
> > > + (patches (search-patches "i3lock-color-fix-makefile.patch"))
> > > + (sha256
> > > + (base32
> > > + "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
> > > + (build-system gnu-build-system)
> > > + (arguments
> > > + `(#:tests? #f ; No tests included.
> > > + #:make-flags (list "CC=gcc")
> > > + #:phases
> > > + (modify-phases %standard-phases
> > > + (replace 'configure
> > > + (lambda* (#:key outputs #:allow-other-keys)
> > > + (let* ((out (assoc-ref outputs "out"))
> > > + (man (string-append out "/share/man"))
> > > + (etc (string-append out "/etc")))
> > > + (substitute* "Makefile"
> > > + (("PREFIX=/usr")
> > > + (string-append "PREFIX=" out))
> > > + (("SYSCONFDIR=/etc")
> > > + (string-append "SYSCONFDIR=" etc))
> > > + (("MANDIR=/usr/share/man")
> > > + (string-append "MANDIR=" man)))
> > > + #t))))))
> > > + (inputs
> > > + `(("xcb-util-image" ,xcb-util-image)
> > > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > > + ("xcb-util" ,xcb-util)
> > > + ("libxcb" ,libxcb)
> > > + ("linux-pam" ,linux-pam)
> > > + ("libev" ,libev)
> > > + ("libx11" ,libx11)
> > > + ("cairo" ,cairo)))
> > > + (native-inputs
> > > + `(("libxkbcommon" ,libxkbcommon)
> > > + ("pkg-config" ,pkg-config)))
> > > + (home-page "https://github.com/chrjguill/i3lock-color")
> > > + (synopsis "Screenlocker with color configuration support")
> > > + (description
> > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > +i3lock, which is a simple screen locker like slock. Features include:
> > > +
> > > +@enumerate
> > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > +@item specify background color or PNG image to be displayed in the lock screen
> > > +@item many additional color options
> > > +@end enumerate\n")
> > > + (license license:bsd-3))))
> > > +
> > > (define-public xmonad
> > > (package
> > > (name "xmonad")
> > > --
> > > 2.14.2
> > >
> >
> >
> >
> >
> > --
> > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > GnuPG: https://dl.n0.is/dist/keys/
> > WWW: https://we.make.ritual.n0.is
>
>
>
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://dl.n0.is/dist/keys/
> WWW: https://we.make.ritual.n0.is
> From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 13:03:42 +0000
> Subject: [PATCH 1/2] gnu: Add i3lock-color.
>
> * gnu/packages/wm.scm (i3lock-color): New variable.
> ---
> gnu/local.mk | 1 +
> gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 69 insertions(+)
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 54d1ac91c..2ec5844dc 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -744,6 +744,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hubbub-sort-entities.patch \
> %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> %D%/packages/patches/hydra-disable-darcs-test.patch \
> + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> %D%/packages/patches/icecat-bug-1415133.patch \
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 62a5b5460..e4db72a6f 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -68,6 +68,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages linux)
> #:use-module (gnu packages suckless)
> #:use-module (guix download)
> #:use-module (guix git-download))
> @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> prompt.")
> (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
>
> +(define-public i3lock-color
> + (package
> + (name "i3lock-color")
> + (version "2.9.1-c")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> + "archive/" version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; No tests included.
> + #:make-flags (list "CC=gcc")
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key outputs inputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (etc (string-append out "/etc"))
> + (man (string-append out "/share/man"))
> + (xkb (assoc-ref inputs "libxkbcommon"))
> + (xkbheader (string-append xkb
> + "/include/xkbcommon/"
> + "xkbcommon-compose.h")))
> + (substitute* "Makefile"
> + (("PKG_CONFIG=pkg-config")
> + (string-append "PKG_CONFIG="
> + (which "pkg-config")))
> + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> + xkbheader)
> + (("PREFIX=/usr")
> + (string-append "PREFIX=" out))
> + (("SYSCONFDIR=/etc")
> + (string-append "SYSCONFDIR=" etc))
> + (("MANDIR=/usr/share/man")
> + (string-append "MANDIR=" man)))
> + #t))))))
> + (inputs
> + `(("xcb-util-image" ,xcb-util-image)
> + ("xcb-util-keysyms" ,xcb-util-keysyms)
> + ("xcb-util" ,xcb-util)
> + ("libxcb" ,libxcb)
> + ("linux-pam" ,linux-pam)
> + ("libev" ,libev)
> + ("libx11" ,libx11)
> + ("cairo" ,cairo)))
> + (native-inputs
> + `(("libxkbcommon" ,libxkbcommon)
> + ("pkg-config" ,pkg-config)
> + ("which" ,which)))
> + (home-page "https://github.com/chrjguill/i3lock-color")
> + (synopsis "Screenlocker with color configuration support")
> + (description
> + "I3lock-color is a screen locker. It is a re-patched version of
> +i3lock, which is a simple screen locker like slock. Features include:
> +
> +@enumerate
> +@item forking process, the locked screen is preserved when you suspend from RAM
> +@item specify background color or PNG image to be displayed in the lock screen
> +@item many additional color options
> +@end enumerate\n")
> + (license license:bsd-3)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.0
>
> From 49f8940d64ecab73d246d7652ba7358b748d0c2d Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 15:57:13 +0000
> Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
>
> * gnu/packages/wm.scm (i3lock-fancy): New variable.
> ---
> gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 71 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index e4db72a6f..cf861e77e 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -44,6 +44,7 @@
> #:use-module (gnu packages haskell)
> #:use-module (gnu packages haskell-check)
> #:use-module (gnu packages haskell-web)
> + #:use-module (gnu packages gawk)
> #:use-module (gnu packages base)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages perl)
> @@ -403,6 +404,76 @@ i3lock, which is a simple screen locker like slock. Features include:
> @end enumerate\n")
> (license license:bsd-3)))
>
> +(define-public i3lock-fancy
> + (package
> + (name "i3lock-fancy")
> + (version "0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
> + version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;No tests included
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (icons (string-append out "/share/i3lock-fancy/icons/"))
> + (i3lock (string-append (assoc-ref inputs "i3lock-color")
> + "/bin/i3lock"))
> + (wmctrl (string-append (assoc-ref inputs "wmctrl")
> + "/bin/wmctrl"))
> + (mconvert (string-append (assoc-ref inputs "imagemagick")
> + "/bin/convert"))
> + (mimport (string-append (assoc-ref inputs "imagemagick")
> + "/bin/import"))
> + (awk (string-append (assoc-ref inputs "gawk")
> + "/bin/gawk")))
> +
> + (substitute* "lock"
> + (("if ! i3lock") (string-append "if ! " i3lock))
> + (("i3lock -n") (string-append i3lock " -n"))
> + (("$(which wmctrl)") wmctrl)
> + (("convert") mconvert)
> + (("shot=\\(import") (string-append "shot=\(" mimport))
> + (("awk -F") (string-append awk " -F"))
> + ((" awk") awk)
> + (("\\$scriptpath/icons/") icons))
> + #t)))
> + (delete 'build)
> + (replace 'install
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (icons (string-append out "/share/i3lock-fancy/icons/")))
> +
> + (install-file "lock" bin)
> + (rename-file (string-append bin "/lock")
> + (string-append bin "/i3lock-fancy"))
> + (copy-recursively "icons" icons)
> + #t))))))
> + (native-inputs
> + `(("imagemagick" ,imagemagick)
> + ("i3lock-color" ,i3lock-color)
> + ("wmctrl" ,wmctrl)
> + ("gawk" ,gawk)))
> + (home-page "https://github.com/meskarune/i3lock-fancy")
> + (synopsis "Screenlocker with screenshot function")
> + (description
> + "@code{i3lock-fancy} is a Bash script that takes a screenshot of
> +the desktop, blurs the background and adds a lock icon and text.
> +It makes use of @code{i3lock-color} and can optionally be passed any
> +screenshot util like @code{scrot}. This screenlocker can be used with
> +any window manager or desktop environment.")
> + (license license:expat)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.0
>
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 20:57 ` ng0
@ 2017-11-17 21:02 ` ng0
2017-11-17 21:19 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-11-17 21:02 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 24873 bytes --]
ng0 transcribed 23K bytes:
> ng0 transcribed 22K bytes:
> > New version appended. i3lock-fancy needs some fixes, but I can confirm
> > that i3lock-color works!
>
> in i3lock-fancy script:
>
> # try to use a forked version of i3lock with prepared parameters
> if ! /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock "${param_add[@]}" "${param[@]}" -i "$image" > /dev/null 2>&1; then
> # We have failed, lets get back to stock one
> i3lock "${param_add[@]}" -i "$image"
> fi
>
>
> Would /run/current-system/profile/bin/i3lock-fancy be better?
> The most realistic scenario I see is to just set 'i3lock' and
> propagate i3lock-color with i3lock-fancy.
I have just copied /run/current-system/profile/bin/i3lock-fancy to $HOME/i3lock-fancy
and changed the /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock
bit to read just "i3lock". This way i3lock-fancy works for me.
There's a general 'lag' in both i3lock-color and i3lock-fancy, but
I blame my Desktop.
I'll send an update soon.
> > ng0 transcribed 12K bytes:
> > > Hi Chris,
> > >
> > > thanks for your input. I think I was just stuck by too many
> > > repetive attempts. Thanks for a fresh view :)
> > > I'll send applied changes as soon as I can (probably next week).
> > >
> > > Chris Marusich transcribed 11K bytes:
> > > > <ng0@pragmatique.xyz> writes:
> > > >
> > > > > I have no idea about the error of i3lock-fancy (password is not
> > > > > accepted). An commented phase in i3lock-color is still included where
> > > > > I tried to fix this, but I don't know much about PAM at this point.
> > > >
> > > > When I checked using "guix system vm", the reason i3lock refused to
> > > > accept the password was because it could not read /etc/shadow. One
> > > > solution to this problem is to do both of the following:
> > > >
> > > > 1) Do not wrap i3lock in a wrapper script.
> > > >
> > > > 2) Install the i3lock executable as setuid-root.
> > >
> > > Oh, 2 was what I was thinking of that might fix
> > > it. I just had no time to test it.
> > >
> > > > When installing i3lock as a setuid-root program, it is important not to
> > > > wrap it in a script. It is common in UNIX-like systems to ignore the
> > > > setuid bit when the program is an interpreted script instead of an
> > > > executable (a simple Internet search for a phrase like "setuid bash
> > > > script" will provide lots of supporting information about this). If you
> > > > do (2) without also removing the wrapping logic that you put into the
> > > > package definition, you will find that i3lock still rejects your
> > > > password - this is because it still can't read /etc/shadow.
> > > >
> > > > The attached patch is a revised version of your first patch to add
> > > > i3lock-color. I have basically just removed the wrapping phase. To
> > > > install it setuid-root along with an appropriate PAM configuration file,
> > > > just add a screen-locker service like the following to your services in
> > > > your operating system declaration:
> > > >
> > > > (screen-locker-service i3lock-color "i3lock")
> > > >
> > > > Note that this will create an appropriate PAM configuration file at
> > > > /etc/pam.d/i3lock, so you don't need to bother messing around with the
> > > > PAM configuration file that comes with i3lock-color.
> > > >
> > > > I haven't looked at the fancy version yet. I'll check it out when I get
> > > > a little more time.
> > >
> > > The fancy version is basically a fork with some more fancy visual elements.
> > > It should be similar.
> > >
> > > > > + %D%/packages/patches/hypre-doc-tables.patch \
> > > > > + %D%/packages/patches/hypre-ldflags.patch \
> > > >
> > > > Did you intend to include these in the patch? They aren't used, so I've
> > > > removed them in my version of the patch.
> > >
> > > Many weeks ago, I don't know what happened there.
> > > Maybe a mistake in rebase.
> > >
> > > > > +---
> > > > > + Makefile | 7 +------
> > > > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > > > +
> > > > > +diff --git a/Makefile b/Makefile
> > > > > +index c0fe888..b4b6cd9 100644
> > > > > +--- a/Makefile
> > > > > ++++ b/Makefile
> > > > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > > > + PKG_CONFIG=pkg-config
> > > > > + MANDIR=/usr/share/man
> > > > > +
> > > > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > > > +-$(error "$(PKG_CONFIG) was not found")
> > > > > +-endif
> > > > > +-
> > > > > + CFLAGS += -std=c99
> > > > > + CFLAGS += -pipe
> > > > > + CFLAGS += -Wall
> > > > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > > > + SIMD_CFLAGS += -funroll-loops
> > > > > + SIMD_CFLAGS += -msse2
> > > > > + CPPFLAGS += -D_GNU_SOURCE
> > > > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > + LIBS += -lpam
> > > > > +--
> > > > > +2.13.0
> > > >
> > > > FYI, it looks like maybe we could probably remove this patch file
> > > > entirely, and just use substitute* to modify the Makefile, if we
> > > > provided the "which" program as an input. Specifically, if the which
> > > > program were present, then probably the check you removed would
> > > > succeed. I haven't tried it myself, though.
> > >
> > > Okay, I will give it a try.
> > >
> > > > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> > > > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
> > > >
> > > > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> > > > multiple other files, too.
> > >
> > > Yes. I'm only changing addresses once I touch the file. So old
> > > addresses might be in there for a long time. Otoh, I will
> > > prepare a patch and change all my header addresses.
> > >
> > > > > + (description
> > > > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > > > +i3lock, which is a simple screen locker like slock. Features include:
> > > > > +
> > > > > +@enumerate
> > > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > > > +@item specify background color or PNG image to be displayed in the lock screen
> > > > > +@item many additional color options
> > > > > +@end enumerate\n")
> > > >
> > > > I'm not sure if the trailing newline is necessary. Unless you beat me
> > > > to it, I'll check on this detail the next time I return to this thread.
> > >
> > > I've seen this multiple times before and have just followed this style.
> > >
> > > > --
> > > > Chris
> > >
> > > > From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
> > > > From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > > Date: Fri, 17 Nov 2017 01:38:14 -0800
> > > > Subject: [PATCH] gnu: Add i3lock-color.
> > > >
> > > > * gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
> > > > * gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
> > > > * gnu/packages/wm.scm: Add i3lock-color.
> > > >
> > > > Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> > > > ---
> > > > gnu/local.mk | 1 +
> > > > .../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
> > > > gnu/packages/wm.scm | 66 ++++++++++++++++++++++
> > > > 3 files changed, 105 insertions(+)
> > > > create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > >
> > > > diff --git a/gnu/local.mk b/gnu/local.mk
> > > > index 61bebe662..575d88506 100644
> > > > --- a/gnu/local.mk
> > > > +++ b/gnu/local.mk
> > > > @@ -738,6 +738,7 @@ dist_patch_DATA = \
> > > > %D%/packages/patches/hubbub-sort-entities.patch \
> > > > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > > > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > > > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > > > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > > > %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
> > > > %D%/packages/patches/icu4c-CVE-2017-14952.patch \
> > > > diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > > new file mode 100644
> > > > index 000000000..8243dc548
> > > > --- /dev/null
> > > > +++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > > @@ -0,0 +1,38 @@
> > > > +From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
> > > > +From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > > +Date: Mon, 22 May 2017 18:22:19 +0000
> > > > +Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
> > > > + build on Guix.
> > > > +
> > > > +---
> > > > + Makefile | 7 +------
> > > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > > +
> > > > +diff --git a/Makefile b/Makefile
> > > > +index c0fe888..b4b6cd9 100644
> > > > +--- a/Makefile
> > > > ++++ b/Makefile
> > > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > > + PKG_CONFIG=pkg-config
> > > > + MANDIR=/usr/share/man
> > > > +
> > > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > > +-$(error "$(PKG_CONFIG) was not found")
> > > > +-endif
> > > > +-
> > > > + CFLAGS += -std=c99
> > > > + CFLAGS += -pipe
> > > > + CFLAGS += -Wall
> > > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > > + SIMD_CFLAGS += -funroll-loops
> > > > + SIMD_CFLAGS += -msse2
> > > > + CPPFLAGS += -D_GNU_SOURCE
> > > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > + LIBS += -lpam
> > > > +--
> > > > +2.13.0
> > > > +
> > > > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > > > index 09c10eaa0..3d5a0ef7a 100644
> > > > --- a/gnu/packages/wm.scm
> > > > +++ b/gnu/packages/wm.scm
> > > > @@ -66,6 +66,7 @@
> > > > #:use-module (gnu packages gperf)
> > > > #:use-module (gnu packages imagemagick)
> > > > #:use-module (gnu packages lua)
> > > > + #:use-module (gnu packages linux)
> > > > #:use-module (gnu packages suckless)
> > > > #:use-module (guix download)
> > > > #:use-module (guix git-download))
> > > > @@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
> > > > prompt.")
> > > > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> > > >
> > > > +;; The last release is from 2015, use the git commit.
> > > > +(define-public i3lock-color
> > > > + (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
> > > > + (revision "1"))
> > > > + (package
> > > > + (name "i3lock-color")
> > > > + (version (string-append "2.8-" revision "." (string-take commit 7)))
> > > > + (source
> > > > + (origin
> > > > + (method git-fetch)
> > > > + (uri (git-reference
> > > > + (url "https://github.com/chrjguill/i3lock-color")
> > > > + (commit commit)))
> > > > + (file-name (string-append name "-" version "-checkout"))
> > > > + (snippet
> > > > + ;; The Makefile is read-only, we are going to patch it.
> > > > + '(chmod "Makefile" #o755))
> > > > + (patches (search-patches "i3lock-color-fix-makefile.patch"))
> > > > + (sha256
> > > > + (base32
> > > > + "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
> > > > + (build-system gnu-build-system)
> > > > + (arguments
> > > > + `(#:tests? #f ; No tests included.
> > > > + #:make-flags (list "CC=gcc")
> > > > + #:phases
> > > > + (modify-phases %standard-phases
> > > > + (replace 'configure
> > > > + (lambda* (#:key outputs #:allow-other-keys)
> > > > + (let* ((out (assoc-ref outputs "out"))
> > > > + (man (string-append out "/share/man"))
> > > > + (etc (string-append out "/etc")))
> > > > + (substitute* "Makefile"
> > > > + (("PREFIX=/usr")
> > > > + (string-append "PREFIX=" out))
> > > > + (("SYSCONFDIR=/etc")
> > > > + (string-append "SYSCONFDIR=" etc))
> > > > + (("MANDIR=/usr/share/man")
> > > > + (string-append "MANDIR=" man)))
> > > > + #t))))))
> > > > + (inputs
> > > > + `(("xcb-util-image" ,xcb-util-image)
> > > > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > > > + ("xcb-util" ,xcb-util)
> > > > + ("libxcb" ,libxcb)
> > > > + ("linux-pam" ,linux-pam)
> > > > + ("libev" ,libev)
> > > > + ("libx11" ,libx11)
> > > > + ("cairo" ,cairo)))
> > > > + (native-inputs
> > > > + `(("libxkbcommon" ,libxkbcommon)
> > > > + ("pkg-config" ,pkg-config)))
> > > > + (home-page "https://github.com/chrjguill/i3lock-color")
> > > > + (synopsis "Screenlocker with color configuration support")
> > > > + (description
> > > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > > +i3lock, which is a simple screen locker like slock. Features include:
> > > > +
> > > > +@enumerate
> > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > > +@item specify background color or PNG image to be displayed in the lock screen
> > > > +@item many additional color options
> > > > +@end enumerate\n")
> > > > + (license license:bsd-3))))
> > > > +
> > > > (define-public xmonad
> > > > (package
> > > > (name "xmonad")
> > > > --
> > > > 2.14.2
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > > GnuPG: https://dl.n0.is/dist/keys/
> > > WWW: https://we.make.ritual.n0.is
> >
> >
> >
> > --
> > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > GnuPG: https://dl.n0.is/dist/keys/
> > WWW: https://we.make.ritual.n0.is
>
> > From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
> > From: ng0 <contact.ng0@cryptolab.net>
> > Date: Tue, 24 Jan 2017 13:03:42 +0000
> > Subject: [PATCH 1/2] gnu: Add i3lock-color.
> >
> > * gnu/packages/wm.scm (i3lock-color): New variable.
> > ---
> > gnu/local.mk | 1 +
> > gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 69 insertions(+)
> >
> > diff --git a/gnu/local.mk b/gnu/local.mk
> > index 54d1ac91c..2ec5844dc 100644
> > --- a/gnu/local.mk
> > +++ b/gnu/local.mk
> > @@ -744,6 +744,7 @@ dist_patch_DATA = \
> > %D%/packages/patches/hubbub-sort-entities.patch \
> > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> > %D%/packages/patches/icecat-bug-1415133.patch \
> > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > index 62a5b5460..e4db72a6f 100644
> > --- a/gnu/packages/wm.scm
> > +++ b/gnu/packages/wm.scm
> > @@ -68,6 +68,7 @@
> > #:use-module (gnu packages gperf)
> > #:use-module (gnu packages imagemagick)
> > #:use-module (gnu packages lua)
> > + #:use-module (gnu packages linux)
> > #:use-module (gnu packages suckless)
> > #:use-module (guix download)
> > #:use-module (guix git-download))
> > @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> > prompt.")
> > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> >
> > +(define-public i3lock-color
> > + (package
> > + (name "i3lock-color")
> > + (version "2.9.1-c")
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> > + "archive/" version ".tar.gz"))
> > + (file-name (string-append name "-" version ".tar.gz"))
> > + (sha256
> > + (base32
> > + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> > + (build-system gnu-build-system)
> > + (arguments
> > + `(#:tests? #f ; No tests included.
> > + #:make-flags (list "CC=gcc")
> > + #:phases
> > + (modify-phases %standard-phases
> > + (replace 'configure
> > + (lambda* (#:key outputs inputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (etc (string-append out "/etc"))
> > + (man (string-append out "/share/man"))
> > + (xkb (assoc-ref inputs "libxkbcommon"))
> > + (xkbheader (string-append xkb
> > + "/include/xkbcommon/"
> > + "xkbcommon-compose.h")))
> > + (substitute* "Makefile"
> > + (("PKG_CONFIG=pkg-config")
> > + (string-append "PKG_CONFIG="
> > + (which "pkg-config")))
> > + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> > + xkbheader)
> > + (("PREFIX=/usr")
> > + (string-append "PREFIX=" out))
> > + (("SYSCONFDIR=/etc")
> > + (string-append "SYSCONFDIR=" etc))
> > + (("MANDIR=/usr/share/man")
> > + (string-append "MANDIR=" man)))
> > + #t))))))
> > + (inputs
> > + `(("xcb-util-image" ,xcb-util-image)
> > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > + ("xcb-util" ,xcb-util)
> > + ("libxcb" ,libxcb)
> > + ("linux-pam" ,linux-pam)
> > + ("libev" ,libev)
> > + ("libx11" ,libx11)
> > + ("cairo" ,cairo)))
> > + (native-inputs
> > + `(("libxkbcommon" ,libxkbcommon)
> > + ("pkg-config" ,pkg-config)
> > + ("which" ,which)))
> > + (home-page "https://github.com/chrjguill/i3lock-color")
> > + (synopsis "Screenlocker with color configuration support")
> > + (description
> > + "I3lock-color is a screen locker. It is a re-patched version of
> > +i3lock, which is a simple screen locker like slock. Features include:
> > +
> > +@enumerate
> > +@item forking process, the locked screen is preserved when you suspend from RAM
> > +@item specify background color or PNG image to be displayed in the lock screen
> > +@item many additional color options
> > +@end enumerate\n")
> > + (license license:bsd-3)))
> > +
> > (define-public xmonad
> > (package
> > (name "xmonad")
> > --
> > 2.15.0
> >
>
> > From 49f8940d64ecab73d246d7652ba7358b748d0c2d Mon Sep 17 00:00:00 2001
> > From: ng0 <contact.ng0@cryptolab.net>
> > Date: Tue, 24 Jan 2017 15:57:13 +0000
> > Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
> >
> > * gnu/packages/wm.scm (i3lock-fancy): New variable.
> > ---
> > gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 71 insertions(+)
> >
> > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > index e4db72a6f..cf861e77e 100644
> > --- a/gnu/packages/wm.scm
> > +++ b/gnu/packages/wm.scm
> > @@ -44,6 +44,7 @@
> > #:use-module (gnu packages haskell)
> > #:use-module (gnu packages haskell-check)
> > #:use-module (gnu packages haskell-web)
> > + #:use-module (gnu packages gawk)
> > #:use-module (gnu packages base)
> > #:use-module (gnu packages pkg-config)
> > #:use-module (gnu packages perl)
> > @@ -403,6 +404,76 @@ i3lock, which is a simple screen locker like slock. Features include:
> > @end enumerate\n")
> > (license license:bsd-3)))
> >
> > +(define-public i3lock-fancy
> > + (package
> > + (name "i3lock-fancy")
> > + (version "0.2")
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
> > + version ".tar.gz"))
> > + (file-name (string-append name "-" version ".tar.gz"))
> > + (sha256
> > + (base32
> > + "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
> > + (build-system gnu-build-system)
> > + (arguments
> > + `(#:tests? #f ;No tests included
> > + #:phases
> > + (modify-phases %standard-phases
> > + (replace 'configure
> > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (icons (string-append out "/share/i3lock-fancy/icons/"))
> > + (i3lock (string-append (assoc-ref inputs "i3lock-color")
> > + "/bin/i3lock"))
> > + (wmctrl (string-append (assoc-ref inputs "wmctrl")
> > + "/bin/wmctrl"))
> > + (mconvert (string-append (assoc-ref inputs "imagemagick")
> > + "/bin/convert"))
> > + (mimport (string-append (assoc-ref inputs "imagemagick")
> > + "/bin/import"))
> > + (awk (string-append (assoc-ref inputs "gawk")
> > + "/bin/gawk")))
> > +
> > + (substitute* "lock"
> > + (("if ! i3lock") (string-append "if ! " i3lock))
> > + (("i3lock -n") (string-append i3lock " -n"))
> > + (("$(which wmctrl)") wmctrl)
> > + (("convert") mconvert)
> > + (("shot=\\(import") (string-append "shot=\(" mimport))
> > + (("awk -F") (string-append awk " -F"))
> > + ((" awk") awk)
> > + (("\\$scriptpath/icons/") icons))
> > + #t)))
> > + (delete 'build)
> > + (replace 'install
> > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (bin (string-append out "/bin"))
> > + (icons (string-append out "/share/i3lock-fancy/icons/")))
> > +
> > + (install-file "lock" bin)
> > + (rename-file (string-append bin "/lock")
> > + (string-append bin "/i3lock-fancy"))
> > + (copy-recursively "icons" icons)
> > + #t))))))
> > + (native-inputs
> > + `(("imagemagick" ,imagemagick)
> > + ("i3lock-color" ,i3lock-color)
> > + ("wmctrl" ,wmctrl)
> > + ("gawk" ,gawk)))
> > + (home-page "https://github.com/meskarune/i3lock-fancy")
> > + (synopsis "Screenlocker with screenshot function")
> > + (description
> > + "@code{i3lock-fancy} is a Bash script that takes a screenshot of
> > +the desktop, blurs the background and adds a lock icon and text.
> > +It makes use of @code{i3lock-color} and can optionally be passed any
> > +screenshot util like @code{scrot}. This screenlocker can be used with
> > +any window manager or desktop environment.")
> > + (license license:expat)))
> > +
> > (define-public xmonad
> > (package
> > (name "xmonad")
> > --
> > 2.15.0
> >
>
>
>
>
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://dl.n0.is/dist/keys/
> WWW: https://we.make.ritual.n0.is
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 21:02 ` ng0
@ 2017-11-17 21:19 ` ng0
2017-11-19 11:04 ` ng0
2017-12-01 7:20 ` Chris Marusich
0 siblings, 2 replies; 15+ messages in thread
From: ng0 @ 2017-11-17 21:19 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1.1: Type: text/plain, Size: 26716 bytes --]
ng0 transcribed 25K bytes:
> ng0 transcribed 23K bytes:
> > ng0 transcribed 22K bytes:
> > > New version appended. i3lock-fancy needs some fixes, but I can confirm
> > > that i3lock-color works!
> >
> > in i3lock-fancy script:
> >
> > # try to use a forked version of i3lock with prepared parameters
> > if ! /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock "${param_add[@]}" "${param[@]}" -i "$image" > /dev/null 2>&1; then
> > # We have failed, lets get back to stock one
> > i3lock "${param_add[@]}" -i "$image"
> > fi
> >
> >
> > Would /run/current-system/profile/bin/i3lock-fancy be better?
> > The most realistic scenario I see is to just set 'i3lock' and
> > propagate i3lock-color with i3lock-fancy.
I've changed my mind. As there's also 'i3lock' (without the -color suffix)
but we don't package it (yet), it would take away the freedom to
decide which i3lock you want to use.
The author of i3lock-fancy wantsus to use i3lock-color, but there's
also a check and it falls back to the normal i3lock.
Therefore I think it must be up to people using i3lock-fancy to
install i3lock-color AND i3lock-fancy in their system profile
(or just i3lock-color in systemprofile + suid it, and i3lock-fancy
in the user profile).
3rd version of patches appended.
> I have just copied /run/current-system/profile/bin/i3lock-fancy to $HOME/i3lock-fancy
> and changed the /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock
> bit to read just "i3lock". This way i3lock-fancy works for me.
> There's a general 'lag' in both i3lock-color and i3lock-fancy, but
> I blame my Desktop.
>
> I'll send an update soon.
>
> > > ng0 transcribed 12K bytes:
> > > > Hi Chris,
> > > >
> > > > thanks for your input. I think I was just stuck by too many
> > > > repetive attempts. Thanks for a fresh view :)
> > > > I'll send applied changes as soon as I can (probably next week).
> > > >
> > > > Chris Marusich transcribed 11K bytes:
> > > > > <ng0@pragmatique.xyz> writes:
> > > > >
> > > > > > I have no idea about the error of i3lock-fancy (password is not
> > > > > > accepted). An commented phase in i3lock-color is still included where
> > > > > > I tried to fix this, but I don't know much about PAM at this point.
> > > > >
> > > > > When I checked using "guix system vm", the reason i3lock refused to
> > > > > accept the password was because it could not read /etc/shadow. One
> > > > > solution to this problem is to do both of the following:
> > > > >
> > > > > 1) Do not wrap i3lock in a wrapper script.
> > > > >
> > > > > 2) Install the i3lock executable as setuid-root.
> > > >
> > > > Oh, 2 was what I was thinking of that might fix
> > > > it. I just had no time to test it.
> > > >
> > > > > When installing i3lock as a setuid-root program, it is important not to
> > > > > wrap it in a script. It is common in UNIX-like systems to ignore the
> > > > > setuid bit when the program is an interpreted script instead of an
> > > > > executable (a simple Internet search for a phrase like "setuid bash
> > > > > script" will provide lots of supporting information about this). If you
> > > > > do (2) without also removing the wrapping logic that you put into the
> > > > > package definition, you will find that i3lock still rejects your
> > > > > password - this is because it still can't read /etc/shadow.
> > > > >
> > > > > The attached patch is a revised version of your first patch to add
> > > > > i3lock-color. I have basically just removed the wrapping phase. To
> > > > > install it setuid-root along with an appropriate PAM configuration file,
> > > > > just add a screen-locker service like the following to your services in
> > > > > your operating system declaration:
> > > > >
> > > > > (screen-locker-service i3lock-color "i3lock")
> > > > >
> > > > > Note that this will create an appropriate PAM configuration file at
> > > > > /etc/pam.d/i3lock, so you don't need to bother messing around with the
> > > > > PAM configuration file that comes with i3lock-color.
> > > > >
> > > > > I haven't looked at the fancy version yet. I'll check it out when I get
> > > > > a little more time.
> > > >
> > > > The fancy version is basically a fork with some more fancy visual elements.
> > > > It should be similar.
> > > >
> > > > > > + %D%/packages/patches/hypre-doc-tables.patch \
> > > > > > + %D%/packages/patches/hypre-ldflags.patch \
> > > > >
> > > > > Did you intend to include these in the patch? They aren't used, so I've
> > > > > removed them in my version of the patch.
> > > >
> > > > Many weeks ago, I don't know what happened there.
> > > > Maybe a mistake in rebase.
> > > >
> > > > > > +---
> > > > > > + Makefile | 7 +------
> > > > > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > > > > +
> > > > > > +diff --git a/Makefile b/Makefile
> > > > > > +index c0fe888..b4b6cd9 100644
> > > > > > +--- a/Makefile
> > > > > > ++++ b/Makefile
> > > > > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > > > > + PKG_CONFIG=pkg-config
> > > > > > + MANDIR=/usr/share/man
> > > > > > +
> > > > > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > > > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > > > > +-$(error "$(PKG_CONFIG) was not found")
> > > > > > +-endif
> > > > > > +-
> > > > > > + CFLAGS += -std=c99
> > > > > > + CFLAGS += -pipe
> > > > > > + CFLAGS += -Wall
> > > > > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > > > > + SIMD_CFLAGS += -funroll-loops
> > > > > > + SIMD_CFLAGS += -msse2
> > > > > > + CPPFLAGS += -D_GNU_SOURCE
> > > > > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > > > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > > > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > > + LIBS += -lpam
> > > > > > +--
> > > > > > +2.13.0
> > > > >
> > > > > FYI, it looks like maybe we could probably remove this patch file
> > > > > entirely, and just use substitute* to modify the Makefile, if we
> > > > > provided the "which" program as an input. Specifically, if the which
> > > > > program were present, then probably the check you removed would
> > > > > succeed. I haven't tried it myself, though.
> > > >
> > > > Okay, I will give it a try.
> > > >
> > > > > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> > > > > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
> > > > >
> > > > > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> > > > > multiple other files, too.
> > > >
> > > > Yes. I'm only changing addresses once I touch the file. So old
> > > > addresses might be in there for a long time. Otoh, I will
> > > > prepare a patch and change all my header addresses.
> > > >
> > > > > > + (description
> > > > > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > > > > +i3lock, which is a simple screen locker like slock. Features include:
> > > > > > +
> > > > > > +@enumerate
> > > > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > > > > +@item specify background color or PNG image to be displayed in the lock screen
> > > > > > +@item many additional color options
> > > > > > +@end enumerate\n")
> > > > >
> > > > > I'm not sure if the trailing newline is necessary. Unless you beat me
> > > > > to it, I'll check on this detail the next time I return to this thread.
> > > >
> > > > I've seen this multiple times before and have just followed this style.
> > > >
> > > > > --
> > > > > Chris
> > > >
> > > > > From 53edb9d43966ec9fbea8292608875d0c894adaea Mon Sep 17 00:00:00 2001
> > > > > From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > > > Date: Fri, 17 Nov 2017 01:38:14 -0800
> > > > > Subject: [PATCH] gnu: Add i3lock-color.
> > > > >
> > > > > * gnu/local.mk (dist_patch_DATA): Add i3lock-color-fix-makefile.patch.
> > > > > * gnu/packages/patches/i3lock-color-fix-makefile.patch: New file.
> > > > > * gnu/packages/wm.scm: Add i3lock-color.
> > > > >
> > > > > Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
> > > > > ---
> > > > > gnu/local.mk | 1 +
> > > > > .../patches/i3lock-color-fix-makefile.patch | 38 +++++++++++++
> > > > > gnu/packages/wm.scm | 66 ++++++++++++++++++++++
> > > > > 3 files changed, 105 insertions(+)
> > > > > create mode 100644 gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > > >
> > > > > diff --git a/gnu/local.mk b/gnu/local.mk
> > > > > index 61bebe662..575d88506 100644
> > > > > --- a/gnu/local.mk
> > > > > +++ b/gnu/local.mk
> > > > > @@ -738,6 +738,7 @@ dist_patch_DATA = \
> > > > > %D%/packages/patches/hubbub-sort-entities.patch \
> > > > > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > > > > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > > > > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > > > > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > > > > %D%/packages/patches/icu4c-CVE-2017-7867-CVE-2017-7868.patch \
> > > > > %D%/packages/patches/icu4c-CVE-2017-14952.patch \
> > > > > diff --git a/gnu/packages/patches/i3lock-color-fix-makefile.patch b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > > > new file mode 100644
> > > > > index 000000000..8243dc548
> > > > > --- /dev/null
> > > > > +++ b/gnu/packages/patches/i3lock-color-fix-makefile.patch
> > > > > @@ -0,0 +1,38 @@
> > > > > +From eaca36ed78bafb82bd51a9e83c6445ef8f1698c8 Mon Sep 17 00:00:00 2001
> > > > > +From: ng0 <ng0@no-reply.pragmatique.xyz>
> > > > > +Date: Mon, 22 May 2017 18:22:19 +0000
> > > > > +Subject: [PATCH] This fix to the Makefile is required to make i3lock-color
> > > > > + build on Guix.
> > > > > +
> > > > > +---
> > > > > + Makefile | 7 +------
> > > > > + 1 file changed, 1 insertion(+), 6 deletions(-)
> > > > > +
> > > > > +diff --git a/Makefile b/Makefile
> > > > > +index c0fe888..b4b6cd9 100644
> > > > > +--- a/Makefile
> > > > > ++++ b/Makefile
> > > > > +@@ -6,11 +6,6 @@ SYSCONFDIR=/etc
> > > > > + PKG_CONFIG=pkg-config
> > > > > + MANDIR=/usr/share/man
> > > > > +
> > > > > +-# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
> > > > > +-ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
> > > > > +-$(error "$(PKG_CONFIG) was not found")
> > > > > +-endif
> > > > > +-
> > > > > + CFLAGS += -std=c99
> > > > > + CFLAGS += -pipe
> > > > > + CFLAGS += -Wall
> > > > > +@@ -18,7 +13,7 @@ CFLAGS += -O2
> > > > > + SIMD_CFLAGS += -funroll-loops
> > > > > + SIMD_CFLAGS += -msse2
> > > > > + CPPFLAGS += -D_GNU_SOURCE
> > > > > +-CPPFLAGS += -DXKBCOMPOSE=$(shell if test -e /usr/include/xkbcommon/xkbcommon-compose.h ; then echo 1 ; else echo 0 ; fi )
> > > > > ++CPPFLAGS += -DXKBCOMPOSE=1
> > > > > + CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > + LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-composite xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
> > > > > + LIBS += -lpam
> > > > > +--
> > > > > +2.13.0
> > > > > +
> > > > > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > > > > index 09c10eaa0..3d5a0ef7a 100644
> > > > > --- a/gnu/packages/wm.scm
> > > > > +++ b/gnu/packages/wm.scm
> > > > > @@ -66,6 +66,7 @@
> > > > > #:use-module (gnu packages gperf)
> > > > > #:use-module (gnu packages imagemagick)
> > > > > #:use-module (gnu packages lua)
> > > > > + #:use-module (gnu packages linux)
> > > > > #:use-module (gnu packages suckless)
> > > > > #:use-module (guix download)
> > > > > #:use-module (guix git-download))
> > > > > @@ -333,6 +334,71 @@ and locate windows on all your workspaces, using an interactive dmenu
> > > > > prompt.")
> > > > > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> > > > >
> > > > > +;; The last release is from 2015, use the git commit.
> > > > > +(define-public i3lock-color
> > > > > + (let ((commit "275ff68f6a6b7985c65fbaac537f4c018b47942f")
> > > > > + (revision "1"))
> > > > > + (package
> > > > > + (name "i3lock-color")
> > > > > + (version (string-append "2.8-" revision "." (string-take commit 7)))
> > > > > + (source
> > > > > + (origin
> > > > > + (method git-fetch)
> > > > > + (uri (git-reference
> > > > > + (url "https://github.com/chrjguill/i3lock-color")
> > > > > + (commit commit)))
> > > > > + (file-name (string-append name "-" version "-checkout"))
> > > > > + (snippet
> > > > > + ;; The Makefile is read-only, we are going to patch it.
> > > > > + '(chmod "Makefile" #o755))
> > > > > + (patches (search-patches "i3lock-color-fix-makefile.patch"))
> > > > > + (sha256
> > > > > + (base32
> > > > > + "1qhxqj1gwmf473b4b1bfqxdxiw1y6gq9rf97d77jc9s9z267fjm5"))))
> > > > > + (build-system gnu-build-system)
> > > > > + (arguments
> > > > > + `(#:tests? #f ; No tests included.
> > > > > + #:make-flags (list "CC=gcc")
> > > > > + #:phases
> > > > > + (modify-phases %standard-phases
> > > > > + (replace 'configure
> > > > > + (lambda* (#:key outputs #:allow-other-keys)
> > > > > + (let* ((out (assoc-ref outputs "out"))
> > > > > + (man (string-append out "/share/man"))
> > > > > + (etc (string-append out "/etc")))
> > > > > + (substitute* "Makefile"
> > > > > + (("PREFIX=/usr")
> > > > > + (string-append "PREFIX=" out))
> > > > > + (("SYSCONFDIR=/etc")
> > > > > + (string-append "SYSCONFDIR=" etc))
> > > > > + (("MANDIR=/usr/share/man")
> > > > > + (string-append "MANDIR=" man)))
> > > > > + #t))))))
> > > > > + (inputs
> > > > > + `(("xcb-util-image" ,xcb-util-image)
> > > > > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > > > > + ("xcb-util" ,xcb-util)
> > > > > + ("libxcb" ,libxcb)
> > > > > + ("linux-pam" ,linux-pam)
> > > > > + ("libev" ,libev)
> > > > > + ("libx11" ,libx11)
> > > > > + ("cairo" ,cairo)))
> > > > > + (native-inputs
> > > > > + `(("libxkbcommon" ,libxkbcommon)
> > > > > + ("pkg-config" ,pkg-config)))
> > > > > + (home-page "https://github.com/chrjguill/i3lock-color")
> > > > > + (synopsis "Screenlocker with color configuration support")
> > > > > + (description
> > > > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > > > +i3lock, which is a simple screen locker like slock. Features include:
> > > > > +
> > > > > +@enumerate
> > > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > > > +@item specify background color or PNG image to be displayed in the lock screen
> > > > > +@item many additional color options
> > > > > +@end enumerate\n")
> > > > > + (license license:bsd-3))))
> > > > > +
> > > > > (define-public xmonad
> > > > > (package
> > > > > (name "xmonad")
> > > > > --
> > > > > 2.14.2
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > > > GnuPG: https://dl.n0.is/dist/keys/
> > > > WWW: https://we.make.ritual.n0.is
> > >
> > >
> > >
> > > --
> > > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > > GnuPG: https://dl.n0.is/dist/keys/
> > > WWW: https://we.make.ritual.n0.is
> >
> > > From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
> > > From: ng0 <contact.ng0@cryptolab.net>
> > > Date: Tue, 24 Jan 2017 13:03:42 +0000
> > > Subject: [PATCH 1/2] gnu: Add i3lock-color.
> > >
> > > * gnu/packages/wm.scm (i3lock-color): New variable.
> > > ---
> > > gnu/local.mk | 1 +
> > > gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 69 insertions(+)
> > >
> > > diff --git a/gnu/local.mk b/gnu/local.mk
> > > index 54d1ac91c..2ec5844dc 100644
> > > --- a/gnu/local.mk
> > > +++ b/gnu/local.mk
> > > @@ -744,6 +744,7 @@ dist_patch_DATA = \
> > > %D%/packages/patches/hubbub-sort-entities.patch \
> > > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > > %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> > > %D%/packages/patches/icecat-bug-1415133.patch \
> > > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > > index 62a5b5460..e4db72a6f 100644
> > > --- a/gnu/packages/wm.scm
> > > +++ b/gnu/packages/wm.scm
> > > @@ -68,6 +68,7 @@
> > > #:use-module (gnu packages gperf)
> > > #:use-module (gnu packages imagemagick)
> > > #:use-module (gnu packages lua)
> > > + #:use-module (gnu packages linux)
> > > #:use-module (gnu packages suckless)
> > > #:use-module (guix download)
> > > #:use-module (guix git-download))
> > > @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> > > prompt.")
> > > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> > >
> > > +(define-public i3lock-color
> > > + (package
> > > + (name "i3lock-color")
> > > + (version "2.9.1-c")
> > > + (source
> > > + (origin
> > > + (method url-fetch)
> > > + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> > > + "archive/" version ".tar.gz"))
> > > + (file-name (string-append name "-" version ".tar.gz"))
> > > + (sha256
> > > + (base32
> > > + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> > > + (build-system gnu-build-system)
> > > + (arguments
> > > + `(#:tests? #f ; No tests included.
> > > + #:make-flags (list "CC=gcc")
> > > + #:phases
> > > + (modify-phases %standard-phases
> > > + (replace 'configure
> > > + (lambda* (#:key outputs inputs #:allow-other-keys)
> > > + (let* ((out (assoc-ref outputs "out"))
> > > + (etc (string-append out "/etc"))
> > > + (man (string-append out "/share/man"))
> > > + (xkb (assoc-ref inputs "libxkbcommon"))
> > > + (xkbheader (string-append xkb
> > > + "/include/xkbcommon/"
> > > + "xkbcommon-compose.h")))
> > > + (substitute* "Makefile"
> > > + (("PKG_CONFIG=pkg-config")
> > > + (string-append "PKG_CONFIG="
> > > + (which "pkg-config")))
> > > + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> > > + xkbheader)
> > > + (("PREFIX=/usr")
> > > + (string-append "PREFIX=" out))
> > > + (("SYSCONFDIR=/etc")
> > > + (string-append "SYSCONFDIR=" etc))
> > > + (("MANDIR=/usr/share/man")
> > > + (string-append "MANDIR=" man)))
> > > + #t))))))
> > > + (inputs
> > > + `(("xcb-util-image" ,xcb-util-image)
> > > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > > + ("xcb-util" ,xcb-util)
> > > + ("libxcb" ,libxcb)
> > > + ("linux-pam" ,linux-pam)
> > > + ("libev" ,libev)
> > > + ("libx11" ,libx11)
> > > + ("cairo" ,cairo)))
> > > + (native-inputs
> > > + `(("libxkbcommon" ,libxkbcommon)
> > > + ("pkg-config" ,pkg-config)
> > > + ("which" ,which)))
> > > + (home-page "https://github.com/chrjguill/i3lock-color")
> > > + (synopsis "Screenlocker with color configuration support")
> > > + (description
> > > + "I3lock-color is a screen locker. It is a re-patched version of
> > > +i3lock, which is a simple screen locker like slock. Features include:
> > > +
> > > +@enumerate
> > > +@item forking process, the locked screen is preserved when you suspend from RAM
> > > +@item specify background color or PNG image to be displayed in the lock screen
> > > +@item many additional color options
> > > +@end enumerate\n")
> > > + (license license:bsd-3)))
> > > +
> > > (define-public xmonad
> > > (package
> > > (name "xmonad")
> > > --
> > > 2.15.0
> > >
> >
> > > From 49f8940d64ecab73d246d7652ba7358b748d0c2d Mon Sep 17 00:00:00 2001
> > > From: ng0 <contact.ng0@cryptolab.net>
> > > Date: Tue, 24 Jan 2017 15:57:13 +0000
> > > Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
> > >
> > > * gnu/packages/wm.scm (i3lock-fancy): New variable.
> > > ---
> > > gnu/packages/wm.scm | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > 1 file changed, 71 insertions(+)
> > >
> > > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > > index e4db72a6f..cf861e77e 100644
> > > --- a/gnu/packages/wm.scm
> > > +++ b/gnu/packages/wm.scm
> > > @@ -44,6 +44,7 @@
> > > #:use-module (gnu packages haskell)
> > > #:use-module (gnu packages haskell-check)
> > > #:use-module (gnu packages haskell-web)
> > > + #:use-module (gnu packages gawk)
> > > #:use-module (gnu packages base)
> > > #:use-module (gnu packages pkg-config)
> > > #:use-module (gnu packages perl)
> > > @@ -403,6 +404,76 @@ i3lock, which is a simple screen locker like slock. Features include:
> > > @end enumerate\n")
> > > (license license:bsd-3)))
> > >
> > > +(define-public i3lock-fancy
> > > + (package
> > > + (name "i3lock-fancy")
> > > + (version "0.2")
> > > + (source
> > > + (origin
> > > + (method url-fetch)
> > > + (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
> > > + version ".tar.gz"))
> > > + (file-name (string-append name "-" version ".tar.gz"))
> > > + (sha256
> > > + (base32
> > > + "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
> > > + (build-system gnu-build-system)
> > > + (arguments
> > > + `(#:tests? #f ;No tests included
> > > + #:phases
> > > + (modify-phases %standard-phases
> > > + (replace 'configure
> > > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > > + (let* ((out (assoc-ref outputs "out"))
> > > + (icons (string-append out "/share/i3lock-fancy/icons/"))
> > > + (i3lock (string-append (assoc-ref inputs "i3lock-color")
> > > + "/bin/i3lock"))
> > > + (wmctrl (string-append (assoc-ref inputs "wmctrl")
> > > + "/bin/wmctrl"))
> > > + (mconvert (string-append (assoc-ref inputs "imagemagick")
> > > + "/bin/convert"))
> > > + (mimport (string-append (assoc-ref inputs "imagemagick")
> > > + "/bin/import"))
> > > + (awk (string-append (assoc-ref inputs "gawk")
> > > + "/bin/gawk")))
> > > +
> > > + (substitute* "lock"
> > > + (("if ! i3lock") (string-append "if ! " i3lock))
> > > + (("i3lock -n") (string-append i3lock " -n"))
> > > + (("$(which wmctrl)") wmctrl)
> > > + (("convert") mconvert)
> > > + (("shot=\\(import") (string-append "shot=\(" mimport))
> > > + (("awk -F") (string-append awk " -F"))
> > > + ((" awk") awk)
> > > + (("\\$scriptpath/icons/") icons))
> > > + #t)))
> > > + (delete 'build)
> > > + (replace 'install
> > > + (lambda* (#:key inputs outputs #:allow-other-keys)
> > > + (let* ((out (assoc-ref outputs "out"))
> > > + (bin (string-append out "/bin"))
> > > + (icons (string-append out "/share/i3lock-fancy/icons/")))
> > > +
> > > + (install-file "lock" bin)
> > > + (rename-file (string-append bin "/lock")
> > > + (string-append bin "/i3lock-fancy"))
> > > + (copy-recursively "icons" icons)
> > > + #t))))))
> > > + (native-inputs
> > > + `(("imagemagick" ,imagemagick)
> > > + ("i3lock-color" ,i3lock-color)
> > > + ("wmctrl" ,wmctrl)
> > > + ("gawk" ,gawk)))
> > > + (home-page "https://github.com/meskarune/i3lock-fancy")
> > > + (synopsis "Screenlocker with screenshot function")
> > > + (description
> > > + "@code{i3lock-fancy} is a Bash script that takes a screenshot of
> > > +the desktop, blurs the background and adds a lock icon and text.
> > > +It makes use of @code{i3lock-color} and can optionally be passed any
> > > +screenshot util like @code{scrot}. This screenlocker can be used with
> > > +any window manager or desktop environment.")
> > > + (license license:expat)))
> > > +
> > > (define-public xmonad
> > > (package
> > > (name "xmonad")
> > > --
> > > 2.15.0
> > >
> >
> >
> >
> >
> > --
> > GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> > GnuPG: https://dl.n0.is/dist/keys/
> > WWW: https://we.make.ritual.n0.is
>
>
>
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://dl.n0.is/dist/keys/
> WWW: https://we.make.ritual.n0.is
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #1.2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: text/plain, Size: 4434 bytes --]
From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 13:03:42 +0000
Subject: [PATCH 1/2] gnu: Add i3lock-color.
* gnu/packages/wm.scm (i3lock-color): New variable.
---
gnu/local.mk | 1 +
gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index 54d1ac91c..2ec5844dc 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -744,6 +744,7 @@ dist_patch_DATA = \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
%D%/packages/patches/hydra-disable-darcs-test.patch \
+ %D%/packages/patches/i3lock-color-fix-makefile.patch \
%D%/packages/patches/icecat-avoid-bundled-libraries.patch \
%D%/packages/patches/icecat-bug-1348660-pt5.patch \
%D%/packages/patches/icecat-bug-1415133.patch \
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 62a5b5460..e4db72a6f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages suckless)
#:use-module (guix download)
#:use-module (guix git-download))
@@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
prompt.")
(license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
+(define-public i3lock-color
+ (package
+ (name "i3lock-color")
+ (version "2.9.1-c")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/chrjguill/i3lock-color/"
+ "archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No tests included.
+ #:make-flags (list "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (etc (string-append out "/etc"))
+ (man (string-append out "/share/man"))
+ (xkb (assoc-ref inputs "libxkbcommon"))
+ (xkbheader (string-append xkb
+ "/include/xkbcommon/"
+ "xkbcommon-compose.h")))
+ (substitute* "Makefile"
+ (("PKG_CONFIG=pkg-config")
+ (string-append "PKG_CONFIG="
+ (which "pkg-config")))
+ (("/usr/include/xkbcommon/xkbcommon-compose.h")
+ xkbheader)
+ (("PREFIX=/usr")
+ (string-append "PREFIX=" out))
+ (("SYSCONFDIR=/etc")
+ (string-append "SYSCONFDIR=" etc))
+ (("MANDIR=/usr/share/man")
+ (string-append "MANDIR=" man)))
+ #t))))))
+ (inputs
+ `(("xcb-util-image" ,xcb-util-image)
+ ("xcb-util-keysyms" ,xcb-util-keysyms)
+ ("xcb-util" ,xcb-util)
+ ("libxcb" ,libxcb)
+ ("linux-pam" ,linux-pam)
+ ("libev" ,libev)
+ ("libx11" ,libx11)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("libxkbcommon" ,libxkbcommon)
+ ("pkg-config" ,pkg-config)
+ ("which" ,which)))
+ (home-page "https://github.com/chrjguill/i3lock-color")
+ (synopsis "Screenlocker with color configuration support")
+ (description
+ "I3lock-color is a screen locker. It is a re-patched version of
+i3lock, which is a simple screen locker like slock. Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or PNG image to be displayed in the lock screen
+@item many additional color options
+@end enumerate\n")
+ (license license:bsd-3)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.0
[-- Attachment #1.3: 0002-gnu-Add-i3lock-fancy.patch --]
[-- Type: text/plain, Size: 4004 bytes --]
From 63e4eff6e954361a7b30fb4c060bdecbfee56da3 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 15:57:13 +0000
Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
* gnu/packages/wm.scm (i3lock-fancy): New variable.
---
gnu/packages/wm.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index e4db72a6f..01faf8149 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -44,6 +44,7 @@
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
@@ -403,6 +404,72 @@ i3lock, which is a simple screen locker like slock. Features include:
@end enumerate\n")
(license license:bsd-3)))
+(define-public i3lock-fancy
+ (package
+ (name "i3lock-fancy")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests included
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (icons (string-append out "/share/i3lock-fancy/icons/"))
+ (wmctrl (string-append (assoc-ref inputs "wmctrl")
+ "/bin/wmctrl"))
+ (mconvert (string-append (assoc-ref inputs "imagemagick")
+ "/bin/convert"))
+ (mimport (string-append (assoc-ref inputs "imagemagick")
+ "/bin/import"))
+ (awk (string-append (assoc-ref inputs "gawk")
+ "/bin/gawk")))
+
+ (substitute* "lock"
+ (("$(which wmctrl)") wmctrl)
+ (("convert") mconvert)
+ (("shot=\\(import") (string-append "shot=\(" mimport))
+ (("awk -F") (string-append awk " -F"))
+ ((" awk") awk)
+ (("\\$scriptpath/icons/") icons))
+ #t)))
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (icons (string-append out "/share/i3lock-fancy/icons/")))
+
+ (install-file "lock" bin)
+ (rename-file (string-append bin "/lock")
+ (string-append bin "/i3lock-fancy"))
+ (copy-recursively "icons" icons)
+ #t))))))
+ (native-inputs
+ `(("imagemagick" ,imagemagick)
+ ("i3lock-color" ,i3lock-color)
+ ("wmctrl" ,wmctrl)
+ ("gawk" ,gawk)))
+ (home-page "https://github.com/meskarune/i3lock-fancy")
+ (synopsis "Screenlocker with screenshot function")
+ (description
+ "@code{i3lock-fancy} is a Bash script that takes a screenshot of
+the desktop, blurs the background and adds a lock icon and text.
+It makes use of @code{i3lock-color} and can optionally be passed any
+screenshot util like @code{scrot}. This screenlocker can be used with
+any window manager or desktop environment.")
+ (license license:expat)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 21:19 ` ng0
@ 2017-11-19 11:04 ` ng0
2017-12-01 7:20 ` Chris Marusich
1 sibling, 0 replies; 15+ messages in thread
From: ng0 @ 2017-11-19 11:04 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 11132 bytes --]
ng0 transcribed 35K bytes:
> ng0 transcribed 25K bytes:
> > ng0 transcribed 23K bytes:
> > > ng0 transcribed 22K bytes:
> > > > New version appended. i3lock-fancy needs some fixes, but I can confirm
> > > > that i3lock-color works!
> > >
> > > in i3lock-fancy script:
> > >
> > > # try to use a forked version of i3lock with prepared parameters
> > > if ! /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock "${param_add[@]}" "${param[@]}" -i "$image" > /dev/null 2>&1; then
> > > # We have failed, lets get back to stock one
> > > i3lock "${param_add[@]}" -i "$image"
> > > fi
> > >
> > >
> > > Would /run/current-system/profile/bin/i3lock-fancy be better?
> > > The most realistic scenario I see is to just set 'i3lock' and
> > > propagate i3lock-color with i3lock-fancy.
>
> I've changed my mind. As there's also 'i3lock' (without the -color suffix)
> but we don't package it (yet), it would take away the freedom to
> decide which i3lock you want to use.
> The author of i3lock-fancy wantsus to use i3lock-color, but there's
> also a check and it falls back to the normal i3lock.
>
> Therefore I think it must be up to people using i3lock-fancy to
> install i3lock-color AND i3lock-fancy in their system profile
> (or just i3lock-color in systemprofile + suid it, and i3lock-fancy
> in the user profile).
>
> 3rd version of patches appended.
>
> > I have just copied /run/current-system/profile/bin/i3lock-fancy to $HOME/i3lock-fancy
> > and changed the /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c/bin/i3lock
> > bit to read just "i3lock". This way i3lock-fancy works for me.
> > There's a general 'lag' in both i3lock-color and i3lock-fancy, but
> > I blame my Desktop.
> >
> > I'll send an update soon.
> >
> From ba2a83195afb10ca7c65833f81cdc10748212873 Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 13:03:42 +0000
> Subject: [PATCH 1/2] gnu: Add i3lock-color.
>
> * gnu/packages/wm.scm (i3lock-color): New variable.
> ---
> gnu/local.mk | 1 +
> gnu/packages/wm.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 69 insertions(+)
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 54d1ac91c..2ec5844dc 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -744,6 +744,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hubbub-sort-entities.patch \
> %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> %D%/packages/patches/hydra-disable-darcs-test.patch \
> + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> %D%/packages/patches/icecat-bug-1415133.patch \
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 62a5b5460..e4db72a6f 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -68,6 +68,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages linux)
> #:use-module (gnu packages suckless)
> #:use-module (guix download)
> #:use-module (guix git-download))
> @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> prompt.")
> (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
>
> +(define-public i3lock-color
> + (package
> + (name "i3lock-color")
> + (version "2.9.1-c")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> + "archive/" version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; No tests included.
> + #:make-flags (list "CC=gcc")
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key outputs inputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (etc (string-append out "/etc"))
> + (man (string-append out "/share/man"))
> + (xkb (assoc-ref inputs "libxkbcommon"))
> + (xkbheader (string-append xkb
> + "/include/xkbcommon/"
> + "xkbcommon-compose.h")))
> + (substitute* "Makefile"
> + (("PKG_CONFIG=pkg-config")
> + (string-append "PKG_CONFIG="
> + (which "pkg-config")))
> + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> + xkbheader)
> + (("PREFIX=/usr")
> + (string-append "PREFIX=" out))
> + (("SYSCONFDIR=/etc")
> + (string-append "SYSCONFDIR=" etc))
> + (("MANDIR=/usr/share/man")
> + (string-append "MANDIR=" man)))
> + #t))))))
> + (inputs
> + `(("xcb-util-image" ,xcb-util-image)
> + ("xcb-util-keysyms" ,xcb-util-keysyms)
> + ("xcb-util" ,xcb-util)
> + ("libxcb" ,libxcb)
> + ("linux-pam" ,linux-pam)
> + ("libev" ,libev)
> + ("libx11" ,libx11)
> + ("cairo" ,cairo)))
> + (native-inputs
> + `(("libxkbcommon" ,libxkbcommon)
> + ("pkg-config" ,pkg-config)
> + ("which" ,which)))
> + (home-page "https://github.com/chrjguill/i3lock-color")
> + (synopsis "Screenlocker with color configuration support")
> + (description
> + "I3lock-color is a screen locker. It is a re-patched version of
> +i3lock, which is a simple screen locker like slock. Features include:
> +
> +@enumerate
> +@item forking process, the locked screen is preserved when you suspend from RAM
> +@item specify background color or PNG image to be displayed in the lock screen
> +@item many additional color options
> +@end enumerate\n")
> + (license license:bsd-3)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.0
>
> From 63e4eff6e954361a7b30fb4c060bdecbfee56da3 Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 15:57:13 +0000
> Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
>
> * gnu/packages/wm.scm (i3lock-fancy): New variable.
> ---
> gnu/packages/wm.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 67 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index e4db72a6f..01faf8149 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -44,6 +44,7 @@
> #:use-module (gnu packages haskell)
> #:use-module (gnu packages haskell-check)
> #:use-module (gnu packages haskell-web)
> + #:use-module (gnu packages gawk)
> #:use-module (gnu packages base)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages perl)
> @@ -403,6 +404,72 @@ i3lock, which is a simple screen locker like slock. Features include:
> @end enumerate\n")
> (license license:bsd-3)))
>
> +(define-public i3lock-fancy
> + (package
> + (name "i3lock-fancy")
> + (version "0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
> + version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;No tests included
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (icons (string-append out "/share/i3lock-fancy/icons/"))
> + (wmctrl (string-append (assoc-ref inputs "wmctrl")
> + "/bin/wmctrl"))
> + (mconvert (string-append (assoc-ref inputs "imagemagick")
> + "/bin/convert"))
> + (mimport (string-append (assoc-ref inputs "imagemagick")
> + "/bin/import"))
> + (awk (string-append (assoc-ref inputs "gawk")
> + "/bin/gawk")))
> +
> + (substitute* "lock"
> + (("$(which wmctrl)") wmctrl)
> + (("convert") mconvert)
> + (("shot=\\(import") (string-append "shot=\(" mimport))
> + (("awk -F") (string-append awk " -F"))
> + ((" awk") awk)
> + (("\\$scriptpath/icons/") icons))
> + #t)))
> + (delete 'build)
> + (replace 'install
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (icons (string-append out "/share/i3lock-fancy/icons/")))
> +
> + (install-file "lock" bin)
> + (rename-file (string-append bin "/lock")
> + (string-append bin "/i3lock-fancy"))
> + (copy-recursively "icons" icons)
> + #t))))))
> + (native-inputs
> + `(("imagemagick" ,imagemagick)
> + ("i3lock-color" ,i3lock-color)
i3lock-color should be removed before commiting this patch,
and we should add a note about this to the description. Like:
"You will need to install i3lock or one of its variants (like
i3lock-color) to make use of i3lock-fancy."
> + ("wmctrl" ,wmctrl)
> + ("gawk" ,gawk)))
> + (home-page "https://github.com/meskarune/i3lock-fancy")
> + (synopsis "Screenlocker with screenshot function")
> + (description
> + "@code{i3lock-fancy} is a Bash script that takes a screenshot of
> +the desktop, blurs the background and adds a lock icon and text.
> +It makes use of @code{i3lock-color} and can optionally be passed any
> +screenshot util like @code{scrot}. This screenlocker can be used with
> +any window manager or desktop environment.")
> + (license license:expat)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.0
>
I'll contribute a Makefile upstream so that we can shorten the package definition.
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://dl.n0.is/dist/keys/
WWW: https://we.make.ritual.n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-11-17 21:19 ` ng0
2017-11-19 11:04 ` ng0
@ 2017-12-01 7:20 ` Chris Marusich
2017-12-01 9:27 ` ng0
1 sibling, 1 reply; 15+ messages in thread
From: Chris Marusich @ 2017-12-01 7:20 UTC (permalink / raw)
To: ng0; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 9116 bytes --]
Hi ng0,
I'm glad to hear i3lock works for you, too!
I was able to find time to draft feedback for your latest i3lock-color
patch, but not for i3lock-fancy (although it looks very simple, and I
will check it in the next few days). In the interest of not moving too
slowly, I'm sending what I have to you now.
ng0 <ng0@infotropique.org> writes:
> I've changed my mind. As there's also 'i3lock' (without the -color suffix)
> but we don't package it (yet), it would take away the freedom to
> decide which i3lock you want to use.
> The author of i3lock-fancy wantsus to use i3lock-color, but there's
> also a check and it falls back to the normal i3lock.
>
> Therefore I think it must be up to people using i3lock-fancy to
> install i3lock-color AND i3lock-fancy in their system profile
> (or just i3lock-color in systemprofile + suid it, and i3lock-fancy
> in the user profile).
I agree with your assessment. For now, I think that's a fine plan,
although I dislike the fact that by adding the i3lock-fancy package by
itself, we will make it possible for someone to naively install just
that package to their profile, only to find that it doesn't work because
i3lock itself is not installed in the system as a screen locker program.
However, I can't think of a better solution at this time, and we're
already doing something similar for the other screen locker packages.
For example, if you install xscreensaver into your profile without also
installing it into the system as a screen locker service, xscreensaver
won't work because it won't be setuid-root. So I think it's OK.
>> > > > > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
>> > > > > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
>> > > > >
>> > > > > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
>> > > > > multiple other files, too.
>> > > >
>> > > > Yes. I'm only changing addresses once I touch the file. So old
>> > > > addresses might be in there for a long time. Otoh, I will
>> > > > prepare a patch and change all my header addresses.
Understood.
>> > > > > > + (description
>> > > > > > + "I3lock-color is a screen locker. It is a re-patched version of
>> > > > > > +i3lock, which is a simple screen locker like slock. Features include:
>> > > > > > +
>> > > > > > +@enumerate
>> > > > > > +@item forking process, the locked screen is preserved when you suspend from RAM
>> > > > > > +@item specify background color or PNG image to be displayed in the lock screen
>> > > > > > +@item many additional color options
>> > > > > > +@end enumerate\n")
>> > > > >
>> > > > > I'm not sure if the trailing newline is necessary. Unless you beat me
>> > > > > to it, I'll check on this detail the next time I return to this thread.
>> > > >
>> > > > I've seen this multiple times before and have just followed this style.
I looked into this, and it seems that newlines are elided from the
output. Check "guix package --show=maxflow" and "guix edit maxflow" to
see a particularly striking example.
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 54d1ac91c..2ec5844dc 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -744,6 +744,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hubbub-sort-entities.patch \
> %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> %D%/packages/patches/hydra-disable-darcs-test.patch \
> + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> %D%/packages/patches/icecat-bug-1415133.patch \
Now that the Makefile is patched using substitute*, we can remove this
added line from gnu/local.mk.
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 62a5b5460..e4db72a6f 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -68,6 +68,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages linux)
> #:use-module (gnu packages suckless)
> #:use-module (guix download)
> #:use-module (guix git-download))
> @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> prompt.")
> (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
>
> +(define-public i3lock-color
> + (package
> + (name "i3lock-color")
> + (version "2.9.1-c")
According to "guix lint", version 2.10.1-c is now available. Should we
use it?
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> + "archive/" version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; No tests included.
> + #:make-flags (list "CC=gcc")
Why is this #:make-flags argument necessary? I'm not suggesting it
isn't; I just don't know whether it is or not, and I'm curious.
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key outputs inputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (etc (string-append out "/etc"))
> + (man (string-append out "/share/man"))
> + (xkb (assoc-ref inputs "libxkbcommon"))
> + (xkbheader (string-append xkb
> + "/include/xkbcommon/"
> + "xkbcommon-compose.h")))
> + (substitute* "Makefile"
> + (("PKG_CONFIG=pkg-config")
> + (string-append "PKG_CONFIG="
> + (which "pkg-config")))
> + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> + xkbheader)
> + (("PREFIX=/usr")
> + (string-append "PREFIX=" out))
> + (("SYSCONFDIR=/etc")
> + (string-append "SYSCONFDIR=" etc))
> + (("MANDIR=/usr/share/man")
> + (string-append "MANDIR=" man)))
> + #t))))))
I like that we were able to remove the patch file by using substitute*!
Hopefully once you upstream your changes, we can simplify this further.
> + (inputs
> + `(("xcb-util-image" ,xcb-util-image)
> + ("xcb-util-keysyms" ,xcb-util-keysyms)
> + ("xcb-util" ,xcb-util)
> + ("libxcb" ,libxcb)
> + ("linux-pam" ,linux-pam)
> + ("libev" ,libev)
> + ("libx11" ,libx11)
> + ("cairo" ,cairo)))
> + (native-inputs
> + `(("libxkbcommon" ,libxkbcommon)
> + ("pkg-config" ,pkg-config)
> + ("which" ,which)))
i3lock-color retains the following references when built:
--8<---------------cut here---------------start------------->8---
$ guix gc --references /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c | sort -t - -k 2 -k 1,1
/gnu/store/nwxv9s2q8pi0m6gn6fyidpj8442dwp6f-cairo-1.14.10
/gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib
/gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25
/gnu/store/8zyry9663xgcrgg7fkrdrw40511d1gyz-libev-4.24
/gnu/store/3cxhfkh0n1naan9db0z302mwqpxqkry6-libxcb-1.12
/gnu/store/vyip2r21g65q90jy79nm5gsz6yl1s7gp-libxkbcommon-0.7.1
/gnu/store/jf7sby087sakbsirdxrfi5cizf3ya4md-linux-pam-1.3.0
/gnu/store/f4y2v0ynyr1rhzjxv1m6xlglgg0grxll-xcb-util-0.4.0
/gnu/store/x67589ylz75jadmhab8z6z03f1i5l5rv-xcb-util-image-0.4.0
--8<---------------cut here---------------end--------------->8---
Specifically, libxkbcommon is referenced. Therefore, it might be a
runtime dependency of the program. Are you sure it should be a
native-input? If it really is required at runtime, it should be an
input, not a native-input.
In addition, xcb-util-keysyms and libx11 are both unreferenced. Does
i3lock-color build correctly without them? If so, can we just remove
them? If not, should they be native-inputs?
> + (synopsis "Screenlocker with color configuration support")
Could you change this phrase to "screen locker" instead of
"screenlocker"? That is what you use in the description, and it's also
what we use in the synopses/descriptions of the other screen lockers
we've already packaged (and the manual). The consistency might make
this package more discoverable.
> i3lock-color should be removed before commiting this patch,
> and we should add a note about this to the description. Like:
> "You will need to install i3lock or one of its variants (like
> i3lock-color) to make use of i3lock-fancy."
I don't understand: why do we need to remove i3lock-color?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-01 7:20 ` Chris Marusich
@ 2017-12-01 9:27 ` ng0
2017-12-02 9:59 ` Chris Marusich
0 siblings, 1 reply; 15+ messages in thread
From: ng0 @ 2017-12-01 9:27 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083, admin
[-- Attachment #1: Type: text/plain, Size: 11282 bytes --]
Hi Chris,
thanks for your review. I'll have no time to address it before next week,
just a couple of comments.
Hi meskarune, I've CC'd you because of a specific question/idea after the
4th quoted paragraph.
Chris Marusich transcribed 9.7K bytes:
> Hi ng0,
>
> I'm glad to hear i3lock works for you, too!
>
> I was able to find time to draft feedback for your latest i3lock-color
> patch, but not for i3lock-fancy (although it looks very simple, and I
> will check it in the next few days). In the interest of not moving too
> slowly, I'm sending what I have to you now.
>
> ng0 <ng0@infotropique.org> writes:
>
> > I've changed my mind. As there's also 'i3lock' (without the -color suffix)
> > but we don't package it (yet), it would take away the freedom to
> > decide which i3lock you want to use.
> > The author of i3lock-fancy wantsus to use i3lock-color, but there's
> > also a check and it falls back to the normal i3lock.
> >
> > Therefore I think it must be up to people using i3lock-fancy to
> > install i3lock-color AND i3lock-fancy in their system profile
> > (or just i3lock-color in systemprofile + suid it, and i3lock-fancy
> > in the user profile).
>
> I agree with your assessment. For now, I think that's a fine plan,
> although I dislike the fact that by adding the i3lock-fancy package by
> itself, we will make it possible for someone to naively install just
> that package to their profile, only to find that it doesn't work because
> i3lock itself is not installed in the system as a screen locker program.
> However, I can't think of a better solution at this time, and we're
> already doing something similar for the other screen locker packages.
> For example, if you install xscreensaver into your profile without also
> installing it into the system as a screen locker service, xscreensaver
> won't work because it won't be setuid-root. So I think it's OK.
We'll continue to have these problems with applications, maybe we should
consider it a bug and find a common description. So far it's limited to
screensavers, but I can't think of a reason why this problem would stay
limited to applications of the screensaver class.
For this specific application (i3lock-fancy), I could ask meskarune if she'd like to add
an error message if none is place already. At the top of the script
check for the existence of the i3lock binary in the users path (simply
'i3lock', not (only) total paths). If not found, throw an error and abort
with a message that "you need to install i3lock-color".
> >> > > > > > -;;; Copyright (c) 2016, 2017 ng0 <contact.ng0@cryptolab.net>
> >> > > > > > +;;; Copyright (c) 2016, 2017 ng0 <ng0@no-reply.pragmatique.xyz>
> >> > > > >
> >> > > > > FYI, the contact.ng0@cryptolab.net email address is still mentioned in
> >> > > > > multiple other files, too.
> >> > > >
> >> > > > Yes. I'm only changing addresses once I touch the file. So old
> >> > > > addresses might be in there for a long time. Otoh, I will
> >> > > > prepare a patch and change all my header addresses.
>
> Understood.
>
> >> > > > > > + (description
> >> > > > > > + "I3lock-color is a screen locker. It is a re-patched version of
> >> > > > > > +i3lock, which is a simple screen locker like slock. Features include:
> >> > > > > > +
> >> > > > > > +@enumerate
> >> > > > > > +@item forking process, the locked screen is preserved when you suspend from RAM
> >> > > > > > +@item specify background color or PNG image to be displayed in the lock screen
> >> > > > > > +@item many additional color options
> >> > > > > > +@end enumerate\n")
> >> > > > >
> >> > > > > I'm not sure if the trailing newline is necessary. Unless you beat me
> >> > > > > to it, I'll check on this detail the next time I return to this thread.
> >> > > >
> >> > > > I've seen this multiple times before and have just followed this style.
>
> I looked into this, and it seems that newlines are elided from the
> output. Check "guix package --show=maxflow" and "guix edit maxflow" to
> see a particularly striking example.
Oh, thanks.
> > diff --git a/gnu/local.mk b/gnu/local.mk
> > index 54d1ac91c..2ec5844dc 100644
> > --- a/gnu/local.mk
> > +++ b/gnu/local.mk
> > @@ -744,6 +744,7 @@ dist_patch_DATA = \
> > %D%/packages/patches/hubbub-sort-entities.patch \
> > %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \
> > %D%/packages/patches/hydra-disable-darcs-test.patch \
> > + %D%/packages/patches/i3lock-color-fix-makefile.patch \
> > %D%/packages/patches/icecat-avoid-bundled-libraries.patch \
> > %D%/packages/patches/icecat-bug-1348660-pt5.patch \
> > %D%/packages/patches/icecat-bug-1415133.patch \
>
> Now that the Makefile is patched using substitute*, we can remove this
> added line from gnu/local.mk.
Oops, right.
> > diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> > index 62a5b5460..e4db72a6f 100644
> > --- a/gnu/packages/wm.scm
> > +++ b/gnu/packages/wm.scm
> > @@ -68,6 +68,7 @@
> > #:use-module (gnu packages gperf)
> > #:use-module (gnu packages imagemagick)
> > #:use-module (gnu packages lua)
> > + #:use-module (gnu packages linux)
> > #:use-module (gnu packages suckless)
> > #:use-module (guix download)
> > #:use-module (guix git-download))
> > @@ -335,6 +336,73 @@ and locate windows on all your workspaces, using an interactive dmenu
> > prompt.")
> > (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
> >
> > +(define-public i3lock-color
> > + (package
> > + (name "i3lock-color")
> > + (version "2.9.1-c")
>
> According to "guix lint", version 2.10.1-c is now available. Should we
> use it?
Yes. I just don't track every single release made all the time ;)
So thanks for notifying me of this.
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (string-append "https://github.com/chrjguill/i3lock-color/"
> > + "archive/" version ".tar.gz"))
> > + (file-name (string-append name "-" version ".tar.gz"))
> > + (sha256
> > + (base32
> > + "18ql0kb24qlqsijs6j99algf2lprl78mzsz53b1hshmc8jjd4m27"))))
> > + (build-system gnu-build-system)
> > + (arguments
> > + `(#:tests? #f ; No tests included.
> > + #:make-flags (list "CC=gcc")
>
> Why is this #:make-flags argument necessary? I'm not suggesting it
> isn't; I just don't know whether it is or not, and I'm curious.
I don't remember. I'll check it out.
> > + #:phases
> > + (modify-phases %standard-phases
> > + (replace 'configure
> > + (lambda* (#:key outputs inputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (etc (string-append out "/etc"))
> > + (man (string-append out "/share/man"))
> > + (xkb (assoc-ref inputs "libxkbcommon"))
> > + (xkbheader (string-append xkb
> > + "/include/xkbcommon/"
> > + "xkbcommon-compose.h")))
> > + (substitute* "Makefile"
> > + (("PKG_CONFIG=pkg-config")
> > + (string-append "PKG_CONFIG="
> > + (which "pkg-config")))
> > + (("/usr/include/xkbcommon/xkbcommon-compose.h")
> > + xkbheader)
> > + (("PREFIX=/usr")
> > + (string-append "PREFIX=" out))
> > + (("SYSCONFDIR=/etc")
> > + (string-append "SYSCONFDIR=" etc))
> > + (("MANDIR=/usr/share/man")
> > + (string-append "MANDIR=" man)))
> > + #t))))))
>
> I like that we were able to remove the patch file by using substitute*!
> Hopefully once you upstream your changes, we can simplify this further.
Well I don't have to upstream exactly what we have but by writing the
Makefile in a more flexible way (and by removing the one total path).
> > + (inputs
> > + `(("xcb-util-image" ,xcb-util-image)
> > + ("xcb-util-keysyms" ,xcb-util-keysyms)
> > + ("xcb-util" ,xcb-util)
> > + ("libxcb" ,libxcb)
> > + ("linux-pam" ,linux-pam)
> > + ("libev" ,libev)
> > + ("libx11" ,libx11)
> > + ("cairo" ,cairo)))
> > + (native-inputs
> > + `(("libxkbcommon" ,libxkbcommon)
> > + ("pkg-config" ,pkg-config)
> > + ("which" ,which)))
>
> i3lock-color retains the following references when built:
>
> --8<---------------cut here---------------start------------->8---
> $ guix gc --references /gnu/store/kfymvwgm4g0avs3b97micq8477sa0if6-i3lock-color-2.9.1-c | sort -t - -k 2 -k 1,1
> /gnu/store/nwxv9s2q8pi0m6gn6fyidpj8442dwp6f-cairo-1.14.10
> /gnu/store/6wyjls0q2c9gjskkplsr1ad09p3d8gzg-gcc-5.4.0-lib
> /gnu/store/3h31zsqxjjg52da5gp3qmhkh4x8klhah-glibc-2.25
> /gnu/store/8zyry9663xgcrgg7fkrdrw40511d1gyz-libev-4.24
> /gnu/store/3cxhfkh0n1naan9db0z302mwqpxqkry6-libxcb-1.12
> /gnu/store/vyip2r21g65q90jy79nm5gsz6yl1s7gp-libxkbcommon-0.7.1
> /gnu/store/jf7sby087sakbsirdxrfi5cizf3ya4md-linux-pam-1.3.0
> /gnu/store/f4y2v0ynyr1rhzjxv1m6xlglgg0grxll-xcb-util-0.4.0
> /gnu/store/x67589ylz75jadmhab8z6z03f1i5l5rv-xcb-util-image-0.4.0
> --8<---------------cut here---------------end--------------->8---
>
> Specifically, libxkbcommon is referenced. Therefore, it might be a
> runtime dependency of the program. Are you sure it should be a
> native-input? If it really is required at runtime, it should be an
> input, not a native-input.
>
> In addition, xcb-util-keysyms and libx11 are both unreferenced. Does
> i3lock-color build correctly without them? If so, can we just remove
> them? If not, should they be native-inputs?
>
> > + (synopsis "Screenlocker with color configuration support")
>
> Could you change this phrase to "screen locker" instead of
> "screenlocker"? That is what you use in the description, and it's also
> what we use in the synopses/descriptions of the other screen lockers
> we've already packaged (and the manual). The consistency might make
> this package more discoverable.
>
> > i3lock-color should be removed before commiting this patch,
> > and we should add a note about this to the description. Like:
> > "You will need to install i3lock or one of its variants (like
> > i3lock-color) to make use of i3lock-fancy."
>
> I don't understand: why do we need to remove i3lock-color?
i3lock-fancy is Bash script. I'm patching in the references it
should keep. The 2 calls of i3lock in there must be just 'i3lock',
this will call the binary with the suid, not for example the one
in the store path of i3lock-color (which never worked).
More correct would be this remark:
i3lock-color should be removed from the inputs before commiting
this patch, and we should add a note about this to the description.
> --
> Chris
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
WWW: https://n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-01 9:27 ` ng0
@ 2017-12-02 9:59 ` Chris Marusich
2017-12-09 13:25 ` ng0
0 siblings, 1 reply; 15+ messages in thread
From: Chris Marusich @ 2017-12-02 9:59 UTC (permalink / raw)
To: ng0; +Cc: 27083, admin
[-- Attachment #1: Type: text/plain, Size: 3775 bytes --]
ng0 <ng0@n0.is> writes:
> Hi Chris,
>
> thanks for your review. I'll have no time to address it before next week,
> just a couple of comments.
No worries! Whenever you can update it, that's great! We're almost
there; I think the next update will probably be the final one.
> Chris Marusich transcribed 9.7K bytes:
>>
>> ...
>>
>> ng0 <ng0@infotropique.org> writes:
>>
>> > I've changed my mind. As there's also 'i3lock' (without the -color suffix)
>> > but we don't package it (yet), it would take away the freedom to
>> > decide which i3lock you want to use.
>> > The author of i3lock-fancy wantsus to use i3lock-color, but there's
>> > also a check and it falls back to the normal i3lock.
>> >
>> > Therefore I think it must be up to people using i3lock-fancy to
>> > install i3lock-color AND i3lock-fancy in their system profile
>> > (or just i3lock-color in systemprofile + suid it, and i3lock-fancy
>> > in the user profile).
>>
>> I agree with your assessment. For now, I think that's a fine plan,
>> although I dislike the fact that by adding the i3lock-fancy package by
>> itself, we will make it possible for someone to naively install just
>> that package to their profile, only to find that it doesn't work because
>> i3lock itself is not installed in the system as a screen locker program.
>> However, I can't think of a better solution at this time, and we're
>> already doing something similar for the other screen locker packages.
>> For example, if you install xscreensaver into your profile without also
>> installing it into the system as a screen locker service, xscreensaver
>> won't work because it won't be setuid-root. So I think it's OK.
>
> We'll continue to have these problems with applications, maybe we should
> consider it a bug and find a common description. So far it's limited to
> screensavers, but I can't think of a reason why this problem would stay
> limited to applications of the screensaver class.
I've created an email thread to discuss this in more detail on
guix-devel. The subject is: "Installing some packages results in
"incomplete deployment"". Please look for it and reply there if you
have any other thoughts on that matter.
For this patch, though, I think it's fine to ask users to install
i3lock-fancy and also add to their operating system declaration a screen
locker service that uses i3lock. That's how the existing screen lockers
have been packaged.
> For this specific application (i3lock-fancy), I could ask meskarune if she'd like to add
> an error message if none is place already. At the top of the script
> check for the existence of the i3lock binary in the users path (simply
> 'i3lock', not (only) total paths). If not found, throw an error and abort
> with a message that "you need to install i3lock-color".
I think that would be nice. I also think we can add i3lock-fancy to
Guix even before she makes those changes.
>> > i3lock-color should be removed before commiting this patch,
>> > and we should add a note about this to the description. Like:
>> > "You will need to install i3lock or one of its variants (like
>> > i3lock-color) to make use of i3lock-fancy."
>>
>> I don't understand: why do we need to remove i3lock-color?
>
> i3lock-fancy is Bash script. I'm patching in the references it
> should keep. The 2 calls of i3lock in there must be just 'i3lock',
> this will call the binary with the suid, not for example the one
> in the store path of i3lock-color (which never worked).
> More correct would be this remark:
> i3lock-color should be removed from the inputs before commiting
> this patch, and we should add a note about this to the description.
I understand now, and I agree.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-02 9:59 ` Chris Marusich
@ 2017-12-09 13:25 ` ng0
2017-12-09 14:25 ` ng0
2017-12-11 13:47 ` Ludovic Courtès
0 siblings, 2 replies; 15+ messages in thread
From: ng0 @ 2017-12-09 13:25 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1.1: Type: text/plain, Size: 1279 bytes --]
Chris Marusich transcribed 4.6K bytes:
> ng0 <ng0@n0.is> writes:
>
> > Hi Chris,
> >
> > thanks for your review. I'll have no time to address it before next week,
> > just a couple of comments.
>
> No worries! Whenever you can update it, that's great! We're almost
> there; I think the next update will probably be the final one.
>
New version, I think I've addressed everything you mentioned.
Furthermore I was able to improve the files due to some
changes upstream made.
I've fixed the description of i3lock-fancy and I've opened
a discussion/bugticket on the name of the executable of i3lock-fancy
(in https://github.com/meskarune/i3lock-fancy/issues/103).
Beyond this patch:
I wonder if it is a bug or lack of functionality in i3lock
or i3lock-color that I can switch to the tty when it's locked.
There are other screenlockers that do not allow me to do this,
the screen is really locked, not just tty7 or whereever your X might
be running.
I have not tested this version of the patches beyond building them.
I will do so after sending this and report later today if
I can still lock my screen. it should just work.
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
WWW: https://n0.is
[-- Attachment #1.2: 0001-gnu-Add-i3lock-color.patch --]
[-- Type: text/plain, Size: 3487 bytes --]
From f11bc2af6aa43cdd52c76c8640fc2d8eff71fa8d Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 13:03:42 +0000
Subject: [PATCH 1/2] gnu: Add i3lock-color.
* gnu/packages/wm.scm (i3lock-color): New variable.
---
gnu/packages/wm.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 6912d6f2d..8fcce1eab 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2016 Al McElrath <hello@yrns.org>
;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
+;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
@@ -44,6 +44,7 @@
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
@@ -68,6 +69,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages suckless)
#:use-module (guix download)
#:use-module (guix git-download))
@@ -335,6 +337,52 @@ and locate windows on all your workspaces, using an interactive dmenu
prompt.")
(license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
+(define-public i3lock-color
+ (package
+ (name "i3lock-color")
+ (version "2.10.1c")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/PandorasFox/i3lock-color/"
+ "archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "119xvdm4r6irqk0mar80hx6s8ydw26y35h7712rd7nbg7pb7i053"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests included.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (zero? (system* "autoreconf" "-vfi")))))))
+ (inputs
+ `(("xcb-util-image" ,xcb-util-image)
+ ("xcb-util" ,xcb-util)
+ ("libxcb" ,libxcb)
+ ("linux-pam" ,linux-pam)
+ ("libxkbcommon" ,libxkbcommon)
+ ("libev" ,libev)
+ ("cairo" ,cairo)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)))
+ (home-page "https://github.com/PandorasFox/i3lock-color")
+ (synopsis "Screen locker with color configuration support")
+ (description
+ "Re-patched version of i3lock, which is a simple screen
+locker like slock. Features include:
+
+@enumerate
+@item forking process, the locked screen is preserved when you suspend from RAM
+@item specify background color or image to be displayed in the lock screen
+@item many additional color options
+@end enumerate")
+ (license license:bsd-3)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.1
[-- Attachment #1.3: 0002-gnu-Add-i3lock-fancy.patch --]
[-- Type: text/plain, Size: 3947 bytes --]
From 9ea21f2e1c20aceff4ff12bf00cd5b31e0bf02fc Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
Date: Tue, 24 Jan 2017 15:57:13 +0000
Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
* gnu/packages/wm.scm (i3lock-fancy): New variable.
---
gnu/packages/wm.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8fcce1eab..d9732e8d0 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -45,6 +45,7 @@
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages gawk)
#:use-module (gnu packages base)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages perl)
@@ -383,6 +384,72 @@ locker like slock. Features include:
@end enumerate")
(license license:bsd-3)))
+(define-public i3lock-fancy
+ (package
+ (name "i3lock-fancy")
+ (version "0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;No tests included
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (icons (string-append out "/share/i3lock-fancy/icons/"))
+ (wmctrl (string-append (assoc-ref inputs "wmctrl")
+ "/bin/wmctrl"))
+ (mconvert (string-append (assoc-ref inputs "imagemagick")
+ "/bin/convert"))
+ (mimport (string-append (assoc-ref inputs "imagemagick")
+ "/bin/import"))
+ (awk (string-append (assoc-ref inputs "gawk")
+ "/bin/gawk")))
+
+ (substitute* "lock"
+ (("$(which wmctrl)") wmctrl)
+ (("convert") mconvert)
+ (("shot=\\(import") (string-append "shot=\(" mimport))
+ (("awk -F") (string-append awk " -F"))
+ ((" awk") awk)
+ (("\\$scriptpath/icons/") icons))
+ #t)))
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (icons (string-append out "/share/i3lock-fancy/icons/")))
+
+ (install-file "lock" bin)
+ (rename-file (string-append bin "/lock")
+ (string-append bin "/i3lock-fancy"))
+ (copy-recursively "icons" icons)
+ #t))))))
+ (native-inputs
+ `(("imagemagick" ,imagemagick)
+ ("wmctrl" ,wmctrl)
+ ("gawk" ,gawk)))
+ (home-page "https://github.com/meskarune/i3lock-fancy")
+ (synopsis "Screen locker with screenshot function")
+ (description
+ "@code{i3lock-fancy} is a Bash script that takes a screenshot of
+the desktop, blurs the background and adds a lock icon and text.
+It requires @code{i3lock-color} or @code{i3lock} and can optionally
+be passed any screenshot util like @code{scrot}.
+This screen locker can be used with any window manager or
+desktop environment.")
+ (license license:expat)))
+
(define-public xmonad
(package
(name "xmonad")
--
2.15.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-09 13:25 ` ng0
@ 2017-12-09 14:25 ` ng0
2017-12-11 13:47 ` Ludovic Courtès
1 sibling, 0 replies; 15+ messages in thread
From: ng0 @ 2017-12-09 14:25 UTC (permalink / raw)
To: Chris Marusich; +Cc: 27083
[-- Attachment #1: Type: text/plain, Size: 9363 bytes --]
ng0 transcribed 9.9K bytes:
> Chris Marusich transcribed 4.6K bytes:
> > ng0 <ng0@n0.is> writes:
> >
> > > Hi Chris,
> > >
> > > thanks for your review. I'll have no time to address it before next week,
> > > just a couple of comments.
> >
> > No worries! Whenever you can update it, that's great! We're almost
> > there; I think the next update will probably be the final one.
> >
>
> New version, I think I've addressed everything you mentioned.
> Furthermore I was able to improve the files due to some
> changes upstream made.
> I've fixed the description of i3lock-fancy and I've opened
> a discussion/bugticket on the name of the executable of i3lock-fancy
> (in https://github.com/meskarune/i3lock-fancy/issues/103).
>
> Beyond this patch:
> I wonder if it is a bug or lack of functionality in i3lock
> or i3lock-color that I can switch to the tty when it's locked.
> There are other screenlockers that do not allow me to do this,
> the screen is really locked, not just tty7 or whereever your X might
> be running.
>
> I have not tested this version of the patches beyond building them.
> I will do so after sending this and report later today if
> I can still lock my screen. it should just work.
Confirmation: It still works.
> --
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
> WWW: https://n0.is
> From f11bc2af6aa43cdd52c76c8640fc2d8eff71fa8d Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 13:03:42 +0000
> Subject: [PATCH 1/2] gnu: Add i3lock-color.
>
> * gnu/packages/wm.scm (i3lock-color): New variable.
> ---
> gnu/packages/wm.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 49 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 6912d6f2d..8fcce1eab 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -9,7 +9,7 @@
> ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
> ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
> ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
> -;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
> +;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
> ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
> ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
> ;;; Copyright © 2017 Mekeor Melire <mekeor.melire@gmail.com>
> @@ -44,6 +44,7 @@
> #:use-module (gnu packages haskell)
> #:use-module (gnu packages haskell-check)
> #:use-module (gnu packages haskell-web)
> + #:use-module (gnu packages autotools)
> #:use-module (gnu packages base)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages perl)
> @@ -68,6 +69,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages lua)
> + #:use-module (gnu packages linux)
> #:use-module (gnu packages suckless)
> #:use-module (guix download)
> #:use-module (guix git-download))
> @@ -335,6 +337,52 @@ and locate windows on all your workspaces, using an interactive dmenu
> prompt.")
> (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/")))))
>
> +(define-public i3lock-color
> + (package
> + (name "i3lock-color")
> + (version "2.10.1c")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/PandorasFox/i3lock-color/"
> + "archive/" version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "119xvdm4r6irqk0mar80hx6s8ydw26y35h7712rd7nbg7pb7i053"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;No tests included.
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'bootstrap
> + (lambda _
> + (zero? (system* "autoreconf" "-vfi")))))))
> + (inputs
> + `(("xcb-util-image" ,xcb-util-image)
> + ("xcb-util" ,xcb-util)
> + ("libxcb" ,libxcb)
> + ("linux-pam" ,linux-pam)
> + ("libxkbcommon" ,libxkbcommon)
> + ("libev" ,libev)
> + ("cairo" ,cairo)))
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("autoconf" ,autoconf)
> + ("automake" ,automake)))
> + (home-page "https://github.com/PandorasFox/i3lock-color")
> + (synopsis "Screen locker with color configuration support")
> + (description
> + "Re-patched version of i3lock, which is a simple screen
> +locker like slock. Features include:
> +
> +@enumerate
> +@item forking process, the locked screen is preserved when you suspend from RAM
> +@item specify background color or image to be displayed in the lock screen
> +@item many additional color options
> +@end enumerate")
> + (license license:bsd-3)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.1
>
> From 9ea21f2e1c20aceff4ff12bf00cd5b31e0bf02fc Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 15:57:13 +0000
> Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
>
> * gnu/packages/wm.scm (i3lock-fancy): New variable.
> ---
> gnu/packages/wm.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 67 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 8fcce1eab..d9732e8d0 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -45,6 +45,7 @@
> #:use-module (gnu packages haskell-check)
> #:use-module (gnu packages haskell-web)
> #:use-module (gnu packages autotools)
> + #:use-module (gnu packages gawk)
> #:use-module (gnu packages base)
> #:use-module (gnu packages pkg-config)
> #:use-module (gnu packages perl)
> @@ -383,6 +384,72 @@ locker like slock. Features include:
> @end enumerate")
> (license license:bsd-3)))
>
> +(define-public i3lock-fancy
> + (package
> + (name "i3lock-fancy")
> + (version "0.2")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/meskarune/i3lock-fancy/archive/"
> + version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "020m7mnfq5cvir7p9v3hkb7cvb4cai33wppxl2zdwscwwjnchc5y"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ;No tests included
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (icons (string-append out "/share/i3lock-fancy/icons/"))
> + (wmctrl (string-append (assoc-ref inputs "wmctrl")
> + "/bin/wmctrl"))
> + (mconvert (string-append (assoc-ref inputs "imagemagick")
> + "/bin/convert"))
> + (mimport (string-append (assoc-ref inputs "imagemagick")
> + "/bin/import"))
> + (awk (string-append (assoc-ref inputs "gawk")
> + "/bin/gawk")))
> +
> + (substitute* "lock"
> + (("$(which wmctrl)") wmctrl)
> + (("convert") mconvert)
> + (("shot=\\(import") (string-append "shot=\(" mimport))
> + (("awk -F") (string-append awk " -F"))
> + ((" awk") awk)
> + (("\\$scriptpath/icons/") icons))
> + #t)))
> + (delete 'build)
> + (replace 'install
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (icons (string-append out "/share/i3lock-fancy/icons/")))
> +
> + (install-file "lock" bin)
> + (rename-file (string-append bin "/lock")
> + (string-append bin "/i3lock-fancy"))
> + (copy-recursively "icons" icons)
> + #t))))))
> + (native-inputs
> + `(("imagemagick" ,imagemagick)
> + ("wmctrl" ,wmctrl)
> + ("gawk" ,gawk)))
> + (home-page "https://github.com/meskarune/i3lock-fancy")
> + (synopsis "Screen locker with screenshot function")
> + (description
> + "@code{i3lock-fancy} is a Bash script that takes a screenshot of
> +the desktop, blurs the background and adds a lock icon and text.
> +It requires @code{i3lock-color} or @code{i3lock} and can optionally
> +be passed any screenshot util like @code{scrot}.
> +This screen locker can be used with any window manager or
> +desktop environment.")
> + (license license:expat)))
> +
> (define-public xmonad
> (package
> (name "xmonad")
> --
> 2.15.1
>
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
WWW: https://n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-09 13:25 ` ng0
2017-12-09 14:25 ` ng0
@ 2017-12-11 13:47 ` Ludovic Courtès
2017-12-11 14:03 ` ng0
1 sibling, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2017-12-11 13:47 UTC (permalink / raw)
To: ng0; +Cc: Chris Marusich, 27083
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Hi,
ng0 <ng0@n0.is> skribis:
> I wonder if it is a bug or lack of functionality in i3lock
> or i3lock-color that I can switch to the tty when it's locked.
> There are other screenlockers that do not allow me to do this,
> the screen is really locked, not just tty7 or whereever your X might
> be running.
Really? I’m not sure the screen locker, which is a “regular” X11
client, can prevent you from switching to a tty.
> From f11bc2af6aa43cdd52c76c8640fc2d8eff71fa8d Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 13:03:42 +0000
> Subject: [PATCH 1/2] gnu: Add i3lock-color.
>
> * gnu/packages/wm.scm (i3lock-color): New variable.
Applied with these changes:
[-- Attachment #2: Type: text/x-patch, Size: 1469 bytes --]
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8fcce1eab..e3bf01902 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Al McElrath <hello@yrns.org>
;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
@@ -373,13 +373,13 @@ prompt.")
(home-page "https://github.com/PandorasFox/i3lock-color")
(synopsis "Screen locker with color configuration support")
(description
- "Re-patched version of i3lock, which is a simple screen
-locker like slock. Features include:
+ "i3lock-color is a simpler X11 screen locker derived from i3lock.
+Features include:
@enumerate
-@item forking process, the locked screen is preserved when you suspend from RAM
-@item specify background color or image to be displayed in the lock screen
-@item many additional color options
+@item forking process, the locked screen is preserved when you suspend to RAM;
+@item specify background color or image to be displayed in the lock screen;
+@item many additional color options.
@end enumerate")
(license license:bsd-3)))
[-- Attachment #3: Type: text/plain, Size: 295 bytes --]
> From 9ea21f2e1c20aceff4ff12bf00cd5b31e0bf02fc Mon Sep 17 00:00:00 2001
> From: ng0 <contact.ng0@cryptolab.net>
> Date: Tue, 24 Jan 2017 15:57:13 +0000
> Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
>
> * gnu/packages/wm.scm (i3lock-fancy): New variable.
Applied, thanks!
Ludo’.
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#27083] screen-lockers: i3lock-color and i3lock-fancy
2017-12-11 13:47 ` Ludovic Courtès
@ 2017-12-11 14:03 ` ng0
0 siblings, 0 replies; 15+ messages in thread
From: ng0 @ 2017-12-11 14:03 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 27083-done, Chris Marusich
[-- Attachment #1: Type: text/plain, Size: 2934 bytes --]
Ludovic Courtès transcribed 2.8K bytes:
> Hi,
>
> ng0 <ng0@n0.is> skribis:
>
> > I wonder if it is a bug or lack of functionality in i3lock
> > or i3lock-color that I can switch to the tty when it's locked.
> > There are other screenlockers that do not allow me to do this,
> > the screen is really locked, not just tty7 or whereever your X might
> > be running.
>
> Really? I’m not sure the screen locker, which is a “regular” X11
> client, can prevent you from switching to a tty.
So in the case of i3lock* this is no proble. Upstream details:
https://github.com/meskarune/i3lock-fancy/issues/104
> > From f11bc2af6aa43cdd52c76c8640fc2d8eff71fa8d Mon Sep 17 00:00:00 2001
> > From: ng0 <contact.ng0@cryptolab.net>
> > Date: Tue, 24 Jan 2017 13:03:42 +0000
> > Subject: [PATCH 1/2] gnu: Add i3lock-color.
> >
> > * gnu/packages/wm.scm (i3lock-color): New variable.
>
> Applied with these changes:
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 8fcce1eab..e3bf01902 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -8,7 +8,7 @@
> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
> ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
> ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
> -;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
> +;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
> ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
> ;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
> ;;; Copyright © 2016 Ivan Vilata i Balaguer <ivan@selidor.net>
> @@ -373,13 +373,13 @@ prompt.")
> (home-page "https://github.com/PandorasFox/i3lock-color")
> (synopsis "Screen locker with color configuration support")
> (description
> - "Re-patched version of i3lock, which is a simple screen
> -locker like slock. Features include:
> + "i3lock-color is a simpler X11 screen locker derived from i3lock.
> +Features include:
>
> @enumerate
> -@item forking process, the locked screen is preserved when you suspend from RAM
> -@item specify background color or image to be displayed in the lock screen
> -@item many additional color options
> +@item forking process, the locked screen is preserved when you suspend to RAM;
> +@item specify background color or image to be displayed in the lock screen;
> +@item many additional color options.
> @end enumerate")
> (license license:bsd-3)))
>
Ok, thanks.
>
> > From 9ea21f2e1c20aceff4ff12bf00cd5b31e0bf02fc Mon Sep 17 00:00:00 2001
> > From: ng0 <contact.ng0@cryptolab.net>
> > Date: Tue, 24 Jan 2017 15:57:13 +0000
> > Subject: [PATCH 2/2] gnu: Add i3lock-fancy.
> >
> > * gnu/packages/wm.scm (i3lock-fancy): New variable.
>
> Applied, thanks!
>
> Ludo’.
--
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
WWW: https://n0.is
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-12-11 14:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 11:33 bug#27083: screen-lockers: i3lock-color and i3lock-fancy ng0
2017-11-17 9:55 ` [bug#27083] " Chris Marusich
2017-11-17 10:18 ` ng0
2017-11-17 20:17 ` ng0
2017-11-17 20:57 ` ng0
2017-11-17 21:02 ` ng0
2017-11-17 21:19 ` ng0
2017-11-19 11:04 ` ng0
2017-12-01 7:20 ` Chris Marusich
2017-12-01 9:27 ` ng0
2017-12-02 9:59 ` Chris Marusich
2017-12-09 13:25 ` ng0
2017-12-09 14:25 ` ng0
2017-12-11 13:47 ` Ludovic Courtès
2017-12-11 14:03 ` ng0
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.