mock build failing sometimes
Paul Howarth
paul at city-fan.org
Thu Aug 9 15:49:27 UTC 2007
Manuel Wolfshant wrote:
> Paul Howarth wrote:
>> Just started getting this myself. It was a self-inflicted problem. I
>> originally had the following in /etc/mock/defaults.cfg:
>>
>> config_opts['macros'] = """
>> %%_topdir %s/build
>> %%_rpmfilename %%%%{NAME}-%%%%{VERSION}-%%%%{RELEASE}.%%%%{ARCH}.rpm
>> %%packager Paul Howarth <paul at city-fan.org>
>> %%vendor city-fan.org repo http://www.city-fan.org/ftp/contrib/
>> """ % config_opts['chroothome']
>>
>> I recently changed this to:
>>
>> config_opts['macros'] = config_opts['macros'] + """
>> %%packager Paul Howarth <paul at city-fan.org>
>> %%vendor city-fan.org repo http://www.city-fan.org/ftp/contrib/
>> """
>>
>> Which should of course have been:
>>
>> config_opts['macros'] = config_opts['macros'] + """
>> %packager Paul Howarth <paul at city-fan.org>
>> %vendor city-fan.org repo http://www.city-fan.org/ftp/contrib/
>> """
>>
>> (no need to escape % characters any more)
> Thanks for the idea, Paul, but I've tested with no additional macros at
> all, and build failed :(
>
>>
>> This only manifested itself as a problem that broke builds when a
>> combination of two things happened:
>>
>> 1. My autocache file for devel was regenerated, resulting in broken
>> /var/lib/mock/fedora-devel*/root/builddir/.rpmmacros files with too
>> many % characters, and
>> 2. A version of rpmbuild appeared in devel that refused to build
>> packages in the presence of the broken rpmmacros file.
>>
>> Builds for older releases still worked but didn't pick up the packager
>> and vendor tags due to the macro file error.
>>
>> Paul.
>>
> Unfortunately this does not help in my case. I've erased the cache file
> and then:
> [wolfy at wolfy64 ~]$ mock -r fedora-devel-i386
> /home/wolfy/rpm/SRPMS/xorg-x11-avivo-1.0-2.fc7.src.rpm
> init
> clean
> prep
> This may take a while
> create cache
> setup
> error: cannot write to %sourcedir /usr/src/redhat/SOURCES
>
> Error installing srpm: xorg-x11-avivo-1.0-2.fc7.src.rpm
> ending
> done
> [wolfy at wolfy64 ~]$ cat
> /var/lib/mock/fedora-development-i386/root/builddir/.rpmmacros
>
> %_smp_mflags -j3
>
> %_rpmlock_path /var/lib/mock/fedora-development-i386/var/lib/rpm/__db.000
You're setting config_opts['macros'] to specify %_smp_mflags somewhere.
This is not a default option in mock.
This results in the omission of the %_topdir macro definition that mock
includes in config_opts['macros'] by default, and that's what's causing
your build failure.
See if you can find a reference to _smp_mflags somewhere in /etc/mock/*
Paul.
More information about the fedora-devel-list
mailing list