--- /dev/null
+#!/usr/bin/env python
+# coding=utf8
+
+"""
+Correct permissions of policy_queue_byhand_file_id_seq
+
+@contact: Debian FTP Master <ftpmaster@debian.org>
+@copyright: 2012 Luca Falavigna <dktrkranz@debian.org>
+@license: GNU General Public License version 2 or later
+"""
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+################################################################################
+
+import psycopg2
+from daklib.dak_exceptions import DBUpdateError
+from daklib.config import Config
+
+################################################################################
+def do_update(self):
+ print __doc__
+ try:
+ cnf = Config()
+
+ c = self.db.cursor()
+ c.execute("GRANT SELECT, UPDATE, USAGE ON policy_queue_byhand_file_id_seq TO ftpmaster")
+ c.execute("GRANT SELECT ON policy_queue_byhand_file_id_seq TO public")
+ c.execute("UPDATE config SET value = '81' WHERE name = 'db_revision'")
+ self.db.commit()
+
+ except psycopg2.ProgrammingError as msg:
+ self.db.rollback()
+ raise DBUpdateError('Unable to apply sick update 81, rollback issued. Error message: {0}'.format(msg))
--- /dev/null
+#!/usr/bin/env python
+# coding=utf8
+
+"""
+Correct permissions of policy_queue_upload_id_seq
+
+@contact: Debian FTP Master <ftpmaster@debian.org>
+@copyright: 2012 Luca Falavigna <dktrkranz@debian.org>
+@license: GNU General Public License version 2 or later
+"""
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+################################################################################
+
+import psycopg2
+from daklib.dak_exceptions import DBUpdateError
+from daklib.config import Config
+
+################################################################################
+def do_update(self):
+ print __doc__
+ try:
+ cnf = Config()
+
+ c = self.db.cursor()
+ c.execute("GRANT SELECT, UPDATE, USAGE ON policy_queue_upload_id_seq TO ftpmaster")
+ c.execute("GRANT SELECT ON policy_queue_upload_id_seq TO public")
+ c.execute("UPDATE config SET value = '81' WHERE name = 'db_revision'")
+ self.db.commit()
+
+ except psycopg2.ProgrammingError as msg:
+ self.db.rollback()
+ raise DBUpdateError('Unable to apply sick update 82, rollback issued. Error message: {0}'.format(msg))
missing = edit_overrides (missing, upload, session)
elif answer == 'M' and not Options["Trainee"]:
reason = Options.get('Manual-Reject', '') + "\n"
- reason = reason + "\n".join([n.comment for n in get_new_comments(upload.changes.source, session=session)])
+ reason = reason + "\n\n=====\n\n".join([n.comment for n in get_new_comments(upload.changes.source, session=session)])
reason = get_reject_reason(reason)
if reason is not None:
Logger.log(["NEW REJECT", upload.changes.changesname])
age = Cnf["Queue-Report::Options::Age"]
if Cnf.has_key("Queue-Report::Options::New"):
# If we produce html we always have oldest first.
- direction.append([5,-1,"ao"])
+ direction.append([6,-1,"ao"])
else:
if Cnf.has_key("Queue-Report::Options::Sort"):
for i in Cnf["Queue-Report::Options::Sort"].split(","):
if i == "ao":
# Age, oldest first.
- direction.append([5,-1,age])
+ direction.append([6,-1,age])
elif i == "an":
# Age, newest first.
- direction.append([5,1,age])
+ direction.append([6,1,age])
elif i == "na":
# Name, Ascending.
direction.append([0,1,0])
direction.append([0,-1,0])
elif i == "nl":
# Notes last.
- direction.append([4,1,0])
+ direction.append([5,1,0])
elif i == "nf":
# Notes first.
- direction.append([4,-1,0])
+ direction.append([5,-1,0])
entries.sort(lambda x, y: sortfunc(x, y))
# Yes, in theory you can add several sort options at the commandline with. But my mind is to small
# at the moment to come up with a real good sorting function that considers all the sidesteps you
source_count = len(per_source_items)
if Cnf.has_key("Queue-Report::Options::New"):
- direction.append([5,1,"ao"])
+ direction.append([6,1,"ao"])
entries.sort(lambda x, y: sortfunc(x, y))
# Output for a html file. First table header. then table_footer.
# Any line between them is then a <tr> printed from subroutine table_row.
from debian import deb822
from daklib.dbconn import *
+from daklib.gpg import SignedFile
from daklib import utils
from daklib.regexes import re_html_escaping, html_escaping
def table_footer():
return '</table><br/><p>non-NEW uploads are <a href="/deferred/">available</a>, see the <a href="ftp://ftp-master.debian.org/pub/UploadQueue/README">UploadQueue-README</a> for more information.</p></center><br/>\n'
-def table_row(changesname, delay, changed_by, closes):
+def table_row(changesname, delay, changed_by, closes, fingerprint):
global row_number
res = '<tr class="%s">'%((row_number%2) and 'odd' or 'even')
- res += (3*'<td valign="top">%s</td>')%tuple(map(html_escape,(changesname,delay,changed_by)))
+ res += (2*'<td valign="top">%s</td>')%tuple(map(html_escape,(changesname,delay)))
+ res += '<td valign="top">%s<br><span class=\"deferredfp\">Fingerprint: %s</span></td>' % (html_escape(changed_by), fingerprint)
res += ('<td valign="top">%s</td>' %
''.join(map(lambda close: '<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s">#%s</a><br>' % (close, close),closes)))
res += '</tr>\n'
uploader = achanges.get('changed-by')
uploader = re.sub(r'^\s*(\S.*)\s+<.*>',r'\1',uploader)
+ with utils.open_file(changesfn) as f:
+ fingerprint = SignedFile(f.read(), keyrings=get_active_keyring_paths()).fingerprint
if Cnf.has_key("Show-Deferred::LinkPath"):
isnew = 0
suites = get_suites_source_in(achanges['source'])
if os.path.exists(qfn):
os.symlink(qfn,lfn)
os.chmod(qfn, 0o644)
- return (max(delaydays-1,0)*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes','').split(),achanges, delaydays)
+ return (max(delaydays-1,0)*24*60*60+remainingtime, changesname, delay, uploader, achanges.get('closes','').split(), fingerprint, achanges, delaydays)
def list_uploads(filelist, rrd_dir):
uploads = map(get_upload_data, filelist)
print header()
if uploads:
print table_header()
- print ''.join(map(lambda x: table_row(*x[1:5]), uploads)).encode('utf-8')
+ print ''.join(map(lambda x: table_row(*x[1:6]), uploads)).encode('utf-8')
print table_footer()
else:
print '<h1>Currently no deferred uploads to Debian</h1>'
try:
counts = [0]*16
for u in uploads:
- counts[u[6]] += 1
+ counts[u[7]] += 1
print >> f, "Changes-file: %s"%u[1]
fields = """Location: DEFERRED
Delayed-Until: %s
-Delay-Remaining: %s"""%(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()+u[0])),u[2])
+Delay-Remaining: %s
+Fingerprint: %s"""%(time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(time.time()+u[0])),u[2], u[5])
print >> f, fields
- encoded = unicode(u[5]).encode('utf-8')
+ encoded = unicode(u[6]).encode('utf-8')
print >> f, encoded.rstrip()
open(os.path.join(Cnf["Show-Deferred::LinkPath"],u[1]),"w").write(encoded+fields+'\n')
print >> f
################################################################################
Cnf = None
-required_database_schema = 80
+required_database_schema = 82
################################################################################
# Here we prepare an editor and get them ready to prod...
(fd, temp_filename) = utils.temp_filename()
temp_file = os.fdopen(fd, 'w')
- for note in notes:
- temp_file.write(note.comment)
+ temp_file.write("\n\n=====\n\n".join([note.comment for note in notes]))
temp_file.close()
editor = os.environ.get("EDITOR","vi")
answer = 'E'
problems. The release team can force a removal from testing if it is
really needed, please contact them if this should be the case.
-We try to close Bugs which have been reported against this package
-automatically. But please check all old bugs, if they where closed
-correctly or should have been re-assign to another package.
+We try to close bugs which have been reported against this package
+automatically. But please check all old bugs, if they were closed
+correctly or should have been re-assigned to another package.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to __BUG_NUMBER__@__BUG_SERVER__.