diff options
author | xeji <36407913+xeji@users.noreply.github.com> | 2018-06-08 21:56:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 21:56:15 +0200 |
commit | 951d3cc4b90406ed760e9645c33a65b0577b3a78 (patch) | |
tree | 5a4ee3c15849ef708420f7f4ca4cfb150f2ae57f /pkgs/development | |
parent | ba210568a9193eb819711e174d6ac2843a89c088 (diff) | |
parent | 7c34c28cfaacf9cb9fcb7b169cd6a28e4c34d8d0 (diff) | |
download | nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar.gz nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar.bz2 nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar.lz nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar.xz nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.tar.zst nixlib-951d3cc4b90406ed760e9645c33a65b0577b3a78.zip |
Merge pull request #41375 from phryneas/mosh-with-libutempter
nixos/programs.mosh: refactor
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/libutempter/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/libutempter/exec_path.patch | 25 |
2 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/development/libraries/libutempter/default.nix b/pkgs/development/libraries/libutempter/default.nix index d54c82ae7f21..f9703e3c5932 100644 --- a/pkgs/development/libraries/libutempter/default.nix +++ b/pkgs/development/libraries/libutempter/default.nix @@ -13,11 +13,13 @@ stdenv.mkDerivation rec { buildInputs = [ glib ]; + patches = [ ./exec_path.patch ]; + prePatch = '' substituteInPlace Makefile --replace 2711 0711 ''; - installFlags = [ + makeFlags = [ "libdir=\${out}/lib" "libexecdir=\${out}/lib" "includedir=\${out}/include" @@ -26,6 +28,10 @@ stdenv.mkDerivation rec { meta = { 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. + On NixOS systems, this can be achieved by creating a setguid wrapper. + ''; license = licenses.lgpl21Plus; platforms = platforms.linux; maintainers = [ maintainers.msteen ]; diff --git a/pkgs/development/libraries/libutempter/exec_path.patch b/pkgs/development/libraries/libutempter/exec_path.patch new file mode 100644 index 000000000000..bd5f56611ef9 --- /dev/null +++ b/pkgs/development/libraries/libutempter/exec_path.patch @@ -0,0 +1,25 @@ +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 @@ + _exit(EXIT_FAILURE); + } + +- execv(path, argv); ++ execvp(path, argv); + #ifdef UTEMPTER_DEBUG +- fprintf(stderr, "libutempter: execv: %s\n", strerror(errno)); ++ fprintf(stderr, "libutempter: execvp: %s\n", strerror(errno)); + #endif + + while (EACCES == errno) +@@ -79,7 +79,7 @@ + if (setgid(sgid)) + break; + +- (void) execv(path, argv); ++ (void) execvp(path, argv); + break; + } + +Only in libutempter-1.1.6.patched: result |