git.iko.soy/typeable/nixpkgs
on master help sign in
nxproxy, libxcomp: nxlibs 3.5.0.{31 -> 32}

Removes the need for patching (for now).

commit98e7674e88162fc0b6517faa962233c8b3ae75e4 authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> dateThu 9 Jul 2015, 02:39 (11 years ago) parent26e44a0
3 files changed+6−75
pkgs/development/libraries/libxcomp/default.nix+3−2 pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch−67 pkgs/tools/admin/nxproxy/default.nix+3−6
pkgs/development/libraries/libxcomp/default.nix+3−2
@@ -1,15 +1,16 @@
11{ stdenv, fetchurl, autoreconfHook, libjpeg, libpng12, libX11, zlib }:
22
3−let version = "3.5.0.31"; in
3+let version = "3.5.0.32"; in
44stdenv.mkDerivation {
55 name = "libxcomp-${version}";
66
77 src = fetchurl {
8− sha256 = "1hi3xrjzr37zs72djw3k7gj6mn2bsihfw1iysl8l0i85jl6sdfkd";
8+ sha256 = "02n5bdc1jsq999agb4w6dmdj5l2wlln2lka84qz6rpswwc59zaxm";
99 url = "http://code.x2go.org/releases/source/nx-libs/nx-libs-${version}-lite.tar.gz";
1010 };
1111
1212 meta = with stdenv.lib; {
13+ inherit version;
1314 description = "NX compression library";
1415 homepage = "http://wiki.x2go.org/doku.php/wiki:libs:nx-libs";
1516 license = licenses.gpl2;
pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patchdeleted−67
@@ -1,67 +0,0 @@
1−commit f982cbc85e9ffff24a6a348c3637b54a7e8cbc34
2−Author: Vadim Troshchinskiy <vtroshchinskiy@qindel.com>
3−Date: Wed May 20 15:47:45 2015 +0200
4−
5−Fix negotiation in stage 10 error
6−
7−Problem fixed by adding a select() call to implement a timeout,
8−and retrying writes if needed.
9−
10−v2: backport to nx-libs 3.5.0.x (Mihai Moldovan)
11−
12−--- a/nxcomp/Loop.cpp
13−+++ b/nxcomp/Loop.cpp
14−@@ -8073,16 +8073,52 @@ int ReadRemoteData(int fd, char *buffer,
15− int WriteLocalData(int fd, const char *buffer, int size)
16− {
17− int position = 0;
18−+ int ret = 0;
19−+ fd_set writeSet;
20−+ struct timeval selectTs = {30, 0};
21−
22− while (position < size)
23− {
24−+
25−+ // A write to a non-blocking socket may fail with EAGAIN. The problem is
26−+ // that cache data is done in several writes, and there's no easy way
27−+ // to handle failure without rewriting a significant amount of code.
28−+ //
29−+ // Bailing out of the outer loop would result in restarting the sending
30−+ // of the entire cache list, which would confuse the other side.
31−+
32−+ FD_ZERO(&writeSet);
33−+ FD_SET(fd, &writeSet);
34−+
35−+ ret = select(fd+1, NULL, &writeSet, NULL, &selectTs);
36−+
37−+ #ifdef DEBUG
38−+ *logofs << "Loop: WriteLocalData: select() returned with a code of " << ret << " and remaining timeout of "
39−+ << selectTs.tv_sec << " sec, " << selectTs.tv_usec << "usec\n" << logofs_flush;
40−+ #endif
41−+
42−+ if ( ret < 0 )
43−+ {
44−+ *logofs << "Loop: Error in select() when writing data to FD#" << fd << ": " << strerror(EGET()) << "\n" << logofs_flush;
45−+
46−+ if ( EGET() == EINTR )
47−+ continue;
48−+
49−+ return -1;
50−+ }
51−+ else if ( ret == 0 )
52−+ {
53−+ *logofs << "Loop: Timeout expired in select() when writing data to FD#" << fd << ": " << strerror(EGET()) << "\n" << logofs_flush;
54−+ return -1;
55−+ }
56−+
57− int result = write(fd, buffer + position, size - position);
58−
59− getNewTimestamp();
60−
61− if (result <= 0)
62− {
63−- if (result < 0 && EGET() == EINTR)
64−+ if (result < 0 && (EGET() == EINTR || EGET() == EAGAIN || EGET() == EWOULDBLOCK))
65− {
66− continue;
67− }
pkgs/tools/admin/nxproxy/default.nix+3−6
@@ -1,15 +1,16 @@
11{ stdenv, fetchurl, autoreconfHook, libxcomp }:
22
3−let version = "3.5.0.31"; in
3+let version = "3.5.0.32"; in
44stdenv.mkDerivation {
55 name = "nxproxy-${version}";
66
77 src = fetchurl {
8− sha256 = "1hi3xrjzr37zs72djw3k7gj6mn2bsihfw1iysl8l0i85jl6sdfkd";
8+ sha256 = "02n5bdc1jsq999agb4w6dmdj5l2wlln2lka84qz6rpswwc59zaxm";
99 url = "http://code.x2go.org/releases/source/nx-libs/nx-libs-${version}-lite.tar.gz";
1010 };
1111
1212 meta = with stdenv.lib; {
13+ inherit version;
1314 description = "NX compression proxy";
1415 homepage = "http://wiki.x2go.org/doku.php/wiki:libs:nx-libs";
1516 license = licenses.gpl2;
@@ -17,10 +18,6 @@ stdenv.mkDerivation {
1718 maintainers = with maintainers; [ nckx ];
1819 };
1920
20− patches = [
21− ./0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch
22− ];
23−
2421 buildInputs = [ libxcomp ];
2522 nativeBuildInputs = [ autoreconfHook ];
2623