anujsingh15893 / distcc

Automatically exported from code.google.com/p/distcc
0 stars 0 forks source link

rpm build does not work on Fedora 10 #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using today's trunk checked out from SVN, "make rpm" fails on Fedora 10.
The errors are:

error: Installed (but unpackaged) file(s) found:
   /usr/lib/python2.5/site-packages/include_server/__init__.pyo
   /usr/lib/python2.5/site-packages/include_server/basics.pyo
   /usr/lib/python2.5/site-packages/include_server/basics_test.pyo
   /usr/lib/python2.5/site-packages/include_server/c_extensions_test.pyo
   /usr/lib/python2.5/site-packages/include_server/cache_basics.pyo
   /usr/lib/python2.5/site-packages/include_server/compiler_defaults.pyo
   /usr/lib/python2.5/site-packages/include_server/compress_files.pyo
   /usr/lib/python2.5/site-packages/include_server/include_analyzer.pyo

/usr/lib/python2.5/site-packages/include_server/include_analyzer_memoizing_node.
pyo

/usr/lib/python2.5/site-packages/include_server/include_analyzer_memoizing_node_
test.pyo
   /usr/lib/python2.5/site-packages/include_server/include_analyzer_test.pyo
   /usr/lib/python2.5/site-packages/include_server/include_server.pyo
   /usr/lib/python2.5/site-packages/include_server/include_server_test.pyo
   /usr/lib/python2.5/site-packages/include_server/macro_eval.pyo
   /usr/lib/python2.5/site-packages/include_server/macro_eval_test.pyo
   /usr/lib/python2.5/site-packages/include_server/mirror_path.pyo
   /usr/lib/python2.5/site-packages/include_server/mirror_path_test.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_command.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_command_test.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_file.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_file_test.pyo
   /usr/lib/python2.5/site-packages/include_server/run.pyo
   /usr/lib/python2.5/site-packages/include_server/setup.pyo
   /usr/lib/python2.5/site-packages/include_server/statistics.pyo

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/lib/python2.5/site-packages/include_server/__init__.pyo
   /usr/lib/python2.5/site-packages/include_server/basics.pyo
   /usr/lib/python2.5/site-packages/include_server/basics_test.pyo
   /usr/lib/python2.5/site-packages/include_server/c_extensions_test.pyo
   /usr/lib/python2.5/site-packages/include_server/cache_basics.pyo
   /usr/lib/python2.5/site-packages/include_server/compiler_defaults.pyo
   /usr/lib/python2.5/site-packages/include_server/compress_files.pyo
   /usr/lib/python2.5/site-packages/include_server/include_analyzer.pyo

/usr/lib/python2.5/site-packages/include_server/include_analyzer_memoizing_node.
pyo

/usr/lib/python2.5/site-packages/include_server/include_analyzer_memoizing_node_
test.pyo
   /usr/lib/python2.5/site-packages/include_server/include_analyzer_test.pyo
   /usr/lib/python2.5/site-packages/include_server/include_server.pyo
   /usr/lib/python2.5/site-packages/include_server/include_server_test.pyo
   /usr/lib/python2.5/site-packages/include_server/macro_eval.pyo
   /usr/lib/python2.5/site-packages/include_server/macro_eval_test.pyo
   /usr/lib/python2.5/site-packages/include_server/mirror_path.pyo
   /usr/lib/python2.5/site-packages/include_server/mirror_path_test.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_command.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_command_test.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_file.pyo
   /usr/lib/python2.5/site-packages/include_server/parse_file_test.pyo
   /usr/lib/python2.5/site-packages/include_server/run.pyo
   /usr/lib/python2.5/site-packages/include_server/setup.pyo
   /usr/lib/python2.5/site-packages/include_server/statistics.pyo

I fixed it by updating the spec as follows:

