LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-13-2006, 05:24 PM   #1
BEI
LQ Newbie
 
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27

Rep: Reputation: 15
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
 
Old 02-14-2006, 03:00 AM   #2
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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.
 
Old 02-15-2006, 01:48 PM   #3
BEI
LQ Newbie
 
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27

Original Poster
Rep: Reputation: 15
Thank you very much jong357
 
Old 02-15-2006, 07:04 PM   #4
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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.
 
Old 02-17-2006, 12:22 PM   #5
BEI
LQ Newbie
 
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27

Original Poster
Rep: Reputation: 15
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
 
Old 02-17-2006, 04:39 PM   #6
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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...
 
Old 02-18-2006, 02:33 PM   #7
BEI
LQ Newbie
 
Registered: Sep 2003
Location: Moscow, Idaho
Distribution: Slackware 10.2
Posts: 27

Original Poster
Rep: Reputation: 15
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.
 
Old 02-19-2006, 04:17 PM   #8
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
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
 
Old 03-17-2006, 05:47 PM   #9
danieldk
Member
 
Registered: Aug 2002
Posts: 150

Rep: Reputation: 15
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!
 
Old 05-23-2006, 10:36 PM   #10
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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...
 
Old 06-09-2006, 12:05 PM   #11
rapega
LQ Newbie
 
Registered: Jun 2006
Posts: 1

Rep: Reputation: 0
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
 
Old 06-09-2006, 03:00 PM   #12
zborgerd
Member
 
Registered: Mar 2004
Distribution: Slackware / Dropline GNOME
Posts: 378

Rep: Reputation: 30
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.
 
Old 06-10-2006, 01:44 PM   #13
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Maybe Pat will see this thread and add a package to Slackware current?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: VMware Introduces Free VMware Server LXer Syndicated Linux News 0 02-07-2006 08:46 AM
LXer: VMware cuts VMware Server price to zero LXer Syndicated Linux News 0 02-04-2006 03:31 AM
KDE 3.5.1 slackbuild? bird603568 Slackware 7 02-04-2006 12:35 AM
SlackBuild guildline kaon Slackware 3 12-22-2005 10:52 AM
SlackBuild system thegeekster Slackware 7 06-01-2004 06:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration