libutempter: 1.1.6 -> 1.2.1

refresh the patch to use utempter in path so patching the reverse
dependencies won't be needed anymore ('pkgs/tools/networking/mosh/utempter_path.patch')
This commit is contained in:
Artturin 2022-11-13 22:38:18 +02:00
parent b8e83fd7e1
commit 1682b3d094
4 changed files with 25 additions and 30 deletions

View File

@ -4,17 +4,19 @@ with lib;
stdenv.mkDerivation rec {
pname = "libutempter";
version = "1.1.6";
version = "1.2.1";
src = fetchurl {
url = "mirror://ubuntu/pool/main/libu/libutempter/libutempter_${version}.orig.tar.bz2";
sha256 = "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q";
url = "http://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-${version}.tar.gz";
sha256 = "sha256-ln/vNy85HeUBhDrYdXDGz12r2WUfAPF4MJD7wSsqNMs=";
};
buildInputs = [ glib ];
patches = [ ./exec_path.patch ];
patchFlags = [ "-p2" ];
prePatch = ''
substituteInPlace Makefile --replace 2711 0711
'';
@ -27,6 +29,7 @@ stdenv.mkDerivation rec {
];
meta = {
homepage = "https://github.com/altlinux/libutempter";
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
longDescription = ''
The bundled utempter binary must be able to run as a user belonging to group utmp.

View File

@ -1,19 +1,28 @@
diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c
--- libutempter-1.1.6/iface.c 2010-11-04 18:14:53.000000000 +0100
+++ libutempter-1.1.6.patched/iface.c 2018-06-06 15:09:11.417755549 +0200
@@ -60,9 +60,9 @@
diff --git a/libutempter/iface.c b/libutempter/iface.c
index 37c74a8..6f44c9a 100644
--- a/libutempter/iface.c
+++ b/libutempter/iface.c
@@ -43,7 +43,7 @@
__result; }))
#endif
-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
+#define UTEMPTER_DEFAULT_PATHNAME "utempter"
static const char *utempter_pathname;
static int saved_fd = -1;
@@ -57,8 +57,8 @@ do_child(int master_fd, const char *path, char *const *argv)
_exit(EXIT_FAILURE);
}
- execv(path, argv);
- print_dbg("execv: %s", strerror(errno));
+ execvp(path, argv);
#ifdef UTEMPTER_DEBUG
- fprintf(stderr, "libutempter: execv: %s\n", strerror(errno));
+ fprintf(stderr, "libutempter: execvp: %s\n", strerror(errno));
#endif
+ print_dbg("execvp: %s", strerror(errno));
while (EACCES == errno)
@@ -79,7 +79,7 @@
while (EACCES == errno) {
/* try saved group ID */
@@ -73,7 +73,7 @@ do_child(int master_fd, const char *path, char *const *argv)
if (setgid(sgid))
break;
@ -21,5 +30,3 @@ diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c
+ (void) execvp(path, argv);
break;
}
Only in libutempter-1.1.6.patched: result

View File

@ -24,7 +24,6 @@ stdenv.mkDerivation rec {
patches = [
./ssh_path.patch
./mosh-client_path.patch
./utempter_path.patch
# Fix build with bash-completion 2.10
./bash_completion_datadir.patch
];

View File

@ -1,14 +0,0 @@
diff -ur mosh-1.3.2/src/frontend/mosh-server.cc mosh-1.3.2.patched/src/frontend/mosh-server.cc
--- mosh-1.3.2/src/frontend/mosh-server.cc 2017-07-22 23:14:53.000000000 +0200
+++ mosh-1.3.2.patched/src/frontend/mosh-server.cc 2018-06-06 10:45:50.725352804 +0200
@@ -351,6 +351,10 @@
}
}
+#ifdef HAVE_UTEMPTER
+ utempter_set_helper( "utempter" );
+#endif
+
try {
return run_server( desired_ip, desired_port, command_path, command_argv, colors, verbose, with_motd );
} catch ( const Network::NetworkException &e ) {