Bug 817796 - libguestfs-1.16.15-1.el6 can't be rebuild in mock
libguestfs-1.16.15-1.el6 can't be rebuild in mock
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-01 06:32 EDT by Levente Farkas
Modified: 2012-05-02 12:42 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-01 07:16:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Levente Farkas 2012-05-01 06:32:36 EDT
libguestfs-1.16.15-1.el6 can't be rebuild in mock, may be it'd BR missing ruby-devel?

Executing command: ['bash', '--login', '-c', 'rpmbuild -bs --target x86_64 --nodeps builddir/build/SPECS/libguestfs.spec'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', '
CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}
error: Macro % has illegal name (%define)
error: Macro % has illegal name (%define)
sh: ruby: command not found
sh: ruby: command not found
sh: ruby: command not found
sh: ruby: command not found
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/libguestfs-1.16.15-1.el6.src.rpm
error: Macro % has illegal name (%define)
error: Macro % has illegal name (%define)
Child return code was: 0
LEAVE do -->

.....

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.T79YE7
+ umask 022
+ cd /builddir/build/BUILD
+ cd libguestfs-1.16.15
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir repo
+ find /var/cache/yum -type f -name '*.rpm' -print0
+ xargs -0 cp -t repo
cp: will not overwrite just-created `repo/make-3.81-20.el6.x86_64.rpm' with `/var/cache/yum/os/packages/make-3.81-20.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/gmp-4.3.1-7.el6_2.2.x86_64.rpm' with `/var/cache/yum/os/packages/gmp-4.3.1-7.el6_2.2.x86_64.rpm'
cp: will not overwrite just-created `repo/nss-util-3.13.1-3.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/nss-util-3.13.1-3.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/nss-sysinit-3.13.1-7.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/nss-sysinit-3.13.1-7.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/libssh2-1.2.2-7.el6_2.3.x86_64.rpm' with `/var/cache/yum/os/packages/libssh2-1.2.2-7.el6_2.3.x86_64.rpm'
cp: will not overwrite just-created `repo/nss-3.13.1-7.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/nss-3.13.1-7.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/file-5.04-13.el6.x86_64.rpm' with `/var/cache/yum/os/packages/file-5.04-13.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/glibc-common-2.12-1.47.el6_2.9.x86_64.rpm' with `/var/cache/yum/os/packages/glibc-common-2.12-1.47.el6_2.9.x86_64.rpm'
cp: will not overwrite just-created `repo/libcurl-7.19.7-26.el6_2.4.x86_64.rpm' with `/var/cache/yum/os/packages/libcurl-7.19.7-26.el6_2.4.x86_64.rpm'
cp: will not overwrite just-created `repo/chkconfig-1.3.49.3-1.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/chkconfig-1.3.49.3-1.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/db4-4.7.25-17.el6.x86_64.rpm' with `/var/cache/yum/os/packages/db4-4.7.25-17.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/libxml2-2.7.6-4.el6_2.4.x86_64.rpm' with `/var/cache/yum/os/packages/libxml2-2.7.6-4.el6_2.4.x86_64.rpm'
cp: will not overwrite just-created `repo/glibc-devel-2.12-1.47.el6_2.9.x86_64.rpm' with `/var/cache/yum/os/packages/glibc-devel-2.12-1.47.el6_2.9.x86_64.rpm'
cp: will not overwrite just-created `repo/rpm-build-4.8.0-19.el6_2.1.x86_64.rpm' with `/var/cache/yum/os/packages/rpm-build-4.8.0-19.el6_2.1.x86_64.rpm'
cp: will not overwrite just-created `repo/curl-7.19.7-26.el6_2.4.x86_64.rpm' with `/var/cache/yum/os/packages/curl-7.19.7-26.el6_2.4.x86_64.rpm'
cp: will not overwrite just-created `repo/grep-2.6.3-3.el6.x86_64.rpm' with `/var/cache/yum/os/packages/grep-2.6.3-3.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/pcre-7.8-4.el6.x86_64.rpm' with `/var/cache/yum/os/packages/pcre-7.8-4.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/cpio-2.10-10.el6.x86_64.rpm' with `/var/cache/yum/os/packages/cpio-2.10-10.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/module-init-tools-3.9-19.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/module-init-tools-3.9-19.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/file-libs-5.04-13.el6.x86_64.rpm' with `/var/cache/yum/os/packages/file-libs-5.04-13.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/glibc-2.12-1.47.el6_2.9.x86_64.rpm' with `/var/cache/yum/os/packages/glibc-2.12-1.47.el6_2.9.x86_64.rpm'
cp: will not overwrite just-created `repo/iptables-1.4.7-5.1.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/iptables-1.4.7-5.1.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/rpm-4.8.0-19.el6_2.1.x86_64.rpm' with `/var/cache/yum/os/packages/rpm-4.8.0-19.el6_2.1.x86_64.rpm'
cp: will not overwrite just-created `repo/db4-utils-4.7.25-17.el6.x86_64.rpm' with `/var/cache/yum/os/packages/db4-utils-4.7.25-17.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/pam-1.1.1-10.el6_2.1.x86_64.rpm' with `/var/cache/yum/os/packages/pam-1.1.1-10.el6_2.1.x86_64.rpm'
cp: will not overwrite just-created `repo/openssl-1.0.0-20.el6_2.4.x86_64.rpm' with `/var/cache/yum/os/packages/openssl-1.0.0-20.el6_2.4.x86_64.rpm'
cp: will not overwrite just-created `repo/initscripts-9.03.27-1.el6_2.1.x86_64.rpm' with `/var/cache/yum/os/packages/initscripts-9.03.27-1.el6_2.1.x86_64.rpm'
cp: will not overwrite just-created `repo/procps-3.2.8-23.el6.x86_64.rpm' with `/var/cache/yum/os/packages/procps-3.2.8-23.el6.x86_64.rpm'
cp: will not overwrite just-created `repo/glibc-headers-2.12-1.47.el6_2.9.x86_64.rpm' with `/var/cache/yum/os/packages/glibc-headers-2.12-1.47.el6_2.9.x86_64.rpm'
cp: will not overwrite just-created `repo/nspr-4.8.9-3.el6_2.x86_64.rpm' with `/var/cache/yum/os/packages/nspr-4.8.9-3.el6_2.x86_64.rpm'
cp: will not overwrite just-created `repo/rpm-libs-4.8.0-19.el6_2.1.x86_64.rpm' with `/var/cache/yum/os/packages/rpm-libs-4.8.0-19.el6_2.1.x86_64.rpm'
cp: will not overwrite just-created `repo/tzdata-2012b-3.el6.noarch.rpm' with `/var/cache/yum/os/packages/tzdata-2012b-3.el6.noarch.rpm'
cp: will not overwrite just-created `repo/gawk-3.1.7-9.el6.x86_64.rpm' with `/var/cache/yum/os/packages/gawk-3.1.7-9.el6.x86_64.rpm'
Comment 1 Richard W.M. Jones 2012-05-01 06:46:59 EDT
If you build libguestfs outside Koji, you have to set an RPM
variable.  The easiest way is to create a file called
$HOME/.rpmmacros and place the following definition(s) in it:

