[freenx-server] Patch to work with ncat in F-18+ (#891109).

Ville Skyttä scop at fedoraproject.org
Wed Jan 9 21:53:57 UTC 2013


commit 3e273350a0a7d5e0a8069af8410fdede50eae69f
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Jan 9 23:53:49 2013 +0200

    Patch to work with ncat in F-18+ (#891109).
    
    - Add Documentation field to systemd service.

 freenx-server-0.7.3-ncat-891109.patch |   74 +++++++++++++++++++++++++++++++++
 freenx-server.service                 |    1 +
 freenx-server.spec                    |   17 +++++++-
 3 files changed, 90 insertions(+), 2 deletions(-)
---
diff --git a/freenx-server-0.7.3-ncat-891109.patch b/freenx-server-0.7.3-ncat-891109.patch
new file mode 100644
index 0000000..6a5987c
--- /dev/null
+++ b/freenx-server-0.7.3-ncat-891109.patch
@@ -0,0 +1,74 @@
+diff -up freenx-server-0.7.3/node.conf.sample~ freenx-server-0.7.3/node.conf.sample
+--- freenx-server-0.7.3/node.conf.sample~	2013-01-04 20:21:54.802989341 +0200
++++ freenx-server-0.7.3/node.conf.sample	2013-01-04 20:26:24.468442246 +0200
+@@ -548,8 +548,8 @@
+ # 'umount.cifs'.
+ #COMMAND_SMBUMOUNT_CIFS=/sbin/umount.cifs
+ 
+-# The key that contains the name of the complete path of the 'netcat' command.
+-#COMMAND_NETCAT=netcat
++# The key that contains the name of the complete path of the 'ncat' command.
++#COMMAND_NETCAT=ncat
+ 
+ # The key that contains the name of the complete path of the 'ssh' and
+ # 'ssh-keygen' command.
+diff -up freenx-server-0.7.3/nxloadconfig~ freenx-server-0.7.3/nxloadconfig
+--- freenx-server-0.7.3/nxloadconfig~	2013-01-04 20:21:54.800989309 +0200
++++ freenx-server-0.7.3/nxloadconfig	2013-01-04 20:25:53.020925393 +0200
+@@ -231,7 +231,7 @@ COMMAND_SMBMOUNT=smbmount
+ COMMAND_SMBUMOUNT=smbumount
+ COMMAND_SMBMOUNT_CIFS=/sbin/mount.cifs
+ COMMAND_SMBUMOUNT_CIFS=/sbin/umount.cifs
+-COMMAND_NETCAT=netcat
++COMMAND_NETCAT=ncat
+ COMMAND_SSH=ssh
+ COMMAND_SSH_KEYGEN=ssh-keygen
+ COMMAND_CUPSD=/usr/sbin/cupsd
+diff -up freenx-server-0.7.3/nxserver~ freenx-server-0.7.3/nxserver
+--- freenx-server-0.7.3/nxserver~	2013-01-04 20:21:54.798989277 +0200
++++ freenx-server-0.7.3/nxserver	2013-01-04 20:23:57.377974918 +0200
+@@ -1483,7 +1483,7 @@ server_startrestore_session()
+ 
+ 			# Check if there is already an agent running on that display on that host
+ 			let AGENT_DISPLAY=$SESS_DISPLAY-$DISPLAY_BASE+6000
+-			if $COMMAND_NETCAT -z "$SERVER_HOST" $AGENT_DISPLAY 2>/dev/null
++			if $COMMAND_NETCAT --send-only "$SERVER_HOST" $AGENT_DISPLAY </dev/null 2>/dev/null
+ 			then
+ 				log 2 "Warning: Stray nxagent without .nX$SESS_DISPLAY-lock found on host:port $SERVER_HOST:$AGENT_DISPLAY."
+ 				let SESS_DISPLAY=$SESS_DISPLAY+1
+@@ -1491,7 +1491,7 @@ server_startrestore_session()
+ 			fi
+ 
+                         let PROXY_DISPLAY=$SESS_DISPLAY+4000
+-                        if $COMMAND_NETCAT -z "$SERVER_HOST" $PROXY_DISPLAY
++                        if $COMMAND_NETCAT --send-only "$SERVER_HOST" $PROXY_DISPLAY </dev/null
+                         then
+                                 log 2 "Warning: nxagent proxy without .nX$SESS_DISPLAY-lock found on host:port $SERVER_HOST:$AGENT_DISPLAY."
+                                 let SESS_DISPLAY=$SESS_DISPLAY+1
+@@ -1501,7 +1501,7 @@ server_startrestore_session()
+ 			# Now check for the other enabled services
+ 			
+ 			let SAMBA_DISPLAY=$SESS_DISPLAY+3000
+-			if [ "$(getparam 'samba')" = 1 ] && $COMMAND_NETCAT -z "$SERVER_HOST" $SAMBA_DISPLAY
++			if [ "$(getparam 'samba')" = 1 ] && $COMMAND_NETCAT --send-only "$SERVER_HOST" $SAMBA_DISPLAY </dev/null
+ 			then
+ 				log 2 "Warning: Skipping $SERVER_HOST:$AGENT_DISPLAY as samba port is not free."
+ 				let SESS_DISPLAY=$SESS_DISPLAY+1
+@@ -1509,7 +1509,7 @@ server_startrestore_session()
+ 			fi
+ 			
+ 			let MEDIA_DISPLAY=$SESS_DISPLAY+7000
+-			if [ "$(getparam 'media')" = 1 ] && $COMMAND_NETCAT -z "$SERVER_HOST" $MEDIA_DISPLAY
++			if [ "$(getparam 'media')" = 1 ] && $COMMAND_NETCAT --send-only "$SERVER_HOST" $MEDIA_DISPLAY </dev/null
+ 			then
+ 				log 2 "Warning: Skipping $SERVER_HOST:$AGENT_DISPLAY as media port is not free."
+ 				let SESS_DISPLAY=$SESS_DISPLAY+1
+@@ -1518,7 +1518,7 @@ server_startrestore_session()
+ 
+ 			
+ 			let CUPS_DISPLAY=$SESS_DISPLAY+9000
+-			if [ "$(getparam 'cups')" = 1 ] && $COMMAND_NETCAT -z "$SERVER_HOST" $CUPS_DISPLAY
++			if [ "$(getparam 'cups')" = 1 ] && $COMMAND_NETCAT --send-only "$SERVER_HOST" $CUPS_DISPLAY </dev/null
+ 			then
+ 				log 2 "Warning: Skipping $SERVER_HOST:$AGENT_DISPLAY as cups port is not free."
+ 				let SESS_DISPLAY=$SESS_DISPLAY+1
diff --git a/freenx-server.service b/freenx-server.service
index 560eac7..e4cbed8 100644
--- a/freenx-server.service
+++ b/freenx-server.service
@@ -1,5 +1,6 @@
 [Unit]
 Description=FreeNX Server
+Documentation=http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
 After=local-fs.target
 Requires=sshd.service
 
diff --git a/freenx-server.spec b/freenx-server.spec
index b54918e..d93cc8c 100644
--- a/freenx-server.spec
+++ b/freenx-server.spec
@@ -17,7 +17,7 @@
 Summary: Free Software (GPL) Implementation of the NX Server
 Name: freenx-server
 Version: 0.7.3
-Release: 28%{?dist}
+Release: 29%{?dist}
 License: GPLv2
 Group: Applications/Internet
 URL: http://freenx.berlios.de/
@@ -35,6 +35,7 @@ Patch6: freenx-server-0.7.3-init.patch
 Patch7: freenx-server-0.7.3-nxipp.patch
 Patch8: freenx-server-0.7.3-nxagent-version-827176.patch
 Patch9: freenx-server-0.7.3-authkeys2-830838.patch
+Patch10: freenx-server-0.7.3-ncat-891109.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: imake, redhat-release
 %if %{with systemd}
@@ -45,8 +46,13 @@ Requires(preun): systemd-units
 Requires(postun): systemd-units
 %endif
 Requires: nx%{?_isa} cups
-Requires: openssh-server nc expect which perl
+Requires: openssh-server expect which perl
 Requires: xorg-x11-server-Xorg xorg-x11-apps xorg-x11-fonts-misc
+%if 0%{?fedora} > 17
+Requires: nmap-ncat
+%else
+Requires: nc
+%endif
 
 Obsoletes: freenx < %{version}-%{release}
 Provides: freenx = %{version}-%{release}
@@ -69,6 +75,9 @@ under the GPL. FreeNX-server is a GPL implementation of the NX Server.
 %patch7 -p1 -b .nxipp
 %patch8 -p1 -b .nxagent-version
 %patch9 -p1 -b .authkeys2
+%if 0%{?fedora} > 17
+%patch10 -p1 -b .ncat
+%endif
 
 sed -i -e's,\$NX_DIR/bin,%{_pkglibexecdir},g'\
   -e's,\$NX_DIR/lib,%{_pkglibdir},g'\
@@ -205,6 +214,10 @@ systemctl daemon-reload &>/dev/null || :
 /var/log/nx
 
 %changelog
+* Wed Jan  9 2013 Ville Skyttä <ville.skytta at iki.fi> - 0.7.3-29
+- Patch to work with ncat in F-18+ (#891109).
+- Add Documentation field to systemd service.
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.3-28
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list