about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libutempter
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/libutempter
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libutempter')
-rw-r--r--nixpkgs/pkgs/development/libraries/libutempter/default.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch31
2 files changed, 26 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libutempter/default.nix b/nixpkgs/pkgs/development/libraries/libutempter/default.nix
index 6c0406bf4013..717418e686b4 100644
--- a/nixpkgs/pkgs/development/libraries/libutempter/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libutempter/default.nix
@@ -1,20 +1,20 @@
 { stdenv, fetchurl, lib, glib }:
 
-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
   '';
@@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
     "mandir=\${out}/share/man"
   ];
 
-  meta = {
+  meta = with lib; {
+    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.
diff --git a/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch b/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch
index bd5f56611ef9..da3fe110fb67 100644
--- a/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch
+++ b/nixpkgs/pkgs/development/libraries/libutempter/exec_path.patch
@@ -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