Permalink
Browse files

The first step of moving everything in the distcc directory to the top

level.  I'm doing this in two stages, because I don't understand svn
enough to be confident to do it in one.  This first stage just copies
all the files from distcc/FOO to FOO.  Now there are two copies of
each file under distcc; the Makefile/etc uses the one in distcc and
ignores the one at the top level.

The next commit will delete everything under distcc, and rewrite the
Makefile/etc to use the top-level versions instead.
  • Loading branch information...
1 parent 0a38eac commit 596cf4e2f019a766965ad0566495c56b7d295fe4 @csilvers csilvers committed Apr 11, 2008
Showing with 34,816 additions and 0 deletions.
  1. +151 −0 bench/Build.py
  2. +114 −0 bench/Project.py
  3. +114 −0 bench/ProjectDefs.py
  4. +76 −0 bench/Summary.py
  5. +51 −0 bench/actions.py
  6. +176 −0 bench/benchmark.py
  7. +49 −0 bench/buildutil.py
  8. +63 −0 bench/compiler.py
  9. +47 −0 bench/statistics.py
  10. +47 −0 contrib/distcc-absolutify
  11. +40 −0 contrib/distcc.sh
  12. +70 −0 contrib/distccd-init
  13. +145 −0 contrib/distccd-on-servers
  14. +16 −0 contrib/dmake
  15. +21 −0 contrib/make-j
  16. +26 −0 contrib/netpwd
  17. +83 −0 contrib/redhat/init
  18. +5 −0 contrib/redhat/logrotate
  19. +8 −0 contrib/redhat/sysconfig
  20. +17 −0 contrib/redhat/xinetd
  21. +81 −0 contrib/stage-cc-wrapper.patch
  22. +80 −0 doc/example/init
  23. +96 −0 doc/example/init-suse
  24. +12 −0 doc/example/logrotate
  25. +26 −0 doc/example/xinetd
  26. +213 −0 doc/protocol-1.txt
  27. +38 −0 doc/protocol-2.txt
  28. +61 −0 doc/protocol-3-impl.txt
  29. +82 −0 doc/protocol-3.txt
  30. +73 −0 doc/reporting-bugs.txt
  31. +64 −0 doc/status-1.txt
  32. BIN gnome/distccmon-gnome-icon.png
  33. +13 −0 gnome/distccmon-gnome.desktop
  34. +1 −0 lzo/.stamp-conf.in
  35. +451 −0 lzo/lzoconf.h
  36. +2,935 −0 lzo/minilzo.c
  37. +100 −0 lzo/minilzo.h
  38. +353 −0 m4/acx_pthread.m4
  39. +167 −0 m4/pkg.m4
  40. +725 −0 man/distcc.1
  41. +295 −0 man/distccd.1
  42. +56 −0 man/distccmon-text.1
  43. +287 −0 packaging/RedHat/init.d/distcc
  44. +13 −0 packaging/RedHat/logrotate.d/distcc
  45. +15 −0 packaging/RedHat/xinetd.d/distcc
  46. +1 −0 popt/.stamp-conf.in
  47. +12 −0 popt/README.popt
  48. +50 −0 popt/findme.c
  49. +20 −0 popt/findme.h
  50. +1,236 −0 popt/popt.c
  51. +541 −0 popt/popt.h
  52. +190 −0 popt/poptconfig.c
  53. +742 −0 popt/popthelp.c
  54. +116 −0 popt/poptint.h
  55. +227 −0 popt/poptparse.c
  56. +76 −0 popt/system.h
  57. +125 −0 src/access.c
  58. +35 −0 src/access.h
  59. +394 −0 src/arg.c
  60. +165 −0 src/argutil.c
  61. +110 −0 src/backoff.c
  62. +367 −0 src/bulk.c
  63. +51 −0 src/bulk.h
  64. +163 −0 src/cleanup.c
  65. +131 −0 src/climasq.c
  66. +224 −0 src/clinet.c
  67. +33 −0 src/clinet.h
  68. +281 −0 src/clirpc.c
  69. +687 −0 src/compile.c
  70. +46 −0 src/compile.h
  71. +254 −0 src/compress.c
  72. +103 −0 src/cpp.c
  73. +306 −0 src/daemon.c
  74. +56 −0 src/daemon.h
  75. +275 −0 src/distcc.c
  76. +337 −0 src/distcc.h
  77. +288 −0 src/dopt.c
  78. +48 −0 src/dopt.h
  79. +251 −0 src/dotd.c
  80. +9 −0 src/dotd.h
  81. +376 −0 src/dparent.c
  82. +138 −0 src/dsignal.c
  83. +130 −0 src/emaillog.c
  84. +11 −0 src/emaillog.h
  85. +565 −0 src/exec.c
  86. +50 −0 src/exec.h
  87. +64 −0 src/exitcode.h
  88. +315 −0 src/filename.c
  89. +455 −0 src/fix_debug_info.c
  90. +26 −0 src/fix_debug_info.h
  91. +84 −0 src/gcc-id.c
  92. +59 −0 src/h_argvtostr.c
  93. +106 −0 src/h_compile.c
  94. +73 −0 src/h_dotd.c
  95. +60 −0 src/h_exten.c
  96. +111 −0 src/h_hosts.c
  97. +59 −0 src/h_issource.c
  98. +66 −0 src/h_parsemask.c
  99. +75 −0 src/h_sa2str.c
  100. +72 −0 src/h_scanargs.c
  101. +63 −0 src/h_strip.c
  102. +77 −0 src/help.c
  103. +68 −0 src/history.c
  104. +67 −0 src/hostfile.c
  105. +677 −0 src/hosts.c
  106. +87 −0 src/hosts.h
  107. +95 −0 src/implicit.c
  108. +25 −0 src/implicit.h
  109. +161 −0 src/include_server_if.c
  110. +21 −0 src/include_server_if.h
  111. +272 −0 src/io.c
  112. +113 −0 src/loadfile.c
  113. +295 −0 src/lock.c
  114. +36 −0 src/lock.h
  115. +1,034 −0 src/lsdistcc.c
  116. +673 −0 src/mon-gnome.c
  117. +125 −0 src/mon-notify.c
  118. +115 −0 src/mon-text.c
  119. +368 −0 src/mon.c
  120. +266 −0 src/mon.h
  121. +154 −0 src/ncpus.c
  122. +214 −0 src/netutil.c
  123. +37 −0 src/netutil.h
  124. +195 −0 src/prefork.c
  125. +152 −0 src/pump.c
  126. +301 −0 src/remote.c
  127. +299 −0 src/renderer.c
  128. +48 −0 src/renderer.h
  129. +343 −0 src/rpc.c
  130. +48 −0 src/rpc.h
  131. +166 −0 src/rslave.c
  132. +65 −0 src/rslave.h
  133. +81 −0 src/safeguard.c
  134. +212 −0 src/sendfile.c
  135. +781 −0 src/serve.c
  136. +138 −0 src/setuid.c
  137. +1,016 −0 src/snprintf.c
  138. +30 −0 src/snprintf.h
  139. +290 −0 src/srvnet.c
  140. +28 −0 src/srvnet.h
  141. +181 −0 src/srvrpc.c
  142. +228 −0 src/ssh.c
  143. +257 −0 src/state.c
  144. +91 −0 src/state.h
  145. +415 −0 src/stats.c
  146. +46 −0 src/stats.h
  147. +116 −0 src/stringmap.c
  148. +27 −0 src/stringmap.h
  149. +178 −0 src/strip.c
  150. +434 −0 src/tempfile.c
  151. +159 −0 src/timefile.c
  152. +33 −0 src/timefile.h
  153. +36 −0 src/timeval.c
  154. +4 −0 src/timeval.h
  155. +433 −0 src/trace.c
  156. +230 −0 src/trace.h
  157. +93 −0 src/traceenv.c
  158. +36 −0 src/types.h
  159. +769 −0 src/util.c
  160. +55 −0 src/util.h
  161. +197 −0 src/where.c
  162. +29 −0 src/where.h
  163. +265 −0 src/zeroconf-reg.c
  164. +616 −0 src/zeroconf.c
  165. +18 −0 src/zeroconf.h
  166. +35 −0 survey.txt
  167. +446 −0 test/comfychair.py
  168. +37 −0 test/onetest.py
  169. +1,715 −0 test/testdistcc.py
