From fabc6e69c146c5e06161a4a4fe13093447978d7f Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 7 Jul 2014 11:41:06 +0000 Subject: [PATCH] community/distcc: patch to allow zero timeout --- community/distcc/PKGBUILD | 15 ++++++++++++--- community/distcc/allow-zero-timeout.patch | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 community/distcc/allow-zero-timeout.patch diff --git a/community/distcc/PKGBUILD b/community/distcc/PKGBUILD index 7e2a835ae..b25afcd86 100644 --- a/community/distcc/PKGBUILD +++ b/community/distcc/PKGBUILD @@ -6,10 +6,11 @@ # ALARM: Kevin Mihelich # - added --without-avahi to configure # - removed gtk2 from deps and --with-gtk from configure +# - patch to allow zero timeout (INT_MAX time to complete) pkgname=distcc pkgver=3.2rc1 -pkgrel=1 +pkgrel=1.1 pkgdesc="A distributed C, C++, Obj C compiler" arch=('i686' 'x86_64') url="http://code.google.com/p/distcc/" @@ -17,14 +18,22 @@ license=('GPL') depends=('gcc' 'popt') makedepends=('gtk2' 'pkgconfig' 'python2') optdepends=('python2') +options=('!distcc') backup=('etc/conf.d/distccd' 'etc/distcc/hosts') source=(http://distcc.googlecode.com/files/${pkgname}-${pkgver}.tar.bz2 distccd.conf.d - distccd.service) + distccd.service + allow-zero-timeout.patch) md5sums=('18cd4f33f5cfc3e75675cafc568fb9cf' '239aae53250e3e35288cba566bc0bbf1' - '09f0688da9c1840e518d2593bd5c3830') + '09f0688da9c1840e518d2593bd5c3830' + '211e96f2c920d10cd5284e4fc075d559') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 -i ../allow-zero-timeout.patch +} build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/community/distcc/allow-zero-timeout.patch b/community/distcc/allow-zero-timeout.patch new file mode 100644 index 000000000..b414c360f --- /dev/null +++ b/community/distcc/allow-zero-timeout.patch @@ -0,0 +1,19 @@ +diff -urN a/src/io.c b/src/io.c +--- a/src/io.c 2011-04-05 12:58:58.000000000 -0600 ++++ b/src/io.c 2014-07-07 05:37:25.074543921 -0600 +@@ -75,11 +75,10 @@ + const char *user_timeout = getenv("DISTCC_IO_TIMEOUT"); + if (user_timeout) { + int parsed_user_timeout = atoi(user_timeout); +- if (parsed_user_timeout <= 0) { +- rs_log_error("Bad DISTCC_IO_TIMEOUT value: %s", user_timeout); +- exit(EXIT_BAD_ARGUMENTS); +- } +- current_timeout = parsed_user_timeout; ++ if (parsed_user_timeout <= 0) ++ current_timeout = INT_MAX; ++ else ++ current_timeout = parsed_user_timeout; + } else { + current_timeout = default_dcc_io_timeout; + }