%libguestfs_buildnet   1
#%libguestfs_runtests   0

(The second line will disable the tests if uncommented).

For mock, the situation is slightly more complex.  You have
to set the macro on the mock command line:

mock -D '%libguestfs_buildnet 1' [etc]

Note that in both cases, libguestfs will need access to the
network and will download RPMs from your yum repository, which
should be set to point at RHEL 6.2 or 6.3.  I haven't tested
whether or not this can be done from RHN.  If 'yumdownloader'
(from yum-utils) works, then this should work.
Comment 2 Levente Farkas 2012-05-01 06:58:08 EDT
imho it's not a proper solution. all package should have to build in mock (currently only 3 packages can't be build and one of them is libguestfs).

anyway why have to need to access and rpm build to the net?? why have to download packages during build? imho it's not a solution. all package (ie. all src.rpm) should have to contain all information and resource to build itself ie: in BuildRequires all external dependencies, and in the sources and patches all internal sources.
Comment 4 Richard W.M. Jones 2012-05-01 07:16:12 EDT
I'm sure it'd be better if it just worked, but the special
requirements of building the libguestfs appliance make this
impossible.  Just set the RPM macro, or use Koji for your builds.
Comment 5 Levente Farkas 2012-05-02 11:33:19 EDT
it was working in 6.2 why not in 6.3? if the default in spec file NOT to build net then why try to build it? if it's not possible to build without net then why there is such an option in the spec file?
Comment 6 Richard W.M. Jones 2012-05-02 12:42:10 EDT
It worked just the same way in 6.2.  Indeed it's worked this
way since libguestfs was added to RHEL in the beginning.

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