diff options
author | Kees Cook <kees@outflux.net> | 2007-08-31 18:13:25 +0000 |
---|---|---|
committer | Kees Cook <kees@outflux.net> | 2007-08-31 18:13:25 +0000 |
commit | fd60784ec413a506af8e2721d3cf265582c58d01 (patch) | |
tree | f585093c5a8d9e35612a22a61d5b3fe778b446c4 /scripts | |
parent | 39588f474d96b694056e8bedf2b93b8b3d4c8e27 (diff) |
new scripts to help with ubuntu kernel releases
git-svn-id: svn+ssh://svn.debian.org/svn/kernel-sec@937 e094ebfe-e918-0410-adfb-c712417f3574
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ubuntu-release | 7 | ||||
-rwxr-xr-x | scripts/ubuntu-usn-desc | 25 |
2 files changed, 32 insertions, 0 deletions
diff --git a/scripts/ubuntu-release b/scripts/ubuntu-release new file mode 100644 index 00000000..cf436685 --- /dev/null +++ b/scripts/ubuntu-release @@ -0,0 +1,7 @@ +#!/bin/bash +echo 'This is just a place holder for future scripts. View source for examples.' +exit 1 + +# Examples: +#../scripts/ubuntu-usn-desc $(egrep '^2.6.20-feisty-security: pending' CVE* | cut -d: -f1) +#perl -pi -e 's/^2.6.20-feisty-security: pending \(2\.6\.20-16\.30\)/2.6.20-feisty-security: released (2.6.20-16.31)/' CVE* diff --git a/scripts/ubuntu-usn-desc b/scripts/ubuntu-usn-desc new file mode 100755 index 00000000..9894a9e8 --- /dev/null +++ b/scripts/ubuntu-usn-desc @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# Dumps the Ubuntu-Descriptions in a form suitable for a USN announcement +import sys, deb822 + +def wrap(text, width): + """ + A word-wrap function that preserves existing line breaks + and most spaces in the text. Expects that existing line + breaks are posix newlines (\n). + """ + return reduce(lambda line, word, width=width: '%s%s%s' % + (line, + ' \n'[(len(line)-line.rfind('\n')-1 + + len(word.split('\n',1)[0] + ) >= width)], + word), + text.split(' ') + ) + +for cve in sys.argv[1:]: + desc = deb822.deb822(file(cve))['Ubuntu-Description'].strip() + if len(sys.argv[1:])!=1: + desc += " (%s)"%cve + print + print wrap(desc,75) |