[vdsm] Error building RPM

Xu He Jie xuhj at linux.vnet.ibm.com
Tue Aug 7 02:17:24 UTC 2012


Hi, Deepak:
    You need attend there is compile argument --enable-hooks. if without 
--enable-hooks, some hooks will not compile and package.

    Please see my inline comment.

On 08/07/2012 12:08 AM, Deepak C Shetty wrote:
> Hello,
>    I am creating a new hook for qemu cmdline support.
> Facing the below issue :
>
> Checking for unpackaged file(s): /usr/lib/rpm/check-files 
> /root/rpmbuild/BUILDROOT/vdsm-4.10.0-0.255.gitc80d988.fc16.x86_64
> error: Installed (but unpackaged) file(s) found:
>    /usr/libexec/vdsm/hooks/before_vm_start/50_qemucmdline
>
>
> RPM build errors:
>     Installed (but unpackaged) file(s) found:
>    /usr/libexec/vdsm/hooks/before_vm_start/50_qemucmdline
> make: *** [rpm] Error 1
>
>
> I am not a RPM expert, so looking for suggestions.
> I followed the steps that are done for faqemu and vhostmd hooks which 
> are shipped today.
> But its not working.
> ============================================================
>
> Changes I made..
>
> diff --git a/configure.ac b/configure.ac
> index ec35a49..519ba88 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -199,6 +199,7 @@ AC_OUTPUT([
>         vdsm_hooks/pincpu/Makefile
>         vdsm_hooks/promisc/Makefile
>         vdsm_hooks/qos/Makefile
> +       vdsm_hooks/qemucmdline/Makefile
>         vdsm_hooks/scratchpad/Makefile
>         vdsm_hooks/smartcard/Makefile
>         vdsm_hooks/smbios/Makefile
> diff --git a/vdsm.spec.in b/vdsm.spec.in
> index 60f49ff..3a24193 100644
> --- a/vdsm.spec.in
> +++ b/vdsm.spec.in
> @@ -260,6 +260,16 @@ BuildArch:      noarch
>  VDSM promiscuous mode let user define a VM interface that will capture
>  all network traffic.
>

you can find '%if 0%{?with_hooks}' at line 728, it means your package 
will be packaged with --enable-hooks.

> +%package hook-qemucmdline
> +Summary:        QEMU cmdline hook for VDSM
> +BuildArch:      noarch
> +Requires:       vdsm
> +
> +%description hook-qemucmdline
> +Provides support for injecting QEMU cmdline via VDSM hook.
> +It exploits libvirt's qemu:commandline facility available in the
> +qemu xml namespace.
> +
>  %package hook-qos
>  Summary:        QoS network in/out traffic support for VDSM
>  BuildArch:      noarch
> @@ -773,6 +783,11 @@ exit 0
>  %attr (755,vdsm,kvm) 
> %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc
>  %attr (755,vdsm,kvm) 
> %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc
>
> +%files hook-qemucmdline
> +%defattr(-, vdsm, kvm, -)
> +%doc COPYING
> +%attr (755,vdsm,kvm) 
> %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qemucmdline
> +
>  %files hook-qos
>  %defattr(-, vdsm, kvm, -)
>  %attr (755,vdsm,kvm) 
> %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos
> diff --git a/vdsm_hooks/Makefile.am b/vdsm_hooks/Makefile.am
> index 091cd73..e6a8280 100644
> --- a/vdsm_hooks/Makefile.am
> +++ b/vdsm_hooks/Makefile.am
> @@ -18,7 +18,7 @@
>  # Refer to the README and COPYING files for full details of the license
>  #
>
> -SUBDIRS = faqemu vhostmd
> +SUBDIRS = faqemu vhostmd qemucmdline

But there you added your hooks at here, it means it will be complie and 
pakcage even without --enable-hooks.
you can add your hooks to:

# Additional hooks
if HOOKS
SUBDIRS += \
     directlun \
     fileinject \
     floppy \
     hostusb \
     hugepages \
     isolatedprivatevlan \
     numa \
     pincpu \
     promisc \
     qos \
     scratchpad \
     smartcard \
     smbios \
     sriov \
     vmdisk
endif

>
>  include $(top_srcdir)/build-aux/Makefile.subs
>
> diff --git a/vdsm_hooks/qemucmdline/Makefile.am 
> b/vdsm_hooks/qemucmdline/Makefile.am
> new file mode 100644
> index 0000000..6742ff0
> --- /dev/null
> +++ b/vdsm_hooks/qemucmdline/Makefile.am
> @@ -0,0 +1,29 @@
> +#
> +# Copyright 2011-2012 Red Hat, Inc.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
> 02110-1301  USA
> +#
> +# Refer to the README and COPYING files for full details of the license
> +#
> +EXTRA_DIST = \
> +       before_vm_start.py
> +
> +install-data-local:
> +       $(MKDIR_P) $(DESTDIR)$(vdsmhooksdir)/before_vm_start
> +       $(INSTALL_SCRIPT) $(srcdir)/before_vm_start.py \
> + $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_qemucmdline
> +
> +uninstall-local:
> +       $(RM) $(DESTDIR)$(vdsmhooksdir)/before_vm_start/50_qemucmdline
>
>
> _______________________________________________
> vdsm-devel mailing list
> vdsm-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel



More information about the vdsm-devel mailing list