[arch-commits] Commit in freenx/trunk (3 files)
andyrtr at archlinux.org
andyrtr at archlinux.org
Sat Apr 21 21:08:28 UTC 2012
Date: Saturday, April 21, 2012 @ 17:08:27
Author: andyrtr
Revision: 156612
more file location fixes; add Fedora patch for printer backend
Added:
freenx/trunk/freenx-server-0.7.3-nxipp.patch
Modified:
freenx/trunk/PKGBUILD
freenx/trunk/freenx.install
---------------------------------+
PKGBUILD | 29 +++++++++++++++-----
freenx-server-0.7.3-nxipp.patch | 17 +++++++++++
freenx.install | 54 ++++++++++++++++++++++++++++++--------
3 files changed, 82 insertions(+), 18 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-04-21 21:06:35 UTC (rev 156611)
+++ PKGBUILD 2012-04-21 21:08:27 UTC (rev 156612)
@@ -4,27 +4,32 @@
pkgname=freenx
pkgver=0.7.3
-pkgrel=10.1
+pkgrel=10.2
pkgdesc="Free Software (GPL) Implementation of the NX Server"
arch=(i686 x86_64)
url="http://freenx.berlios.de"
license=('GPL')
depends=('nx-common' 'nx-x11' 'nxagent' 'nxproxy' 'gnu-netcat' 'inetutils' 'openssh' 'expect' 'python'
'xorg-xauth' 'xorg-fonts-misc' 'coreutils' 'xorg-xmessage' 'xorg-xrdb' 'xorg-xpr' 'xorg-xset' 'xorg-sessreg')
+optdepends=('cups: adds printing support')
makedepends=('imake')
options=('!makeflags')
+conflicts=('nxserver')
+provides=('nxserver')
backup=(etc/nxserver/node.conf)
install=freenx.install
source=(http://download.berlios.de/freenx/$pkgname-server-$pkgver.tar.gz
keymap.patch
nxagent-startup.patch
freenx-latest-svn.patch
- remove-dialog.patch)
+ remove-dialog.patch
+ freenx-server-0.7.3-nxipp.patch)
md5sums=('856f597e139018f7ed62713c9d6c9ed5'
'f0867659c925f6363fb2b7661f349248'
'30dc16d8e2093ff71d5834a169ad9d00'
'788f30322783cf2c2dc833e2e4d5e8ad'
- 'cae1773312506eeefe6a8de07c492bd8')
+ 'cae1773312506eeefe6a8de07c492bd8'
+ 'b3244c52a6bafc6d9b528eb4d4426e36')
build() {
# patch and install nxserver
@@ -37,6 +42,8 @@
patch -Np0 -i ${srcdir}/keymap.patch
# patch nxagent startup to avoid login issues
patch -Np0 -i ${srcdir}/nxagent-startup.patch
+ # check for cups existance and then symlinks the backend
+ patch -Np1 -i ${srcdir}/freenx-server-0.7.3-nxipp.patch
# remove broken dialog function
patch -Np0 -i ${srcdir}/remove-dialog.patch
sed -i -e 's,authorized_keys2,authorized_keys,g' nxloadconfig
@@ -53,11 +60,14 @@
sed -i -e 's,libXcompext.so,libXcompext.so.3,g' nxloadconfig
sed -i -e 's,libXrender.so.1.2,libXrender.so.1.2.2:$APPLICATION_LIBRARY_PATH/libXcompsh.so.3:$APPLICATION_LIBRARY_PATH/libXcompshad.so.3,g' nxloadconfig
sed -i -e 's:NX_ETC_DIR\=$NX_DIR\/etc:NX_ETC_DIR=\/etc\/nxserver:g' nxloadconfig
- sed -i -e 's:NX_SESS_DIR=$NX_DIR\/var\/db:NX_SESS_DIR=\/var\/lib\/nx\/db:g' nxloadconfig
- sed -i -e 's:NX_HOME_DIR=$NX_DIR:NX_HOME_DIR=\/var\/lib\/nx:g' nxloadconfig
+ sed -i -e 's:NX_SESS_DIR=$NX_DIR\/var\/db:NX_SESS_DIR=\/var\/lib\/nxserver\/db:g' nxloadconfig
+ sed -i -e 's:NX_HOME_DIR=$NX_DIR:NX_HOME_DIR=\/var\/lib\/nxserver:g' nxloadconfig
+ sed -i -e 's:NOMACHINE_NX_HOME_DIR="/usr/lib/nx/home/nx":NOMACHINE_NX_HOME_DIR="/var/lib/nxserver/home/nx":g' nxloadconfig
+ sed -i -e 's:\/usr\/NX:\/usr\/lib\/nx:g' nxdialog
+
# fix key generation
sed -i -e 's,AUTOMATIC="no",AUTOMATIC="yes",g' nxsetup
- #export DESTDIR="${pkgdir}"
+
make
}
@@ -75,6 +85,11 @@
mv $pkgdir/etc/nxserver/node.conf.sample $pkgdir/etc/nxserver/node.conf
- # create nxserver homedir
+ # create some missing nxserver directories
mkdir -m700 -p $pkgdir/var/lib/nxserver/{home/nx,db}
+ mkdir -m700 -p $pkgdir/usr/lib/nx/share
+
+ # remove files that are part of nxclient
+ rm -f ${pkgdir}/usr/lib/nx/bin/nxprint
+ rm -f ${pkgdir}/usr//bin/nxprint
}
Added: freenx-server-0.7.3-nxipp.patch
===================================================================
--- freenx-server-0.7.3-nxipp.patch (rev 0)
+++ freenx-server-0.7.3-nxipp.patch 2012-04-21 21:08:27 UTC (rev 156612)
@@ -0,0 +1,17 @@
+diff -up freenx-server-0.7.3/nxsetup~ freenx-server-0.7.3/nxsetup
+--- freenx-server-0.7.3/nxsetup~ 2011-12-30 23:04:53.515194711 +0200
++++ freenx-server-0.7.3/nxsetup 2011-12-30 23:05:55.499954085 +0200
+@@ -366,11 +366,10 @@ EOF
+
+ echo "done"
+
+- if [ -d "$CUPS_BACKEND" ]
++ if [ -d "$CUPS_BACKEND" ] && [ ! -f "$CUPS_IPP_BACKEND" ]
+ then
+ echo -n "Setting up cups nxipp backend ..."
+- cp -af "$CUPS_BACKEND/ipp" "$CUPS_IPP_BACKEND"
+- chmod 755 "$CUPS_IPP_BACKEND"
++ ln -sf "$CUPS_BACKEND/ipp" "$CUPS_IPP_BACKEND"
+ echo "done"
+ fi
+ }
Modified: freenx.install
===================================================================
--- freenx.install 2012-04-21 21:06:35 UTC (rev 156611)
+++ freenx.install 2012-04-21 21:08:27 UTC (rev 156612)
@@ -1,29 +1,61 @@
post_install() {
+ # Make sure the group and user "nx" exists on this system and have the correct values
+ if grep -q "^nx:" /etc/group &> /dev/null ; then
+ groupmod -g 85 -n nx nx &> /dev/null
+ else
+ groupadd -g 85 nx &> /dev/null
+ fi
+
+ if grep -q "^nx:" /etc/passwd 2> /dev/null ; then
+ usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx nx &> /dev/null
+ else
+ useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx -r nx &> /dev/null
+ fi
+
# setting up freenx
echo 'Generating keys ...'
- /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
- /bin/cat <<THEEND
- ATTENTION FREENX:
- For correct setup please take a look at the wiki:
- http://wiki.archlinux.org/index.php/FreeNX
- THEEND
+# /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
+ /usr/lib/nx/bin/nxsetup --install 2>&1 >/dev/null
+
+ echo "ATTENTION FREENX:"
+ echo "For correct setup please take a look at the wiki:"
+ echo "http://wiki.archlinux.org/index.php/FreeNX"
}
post_upgrade() {
+ # Make sure the group and user "nx" exists on this system and have the correct values
+ if grep -q "^nx:" /etc/group &> /dev/null ; then
+ groupmod -g 85 -n nx nx &> /dev/null
+ else
+ groupadd -g 85 nx &> /dev/null
+ fi
+
+ if grep -q "^nx:" /etc/passwd 2> /dev/null ; then
+ usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx nx &> /dev/null
+ else
+ useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx -r nx &> /dev/null
+ fi
+
# setting up freenx
- echo 'Rerunning nxsetup ...'
- /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
+ echo "Rerunning nxsetup ..."
+# /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
+ /usr/lib/nx/bin/nxsetup --install 2>&1 >/dev/null
if [ "`vercmp $2 0.7.3-10.1`" -lt 0 ]; then
# important upgrade notice
echo "*** config file location has been moved ***"
echo "Please apply your local settings from /opt/NX/etc/node.conf"
- echo "into /etc/nxserver/node.conf !"
+ echo "into /etc/nxserver/node.conf and make sure you move session files"
+ echo "and other setting from /opt/NX/{var/db/,home/}* to"
+ echo "/var/lib/nxserver/{var/db/,home/}*"
+ echo "When you have FreeNX server running clean with rm -rf /opt/NX"
fi
}
# arg 1: the old package version
pre_remove() {
- /usr/lib/NX/bin/nxsetup --uninstall --purge 2>&1 >/dev/null
- usr/sbin/groupdel nx &>/dev/null
+ /usr/lib/nx/bin/nxsetup --uninstall --purge 2>&1 >/dev/null
+# usr/sbin/groupdel nx &>/dev/null
+ userdel nx &> /dev/null
+ groupdel nx &> /dev/null || /bin/true
}
More information about the arch-commits
mailing list