Permalink
Browse files

Initial submission @6805748, not fully baked yet.

  • Loading branch information...
fusentasticus committed Mar 28, 2008
0 parents commit d6532ae1d997a31884a67c51ec2bc75756242eed
Showing with 70,099 additions and 0 deletions.
  1. +340 −0 COPYING
  2. +39 −0 INSTALL
  3. +111 −0 Makefile.in
  4. +55 −0 README
  5. +92 −0 build-distcc.sh
  6. +11 −0 configure.ac
  7. +398 −0 distcc.spec
  8. +6 −0 distcc/AUTHORS
  9. +340 −0 distcc/COPYING
  10. +2,428 −0 distcc/ChangeLog
  11. +16,140 −0 distcc/ChangeLog.old
  12. +190 −0 distcc/INSTALL
  13. +669 −0 distcc/Makefile.in
  14. +2,144 −0 distcc/NEWS
  15. +39 −0 distcc/README
  16. +75 −0 distcc/README.packaging
  17. +1,112 −0 distcc/TODO
  18. +24 −0 distcc/autogen.sh
  19. +151 −0 distcc/bench/Build.py
  20. +114 −0 distcc/bench/Project.py
  21. +100 −0 distcc/bench/ProjectDefs.py
  22. +76 −0 distcc/bench/Summary.py
  23. +51 −0 distcc/bench/actions.py
  24. +176 −0 distcc/bench/benchmark.py
  25. +49 −0 distcc/bench/buildutil.py
  26. +63 −0 distcc/bench/compiler.py
  27. +47 −0 distcc/bench/statistics.py
  28. +1,400 −0 distcc/config.guess
  29. +1,469 −0 distcc/config.sub
  30. +455 −0 distcc/configure.ac
  31. +47 −0 distcc/contrib/distcc-absolutify
  32. +40 −0 distcc/contrib/distcc.sh
  33. +70 −0 distcc/contrib/distccd-init
  34. +145 −0 distcc/contrib/distccd-on-servers
  35. +16 −0 distcc/contrib/dmake
  36. +21 −0 distcc/contrib/make-j
  37. +26 −0 distcc/contrib/netpwd
  38. +83 −0 distcc/contrib/redhat/init
  39. +5 −0 distcc/contrib/redhat/logrotate
  40. +8 −0 distcc/contrib/redhat/sysconfig
  41. +17 −0 distcc/contrib/redhat/xinetd
  42. +81 −0 distcc/contrib/stage-cc-wrapper.patch
  43. +80 −0 distcc/doc/example/init
  44. +96 −0 distcc/doc/example/init-suse
  45. +12 −0 distcc/doc/example/logrotate
  46. +26 −0 distcc/doc/example/xinetd
  47. +213 −0 distcc/doc/protocol-1.txt
  48. +38 −0 distcc/doc/protocol-2.txt
  49. +61 −0 distcc/doc/protocol-3-impl.txt
  50. +82 −0 distcc/doc/protocol-3.txt
  51. +73 −0 distcc/doc/reporting-bugs.txt
  52. +64 −0 distcc/doc/status-1.txt
  53. BIN distcc/gnome/distccmon-gnome-icon.png
  54. +13 −0 distcc/gnome/distccmon-gnome.desktop
  55. +251 −0 distcc/install-sh
  56. +1 −0 distcc/lzo/.stamp-conf.in
  57. +451 −0 distcc/lzo/lzoconf.h
  58. +2,935 −0 distcc/lzo/minilzo.c
  59. +100 −0 distcc/lzo/minilzo.h
  60. +725 −0 distcc/man/distcc.1
  61. +295 −0 distcc/man/distccd.1
  62. +56 −0 distcc/man/distccmon-text.1
  63. +40 −0 distcc/mkinstalldirs
  64. +287 −0 distcc/packaging/RedHat/init.d/distcc
  65. +13 −0 distcc/packaging/RedHat/logrotate.d/distcc
  66. +15 −0 distcc/packaging/RedHat/xinetd.d/distcc
  67. +1 −0 distcc/popt/.stamp-conf.in
  68. +12 −0 distcc/popt/README.popt
  69. +50 −0 distcc/popt/findme.c
  70. +20 −0 distcc/popt/findme.h
  71. +1,236 −0 distcc/popt/popt.c
  72. +541 −0 distcc/popt/popt.h
  73. +190 −0 distcc/popt/poptconfig.c
  74. +742 −0 distcc/popt/popthelp.c
  75. +116 −0 distcc/popt/poptint.h
  76. +227 −0 distcc/popt/poptparse.c
  77. +76 −0 distcc/popt/system.h
  78. +125 −0 distcc/src/access.c
  79. +35 −0 distcc/src/access.h
  80. +390 −0 distcc/src/arg.c
  81. +165 −0 distcc/src/argutil.c
  82. +110 −0 distcc/src/backoff.c
  83. +367 −0 distcc/src/bulk.c
  84. +51 −0 distcc/src/bulk.h
  85. +163 −0 distcc/src/cleanup.c
  86. +131 −0 distcc/src/climasq.c
  87. +201 −0 distcc/src/clinet.c
  88. +33 −0 distcc/src/clinet.h
  89. +281 −0 distcc/src/clirpc.c
  90. +687 −0 distcc/src/compile.c
  91. +46 −0 distcc/src/compile.h
  92. +254 −0 distcc/src/compress.c
  93. +103 −0 distcc/src/cpp.c
  94. +306 −0 distcc/src/daemon.c
  95. +56 −0 distcc/src/daemon.h
  96. +221 −0 distcc/src/distcc.c
  97. +336 −0 distcc/src/distcc.h
  98. +278 −0 distcc/src/dopt.c
  99. +44 −0 distcc/src/dopt.h
  100. +251 −0 distcc/src/dotd.c
  101. +9 −0 distcc/src/dotd.h
  102. +353 −0 distcc/src/dparent.c
  103. +138 −0 distcc/src/dsignal.c
  104. +130 −0 distcc/src/emaillog.c
  105. +11 −0 distcc/src/emaillog.h
  106. +459 −0 distcc/src/exec.c
  107. +50 −0 distcc/src/exec.h
  108. +61 −0 distcc/src/exitcode.h
  109. +315 −0 distcc/src/filename.c
  110. +450 −0 distcc/src/fix_debug_info.c
  111. +26 −0 distcc/src/fix_debug_info.h
  112. +59 −0 distcc/src/h_argvtostr.c
  113. +106 −0 distcc/src/h_compile.c
  114. +73 −0 distcc/src/h_dotd.c
  115. +60 −0 distcc/src/h_exten.c
  116. +111 −0 distcc/src/h_hosts.c
  117. +59 −0 distcc/src/h_issource.c
  118. +66 −0 distcc/src/h_parsemask.c
  119. +75 −0 distcc/src/h_sa2str.c
  120. +72 −0 distcc/src/h_scanargs.c
  121. +63 −0 distcc/src/h_strip.c
  122. +74 −0 distcc/src/help.c
  123. +68 −0 distcc/src/history.c
  124. +67 −0 distcc/src/hostfile.c
  125. +654 −0 distcc/src/hosts.c
  126. +87 −0 distcc/src/hosts.h
  127. +95 −0 distcc/src/implicit.c
  128. +25 −0 distcc/src/implicit.h
  129. +161 −0 distcc/src/include_server_if.c
  130. +21 −0 distcc/src/include_server_if.h
  131. +272 −0 distcc/src/io.c
  132. +113 −0 distcc/src/loadfile.c
  133. +271 −0 distcc/src/lock.c
  134. +36 −0 distcc/src/lock.h
  135. +1,034 −0 distcc/src/lsdistcc.c
  136. +673 −0 distcc/src/mon-gnome.c
  137. +125 −0 distcc/src/mon-notify.c
  138. +115 −0 distcc/src/mon-text.c
  139. +368 −0 distcc/src/mon.c
  140. +266 −0 distcc/src/mon.h
  141. +154 −0 distcc/src/ncpus.c
  142. +214 −0 distcc/src/netutil.c
  143. +37 −0 distcc/src/netutil.h
  144. +195 −0 distcc/src/prefork.c
  145. +152 −0 distcc/src/pump.c
  146. +301 −0 distcc/src/remote.c
  147. +299 −0 distcc/src/renderer.c
  148. +48 −0 distcc/src/renderer.h
  149. +343 −0 distcc/src/rpc.c
  150. +48 −0 distcc/src/rpc.h
  151. +166 −0 distcc/src/rslave.c
  152. +65 −0 distcc/src/rslave.h
  153. +81 −0 distcc/src/safeguard.c
  154. +212 −0 distcc/src/sendfile.c
  155. +781 −0 distcc/src/serve.c
  156. +138 −0 distcc/src/setuid.c
  157. +1,016 −0 distcc/src/snprintf.c
  158. +30 −0 distcc/src/snprintf.h
  159. +290 −0 distcc/src/srvnet.c
  160. +28 −0 distcc/src/srvnet.h
  161. +181 −0 distcc/src/srvrpc.c
  162. +228 −0 distcc/src/ssh.c
  163. +257 −0 distcc/src/state.c
  164. +91 −0 distcc/src/state.h
  165. +415 −0 distcc/src/stats.c
  166. +46 −0 distcc/src/stats.h
  167. +116 −0 distcc/src/stringmap.c
  168. +27 −0 distcc/src/stringmap.h
  169. +178 −0 distcc/src/strip.c
  170. +412 −0 distcc/src/tempfile.c
  171. +159 −0 distcc/src/timefile.c
  172. +33 −0 distcc/src/timefile.h
  173. +36 −0 distcc/src/timeval.c
  174. +4 −0 distcc/src/timeval.h
  175. +433 −0 distcc/src/trace.c
  176. +230 −0 distcc/src/trace.h
  177. +93 −0 distcc/src/traceenv.c
  178. +36 −0 distcc/src/types.h
  179. +769 −0 distcc/src/util.c
  180. +55 −0 distcc/src/util.h
  181. +197 −0 distcc/src/where.c
  182. +29 −0 distcc/src/where.h
  183. +35 −0 distcc/survey.txt
  184. +445 −0 distcc/test/comfychair.py
  185. +37 −0 distcc/test/onetest.py
  186. +1,708 −0 distcc/test/testdistcc.py
  187. +114 −0 include_server/Makefile.in
  188. 0 include_server/__init__.py
  189. +339 −0 include_server/basics.py
  190. +65 −0 include_server/basics_test.py
  191. +381 −0 include_server/c_extensions/distcc_pump_c_extensions_module.c
  192. +132 −0 include_server/c_extensions_test.py
  193. +858 −0 include_server/cache_basics.py
  194. +180 −0 include_server/compiler_defaults.py
  195. +112 −0 include_server/compress_files.py
  196. +10 −0 include_server/configure.ac
  197. +362 −0 include_server/include_analyzer.py
  198. +641 −0 include_server/include_analyzer_memoizing_node.py
  199. +233 −0 include_server/include_analyzer_memoizing_node_test.py
  200. +508 −0 include_server/include_analyzer_test.py
  201. +723 −0 include_server/include_server.py
  202. +187 −0 include_server/include_server_test.py
  203. +437 −0 include_server/macro_eval.py
  204. +233 −0 include_server/macro_eval_test.py
  205. +113 −0 include_server/mirror_path.py
  206. +145 −0 include_server/mirror_path_test.py
  207. +464 −0 include_server/parse_command.py
  208. +196 −0 include_server/parse_command_test.py
  209. +342 −0 include_server/parse_file.py
  210. +154 −0 include_server/parse_file_test.py
  211. +106 −0 include_server/run.py
  212. +83 −0 include_server/setup.py
  213. +121 −0 include_server/statistics.py
  214. +1 −0 include_server/test_data/abc_post.c
  215. +1 −0 include_server/test_data/abc_pre.c
  216. +10 −0 include_server/test_data/computed_includes.c
  217. +1 −0 include_server/test_data/contains_abs_include.c
  218. +1 −0 include_server/test_data/dbar/dbar1/bar.h
  219. +1 −0 include_server/test_data/dbar/foo.h
  220. +2 −0 include_server/test_data/dfoo/foo.h
  221. +3 −0 include_server/test_data/dfoo/foo2.h
  222. 0 include_server/test_data/dfoo/i_am_perhaps_a_directory.h
  223. +1 −0 include_server/test_data/dfoo/include_dotdot_foo
  224. +1 −0 include_server/test_data/dfoo/include_next_foo.h
  225. 0 include_server/test_data/dfoo/stat_triggers.h
  226. +1 −0 include_server/test_data/distcc/README
  227. +51 −0 include_server/test_data/distcc/src/bulk.h
  228. +38 −0 include_server/test_data/distcc/src/compile.h
  229. +256 −0 include_server/test_data/distcc/src/config.h
  230. +221 −0 include_server/test_data/distcc/src/distcc.c
  231. +336 −0 include_server/test_data/distcc/src/distcc.h
  232. +10 −0 include_server/test_data/distcc/src/emaillog.h
  233. +61 −0 include_server/test_data/distcc/src/exitcode.h
  234. +87 −0 include_server/test_data/distcc/src/hosts.h
  235. +25 −0 include_server/test_data/distcc/src/implicit.h
  236. 0 include_server/test_data/distcc/src/include_me.h
  237. +91 −0 include_server/test_data/distcc/src/state.h
  238. +230 −0 include_server/test_data/distcc/src/trace.h
  239. +55 −0 include_server/test_data/distcc/src/util.h
  240. +1 −0 include_server/test_data/func_macro.c
  241. +1 −0 include_server/test_data/gws-main.o.cmd
  242. 0 include_server/test_data/i_am_perhaps_a_directory.h/empty_file
  243. +1 −0 include_server/test_data/include_include_next_foo.h
  244. +1 −0 include_server/test_data/maps/foo.tpl.varnames.h
  245. +14 −0 include_server/test_data/more_macros.c
  246. +1 −0 include_server/test_data/p1.h
  247. +8 −0 include_server/test_data/parse.c
  248. +1 −0 include_server/test_data/stat_triggers.c
  249. 0 include_server/test_data/stat_triggers.h
  250. +1 −0 include_server/test_data/symlink_farm/abc_post.c
  251. +1 −0 include_server/test_data/symlink_farm/abc_pre.c
  252. +1 −0 include_server/test_data/symlink_farm/computed_includes.c
  253. +1 −0 include_server/test_data/symlink_farm/dbar
  254. +1 −0 include_server/test_data/symlink_farm/dfoo
  255. +1 −0 include_server/test_data/symlink_farm/foo
  256. +1 −0 include_server/test_data/symlink_farm/p1.h
  257. +1 −0 include_server/test_data/symlink_farm/parse.c
  258. +1 −0 include_server/test_data/symlink_farm/sub_farm/link_to_dotdot_dotdot_dfoo_include_dotdot_foo
  259. +1 −0 include_server/test_data/symlink_farm/test_directory_probing.c
  260. +1 −0 include_server/test_data/symlink_farm/test_include_next
  261. +1 −0 include_server/test_data/test_computed_includes/helper.c
  262. +1 −0 include_server/test_data/test_computed_includes/incl.h
  263. +1 −0 include_server/test_data/test_computed_includes/inclA.h
  264. +9 −0 include_server/test_data/test_computed_includes/src.c
  265. +9 −0 include_server/test_data/test_computed_includes/srcA.c
  266. +4 −0 include_server/test_data/test_directory_probing.c
  267. +3 −0 include_server/test_data/test_include_next/bar/x.h
  268. +3 −0 include_server/test_data/test_include_next/bar/y.h
  269. +2 −0 include_server/test_data/test_include_next/baz/start_x.c
  270. +2 −0 include_server/test_data/test_include_next/baz/start_y.c
  271. +3 −0 include_server/test_data/test_include_next/baz/x.h
  272. +6 −0 include_server/test_data/test_include_next/baz/y.h
  273. +1 −0 include_server/test_data/test_include_next/biz/x.h
  274. +2 −0 include_server/test_data/test_include_next/foo/x.h
  275. +2 −0 include_server/test_data/test_include_next/foo/y.h
  276. +444 −0 pump.in
  277. +20 −0 run_all_autoconf.sh
  278. +10 −0 version.sh
