--- nxcl-0.9.orig/debian/changelog +++ nxcl-0.9/debian/changelog @@ -0,0 +1,26 @@ +nxcl (0.9-3ubuntu1) natty; urgency=low + + * Disable strict host key checking so qtnx doesn't hang. + + -- Stéphane Graber Tue, 22 Feb 2011 10:21:09 -0500 + +nxcl (0.9-3) unstable; urgency=low + + * Add patch gcc4.3-ftbfs (Closes: #474859) + * remove autoconf cruft in clean + + -- Matthew Johnson Thu, 10 Apr 2008 12:09:06 +0100 + +nxcl (0.9-2) unstable; urgency=low + + * Move libnxcl-dev to libdevel + + -- Matthew Johnson Sun, 16 Mar 2008 13:30:58 +0000 + +nxcl (0.9-1) unstable; urgency=low + + * Initial packaging for Debian (Closes: #470621) + * Add patch allowing use of normal ssh via patched nxproxy + (from Fabian Franz FabianFranz at gmx.de) + + -- Matthew Johnson Wed, 12 Mar 2008 11:01:08 +0000 --- nxcl-0.9.orig/debian/libnxcl-dev.install +++ nxcl-0.9/debian/libnxcl-dev.install @@ -0,0 +1,6 @@ +usr/include +usr/lib/libnxcl.so +usr/lib/libnxcl.la +usr/lib/libnxcl.a +usr/lib/pkgconfig +usr/doc/nxcl-* usr/share/doc/libnxcl-dev --- nxcl-0.9.orig/debian/libnxcl-bin.install +++ nxcl-0.9/debian/libnxcl-bin.install @@ -0,0 +1 @@ +usr/bin --- nxcl-0.9.orig/debian/copyright +++ nxcl-0.9/debian/copyright @@ -0,0 +1,25 @@ +This package was created by Matthew Johnson on Fri Mar 7 11:53:56 GMT 2008 + +The software was downloaded from svn://svn.berlios.de/freenx/tags/nxcl-0.9 + +Copyright (c) 2007 Seb James + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 51 + Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +The packaging for Debian is copyright 2007 Matthew Johnson and is released +under the GPL version 2. On Debian systems, the complete text of the GNU +General Public License can be found in `/usr/share/common-licenses/GPL'. + --- nxcl-0.9.orig/debian/control +++ nxcl-0.9/debian/control @@ -0,0 +1,34 @@ +Source: nxcl +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Matthew Johnson +Build-Depends: debhelper (>=5), automake, autoconf, doxygen, libstdc++-dev, libdbus-1-dev, libx11-dev, quilt (>= 0.40), libtool +Standards-Version: 3.7.3 +Section: x11 + +Package: libnxcl1 +Section: x11 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ssh-client, nxproxy +Description: NX X compression client library + NX provides a differential X compression system for X11. + . + This package provides the client library. + +Package: libnxcl-dev +Section: libdevel +Architecture: any +Depends: libnxcl1 (= ${binary:Version}), ${misc:Depends} +Description: NX X compression client library---headers + NX provides a differential X compression system for X11. + . + This package provides the client library headers. + +Package: libnxcl-bin +Section: x11 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: NX X compression client library---runtime + NX provides a differential X compression system for X11. + . + This package provides the runtime binaries for the nx client libraries. --- nxcl-0.9.orig/debian/compat +++ nxcl-0.9/debian/compat @@ -0,0 +1 @@ +5 --- nxcl-0.9.orig/debian/libnxcl1.install +++ nxcl-0.9/debian/libnxcl1.install @@ -0,0 +1,2 @@ +usr/lib/libnxcl.so.1.0.0 +usr/lib/libnxcl.so.1 --- nxcl-0.9.orig/debian/rules +++ nxcl-0.9/debian/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +configure: configure-stamp +configure-stamp: patch + dh_testdir + + autoreconf -is + ./configure --prefix=/usr + + touch $@ + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + + $(MAKE) + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + [ ! -f Makefile ] || $(MAKE) clean + rm -f config.guess config.sub ltmain.sh install-sh missing depcomp + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_install --sourcedir=debian/tmp + dh_makeshlibs + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_shlibdeps + dh_strip + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build configure clean binary-indep binary-arch binary install + --- nxcl-0.9.orig/debian/patches/series +++ nxcl-0.9/debian/patches/series @@ -0,0 +1,3 @@ +nxproxy-stdin +gcc4.3-ftbfs +no-keycheck --- nxcl-0.9.orig/debian/patches/gcc4.3-ftbfs +++ nxcl-0.9/debian/patches/gcc4.3-ftbfs @@ -0,0 +1,37 @@ +Index: nxcl-0.9/lib/notQt.cpp +=================================================================== +--- nxcl-0.9.orig/lib/notQt.cpp 2008-04-10 11:05:10.338942907 +0000 ++++ nxcl-0.9/lib/notQt.cpp 2008-04-10 11:05:10.338942907 +0000 +@@ -19,6 +19,7 @@ + + #include + #include ++#include + extern "C" { + #include + #include +Index: nxcl-0.9/lib/nxclientlib.cpp +=================================================================== +--- nxcl-0.9.orig/lib/nxclientlib.cpp 2008-04-10 11:05:10.338942907 +0000 ++++ nxcl-0.9/lib/nxclientlib.cpp 2008-04-10 11:05:10.338942907 +0000 +@@ -42,6 +42,8 @@ + #include + #include + #include ++ #include ++ #include + } + + /* +Index: nxcl-0.9/nxcl/nxcl.cpp +=================================================================== +--- nxcl-0.9.orig/nxcl/nxcl.cpp 2008-04-10 11:06:21.840797475 +0000 ++++ nxcl-0.9/nxcl/nxcl.cpp 2008-04-10 11:06:47.841471864 +0000 +@@ -29,6 +29,7 @@ + extern "C" { + #include + #include ++#include + } + + using namespace nxcl; --- nxcl-0.9.orig/debian/patches/no-keycheck +++ nxcl-0.9/debian/patches/no-keycheck @@ -0,0 +1,12 @@ +=== modified file 'nxcl/lib/nxclientlib.cpp' +--- nxcl/lib/nxclientlib.cpp 2011-02-22 15:16:47 +0000 ++++ nxcl/lib/nxclientlib.cpp 2011-02-22 15:18:46 +0000 +@@ -243,6 +243,7 @@ + arguments.push_back ("-oRSAAuthentication no"); + arguments.push_back ("-oRhostsRSAAuthentication no"); + arguments.push_back ("-oPubkeyAuthentication yes"); ++ arguments.push_back ("-oStrictHostKeyChecking no"); + // FF-FIXME: Perhaps the user wants to login as user directly + //arguments.push_back ("-c nxserver"); + + --- nxcl-0.9.orig/debian/patches/nxproxy-stdin +++ nxcl-0.9/debian/patches/nxproxy-stdin @@ -0,0 +1,366 @@ +diff -urN nxcl-0.9/lib/notQt.cpp nxcl/lib/notQt.cpp +--- nxcl-0.9/lib/notQt.cpp 2008-03-12 10:01:57.007236159 +0000 ++++ nxcl/lib/notQt.cpp 2008-03-12 09:57:34.500868168 +0000 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + } + +@@ -52,7 +53,8 @@ + progName("unknown"), + error (NOTQPROCNOERROR), + pid(0), +- signalledStart(false) ++ signalledStart(false), ++ parentFD(-1) + { + // Set up the polling structs + this->p = static_cast(malloc (2*sizeof (struct pollfd))); +@@ -62,6 +64,15 @@ + notQProcess::~notQProcess () + { + free (this->p); ++ if (parentFD != -1) ++ { ++ close(parentFD); ++ parentFD=-1; ++ } ++ // FIXME: this should be closed here ++ // close (parentToChild[READING_END]); ++ // close (childToParent[WRITING_END]); ++ // close (childErrToParent[WRITING_END]); + } + + void +@@ -84,10 +95,18 @@ + // NB: The first item in the args list should be the program name. + this->progName = program; + ++#ifdef NXCL_USE_NXSSH + // Set up our pipes + if (pipe(parentToChild) == -1 || pipe(childToParent) == -1 || pipe(childErrToParent) == -1) { + return NOTQTPROCESS_FAILURE; + } ++#else /* We need a socketpair for that to work */ ++ if (socketpair(AF_UNIX, SOCK_STREAM, 0, parentToChild) == -1 || pipe(childErrToParent) == -1) ++ return NOTQTPROCESS_FAILURE; ++ ++ childToParent[READING_END]=dup(parentToChild[WRITING_END]); ++ childToParent[WRITING_END]=dup(parentToChild[READING_END]); ++#endif + + this->pid = fork(); + +diff -urN nxcl-0.9/lib/notQt.h nxcl/lib/notQt.h +--- nxcl-0.9/lib/notQt.h 2008-03-12 10:01:57.007236159 +0000 ++++ nxcl/lib/notQt.h 2008-03-12 09:57:34.500868168 +0000 +@@ -117,6 +117,18 @@ + pid_t getPid (void) { return this->pid; } + int getError (void) { return this->error; } + void setError (int e) { this->error = e; } ++ ++ int getParentFD() ++ { ++ this->parentFD = this->parentToChild[1]; ++ close(this->childToParent[0]); ++ ++ // Create new pipes ++ pipe(this->parentToChild); ++ pipe(this->childToParent); ++ ++ return this->parentFD; ++ } + + /*! + * Setter for the callbacks. +@@ -180,6 +192,11 @@ + * Pointer to a callback object + */ + notQProcessCallbacks * callbacks; ++ ++ /*! ++ * old parent FD for comm with child ++ */ ++ int parentFD; + }; + + /*! +diff -urN nxcl-0.9/lib/nxclientlib.cpp nxcl/lib/nxclientlib.cpp +--- nxcl-0.9/lib/nxclientlib.cpp 2008-03-12 10:01:57.007236159 +0000 ++++ nxcl/lib/nxclientlib.cpp 2008-03-12 09:57:34.500868168 +0000 +@@ -8,7 +8,8 @@ + : Author: Sebastian James + : (C) 2008 Defuturo Ltd + : Author: George Wright +- email : seb@esfnet.co.uk, gwright@kde.org ++ : (C) 2008 Fabian Franz ++ email : seb@esfnet.co.uk, gwright@kde.org, freenx@fabian-franz.de + ***************************************************************************/ + + /*************************************************************************** +@@ -28,6 +29,14 @@ + + #include + ++// Define to use nxssh ++#if defined(NXCL_CYGWIN) || defined(NXCL_DARWIN) ++ ++// FF-FIXME That does not work. ++//#define NXCL_USE_NXSSH 1 ++ ++#endif ++ + extern "C" { + #include + #include +@@ -186,10 +195,14 @@ + + // Start to build the arguments for the nxssh command. + // notQProcess requires that argv[0] contains the program name ++#ifdef NXCL_USE_NXSSH + arguments.push_back ("nxssh"); + + argtmp << "-nx"; + arguments.push_back (argtmp.str()); ++#else ++ arguments.push_back ("ssh"); ++#endif + + argtmp.str(""); + argtmp << "-p" << port; +@@ -215,6 +228,7 @@ + } + + argtmp.str(""); ++ // FF-FIXME: Perhaps the user wants to login as user directly + argtmp << "nx@" << serverHost; + arguments.push_back (argtmp.str()); + +@@ -227,9 +241,13 @@ + arguments.push_back ("-oRSAAuthentication no"); + arguments.push_back ("-oRhostsRSAAuthentication no"); + arguments.push_back ("-oPubkeyAuthentication yes"); ++ // FF-FIXME: Perhaps the user wants to login as user directly ++ //arguments.push_back ("-c nxserver"); + + if (encryption == true) { ++#ifdef NXCL_USE_NXSSH + arguments.push_back("-B"); ++#endif + session.setEncryption (true); + } else { + session.setEncryption (false); +@@ -240,10 +258,16 @@ + // nxssh -E gives this message when called: + // NX> 285 Enabling skip of SSH config files + // ...so there you have the meaning. ++#ifdef NXCL_USE_NXSSH + arguments.push_back ("-E"); ++#endif + + // Find a path for the nxssh process using getPath() ++#ifdef NXCL_USE_NXSSH + string nxsshPath = this->getPath ("nxssh"); ++#else ++ string nxsshPath = this->getPath ("ssh"); ++#endif + + this->nxsshProcess->start(nxsshPath, arguments); + +@@ -365,8 +389,9 @@ + + // On some connections this is sent via stdout instead of stderr? + if (proxyData.encrypted && readyForProxy && +- ((*msgiter).find("NX> 999 Bye")!=string::npos)) { +- ++ ((*msgiter).find("NX> 999 Bye")!=string::npos)) ++#ifdef NXCL_USE_NXSSH ++ { + // This is "NX> 299 Switching connection to: " in + // version 1.5.0. This was changed in nxssh version + // 2.0.0-8 (see the nxssh CHANGELOG). +@@ -388,6 +413,11 @@ + this->externalCallbacks->connectedSuccessfullySignal(); + this->sessionRunning = true; + } ++#else /* don't use nxssh, start nxproxy -stdin */ ++ { ++ invokeProxy(); ++ } ++#endif + + if ((*msgiter).find("Password") != string::npos) { + this->externalCallbacks->write +@@ -402,6 +432,9 @@ + dbgln ("NXClientLib::processParseStdout: Got auth failed" + " or capacity reached, calling this->parseSSH."); + msg = this->parseSSH (*msgiter); ++#ifndef NXCL_USE_NXSSH ++ this->isFinished = true; ++#endif + } + if (msg.size() > 0) { + this->write (msg); +@@ -436,7 +469,9 @@ + + (*msgiter) + "'(end msg)"); + + if (proxyData.encrypted && readyForProxy && +- ((*msgiter).find("NX> 999 Bye") != string::npos)) { ++ ((*msgiter).find("NX> 999 Bye") != string::npos)) ++#ifdef NXCL_USE_NXSSH ++ { + + string switchCommand = "NX> 299 Switch connection to: "; + stringstream ss; +@@ -478,6 +513,11 @@ + _("SSH host key verification failed")); + this->isFinished = true; + } ++#else /* don't use nxssh, use nxproxy -stdin */ ++ { ++ invokeProxy(); ++ } ++#endif + } + } + +@@ -580,21 +620,41 @@ + this->externalCallbacks->serverCapacitySignal(); + this->isFinished = true; + +- } else if ++ } ++#ifdef NXCL_USE_NXSSH ++ else if + (message.find ("NX> 204 Authentication failed.") != string::npos) { + + this->externalCallbacks->write + (204, _("NX SSH Authentication Failed, finishing")); + this->isFinished = true; + } ++#endif + + if (message.find("NX> 710 Session status: running") != string::npos) { + + this->externalCallbacks->write + (710, _("Session status is \"running\"")); ++ } ++ ++ // FF-FIXME: This is technically incorrect as the proxy is just ready once 1002 and 1006 have ++ // been sent. ++ if (message.find("NX> 710 Session status: running") != string::npos) { ++ ++ //this->externalCallbacks->write ++ // (1006, _("Session status is \"running\"")); ++ ++#ifdef NXCL_USE_NXSSH + invokeProxy(); ++#else ++ if (!proxyData.encrypted) ++ invokeProxy(); ++#endif + session.wipeSessions(); +- rMessage = "bye\n"; ++ if (proxyData.encrypted) ++ rMessage = "bye\n"; ++ else ++ rMessage = "quit\n"; + } + + return rMessage; +@@ -700,18 +760,24 @@ + stringstream data; + + if (proxyData.encrypted) { ++#ifdef NXCL_USE_NXSSH + data << "nx/nx" << x11Display << ",session=session,encryption=1,cookie=" + << proxyData.cookie + << ",id=" << proxyData.id << ",listen=" + << proxyData.port << ":" << proxyData.display << "\n"; + // may also need shmem=1,shpix=1,font=1,product=... ++#else ++ data << "nx/nx" << x11Display << ",session=session,encryption=1,cookie=" ++ << proxyData.cookie ++ << ",id=" << proxyData.id << ":" << proxyData.display << "\n"; ++#endif + + } else { +- // Not tested yet ++ // Not tested yet, FF-FIXME: Test + data << "nx/nx" << x11Display << ",session=session,cookie=" << proxyData.cookie +- << ",id=" << proxyData.id +- // << ",connect=" << proxyData.server << ":" << proxyData.display +- << ",listen=" << proxyData.port << ":" << proxyData.display ++ << ",connect=" << proxyData.server << ":" << proxyData.port ++ << ",id=" << proxyData.id << ":" << proxyData.display ++ //<< ",listen=" << proxyData.port << ":" << proxyData.display + << "\n"; + } + +@@ -726,10 +792,23 @@ + list arguments; + arguments.push_back("nxproxy"); // argv[0] has to be the program name + arguments.push_back("-S"); ++ + ss.str(""); +- ss << "options=" << nxdir; +- ss << ":" << proxyData.display; +- arguments.push_back(ss.str()); ++ ss << "nx/nx,options=" << nxdir << ":" << proxyData.display; ++ ++ setenv("NX_DISPLAY", ss.str().c_str(), 1); ++ ++#ifndef NXCL_USE_NXSSH ++ if (proxyData.encrypted) ++ { ++ ss.str(""); ++ ss << this->nxsshProcess->getParentFD(); ++ fprintf(stderr, "NX_COMMFD=%d", this->nxsshProcess->getParentFD()); ++ setenv("NX_COMMFD", ss.str().c_str(), 1); ++ // FF-FIXME: need to wait for 2 secs due to race condition with "bye" in buffer ++ sleep(2); ++ } ++#endif + + // Find a path for the nxproxy process using getPath() + string nxproxyPath = this->getPath ("nxproxy"); +diff -urN nxcl-0.9/lib/nxsession.cpp nxcl/lib/nxsession.cpp +--- nxcl-0.9/lib/nxsession.cpp 2008-03-12 10:01:57.007236159 +0000 ++++ nxcl/lib/nxsession.cpp 2008-03-12 09:57:34.500868168 +0000 +@@ -69,6 +69,7 @@ + int response = parseResponse (message); + string returnMessage; + ++#ifdef NXCL_USE_NXSSH + if (response == 211) { + if (doSSH == true) { + returnMessage = "yes"; +@@ -80,6 +81,7 @@ + if (response == 204) { // Authentication failed + returnMessage = "204"; + } ++#endif + + if (response == 147) { // Server capacity reached + returnMessage = "147"; +@@ -90,6 +92,17 @@ + case HELLO_NXCLIENT: + dbgln ("HELLO_NXCLIENT stage"); + ++ if (message.find("Are you sure you want to continue connecting (yes/no)?") != string::npos) ++ returnMessage = "yes"; // FF-FIXME: Or 211? ++ ++ if (message.find("assword") != string::npos) ++ returnMessage = nxPassword; // FF-FIXME: -> What to do? What to do? ++ ++ if (message.find("Permission denied") != string::npos || ++ message.find("su: Authentication failure") != string::npos || ++ message.find("Unknown id:") != string::npos) ++ returnMessage = "204"; // Authentication failed ++ + if (message.find("HELLO NXSERVER - Version") != string::npos) { + this->callbacks->authenticatedSignal(); + returnMessage = "hello NXCLIENT - Version ";