FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

LinkBack Thread Tools
Old 11-23-2011, 10:03 PM
Reindl Harald
Default depmod while install 3rd-party-modules


since rpmfusion ropped "open-vm-tools" and their kmods for F15
and F14 is nearly EOL i try to get them built by my own and
finally will provide a link to my rsc.rpm on this and the

it seems that all works fine now without the split of open-vm-tools
and kmod-open-vmtools because it is not needed if you have a build-vm

BUT the first tiem after reboot the kernel-modules are not found
and a "depmod -a" is needed what is really bad if you have vmware-HA

currently i tried "/sbin/depmod -a" in the 5post-section but this seems not
to work and for "depmod -b" it seems i am too stupid - below my current
SPEC-status and the question how to do "depmod" right before reboot while
kernel+open-vmtools updated

yes, is intended to be a server-package without gui-stuff and vmghfs

[root@testserver:~]$ depmod -b kernel-
WARNING: Couldn't open directory kernel- No such file or
FATAL: Could not open kernel- for
writing: No such file or directory

[root@buildserver64:~]$ cat /rpmbuild/SPECS/vmware-tools.spec
%define builddate 2011.11.20
%define buildver 535097
%define kernel_uname_r %(echo $(uname -r))

Name: open-vm-tools
Version: 0.0.0.%{buildver}
Release: 9%{?dist}
Summary: VMware Guest OS Tools
Group: Applications/System
License: LGPLv2
URL: http://open-vm-tools.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{builddate}-%{buildver}.tar.gz
Source1: vmtoolsd.service
Source2: vmtools-setup-modules
Source3: vmtools-unload-modules
Patch1: open-vm-tools-2.6.41.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: %{ix86} x86_64
Requires(post): systemd-units
Requires(preun): systemd-units
Requires: systemd-units
BuildRequires: kernel-devel
BuildRequires: kernel-headers
BuildRequires: libdnet-devel
BuildRequires: pam-devel
BuildRequires: uriparser-devel
BuildRequires: libnotify-devel
BuildRequires: fuse-devel
Obsoletes: open-vm-tools-kmod kmod-open-vm-tools akmod-open-vm-tools

Open-vm-tools are the open source implementation of VMware Tools. They
are a set of guest operating system virtualization components that
enhance performance and user experience of VMWare virtual
machines. This package contains the user-space programs and libraries
of open-vm-tools.

%package libs
Summary: Libraries for %{name}
Group: System Environment/Libraries

%description libs
The %{name}-libs package contains the runtime shared libraries for %{name}.

%package devel
Summary: Development package for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Open-vm-tools are the open source implementation of VMware Tools. They
are a set of guest operating system virtualization components that
enhance performance and user experience of VMWare virtual machines

%setup -q -n open-vm-tools-%{builddate}-%{buildver}
%patch1 -p1

%configure --disable-static

# Disable use of rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_f lag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_ DIE|g' libtool

make %{?_smp_mflags}

find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

# Install VMCI sockets header file
mkdir -p $RPM_BUILD_ROOT%{_includedir}
install -m 0644 lib/include/vmci_sockets.h $RPM_BUILD_ROOT%{_includedir}

# remove unwanted files
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/vmware-user.desktop
rm -rf $RPM_BUILD_ROOT/lib/modules/%{kernel_uname_r}/kernel/fs/vmhgfs
rm -rf $RPM_BUILD_ROOT/lib/modules/%{kernel_uname_r}/kernel/fs/vmblock
rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_uname_r}/kernel/drivers/net/vmxnet.ko
rm -f $RPM_BUILD_ROOT/usr/sbin/mount.vmhgfs
rm -f $RPM_BUILD_ROOT/sbin/mount.vmhgfs

# systemd-files
mkdir -p ${RPM_BUILD_ROOT}/%{_unitdir}
mkdir -p ${RPM_BUILD_ROOT}%{_libexecdir}
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/
install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}%{_libexecdir}/
install -m 755 %{SOURCE3} ${RPM_BUILD_ROOT}%{_libexecdir}/


# Setup guestd on initial install
/sbin/depmod -a
/bin/systemctl enable vmtoolsd.service
exit 0

exit 0

# Remove on uninstall
if [ "$1" = 0 ]
/bin/systemctl stop vmtoolsd.service 2> /dev/null > /dev/null
/bin/systemctl disable vmtoolsd.service 2> /dev/null > /dev/null
exit 0

%config(noreplace) %{_sysconfdir}/pam.d/*

%files libs

%files devel

* Wed Nov 23 2011 Reindl Harald <h.reindl@thelounge.net>
- reintroduce and update for fedora 15 kernel >= 2.6.41 (3.1)
- remove gui-crap and ghfs to relax dependencies on servers
- switch to systemd-unit

users mailing list
To unsubscribe or change subscription options:
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Thread Tools

All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org