update to 1.11.0

- setup fedora config for kerberos and flag day

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
epel9
Dennis Gilmore 8 years ago
parent 156b735749
commit be89d2541e

1
.gitignore vendored

@ -7,3 +7,4 @@ koji-1.4.0.tar.bz2
/koji-1.9.0.tar.bz2
/koji-1.10.0.tar.bz2
/koji-1.10.1.tar.bz2
/koji-1.11.0.tar.bz2

@ -1,29 +0,0 @@
From 6e224af9a8610f37898859d25efa7188e9f008e0 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ra.ausil.us>
Date: Wed, 6 Apr 2016 15:00:13 -0500
Subject: [PATCH] enable dns to work in runroot buildroots
Signed-off-by: Dennis Gilmore <dennis@ra.ausil.us>
---
plugins/builder/runroot.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py
index b303890..7bf40e4 100644
--- a/plugins/builder/runroot.py
+++ b/plugins/builder/runroot.py
@@ -152,9 +152,9 @@ class RunRootTask(tasks.BaseTaskHandler):
parent=self.id)
repo_info = self.wait(task_id)[task_id]
if compat_mode:
- broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id'])
+ broot = BuildRoot(root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True)
else:
- broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id'])
+ broot = BuildRoot(self.session, self.options, root, br_arch, self.id, repo_id=repo_info['id'], setup_dns=True)
broot.workdir = self.workdir
broot.init()
rootdir = broot.rootdir()
--
2.7.4

@ -1,58 +0,0 @@
From d70f068cc1e138b3bb58766728424c190fcd77b5 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Aug 23 2016 04:50:22 +0000
Subject: don't bind-mount /dev for LiveMediaTask (RHBZ #1315541)
This is an alternative to https://pagure.io/koji/pull-request/137
which keeps the /dev bind mount for ApplianceTask and LiveCDTask,
only dropping it for LiveMediaTask. It seems from the test we
ran that appliance-creator may still need it, at least for the
present - some of the createAppliance tasks seemed to hang their
builders.
---
diff --git a/builder/kojid b/builder/kojid
index 05438d2..26ae8f2 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -2483,6 +2483,9 @@ class BuildLiveMediaTask(BuildImageTask):
# Other chroot-based image handlers should inherit this.
class ImageTask(BaseTaskHandler):
Methods = []
+ # default to bind mounting /dev, but allow subclasses to change
+ # this
+ bind_opts = {'dirs' : {'/dev' : '/dev',}}
def makeImgBuildRoot(self, buildtag, repoinfo, arch, inst_group):
"""
@@ -2497,14 +2500,11 @@ class ImageTask(BaseTaskHandler):
@returns: a buildroot object
"""
- # Here we configure mock to bind mount a set of /dev directories
- bind_opts = {'dirs' : {'/dev' : '/dev',}}
- if os.path.exists('/selinux'):
- bind_opts['dirs']['/selinux'] = '/selinux'
rootopts = {'install_group': inst_group,
'setup_dns': True,
- 'repo_id': repoinfo['id'],
- 'bind_opts' : bind_opts}
+ 'repo_id': repoinfo['id']}
+ if self.bind_opts:
+ rootopts['bind_opts'] = self.bind_opts
broot = BuildRoot(self.session, self.options, buildtag, arch, self.id, **rootopts)
broot.workdir = self.workdir
@@ -2932,6 +2932,9 @@ class LiveMediaTask(ImageTask):
Methods = ['createLiveMedia']
_taskWeight = 1.5
+ # For livemedia-creator we do not want to bind mount /dev, see
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1315541
+ bind_opts = {}
def genISOManifest(self, image, manifile):
"""

@ -1,16 +1,15 @@
diff -uNr koji-1.10.1.orig/cli/koji.conf koji-1.10.1/cli/koji.conf
--- koji-1.10.1.orig/cli/koji.conf 2016-03-01 16:43:15.000000000 -0600
+++ koji-1.10.1/cli/koji.conf 2016-03-01 16:57:55.875274789 -0600
@@ -3,26 +3,23 @@
--- koji-1.11.0-orig/cli/koji.conf 2016-12-08 22:22:14.000000000 -0600
+++ koji-1.11.0/cli/koji.conf 2016-12-09 08:29:10.066764435 -0600
@@ -3,26 +3,17 @@
;configuration for koji cli tool
;url of XMLRPC server
-;server = http://hub.example.com/kojihub
+server = http://koji.fedoraproject.org/kojihub
+server = https://koji.fedoraproject.org/kojihub
;url of web interface
-;weburl = http://www.example.com/koji
+weburl = http://koji.fedoraproject.org/koji
+weburl = https://koji.fedoraproject.org/koji
;url of package download site
-;pkgurl = http://www.example.com/packages
@ -20,17 +19,16 @@ diff -uNr koji-1.10.1.orig/cli/koji.conf koji-1.10.1/cli/koji.conf
;topdir = /mnt/koji
-;configuration for Kerberos authentication
-
+authtype = kerberos
+krb_rdns = false
-;the service name of the principal being used by the hub
-;krbservice = host
+anon_retry = true
;configuration for SSL authentication
;client certificate
-
-;configuration for SSL authentication
-
-;client certificate
-;cert = ~/.koji/client.crt
+cert = ~/.fedora.cert
;certificate of the CA that issued the HTTP server certificate
-
-;certificate of the CA that issued the HTTP server certificate
-;serverca = ~/.koji/serverca.crt
+serverca = ~/.fedora-server-ca.cert

@ -1,91 +0,0 @@
From 45b94423d4669547c3142bd38a1dff182101f15d Mon Sep 17 00:00:00 2001
From: Ian McLeod <imcleod@redhat.com>
Date: Sep 28 2016 04:19:51 +0000
Subject: [PATCH 1/2] A stab at --new-chroot support for rhe runroot plugin
---
diff --git a/cli/koji b/cli/koji
index 4b5a23d..e33d1e4 100755
--- a/cli/koji
+++ b/cli/koji
@@ -6853,6 +6853,8 @@ def handle_runroot(options, session, args):
help=_("Print the ID of the runroot task"))
parser.add_option("--use-shell", action="store_true", default=False,
help=_("Run command through a shell, otherwise uses exec"))
+ parser.add_option("--new-chroot", action="store_true", default=False,
+ help=_("Run command with the --new-chroot (systemd-nspawn) option to mock"))
parser.add_option("--repo-id", type="int", help=_("ID of the repo to use"))
(opts, args) = parser.parse_args(args)
@@ -6873,6 +6875,7 @@ def handle_runroot(options, session, args):
packages=opts.package, mounts=opts.mount,
repo_id=opts.repo_id,
skip_setarch=opts.skip_setarch,
+ new_chroot=opts.new_chroot,
weight=opts.weight)
except koji.GenericError, e:
if 'Invalid method' in str(e):
diff --git a/plugins/builder/runroot.py b/plugins/builder/runroot.py
index 7bf40e4..83f1898 100644
--- a/plugins/builder/runroot.py
+++ b/plugins/builder/runroot.py
@@ -92,7 +92,7 @@ class RunRootTask(tasks.BaseTaskHandler):
if not path.startswith('/'):
raise koji.GenericError("bad config: all paths (default_mounts, safe_roots, path_subs) needs to be absolute: %s" % path)
- def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None):
+ def handler(self, root, arch, command, keep=False, packages=[], mounts=[], repo_id=None, skip_setarch=False, weight=None, upload_logs=None, new_chroot=False):
"""Create a buildroot and run a command (as root) inside of it
Command may be a string or a list.
@@ -188,6 +188,8 @@ class RunRootTask(tasks.BaseTaskHandler):
self.do_mounts(rootdir, [self._get_path_params(x) for x in self.config['default_mounts']])
self.do_extra_mounts(rootdir, mounts)
mock_cmd = ['chroot']
+ if new_chroot:
+ mock_cmd.append('--new-chroot')
if skip_setarch:
#we can't really skip it, but we can set it to the current one instead of of the chroot one
myarch = platform.uname()[5]
From 852f2500d45fa1aebbc2c0f2c568b026a3bf1ca5 Mon Sep 17 00:00:00 2001
From: Ian McLeod <imcleod@redhat.com>
Date: Sep 28 2016 18:23:42 +0000
Subject: [PATCH 2/2] Slight improvement to new-chroot to make the cli change less likely to confuse older builders
---
diff --git a/cli/koji b/cli/koji
index e33d1e4..30e4f98 100755
--- a/cli/koji
+++ b/cli/koji
@@ -6870,13 +6870,18 @@ def handle_runroot(options, session, args):
else:
command = args[2:]
try:
- task_id = session.runroot(tag, arch, command,
- channel=opts.channel_override,
- packages=opts.package, mounts=opts.mount,
- repo_id=opts.repo_id,
- skip_setarch=opts.skip_setarch,
- new_chroot=opts.new_chroot,
- weight=opts.weight)
+ kwargs = { 'channel': opts.channel_override,
+ 'packages': opts.package,
+ 'mounts': opts.mount,
+ 'repo_id': opts.repo_id,
+ 'skip_setarch': opts.skip_setarch,
+ 'weight': opts.weight }
+ # Only pass this kwarg if it is true - this prevents confusing older
+ # builders with a different function signature
+ if opts.new_chroot:
+ kwargs['new_chroot'] = True
+
+ task_id = session.runroot(tag, arch, command, **kwargs)
except koji.GenericError, e:
if 'Invalid method' in str(e):
print "* The runroot plugin appears to not be installed on the",

