- update to 2.1.0

PR:		113423
Obtained from:	http://www.deweyonline.com/nx/freebsd.html
This commit is contained in:
Dirk Meyer 2008-04-10 10:24:15 +00:00
parent b86a05ab73
commit 1fd9f280cc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=211001
14 changed files with 146 additions and 89 deletions

View File

@ -6,10 +6,9 @@
#
PORTNAME= freenx
PORTVERSION= 0.4.4
PORTREVISION= 3
PORTVERSION= 0.6.0
CATEGORIES= net
MASTER_SITES= http://www.iem.pw.edu.pl/ftp/distfiles/
MASTER_SITES= BERLIOS
MAINTAINER= freenx@deweyonline.com
COMMENT= Frontend (auth/session management) for nxserver libraries
@ -17,25 +16,44 @@ COMMENT= Frontend (auth/session management) for nxserver libraries
RUN_DEPENDS= ${NXPREFIX}/bin/nxagent:${PORTSDIR}/net/nxserver \
bash:${PORTSDIR}/shells/bash \
expect:${PORTSDIR}/lang/expect \
gls:${PORTSDIR}/sysutils/coreutils \
xauth:${X_CLIENTS_PORT}
USE_PERL5_RUN= yes
NO_BUILD= yes
BUILD_WRKSRC= ${WRKSRC}/nxserver-helper
USE_X_PREFIX= yes
NXPREFIX?= ${PREFIX}/NX
WRKSRC= ${WRKDIR}
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 503102
RUN_DEPENDS+= nc:${PORTSDIR}/net/netcat
.endif
.if ${OSVERSION} < 601101
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-freenx-nxserver \
${PATCHDIR}/extra-patch-freenx-nxsetup
.endif
post-patch:
@cd ${WRKSRC} && ${REINPLACE_CMD} -e "s|/usr/local/|${PREFIX}/|" \
-e "s|!/bin/bash|!${PREFIX}/bin/bash|" \
-e "s|/usr/bin/expect|${PREFIX}/bin/expect|" \
-e "s|/usr/NX|${NXPREFIX}|" \
node.conf.sample nxclient nxkeygen nxloadconfig nxnode \
nxnode-login nxprint nxserver nxsetup
do-install:
${MKDIR} ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxclient ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxnode ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxnode-login ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxserver ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxsetup ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxkeygen ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxloadconfig ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/nxprint ${NXPREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/nxserver-helper/nxserver-helper \
${NXPREFIX}/bin
.for i in nxnode nxserver nxsetup nxkeygen nxnode-login nxloadconfig nxprint nxclient
${INSTALL_SCRIPT} ${WRKSRC}/${i} ${NXPREFIX}/bin
.endfor
${MKDIR} ${NXPREFIX}/etc/nxserver
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.4.4/node.conf.sample ${NXPREFIX}/etc/nxserver
${INSTALL_SCRIPT} ${WRKSRC}/node.conf.sample ${NXPREFIX}/etc/nxserver
.include <bsd.port.mk>
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (freenx-0.4.4.tar.gz) = 4d92f80718edbaacd875404bcb2850b6
SHA256 (freenx-0.4.4.tar.gz) = 8f661edbf9137e31df4c5e6134cabc89921c0e9a742943264f3d7e9dbeae8674
SIZE (freenx-0.4.4.tar.gz) = 46111
MD5 (freenx-0.6.0.tar.gz) = 504aaa2c3c93c36eefab74e2b8a6506e
SHA256 (freenx-0.6.0.tar.gz) = 928a4be2ecdfb560abc93737d049fa5b2459e64c431d4aa43e46c6c4df52b3ca
SIZE (freenx-0.6.0.tar.gz) = 110758

View File

@ -0,0 +1,11 @@
--- nxserver.orig Mon Jan 22 19:22:50 2007
+++ nxserver
@@ -1444,7 +1444,7 @@
[ ${#CMD_CHUSER} -ge 32 ] && cmd_abort "Error: User $CMD_CHUSER must be shorter than 32 characters."
egrep -q "^$CMD_CHUSER:" $NX_ETC_DIR/passwords && cmd_abort "Error: User $CMD_CHUSER already in database."
- getent passwd "$CMD_CHUSER" >/dev/null || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
+ egrep -q "^$CMD_CHUSER:" /etc/passwd >/dev/null || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
passdb_add_user "$CMD_CHUSER"
}

View File

@ -0,0 +1,20 @@
--- nxsetup.orig Mon Jan 22 19:22:50 2007
+++ nxsetup
@@ -135,7 +135,7 @@
then
egrep "^nx:" /etc/passwd >/dev/null
else
- getent passwd nx >/dev/null
+ egrep -q "^nx:" /etc/passwd >/dev/null
fi
}
nx_group_exists()
@@ -145,7 +145,7 @@
then
egrep "^nx:" /etc/group >/dev/null
else
- getent group nx >/dev/null
+ egrep -q "^nx:" /etc/group >/dev/null
fi
}

