unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#58356] [PATCH] Add xtrlock
@ 2022-10-07 14:01 Mehmet Tekman
  2022-10-08  5:08 ` Maxim Cournoyer
  0 siblings, 1 reply; 5+ messages in thread
From: Mehmet Tekman @ 2022-10-07 14:01 UTC (permalink / raw)
  To: 58356

---
 gnu/packages/xtrlock.scm | 71 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)
 create mode 100644 gnu/packages/xtrlock.scm

diff --git a/gnu/packages/xtrlock.scm b/gnu/packages/xtrlock.scm
new file mode 100644
index 0000000000..2acf45e8b3
--- /dev/null
+++ b/gnu/packages/xtrlock.scm
@@ -0,0 +1,71 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Mehmet Tekman <mtekman89@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages xtrlock)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages xorg)
+  #:use-module ((guix licenses) #:prefix license:)
+  )
+
+(define-public xtrlock
+  (let ((pkg-version "2.15")
+        (pkg-hash "0mgpysbvipd5h6x6zz4hng6b13gp3qjnpgny3azyj8k8dv85bppw")
+        (recipe-revision "0"))
+    (package
+      (name "xtrlock")
+      (version (string-append pkg-version ".r" recipe-revision))
+      (source (origin
+                (method url-fetch)
+                (uri (string-append
+                      "mirror://debian/pool/main/x/xtrlock/xtrlock_"
+                      pkg-version ".tar.xz"))
+                (sha256 (base32 pkg-hash))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:make-flags
+         (list "LDLIBS=-lX11 -lcrypt -lXi"
+               "CFLAGS=-Wall -DSHADOW_PWD -DMULTITOUCH")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (delete 'configure)
+           (delete 'check)
+           (add-after 'unpack 'rename-makefile
+             (lambda _
+               (rename-file "Makefile.noimake" "Makefile")
+               (rename-file "xtrlock.man" "xtrlock.1")))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (install-file "xtrlock" (string-append out "/bin/"))
+                 (install-file "xtrlock.1" (string-append out
"/share/man/man1/"))))))))
+      (native-inputs (list libx11 libxi libxfixes))
+      (home-page "https://packages.debian.org/sid/xtrlock")
+      (synopsis "Minimal X display lock program")
+      (description "xtrlock locks the X server till the user enters
their password at the
+keyboard.  While xtrlock is running, the mouse and keyboard are grabbed and
+the mouse cursor becomes a padlock.  Output displayed by X programs, and
+windows put up by new X clients, continue to be visible, and any new output is
+displayed normally.  The mouse and keyboard are returned when the user types
+their password, followed by Enter or Newline.  If an incorrect password is
+entered the bell is sounded.  Pressing Backspace or Delete erases one
+character of a password partially typed; pressing Escape or Clear clears
+anything that has been entered.")
+      (license license:gpl3))))
-- 
2.38.0




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#58356] [PATCH] Add xtrlock
  2022-10-07 14:01 [bug#58356] [PATCH] Add xtrlock Mehmet Tekman
@ 2022-10-08  5:08 ` Maxim Cournoyer
  2022-10-11 10:45   ` Mehmet Tekman
  0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2022-10-08  5:08 UTC (permalink / raw)
  To: Mehmet Tekman; +Cc: 58356

Hi Mehmet,

Mehmet Tekman <mtekman89@gmail.com> writes:

> ---
>  gnu/packages/xtrlock.scm | 71 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 71 insertions(+)
>  create mode 100644 gnu/packages/xtrlock.scm

I'd put this into (gnu packages xdisorg), next to xlockmore :-).

> diff --git a/gnu/packages/xtrlock.scm b/gnu/packages/xtrlock.scm
> new file mode 100644
> index 0000000000..2acf45e8b3
> --- /dev/null
> +++ b/gnu/packages/xtrlock.scm
> @@ -0,0 +1,71 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2022 Mehmet Tekman <mtekman89@gmail.com>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (gnu packages xtrlock)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system gnu)
> +  #:use-module (gnu packages xorg)
> +  #:use-module ((guix licenses) #:prefix license:)
> +  )

^ lonely parens, and please sort lexicographically.

> +(define-public xtrlock
> +  (let ((pkg-version "2.15")
> +        (pkg-hash "0mgpysbvipd5h6x6zz4hng6b13gp3qjnpgny3azyj8k8dv85bppw")
> +        (recipe-revision "0"))
> +    (package
> +      (name "xtrlock")
> +      (version (string-append pkg-version ".r" recipe-revision))
> +      (source (origin
> +                (method url-fetch)
> +                (uri (string-append
> +                      "mirror://debian/pool/main/x/xtrlock/xtrlock_"
> +                      pkg-version ".tar.xz"))
> +                (sha256 (base32 pkg-hash))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       '(#:make-flags
> +         (list "LDLIBS=-lX11 -lcrypt -lXi"
> +               "CFLAGS=-Wall -DSHADOW_PWD -DMULTITOUCH")

Does the build system not take care of the libraries link options
itself?

> +         #:phases
> +         (modify-phases
> +             %standard-phases

Nitpick: no need to put %standard-phases on a new line.

> +           (delete 'configure)
> +           (delete 'check)
> +           (add-after 'unpack 'rename-makefile
> +             (lambda _
> +               (rename-file "Makefile.noimake" "Makefile")
> +               (rename-file "xtrlock.man" "xtrlock.1")))
> +           (replace 'install
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let* ((out (assoc-ref outputs "out")))
> +                 (install-file "xtrlock" (string-append out "/bin/"))
> +                 (install-file "xtrlock.1" (string-append out
> "/share/man/man1/"))))))))

Use 'guix style' to have it auto-formatted.

> +      (native-inputs (list libx11 libxi libxfixes))
> +      (home-page "https://packages.debian.org/sid/xtrlock")

There must be a better home page for the upstream of xtrlock than
Debian?  Edit: apparently Debian is the upstream.  Odd!

> +      (synopsis "Minimal X display lock program")
> +      (description "xtrlock locks the X server till the user enters
> their password at the
> +keyboard.  While xtrlock is running, the mouse and keyboard are grabbed and

Please reflow the paragraph; M-j in Emacs for example.

> +the mouse cursor becomes a padlock.  Output displayed by X programs, and
> +windows put up by new X clients, continue to be visible, and any new output is
> +displayed normally.  The mouse and keyboard are returned when the user types
> +their password, followed by Enter or Newline.  If an incorrect password is
> +entered the bell is sounded.  Pressing Backspace or Delete erases one
> +character of a password partially typed; pressing Escape or Clear clears
> +anything that has been entered.")
> +      (license license:gpl3))))

This is gpl3+ (GPL 3 or later).  See the license at
https://salsa.debian.org/debian/xtrlock/-/blob/master/GPL-3.txt, it
contains the "or any later version" text.

Could you please send a v2?  You could use something like: "git
send-email -v2 --to='58356@debbugs.gnu.org' -1" to send the tip of your
branch.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#58356] [PATCH] Add xtrlock
  2022-10-08  5:08 ` Maxim Cournoyer
