[PATCH] gnu: Add physlock.

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Sergey Trofimov
Owner
unassigned
Submitted by
Sergey Trofimov
Severity
normal

Debbugs page

Sergey Trofimov wrote 2 years ago
(address . guix-patches@gnu.org)(name . Sergey Trofimov)(address . sarg@sarg.org.ru)
20230318082048.4296-1-sarg@sarg.org.ru
* gnu/packages/xdisorg.scm (physlock): New variable.
---
gnu/packages/xdisorg.scm | 45 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 308fa131d6..6c6b6b2c90 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2314,6 +2314,51 @@ (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
+ `(#:tests? #f ;no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+
+ (add-after 'unpack 'fix-makefile
+ (lambda _
+ (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
+ "Control physical access to a linux computer by locking all of its
+virtual terminals.")
+ (description
+ "physlock only allows the user of the active session (the user logged in
+on the foreground virtual terminal) and the root user to unlock the computer
+and uses PAM for authentication.
+
+physlock uses 3 mechanisms to detect the user of the active session:
+- Querying elogind(8)
+- Searching the utmp file for an entry whose ut_line field is the base name of
+the active tty device file
+- Using the owner of the active tty device file typically set by login(1)")
+ (home-page "https://github.com/xyb3rt/physlock")
+ (license license:gpl2)))
+
(define-public python-pyperclip
(package
(name "python-pyperclip")
--
2.39.2
Sergey Trofimov wrote 2 years ago
[PATCH v1] gnu: Add physlock.
(address . 62251@debbugs.gnu.org)(name . Sergey Trofimov)(address . sarg@sarg.org.ru)
20230318094947.25922-1-sarg@sarg.org.ru
* gnu/packages/xdisorg.scm (physlock): New variable.
---
gnu/packages/xdisorg.scm | 47 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 308fa131d6..66e1a5d340 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2314,6 +2314,53 @@ (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* "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
+ "Control physical access to a linux computer by locking all of its
+virtual terminals.")
+ (description
+ "physlock only allows the user of the active session (the user logged in
+on the foreground virtual terminal) and the root user to unlock the computer
+and uses PAM for authentication.
+
+physlock uses 3 mechanisms to detect the user of the active session:
+@enumerate
+@item Querying elogind(8)
+@item Searching the utmp file for an entry whose ut_line field is the base name of
+the active tty device file
+@item Using the owner of the active tty device file typically set by login(1)
+@end enumerate")
+ (home-page "https://github.com/xyb3rt/physlock")
+ (license license:gpl2)))
+
(define-public python-pyperclip
(package
(name "python-pyperclip")
--
2.39.2
Sergey Trofimov wrote 2 years ago
[PATCH v2] gnu: Add physlock.
(address . 62251@debbugs.gnu.org)(name . Sergey Trofimov)(address . sarg@sarg.org.ru)
20230318142844.6457-1-sarg@sarg.org.ru
* gnu/packages/xdisorg.scm (physlock): New variable.
---
gnu/packages/xdisorg.scm | 43 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
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
Liliana Marie Prikler wrote 2 years ago
9d63e0093af39b81b68375d3df380608889900e3.camel@gmail.com
Am Samstag, dem 18.03.2023 um 15:28 +0100 schrieb Sergey Trofimov:
Toggle quote (1 lines)
> * gnu/packages/xdisorg.scm (physlock): New variable.
Pushed.

Thanks
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62251@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62251
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help