View
@@ -0,0 +1,151 @@
+# distcc/benchmark -- automated system for testing distcc correctness
+# and performance on various source trees.
+
+# Copyright (C) 2002, 2003 by Martin Pool
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+from Project import Project
+from compiler import CompilerSpec
+import buildutil
+from buildutil import make_dir, run_cmd, rm_files
+import re, os, sys, time
+
+
+
+class Build:
+ """A Build is a combination of a Project and CompilerSpec.
+
+ """
+ def __init__(self, project, compiler, n_repeats):
+ self.project = project
+ self.compiler = compiler
+ self.n_repeats = n_repeats
+
+ self.base_dir = os.path.join(os.getcwd(), "build", self.project.name, self.compiler.name)
+ self.unpacked_dir = os.path.join(self.base_dir, self.project.unpacked_subdir)
+
+ # Some packages need to be started from a subdirectory of their
+ # unpacked form. For example, Samba is compiled from the "source/"
+ # subdirectory of the unpacked source.
+ if self.project.build_subdir:
+ self.build_dir = os.path.join(self.unpacked_dir, project.build_subdir)
+ else:
+ self.build_dir = self.unpacked_dir
+
+ self.log_dir = self.build_dir
+
+ def __repr__(self):
+ return "Build(%s, %s)" % (`self.project`, `self.compiler`)
+
+
+ def unpack(self):
+ """Unpack from source tarball into build directory"""
+ if re.search(r"\.tar\.bz2$", self.project.package_file):
+ tar_fmt = "tar xf %s --bzip2"
+ else:
+ tar_fmt = "tar xfz %s"
+
+ tar_cmd = tar_fmt % os.path.join(os.getcwd(), self.project.package_dir,
+ self.project.package_file)
+
+ make_dir(self.base_dir)
+ print "** Unpacking..."
+ run_cmd("cd %s && %s" % (self.base_dir, tar_cmd))
+
+
+ def configure(self, compiler):
+ """Run configuration command for this tree, if any."""
+ self.compiler = compiler
+
+ make_dir(self.log_dir)
+
+ configure_log = os.path.join(self.log_dir, "bench-configure.log")
+ distcc_log = os.path.join(self.log_dir, "bench-configure-distcc.log")
+
+ rm_files((configure_log, distcc_log))
+
+ print "** Configuring..."
+ run_cmd("cd %s && \\\nDISTCC_LOG='%s' \\\nCC='%s' \\\nCXX='%s' \\\n%s \\\n>%s 2>&1" %
+ (self.build_dir, distcc_log, self.compiler.cc,
+ self.compiler.cxx,
+ self.project.configure_cmd, configure_log))
+
+
+ def build(self, sum):
+ """Actually build the package."""
+
+ build_log = os.path.join(self.log_dir, "bench-build.log")
+ prebuild_log = os.path.join(self.log_dir, "bench-prebuild.log")
+
+ distcc_log = os.path.join(self.log_dir, "bench-build-distcc.log")
+
+ rm_files((build_log, distcc_log))
+
+ print "** Building..."
+ if self.project.pre_build_cmd:
+ cmd = ("cd %s && %s > %s 2>&1" % (self.build_dir,
+ self.project.pre_build_cmd,
+ prebuild_log))
+ run_cmd(cmd)
+
+ cmd = ("cd %s && \\\n%s \\\nDISTCC_LOG='%s' \\\nCC='%s' \\\nCXX='%s' \\\n%s \\\n>%s 2>&1" %
+ (self.build_dir, self.project.build_cmd, distcc_log,
+ self.compiler.cc,
+ self.compiler.cxx,
+ self.compiler.make_opts,
+ build_log))
+ result, elapsed = run_cmd(cmd)
+ return elapsed
+
+
+ def clean(self):
+ clean_log = os.path.join(self.log_dir, "bench-clean.log")
+ print "** Cleaning build directory"
+ cmd = "cd %s && make clean >%s 2>&1" % (self.build_dir, clean_log)
+ run_cmd(cmd)
+
+
+ def scrub(self):
+ print "** Removing build directory"
+ run_cmd("rm -rf %s" % self.unpacked_dir)
+
+
+ def build_actions(self, actions, summary):
+ """Carry out selected actions.
+
+ Catch exceptions and handle."""
+ try:
+ times = []
+ if 'sweep' in actions:
+ self.scrub()
+ if 'unpack' in actions:
+ self.unpack()
+ if 'configure' in actions:
+ self.configure(self.compiler)
+ for i in range(self.n_repeats):
+ if 'build' in actions:
+ times.append(self.build(summary))
+ if 'clean' in actions:
+ self.clean()
+ if 'scrub' in actions:
+ self.scrub()
+ summary.store(self.project, self.compiler, times)
+ except KeyboardInterrupt:
+ raise
+ except:
+ apply(sys.excepthook, sys.exc_info()) # print traceback
+ summary.store(self.project, self.compiler, 'FAIL')
View
@@ -0,0 +1,114 @@
+# distcc/benchmark -- automated system for testing distcc correctness
+# and performance on various source trees.
+
+# Copyright (C) 2002, 2003 by Martin Pool
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+import re, os, sys, time
+from buildutil import make_dir, run_cmd
+
+
+# Trees of software to be built.
+trees = { }
+
+
+class Project:
+ """Defines a project to be built and tested.
+
+ The Python process remains in the top-level directory for the
+ whole process. Commands are kicked off in subdirectories if
+ necessary.
+
+ 'subdir' variables give just a single component of a name; 'dir' variables
+ give a full path."""
+
+ def __init__(self, url, package_file=None,
+ md5=None,
+ name=None,
+ configure_cmd=None,
+ pre_build_cmd = None,
+ build_cmd=None,
+ unpacked_subdir=None,
+ build_subdir=None,
+ source_name=None):
+ self.url = url
+ if not package_file:
+ package_file = url.split('/')[-1]
+ self.package_file = package_file
+
+ if not name:
+ name = re.match(r"(.*)\.tar(\.gz|\.bz2|)$", package_file).group(1)
+ self.name = name
+
+ self.md5 = md5
+
+ self.configure_cmd = configure_cmd or "./configure"
+ self.build_cmd = build_cmd or "make"
+ self.source_name = source_name or name
+ self.pre_build_cmd = pre_build_cmd
+
+ self.package_dir = "packages"
+ self.download_dir = "download"
+
+ # By default, we assume the package creates an unpacked
+ # directory whose name is the same as the tarball. For
+ # example, Wine's tarball is "Wine-xxxxxxx", but it unpacks to
+ # "wine-xxxxxxxx".
+ self.unpacked_subdir = unpacked_subdir or self.source_name
+ self.build_subdir = build_subdir
+
+
+ def register(self):
+ trees[self.name] = self
+
+
+ def __repr__(self):
+ return "Project(name=%s)" % `self.name`
+
+
+ def download(self):
+ """Download package from vendor site"""
+
+ make_dir(self.package_dir)
+ make_dir(self.download_dir)
+
+ if not os.path.isfile(os.path.join(self.package_dir, self.package_file)):
+ # XXX: snarf gets upset if the HTTP server returns "416
+ # Requested Range Not Satisfiable" because the file is already
+ # totally downloaded. This is kind of a snarf bug.
+ print "** Downloading"
+ run_cmd("cd %s && wget --continue %s" %
+ (self.download_dir, self.url))
+ run_cmd("mv %s %s" %
+ (os.path.join(self.download_dir, self.package_file),
+ self.package_dir))
+
+ def md5check(self):
+ if self.md5:
+ print "** Checking source package integrity"
+ run_cmd("cd %s && echo '%s' | md5sum -c /dev/stdin" %
+ (self.package_dir, self.md5))
+
+
+ def pre_actions(self, actions):
+ """Perform actions preparatory to building according to selection."""
+
+ if 'download' in actions:
+ self.download()
+ if 'md5check' in actions:
+ self.md5check()
+
View
@@ -0,0 +1,114 @@
+# distcc/benchmark -- automated system for testing distcc correctness
+# and performance on various source trees.
+
+# Copyright (C) 2002, 2003, 2004 by Martin Pool
+
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA
+
+__doc__ = """distcc benchmark project definitions"""
+
+from Project import Project
+
+# Would like to test glibc, but it needs a separate source and build
+# directory, and this tool doesn't support that yet.
+
+# disable-sanity-checks is needed to stop it wanting linuxthreads --
+# the resulting library is useless, but this is only a test.
+
+#Project(url = 'http://ftp.gnu.org/pub/gnu/glibc/glibc-2.3.2.tar.bz2',
+# configure_cmd = './configure --disable-sanity-checks'
+# ).register()
+
+#Project(url='http://mirror.aarnet.edu.au/pub/gnu/libc/glibc-2.3.tar.bz2',
+# configure_cmd='./configure --disable-sanity-checks',
+# md5='fd20b4a9feeb2b2f0f589b1a9ae8a5e2 glibc-2.3.tar.bz2').register()
+
+Project(url='http://archive.apache.org/dist/httpd/httpd-2.0.43.tar.gz',
+ md5='8051de5d160c43d4ed2cc47dc9be6fd3 httpd-2.0.43.tar.gz').register()
+
+Project(url='ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.7.tar.bz2',
+ md5='5882b1e729f57cb18af653a2f504197b glib-2.0.7.tar.bz2').register()
+
+Project(url='http://us1.samba.org/samba/ftp/old-versions/samba-2.2.7.tar.gz',
+ build_subdir='source',
+ md5='824cd4e305f9b744f3eec702a7b96f7f samba-2.2.7.tar.gz',
+ ).register()
+
+Project(url='http://ftp.gnu.org/gnu/make/make-3.80.tar.bz2',
+ md5='0bbd1df101bc0294d440471e50feca71 *make-3.80.tar.bz2'
+ ).register()
+
+# failed: "make: *** No rule to make target `defconfig'. Stop."
+#Project(url='http://public.ftp.planetmirror.com/pub/linux/kernel/v2.4/linux-2.4.20.tar.bz2',
+# configure_cmd='make defconfig',
+# build_cmd='make bzImage',
+# ).register()
+
+Project(url='http://www.kernel.org/pub/linux/kernel/v2.5/linux-2.5.51.tar.bz2',
+ md5='2300b7b7d2ce4c017fe6dae49717fd9a *linux-2.5.51.tar.bz2',
+ configure_cmd='make defconfig',
+ build_cmd='make bzImage'
+ ).register()
+
+Project(url='http://sources-redhat.oc1.mirrors.redwire.net/gdb/old-releases/gdb-5.3.tar.gz',
+ ).register()
+
+## gimp 1.2.3 has makefile bugs that break -j
+## Project(url='ftp://212.8.35.65/pub/FreeBSD/distfiles/gimp-1.2.3.tar.bz2',
+## md5='b19235f19f524f772a4aef597a69b1da *gimp-1.2.3.tar.bz2',
+## configure_cmd='./configure --disable-perl',
+## ).register()
+
+Project(url='ftp://ftp.gimp.org/pub/gimp/v2.2/gimp-2.2.10.tar.bz2',
+ md5='aa29506ed2272af02941a7a601a7a097 gimp-2.2.10.tar.bz2',
+ configure_cmd='./configure --disable-perl --disable-print',
+ ).register()
+
+## Project(url='http://ibiblio.org/pub/linux/system/emulators/wine/wine-0.9.3.tar.bz2',
+## ).register()
+
+Project(url='http://ibiblio.org/pub/linux/system/emulators/wine/wine-0.9.4.tar.bz2',
+ md5='73205d83a5612a43441a8532683c0434 wine-0.9.4.tar.bz2',
+ ).register()
+
+Project(url='http://public.planetmirror.com.au/pub/gnu/hello/hello-2.1.1.tar.gz',
+ md5='70c9ccf9fac07f762c24f2df2290784d *hello-2.1.1.tar.gz',
+ ).register()
+
+
+# XXX: Does not build on Debian at the moment, problem with libIDL-config
+
+# Project(url='http://mirror.aarnet.edu.au/pub/mozilla/releases/mozilla1.4/src/mozilla-source-1.4.tar.bz2',
+# name='mozilla-1.4',
+# configure_cmd="LIBIDL_CONFIG=libIDL-config-2 ./configure",
+# unpacked_subdir='mozilla',
+# ).register()
+
+
+Project(url='http://ftp.mozilla.org/pub/firebird/releases/0.6/MozillaFirebird-0.6-source.tar.bz2',
+ name='MozillaFirebird',
+ unpacked_subdir='mozilla',
+ ).register()
+
+Project(url='http://us1.samba.org/samba/ftp/old-versions/samba-3.0.20.tar.gz',
+ name='samba-3.0.20',
+ build_subdir='source',
+ # newer versions of popt can be incompatible
+ configure_cmd='./configure --with-included-popt',
+ pre_build_cmd = 'make proto',
+ ).register()
+
+
Oops, something went wrong.

0 comments on commit 596cf4e

Please sign in to comment.