@ 2022-10-11 10:45   ` Mehmet Tekman
  2022-10-11 11:27     ` Mehmet Tekman
  0 siblings, 1 reply; 5+ messages in thread
From: Mehmet Tekman @ 2022-10-11 10:45 UTC (permalink / raw)
  To: 58356

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

Hello, thanks again for the review!

The following has been changed:
* Placed into xdisorg.scm just after the xlockmore recipe
* Removed the CFLAGS, but kept the LDLIBS since it won't build without them
* General formatting (lint, style)
* License fix

I found it easier to spawn a new branch off master and create a new
patch than to append to the existing branch. I hope that's okay. The
patch is attached.

Best,
Mehmet

[-- Attachment #2: 0001-gnu-Add-xtrlock.patch --]
[-- Type: application/x-patch, Size: 3184 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#58356] [PATCH] Add xtrlock
  2022-10-11 10:45   ` Mehmet Tekman
@ 2022-10-11 11:27     ` Mehmet Tekman
  2023-08-17 17:04       ` bug#58356: " Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mehmet Tekman @ 2022-10-11 11:27 UTC (permalink / raw)
  To: 58356

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

I've just noticed that though the package builds without the CFLAGS,
it doesn't work well in context to the shadow file.
I've reincluded it in this next patch (diff from master).

Best,
Mehmet

[-- Attachment #2: 0001-gnu-Add-xtrlock.patch --]
[-- Type: text/x-patch, Size: 3389 bytes --]

From aced8b924a194495233b0698f2185b9b80d10963 Mon Sep 17 00:00:00 2001
From: Mehmet Tekman <mtekman89@gmail.com>
Date: Tue, 11 Oct 2022 12:38:13 +0200
Subject: [PATCH] gnu: Add xtrlock.

* gnu/packages/xdisorg.scm (xtrlock): New variable.
---
 gnu/packages/xdisorg.scm | 49 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 9908f29191..fc25c14ea7 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -56,6 +56,7 @@
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
 ;;; Copyright © 2022 Derek Chuank <derekchuank@outlook.com>
 ;;; Copyright © 2022 Wamm K. D. <jaft.r@outlook.com>
+;;; Copyright © 2022 Mehmet Tekman <mtekman89@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1099,6 +1100,54 @@ (define-public xlockmore
     (license (license:non-copyleft #f "See xlock.c.")
              ))) ; + GPLv2 in modes/glx/biof.c.
 
+(define-public xtrlock
+  (package
+    (name "xtrlock")
+    (version "2.15")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://debian/pool/main/x/xtrlock/xtrlock_" version
+                    ".tar.xz"))
+              (sha256
+               (base32
+                "0mgpysbvipd5h6x6zz4hng6b13gp3qjnpgny3azyj8k8dv85bppw"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; LDLIBS are required for the package to build.
+     ;; CFLAGS are required for it to use the shadow file, and to
+     ;; be compatible with multi-touch devices.
+     '(#:make-flags (list "CFLAGS=-Wall -DSHADOW_PWD -DMULTITOUCH"
+                          "LDLIBS=-lX11 -lcrypt -lXi")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (delete 'check)
+                  (add-after 'unpack 'rename-makefile
+                    (lambda _
+                      (rename-file "Makefile.noimake" "Makefile")
+                      (rename-file "xtrlock.man" "xtrlock.1")))
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (install-file "xtrlock"
+                                      (string-append out "/bin/"))
+                        (install-file "xtrlock.1"
+                                      (string-append out "/share/man/man1/"))))))))
+    (inputs (list libx11 libxi libxfixes))
+    (home-page "https://packages.debian.org/sid/xtrlock")
+    (synopsis "Minimal X display lock program")
+    (description
+     "xtrlock locks the X server till the user enters their password at the
+keyboard.  While xtrlock is running, the mouse and keyboard are grabbed and
+the mouse cursor becomes a padlock.  Output displayed by X programs, and
+windows put up by new X clients, continue to be visible, and any new output is
+displayed normally.  The mouse and keyboard are returned when the user types
+their password, followed by Enter or Newline.  If an incorrect password is
+entered the bell is sounded.  Pressing Backspace or Delete erases one
+character of a password partially typed; pressing Escape or Clear clears
+anything that has been entered.")
+    (license license:gpl3+)))
+
 (define-public xosd
   (package
     (name "xosd")
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#58356: [PATCH] Add xtrlock
  2022-10-11 11:27     ` Mehmet Tekman
@ 2023-08-17 17:04       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2023-08-17 17:04 UTC (permalink / raw)
  To: Mehmet Tekman; +Cc: 58356-done

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hi,

Mehmet Tekman <mtekman89@gmail.com> skribis:

> From aced8b924a194495233b0698f2185b9b80d10963 Mon Sep 17 00:00:00 2001
> From: Mehmet Tekman <mtekman89@gmail.com>
> Date: Tue, 11 Oct 2022 12:38:13 +0200
> Subject: [PATCH] gnu: Add xtrlock.
>
> * gnu/packages/xdisorg.scm (xtrlock): New variable.

Finally applied, with the changes below.

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2661 bytes --]

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index e4049a5dc2..294a18cdd2 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -1164,22 +1164,25 @@ (define-public xtrlock
      ;; LDLIBS are required for the package to build.
      ;; CFLAGS are required for it to use the shadow file, and to
      ;; be compatible with multi-touch devices.
-     '(#:make-flags (list "CFLAGS=-Wall -DSHADOW_PWD -DMULTITOUCH"
-                          "LDLIBS=-lX11 -lcrypt -lXi")
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure)
-                  (delete 'check)
-                  (add-after 'unpack 'rename-makefile
-                    (lambda _
-                      (rename-file "Makefile.noimake" "Makefile")
-                      (rename-file "xtrlock.man" "xtrlock.1")))
-                  (replace 'install
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let* ((out (assoc-ref outputs "out")))
-                        (install-file "xtrlock"
-                                      (string-append out "/bin/"))
-                        (install-file "xtrlock.1"
-                                      (string-append out "/share/man/man1/"))))))))
+     (list #:make-flags
+           #~'("CFLAGS=-O2 -g -Wall -DSHADOW_PWD -DMULTITOUCH"
+               "LDLIBS=-lX11 -lcrypt -lXi")
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (delete 'check)
+               (add-after 'unpack 'rename-makefile
+                 (lambda _
+                   (rename-file "Makefile.noimake" "Makefile")
+                   (rename-file "xtrlock.man" "xtrlock.1")))
+               (replace 'install
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out")))
+                     (install-file "xtrlock"
+                                   (string-append out "/bin/"))
+                     (install-file "xtrlock.1"
+                                   (string-append out
+                                                  "/share/man/man1/"))))))))
     (inputs (list libx11 libxi libxfixes))
     (home-page "https://packages.debian.org/sid/xtrlock")
     (synopsis "Minimal X display lock program")
@@ -1193,7 +1196,7 @@ (define-public xtrlock
 entered the bell is sounded.  Pressing Backspace or Delete erases one
 character of a password partially typed; pressing Escape or Clear clears
 anything that has been entered.")
-    (license license:gpl3+)))
+    (license license:gpl2+)))
 
 (define-public xosd
   (package

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-17 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 14:01 [bug#58356] [PATCH] Add xtrlock Mehmet Tekman
2022-10-08  5:08 ` Maxim Cournoyer
2022-10-11 10:45   ` Mehmet Tekman
2022-10-11 11:27     ` Mehmet Tekman
2023-08-17 17:04       ` bug#58356: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).