88,91d87
< %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
< %dir %{python_sitelib}/include_server
< %{python_sitelib}/include_server/*.pyo
< 
303d298
< 

If this is not the proper way to submit patches, please let me know.

Original issue reported on code.google.com by rustysawdust@gmail.com on 18 Feb 2009 at 3:26

GoogleCodeExporter commented 9 years ago
Thanks for the patch!
Could you please submit the patch in "svn diff" (diff -u) format?

Original comment by fergus.h...@gmail.com on 18 Feb 2009 at 3:50

GoogleCodeExporter commented 9 years ago

--- /tmp/distcc-read-only/packaging/RedHat/rpm.spec 2009-02-18 
10:21:51.000000000 -0500
+++ ./rpm.spec  2009-02-20 13:44:15.000000000 -0500
@@ -85,6 +85,10 @@
 %doc %{_mandir}/man1/include_server.1.gz
 %doc %{_docdir}

+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%dir %{python_sitelib}/include_server
+%{python_sitelib}/include_server/*.pyo
+

 %package server
 Summary: Server side program for distributed C/C++ compilations.

Original comment by rustysawdust@gmail.com on 20 Feb 2009 at 7:02

GoogleCodeExporter commented 9 years ago
Sorry for the slow response.

I tried patching this in and running "make rpm", on an Ubuntu Dapper system,
but I got the following error

bash$ make rpm
...
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: distcc-3.1-1
error: File not found by glob:
/var/tmp/distcc-buildroot/usr/lib/python2.4/site-packages/include_server/*.pyo
Processing files: distcc-server-3.1-1
Provides: config(distcc-server) = 3.1-1 distccd
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Requires: /bin/bash config(distcc-server) = 3.1-1
Obsoletes: crosstool-distcc-server

RPM build errors:
    File not found by glob:
/var/tmp/distcc-buildroot/usr/lib/python2.4/site-packages/include_server/*.pyo

Original comment by fergus.h...@gmail.com on 8 Apr 2009 at 6:01

GoogleCodeExporter commented 9 years ago
I'm only using distcc on Fedora 10, so I'm unable to test with Ubuntu. It's 
possible
that Ubuntu puts things in different places. In any case, I had though Ubuntu 
only
used .deb and not .rpm -- is there some reason why Ubuntu would want a rpm?

Original comment by rustysawdust@gmail.com on 27 Apr 2009 at 5:55

GoogleCodeExporter commented 9 years ago
The build process for the .deb works by first building a .rpm and then 
converting the
.rpm to a .deb file using "alien".

Original comment by fergus.h...@gmail.com on 27 Apr 2009 at 7:00

GoogleCodeExporter commented 9 years ago
The patch doesn't work on 64-bit RHEL 5.4 system because

# python -c "from distutils.sysconfig import get_python_lib; print 
get_python_lib()"
/usr/lib/python2.4/site-packages

But the files are in /usr/lib64:

RPM build errors:
    File not found:
/var/tmp/distcc-buildroot/usr/lib/python2.4/site-packages/include_server
    File not found by glob:
/var/tmp/distcc-buildroot/usr/lib/python2.4/site-packages/include_server/*.pyo
    Installed (but unpackaged) file(s) found:
   /usr/lib64/python2.4/site-packages/include_server/__init__.pyo
   /usr/lib64/python2.4/site-packages/include_server/basics.pyo

I don't know enough python to fix this correctly, but obviously this kludge 
works:

-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%define python_sitelib /usr/lib64/python2.4/site-packages

Original comment by envyseap...@gmail.com on 3 Jan 2010 at 10:48

GoogleCodeExporter commented 9 years ago
You can always do plat_specific to include ``lib64'', like this:

# python -c "from distutils.sysconfig import get_python_lib; print 
get_python_lib(plat_specific=True)"
/usr/lib64/python2.4/site-packages

Hint found at: 
http://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-pytho
n-site-packages-directory/122387#122387

Original comment by rickvand...@gmail.com on 29 Jul 2011 at 8:29

GoogleCodeExporter commented 9 years ago
@fergus
Your error is due to different location of python site-packages(dist-packages) 
on Ubuntu Dapper.
However, I wonder if it's necessary to continue to support Dapper or not. On 
Ubuntu11, there is no such problem.
There are some useful macros and they can make some statements platform 
specific, like below. It works well on my rhel6.2 and ubuntu11.

%if 0%{?rhel} > 5
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print 
get_python_lib(plat_specific=True)")} 
%dir %{python_sitelib}/include_server
%{python_sitelib}/include_server/*.pyo
%endif

Original comment by compan...@gmail.com on 2 Jul 2012 at 12:39