@ -8,31 +8,33 @@
%endif
Name: koji
Version: 1.10.1
Release: 13%{?dist}
Version: 1.11.0
Release: 1%{?dist}
License: LGPLv2 and GPLv2+
# koji.ssl libs (from plague) are GPLv2+
Summary: Build system tools
Group: Applications/System
URL: https://pagure.io/fork/ausil/koji/branch/fedora-infra
Patch0: fedora-config.patch
Patch1: 0001-enable-dns-to-work-in-runroot-buildroots.patch
Patch2: 138.patch
Patch3: koji-1.10.1-new-chroot.patch
Source: koji-%{version}.tar.bz2
BuildArch: noarch
Requires: python-krbV >= 1.0.13
Requires: rpm-python
Requires: pyOpenSSL
Requires: python-requests
Requires: python-requests-kerberos
Requires: python-urlgrabber
Requires: yum
Requires: python-dateutil
BuildRequires: python
BuildRequires: python-sphinx
%if %{use_systemd}
BuildRequires: systemd
BuildRequires: pkgconfig
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: python-libcomps
%endif
%description
Koji is a system for building and tracking RPMS. The base package
@ -46,6 +48,9 @@ License: LGPLv2 and GPLv2
Requires: httpd
Requires: mod_wsgi
Requires: postgresql-python
%if 0%{?rhel} == 5
Requires: python-simplejson
%endif
Requires: %{name} = %{version}-%{release}
%description hub
@ -58,6 +63,9 @@ License: LGPLv2
Requires: %{name} = %{version}-%{release}
Requires: %{name}-hub = %{version}-%{release}
Requires: python-qpid >= 0.7
%if 0%{?rhel} >= 6
Requires: python-qpid-proton
%endif
%if 0%{?rhel} == 5
Requires: python-ssl
%endif
@ -73,8 +81,8 @@ License: LGPLv2 and GPLv2+
#mergerepos (from createrepo) is GPLv2+
Requires: %{name} = %{version}-%{release}
Requires: mock >= 0.9.14
Requires: python2-multilib
Requires(pre): /usr/sbin/useradd
Requires: squashfs-tools
%if %{use_systemd}
Requires(post): systemd
Requires(preun): systemd
@ -89,13 +97,12 @@ Requires: /usr/bin/cvs
Requires: /usr/bin/svn
Requires: /usr/bin/git
Requires: python-cheetah
Requires: squashfs-tools
%if 0%{?rhel} == 5
Requires: createrepo >= 0.4.11-2
Requires: python-hashlib
Requires: python-createrepo
%endif
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 5
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
Requires: createrepo >= 0.9.2
%endif
@ -160,9 +167,6 @@ koji-web is a web UI to the Koji system.
%prep
%setup -q
%patch0 -p1 -b orig
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
@ -330,6 +334,10 @@ fi
%endif
%changelog
* Fri Dec 09 2016 Dennis Gilmore <dennis@ausil.us> - 1.11.0-1
- update to 1.11.0
- setup fedora config for kerberos and flag day
* Wed Sep 28 2016 Adam Miller <maxamillion@fedoraproject.org> - 1.10.1-13
- Patch new-chroot functionality into runroot plugin

@ -1 +1 @@
b510184795567585a1cf3ef98e586b9c koji-1.10.1.tar.bz2
6365645cb73e014f084475fab62876df koji-1.11.0.tar.bz2

Loading…
Cancel
Save