Skip to content
Commits on Source (26)
# m h dom mon dow command
MAILTO=cron@ftp-master.debian.org
PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash
configdir=/srv/security-master.debian.org/dak/config/debian-security
0 * * * * $configdir/cronscript hourly
*/10 * * * * $configdir/cronscript unchecked
12 12 * * 0 $configdir/cronscript weekly
35 23 * * * $configdir/cronscript daily
@reboot chmod 666 /srv/security-master.debian.org/lock/deploy
# 0 * * * * /srv/security-master.debian.org/dak/config/debian-security/cron.hourly
# */10 * * * * /srv/security-master.debian.org/dak/config/debian-security/cron.unchecked
# 12 12 * * 0 /srv/security-master.debian.org/dak/config/debian-security/cron.weekly
# 35 23 * * * /srv/security-master.debian.org/dak/config/debian-security/cron.daily
0 0 * * * crontab -l > ~/crontab.out
# queued no longer used as of 2017-11-01
#*/10 * * * * sudo -u dak-unpriv /srv/queued/queued/disembargo/debianqueued 2>/dev/null
#@reboot sudo -u dak-unpriv /srv/queued/queued/disembargo/debianqueued
#*/10 * * * * sudo -u dak-unpriv /srv/queued/queued/embargoed/debianqueued 2>/dev/null
#@reboot sudo -u dak-unpriv /srv/queued/queued/embargoed/debianqueued
##*/10 * * * * sudo -u dak-unpriv /srv/queued/queued/ftpmaster/debianqueued 2>/dev/null
##@reboot sudo -u dak-unpriv /srv/queued/queued/ftpmaster/debianqueued
# FUNC ARGS TIME ERR BG
INCLUDE lock none true false
STATE startup none false false
NOSTAGE state\ startup none false false
LOCK DAILY 3600 exclusive false
RMSTAGE none none false false
NOSTAGE startup none false false
STATE indices none false false
NOSTAGE state\ indices none false false
LOCK UNCHECKED 1200 exclusive false
dominate none dominate true false
mpfm none pkg-file-mapping false false
STATE packages/contents none true false
NOSTAGE state\ packages/contents none false false
packages none apt-ftparchive true false
STATE dists/ none false false
NOSTAGE state\ dists/ none false false
release none release\ files true false
STATE scripts none false false
NOSTAGE state\ scripts none false false
mirror none mirror\ hardlinks true false
STATE postlock none false false
NOSTAGE state\ postlock none false false
mirrorpush none mirrorpush false true
UNLOCK UNCHECKED none false false
UNLOCK DAILY none false false
NOSTAGE state\ all\ done none false false
......@@ -126,8 +126,6 @@ function _runtasks() {
# ATTENTION: Spaces in arguments or timestamp names need to be escaped by \
#
# NOTE 1: There are special values for the first column (FUNC).
# STATE - do not call stage function, call the state
# function to update the public statefile "where is dinstall"
# NOSTAGE - do not call stage function, call the command directly.
# RMSTAGE - clean out the stages directory, and as such
# the recording what already ran in an earlier cronscript.
......@@ -159,9 +157,6 @@ function _runtasks() {
fi
done
case ${FUNC} in
STATE)
state ${ARGS}
;;
NOSTAGE)
${ARGS}
;;
......
......@@ -594,7 +594,7 @@ function state() {
RIGHTNOW="$(date -u +"%a %b %d %T %Z %Y (%s)")"
cat >"${DINSTALLSTATE}" <<EOF
Dinstall start: ${DINSTALLBEGIN}
Current action: ${1}
Current action: $*
Action start: ${RIGHTNOW}
EOF
}
......
# FUNC ARGS TIME ERR BG
INCLUDE lock none true false
STATE startup none false false
NOSTAGE state\ startup none false false
LOCK DAILY 3600 exclusive false
NOSTAGE startup none false false
savetimestamp none none false false
......@@ -16,19 +16,19 @@ punew stable-new p-u-new fal
opunew oldstable-new o-p-u-new false false
backports_policy none backports-policy false false
cruft none cruft true false
STATE indices none false false
NOSTAGE state\ indices none false false
dominate none dominate true false
autocruft none autocruft true false
fingerprints none import-keyring false true
overrides none overrides true false
mpfm none pkg-file-mapping false false
STATE packages/contents none true false
NOSTAGE state\ packages/contents none false false
packages none apt-ftparchive true false
STATE dists/ none false false
NOSTAGE state\ dists/ none false false
pdiff none pdiff true false
release none release\ files true false
dakcleanup none cleanup true false
STATE scripts none false false
NOSTAGE state\ scripts none false false
mkmaintainers none mkmaintainers true false
copyoverrides none copyoverrides true false
mklslar none mklslar true false
......@@ -39,7 +39,7 @@ signotherfiles none signotherfiles tru
mirror none mirror\ hardlinks true false
UNLOCK UNCHECKED none false false
UNLOCK DAILY none false false
STATE postlock none false false
NOSTAGE state\ postlock none false false
ddaccess none ddaccessible\ sync false true
LOCK CHANGELOG 300 exclusive false
changelogs none changelogs false true
......@@ -54,4 +54,4 @@ stats none stats fal
testingsourcelist none none false true
cleantransactions none none false false
postcronscript none none false false
STATE all\ done none false false
NOSTAGE state\ all\ done none false false
......@@ -79,8 +79,8 @@ def main():
m = re_gpg_fingerprint_colon.search(output)
if not m:
print output
utils.fubar("0x%s: (1) No fingerprint found in gpg output but it returned 0?\n%s" \
% (Cnf["Add-User::Options::Key"], utils.prefix_multi_line_string(output, \
utils.fubar("0x%s: (1) No fingerprint found in gpg output but it returned 0?\n%s"
% (Cnf["Add-User::Options::Key"], utils.prefix_multi_line_string(output,
" [GPG output:] ")))
primary_key = m.group(1)
primary_key = primary_key.replace(" ", "")
......@@ -93,7 +93,7 @@ def main():
u = re_user_address.search(output)
if not u:
print output
utils.fubar("0x%s: (2) No userid found in gpg output but it returned 0?\n%s" \
utils.fubar("0x%s: (2) No userid found in gpg output but it returned 0?\n%s"
% (Cnf["Add-User::Options::Key"], utils.prefix_multi_line_string(output, " [GPG output:] ")))
uid = u.group(1)
n = re_user_name.search(output)
......@@ -129,7 +129,7 @@ def main():
f.write(mail + '\n')
f.close()
print "Added:\nUid:\t %s (ID: %s)\nMaint:\t %s\nFP:\t %s" % (uid, uid_id, \
print "Added:\nUid:\t %s (ID: %s)\nMaint:\t %s\nFP:\t %s" % (uid, uid_id,
name, primary_key)
# Should we send mail to the newly added user?
......
......@@ -99,7 +99,7 @@ class BugClassifier(object):
for tags in tagged_bugs.keys():
tagged_bugs_ftp += tagged_bugs[tags]
return [bug for bug in bts.get_status(bts.get_bugs("package", "ftp.debian.org")) \
return [bug for bug in bts.get_status(bts.get_bugs("package", "ftp.debian.org"))
if bug.pending == 'pending' and bug.bug_num not in tagged_bugs_ftp]
def classify_bug(self, bug):
......
......@@ -99,7 +99,7 @@ def britney_changelog(packages, suite, session):
Cnf = utils.get_conf()
try:
q = session.execute("SELECT changelog FROM suite WHERE id = :suiteid", \
q = session.execute("SELECT changelog FROM suite WHERE id = :suiteid",
{'suiteid': suite.suite_id})
brit_file = q.fetchone()[0]
except:
......
......@@ -106,7 +106,7 @@ class InstallerCopier:
def check_architecture(self, arch_dir):
architecture = re.sub('.*?/installer-(.*?)/.*', r'\1', arch_dir)
dest_basedir = os.path.join(self.dest_dir, \
dest_basedir = os.path.join(self.dest_dir,
'installer-%s' % architecture)
dest_dir = os.path.join(dest_basedir, self.version)
if os.path.isdir(dest_dir):
......
......@@ -213,7 +213,7 @@ def main():
if len(match) == 1:
cmdname = match[0]
elif len(match) > 1:
daklib.utils.warn("ambiguous command '%s' - could be %s" \
daklib.utils.warn("ambiguous command '%s' - could be %s"
% (cmdname, ", ".join(match)))
usage(functionality, 1)
else:
......
......@@ -42,17 +42,11 @@ to stdout. Those functions can be used in multithreaded parts of dak.
################################################################################
# suppress some deprecation warnings in squeeze related to md5 module
import warnings
warnings.filterwarnings('ignore', \
"the md5 module is deprecated; use hashlib instead", \
DeprecationWarning)
import errno
import hashlib
import os
import re
import sys
import md5
import apt_pkg
import apt_inst
import shutil
......@@ -392,7 +386,7 @@ def create_depends_string(suite, depends_tree, session=None):
result += " | "
# doesn't do version lookup yet.
component = get_component_by_package_suite(d['name'], suite_list, \
component = get_component_by_package_suite(d['name'], suite_list,
session=session)
if component is not None:
adepends = d['name']
......@@ -526,11 +520,11 @@ def get_copyright(deb_filename):
o = os.popen("dpkg-deb --fsys-tarfile %s | tar xvOf - %s 2>/dev/null" % (deb_filename, cright))
cright = o.read()
copyrightmd5 = md5.md5(cright).hexdigest()
copyrightmd5 = hashlib.md5(cright).hexdigest()
res = ""
if copyrightmd5 in printed.copyrights and printed.copyrights[copyrightmd5] != "%s (%s)" % (package, os.path.basename(deb_filename)):
res += formatted_text("NOTE: Copyright is the same as %s.\n\n" % \
res += formatted_text("NOTE: Copyright is the same as %s.\n\n" %
(printed.copyrights[copyrightmd5]))
else:
printed.copyrights[copyrightmd5] = "%s (%s)" % (package, os.path.basename(deb_filename))
......