Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-13-2006, 05:24 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27
Rep:
|
VMWare Server slackbuild?
I recall seeing a Workstation 5.5 slackbuild posted here awhile back, and am now wondering if anybody has a slackbuild / package script for the newly released VMWare Server beta?
Thanks.
--BEI
|
|
|
02-14-2006, 03:00 AM
|
#2
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Why, but ofcourse. Hot off the press just for you..
It was pretty much the same as my workstation build script only I refined it some. I had to install Slackware first because I've been messing around with the latest FreeB... Fluxbox/rxvt/Xedit doesn't make for a very expiditious project... I'm slightly crispy on the edges after this one... Hope you enjoy..
Code:
#!/bin/sh
#
# After you install the resulting Slackware package, and then run
# vmware-config.pl, It will ask where certain directories are located.
# Take the default answer by hitting [ENTER]. It will also report that
# some files already exist. We have placed them in the default
# locations via this script so just hit [ENTER] to overwrite.
# Nobody likes cruft when you uninstall. You'll still have leftovers
# tho unless you use 'vmware-uninstall.pl'. It's the nature of the
# beast with programs like this....
CWD=`pwd`
TMP=/tmp
PKGNAME=vmware-server
PKG=$TMP/package-$PKGNAME
VERSION=e.x.p-20925
PKGVER=e.x.p_20925
ARCH=i386
BUILD=1
# Start VMware at boot? anything other than a 'no' means a 'yes'...
AUTOSTART=yes
rm -rf $PKG
rm -rf $TMP/vmware.{err,log}
mkdir -p $PKG/{install,etc/rc.d,usr/{sbin,man/man1,doc,bin,lib}}
mkdir -p $PKG/usr/share/{pixmaps,applications,icons/hicolor}
mkdir -p $PKG/var/{log,run}/vmware
# Log it....
test_pipe()
{
for i in "${PIPESTATUS[@]}"
do
test $i != 0 && { echo "FAILED! Check the logs in $TMP to see what went wrong..." ; exit 1 ; }
done
echo "Package build Successful! Double check with the build logs to make sure."
echo "Your package, along with the logs, can be found in $TMP."
echo
sleep 3
return 0
}
# The system has to be clean:
if [ -a /var/log/packages/vmware* ]; then
echo
echo "Removing existing VMware install..."
removepkg /var/log/packages/vmware* > /dev/null 2>&1
fi
if [ -d /usr/lib/vmware ]; then
# Just incase
rm -rf /usr/lib/vmware
fi
if [ -d /etc/vmware ]; then
rm -rf /etc/vmware
fi
# We need these on the system first:
# We'll clean up at the end
mkdir -p /etc/rc.d/{rc{0,1,2,3,4,5,6},init}.d
cd $TMP
echo
echo "$PKGNAME-$VERSION source is now extracting..."
rm -rf $PKGNAME-distrib
tar xzf $CWD/VMware-server-$VERSION.tar.gz
cd $PKGNAME-distrib
chown -R root.root .
install_vmware()
{ :
# Temporarily disable the configurator. We
# want the user to run it, not the builder..
sed -i 's@vmware-config.pl@IGNORE-THIS-ERROR@g' bin/vmware-uninstall.pl
perl vmware-install.pl -d
# Change the configurator back:
sed -i 's@IGNORE-THIS-ERROR@vmware-config.pl@g' /usr/bin/vmware-uninstall.pl
# Move it into our package:
echo
echo " ***************** Moving files into package *******************"
echo
mv -v /usr/lib/vmware $PKG/usr/lib
mv -v /usr/doc/vmware $PKG/usr/doc
mv -v /usr/man/man1/vmware.1.gz $PKG/usr/man/man1
mv -v /etc/rc.d/init.d/vmware $PKG/etc/rc.d/rc.vmware
chmod -v 755 $PKG/etc/rc.d/rc.vmware
mv -v /usr/bin/vmware-* $PKG/usr/bin
mv -v /usr/bin/vmnet-* $PKG/usr/bin
mv -v /usr/bin/{vm-support,vmware} $PKG/usr/bin
mv -v /usr/sbin/vmware-{authd,serverd} $PKG/usr/sbin
cp -av /etc/vmware $PKG/etc
# When the user runs the configurator, some more stuff will
# get dropped on the system. Not good if we're using pkgtool..
# Let's try and get as much as we can in place now so we
# don't have a bunch of cruft if/when we 'removepkg'
mkdir -p $PKG/usr/share/mime/{application,packages}
touch $PKG/usr/share/mime/packages/vmware.xml
touch $PKG/usr/share/mime/application/x-vmware-\
{vmfoundry,vm,snapshot,team,vmdisk}.xml
cp -av $PKG/usr/lib/vmware/share/icons/48x48 $PKG/usr/share/icons/hicolor
cp -av $PKG/usr/share/icons/hicolor/48x48/apps/vmware-server.png $PKG/usr/share/pixmaps
# Make the launcher:
cat << EOF > $PKG/usr/share/applications/vmware-server.desktop
[Desktop Entry]
Encoding=UTF-8
Name=VMware Server
Comment=Run and manage virtual machines
Exec=vmware
Terminal=false
Type=Application
Icon=vmware-server.png
StartupNotify=true
Categories=Application;System;
X-Desktop-File-Install-Version=0.9
MimeType=application/x-vmware-vm;
EOF
# Keep everything seperated for future upgrades:
( cd $PKG/usr/lib
mv -v vmware $PKGNAME-$PKGVER
ln -svf $PKGNAME-$PKGVER vmware
cd $PKG/usr/doc
mv -v vmware $PKGNAME-$PKGVER
ln -svf $PKGNAME-$PKGVER vmware )
# We need to have SyVinit directories everytime vmware-config.pl is run:
cat << EOF > $TMP/vmware-config-slack.patch
--- ./vmware-config.pl.orig 2006-02-14 03:08:55.000000000 -0500
+++ ./vmware-config.pl 2006-02-14 03:08:55.000000000 -0500
@@ -5,6 +5,11 @@
#
# Host configurator for VMware
+# Slackware setup:
+!mkdir -p /etc/rc.d/init.d!;
+!ln -sf /etc/rc.d/rc.vmware /etc/rc.d/init.d/vmware!;
+!mkdir -p /etc/rc.d/rc{0,2,3,5,6}.d!;
+
use strict;
# Use Config module to update VMware host-wide configuration file
@@ -8647,6 +8652,13 @@
show_PROMOCODE();
+ # Slackware cleanup:
+ !rm -f /etc/rc.d/init.d/vmware!;
+ !rmdir /etc/rc.d/init.d!;
+ !rm -f /etc/rc.d/rc{0,2,3,5,6}.d/K08vmware!;
+ !rm -f /etc/rc.d/rc{2,3,5}.d/S90vmware!;
+ !rmdir /etc/rc.d/rc{0,2,3,5,6}.d!;
+
print wrap('The configuration of ' . vmware_longname() . ' for this ' .
'running kernel completed successfully.' . "\n\n", 0);
if (vmware_product() ne 'wgs' &&
EOF
# sed a cat'ed patch.
sed -i 's@!@`@g' $TMP/vmware-config-slack.patch
( cd $PKG/usr/bin
echo
echo "Patching for BSD Init support..."
patch -Np1 -i $TMP/vmware-config-slack.patch
rm -f vmware-config.pl~ )
echo
echo "This aint redhat..."
rm -rvf $PKG/usr/lib/$PKGNAME-$PKGVER/modules/binary/*
# Make the package description:
cat << EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler--------------------------------------------------|
vmware-server: vmware-server (Virtual Machine Software)
vmware-server:
vmware-server: VMware Server is a robust yet easy to use product for users
vmware-server: new to server virtualization technology. VMware Server enables
vmware-server: companies to partition a physical server into multiple virtual
vmware-server: machines, and to start experiencing the benefits of
vmware-server: virtualization.
vmware-server:
vmware-server: Before running VMware Server for the first time, you need to
vmware-server: configure it by invoking the following command: vmware-config.pl
vmware-server:
EOF
# Make our install script:
cat << EOF > $PKG/install/doinst.sh
# Append to /etc/rc.d/rc.local if it's
# not already there, commented or not...
if ! grep /etc/rc.d/rc.vmware /etc/rc.d/rc.local 1> /dev/null 2> /dev/null ; then
cat << EOF >> /etc/rc.d/rc.local
# Added by VMware install:
if [ -x /etc/rc.d/rc.vmware ]; then
/etc/rc.d/rc.vmware start
fi
EOF
echo "EOF" >> $PKG/install/doinst.sh
echo "fi" >> $PKG/install/doinst.sh
# Our .desktop has a MimeType:
echo "if [ -x usr/bin/update-desktop-database ]; then" >> $PKG/install/doinst.sh
echo " chroot . usr/bin/update-desktop-database 1>/dev/null 2>/dev/null" >> $PKG/install/doinst.sh
echo "fi" >> $PKG/install/doinst.sh
echo "# Begin Symlinks:" >> $PKG/install/doinst.sh
# We could probably even stand to run update-mime-database...
if [ "$AUTOSTART" = "no" ]; then
chmod -v 644 $PKG/etc/rc.d/rc.vmware
fi
# Restore the system. If you already had SysVinit
# scripts in place, this won't harm anything.
rmdir /etc/rc.d/init.d
rm -f /etc/rc.d/rc{0,2,3,5,6}.d/K08vmware
rm -f /etc/rc.d/rc{2,3,5}.d/S90vmware
rmdir /etc/rc.d/rc{0,1,2,3,4,5,6}.d
# Remove any misc cruft...
sed -i 's@IGNORE-THIS-ERROR@vmware-config.pl@g' bin/vmware-uninstall.pl
echo
echo "Cleaning the system..."
perl bin/vmware-uninstall.pl > /dev/null 2>&1
# Clean up $TMP:
echo
echo "Cleaning up $TMP..."
cd $TMP
rm -rf $PKGNAME-distrib
rm -f vmware-config-slack.patch
# Build the package:
cd $PKG
makepkg -l y -c n $TMP/$PKGNAME-$PKGVER-$ARCH-$BUILD.tgz
}
# Run everything above:
echo
echo "Running silent install. Please wait..."
echo
{ install_vmware 3>&1 1>&2 2>&3 | tee "$TMP/vmware.err" ;} &>"$TMP/vmware.log"
test_pipe
I just thought of something and just incase it needs saying, your package will get tainted if you have installed any VMware product via the tarball installer script.... These slackbuilds are meant to be used exclusively.... Use your head and make sure you have a clean system first. My little /var/log/packages check will only hold your hand so much ya' know... We do remove /usr/lib/vmware and /etc/vmware if they are found but you'll still pickup old binaries in /usr/bin....
Last edited by jong357; 02-14-2006 at 02:34 PM.
|
|
|
02-15-2006, 01:48 PM
|
#3
|
LQ Newbie
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27
Original Poster
Rep:
|
Thank you very much jong357
|
|
|
02-15-2006, 07:04 PM
|
#4
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Your very welcome. I don't normally like to redirect the console output like I did, but I was handy-capped without Nautilus and gnome-terminal so I did the 'silent install' thing. That way you can review the logs at your leisure and if you REALLY enjoy watching stuff whiz by, you can just 'tail -f /tmp/vmware.log'... Anyway... enjoy.
|
|
|
02-17-2006, 12:22 PM
|
#5
|
LQ Newbie
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27
Original Poster
Rep:
|
Well bummer. The package builds and installs great, but unlike Workstation, vmware-serverd requres PAM to be on the machine. And since Slackware doesn't include PAM, we all know what that means.
Just an FYI for anybody who tries VMWare Server on Slack.
--BEI
|
|
|
02-17-2006, 04:39 PM
|
#6
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Yea, I saw that directory in $PKG/etc/vmware... I was going under the assumption that it might be optional... Bummer indeed. I spent all that time for nothing...
You could always try to get pam running but I'm not sure how I would feel about pam on a slack box...
|
|
|
02-18-2006, 02:33 PM
|
#7
|
LQ Newbie
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27
Original Poster
Rep:
|
Yea, I was thinking about installing PAM, but thats really a large commitment. Another option would be to install Dropline, which I know is built with PAM and installs it, but putting Dropline on a production server...um no thanks
--BEI
Last edited by BEI; 02-18-2006 at 02:34 PM.
|
|
|
02-19-2006, 04:17 PM
|
#8
|
Member
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378
Rep:
|
Quote:
Originally Posted by BEI
Yea, I was thinking about installing PAM, but thats really a large commitment. Another option would be to install Dropline, which I know is built with PAM and installs it, but putting Dropline on a production server...um no thanks
--BEI
|
Dropline's PAM packages may be used without installing Dropline GNOME in its entirety.
Please see this thread:
http://dropline-gnome.sourceforge.ne...ic.php?p=28934
|
|
|
03-17-2006, 05:47 PM
|
#9
|
Member
Registered: Aug 2002
Posts: 150
Rep:
|
I gave it a shot tonight, and just compiling the Linux-PAM libraries, and creating a simple PAM configuration for vmware-authd file is enough. No need to PAMify the whole system. I have made a quick writeup in my blog:
http://danieldekok.blogspot.com/2006...are-linux.html
Anyway, VMWare Server looks quite impressive!
|
|
|
05-23-2006, 10:36 PM
|
#10
|
Senior Member
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914
Rep:
|
Nice blog entry.. It might be especially cool to incorporate a PAM build into the script above.
./configure --prefix=/usr/lib/vmware/PAM --sysconfdir=/etc/vmware/PAM
Whatda' think, eh? Pretty slick. Most Large binary packages from comercial software vendors ship their own isolated libs with the package. Pretty bloaty but would keep your system less pammy...
|
|
|
06-09-2006, 12:05 PM
|
#11
|
LQ Newbie
Registered: Jun 2006
Posts: 1
Rep:
|
VMWare Server Beta and PAM
Hi there,
I would like to note that PAM shoul be configured before installing the latest VMWare Beta.
Otherwise you just get nothing to work.
Now the Server work fine with Slackware Current of April.
Thanks for the blog about PAM. It saved my day.
Ralf
|
|
|
06-09-2006, 03:00 PM
|
#12
|
Member
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378
Rep:
|
Here is an updated link to Dropline's PAM package thread, since the old link is gone:
http://forums.droplinegnome.org/viewtopic.php?p=28934
Last edited by zborgerd; 06-10-2006 at 11:28 AM.
|
|
|
06-10-2006, 01:44 PM
|
#13
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Maybe Pat will see this thread and add a package to Slackware current?
|
|
|
All times are GMT -5. The time now is 02:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|