new default scripts patch
authorVadim Kuznetsov <vadimk@gentoo.org>
Thu, 8 Jul 2010 15:58:29 +0000 (15:58 +0000)
committerVadim Kuznetsov <vadimk@gentoo.org>
Thu, 8 Jul 2010 15:58:29 +0000 (15:58 +0000)
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64

app-emulation/open-vm-tools/ChangeLog
app-emulation/open-vm-tools/Manifest
app-emulation/open-vm-tools/files/default-scripts.patch
app-emulation/open-vm-tools/open-vm-tools-0.0.20100616.268169-r1.ebuild [new file with mode: 0644]

index 2f23ab35ab2bce79a6a71dc0e25e7ef97299f152..d8fbfd18dc076cad84dc09992f426b860e52d56a 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-emulation/open-vm-tools
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/ChangeLog,v 1.36 2010/07/04 00:50:52 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/ChangeLog,v 1.37 2010/07/08 15:58:28 vadimk Exp $
+
+*open-vm-tools-0.0.20100616.268169-r1 (08 Jul 2010)
+
+  08 Jul 2010; Vadim Kuznetsov <vadimk@gentoo.org>
+  +open-vm-tools-0.0.20100616.268169-r1.ebuild, files/default-scripts.patch:
+  new default scripts patch
 
 *open-vm-tools-0.0.20100616.268169 (04 Jul 2010)
 
index 185b5c531f47e0560d0d84d51c7dcd680206cfb0..b003521d50935e33492b030cf68a975cf44c2bfd 100644 (file)
@@ -1,5 +1,5 @@
 AUX checkvm-pie-safety.patch 2043 RMD160 c73a1e3afe0085d26d7814410bc26fb8ea5062e7 SHA1 1b86588a3447b09924751ef38b914912d671f4b5 SHA256 e3e27f36c8ffad08b3ca038d9ebb13c5d1b36e003fb9a7d8eaa265fde802b1e0
-AUX default-scripts.patch 3525 RMD160 7c3dfd342be245531493a9cf7a8be2be4c67dc4b SHA1 56ba6ca91262f73732a7d806a9c812aea683c2d2 SHA256 99ad1a202335736c50bbb92432371e522934d1a3347e992158b881cf9f810da6
+AUX default-scripts.patch 6245 RMD160 858a918af6d783d06131abcf8352b650fb47d390 SHA1 e0f333c2eae7f54ffc35bbc250937fce61e604c6 SHA256 78ea752fa3219318455027d4e05ddf4909089038ab5fd458e33207b61cd9db5e
 AUX default-scripts1.patch 4787 RMD160 3186d91d1f6f840bb7fb2e757b802ba05675894b SHA1 5843708e342b8c57f600a6cbd7d0b12f7f14a35b SHA256 3190fe24e2b03e99fa0b7b9f93d413c7b886138c1e964ca7917a45099f29609e
 AUX open-vm-tools.desktop 127 RMD160 375ec8cd688a5fe0609076798e515c048be81c15 SHA1 6b6adcb93fbcb11e1638d6a80b3828256f880dcf SHA256 7cb78f0d94f1849aa964bc8e9d9a6c49955ba1a9b937174b1c266a9cc8eb4bc3
 AUX open-vm-tools.initd 1879 RMD160 bfccf434f969272b5c910b7c8e5b90de223ff410 SHA1 14314bfc1db3ddc724804c14ab9ddbd892948b10 SHA256 a01fe6ac2f2eeaf14808cc54d44b0cbdd3989e5cdc99feb3efb97b3959b6655a
@@ -15,6 +15,7 @@ DIST open-vm-tools-2010.06.16-268169.tar.gz 3582789 RMD160 c63e7eceb2dd971b80b08
 EBUILD open-vm-tools-0.0.20091216.217847-r2.ebuild 3054 RMD160 b7fd4b0c94cc1591636769a6b497c363b95b5b63 SHA1 fb244c8c6b2441ad7e33e98eeab5a308ec7bfbfd SHA256 6d41a444a8e24bcd16e398449745b2b8b4b94a03b43f9967d133db890d035141
 EBUILD open-vm-tools-0.0.20100223.236320-r1.ebuild 3185 RMD160 2b023dbb503a257582f56c12b1e68309b7d3251b SHA1 2e1380e67a592ec5ee1b3cf8d67e8db1205fc4c3 SHA256 2be3c8f12dd7eb68d6461aef955e7b129bc38c5fe37256c8bbc86ad303d478f5
 EBUILD open-vm-tools-0.0.20100320.243334.ebuild 3301 RMD160 a6ea94095cacf77813dd7401630a63e5eaf8b3b9 SHA1 c0e21bfef63736b40df19b27b5dd990cfccbee6f SHA256 ad84e096f42cb5db462ee0073ddb81eff1ca8f38449d35411b0960116b1e1581
