diff options
author | Sergey Lapin <slapin@ossfans.org> | 2010-03-22 18:13:56 +0300 |
---|---|---|
committer | Sergey Lapin <slapin@ossfans.org> | 2010-03-22 18:13:56 +0300 |
commit | 3937c88166a493900a694ea8fe53b860f4099d83 (patch) | |
tree | 57597245b6efd4cf27c1f4c9ff21c0515e530c15 /contrib | |
parent | df2ace6d59e22b42e50bcf4e8a9c92b580602c2e (diff) | |
parent | 3510d2ed15a4b477aa7af802a839e11a87b981ed (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/angstrom/omap3-mkcard.sh | 4 | ||||
-rwxr-xr-x | contrib/angstrom/sort.sh | 10 | ||||
-rw-r--r-- | contrib/feed-browser/includes/config.inc | 8 | ||||
-rw-r--r-- | contrib/hrw/check-kernel-updates.sh | 9 | ||||
-rw-r--r-- | contrib/oeaudit/freebsd.py | 194 | ||||
-rw-r--r-- | contrib/oeaudit/oe.py | 28 | ||||
-rwxr-xr-x | contrib/oeaudit/oe_audit.py | 96 | ||||
-rwxr-xr-x | contrib/weekly-changelog-report.py | 15 | ||||
-rwxr-xr-x | contrib/weekly-changelog-report.sh | 21 |
9 files changed, 376 insertions, 9 deletions
diff --git a/contrib/angstrom/omap3-mkcard.sh b/contrib/angstrom/omap3-mkcard.sh index dc4359c38c..d8b5b4373d 100755 --- a/contrib/angstrom/omap3-mkcard.sh +++ b/contrib/angstrom/omap3-mkcard.sh @@ -6,7 +6,7 @@ # Parts of the procudure base on the work of Denys Dmytriyenko # http://wiki.omap.com/index.php/MMC_Boot_Format -LC_ALL=C +export LC_ALL=C if [ $# -ne 1 ]; then echo "Usage: $0 <drive>" @@ -17,7 +17,7 @@ DRIVE=$1 dd if=/dev/zero of=$DRIVE bs=1024 count=1024 -SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'` +SIZE=`fdisk -l $DRIVE | grep Disk | grep bytes | awk '{print $5}'` echo DISK SIZE - $SIZE bytes diff --git a/contrib/angstrom/sort.sh b/contrib/angstrom/sort.sh index dcbb22408c..5522d44800 100755 --- a/contrib/angstrom/sort.sh +++ b/contrib/angstrom/sort.sh @@ -48,17 +48,17 @@ case "$arch" in "armv4t") machines="micro2440 mini2440 ep93xx h6300 om-gta01 om-gta02 fic-gta01 fic-gta02" ;; "armv5te") - machines="hawkboard da850-omapl138-evm da830-omapl137-evm htcalpine dm6446-evm dm6467-evm dm6467t-evm dm355-evm dm365-evm dm357-evm topas910 sheevaplug openrd-client openrd-base dm355-leopard n2100 dns323 mv2120 kuropro lspro tsx09 ts409 davinci-dvevm davinci-sffsdr neuros-osd neuros-osd2 gumstix-connex gumstix-verdex gumstix e680 a780 a1200 at91sam9263ek rokre6 rokre2 rokr-e2 akita c7x0 h2200 h3900 h4000 h5000 htcapache htctornado htcblueangel htcuniversal hx4700 nslu2le hx2000 ixp4xxle magician netbook-pro nokia770 palmt650 palmt680 palmld palmtx palmtt3 palmz72 qemuarm omap5912osk poodle spitz tosa mx27ads at91sam9g20ek mainstone" ;; + machines="hawkboard da850-omapl138-evm da830-omapl137-evm htcalpine dm6446-evm dm6467-evm dm6467t-evm dm355-evm dm365-evm dm357-evm topas910 sheevaplug openrd-client openrd-base dm355-leopard n2100 dns323 mv2120 kuropro lspro tsx09 ts409 davinci-dvevm davinci-sffsdr neuros-osd neuros-osd2 gumstix-connex gumstix-verdex gumstix e680 a780 a1200 at91sam9263ek rokre6 rokre2 rokr-e2 akita c7x0 h2200 h3900 h4000 h5000 htcapache htctornado htcblueangel htcuniversal hx4700 nslu2le hx2000 ixp4xxle magician netbook-pro nokia770 palmt650 palmt680 palmld palmtx palmtt3 palmz72 qemuarm omap5912osk poodle spitz tosa mx27ads at91sam9g20ek mainstone hipox" ;; "armv5teb") machines="ixp4xxbe nslu2be" ;; "armv6-novfp") machines="htcdiamond htckaiser htcpolaris htcraphael htcvogue" ;; "armv6") - machines="smartq5 bug mx31ads nokia800 " ;; + machines="smdk6410 smartq5 bug mx31ads nokia800 " ;; "armv7") machines="" ;; "armv7a") - machines="archos5 palmpre cm-t35 igep0020 omap3-touchbook beagleboard omap3evm am3517-evm omap3517-evm omap3-pandora omapzoom omapzoom2 overo" ;; + machines="archos5 archos5it palmpre cm-t35 igep0020 omap3-touchbook beagleboard omap3evm am3517-evm omap3517-evm omap3-pandora omapzoom omapzoom2 omapzoom36x overo" ;; "avr32") machines="atngw100 at32stk1000" ;; "bfin") @@ -69,9 +69,9 @@ case "$arch" in "i486") machines="x86" ;; "i586") - machines="epia qemux86" ;; + machines="epia" ;; "i686") - machines="eee701 guinness progear" ;; + machines="eee701 qemux86 guinness progear" ;; "iwmmxt") machines="" ;; "ppc405") diff --git a/contrib/feed-browser/includes/config.inc b/contrib/feed-browser/includes/config.inc index 2bc34f7d63..341ba87c36 100644 --- a/contrib/feed-browser/includes/config.inc +++ b/contrib/feed-browser/includes/config.inc @@ -155,6 +155,14 @@ $feeds = array( 'url'=>'ppc603e/gstreamer', ), + array( + 'name'=>'Beagleboard machine feed', + 'url'=>'armv7a/machine/beagleboard', + ), + array( + 'name'=>'Hawkoard machine feed', + 'url'=>'armv5te/machine/hawkboard', + ), array( 'name'=>'Motorola A780', 'url'=>'armv5te/machine/a780', diff --git a/contrib/hrw/check-kernel-updates.sh b/contrib/hrw/check-kernel-updates.sh new file mode 100644 index 0000000000..7758baf69d --- /dev/null +++ b/contrib/hrw/check-kernel-updates.sh @@ -0,0 +1,9 @@ + +echo "fetching list of changelogs" +echo "ls ChangeLog-*" |lftp ftp://www.kernel.org/pub/linux/kernel/v2.6/> changes.txt + +for release in `seq 16 32`; +do + LATEST=`grep ChangeLog-2.6.$release changes.txt | sed -e "s/^.*ChangeLog-2.6.$release.//g"| sort -n -r|head -n1` + echo "latest patch: 2.6.$release.$LATEST" +done diff --git a/contrib/oeaudit/freebsd.py b/contrib/oeaudit/freebsd.py new file mode 100644 index 0000000000..5765e8a726 --- /dev/null +++ b/contrib/oeaudit/freebsd.py @@ -0,0 +1,194 @@ +""" +Handle FreeBSD port audit files and map the names to OpenEmbedded +""" + +class freebsd_info: + """ + Handles an entry like the one below: + vulnerability-test-port>=2000<2010.02.26|http://cvsweb.freebsd.org/ports/security/vulnerability-test-port/|Not vulnerable, just a test port (database: 2010-02-26) + """ + def __init__(self, name, versions, link, kind): + self.name = name + self.versions = versions + self.link = link + + @classmethod + def split_versions(self, input): + """ + Split versions by <, >, >=, >= + """ + versions = [] + last_pos = 0 + + # Try to determine <, >, >=, <= + # we will have to carry stuff on to find the + # version.. + i = 0 + while i < len(input) - 1: + c1 = input[i] + c2 = input[i+1] + if c1 != '<' and c1 != '>' and c1 != '=': + i = i + 1 + continue + + # is a '=' coming behind it? + next = i + 1 + if c2 == '=': + next = next + 1 + + # submit + if last_pos != 0: + versions.append((next_type, input[last_pos:i])) + + # remember stuff + next_type = input[i:next] + last_pos = next + i = next + + assert last_pos != 0 + versions.append((next_type, input[last_pos:len(input)])) + return versions + + def __repr__(self): + return "%s: %s" % (self.name, self.versions) + + +def map_names(str): + """Map a FreeBSD name to OE""" + maps = { + "libpurple" : "pidgin", + "php4" : "php", + "php5" : "php", + "expat2" : "expat", + "freeciv-gtk" : "freeciv", + "pcre" : "libpcre", + "vim-gnome" : "vim", + "python23" : "python", + "python24" : "python", + "python25" : "python", + "python+ipv6" : "python", + "wget-devel" : "wget", + "xchat2" : "xchat", + "freetype" : "freetype", + "qemu-devel" : "qemu", + "krb5-beta" : "krb5", + "freeciv-gtk2": "freeciv", + "gtk" : "gtk+", + "wget+ipv6" : "wget", + "ja-gd" : "gd", + "openvpn-devel" : "openvpn", + "mpeg123-esound" : "mpeg123", + "mpeg123-nas" : "mpeg123", + "cdrtools-cjk" : "cdrtools", + "apache+mod_ssl+mod_deflate" : "apache2", + "apache+mod_ssl*" : "apache2", + "vim-gtk2" : "vim", + "zh-emacs" : "emacs", + "{ja-,}bugzilla" : "bugzilla", + "zh-tin" : "tin", + "mozilla+ipv6": "mozilla", + "mozilla-embeddded" : "mozilla", + "rar" : "unrar", + "libsndfile" : "libsndfile1", + "sylpheed-gtk2": "sylpheed", + "cdrtools-devel": "cdrtools", + "pine4-ssl": "pine", + "apache" : "apache2", + "ghostscript-gpl" : "gs", + "ghostscript-gnu-nox11" : "gs", + "ghostscript8" : "gs", + "ghostscript-afpl-nox11" : "gs", + "ghostscript-afpl" : "gs", + "isc-dhcp" : "dhcp", + "mplayer-gtk" : "mplayer", + "xerces-c2" : "xerces-c", + "libxml" : "libxml2", + "vim+ruby" : "vim", + "mplayer{,-gtk}{,-esound}" : "mplayer", + "proftpd-devel": "proftpd", + "neon28" : "neon", + "php4-dba" : "php", + "php5-{cgi,cli}" : "php", + + } + + try: + return maps[str] + except: + return str + +def is_not_in_oe(name): + """Method to reject packages not in OE""" + not_in = [ + # packages that we will never have... + "linux-firefox", "fr-linux-netscape", "linux-netscape-{communicator,navigator}", + "linux_base", "ja-netscape7", "{ja,ko}-netscape-{communicator,navigator}-linux", "zhTW-linux-mozillafirebird", "ja-linux-mozillafirebird-gtk1", "el-linux-mozillafirebird", "mozilla-firebird", "netscape7", + "acroread4", "acroread7", "acroread5", + "linux-openmotif", "linux-flock", "linux-jdk", "linux-curl", "linux-png", "linux-firefox-devel", + + # packages that we don't have now but maybe will have in + # the future and blacklisting them here might be a problem + "openoffice.org-2-devel", "openoffice.org-2", "it-openoffice", "ca-openoffice","sl-openoffice-SI", "ja-openoffice", + "drupal4", "drupal5", "drupal6", "drupal-pubcookie", + "gpdf", + "nagios", + "kdenetwork", "ja-kdelibs", "kdegraphics", "kdepim", "kdebase4-runtime", + "xemacs-devel", "xemacs-devel-21.5", "xemacs-mule", "zh-xemacs", "zh-xemacs-mule", + "geeklog", "apach13-ssl", "nvidia-driver", "eGroupWare", "varnish", "heimdal", + "bugzilla", "agenda-snow-libs", "mozilla", + ] + + return name in not_in + +def create_infos(line): + split = line.split("|") + for i in range(0, len(split[0])): + c = split[0][i] + if c != '<' and c != '=' and c != '>': + continue + name = map_names(split[0][0:i]) + versions = freebsd_info.split_versions(split[0][i:]) + break + + if is_not_in_oe(name): + #print "Not in oe %s" % name + return [] + + link = split[1] + kind = split[2] + return [freebsd_info(name, versions, link, kind)] + + +def read_auditfile(filename): + """ + Read an uncompressed audit file from freebsd + """ + f = open(filename) + packages = {} + for line in f: + if line.startswith("#"): + continue + + infos = create_infos(line) + for info in infos: + try: + packages[info.name].append(info) + except: + packages[info.name] = [] + packages[info.name].append(info) + return packages + + +def prepare_version(bsd_version): + """ + FreeBSD is adding ,1 for revisions.. remove that + """ + # FIXME return a tuple with a revision... + rev = "r0" + split = bsd_version.rsplit(',', 1) + split = split[0] + split = split.rsplit('_', 1) + if len(split) == 2: + rev = "r%s" % split[1] + return (split[0], rev) + diff --git a/contrib/oeaudit/oe.py b/contrib/oeaudit/oe.py new file mode 100644 index 0000000000..f3326a5338 --- /dev/null +++ b/contrib/oeaudit/oe.py @@ -0,0 +1,28 @@ +def read_available(filename): + """ + Parses the output of bitbake -s + minus the first few lines + """ + f = open(filename) + packages = {} + + for line in f: + if line.startswith("NOTE: ") or line.startswith("Parsing .bb") or line.startswith("done."): + continue + + # str.split can not be used as we have multiple whitespace + split = line.split(" ", 1) + package = split[0] + rest = split[1].strip() + + # we might have a latest package... + split = rest.split(" ", 1) + if len(split) == 2: + version = split[1].strip() + else: + version = split[0] + + packages[package] = version + return packages + + diff --git a/contrib/oeaudit/oe_audit.py b/contrib/oeaudit/oe_audit.py new file mode 100755 index 0000000000..018547a04e --- /dev/null +++ b/contrib/oeaudit/oe_audit.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python + +import freebsd, oe + +try: + import bb +except Exception, e: + import sys + sys.stderr.write("Set PYTHONPATH to bitbake/lib and restart.\n") + sys.stderr.write("The backtrace can be seen below.\n") + raise e + + +def strip_oe_version(oe_version): + """ + We need to strip the package epoch... and the PR to compare + it to the FreeBSD versions. Also FreeBSD seems to use _N as + PR so we might need to do more.. + """ + split = oe_version.split(':', 1) + ver = split[1] + + split = ver.rsplit('-r', 1) + ver = split[0] + return ver + +def compare_versions(oe, freebsd_dict, not_known): + def handle_package(oe_name, bsd_name): + if not oe_name in oe: + if oe_name == bsd_name: + print >> not_known, "%s is not in OE" % oe_name + return + + oe_version = strip_oe_version(oe[oe_name]) + for ver in freebsd_dict[bsd_name]: + affected = True + str = [] + for (cmp, vers) in ver.versions: + (bsd_ver, bsd_pr) = freebsd.prepare_version(vers) + cmp_res = bb.utils.vercmp(('0', oe_version, 'r0'), ('0', bsd_ver, bsd_pr)) + if cmp == '<': + if cmp_res >= 0: + affected = False + pass + elif cmp == '<=': + if cmp_res > 0: + affected = False + pass + elif cmp == '>': + if cmp_res <= 0: + affected = False + pass + elif cmp == '>=': + if cmp_res < 0: + affected = False + pass + elif cmp == '=': + if cmp_res > 0: + affected = False + else: + print cmp + assert True + + str.append("%s %s %s %s" % (oe_name, oe_version, cmp, bsd_ver)) + if affected: + print " && ".join(str), ver.link + + for package in freebsd_dict.keys(): + # handle the various versions of OE packages + handle_package(package, package) + handle_package("%s-native" % package, package) + handle_package("%s-full-native" % package, package) + handle_package("%s-sdk" % package, package) + +def handle_options(args): + import optparse + parser = optparse.OptionParser(version = "OE Audit version 0.1", + usage = "%prog [options]") + parser.add_option("-a", "--auditfile", help = "FreeBSD auditfile to use", + action = "store", dest = "freebsd_auditfile", default = None) + parser.add_option("-p", "--available", help = "Output of bitbake -s", + action = "store", dest = "oe_available", default = None) + parser.add_option("-b", "--buggy", help = "Write out unmaped packets", + action = "store", dest = "buggy", default = "not_in_oe.bugs") + + options, args = parser.parse_args(args) + return options + +# read the input data +import sys +opts = handle_options(sys.argv) +oe_packages = oe.read_available(opts.oe_available) +freebsd_vuln = freebsd.read_auditfile(opts.freebsd_auditfile) +buggy = open(opts.buggy, "w+") + +compare_versions(oe=oe_packages, freebsd_dict=freebsd_vuln, not_known=buggy) diff --git a/contrib/weekly-changelog-report.py b/contrib/weekly-changelog-report.py index 902089bdad..e52a70e52c 100755 --- a/contrib/weekly-changelog-report.py +++ b/contrib/weekly-changelog-report.py @@ -10,6 +10,8 @@ import datetime import os +import sys +import string today = datetime.date.today() @@ -21,14 +23,23 @@ end_day = today - datetime.timedelta(today_weekday) start_day = end_day - datetime.timedelta(7) -print "OE weekly changelog %s to %s\n" % (start_day.isoformat(), end_day.isoformat()) +if (len(sys.argv) <= 1): + branch = "origin/org.openembedded.dev" +else: + branch = sys.argv[1] -os.system("git shortlog --since=%s --until=%s | grep -v 'Merge branch' | grep -v 'Merge commit'|sed -e 's/^ //g'|cut -b -78 " % (start_day.isoformat(), end_day.isoformat())) +branch_pretty = string.replace(branch, "origin/", "") + +print "OE weekly changelog for %s, %s to %s\n" % (branch_pretty, start_day.isoformat(), end_day.isoformat()) +os.system("git shortlog --since=%s --until=%s %s | grep -v 'Merge branch' | grep -v 'Merge commit'|sed -e 's/^ //g'|cut -b -78 " % (start_day.isoformat(), end_day.isoformat(), branch)) + +sys.exit(0) os.system("wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&bugidtype=include&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&known_name=1WFixed&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED&value0-0-0=&ctype=csv' -O resolved-bugs.csv >& /dev/null") os.system("wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bugidtype=include&chfield=%5BBug%20creation%5D&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=NEW&value0-0-0=&ctype=csv' -O new-bugs.csv &> /dev/null") +print "=====================================================" print "Bugs fixed:\n" os.system("cat resolved-bugs.csv | awk -F, '{print $1 \" \" $7 \"\t \" $8}' | sed s:\\\"::g") diff --git a/contrib/weekly-changelog-report.sh b/contrib/weekly-changelog-report.sh new file mode 100755 index 0000000000..3bdafcdc17 --- /dev/null +++ b/contrib/weekly-changelog-report.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +echo "=====================================================" +./contrib/weekly-changelog-report.py +echo +echo "=====================================================" +./contrib/weekly-changelog-report.py origin/holger/staging-branch +echo + +wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&bugidtype=include&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&known_name=1WFixed&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=RESOLVED%2CVERIFIED%2CCLOSED&value0-0-0=&ctype=csv' -O resolved-bugs.csv >& /dev/null + +wget 'http://bugs.openembedded.net/buglist.cgi?bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bugidtype=include&chfield=%5BBug%20creation%5D&chfieldfrom=7d&chfieldto=Now&chfieldvalue=&email1=&email2=&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=bug_status&field0-0-0=noop&long_desc=&long_desc_type=substring&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&type-1-0-0=anyexact&type0-0-0=noop&value-1-0-0=NEW&value0-0-0=&ctype=csv' -O new-bugs.csv &> /dev/null + +echo "=====================================================" +echo "Bugs fixed:" +cat resolved-bugs.csv | awk -F, '{print $1 " " $7 "\t " $8}' | sed s:\\\"::g + +echo +echo "Bugs opened:" +cat new-bugs.csv | awk -F, '{print $1 " " $7 "\t " $8}' | sed s:\\\"::g + |