Sun Ray Server Software 4.0 on Gentoo 2007.0
From Sun Ray User Group Wiki
Contents |
SRSS on Gentoo/Linux
The following instructions are a quick HOWTO which explains how to install SRSS4.0 on a Gentoo2007.0 system. Aside a custom archive of required ebuilds, it explains how to successfully set up a base installation of SRSS under Gentoo2007.0. Large portions of this guide assume that the installation is performed on a pure 32-bit x86 system because the sunray archive supplied by SUN is known to contain 32bit binaries only. The installation, however, is known to be running also on 64bit systems such as amd64. All you need is the set of 'emul-linux-x86-XXXX' packages installed on Gentoo in addition to some other 32bit library binaries.
Installation
- Install gnome-base/gdm.
emerge -v gdm
- Change DISPLAYMANAGER to gdm in /etc/conf.d/xdm
- Install some tftp server (for example net-ftp/tftp-hpa)
emerge -v tftp-hpa
- Download the following patch archive with ebuilds and unpack it to /usr/local/portage
http://wiki.sun-rays.org/images/3/37/Sunray_gentoo_v0.1.tar.bz2
- Add the following line to /etc/make.conf:
PORTDIR_OVERLAY="/usr/local/portage"
- Add the following line to /etc/portage/categories:
sunray
- If you are installing on a amd64 system or any system with a different KEYWORD than 'x86' add the following to /etc/portage/package.keywords:
sunray/srss -* * sunray/SUNWutfw -* * sunray/SUNWutgsm -* * sunray/SUNWkior -* * sunray/SUNWutsto -* * sunray/SUNWutr -* * sunray/SUNWutwl -* * sunray/SUNWuttsc -* * sunray/SUNWutps -* * sunray/SUNWutio -* * sunray/SUNWutwar -* * sunray/SUNWduto -* * sunray/SUNWutprol -* * sunray/SUNWuti -* * sunray/SUNWuto -* * sunray/SUNWutm -* * sunray/SUNWutdso -* * sunray/SUNWutkau -* * sunray/SUNWutwh -* * sunray/SUNWkiom -* * sunray/SUNWutu -* * sunray/SUNWutwa -* * sunray/SUNWkio -* * sunray/SUNWutref -* * sunray/SUNWutdsk -* * sunray/SUNWutstr -* * sunray/SUNWutdsr -* * sunray/SUNWuttsc-kiosk -* * sunray/SUNWlibusbut -* * sunray/SUNWuta -* *
- Download the following files and place them into /usr/portage/distfiles:
srss_4.0_linux.zip - http://www.sun.com/software/sunray srwc_2.0_linux.zip - http://www.sun.com/software/sunray 127555-02.zip - http://sunsolve.sun.com/search/document.do?assetkey=urn:cds:docid:1-21-127555-02-1 127558-01.zip - http://sunsolve.sun.com/search/document.do?assetkey=urn:cds:docid:1-21-127558-01-1 128167-01.zip - http://sunsolve.sun.com/search/document.do?assetkey=urn:cds:docid:1-21-128167-01-1 SUNWutprol-0.9-1.i386.rpm - http://www.sun.com/download/products.xml?id=42f00055
- To install SRSS add following lines to /etc/portage/package.use:
sunray/srss web kiosk doc uttsc prolific sunray/SUNWkio doc sunray/SUNWuttsc pcsc-lite
- Install x11-misc/xkbdata from portage overlay
emerge -v x11-misc/xkbdata
If x11-misc/xkbdata blocked by x11-misc/xkeyboard-config, uninstall x11-misc/xkeyboard-config before installing x11-misc/xkbdata.
- Install sunray/srss
emerge -v sunray/srss
- If compilation of sunray/SUNWutdsk fails make sure to use a kernel < 2.6.24.
- After installation edit /etc/X11/gdm/custom.conf and modify it to your needs
- Make sure /usr/X11R6 exists. If not create the following link:
cd /usr ln -s ../usr X11R6
- Configure system Java VM with the following command and make sure to use an appropriate java engine (e.g. sun-jdk-1.6 or emul-linux-x86-java-1.6 for amd64 systems)
eselect java-vm
- If you are installing on a 64bit (amd64) system, make sure that all required emul-linux-x86-XXXX packages are installed. In addition, make sure to set the following links in /usr/lib32:
cd /usr/lib32 ln -s libldap.so libldap.so.199 ln -s liblber.so liblber.so.199
Also libsasl2.so.2 is required. However, there doesn't seem to be an emul-linux-x86-XXXX package for a 32bit version of libsasl2. So you might perfectly grab a 32bit binary from a different system and install it in /usr/lib32.
- Configure SRSS according to Installation and Configuration Guide http://www.sun-rays.org/lib/hardware/sunray/4.0-09_07/820-0414.pdf and use the following commands to configure it:
/opt/SUNWut/sbin/utadm -A network_number /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable; ldconfig /opt/SUNWut/sbin/utconfig
- SRSS was configured on LAN Subnet with `/opt/SUNWut/sbin/utadm -A subnet_number` command. During configuration with /opt/SUNWut/sbin/utconfig following setup was used:
Configure Sun Ray Web Administration? ([y]/n)? y Enter Apache Tomcat installation directory [/usr/share/tomcat-6]: Enter HTTP port number [1660]: Enable secure connections? ([y]/n)? y Enter HTTPS port number [1661]: Enter Tomcat process username [utwww]: Enable remote server administration? (y/[n])? y Configure Sun Ray Kiosk Mode? (y/[n])? Configure this server for a failover group? (y/[n])
- If you are installing on a 64bit system (e.g. amd64) make sure to comment out the pam modules in /etc/pam.d/gdm-srss because currently there are no 64bit native versions of the pam modules available. An alternative might be to install an own gdm version compiled for 32bit.
- In case you use syslog-ng instead of syslogd, add the following lines to /etc/syslog-ng/syslog-ng.conf:
destination sunray_messages { file("/var/opt/SUNWut/log/messages" perm(0640) owner(root) group(utadmin)); };
destination sunray_admin_log { file("/var/opt/SUNWut/log/admin_log" perm(0640) owner(root) group(utadmin)) ; };
filter sunray_messages { facility(user) and level(info); };
filter sunray_admin_log { facility(local1) and level(info); };
log { source(src); filter(sunray_messages); destination(sunray_messages); };
log { source(src); filter(sunray_admin_log); destination(sunray_admin_log); };
- To get the sunray tools into the PATH of your users, create the file /etc/env.d/99sunray with the following contents:
PATH="/opt/SUNWut/bin" ROOTPATH="/opt/SUNWut/sbin:/opt/SUNWut/bin" MANPATH="/opt/SUNWut/share/man"
then run env-update after you created that file.
- Make sure the following services are started or restarted:
/etc/init.d/xinetd restart /etc/init.d/xdm restart /etc/init.d/srss start /etc/init.d/syslog-ng restart
- Try to connect your sunray to the new sunray server and see if everything works as expected. Also check if you are able to connect with a webbrowser to your server at port 1660.
- Select the above services to start at boot time with `rc-config --add`
Notes
- Only installation on standalone gentoo server was tested.
- `/opt/SUNWut/sbin/utadm -a` doesn't edit /etc/conf.d/net corectly. Edit it manually.
- To compile sunray/SUNWutdsk kernel <= 2.6.23 is required.
- /opt/SUNWut/lib/utprodinfo uses direct access to /var/db/pkg. `rpm -q` analog on gentoo (equery) too slow.
Bugs/ToDo
- Xnewt crash when trying to run any libqt linked (both libqt-3 or libqt-4) application. Solution: remove
/usr/share/fonts/encodings/large/jisx0208.1990-0.enc.gz and edit /usr/share/fonts/encodings/large/encodings.dir.
- Xnewt crash when trying to run any application accessing True Type fonts through old "core X font subsystem" (i. e. xfontsel) . Solutions:
- Not tested. Use fontserver to access True Type fonts.
- Download http://mirror.centos.org/centos/4/os/i386/CentOS/RPMS/freetype-2.1.9-6.el4.i386.rpm and install rpm to system with following commands
rpm2cpio freetype-2.1.9-6.el4.i386.rpm | cpio -idmv cp -P usr/lib/libfreetype.so.* /opt/SUNWut/lib/ ldconfig
Create file /usr/bin/Xnewt.sh
touch /usr/bin/Xnewt.sh chmod 755 /usr/bin/Xnewt.sh
with content
#!/bin/sh
export LD_PRELOAD="/etc/opt/SUNWut/basedir/lib/libfreetype.so.6":${LD_PRELOAD}
exec /usr/bin/Xnewt $@
Then apply following patch
--- /opt/SUNWut/lib/xmgr/gdm/add-dpy.orig 2008-06-06 19:36:56.000000000 +0300
+++ /opt/SUNWut/lib/xmgr/gdm/add-dpy 2008-06-06 19:37:09.000000000 +0300
@@ -64,7 +64,7 @@
xcdesc="DisplayManager.*_%d.exportList: SUN_SUNRAY_TOKEN=$token CORONA_TOKEN=$token"
if [ "$type" = normal ]
then
- xsdesc=":%d SunRay local /usr/bin/Xnewt :%d"
+ xsdesc=":%d SunRay local /usr/bin/Xnewt.sh :%d"
else
xsdesc="# :%d RESERVED"
fi
--- /opt/SUNWut/lib/utxinit.orig 2008-06-06 19:43:10.000000000 +0300
+++ /opt/SUNWut/lib/utxinit 2008-06-06 20:02:24.000000000 +0300
@@ -101,7 +101,7 @@
then
XSERVER="/bin/false"
- for XSERVERBIN in /usr/openwin/bin/Xsun /usr/bin/Xnewt ; do
+ for XSERVERBIN in /usr/openwin/bin/Xsun /usr/bin/Xnewt.sh ; do
if [ -x $XSERVERBIN ] ; then
XSERVER=$XSERVERBIN
break
--- /opt/SUNWut/lib/utxsun.orig 2008-06-06 19:50:59.000000000 +0300
+++ /opt/SUNWut/lib/utxsun 2008-06-06 19:51:22.000000000 +0300
@@ -8,7 +8,7 @@
INFODIR=/var/opt/SUNWut
RESDIR=$INFODIR/dispinfo
SUNWUTBIN=/opt/SUNWut/bin
-XSUN=/usr/bin/Xnewt
+XSUN=/usr/bin/Xnewt.sh
# XSERVER can be 1 of Xsun (on sparc with openwin)
# Xnewt (on linux with mit-based static server)
# Xorg (on linux with xorg-based static server)
@@ -58,7 +58,7 @@
fi
fi
-if [ "${XSUN##*/}" = "Xnewt" ]; then
+if [ "${XSUN##*/}" = "Xnewt.sh" ]; then
# turn on the backingstore for the static Xnewt server
XMOREOPTS="$XMOREOPTS +bs"
fi
- Web Gui doesn't show any 'Installed Sun Ray Packages'. In /var/opt/SUNWut/log/utwebadmin.log:
com.sun.ut.service.ServiceException: /etc/opt/SUNWut/basedir/lib/utprodinfo -p SUNWkio Kiosk NAME VERSION PSTAMP , ErrorCode: 1
- x11-misc/xkbdata ebuild doesn't check for 127555-02.zip checksum
- Incorrect LICENSE variable in ebuilds. Should be file from /usr/portage/licenses
- Gentoo-specific ebuilds code cleanup needed like use doins function instead if cp.
- The PAM modules included in the SRSS is available as 32bit binaries only for GDM. Instructions are required how to install a 32bit gdm which can be used. However, without the PAM modules the SRSS is perfectly running, only the smartcard authentication does not work.
- If use of masked packages enabled, after installation of x11-misc/xkbdata and sunray/srss the following message may appears when trying to emerge new packages:
[blocks B ] x11-misc/xkeyboard-config (is blocking x11-misc/xkbdata-1.0.1-r10) [blocks B ] x11-misc/xkbdata (is blocking x11-misc/xkeyboard-config-1.2)
So xkeyboard-config is blocking xkbdata which needs to be resolved in some future version of this SRSS packages for gentoo.
Everywhere in ebuild from /usr/portage construction used
|| ( x11-misc/xkeyboard-config x11-misc/xkbdata )
except >=x11-base/xorg-server/xorg-server-1.4.0.90-r3. So, maybe, workaround is to add following lines to /etc/portage/package.mask
>=x11-base/xorg-server-1.4.0.90-r3
It seems that in future versions of gentoo ebuilds x11-misc/xkbdata dependency would be removed, but xkb files in old format from x11-misc/xkbdata required for Xnewt.
- During configuration when running /opt/SUNWut/sbin/utadm script, it may modify following files:
/etc/dhcp/dhcp.conf /etc/conf.d/net
When running /opt/SUNWut/sbin/utconfig and/or /etc/init.d/utsyscfg script, it can modify
/etc/xinetd.d/tftp /etc/pam.d/gdm-srss /etc/pam.d/utadmingui /etc/pam.d/utselfreg /etc/nsswitch.conf /etc/services /etc/syslog.conf
and run following commands
rc-config add dhcpd rc-config delete dhcpd
At first, I supposed to disable such weird behavior, but then decided to keep port to gentoo as close as possible to original version of sunray software.