View File

@ -1,8 +0,0 @@
--- freenx-0.4.4/nxclient.orig Fri Sep 10 10:04:51 2004
+++ freenx-0.4.4/nxclient Fri Sep 17 12:24:22 2004
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
TEMP=`getopt -a -o d: --long local,noautokill,dialog:,caption:,message:,display: -n $(basename $0) -- "$@"`

View File

@ -1,5 +1,5 @@
--- freenx-0.4.4/nxkeygen.orig Sun Feb 13 20:52:08 2005
+++ freenx-0.4.4/nxkeygen Mon Mar 28 15:26:50 2005
--- nxkeygen.orig Mon Jan 22 19:22:49 2007
+++ nxkeygen
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash

View File

@ -1,29 +1,38 @@
--- freenx-0.4.4/nxloadconfig.orig Sat Aug 6 09:53:27 2005
+++ freenx-0.4.4/nxloadconfig Tue Aug 9 15:15:01 2005
--- nxloadconfig.orig Mon Jan 22 19:22:50 2007
+++ nxloadconfig
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#
# Copyright (c) 2005 by Fabian Franz <freenx@fabian-franz.de>
# (c) 2005 by Jon Severinsson <jonno@users.berlios.de>
@@ -53,12 +53,12 @@
@@ -56,12 +56,12 @@
NX_LICENSE="OS (GPL)"
# Where can different nx components be found
-NX_DIR=/usr
+NX_DIR=/usr/X11R6/NX/
+NX_DIR=/usr/NX
PATH_BIN=$NX_DIR/bin # if you change that, be sure to also change the public keys
PATH_LIB=$NX_DIR/lib
-NX_ETC_DIR=/etc/nxserver
-NX_SESS_DIR=/var/lib/nxserver/db
-NX_HOME_DIR=/var/lib/nxserver/home
+NX_ETC_DIR=/usr/X11R6/NX/etc/nxserver/
+NX_SESS_DIR=/var/lib/nxserver/
+NX_HOME_DIR=/home/nx/
+NX_ETC_DIR=$NX_DIR/etc
+NX_SESS_DIR=$NX_DIR/var/db
+NX_HOME_DIR=$NX_DIR/home/nx
# Advanced users ONLY
AGENT_LIBRARY_PATH="" #Calculated
@@ -153,11 +153,11 @@
@@ -144,7 +144,7 @@
ENABLE_KDE_CUPS="0"
KDE_PRINTRC="" # Calculated
-CUPS_ETC="/etc/cups/"
+CUPS_ETC="/usr/local/etc/cups/"
# Path directives
@@ -162,16 +162,16 @@
COMMAND_XAUTH=/usr/X11R6/bin/xauth
COMMAND_SMBMOUNT=smbmount
COMMAND_SMBUMOUNT=smbumount
@ -31,9 +40,25 @@
+COMMAND_NETCAT=nc
COMMAND_SSH=ssh
COMMAND_SSH_KEYGEN=ssh-keygen
COMMAND_CUPSD=/usr/sbin/cupsd
-COMMAND_CUPSD=/usr/sbin/cupsd
-COMMAND_MD5SUM=md5sum
+COMMAND_CUPSD=/usr/local/sbin/cupsd
+COMMAND_MD5SUM=md5
# Misc directives
-ENABLE_2_0_0_BACKEND=""
+ENABLE_2_0_0_BACKEND="1"
ENABLE_AUTORECONNECT="0"
ENABLE_AUTORECONNECT_BEFORE_140="1"
EXPORT_USERIP="0"
@@ -263,7 +263,7 @@
[ -z "$AGENT_LIBRARY_PATH" ] && AGENT_LIBRARY_PATH=$PATH_LIB
[ -z "$PROXY_LIBRARY_PATH" ] && PROXY_LIBRARY_PATH=$PATH_LIB
[ -z "$APPLICATION_LIBRARY_PATH" ] && APPLICATION_LIBRARY_PATH=$PATH_LIB
-[ -z "$APPLICATION_LIBRARY_PRELOAD" ] && APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2:$APPLICATION_LIBRARY_PATH/libXext.so.6.4:$APPLICATION_LIBRARY_PATH/libXcomp.so:$APPLICATION_LIBRARY_PATH/libXcompext.so.1:$APPLICATION_LIBRARY_PATH/libXrender.so.1.2"
+[ -z "$APPLICATION_LIBRARY_PRELOAD" ] && APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2:$APPLICATION_LIBRARY_PATH/libXext.so.6.4:$APPLICATION_LIBRARY_PATH/libXcomp.so:$APPLICATION_LIBRARY_PATH/libXcompext.so:$APPLICATION_LIBRARY_PATH/libXrender.so.1.2"
if [ -z "$ENABLE_2_0_0_BACKEND" ]
then
ENABLE_2_0_0_BACKEND="1"

