On Thu, Nov 3, 2011 at 9:01 PM, <andreas.ko...@nokia.com> wrote: > Hello OpenVZ community, > Hello Nagios community!
Hello Andreas. I'm writing this to you directly, skipping the mail lists, because it will be offtopic there. You can find a patch for your .spec-file attached which will fix some errors. -- SY, Ilya A. Otyutskiy aka Sharp
--- nagios-plugins-openvz-beans.spec.orig 2011-11-03 21:34:26.519419940 +0400 +++ nagios-plugins-openvz-beans.spec 2011-11-03 22:10:50.708390840 +0400 @@ -1,26 +1,51 @@ +# Because of different libdir for different architecture, we can't build +# this as noarch, but we don't need a -debuginfo package anyways. +%define debug_package %{nil} + +# rpmbuild's helpers will compile every .py file into a bytecode, so if we +# won't include those .pyc and .pyo files into our package, we will get an +# error about unpackaged files. I believe we don't want them, so we need +# to use this hack then. + +%global __os_install_post \ + /usr/lib/rpm/redhat/brp-compress \ + %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \ + /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ + /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/redhat/brp-java-repack-jars \ + Name: nagios-plugins-openvz-beans Version: 0.5 -Release: 0 +# Usually we start from release number 1 not 0. And it's a good idea to +# use dist macro. +Release: 1%{?dist} Summary: Nagios Plugin to check OpenVZ Bean Counters -License: GPL +# That is the license you've mentioned on your original mail. +License: GPLv2+ Group: Applications/System -Source: check_openvz_beans.py +# That's your first source file. +Source0: check_openvz_beans.py -Autoreq: 0 +# That's pretty useless stuff here. +#Autoreq: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildArch: noarch -Requires: python +# We need python-mox package installed. +Requires: python, python-mox %description Nagios Plugin to check OpenVZ Bean Counters %prep -rm -rf %{buildroot} + +# Making empty build section to calm down rpmlint. +%build %install +# We should clean the buildroot in install section, not in prep. +rm -rf %{buildroot} install -d -m0755 %{buildroot}%{_libdir}/nagios/plugins/contrib/ -install -m0755 %{_sourcefile} %{buildroot}%{_libdir}/nagios/plugins/contrib/ - +# You should use SOURCE0 macro here, otherwise it won't build. +install -m0755 %{SOURCE0} %{buildroot}%{_libdir}/nagios/plugins/contrib/ %clean rm -rf %{buildroot} @@ -30,5 +55,6 @@ %attr(755, root, root) %{_libdir}/nagios/plugins/contrib/check_openvz_beans.py %changelog -* Thu Oct 13 2011 Andreas Kotes <andreas.ko...@nokia.com> 0.5 - - initial release packaging +# That would be correct and approved format for changelogs. +* Thu Oct 13 2011 Andreas Kotes <andreas.ko...@nokia.com> - 0.5-1 +- initial release packaging
_______________________________________________ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users