diff options
author | 2009-10-09 14:29:01 +0000 | |
---|---|---|
committer | 2009-10-09 14:29:01 +0000 | |
commit | 67424b21ec559de28bc7357bcbf6c20ee751e1ef (patch) | |
tree | 85afbcee9e83f9ef4916354ed74569c57b196b08 /net-misc/nxserver-freenx | |
parent | Initial import, thanks to Alexander Tratsevskiy in bug #285765. Masked missi... (diff) | |
download | gentoo-2-67424b21ec559de28bc7357bcbf6c20ee751e1ef.tar.gz gentoo-2-67424b21ec559de28bc7357bcbf6c20ee751e1ef.tar.bz2 gentoo-2-67424b21ec559de28bc7357bcbf6c20ee751e1ef.zip |
Fix samba parameters setting in nxnode, patch by and thanks to Bruno Redondi <bruno.redondi@altarisoluzione.com> in bug #269593
(Portage version: 2.2_rc44/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/nxserver-freenx')
3 files changed, 236 insertions, 1 deletions
diff --git a/net-misc/nxserver-freenx/ChangeLog b/net-misc/nxserver-freenx/ChangeLog index e7d3f3bbe367..f0870eb90ed2 100644 --- a/net-misc/nxserver-freenx/ChangeLog +++ b/net-misc/nxserver-freenx/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-misc/nxserver-freenx # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/ChangeLog,v 1.65 2009/09/17 09:23:19 voyageur Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/ChangeLog,v 1.66 2009/10/09 14:29:00 voyageur Exp $ + +*nxserver-freenx-0.7.3_p104-r2 (09 Oct 2009) + + 09 Oct 2009; Bernard Cafarelli <voyageur@gentoo.org> + +nxserver-freenx-0.7.3_p104-r2.ebuild, + +files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch: + Fix samba parameters setting in nxnode, patch by and thanks to Bruno + Redondi <bruno.redondi@altarisoluzione.com> in bug #269593 17 Sep 2009; Bernard Cafarelli <voyageur@gentoo.org> nxserver-freenx-0.7.3_p104-r1.ebuild: diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch new file mode 100644 index 000000000000..543cc16b7b3e --- /dev/null +++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch @@ -0,0 +1,106 @@ +diff -ruN freenx-server.orig/nxnode freenx-server/nxnode +--- freenx-server.orig/nxnode 2009-03-29 14:07:27.000000000 +0200 ++++ freenx-server/nxnode 2009-05-12 19:19:28.090537066 +0200 +@@ -85,6 +85,45 @@ + echo $sessionid + } + ++setup_samba() ++{ ++ smbport="" ++ ++ # We know from protocol traces that client=linux,winnt,macosx are valid values. ++ # I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid ++ # values we get support for all those systems. ++ ++ smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL" ++ ++ if [ "$smbproto" = "both" ] ++ then ++ smbproto="smbfs" ++ ++ [ "$client" = "linux" ] && smbproto="cifs" ++ [ "$client" = "winnt" ] && smbproto="cifs" ++ [ "$client" = "macosx" ] && smbproto="cifs" ++ ++ # FIXME: This is a rather wild guess ++ [ "$client" = "win9x" ] && smbproto="smbfs" ++ fi ++ ++ if [ "$smbproto" = "cifs" ] ++ then ++ smbport=445 ++ COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS ++ COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS ++ elif [ "$smbproto" = "none" ] # none ++ then ++ # we set this to true so that the ++ # SMB mount does not give an error message. ++ ++ COMMAND_SMBMOUNT=/bin/true ++ COMMAND_SMBUMOUNT=/bin/true ++ else # smbfs ++ smbport=139 ++ fi ++} ++ + # + # ----------------------------------------------------------------------------- + # Node functions module +@@ -735,6 +774,7 @@ + + node_umount_smb() + { ++ setup_samba + [ -e "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" ] || return + cat "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" | while read mpoint + do +@@ -1136,39 +1176,7 @@ + + if [ "$samba" = "1" ] + then +- # We know from protocol traces that client=linux,winnt,macosx are valid values. +- # I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid +- # values we get support for all those systems. +- +- smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL" +- +- if [ "$smbproto" = "both" ] +- then +- smbproto="smbfs" +- +- [ "$client" = "linux" ] && smbproto="cifs" +- [ "$client" = "winnt" ] && smbproto="cifs" +- [ "$client" = "macosx" ] && smbproto="cifs" +- +- # FIXME: This is a rather wild guess +- [ "$client" = "win9x" ] && smbproto="smbfs" +- fi +- +- if [ "$smbproto" = "cifs" ] +- then +- smbport=445 +- COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS +- COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS +- elif [ "$smbproto" = "none" ] # none +- then +- # we set this to true so that the +- # SMB mount does not give an error message. +- +- COMMAND_SMBMOUNT=/bin/true +- COMMAND_SMBUMOUNT=/bin/true +- else # smbfs +- smbport=139 +- fi ++ setup_samba + fi + + # FreeNX specific variables +@@ -1430,6 +1438,7 @@ + + cmd_node_smbmount() + { ++ setup_samba + sessionid=$(getparam_sessionid) + port=$(getparam port) + username=$(getparam username) diff --git a/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p104-r2.ebuild b/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p104-r2.ebuild new file mode 100644 index 000000000000..3c56333694dd --- /dev/null +++ b/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p104-r2.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/nxserver-freenx/nxserver-freenx-0.7.3_p104-r2.ebuild,v 1.1 2009/10/09 14:29:00 voyageur Exp $ + +EAPI=1 + +inherit multilib eutils toolchain-funcs versionator + +MAJOR_PV="$(get_version_component_range 1-3)" +PATCH_VER="$(get_version_component_range 4)" +MY_PN="freenx-server" + +DESCRIPTION="Free Software Implementation of the NX Server" +HOMEPAGE="http://freenx.berlios.de/ https://launchpad.net/~freenx-team" +SRC_URI="http://ppa.launchpad.net/freenx-team/ppa/ubuntu/pool/main/f/${MY_PN}/freenx-server_${MAJOR_PV}+teambzr${PATCH_VER/p}.orig.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+nxclient rdesktop vnc" + +DEPEND="x11-misc/gccmakedep + x11-misc/imake" +RDEPEND="dev-tcltk/expect + media-fonts/font-cursor-misc + media-fonts/font-misc-misc + net-analyzer/gnu-netcat + >=net-misc/nx-2.1.0 + sys-apps/gawk + virtual/ssh + x11-apps/xauth + x11-apps/xrdb + x11-apps/sessreg + nxclient? ( net-misc/nxclient ) + !nxclient? ( !net-misc/nxclient + || ( x11-misc/xdialog + x11-apps/xmessage ) ) + rdesktop? ( net-misc/rdesktop ) + vnc? ( x11-misc/x11vnc + || ( net-misc/tightvnc net-misc/vnc ) )" + +S=${WORKDIR}/${MY_PN} + +export NX_HOME_DIR=/var/lib/nxserver/home + +pkg_setup () { + enewuser nx -1 -1 ${NX_HOME_DIR} +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-pam_ssh.patch + epatch "${FILESDIR}"/${P}-nxnode_setup_samba.patch + epatch "${FILESDIR}"/${PN}-0.7.3_p102-nxloadconfig.patch + epatch "${FILESDIR}"/${PN}-0.7.3_p102-cflags.patch + epatch "${FILESDIR}"/${PN}-0.7.2-cups.patch + + sed -e "/PATH_LIB=/s/lib/$(get_libdir)/g" \ + -e "s#REAL_PATH_LIB#/usr/$(get_libdir)/NX/bin#" \ + -i nxloadconfig || die "nxloadconfig sed failed" +} + +src_compile() { + emake CC=$(tc-getCC) CDEBUGFLAGS="${CFLAGS}" || die "compilation failed" +} + +src_install() { + export NX_ETC_DIR=/etc/nxserver + export NX_SESS_DIR=/var/lib/nxserver/db + + emake DESTDIR="${D}" install || die "install failed" + + # This should be renamed to remove the blocker on net-misc/nxclient + use nxclient && rm "${D}"/usr/bin/nxprint + + mv "${D}"/etc/nxserver/node.conf.sample "${D}"/etc/nxserver/node.conf || + die "cannot find default configuration file" + + dodir ${NX_ETC_DIR} + for x in passwords passwords.orig ; do + touch "${D}"${NX_ETC_DIR}/$x + chmod 600 "${D}"${NX_ETC_DIR}/$x + done + + dodir ${NX_HOME_DIR} + + for x in closed running failed ; do + keepdir ${NX_SESS_DIR}/$x + fperms 0700 ${NX_SESS_DIR}/$x + done + + newinitd "${FILESDIR}"/nxserver.init nxserver +} + +pkg_postinst () { + # Other NX servers ebuilds may have already created the nx account + # However they use different login shell/home directory paths + if [[ ${ROOT} == "/" ]]; then + usermod -s /usr/bin/nxserver nx || die "Unable to set login shell of nx user!!" + usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!" + usermod -a -G utmp nx || die "Unable to add nx user to utmp group!!" + else + elog "If you had another NX server installed before, please make sure" + elog "the nx user account is correctly set to:" + elog " * login shell: /usr/bin/nxserver" + elog " * home directory: ${NX_HOME_DIR}" + elog " * supplementary groups: utmp" + fi + + elog "To complete the installation, run:" + elog " nxsetup --install --setup-nomachine-key" + elog "This will use the default Nomachine SSH key" + elog "If you had older NX servers installed, you may need to add \"--clean --purge\" to the nxsetup command" + + if ! built_with_use net-misc/openssh pam; then + elog "" + elog "net-misc/openssh was not built with PAM support" + elog "You will need to unlock the nx account by setting a password for it" + fi +} |