Dan Horák píše v St 06. 03. 2013 v 21:38 +0100:
---
builder/kojid | 3 ++-
builder/kojid.conf | 3 +++
koji/__init__.py | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/builder/kojid b/builder/kojid
index f906d0b..6c8a847 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -204,7 +204,7 @@ class BuildRoot(object):
for k in ('repoid', 'tag_name'):
if hasattr(self, k):
opts[k] = getattr(self, k)
- for k in ('mockdir', 'topdir', 'topurl',
'topurls', 'packager', 'vendor', 'distribution',
'mockhost', 'yum_proxy'):
+ for k in ('mockdir', 'topdir', 'topurl',
'topurls', 'packager', 'vendor', 'distribution',
'mockhost', 'yum_proxy', 'rpmbuild_timeout'):
if hasattr(self.options, k):
opts[k] = getattr(self.options, k)
opts['buildroot_id'] = self.id
@@ -3060,6 +3060,7 @@ def get_options():
'maven_repo_ignore': '*.md5 *.sha1 maven-metadata*.xml
_maven.repositories '
'resolver-status.properties
*.lastUpdated',
'failed_buildroot_lifetime' : 3600 * 4,
+ 'rpmbuild_timeout' : 3600 * 24,
'cert': '/etc/kojid/client.crt',
'ca': '/etc/kojid/clientca.crt',
'serverca': '/etc/kojid/serverca.crt'}
diff --git a/builder/kojid.conf b/builder/kojid.conf
index 1fa9ad4..05fe3b0 100644
--- a/builder/kojid.conf
+++ b/builder/kojid.conf
@@ -32,6 +32,9 @@
; The _host string to use in mock
; mockhost=koji-linux-gnu
+; Timeout for build duration (24 hours)
+; rpmbuild_timeout=86400
+
; The URL for the xmlrpc server
server=http://hub.example.com/kojihub
diff --git a/koji/__init__.py b/koji/__init__.py
index f42226b..8ab81a8 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -1266,7 +1266,7 @@ def genMockConfig(name, arch, managed=False, repoid=None,
tag_name=None, **opts)
# don't encourage network access from the chroot
'use_host_resolv': opts.get('use_host_resolv', False),
# Don't let a build last more than 24 hours
- 'rpmbuild_timeout': 86400
+ 'rpmbuild_timeout': opts.get('rpmbuild_timeout', 86400)
}
# bind_opts are used to mount parts (or all of) /dev if needed.
hmm, this fails with
...
Building target platforms: s390
Building for target s390
Wrote: /builddir/build/SRPMS/strace-4.7-3.fc19.src.rpm
EXCEPTION: cannot concatenate 'str' and 'int' objects
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70,
in trace
result = func(*args, **kw)
File "/usr/lib/python2.7/site-packages/mockbuild/util.py", line 347, in do
if (time.time() - start)>(timeout+1) and timeout!=0:
TypeError: cannot concatenate 'str' and 'int' objects
LEAVE do --> EXCEPTION RAISED
Dan