unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sergey Trofimov <sarg@sarg.org.ru>
To: 62251@debbugs.gnu.org
Cc: Sergey Trofimov <sarg@sarg.org.ru>
Subject: [bug#62251] [PATCH v2] gnu: Add physlock.
Date: Sat, 18 Mar 2023 15:28:44 +0100	[thread overview]
Message-ID: <20230318142844.6457-1-sarg@sarg.org.ru> (raw)
In-Reply-To: <20230318082048.4296-1-sarg@sarg.org.ru>

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

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 308fa131d6..d87857d4ff 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2314,6 +2314,49 @@ (define-public xss-lock
       (home-page "https://bitbucket.org/raymonad/xss-lock")
       (license license:expat))))
 
+(define-public physlock
+  (package
+    (name "physlock")
+    (version "13")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/xyb3rt/physlock")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1mz4xxjip5ldiw9jgfq9zvqb6w10bcjfx6939w1appqg8f521a7s"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+
+               (add-after 'unpack 'fix-makefile
+                 (lambda _
+                   (substitute* "main.c" ; remove extra newline in the prompt
+                     (("(fprintf.vt.ios, .%s.)\\n(., options->prompt)" all start end)
+                      (string-append start end)))
+                   (substitute* "Makefile" (("-m 4755 -o root -g root") "")))))
+
+           #:make-flags
+           #~(list "HAVE_SYSTEMD=0" "HAVE_ELOGIND=1"
+                   (string-append "CC=" #$(cc-for-target))
+                   (string-append "PREFIX=" #$output))))
+    (native-inputs (list linux-pam elogind))
+    (synopsis
+     "Screen lock utility that locks all virtual terminals at once.")
+    (description
+     "physlock only allows the user of the active session (the user logged into the
+foreground virtual terminal) to unlock the computer, and uses PAM for authentication.
+It is an alternative to @command{vlock -an}, written to overcome vlock's limitations
+regarding hibernate and suspend.  physlock has a very minimal interface, which is just
+a password prompt displayed in a tty console.")
+    (home-page "https://github.com/xyb3rt/physlock")
+    (license license:gpl2+)))
+
 (define-public python-pyperclip
   (package
     (name "python-pyperclip")
-- 
2.39.2





  parent reply	other threads:[~2023-03-18 14:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  8:20 [bug#62251] [PATCH] gnu: Add physlock Sergey Trofimov
2023-03-18  9:49 ` [bug#62251] [PATCH v1] " Sergey Trofimov
2023-03-18 14:28 ` Sergey Trofimov [this message]
2023-03-26  6:05   ` bug#62251: [PATCH v2] " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230318142844.6457-1-sarg@sarg.org.ru \
    --to=sarg@sarg.org.ru \
    --cc=62251@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).