View File

@ -1,8 +1,18 @@
--- freenx-0.4.4/nxnode.orig Tue Aug 2 11:20:18 2005
+++ freenx-0.4.4/nxnode Tue Aug 9 15:08:43 2005
--- nxnode.orig Mon Jan 22 19:22:50 2007
+++ nxnode
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -252,6 +252,9 @@
#
NODE_APPLICATION=$(node_find_application "$type")
+
+ # For rdesktop/VNC, there is no application to start
+ [ -n "$NODE_APPLICATION" ] || return
#
# Check if we want to use a mediahelper

View File

@ -1,8 +0,0 @@
--- freenx-0.4.4/nxnode-login.orig Tue Jun 28 12:15:43 2005
+++ freenx-0.4.4/nxnode-login Tue Jun 28 11:53:16 2005
@@ -1,4 +1,4 @@
-#!/usr/bin/expect
+#!/usr/local/bin/expect
# nxnode-login: spawns and controls ssh
# Copyright (c) 2004 by Fabian Franz.
# License: GPL, version 2

View File

@ -1,8 +0,0 @@
--- freenx-0.4.4/nxprint.orig Mon Jun 27 13:38:09 2005
+++ freenx-0.4.4/nxprint Mon Jun 27 13:53:08 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#
# nxprint - Prints a list of available drivers or printers
#

View File

