[PATCH] Allow spec file to be in a different path than /
by Thomas
This should allow people to build from git repositories that have a
different structure than Fedora (they still need some magic with
source_cmd). The patch is not too intrusive and can be set per
repository.
Let me know if it can be considered for inclusion. I am happy to rework it.
---
diff --git a/builder/kojid b/builder/kojid
index b3d0d1c..89f9474 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -3292,7 +3292,7 @@ class BuildSRPMFromSCMTask(BaseBuildTask):
self.patch_scm_source(sourcedir, logfile, opts)
# Find and verify that there is only one spec file.
- spec_files = glob.glob("%s/*.spec" % sourcedir)
+ spec_files = glob.glob("%s/%s*.spec" % (sourcedir, scm.spec_path))
if len(spec_files) == 0:
raise koji.BuildError("No spec file found")
elif len(spec_files) > 1:
diff --git a/koji/daemon.py b/koji/daemon.py
index 205f62e..68af212 100644
--- a/koji/daemon.py
+++ b/koji/daemon.py
@@ -200,6 +200,7 @@ class SCM(object):
- use_common (defaults to True, may be set by assert_allowed())
- source_cmd (defaults to ['make', 'sources'], may be set by
assert_allowed())
- scmtype
+ - spec_path
The exact format of each attribute is SCM-specific, but the
structure of the url
must conform to the template above, or an error will be raised.
@@ -220,6 +221,7 @@ class SCM(object):
self.revision = fragment
self.use_common = True
self.source_cmd = ['make', 'sources']
+ self.spec_path = '/'
for scmtype, schemes in SCM.types.items():
if self.scheme in schemes:
@@ -311,6 +313,10 @@ class SCM(object):
else:
# there was nothing after the trailing :,
so they don't want to run a source_cmd at all
self.source_cmd = None
+ # check if spec path is defined
+ if len(scm_tuple) >= 5:
+ if scm_tuple[4]:
+ self.spec_path = scm_tuple[4] + '/'
break
else:
self.logger.warn('Ignoring incorrectly formatted SCM
host:repository: %s' % allowed_scm)
8 years, 11 months
koji client on RHEL7 - ssl can't verify the certificate
by Atanas Zhelev
Hi all,
I have an issue running the koji client on RHEL7. I've installed the
package from EPEL:
http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/repoview/koji.html
Trying to run a build though produces error message:
$ koji build TAGHERE 'SCM URL here'
Error: [('asn1 encoding routines', 'ASN1_item_verify', 'unknown message
digest algorithm'), ('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE',
'certificate verify failed')]
I've tried with the same certificate on different machine and i don't
have such issue there. Anyone have some advice what the problem might
be with RHEL7?
Thanks
Atanas
9 years, 1 month
[mash PATCH] don't ship ocaml packages as multilib
by Dan Horák
---
mash/multilib.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mash/multilib.py b/mash/multilib.py
index f2594b0..f720f58 100644
--- a/mash/multilib.py
+++ b/mash/multilib.py
@@ -196,6 +196,8 @@ class DevelMultilibMethod(RuntimeMultilibMethod):
return True
if po.name.startswith('ghc-'):
return False
+ if po.name.startswith('ocaml-'):
+ return False
if po.name.startswith('kernel'):
for (p_name, p_flag, (p_e, p_v, p_r)) in po.provides:
if p_name == 'kernel-devel':
--
1.9.3
9 years, 1 month
[mock PATCH 1/5] configs: s390x is legal host arch for s390
by Dan Horák
Signed-off-by: Dan Horák <dan(a)danny.cz>
---
etc/mock/fedora-rawhide-s390.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/mock/fedora-rawhide-s390.cfg b/etc/mock/fedora-rawhide-s390.cfg
index 53ef3f1..1389717 100644
--- a/etc/mock/fedora-rawhide-s390.cfg
+++ b/etc/mock/fedora-rawhide-s390.cfg
@@ -1,6 +1,6 @@
config_opts['root'] = 'fedora-rawhide-s390'
config_opts['target_arch'] = 's390'
-config_opts['legal_host_arches'] = ('s390',)
+config_opts['legal_host_arches'] = ('s390', 's390x')
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
--
1.9.3
9 years, 1 month
[PATCH] builder: Improve allowed_scms documentation in the config file
by Mathieu Bridon
The config file tries to explain to the admin how to specify
allowed_scms, but one option (source_cmd) was missing.
This just reuses the wording of the docstring from the function parsing
this option, providing a complete documentation to admins when they read
the config file.
---
builder/kojid.conf | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/builder/kojid.conf b/builder/kojid.conf
index 05fe3b0..5f0aaec 100644
--- a/builder/kojid.conf
+++ b/builder/kojid.conf
@@ -41,11 +41,21 @@ server=http://hub.example.com/kojihub
; The URL for the file access
topurl=http://hub.example.com/kojifiles
-; A space-separated list of hostname:repository[:use_common] tuples that kojid is authorized to checkout from (no quotes).
-; Wildcards (as supported by fnmatch) are allowed.
-; If use_common is specified and is one of "false", "no", "off", or "0" (without quotes), then kojid will not attempt to checkout
-; a common/ dir when checking out sources from the source control system. Otherwise, it will attempt to checkout a common/
-; dir, and will raise an exception if it cannot.
+; A space-separated list of tuples from which kojid is allowed to checkout.
+; The format of those tuples is:
+;
+; host:repository[:use_common[:source_cmd]]
+;
+; Incorrectly-formatted tuples will be ignored.
+;
+; If use_common is not present, kojid will attempt to checkout a common/
+; directory from the repository. If use_common is set to no, off, false, or 0,
+; it will not attempt to checkout a common/ directory.
+;
+; source_cmd is a shell command (args separated with commas instead of spaces)
+; to run before building the srpm. It is generally used to retrieve source
+; files from a remote location. If no source_cmd is specified, "make sources"
+; is run by default.
allowed_scms=scm.example.com:/cvs/example git.example.org:/example svn.example.org:/users/*:no
; The mail host to use for sending email notifications
--
1.9.3
9 years, 1 month
[PATCH 1/3] fedpkg: Show full exception if verbose
by Till Maas
---
src/fedpkg/__main__.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/fedpkg/__main__.py b/src/fedpkg/__main__.py
index c64f61e..4650040 100644
--- a/src/fedpkg/__main__.py
+++ b/src/fedpkg/__main__.py
@@ -70,6 +70,8 @@ def main():
pass
except Exception, e:
log.error('Could not execute %s: %s' % (client.args.command.__name__, e))
+ if client.args.v:
+ raise
sys.exit(1)
if __name__ == "__main__":
--
1.8.3.1
9 years, 1 month
[PATCH] Allow specifying an 'int' for 'latest'.
by Ralph Bean
This should preserve the pre-existing behavior, where if latest is set
to True, only the latest builds in a tag are returned, and if latest is
set to False, all the builds in a tag are returned.
The new behavior is a kind of middleground, where you can set latest=3,
and only the latest three builds for each package in a tag are returned.
We want this ultimately for mashing rawhide so we can create a downgrade
path for people if new builds break them.
https://bugzilla.redhat.com/show_bug.cgi?id=1082830
---
hub/kojihub.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py
index f2a2c09..509a30b 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -1,7 +1,7 @@
# Python library
# kojihub - library for koji's XMLRPC interface
-# Copyright (c) 2005-2010 Red Hat
+# Copyright (c) 2005-2014 Red Hat
#
# Koji is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -24,6 +24,7 @@
import base64
import calendar
import cgi
+import collections
import koji
import koji.auth
import koji.db
@@ -1123,6 +1124,7 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne
set inherit=True to follow inheritance
set event to query at a time in the past
set latest=True to get only the latest build per package
+ set latest=N to get only the N latest tagged RPMS
If type is not None, restrict the list to builds of the given type. Currently the supported
types are 'maven', 'win', and 'image'.
@@ -1191,7 +1193,7 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne
# i.e. latest first
builds = []
- seen = {} # used to enforce the 'latest' option
+ seen = collections.defaultdict(0) # used to enforce the 'latest' option
for tagid in taglist:
#log_error(koji.db._quoteparams(q,locals()))
for build in _multiRow(q, locals(), [pair[1] for pair in fields]):
@@ -1204,10 +1206,10 @@ def readTaggedBuilds(tag,event=None,inherit=False,latest=False,package=None,owne
# list should take priority
continue
if latest:
- if seen.has_key(pkgid):
- #only take the first (note ordering in query above)
+ if (latest is True and seen[pkgid]) or seen[pkgid] >= latest:
+ #only take the first N (note ordering in query above)
continue
- seen[pkgid] = 1
+ seen[pkgid] = seen[pkgid] + 1
builds.append(build)
return builds
@@ -1218,6 +1220,7 @@ def readTaggedRPMS(tag, package=None, arch=None, event=None,inherit=False,latest
set inherit=True to follow inheritance
set event to query at a time in the past
set latest=False to get all tagged RPMS (not just from the latest builds)
+ set latest=N to get only the N latest tagged RPMS
If type is not None, restrict the list to rpms from builds of the given type. Currently the
supported types are 'maven' and 'win'.
@@ -1307,6 +1310,7 @@ def readTaggedArchives(tag, package=None, event=None, inherit=False, latest=True
set inherit=True to follow inheritance
set event to query at a time in the past
set latest=False to get all tagged archives (not just from the latest builds)
+ set latest=N to get only the N latest tagged RPMS
If type is not None, restrict the listing to archives of the given type. Currently
the supported types are 'maven' and 'win'.
--
1.9.3
9 years, 1 month
[fedpkg PATCH 1/2] add new ppc only packages
by Dan Horák
---
src/fedpkg/__init__.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/fedpkg/__init__.py b/src/fedpkg/__init__.py
index ee22ff8..0837120 100644
--- a/src/fedpkg/__init__.py
+++ b/src/fedpkg/__init__.py
@@ -83,7 +83,10 @@ class Commands(pyrpkg.Commands):
'lsvpd',
'powerpc-utils',
'powerpc-utils-papr',
+ 'powerpc-utils-python',
+ 'ppc64-diag',
'ppc64-utils',
+ 'servicelog',
'yaboot',
], 'arm': ['xorg-x11-drv-omapfb'],
's390': ['s390utils', 'openssl-ibmca', 'libica']
--
1.9.3
9 years, 1 month