Bug 1323073 - libguestfs-1.33.16-2.fc25 FTBFS: libguestfs-1.33.16.tar.gz.sig: No such file or directory
Summary: libguestfs-1.33.16-2.fc25 FTBFS: libguestfs-1.33.16.tar.gz.sig: No such file ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-01 08:03 UTC by Petr Pisar
Modified: 2016-04-01 09:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-01 08:54:09 UTC
Type: Bug


Attachments (Terms of Use)

Description Petr Pisar 2016-04-01 08:03:48 UTC
libguestfs-1.33.16-2.fc25 fails to build because it's not possible to create source package:

Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86
_64 --nodeps /builddir/build/SPECS/libguestfs.spec'] with env {'CCACHE_DIR': '/t
mp/ccache', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'CCACHE_UMASK': '002', 'LANG': 'en_US.UTF-8', 'PROMPT_COMMAND': 'printf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'TERM': 'vt100', 'SHELL': '/bin/bash'} and shell False
error: Bad file: /builddir/build/SOURCES/libguestfs-1.33.16.tar.gz.sig: No such file or directory
Building target platforms: x86_64
Building for target x86_64
RPM build errors:
    Bad file: /builddir/build/SOURCES/libguestfs-1.33.16.tar.gz.sig: No such file or directory

The reason is the libguestfs-1.33.16.tar.gz.sig (and other files guarded by %{verify_tarball_signature} condition) are not tracked by git, neither by sources file.

The real bug is inhibiting verify_tarball_signature definition:

# Verify tarball signature with GPGv2 (only possible for stable branches).
#%global verify_tarball_signature 1

This spec code defines the macro because macros are evaluated even in comments. You have to escape the "%" character:

# Verify tarball signature with GPGv2 (only possible for stable branches).
#%%global verify_tarball_signature 1

Comment 1 Richard W.M. Jones 2016-04-01 08:54:09 UTC
Bleah RPM ...

Anyway, I found that using #%%... doesn't work, because you get:

error: parse error in expression
error: /home/rjones/d/fedora/libguestfs/master/libguestfs.spec:29: bad %if condition
error: query of specfile /home/rjones/d/fedora/libguestfs/master/libguestfs.spec failed, can't parse

So I did this instead which appears to work:

http://pkgs.fedoraproject.org/cgit/rpms/libguestfs.git/commit/?id=c4612fc7f6e04d5cd50a455075529d3328358518

Comment 2 Petr Pisar 2016-04-01 09:15:00 UTC
That's because you use the macro unconditionally. Rewriting

%if 0%{verify_tarball_signature}

to 

%if 0%{?verify_tarball_signature}

would be another solution.

But thanks for the quick fix.


Note You need to log in before you can comment on or make changes to this bug.