Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 295221 Details for
Bug 386721
app-emulation/open-vm-tools-kmod-0.0.20110821.471295 fails to build against hardened-sources-3.0.4-r1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script to place in /etc/portage/postsync.d
open-vm-tools-kmod (text/plain), 4.13 KB, created by
Martin Kolleck
on 2011-12-08 21:26:12 UTC
(
hide
)
Description:
Script to place in /etc/portage/postsync.d
Filename:
MIME Type:
Creator:
Martin Kolleck
Created:
2011-12-08 21:26:12 UTC
Size:
4.13 KB
patch
obsolete
>#! /bin/bash > >file_exists() >{ > echo "File exists: $1" > exit 0 >} > >VERSION="2011.11.20.535097" > >for f in \ > /usr/portage/app-emulation/open-vm-tools-kmod/files/vmci-driver.patch \ > /usr/portage/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-${VERSION}-r1.ebuild >do > [[ -e $f ]] && file_exists $f >done > >umask 022 >cd /usr/portage/app-emulation/open-vm-tools-kmod >patch -Np1 <<EOF_PATCH >--- old/files/vmci-driver.patch >+++ new/files/vmci-driver.patch >@@ -0,0 +1,55 @@ >+--- open-vm-tools-2011.09.23-491607-before/modules/linux/vmci/linux/driver.c >++++ open-vm-tools-2011.09.23-491607-after/modules/linux/vmci/linux/driver.c >+@@ -241,7 +241,24 @@ >+ #define LinuxDriverUnlockIoctlPerFD(mutex) do {} while (0) >+ #endif >+ >+-static struct file_operations vmuser_fops; >++/* >++ * Moved file operations initialize here because of incompatibilites >++ * with Gentoo hardened profile/hardend Linux 3. >++ */ >++static struct file_operations vmuser_fops = { >++ .owner = THIS_MODULE, >++ .poll = LinuxDriverPoll, >++#ifdef HAVE_UNLOCKED_IOCTL >++ .unlocked_ioctl = LinuxDriver_UnlockedIoctl, >++#else >++ .ioctl = LinuxDriver_Ioctl, >++#endif >++#ifdef HAVE_COMPAT_IOCTL >++ .compat_ioctl = LinuxDriver_UnlockedIoctl, >++#endif >++ .open = LinuxDriver_Open, >++ .release = LinuxDriver_Close >++}; >+ >+ >+ /* >+@@ -378,26 +395,6 @@ >+ return -ENOMEM; >+ } >+ >+- /* >+- * Initialize the file_operations structure. Because this code is always >+- * compiled as a module, this is fine to do it here and not in a static >+- * initializer. >+- */ >+- >+- memset(&vmuser_fops, 0, sizeof vmuser_fops); >+- vmuser_fops.owner = THIS_MODULE; >+- vmuser_fops.poll = LinuxDriverPoll; >+-#ifdef HAVE_UNLOCKED_IOCTL >+- vmuser_fops.unlocked_ioctl = LinuxDriver_UnlockedIoctl; >+-#else >+- vmuser_fops.ioctl = LinuxDriver_Ioctl; >+-#endif >+-#ifdef HAVE_COMPAT_IOCTL >+- vmuser_fops.compat_ioctl = LinuxDriver_UnlockedIoctl; >+-#endif >+- vmuser_fops.open = LinuxDriver_Open; >+- vmuser_fops.release = LinuxDriver_Close; >+- >+ sprintf(linuxState.deviceName, "vmci"); >+ linuxState.major = 10; >+ linuxState.misc.minor = MISC_DYNAMIC_MINOR; >--- old/open-vm-tools-kmod-${VERSION}-r1.ebuild >+++ new/open-vm-tools-kmod-${VERSION}-r1.ebuild >@@ -0,0 +1,77 @@ >+# Copyright 1999-2011 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# \$Header: \$ >+ >+EAPI="4" >+ >+inherit linux-mod versionator >+ >+MY_PN="\${PN/-kmod}" >+MY_PV="\$(replace_version_separator 3 '-')" >+MY_P="\${MY_PN}-\${MY_PV}" >+ >+DESCRIPTION="Opensourced tools for VMware guests" >+HOMEPAGE="http://open-vm-tools.sourceforge.net/" >+SRC_URI="mirror://sourceforge/\${MY_PN}/\${MY_P}.tar.gz" >+ >+LICENSE="LGPL-2" >+SLOT="0" >+KEYWORDS="~amd64 ~x86" >+IUSE="" >+ >+RDEPEND="" >+ >+DEPEND="\${RDEPEND} >+ virtual/linux-sources >+ " >+ >+S="\${WORKDIR}/\${MY_P}" >+ >+pkg_setup() { >+ linux-mod_pkg_setup >+ >+ VMWARE_MOD_DIR="modules/linux" >+ VMWARE_MODULE_LIST="vmblock vmci vmhgfs vmsync vmxnet vsock" >+ >+ MODULE_NAMES="" >+ BUILD_TARGETS="auto-build HEADER_DIR=\${KERNEL_DIR}/include BUILD_DIR=\${KV_OUT_DIR} OVT_SOURCE_DIR=\${S}" >+ >+ for mod in \${VMWARE_MODULE_LIST}; >+ do >+ if [ "\${mod}" == "vmxnet" ]; >+ then >+ MODTARGET="net" >+ else >+ MODTARGET="openvmtools" >+ fi >+ MODULE_NAMES="\${MODULE_NAMES} \${mod}(\${MODTARGET}:\${S}/\${VMWARE_MOD_DIR}/\${mod})" >+ done >+} >+ >+src_prepare() { >+ sed -i.bak -e '/\smake\s/s/make/\$(MAKE)/g' modules/linux/{vmblock,vmci,vmhgfs,vmsync,vmxnet,vsock}/Makefile || die "Sed failed." >+ >+ epatch "\${FILESDIR}/vmci-driver.patch" >+} >+ >+src_configure() { >+ : # do nothing at all >+} >+ >+src_install() { >+ linux-mod_src_install >+ >+ local udevrules="\${T}/60-vmware.rules" >+ cat > "\${udevrules}" <<-EOF >+ KERNEL=="vsock", GROUP="vmware", MODE=660 >+ EOF >+ insinto /etc/udev/rules.d/ >+ doins "\${udevrules}" >+} >+ >+pkg_postinst() { >+ linux-mod_pkg_postinst >+ elog "vmxnet3 for Linux is now upstream (as of Linux 2.6.32)" >+ elog "pvscsi for Linux is now upstream (vmw_pvscsi) (as of Linux 2.6.33)" >+ elog "vmmemctl for Linux is now upstream (vmw_balloon) (as of Linux 2.6.34)" >+} >EOF_PATCH > >ebuild /usr/portage/app-emulation/open-vm-tools-kmod/open-vm-tools-kmod-${VERSION}-r1.ebuild digest
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 386721
:
289513
|
289515
|
289757
|
289759
| 295221