@ -1,17 +1,20 @@
--- freenx-0.4.4/nxserver.orig Fri Aug 5 12:38:44 2005
+++ freenx-0.4.4/nxserver Tue Aug 9 15:24:19 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -1133,7 +1133,7 @@
[ ${#CMD_CHUSER} -ge 32 ] && cmd_abort "Error: User $CMD_CHUSER must be shorter than 32 characters."
egrep -q "^$CMD_CHUSER:" $NX_ETC_DIR/passwords && cmd_abort "Error: User $CMD_CHUSER already in database."
- getent passwd "$CMD_CHUSER" >/dev/null || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
+ cat /etc/passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
passdb_add_user "$CMD_CHUSER"
--- nxserver.orig Mon Jan 22 19:22:50 2007
+++ nxserver
@@ -294,7 +294,7 @@
echo
echo "Display Username Remote IP Session ID Date Status"
echo "------- --------------- --------------- -------------------------------- ------------------- -----------"
- for j in $(ls --time-style +%s -la "$NX_SESS_DIR"/{closed,failed,running} | awk '/sessionId/ { print $6 " " $7 }' | sort -n | cut -d" " -f2)
+ for j in $(gls --time-style +%s -la "$NX_SESS_DIR"/{closed,failed,running} | awk '/sessionId/ { print $6 " " $7 }' | sort -n | cut -d" " -f2)
do
if [ -n "$sessionId" ]
then
@@ -307,7 +307,7 @@
then
[ "$userName" = "$(getparam userName)" ] || continue
fi
- echo -e "$(getparam display)\t$(getparam userName)\t$(getparam foreignAddress)\t$(getparam sessionId)\t$(ls --time-style="+%F %X" -l $i | awk '/sessionId/ { print $6 " " $7 }')\t$(getparam status)"
+ echo -e "$(getparam display)\t$(getparam userName)\t$(getparam foreignAddress)\t$(getparam sessionId)\t$(gls --time-style="+%F %X" -l $i | awk '/sessionId/ { print $6 " " $7 }')\t$(getparam status)"
done
}

View File

@ -1,24 +1,16 @@
--- freenx-0.4.4/nxsetup.unported Fri Feb 3 20:52:09 2006
+++ freenx-0.4.4/nxsetup Fri Dec 30 18:29:50 2005
--- nxsetup.unported Mon Jan 22 19:22:50 2007
+++ nxsetup
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Coypright (c) 2004-2005 by Fabian Franz <freenx@fabian-franz.de>.
# 2005 by Jon Severinsson <jonno@users.berlios.de>.
@@ -96,7 +96,7 @@
then
egrep "^nx:" /etc/passwd >/dev/null
else
- getent passwd nx >/dev/null
+ cat /etc/passwd |egrep -q "^nx:" >/dev/null
fi
}
@@ -113,6 +113,16 @@
USERADD_OPTIONS="--system --home $NX_HOME_DIR --shell $PATH_BIN/nxserver"
[ -n "$SETUP_GID" ] && USERADD_OPTIONS="--gid $SETUP_GID $USERADD_OPTIONS"
@@ -165,7 +165,16 @@
# adduser needs a valid group to add the user to
! nx_group_exists && addgroup --system --quiet $GROUPADD_OPTIONS nx
adduser $USERADD_OPTIONS nx
-
+
+ # FreeBSD?
+ elif [ "$(uname)" = "FreeBSD" ]
@ -31,8 +23,8 @@
+
# no, its a "normal" useradd
else
USERADD_OPTIONS="-d $NX_HOME_DIR -s $PATH_BIN/nxserver"
@@ -142,15 +152,16 @@
USERADD_OPTIONS="-g nx -d $NX_HOME_DIR -s $PATH_BIN/nxserver"
@@ -198,15 +207,16 @@
install_nx()
{
set -e
@ -53,7 +45,7 @@
echo "done"
fi
@@ -248,13 +259,12 @@
@@ -319,13 +329,12 @@
cat /etc/ssh/ssh_host_rsa_key.pub >> $NX_HOME_DIR/.ssh/known_hosts
fi
@ -72,7 +64,7 @@
echo "done"
}
@@ -268,7 +278,7 @@
@@ -389,7 +398,7 @@
then
luserdel nx
else

1
net/freenx/pkg-message Normal file
View File

@ -0,0 +1 @@
You need to run 'nxsetup --install' and follow the instructions given.

View File

@ -3,6 +3,7 @@ NX/bin/nxnode
NX/bin/nxnode-login
NX/bin/nxprint
NX/bin/nxserver
NX/bin/nxserver-helper
NX/bin/nxsetup
NX/bin/nxkeygen
NX/bin/nxloadconfig