[libvirt] [libvirt-snmp][PATCH 2/3] Makefile: Introduce srpm target

Ján Tomko jtomko at redhat.com
Wed Sep 5 14:56:59 UTC 2018


On Wed, Sep 05, 2018 at 10:55:39AM +0200, Michal Privoznik wrote:
>Just like we have 'rpm' we might have 'srpm'.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> Makefile.am | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
>diff --git a/Makefile.am b/Makefile.am
>index 9ac6fc2..6ce91ed 100644
>--- a/Makefile.am
>+++ b/Makefile.am
>@@ -1,14 +1,18 @@
> SUBDIRS=src/ docs/
>
> EXTRA_DIST = \
>-	libvirt-snmp.spec libvirt-snmp.spec.in \
>+	$(PACKAGE).spec \
>+	$(PACKAGE).spec.in \

This change is also unrelated.

> 	autobuild.sh \
> 	autogen.sh \
> 	AUTHORS.in \
> 	$(NULL)
>
> rpm: clean
>-		@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
>+	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)
>+

This breaks 'make rpm'

make[1]: Leaving directory '/home/test/libvirt-snmp'
error: File libvirt-snmp-0.0.3.tar.xz: No such file or directory
/usr/bin/cat: libvirt-snmp-0.0.3.tar.xz: No such file or directory
error: File libvirt-snmp-0.0.3.tar.xz: No such file or directory
/usr/bin/cat: libvirt-snmp-0.0.3.tar.xz: No such file or directory
error: Failed to read spec file from libvirt-snmp-0.0.3.tar.xz
make: *** [Makefile:786: rpm] Error 1

Switching the project to use dist-xz before referencing it might help.

Jano

>+srpm: clean
>+	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ts $(distdir).tar.xz)
>
> dist-hook: gen-ChangeLog gen-AUTHORS
>
>-- 
>2.16.4
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180905/9508b321/attachment-0001.sig>


More information about the libvir-list mailing list