[opensuse-factory] build error help please
Hi, Could someone please help me to resolve the following error? RPMLINT report: =============== (none): E: badness 10000 exceeds threshold 1000, aborting. euca2ools.noarch: E: file-contains-buildroot (Badness: 10000) /usr/lib/python2.7/site-packages/euca2ools/__init__.pyc Your file contains traces of $RPM_BUILD_ROOT. https://build.opensuse.org/package/live_build_log?arch=x86_64&package=euca2ools&project=devel%3AopenSUSE%3AFactory&repository=snapshot Have no clue what to do. Also the build succeeds locally on a 12.1 system, of course.... Thanks, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday 05 January 2012 13:17:11 Robert Schweikert wrote:
Hi,
Could someone please help me to resolve the following error?
RPMLINT report: =============== (none): E: badness 10000 exceeds threshold 1000, aborting. euca2ools.noarch: E: file-contains-buildroot (Badness: 10000) /usr/lib/python2.7/site-packages/euca2ools/__init__.pyc Your file contains traces of $RPM_BUILD_ROOT.
https://build.opensuse.org/package/live_build_log?arch=x86_64&package=euca2o
ols&project=devel%3AopenSUSE%3AFactory&repository=snapshot
Have no clue what to do. Also the build succeeds locally on a 12.1 system, of course....
It's greping for the build root in a binary file. The pyc files do contain the build root, but I think it is a bogus check. As far as I can see, every single pyc file on my system contains the build root as a text string Anders -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2012-01-05 13:17:11 (-0500), Robert Schweikert <rjschwei@suse.com> wrote:
Hi,
Could someone please help me to resolve the following error?
RPMLINT report: =============== (none): E: badness 10000 exceeds threshold 1000, aborting. euca2ools.noarch: E: file-contains-buildroot (Badness: 10000) /usr/lib/python2.7/site-packages/euca2ools/__init__.pyc Your file contains traces of $RPM_BUILD_ROOT.
Have no clue what to do. Also the build succeeds locally on a 12.1 system, of course....
That is a build system bug in any case. Probably works on 12.1 because the rpmlint checks didn't catch it there. Typically, that may happen with compiled python bytecode files (.pyc and/or .pyo) when the upstream build system does not correctly account for a %{buildroot}. I usually resort to re-compiling the python files correctly myself... not ideal, but works, and easier than finding out how to fix setup.py accordingly ;) After your %__python ./setup.py build Do this: find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \ -exec %__rm {} \; %__python -c 'import compileall; compileall.compile_dir("%{buildroot}%{python_sitelib}/", ddir="%{python_sitelib}/", force=1)' hth -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf
On 01/05/2012 02:23 PM, Pascal Bleser wrote:
On 2012-01-05 13:17:11 (-0500), Robert Schweikert<rjschwei@suse.com> wrote:
Hi,
Could someone please help me to resolve the following error?
RPMLINT report: =============== (none): E: badness 10000 exceeds threshold 1000, aborting. euca2ools.noarch: E: file-contains-buildroot (Badness: 10000) /usr/lib/python2.7/site-packages/euca2ools/__init__.pyc Your file contains traces of $RPM_BUILD_ROOT.
Have no clue what to do. Also the build succeeds locally on a 12.1 system, of course....
That is a build system bug in any case. Probably works on 12.1 because the rpmlint checks didn't catch it there.
Typically, that may happen with compiled python bytecode files (.pyc and/or .pyo) when the upstream build system does not correctly account for a %{buildroot}.
I usually resort to re-compiling the python files correctly myself... not ideal, but works, and easier than finding out how to fix setup.py accordingly ;)
After your %__python ./setup.py build
Do this: find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \ -exec %__rm {} \; %__python -c 'import compileall; compileall.compile_dir("%{buildroot}%{python_sitelib}/", ddir="%{python_sitelib}/", force=1)'
hth
It sure did, no more build error :) Thanks for the help. Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2012-01-05 16:34:21 (-0500), Robert Schweikert <rjschwei@suse.com> wrote:
On 01/05/2012 02:23 PM, Pascal Bleser wrote:
On 2012-01-05 13:17:11 (-0500), Robert Schweikert<rjschwei@suse.com> wrote: [...]
RPMLINT report: =============== (none): E: badness 10000 exceeds threshold 1000, aborting. euca2ools.noarch: E: file-contains-buildroot (Badness: 10000) /usr/lib/python2.7/site-packages/euca2ools/__init__.pyc Your file contains traces of $RPM_BUILD_ROOT. [...] After your %__python ./setup.py build
Do this: find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \ -exec %__rm {} \; %__python -c 'import compileall; compileall.compile_dir("%{buildroot}%{python_sitelib}/", ddir="%{python_sitelib}/", force=1)'
It sure did, no more build error :)
Just for the record, what that does: * it uses a standard Python library class named "compileall" * that conveniently recursively compiles all the .py files it finds under the directory that is specified as first parameter (%{buildroot}%{python_sitelib/ in our case) into Python bytecode files (.pyc) * as opposed to what the upstream setup.py did, it takes the "ddir" parameter which specifies "where the file is actually supposed to be", kinda, well, you get the idea ;)
Thanks for the help.
You're most welcome. cheers -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf
participants (3)
-
Anders Johansson
-
Pascal Bleser
-
Robert Schweikert