You are not logged in.

#1 2010-07-02 23:48:46

schmoemi
Member
From: Gersthofen, BY, Germany
Registered: 2004-10-17
Posts: 51
Website

Being convenient: A VMware dummy package

Unfortunately, recent VMware-Player & -Workstation releases cannot be properly handled by ABS and they have their own, rather stubborn installer. They expect a System V init style directory which is, as we all know, not present on an Arch box by default. Many things have to be done by hand, awful things mad

So I wondered if there could not be a package which does all that stuff automatically, or at least, most of it. This would also have the benefit that all the fake dirs could be easily removed with pacman after one pulled that VMware crap off the machine and back to hell.
Well, I experimented a bit, with VMware Player and also with Workstation (I could download it, i could install it(!) yikes, I just could not run VMs, bcause a license key is required to do that) and I tried to work out how this dummy package has to look like. As a basis what has to be done, I used the ArchWiki article: http://wiki.archlinux.org/index.php/VMware
First, it has to provide /rc0.d to /rc6.d directories, and some kind of /init.d-directory. The first is done in the PKGBUILD:

# Maintainer: schmoemi <schmoemi at arcor dot de>
# Contributor: schmoemi <schmoemi at arcor dot de>

pkgname=vmware-comppkg
pkgver=0.0.1
pkgrel=1
pkgdesc="Dummy compatibility package to create an initdir-layout expected from VMware Player & Workstation installers"
arch=('any')
url="http://www.vmware.com"
license=('none')
depends=('coreutils')
install=('vmware-comppkg.install')
source=('vmware.conf')
md5sums=('1b4ccd2c1fcfff0d1d2519e30717357a')

build() {

  # create fake System V style init
  mkdir -p $pkgdir/etc/rc.d/vmware.d/rc{0,1,2,3,4,5,6}.d || return 1
  
  mkdir -p $pkgdir/etc/ld.so.conf.d || return 1
  cp $srcdir/vmware.conf $pkgdir/etc/ld.so.conf.d/vmware.conf || return 1
}

That's it in the first place.

For the fine tuning there is the .install-file:

_install_notes() {
    echo '---------------------------------------------------------------------------'
    echo 'NOTES:'
    echo
    echo 'This is a dummy package that creates fake /rc0.d.../rc6.d and /init.d' 
    echo 'directories to make the installers for VMware Player & VMware Workstation'
    echo 'run properly.'
    echo 
    echo 'IMPORTANT: Be sure to run the .bundle with the --custom option!!!'
    echo
    echo 'When it prompts for "System Service Runlevels" answer:'
    echo '/etc/rc.d/vmware.d/'
    echo
    echo 'For "System Service Scripts" use:'
    echo '/etc/rc.d/vmware.d/init.d'
    echo
    echo 'If you experience crashes immediately after startup run'
    echo '# ldconfig'
    echo 'as root.'
    echo
    echo 'See also the Wiki-pages: http://wiki.archlinux.org/index.php/Installing_VMware'
    echo
    echo '---------------------------------------------------------------------------'
}

# arg 1:  the new package version
post_install() {
    ln -s /etc/rc.d /etc/rc.d/vmware.d/init.d
    ln -s /bin/lsmod /sbin/lsmod
    _install_notes
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
   _install_notes  
}

# arg 1:  the old package version
post_remove() {
   rm -f /sbin/lsmod
   rm -f /etc/rc.d/vmware.d/init.d
   rmdir /etc/rc.d/vmware.d
   ldconfig
}

You see, the first section provides important notes on how to handle the VMware .bundle files.
Second section creates a few symlinks. First, the recommended /init.d directory, it is a symlink to /etc/rc.d, this makes the installer store the 'vmware'-script there. The other link /sbin/lsmod -> /bin/lsmod is more a cosmetic one. Otherwise the vmware-script would have to be edited.

Feedback on improvement but also the usefulness of such a package is much appreciated! Thanks for watching!

Last edited by schmoemi (2010-07-03 00:42:27)


The time when Microsoft starts making something that doesn't suck will be when they start making vacuum cleaners.

Offline

Board footer

Powered by FluxBB