summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2017-06-09 19:01:00 +0200
committerHartmut Goebel <h.goebel@crazy-compilers.com>2021-01-31 16:25:56 +0100
commit7b5f25c2cef7fdc76f5fe66d570e3e2fadd326be (patch)
tree0bdad5048e2bde0a6191ef79ff40715a651b0706
parent1b5832023a21ff88030dc747f70c06562b837475 (diff)
gnu: Add utempter -- TODO later
Todo: - suid prog - create user * gnu/packages/screen.scm (utempter): New variable.
-rw-r--r--gnu/packages/screen.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index 0491731e20..41dcf7795d 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -27,6 +27,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+;-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages hurd)
@@ -185,3 +186,57 @@ reptyr to grab it, and then kill the @code{ssh} session and head on home.")
;; Reptyr currently does not support mips.
(supported-systems (delete "mips64el-linux" %supported-systems))
(license expat)))
+
+(define-public libutempter
+ (package
+ (name "libutempter")
+ (version "1.1.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "ftp://ftp.altlinux.org/pub/people/ldv/utempter/"
+ "libutempter-" version ".tar.bz2"))
+ (sha256
+ (base32 "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;; no tests
+ ;; hand-crafted Makefile uses DESTDIR instead of PREFIX
+ #:make-flags (list (string-append "DESTDIR=" %output)
+ "CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* "Makefile"
+ (("^libexecdir\\s+=\\s+.*$")
+ "libexecdir = /usr/lib/libexec\n")
+ (("dir\\s+=\\s+/usr/") "dir = /"))
+ #t))
+ (add-after 'install 'link-binary
+ (lambda _
+ (let ((sbin (string-append %output "/sbin")))
+ (mkdir-p sbin)
+ (symlink "../lib/libexec/utempter/utempter"
+ (string-append sbin "/utempter")))
+ #t)))))
+ (home-page "")
+ (synopsis "A privileged helper for utmp/wtmp updates")
+ (description "The libutempter library provides interface for terminal
+emulators such as screen and xterm to record user sessions to utmp and wtmp
+files.
+
+The utempter is a privileged helper used by libutempter library to manipulate
+utmp and wtmp files.")
+ (license lgpl2.1+)))
+
+;; (define utempter-setuid-programs
+;; ;; Return the file name of the setuid program that we need.
+;; (match-lambda
+;; (($ <dbus-configuration> dbus services)
+;; (list (file-append dbus "/libexec/utempter/utempter")))))
+
+;; chown root:utmp …/lib/utempter/utempter
+;; chmod 2755 …/lib/utempter/utempter
+;;/usr/sbin/groupadd -r -f utmp
+;;/usr/sbin/groupadd -r -f utempter