+EBUILD open-vm-tools-0.0.20100616.268169-r1.ebuild 3377 RMD160 cee3caeb472ed7ba6603375ca27e6bcc2bea9155 SHA1 273c656cb6c49aa832d8593c2b57ae7651cd51a3 SHA256 cb77944a62c902beec69347c1aa33481d500f4dfbf9561c9b7bdcecad122c585
 EBUILD open-vm-tools-0.0.20100616.268169.ebuild 3376 RMD160 517fccb3b0c99f39fef0dcaf882eb6c04183bdd9 SHA1 3d52803bf54d860b0a8f7d95128cfd96a48191d7 SHA256 2e564df2c7d2e7321bc54e21971c21d54b86d02edf982d3f2e46064ea0df4146
-MISC ChangeLog 8044 RMD160 7e3c2ca5406e9240a71974c3b0da918a17876f84 SHA1 c0d8cf9b1cb1331de9332e1c8525b6e6ff5c5f58 SHA256 5e34c96c1a746510a8e186106ebdb711defbe327d456a1073d8b5b46636efc2a
+MISC ChangeLog 8254 RMD160 96fd2c46524ed6fc9a14f19da49f79dddad71ef1 SHA1 7eaf76ffa36a2bf6d5d03914655d6763aaed07fa SHA256 696a1f41de896569410e3a5f23244b9df78d29aa8fb6d53c809597fb675f8374
 MISC metadata.xml 791 RMD160 55a935bb194818c26471ad7e551dbffa1df2fc1c SHA1 cac933fef6a9eedc65a3d96f4edd117432bcbb2e SHA256 ac4e805eb85bb369b37f3381a6271a5bae8739b42465f64ee168cdc9683738d7
index 2136dad71d90c9611abeaaa9b67ca6dade920c9c..ed57fcfaa1daa511b9adc3f45c5a73e86a601944 100644 (file)
@@ -1,11 +1,21 @@
-diff --git a/scripts/linux/resume-vm-default b/scripts/linux/resume-vm-default
-index cebbba0..dbd38a6 100644
---- a/scripts/linux/resume-vm-default
-+++ b/scripts/linux/resume-vm-default
-@@ -25,41 +25,10 @@
- echo `date` ": Executing '$0'"
- echo
+--- scripts/linux/network.orig 2010-07-06 14:54:01.000000000 -0400
++++ scripts/linux/network      2010-07-07 13:05:21.000000000 -0400
+@@ -34,164 +34,6 @@
  
+ 
+ #
+-# find_networking_script --
+-#
+-#    Searches common Linux distro init/rc paths to find a singular network
+-#    services script.
+-#
+-# Result:
+-#    Returns a valid networking script path on success or "error" on failure.
+-#
+-# Side effects:
+-#    None.
+-#
+-
 -find_networking_script() {
 -    local script="error"
 -    for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do
@@ -37,103 +47,179 @@ index cebbba0..dbd38a6 100644
 -    echo "$script"
 -}
 -
