From a080c9cca3b0a16b4f3a66675eb4ea5028ec86f8 Mon Sep 17 00:00:00 2001 From: ponce Date: Mon, 7 Mar 2011 02:16:25 -0300 Subject: network/freenx: Misc. cleaning up. Signed-off-by: Niels Horn --- network/freenx/README | 10 ++++++++-- network/freenx/config/freenx.logrotate | 8 ++++++++ network/freenx/config/nomachine.id_dsa.key | 13 +++++++++++++ network/freenx/doinst.sh | 8 ++++++++ network/freenx/freenx.SlackBuild | 13 +++++++++---- network/freenx/freenx.info | 4 ++-- network/freenx/freenx.logrotate | 8 -------- network/freenx/nomachine.id_dsa.key | 13 ------------- network/freenx/preinstall.sh | 4 ++-- 9 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 network/freenx/config/freenx.logrotate create mode 100644 network/freenx/config/nomachine.id_dsa.key delete mode 100644 network/freenx/freenx.logrotate delete mode 100644 network/freenx/nomachine.id_dsa.key (limited to 'network') diff --git a/network/freenx/README b/network/freenx/README index 8598f1074d..aa3b1092cd 100644 --- a/network/freenx/README +++ b/network/freenx/README @@ -9,7 +9,13 @@ nxserver component. Because a nx user with some default settings is needed for the server to build, a script, preinstall.sh, is provided to be executed (sh preinstall.sh) before running the slackbuild: it's pretty straightforward in his functions, -have a look at it. Also, after installation, you will need to run (as root) -"nxsetup --install" to complete the setup process. +have a look at it. + +The package installs the default nomachine key to protect the connection. +run "nxsetup --purge --uninstall ; sh preinstall.sh ; nxsetup --install" +to set some custom keys (for additional security). This requires nx. + +You need nxclient, also available at slackbuilds.org, on the connecting +clients. diff --git a/network/freenx/config/freenx.logrotate b/network/freenx/config/freenx.logrotate new file mode 100644 index 0000000000..3342cc437c --- /dev/null +++ b/network/freenx/config/freenx.logrotate @@ -0,0 +1,8 @@ +/var/log/nxserver.log { + rotate 4 + size=4M + notifempty + missingok + sharedscripts + copytruncate +} diff --git a/network/freenx/config/nomachine.id_dsa.key b/network/freenx/config/nomachine.id_dsa.key new file mode 100644 index 0000000000..4aa1778801 --- /dev/null +++ b/network/freenx/config/nomachine.id_dsa.key @@ -0,0 +1,13 @@ +-----BEGIN DSA PRIVATE KEY----- +MIIBuwIBAAKBgQCXv9AzQXjxvXWC1qu3CdEqskX9YomTfyG865gb4D02ZwWuRU/9 +C3I9/bEWLdaWgJYXIcFJsMCIkmWjjeSZyTmeoypI1iLifTHUxn3b7WNWi8AzKcVF +aBsBGiljsop9NiD1mEpA0G+nHHrhvTXz7pUvYrsrXcdMyM6rxqn77nbbnwIVALCi +xFdHZADw5KAVZI7r6QatEkqLAoGBAI4L1TQGFkq5xQ/nIIciW8setAAIyrcWdK/z +5/ZPeELdq70KDJxoLf81NL/8uIc4PoNyTRJjtT3R4f8Az1TsZWeh2+ReCEJxDWgG +fbk2YhRqoQTtXPFsI4qvzBWct42WonWqyyb1bPBHk+JmXFscJu5yFQ+JUVNsENpY ++Gkz3HqTAoGANlgcCuA4wrC+3Cic9CFkqiwO/Rn1vk8dvGuEQqFJ6f6LVfPfRTfa +QU7TGVLk2CzY4dasrwxJ1f6FsT8DHTNGnxELPKRuLstGrFY/PR7KeafeFZDf+fJ3 +mbX5nxrld3wi5titTnX+8s4IKv29HJguPvOK/SI7cjzA+SqNfD7qEo8CFDIm1xRf +8xAPsSKs6yZ6j1FNklfu +-----END DSA PRIVATE KEY----- + diff --git a/network/freenx/doinst.sh b/network/freenx/doinst.sh index 440c22901f..451febba86 100644 --- a/network/freenx/doinst.sh +++ b/network/freenx/doinst.sh @@ -109,3 +109,11 @@ chown nx:root \${NX_LOGFILE} EOCR +usr/bin/nxsetup --install --setup-nomachine-key --uid 243 --gid 243 --auto + +WARNI="\n- - - - -\n\n\ +The package installs the default nomachine key to protect the connection.\n\ +run \"nxsetup --purge --uninstall ; sh preinstall.sh ; nxsetup --install\"\n\ +from the build folder to set some custom keys (for additional security).\n\ +\n- - - - -\n" +printf "%b\n" "$WARNI" diff --git a/network/freenx/freenx.SlackBuild b/network/freenx/freenx.SlackBuild index 99d62a49ba..b337b2d6a6 100644 --- a/network/freenx/freenx.SlackBuild +++ b/network/freenx/freenx.SlackBuild @@ -21,12 +21,14 @@ # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -# 24/sep/2010 by ponce +# 24/sep/2010 by ponce # * ported to SBo. +# 22/feb/2011 by ponce +# * setup server with nomachine key by default. PRGNAM=freenx VERSION=${VERSION:-0.7.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -57,7 +59,7 @@ else fi DOCS="AUTHORS COPYING ChangeLog CONTRIB nxcheckload.sample nxacl.sample \ - $CWD/nomachine.id_dsa.key" + $CWD/config/nomachine.id_dsa.key" bailout() { printf "\n\tYou must have an \"nx\" user and group to run this script.\n" @@ -73,6 +75,9 @@ fi set -e +export CXXFLAGS="$SLKCFLAGS" +export CFLAGS="$SLKCFLAGS" + mkdir -p $TMP/tmp-$PRGNAM $PKG $OUTPUT rm -rf $TMP/tmp-$PRGNAM/* $PKG/* @@ -116,7 +121,7 @@ cp -a $PKG/etc/nxserver/node.conf.{sample,new} install -m 0755 init.d/freenx-server $PKG/etc/rc.d/rc.freenx.new # Add a logrotate script: -install -m 644 $CWD/freenx.logrotate $PKG/etc/logrotate.d/freenx-server.new +install -m 644 $CWD/config/freenx.logrotate $PKG/etc/logrotate.d/freenx-server.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true diff --git a/network/freenx/freenx.info b/network/freenx/freenx.info index b75eccc979..b9bb7b1b00 100644 --- a/network/freenx/freenx.info +++ b/network/freenx/freenx.info @@ -6,5 +6,5 @@ MD5SUM="856f597e139018f7ed62713c9d6c9ed5" DOWNLOAD_x86_64="" MD5SUM_x86_64="" MAINTAINER="ponce" -EMAIL="matteo.bernardini@sns.it" -APPROVED="rworkman" +EMAIL="matteo.bernardini@gmail.com" +APPROVED="Niels Horn" diff --git a/network/freenx/freenx.logrotate b/network/freenx/freenx.logrotate deleted file mode 100644 index 3342cc437c..0000000000 --- a/network/freenx/freenx.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/nxserver.log { - rotate 4 - size=4M - notifempty - missingok - sharedscripts - copytruncate -} diff --git a/network/freenx/nomachine.id_dsa.key b/network/freenx/nomachine.id_dsa.key deleted file mode 100644 index 4aa1778801..0000000000 --- a/network/freenx/nomachine.id_dsa.key +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBuwIBAAKBgQCXv9AzQXjxvXWC1qu3CdEqskX9YomTfyG865gb4D02ZwWuRU/9 -C3I9/bEWLdaWgJYXIcFJsMCIkmWjjeSZyTmeoypI1iLifTHUxn3b7WNWi8AzKcVF -aBsBGiljsop9NiD1mEpA0G+nHHrhvTXz7pUvYrsrXcdMyM6rxqn77nbbnwIVALCi -xFdHZADw5KAVZI7r6QatEkqLAoGBAI4L1TQGFkq5xQ/nIIciW8setAAIyrcWdK/z -5/ZPeELdq70KDJxoLf81NL/8uIc4PoNyTRJjtT3R4f8Az1TsZWeh2+ReCEJxDWgG -fbk2YhRqoQTtXPFsI4qvzBWct42WonWqyyb1bPBHk+JmXFscJu5yFQ+JUVNsENpY -+Gkz3HqTAoGANlgcCuA4wrC+3Cic9CFkqiwO/Rn1vk8dvGuEQqFJ6f6LVfPfRTfa -QU7TGVLk2CzY4dasrwxJ1f6FsT8DHTNGnxELPKRuLstGrFY/PR7KeafeFZDf+fJ3 -mbX5nxrld3wi5titTnX+8s4IKv29HJguPvOK/SI7cjzA+SqNfD7qEo8CFDIm1xRf -8xAPsSKs6yZ6j1FNklfu ------END DSA PRIVATE KEY----- - diff --git a/network/freenx/preinstall.sh b/network/freenx/preinstall.sh index 00287a7e2b..963e7bcd67 100644 --- a/network/freenx/preinstall.sh +++ b/network/freenx/preinstall.sh @@ -1,7 +1,7 @@ #!/usr/bin/bash # freenx preinstall script -# excerpted from alien bob's doinst.sh -# mixed by ponce +# excerpted from alien bob's doinst.sh and +# mixed by ponce set -e -- cgit v1.2.3