Koji: ServerOffline
by Jitesh Shah
Hi,
I've been running a local koji instance at my workplace. It worked
absolutely fine for a fortnight. But, since Monday, I am getting this
error : "ServerOffline: database outage" for any CLI command that I try
to execute.
I initially suspected that it might be because koji cannot connect to
the database. But, I checked that I can login to the database through
command-line.
>> psql
Also, I wrote a small script in python which mimics koji's method of
connecting to the database (with reference
to /usr/lib/python2.5/site-packages/koji/db.py) and it works fine!
Just to make sure, I restarted postgresql service in vain.
Re-initialised the database (Remove /var/lib/pgsql and run "service
postgresql initdb" and all the other steps) to no avail.
I started seeing this problem after a run of the koji-shadow script. It
exited abnormally giving this very error. Since then, I cannot even
access koji-cli.. neither koji-web.
I have been tracing through the koji scripts and I see that the SSL
login succeeds and then the very first rpc call: "getAPIVersion" fails.
Wireshark shows that the koji-hub replies with "Connection: close" to
the getAPIVersion call.
Any idea as to what is going wrong?
Any pointers?
Jitesh
14 years, 10 months
Patch for mercurial support...
by Brian Kosick
Hi All,
First off, I'd like to say that I'm still in the n00b period of learning
python and have heard that bad coding with it takes a little bit of
extra effort. I'm happy to say that I think that the koji maintainers
are too lazy to put that extra bit of effort in. I found the code in
kojid to be easily readable. The variables, classes and methods were
well named and the flow of the code made sense.
What are you guys thinking?!?!
These are tough times and you should be thinking about naming schemes
that only the original author could love. Cryptic variable names and
convoluted work-flows are core synergies to job security!
Anyways, in between trying to deepen the dent on my desk via the manual
"forehead" method, constant interruptions, and managements infuriating
refusal to allow me to throttle those same interrupters, I came up with
this patch to koji 1.2.6 it allows Mercurial to be used as a SCM.
Thanks for the un-convoluted code!
Brian
14 years, 10 months
Koji support for larger gpg rpm signatures
by Jesse Keating
As part of our sha-256 efforts, we're trying to sign rpms with a sha-2
digest. I'm attempting to sign packages with a RSA key that is size
4096, the biggest possible. However I'm running into problems importing
this into koji, due to my local signing software haven stolen come code
from koji to determine what the sigkey is. The koji code makes an
assumption about where the key ID exists in the signature header, and it
seems this assumption is wrong when larger keys are used.
Mitr who has been helping me says that for a quick hack, when getting
the key chunk out of the hex, we can assume that sigkey[13:17] works if
sigkey[0] is 0x88, but if 0 is 0x89, we have to go to 14:18.
This comes up a few times in koji code, so I thought some discussion was
in order before setting off to make a patch.
Is there anything better we can do instead of snaking raw data out of
headers?
--
Jesse Keating
Fedora -- Freedom² is a feature!
identi.ca: http://identi.ca/jkeating
14 years, 10 months
[PATCH] kojira: never delete repos
by Paul B Schroeder
Setting "deleted_repo_lifetime" to 0 will tell kojira to keep repos indefinitely...
diff --git a/util/kojira b/util/kojira
index 19d08e7..93852d3 100755
--- a/util/kojira
+++ b/util/kojira
@@ -134,7 +134,7 @@ class ManagedRepo(object):
self.logger.error("Can't stat repo directory: %s" % path)
return True
age = time.time() - max(self.event_ts, mtime)
- if age < options.deleted_repo_lifetime:
+ if options.deleted_repo_lifetime == 0 or age < options.deleted_repo_lifetime:
#XXX should really be called expired_repo_lifetime
return False
self.logger.debug("Attempting to delete repo %s.." % self.repo_id)
@@ -252,7 +252,7 @@ class RepoManager(object):
continue
if rinfo['state'] in (koji.REPO_DELETED, koji.REPO_PROBLEM):
age = time.time() - max(rinfo['create_ts'], dir_ts)
- if age > options.deleted_repo_lifetime:
+ if options.deleted_repo_lifetime != 0 and age > options.deleted_repo_lifetime:
#XXX should really be called expired_repo_lifetime
count += 1
logger.info("Removing stray repo (state=%s): %s" % (koji.REPO_STATES[rinfo['state']], repodir))
--
---
Paul B Schroeder <paul.schroeder "at" bluecoat "dot" com>
Blue Coat Systems, Inc.
14 years, 10 months
[PATCH] koji Makfile test-rpm target broken
by Paul B Schroeder
Shouldn't the 'test-rpm' target depend upon 'test-tarball', not 'tarball'?
diff --git a/Makefile b/Makefile
index 7432f31..d9b1af9 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ srpm: tarball
rpm: tarball
$(RPM_WITH_DIRS) $(DIST_DEFINES) -bb $(SPECFILE)
-test-rpm: tarball
+test-rpm: test-tarball
$(RPM_WITH_DIRS) $(DIST_DEFINES) --define "testbuild 1" -bb $(SPECFILE)
tag::
--
---
Paul B Schroeder <paul.schroeder "at" bluecoat "dot" com>
Blue Coat Systems, Inc.
14 years, 10 months
[PATCH/mock] Fix git log command used for ChangeLog and AUTHORS
by Todd Zullinger
The git-* commands are not in the PATH by default with git >= 1.6.0.
Signed-off-by: Todd Zullinger <tmz(a)pobox.com>
---
Makefile.am | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index aefcad8..4fe1e7d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -58,10 +58,10 @@ CLEANFILES += py/*.pyc py/mock/*.pyc py/mock/plugins/*.pyc
dist: ChangeLog AUTHORS
ChangeLog:
- (GIT_DIR=.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+ (GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
AUTHORS:
- (GIT_DIR=.git git-log | grep ^Author | sort |uniq > .authors.tmp && mv .authors.tmp AUTHORS; rm -f .authors.tmp) || (touch AUTHORS; echo 'git directory not found: installing possibly empty AUTHORS.' >&2)
+ (GIT_DIR=.git git log | grep ^Author | sort |uniq > .authors.tmp && mv .authors.tmp AUTHORS; rm -f .authors.tmp) || (touch AUTHORS; echo 'git directory not found: installing possibly empty AUTHORS.' >&2)
REPLACE_VARS_ON_INSTALL=$(sbindir)/mock.py
install-exec-hook:
--
1.6.1
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Intaxication (n.) Euphoria at getting a tax refund, which lasts until
you realize it was your money to start with.
14 years, 10 months
[PATCH] mock: set the HOME environment variable
by Mike Bonnet
Signed-off-by: Mike Bonnet <mikeb(a)redhat.com>
---
Set the HOME environment variable to match the chroothome config
parameter. Allows commands running under --chroot --unpriv to create
dotfiles, etc.
py/mock.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/py/mock.py b/py/mock.py
index d04c859..677691b 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -410,7 +410,6 @@ def main(ret):
uidManager = mock.uid.uidManager(unprivUid, unprivGid)
uidManager._becomeUser(unprivUid, unprivGid)
- del(os.environ["HOME"])
# defaults
config_opts = {}
@@ -498,6 +497,7 @@ def main(ret):
ret["chroot"] = chroot
ret["config_opts"] = config_opts
os.umask(002)
+ os.environ["HOME"] = chroot.homedir
# New namespace starting from here
try:
--
1.6.0.6
14 years, 10 months
[PATCH] pungi: Implement building of 'full' trees
by Bill Nottingham
The attached patches implement the building of 'full' trees - these
are trees that contain all subpackages of any source RPMs used in
the tree composition. This can be useful if the distribution you're
building isn't going to have an 'Everything' tree like Fedora has.
As an example, a compose of just 'basesystem' with both this option,
and the selfhosting option, yields over 2600 binary packages.
Patches apply on top of the prior patch series.
Bill
bin/pungi.py | 18 ++++++++++++++-
pypungi/__init__.py | 60 +++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 69 insertions(+), 9 deletions(-)
14 years, 11 months