depmod while install 3rd-party-modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi

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
rpmfusion-mailinglist

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
running

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-2.6.41.2-1.fc15.x86_64
WARNING: Couldn't open directory kernel-2.6.41.2-1.fc15.x86_64/lib/modules/2.6.41.2-1.fc15.x86_64: No such file or
directory
FATAL: Could not open kernel-2.6.41.2-1.fc15.x86_64/lib/modules/2.6.41.2-1.fc15.x86_64/modules.dep.temp 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

%description
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

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

%build
%configure --disable-static \
 --disable-dependency-tracking \
 --disable-docs \
 --without-gtk2 \
 --without-gtkmm \
 --without-x \
 --without-icu \
 --disable-multimon \
 --without-root-privileges

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

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
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}/

%clean
rm -rf $RPM_BUILD_ROOT

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

%postun
/sbin/ldconfig
exit 0

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

%files
%defattr(-,root,root,-)
%{_bindir}/vm*
%{_datadir}/open-vm-tools
%config(noreplace) %{_sysconfdir}/pam.d/*
%{_unitdir}/vmtoolsd.service
%{_libexecdir}/vmtools-setup-modules
%{_libexecdir}/vmtools-unload-modules
%{_sysconfdir}/vmware-tools
/lib/modules/%{kernel_uname_r}/kernel/drivers/misc/vmci.ko
/lib/modules/%{kernel_uname_r}/kernel/drivers/misc/vmsync.ko
/lib/modules/%{kernel_uname_r}/kernel/net/vsock/vsock.ko

%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_libdir}/open-vm-tools

%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Wed Nov 23 2011 Reindl Harald <h.reindl@xxxxxxxxxxxxx>
- 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

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux