[koji PATCH] allow setting build priority
by Dan Horák
When building for multiple tags it could be useful to set different priorities
for the tasks, eg. rawhide builds will be lower prio than branched builds.
---
util/koji-shadow | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/koji-shadow b/util/koji-shadow
index 25492d5..8790cf8 100755
--- a/util/koji-shadow
+++ b/util/koji-shadow
@@ -140,6 +140,8 @@ def get_options():
help=_("tag sucessful builds into the tag we are building, default is to not tag"))
parser.add_option("--arches",
help=_("arches to use when creating tags"))
+ parser.add_option("--priority", type="int", default=5,
+ help=_("priority to set for submitted builds"))
#parse once to get the config file
(options, args) = parser.parse_args()
@@ -1080,7 +1082,7 @@ class BuildTracker(object):
#TODO ...and verify repo
repo_id, event_id = session.getTaskResult(task_id)
#kick off build
- task_id = session.build(src, None, opts={'repo_id': repo_id}, priority=5 )
+ task_id = session.build(src, None, opts={'repo_id': repo_id}, priority=options.priority )
return task_id
def report(self):
--
1.8.1.4
9 years, 9 months
[koji PATCH] fix format when printing rpms without buildroot
by Dan Horák
---
util/koji-shadow | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/koji-shadow b/util/koji-shadow
index 25492d5..da7b247 100755
--- a/util/koji-shadow
+++ b/util/koji-shadow
@@ -473,7 +473,7 @@ class TrackedBuild(object):
if brs and bad:
print "Warning: some rpms for %s lacked buildroots:" % self.nvr
for rinfo in bad:
- print " %(name)-%(version)-%(release).%(arch)" % rinfo
+ print " %(name)s-%(version)s-%(release)s.%(arch)s" % rinfo
return brs.keys()
def getDeps(self):
--
1.8.1.4
9 years, 9 months
[koji PATCH] allow setting the timeout for builds from config file
by Dan Horák
---
builder/kojid | 5 +++--
builder/kojid.conf | 3 +++
koji/__init__.py | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/builder/kojid b/builder/kojid
index f906d0b..18c1fa4 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'}
@@ -3067,7 +3068,7 @@ def get_options():
for name, value in config.items('kojid'):
if name in ['sleeptime', 'maxjobs', 'minspace', 'retry_interval',
'max_retries', 'offline_retry_interval', 'failed_buildroot_lifetime',
- 'timeout',]:
+ 'timeout', 'rpmbuild_timeout',]:
try:
defaults[name] = int(value)
except ValueError:
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.
--
1.7.7.6
9 years, 9 months
SCM accurev and koji
by Viacheslav Dubrovskyi
Hi.
I want to build packages from SCM accurev
(http://www.accurev.com/products-overview).
This is a private SCM which uses java.
Please help with advice on how easy it can be done?
Any wrapper script or or something else?
PS. Yes, I know that it is better to use git.
--
WBR,
Viacheslav Dubrovskyi
10 years, 2 months
Policy
by Thomas
Hi All,
I am trying to build a policy for koji allowing only few users for each tag.
I grab the user list from my LDAP and add it to the policy.
Does someone has an example using multiple "user" tests in the policy
"build_from_repo_id" ?
--
Thomas
10 years, 2 months
Best way to see what koji tag an rpm was imported into?
by Pat Riehecky
I'm working on a koji plugin for internal use here and would love a way to
trigger an action off of successful imports of builds against a given tag.
My understanding of the flow goes something like this
$ koji add-target mytag mytarget importhere
$ koji build mytag rpm
### my koji server has 'mytarget' as the target for 'mytag'
### koji builds the rpm from 'mytarget'
### koji imports the successful rpms into 'importhere'
I'd love to be able to get 'mytag' as well as 'importhere'. But really I just
want 'importhere' for my callback.
It seems that the 'postImport' callback is the right landing spot for me as it
sits where I want it to. But I don't see a good way of getting the tag the
package is being imported for. The tag is not provided to the callback -
which strikes me as a bit odd.
Should I just call the XMLRPC 'listPackages' with my pkgID set? Is there a
suggested way of doing that from a plugin? Would 'listPackages' even have the
tag data set at this point?
Pat
--
Pat Riehecky
10 years, 2 months
Koji-1.7.1-1.fc17 repository toplink failure
by Anthony Joseph Messina
After upgrading to koji-1.7.1 on my private hub and builders, my builders are
no longer able to use the repositories they create when building subsequent
dependent packages. When attempting to install locally built packages, the
following error is issued in the root.log:
error was [Errno 2] Local file does not exist:
/tmp/koji/tasks/9129/19129/repo_3627_premerge/toplink/packages/...
The repos are created successfully:
$ /usr/bin/createrepo -vd -o /tmp/koji/tasks/9129/19129/repo -i
/mnt/koji/repos/f17-build/3627/x86_64/pkglist -g /mnt/koji/repos/f17-
build/3627/groups/comps.xml --update --skip-stat /mnt/koji/repos/f17-
build/3627/x86_64
Scanning old repo data
Spawning worker 0 with 36 pkgs
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-2.6.1-3.fc17.1.x86_64.rpm
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-devel-2.6.1-3.fc17.1.x86_64.rpm
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-libs-2.6.1-3.fc17.1.x86_64.rpm
...
...
I believe the issue is related to the following commit:
https://fedorahosted.org/koji/changeset/da6dd0b1832e9929565a1ab03ab844aac...
I'm not sure why when building packages, the builders are inserting
'/tmp/koji/tasks/9129/19129/repo_3627_premerge/toplink'
instead of topdir or topurl, such as
'/mnt/koji' or 'http://example.com/kojifiles'
Right now I'm working on selectively reverting that commit to see if I can
build packages against other local packages.
Any assistance is appreciated. Thanks. -Anthony
--
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
10 years, 2 months
change koji "Recent Builds" filter
by Pat Riehecky
Hello,
I'm wondering if there is an easy way to change the way koji shows the most
recent builds. Right now it sorts by build_id and I would rather sort by
completion_time.
Is there an easier way of doing this than:
$ git diff
diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py
index 0505c9c..a107b20 100644
--- a/www/kojiweb/index.py
+++ b/www/kojiweb/index.py
@@ -272,7 +272,7 @@ def index(environ, packageOrder='package_name',
packageStart=None):
user = environ['koji.currentUser']
- values['builds'] = server.listBuilds(userID=(user and user['id'] or
None), queryOpts={'order': '-build_id', 'limit': 10})
+ values['builds'] = server.listBuilds(userID=(user and user['id'] or
None), queryOpts={'order': '-completion_time', 'limit': 10})
taskOpts = {'parent': None, 'decode': True}
if user:
--
Pat Riehecky
10 years, 2 months