340 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
39 INSTALL
@@ -0,0 +1,39 @@
To build: the simple way is to just do
run_all_autoconf.sh # invokes autoconf and autoheader using
# version info in the file version.sh
configure # creates distcc/config.h and makefiles
make # build
but the recommended way is to build in a different directory tree
than the source tree:
run_all_autoconf.sh
mkdir obj
cd obj
../configure
make
Either of these methods will:
- compile distcc
- compile Python C extensions
To test:
make check
To test installation using your own machine as a distcc compilation server:
- start daemon (in one window):
distcc/distccd --wizard --allow 127.0.0.1
- compile (in another):
DISTCC_POTENTIAL_HOSTS=127.0.0.1 pump BUILDCOMMAND
See the shell script pump in this directory.
@@ -0,0 +1,111 @@
# This Makefile just delegates all the work to the Makefiles
# in the subdirectories.
#
SUBDIRS = distcc include_server
INSTALL_TARGETS = $(SUBDIRS:%=install-%)
CHECK_TARGETS = $(SUBDIRS:%=check-%)
CLEAN_TARGETS = $(SUBDIRS:%=clean-%)
MAINTAINER_CHECK_TARGETS = $(SUBDIRS:%=maintainer-check-%)
# A timestamp file to reliably tell us when autoreconf was last run.
AUTOCONF_STAMP = @srcdir@/autoconf_stamp
# A stamp file AUTOCONF_SANITY that tells us the last time either:
#
# - autoreconf was run, or
#
# - configure was run.
#
# AUTORECONF cannot be a phony target. Below we make the Makefile itself
# dependent on AUTOCONF_SANITY. After the Makefile is regenerated, as part of
# GNU make's feature of remaking the current Makefile if it is out of date, a
# dependency on a phony target would make 'make' make the Makefile again. An
# infinite regression would result. So, we must record the time of
# AUTOCONF_SANITY in a file.
AUTOCONF_SANITY = autoconf_sanity
# TODO(klarlund): substitute autoconf_sanity for AUTOCONF_SANITY? Same for
# AUTOCONF_STAMP.
# Autoconf configuration variables.
# DESTDIR is for building rpm's. It's a temporary filesystem root
# where the rpm bulding process puts all its files.
DESTDIR =
prefix = $(DESTDIR)@prefix@
exec_prefix = $(DESTDIR)@exec_prefix@
bindir = $(DESTDIR)@bindir@
srcdir = @srcdir@
VPATH = @srcdir@
INSTALL = @INSTALL@
PYTHON = @PYTHON@
# I swear, this is the code that Python's distutils uses.
PYTHON_VERSION = $(shell $(PYTHON) -c \
'import sys; import string; print string.split(sys.version)[0][:3]')
# TODO(klarlund,fergus):
# - invoke distcc/configure before make in distcc/
.PHONY: all $(SUBDIRS)
all: $(AUTOCONF_SANITY) $(SUBDIRS) pump
$(SUBDIRS): %:
$(MAKE) --directory=$@
.PHONY: install $(INSTALL_TARGETS)
install: $(AUTOCONF_SANITY) $(INSTALL_TARGETS) install-local
$(INSTALL_TARGETS): install-%:
$(MAKE) --directory=$* install
.PHONY: check $(CHECK_TARGETS)
check: $(AUTOCONF_SANITY) $(CHECK_TARGETS)
$(CHECK_TARGETS): check-%:
$(MAKE) --directory=$* check
.PHONY: maintainer-check $(MAINTAINER_CHECK_TARGETS)
maintainer-check: $(AUTOCONF_SANITY) $(MAINTAINER_CHECK_TARGETS)
$(MAINTAINER_CHECK_TARGETS): maintainer-check-%:
$(MAKE) --directory=$* maintainer-check
.PHONY: clean $(CLEAN_TARGETS)
clean: $(CLEAN_TARGETS)
$(CLEAN_TARGETS): clean-%:
$(MAKE) --directory=$* clean
.PHONY: install-local
install-local: pump
$(INSTALL) -d $(bindir)
$(INSTALL) pump $(bindir)
pump: $(AUTOCONF_SANITY) pump.in
./config.status
Makefile: $(AUTOCONF_SANITY) Makefile.in
./config.status
# SANITY CHECKS
# Here we set up AUTOCONF_SANITY so that it works as described. It verifies
# that
#
# - autoconf has been run after its dependencies have changed (see rule for
# $(AUTOCONF_STAMP)) below, and
#
# - the time of this event, recorded by AUTOCONF_STAMP, is before that of
# config.status (see rule for config.status below).
#
# We need the touch: without it 'make' will invoke itself in an infinite loop,
# because the Makefile is dependent on AUTOCONF_SANITY.
$(AUTOCONF_SANITY): $(AUTOCONF_STAMP) config.status
touch $(AUTOCONF_SANITY)
# Check that autoreconf was run after changes to version.sh or
# config.status. This regenerates distcc/src/config.h.in.
$(AUTOCONF_STAMP): version.sh configure.ac
@echo "Please run ./run_all_autoconf.sh now."
@exit 1
# Check that the generated configure was run after autoreconf. The modification
# time of the configure.status file is updated by configure.
config.status: $(AUTOCONF_STAMP)
@echo "Please run ./configure now."
@exit 1
55 README
@@ -0,0 +1,55 @@
distcc-pump -- a free distributed C/C++ compiler system
originally by Martin Pool <mbp@samba.org>
extended at Google Inc.
by Fergus Henderson, Nils Klarlund, Manos Renieris, and Craig Silverstein
distcc-pump improves on distcc by distributing not only compilation but also
preprocessing to distcc servers. For an introduction to distcc, see
distcc/README.
The distcc-pump contributes an include server process that exists during the
build. The include server parses and analyzes source and header files. It runs
on the workstation that initiates the build. The include server analyzes each
header file only a few times, sometimes just once. In contrast, ordinary distcc
invokes the preprocessor hundreds of times on average for each header file of a
large build.
With the distcc-pump, a static analysis algorithm inspects includes and computes
their possible values according to an overapproximation semantics. The resulting
dependency graph among header files is stored in the include server, which then
acts as a cache for include analysis.
The include server compresses source files into a temporary directory as they
are encountered. In this way, a given source file is compressed only once during
the build.
It may happen that a header file is included via an absolutely specified include
directory such as -I/absolute/path. But on the compilation server the path
-I/absolute/path does not exist; instead the server places foo.h under
/server_temporary_path/absolute/path for some /server_temporary_path root
directory. This directory has no meaning on the workstation. Before compressing
foo.h, the include server therefore inserts a #line directive in foo.h in such
cases to inform the preprocessor that the real location is /absolute/path.
The distcc-pump client asks the include server for the list of compressed files
that constitute the transitive closure of the source file to be compiled. It
then spools these files to a distcc-pump server. The distcc-pump server unpacks
these files in the /server_temporary_path directory before preprocessing and
compiling. The server also rewrites include options, such as -I's, to reflect
the new locations of the files on the server. The .d and the .o files are both
returned to the distcc-pump client.
The distcc-pump is able to distribute compilations up to 10X faster than distcc.
But because building also involves linking and perhaps generation of source
files the overall speed-up of the build time is variable.
The distcc-pump was developed to be used with large clusters of distcc servers,
providing hundreds of CPUs. With versions of gcc >= 4.1.1, the distcc-pump will
probably not show performance gains using clusters of say only ten CPUs. The
preprocessor running on the workstation is fast enough to keep that many
machines busy.
@@ -0,0 +1,92 @@
#!/bin/sh
# Simple shell script to build distcc SRPM and RPM from sources
# When releasing a new version, you need to do four things:
# 1. edit the 'Release' field of the spec file
# 2. add a comment to the %changelog section of the spec file
# 3. edit the 'DISTCC_VERSION' and 'PUMP_SUBVERSION' variables in version.sh.
# It would be better if this was easier, but that's how it is right now.
source version.sh
PKG=distcc
TOP=`pwd`
# Check if we have a bad kernel + RPM combination.
# Background:
# Versions of RPM prior to 4.4.1 incorrectly add a dependency on
# 'linux-gate.so.1', which is a virtual dso in 2.6+ Linux kernels. Since this
# is not a real lib provided by any package, the resulting RPMs won't install
# due to failed dependency checks.
# For the curious, more linux-gate details are documented at:
# http://www.trilithium.com/johan/2005/08/linux-gate/
#
# See if running on a kernel with the virtual dso.
HAS_VSDO=0
cat /proc/self/maps | grep -q vdso
if [ $? -eq 0 ]; then
HAS_VSDO=1
fi
# See if we have incompatible RPM tools.
if [ $HAS_VSDO -eq 0 ]; then
grep -q 'linux-gate' /usr/lib/rpm/find-requires
if [ $? -ne 0 ]; then
echo 'ERROR: Your combination of RPM and kernel is buggy.'
echo 'Upgrade to RPM 4.4.1-5 or later, or patch /usr/lib/rpm/find-requires'
echo 'to special-case the "linux-gate" dependency.'
echo 'see also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338515'
exit 1
fi
fi
set -xe
rm -rf tmp
mkdir tmp
cd tmp
# Set up rpm build environment
RPM_SOURCE_DIR=$TOP
RPM_BUILD_DIR=$TOP
RPM_RPM_DIR=$TOP/tmp/rpms
RPM_SRPM_DIR=$TOP/tmp/srpms
# lifted from gboilerplate
USERNAME="$(whoami)"
PACKAGER="$(ldapsearch -x -LLL -b 'ou=People,dc=google,dc=com' "uid=$USERNAME" cn|grep '^cn'|colrm 1 4) <$USERNAME@google.com>"
# Temporary directories
rm -rf $RPM_RPM_DIR
mkdir $RPM_RPM_DIR
rm -rf $RPM_SRPM_DIR
mkdir $RPM_SRPM_DIR
rm -rf /tmp/$PKG-$DISTCC_VERSION-root
mkdir /tmp/$PKG-$DISTCC_VERSION-root
CROSS=${CROSS-}
CC=${CROSS}gcc \
CXX=${CROSS}g++ \
AR=${CROSS}ar \
RANLIB=${CROSS}ranlib \
rpmbuild -bb $TOP/$PKG.spec \
--define "_sourcedir $RPM_SOURCE_DIR" \
--define "_builddir $RPM_BUILD_DIR" \
--define "_rpmdir $RPM_RPM_DIR" \
--define "_srcrpmdir $RPM_SRPM_DIR" \
--define "name $PKG" \
--define "version $DISTCC_VERSION" \
--define "release $PUMP_SUBVERSION" \
--define "packager $PACKAGER" \
--define "bundle_dir $TOP"
# Determine the name of the directory where the package went
RPMARCH=`rpmbuild --showrc $TOP/$PKG.spec | grep "^build arch.*:" | sed -e 's/^build arch[[:space:]]*:[[:space:]]*//'`
find . -type f | xargs chmod 644
find . -type d | xargs chmod 755
echo Results in $RPM_SRPM_DIR and $RPM_RPM_DIR/${RPMARCH} :
ls -l $RPM_SRPM_DIR $RPM_RPM_DIR/$RPMARCH
# Convert RPMs to DEBs for goobuntu.
fakeroot alien -c -k -v $RPM_RPM_DIR/$RPMARCH/*.rpm
@@ -0,0 +1,11 @@
AC_INIT(distcc_pump,
esyscmd(source version.sh && echo -n $DISTCC_PUMP_VERSION),
distcc-pump@google.com)
AC_CHECK_PROGS(PYTHON, [python2.4 python2.3 python-2.3 python2.2 python-2.2 python])
AC_ARG_VAR(PYTHON, [Python interpreter])
AC_CONFIG_AUX_DIR(distcc)
AC_CONFIG_SUBDIRS(include_server distcc)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pump], [chmod +x pump])
AC_PROG_INSTALL
AC_OUTPUT
Oops, something went wrong.

0 comments on commit d6532ae

Please sign in to comment.