Skip to content

Commit 1682b3d

Browse files
committed
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')
1 parent b8e83fd commit 1682b3d

File tree

4 files changed

+25
-30
lines changed

4 files changed

+25
-30
lines changed

pkgs/development/libraries/libutempter/default.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ with lib;
44

55
stdenv.mkDerivation rec {
66
pname = "libutempter";
7-
version = "1.1.6";
7+
version = "1.2.1";
88

99
src = fetchurl {
10-
url = "mirror://ubuntu/pool/main/libu/libutempter/libutempter_${version}.orig.tar.bz2";
11-
sha256 = "15y3xbgznjxnfmix4xg3bwmqdvghdw7slbhazb0ybmyf65gmd65q";
10+
url = "http://ftp.altlinux.org/pub/people/ldv/utempter/libutempter-${version}.tar.gz";
11+
sha256 = "sha256-ln/vNy85HeUBhDrYdXDGz12r2WUfAPF4MJD7wSsqNMs=";
1212
};
1313

1414
buildInputs = [ glib ];
1515

1616
patches = [ ./exec_path.patch ];
1717

18+
patchFlags = [ "-p2" ];
19+
1820
prePatch = ''
1921
substituteInPlace Makefile --replace 2711 0711
2022
'';
@@ -27,6 +29,7 @@ stdenv.mkDerivation rec {
2729
];
2830

2931
meta = {
32+
homepage = "https://github.com/altlinux/libutempter";
3033
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
3134
longDescription = ''
3235
The bundled utempter binary must be able to run as a user belonging to group utmp.

pkgs/development/libraries/libutempter/exec_path.patch

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
1-
diff -ur libutempter-1.1.6/iface.c libutempter-1.1.6.patched/iface.c
2-
--- libutempter-1.1.6/iface.c 2010-11-04 18:14:53.000000000 +0100
3-
+++ libutempter-1.1.6.patched/iface.c 2018-06-06 15:09:11.417755549 +0200
4-
@@ -60,9 +60,9 @@
1+
diff --git a/libutempter/iface.c b/libutempter/iface.c
2+
index 37c74a8..6f44c9a 100644
3+
--- a/libutempter/iface.c
4+
+++ b/libutempter/iface.c
5+
@@ -43,7 +43,7 @@
6+
__result; }))
7+
#endif
8+
9+
-#define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"
10+
+#define UTEMPTER_DEFAULT_PATHNAME "utempter"
11+
12+
static const char *utempter_pathname;
13+
static int saved_fd = -1;
14+
@@ -57,8 +57,8 @@ do_child(int master_fd, const char *path, char *const *argv)
515
_exit(EXIT_FAILURE);
616
}
717

818
- execv(path, argv);
19+
- print_dbg("execv: %s", strerror(errno));
920
+ execvp(path, argv);
10-
#ifdef UTEMPTER_DEBUG
11-
- fprintf(stderr, "libutempter: execv: %s\n", strerror(errno));
12-
+ fprintf(stderr, "libutempter: execvp: %s\n", strerror(errno));
13-
#endif
21+
+ print_dbg("execvp: %s", strerror(errno));
1422

15-
while (EACCES == errno)
16-
@@ -79,7 +79,7 @@
23+
while (EACCES == errno) {
24+
/* try saved group ID */
25+
@@ -73,7 +73,7 @@ do_child(int master_fd, const char *path, char *const *argv)
1726
if (setgid(sgid))
1827
break;
1928

2029
- (void) execv(path, argv);
2130
+ (void) execvp(path, argv);
2231
break;
2332
}
24-
25-
Only in libutempter-1.1.6.patched: result

pkgs/tools/networking/mosh/default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ stdenv.mkDerivation rec {
2424
patches = [
2525
./ssh_path.patch
2626
./mosh-client_path.patch
27-
./utempter_path.patch
2827
# Fix build with bash-completion 2.10
2928
./bash_completion_datadir.patch
3029
];

pkgs/tools/networking/mosh/utempter_path.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)