- rescue_NIC() {
-    niclist="/var/run/vmware-active-nics"
- 
--   ifup_path=`which ifup 2>/dev/null`;
-+   ifup_path="/etc/init.d/net.";
-    if [ $? -ne 0 ]; then
-       return 1;
-    fi
-@@ -76,7 +45,7 @@ rescue_NIC() {
-          else
-             echo `date` "[rescue_nic] activating $nic ..."
- 
--            $ifup_path $nic
-+            $ifup_path$nic restart
-          fi
-       done < $niclist
- 
-@@ -95,15 +64,8 @@ if [ -d "$scriptsdir" ]; then
-     done
- fi
- 
--network=`find_networking_script`
--if [ "$network" != "error" ]; then
--   "$network" restart
--   # Continue even if the networking init script wasn't successful.
--   status=0
--else
--   echo "networking script not found"
--   status=1
--fi
-+# Continue even if the networking init script wasn't successful.
-+status=0
- 
- if [ $status -eq 0 ]; then
-     rescue_NIC
-diff --git a/scripts/linux/suspend-vm-default b/scripts/linux/suspend-vm-default
-index 80bf5b9..f590194 100644
---- a/scripts/linux/suspend-vm-default
-+++ b/scripts/linux/suspend-vm-default
-@@ -25,37 +25,6 @@
- echo `date` ": Executing '$0'"
- echo
- 
--find_networking_script() {
--    local script="error"
--    for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do
--        if [ -d "$dir/rc0.d" ] &&
--          [ -d "$dir/rc1.d" ] &&
--          [ -d "$dir/rc2.d" ] &&
--          [ -d "$dir/rc3.d" ] &&
--          [ -d "$dir/rc4.d" ] &&
--          [ -d "$dir/rc5.d" ] &&
--          [ -d "$dir/rc6.d" ]; then
 -
--          # Now find the appropriate networking script.
--          if [ -d "$dir/init.d" ]; then
--              if [ -x "$dir/init.d/network" ]; then
--                  script="$dir/init.d/network"
--              elif [ -x "$dir/init.d/networking" ]; then
--                  script="$dir/init.d/networking"
--              fi
--          else
--              if [ -x "$dir/network" ]; then
--                  script="$dir/network"
--              elif [ -x "$dir/networking" ]; then
--                  script="$dir/networking"
--              fi
--          fi
--        fi
--    done
+-#
+-# save_active_NIC_list --
+-#
+-#    Records a list of every active NIC to /var/run/vmware-active-nics.
+-#
+-#    XXX What's the story on aliases?  Should they still be included, or will
+-#    they be recreated automatically upon resume?
+-#
+-# Results:
+-#    $activeList has, one per line, a list of all active NICs.
+-#
+-# Side effects:
+-#    None.
+-#
 -
--    echo "$script"
+-save_active_NIC_list() {
+-   >$activeList
+-
+-   for nic in `ifconfig | awk '/^eth/ { print $1 }'`; do
+-      ifconfig $nic | egrep -q '\bUP\b' && echo $nic >> $activeList
+-      exitCode=`expr $exitCode \| $?`
+-   done
+-}
+-
+-
+-#
+-# rescue_NIC --
+-#
+-#    For each NIC recorded in $activeList that is not currently "up", run
+-#    "ifup $nic".
+-#
+-# Results:
+-#    All downed NICs should be active.
+-#
+-
+-rescue_NIC() {
+-   if [ -f "$activeList" ]; then
+-      while read nic; do
+-         if ifconfig $nic | egrep -q '\bUP\b'; then
+-            echo `date` "[rescue_nic] $nic is already active."
+-         else
+-            echo `date` "[rescue_nic] activating $nic ..."
+-
+-            ifup $nic
+-            exitCode=`expr $exitCode \| $?`
+-         fi
+-      done < $activeList
+-
+-      rm -f $activeList
+-   fi
+-}
+-
+-
+-#
+-# TranquilizeNetworkManager --
+-#
+-#    Put the NetworkManager daemon to sleep (maybe).
+-#
+-#    See http://projects.gnome.org/NetworkManager/developers/spec.html .
+-#
+-# Results:
+-#    Sleep(true) request is sent to the NetworkManager D-Bus interface.
+-#
+-# Side effects:
+-#    None.
+-#
+-
+-TranquilizeNetworkManager() {
+-   # `which' may be a bit noisy, so we'll shush it.
+-   dbusSend=`which dbus-send 2>/dev/null`
+-   if [ $? -eq 0 ]; then
+-      # NetworkManager 0.6
+-      $dbusSend --system --dest=org.freedesktop.NetworkManager          \
+-         /org/freedesktop/NetworkManager                                \
+-         org.freedesktop.NetworkManager.sleep
+-      # NetworkManager 0.7.0
+-      $dbusSend --system --dest=org.freedesktop.NetworkManager          \
+-         /org/freedesktop/NetworkManager                                \
+-         org.freedesktop.NetworkManager.Sleep boolean:true
+-   fi
 -}
 -
- save_active_NIC_list() {
-     ifconfig_path=`which ifconfig 2>/dev/null`
-     if [ $? ]; then
-@@ -76,15 +45,12 @@ fi
+-
+-#
+-# WakeNetworkManager --
+-#
+-#    Wake the NetworkManager daemon (maybe).
+-#
+-#    See http://projects.gnome.org/NetworkManager/developers/spec.html .
+-#
+-# Results:
+-#    Sleep(false)request is sent to the NetworkManager D-Bus interface.
+-#
+-# Side effects:
+-#    None.
+-#
+-
+-WakeNetworkManager() {
+-   # `which' may be a bit noisy, so we'll shush it.
+-   dbusSend=`which dbus-send 2>/dev/null`
+-   if [ $? -eq 0 ]; then
+-      # NetworkManager 0.6
+-      $dbusSend --system --dest=org.freedesktop.NetworkManager          \
+-         /org/freedesktop/NetworkManager                                \
+-         org.freedesktop.NetworkManager.wake
+-      # NetworkManager 0.7.0
+-      $dbusSend --system --dest=org.freedesktop.NetworkManager          \
+-         /org/freedesktop/NetworkManager                                \
+-         org.freedesktop.NetworkManager.Sleep boolean:false
+-   fi
+-}
+-
+-
+-#
+ # main --
+ #
+ #    Main entry point.  Perform some sanity checking, then map state change
+@@ -203,45 +45,24 @@
  
- save_active_NIC_list
+ main() {
+    exitCode=0
+-   activeList=/var/run/vmware-active-nics
  
--network=`find_networking_script`
--if [ "$network" != "error" ]; then
--   "$network" stop
--   # If the network is down, this may fail but that's not a good reason
--   # to prevent the suspend.
--   status=0
--else
--   echo "networking script not found"
--   status=1
--fi
-+for network in `ls /etc/init.d/net.*`; 
-+do
-+  "$network" stop
-+done
-+# If the network is down, this may fail but that's not a good reason
-+# to prevent the suspend.
-+status=0
+-   networkScript=`find_networking_script`
+-   [ "$networkScript" != "error" ] || Panic "Cannot find system networking script."
+-
+-   # XXX Are these really necessary?  If so, we should have seen customer
+-   # complaints by now.
+-   which ifup >/dev/null 2>&1      || Panic "ifup not in search path."
+-   which ifconfig >/dev/null 2>&1  || Panic "ifconfig not in search path."
++   #
++   # net.eth0, net.eth1, network, wicd, NetworkManager
++   service="net.eth0"
++
++   if [ $(rc-service -e net.eth0) ] 
++   then
++      service="net.eth0"
++   else
++      service="network"
++   fi
  
- exit "$status"
+    case "$1" in
+-      poweron-vm)
+-         rm -f $activeList
+-         ;;
+       suspend-vm)
+-         save_active_NIC_list
+-         "$networkScript" stop
+-         TranquilizeNetworkManager
++         rc-service $service stop
+          ;;
+       resume-vm)
+-         # According to hfu, "/etc/init.d/networking restart" on Debian 5.0
+-         # may bring down ethernet interfaces tagged as "allow-hotplug" without
+-         # bringing them back up.
+-         #
+-         # This is especially a problem when reverting to a live, running
+-         # VM snapshot where an active NIC list hadn't yet been generated,
+-         # resulting in sudden loss of an otherwise operational NIC.
+-         #
+-         # So, if the active list doesn't exist, assume we're coming back to
+-         # a live snapshot and capture the current active list now for
+-         # rescue later.
+-         if [ ! -s $activeList ]; then
+-            save_active_NIC_list
+-         fi
+-         WakeNetworkManager
+-         # XXX Do we really want restart or is start sufficient?  Like, would
+-         # using start avoid the problem mentioned above?
+-         "$networkScript" restart
+-         rescue_NIC
++         rc-service $service start
+          ;;
+       *) ;;
+    esac
diff --git a/app-emulation/open-vm-tools/open-vm-tools-0.0.20100616.268169-r1.ebuild b/app-emulation/open-vm-tools/open-vm-tools-0.0.20100616.268169-r1.ebuild
new file mode 100644 (file)
index 0000000..144b21c
--- /dev/null
@@ -0,0 +1,121 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/open-vm-tools-0.0.20100616.268169-r1.ebuild,v 1.1 2010/07/08 15:58:28 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils pam versionator
+
+MY_DATE="$(get_version_component_range 3)"
+MY_BUILD="$(get_version_component_range 4)"
+MY_PV="${MY_DATE:0:4}.${MY_DATE:4:2}.${MY_DATE:6:2}-${MY_BUILD}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Opensourced tools for VMware guests"
+HOMEPAGE="http://open-vm-tools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X doc fuse icu +pic unity xinerama"
+
+RDEPEND="app-emulation/open-vm-tools-kmod
+       >=dev-libs/glib-2
+       dev-libs/libdnet
+       sys-apps/ethtool
+       sys-process/procps
+       virtual/pam
+       X? (
+               dev-cpp/gtkmm
+               x11-base/xorg-server
+               x11-drivers/xf86-input-vmmouse
+               x11-drivers/xf86-video-vmware
+               x11-libs/gtk+
+               x11-libs/libnotify
+               x11-libs/libX11
+               x11-libs/libXtst
+       )
+       fuse? ( sys-fs/fuse )
+       icu? ( dev-libs/icu )
+       unity? (
+               dev-libs/uriparser
+               media-libs/libpng
+               x11-libs/libXScrnSaver
+       )
+       xinerama? ( x11-libs/libXinerama )
+       "
+
+DEPEND="${RDEPEND}
+       doc? ( app-doc/doxygen )
+       dev-util/pkgconfig
+       virtual/linux-sources
+       sys-apps/findutils
+       "
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+       use unity && ! use X && die 'The Unity USE flag requires "X" USE flag as well'
+       use unity && ! use xinerama && die 'The Unity USE flag requires xinerame USE="xinerama" as well'
+
+       enewgroup vmware
+}
+
+src_prepare() {
+       epatch "${FILESDIR}/default-scripts.patch"
+       epatch "${FILESDIR}/checkvm-pie-safety.patch"
+       #sed -i -e 's/proc-3.2.7/proc/g' configure || die "sed configure failed"
+       # Do not filter out Werror
+       # Upstream Bug  http://sourceforge.net/tracker/?func=detail&aid=2959749&group_id=204462&atid=989708
+       # sed -i -e 's/CFLAGS=.*Werror/#&/g' configure || die "sed comment out Werror failed"
+       sed -i -e 's:\(TEST_PLUGIN_INSTALLDIR=\).*:\1\$libdir/open-vm-tools/plugins/tests:g' configure || die "sed test_plugin_installdir failed"
+}
+
+src_configure() {
+       econf \
+               --with-procps \
+               --with-dnet \
+               --without-kernel-modules \
+               $(use_enable doc docs) \
+               --docdir=/usr/share/doc/${PF} \
+               $(use_with X x) \
+               $(use_with X gtk2) \
+               $(use_with X gtkmm) \
+               $(use_with icu) \
+               $(use_with pic) \
+               $(use_enable unity) \
+               $(use_enable xinerama multimon)
+
+       # Bugs 260878, 326761
+       find ./ -name Makefile | xargs sed -i -e 's/-Werror//g'  || die "sed out Werror failed"
+}
+
+src_compile() {
+       emake || die "failed to compile"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "failed to install"
+
+       rm "${D}"/etc/pam.d/vmtoolsd
+       pamd_mimic_system vmtoolsd auth account
+
+       rm "${D}"/usr/$(get_libdir)/*.la
+       rm "${D}"/usr/$(get_libdir)/open-vm-tools/plugins/common/*.la
+
+       newinitd "${FILESDIR}/open-vm-tools.initd" vmware-tools || die "failed to newinitd"
+       newconfd "${FILESDIR}/open-vm.confd" vmware-tools || die "failed to newconfd"
+
+       if use X;
+       then
+               insinto /etc/xdg/autostart
+               doins "${FILESDIR}/open-vm-tools.desktop" || die "failed to install .desktop"
+
+               elog "To be able to use the drag'n'drop feature of VMware for file"
+               elog "exchange, you need to do this:"
+               elog "  Add 'vmware-tools' to your default runlevel."
+               elog "  Add the users which should have access to this function"
+               elog "  to the group 'vmware'."
+       fi
+}