diff options
author | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-01-31 21:24:36 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2008-01-31 21:24:36 +0000 |
commit | b20edcd38445574cbdd667d5e82fb59572e4cab2 (patch) | |
tree | 5a52d1265144694e035f2087d0495c83b69f5c9a /contrib | |
parent | 64529f883fb70f97a28cb8fe082fb7b357d509d9 (diff) | |
parent | d8918d114e1286ff97435a543b65d270e79a0f92 (diff) |
merge of '4ea5971c2dd26e9c357b906128f0e339d80e3d50'
and 'e651c4fa9a5d1fc6120cc2309e9cba1388cecc52'
Diffstat (limited to 'contrib')
23 files changed, 1125 insertions, 616 deletions
diff --git a/contrib/angstrom/build-feeds.sh b/contrib/angstrom/build-feeds.sh new file mode 100755 index 0000000000..c5d343205f --- /dev/null +++ b/contrib/angstrom/build-feeds.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +DO_UCLIBC=1 + +do_build() { + echo "MACHINE = \"$BUILD_MACHINE\"" > conf/auto.conf + + BUILD_MODE="glibc" + if [ "$BUILD_CLEAN" != "" ] + then + bitbake -c clean $BUILD_CLEAN + fi + + for target in $BUILD_TARGETS + do + bitbake $target && do_report_success + done + + if [ $DO_UCLIBC = 1 ] + then + BUILD_MODE="uclibc" + echo 'ANGSTROM_MODE = "uclibc"' >> conf/auto.conf + + if [ "$BUILD_CLEAN" != "" ] + then + bitbake -c clean $BUILD_CLEAN + fi + + for target in $BUILD_TARGETS + do + bitbake $target && do_report_success + done + fi +} + +do_report_success() { + + echo "$(date -u +%s) $target $BUILD_MODE $machine" >> autobuilder-feed.log +} + +for machine in ep93xx gumstix-connex gumstix-verdex efika dht-walnut omap5912osk ixp4xxle ixp4xxbe c7x0 poodle tosa akita spitz collie simpad fic-gta01 a780 at91sam9263ek qemuarm h2200 h3900 h4000 hx4700 +do + BUILD_MACHINE=$machine + BUILD_CLEAN="libtool-cross qmake-native qmake2-native" + BUILD_TARGETS="texinfo flex bison gperf gcc binutils make automake autoconf m4 pkgconfig distcc \ + usbutils pciutils mtd-utils usbview hal \ + task-proper-tools mc screen findutils \ + mono perl python ruby \ + gtk+ qt-x11-free qt4-x11-free \ + gpe-mini-browser midori minimo openmoko-browser2 webkit-gtklauncher \ + samba meta-nas-server \ + apache2 boa cherokee lighttpd thttpd \ + gpe-gallery gpe-scap notecase \ + pidgin irssi \ + roadmap-gtk2 gpsdrive navit \ + xmms mplayer quasar vlc-gpe gnome-mplayer \ + wpa-gui wifi-radar kismet aircrack-ng dsniff \ + nmap iptables iperf \ + gpe-login ipaq-sleep \ + gpe-bluetooth bluez-gnome python-pybluez \ + abiword gnumeric evince epdfview gimp \ + scummvm \ + flite \ + ctorrent \ + asterisk \ + gnuradio gnuplot mpfr gmp fftw fftwf fftwl \ + gphoto2 gqview imagemagick ufraw \ + tzdata \ + xserver-kdrive xserver-xorg \ + xf86-video-fbdev xf86-video-ati xf86-video-vesa \ + xf86-input-evdev xf86-input-keyboard xf86-input-mouse \ + task-opie \ + task-openmoko-base task-openmoko-debug task-openmoko-examples task-openmoko-feed task-openmoko-games task-openmoko-linux task-openmoko-native-sdk task-openmoko-net task-openmoko-phone task-openmoko-pim task-openmoko-ui \ + " + do_build +done + diff --git a/contrib/angstrom/build-release.sh b/contrib/angstrom/build-release.sh index efaaecf110..2f882450c8 100755 --- a/contrib/angstrom/build-release.sh +++ b/contrib/angstrom/build-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -DO_UCLIBC=0 +DO_UCLIBC=1 do_build() { echo "MACHINE = \"$BUILD_MACHINE\"" > conf/auto.conf @@ -20,6 +20,12 @@ do_build() { then BUILD_MODE="uclibc" echo 'ANGSTROM_MODE = "uclibc"' >> conf/auto.conf + + if [ "$BUILD_CLEAN" != "" ] + then + bitbake -c clean $BUILD_CLEAN + fi + for target in $BUILD_TARGETS do bitbake $target && do_report_success @@ -32,43 +38,57 @@ do_report_success() { echo "$(date -u +%s) $target $BUILD_MODE $machine" >> autobuilder.log } +#cross toolchain +#for machine in ep93xx a780 efika collie ixp4xxbe +#do +# BUILD_MACHINE=$machine +# BUILD_TARGETS="meta-toolchain" +# BUILD_CLEAN="meta-toolchain" +# do_build +#done + + # No graphics -for machine in ep93xx gumstix-connex gumstix-verdex efika omap5912osk +for machine in ep93xx gumstix-connex gumstix-verdex efika dht-walnut omap5912osk do BUILD_MACHINE=$machine - BUILD_TARGETS="minimal-image console-image" + BUILD_CLEAN="libtool-cross base-files" + BUILD_TARGETS="base-image console-image" do_build done for machine in ixp4xxle ixp4xxbe do + BUILD_CLEAN="base-files" BUILD_MACHINE=$machine - BUILD_TARGETS="nslu2-minimal-image" + BUILD_TARGETS="base-image nslu2-base-image nas-server-image" do_build done # build altboot images for zaurus for machine in c7x0 poodle tosa akita spitz collie do + BUILD_CLEAN="base-files" BUILD_MACHINE=$machine BUILD_TARGETS="altboot-console-image" do_build done # graphics, flash storage -for machine in fic-gta01 a780 at91sam9263ek qemuarm h2200 h4000 poodle tosa hx4700 c7x0 spitz akita collie +for machine in fic-gta01 a780 at91sam9263ek qemuarm h2200 h3900 h4000 h5000 poodle tosa hx4700 c7x0 spitz akita collie simpad do + BUILD_CLEAN="base-files" BUILD_MACHINE=$machine - BUILD_TARGETS="minimal-image console-image x11-image" + BUILD_TARGETS="base-image console-image minimal-gpe-image x11-image" do_build done # graphics, disk storage for machine in spitz do + BUILD_CLEAN="base-files" BUILD_MACHINE=$machine BUILD_TARGETS="x11-gpe-image x11-pimlico-image x11-office-image" - BUILD_CLEAN="qmake2-native" do_build done @@ -76,16 +96,15 @@ done for machine in fic-gta01 a780 do BUILD_MACHINE=$machine - BUILD_TARGETS="openmoko-image" - BUILD_CLEAN="qmake2-native" + BUILD_TARGETS="minimal-openmoko-image openmoko-image" do_build done -#native toolchain -for machine in ep93xx a780 efika collie ixp4xxbe -do - BUILD_MACHINE=$machine - BUILD_TARGETS="gcc binutils pkgconfig make automake autoconf libtool m4 perl python gdb strace screen" - do_build -done +# populate feeds +#for machine in ep93xx a780 efika collie ixp4xxbe +#do +# BUILD_MACHINE=$machine +# BUILD_TARGETS="meta-angstrom-2007" +# do_build +#done diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/.mtn2git_empty b/contrib/deploy/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/.mtn2git_empty +++ b/contrib/deploy/.mtn2git_empty diff --git a/contrib/deploy/README b/contrib/deploy/README new file mode 100644 index 0000000000..a285a7f75a --- /dev/null +++ b/contrib/deploy/README @@ -0,0 +1,2 @@ +This directory contains script for deploying OE-generated images for various +devices and boot methods. diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/.mtn2git_empty b/contrib/deploy/nfs/.mtn2git_empty index e69de29bb2..e69de29bb2 100644 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/.mtn2git_empty +++ b/contrib/deploy/nfs/.mtn2git_empty diff --git a/contrib/deploy/nfs/exports.sample b/contrib/deploy/nfs/exports.sample new file mode 100644 index 0000000000..6d82f49202 --- /dev/null +++ b/contrib/deploy/nfs/exports.sample @@ -0,0 +1,2 @@ +# /etc/exports: NFS file systems being exported. See exports(5). +/srv/nfs/oe 192.168.0.0/16(rw,insecure,no_root_squash) diff --git a/contrib/deploy/nfs/oe-nfs-deploy-image b/contrib/deploy/nfs/oe-nfs-deploy-image new file mode 100755 index 0000000000..ee540696d7 --- /dev/null +++ b/contrib/deploy/nfs/oe-nfs-deploy-image @@ -0,0 +1,51 @@ +#!/bin/sh + +# Wonder what the heck is /srv ? Read Filesystem Hierarchy Standard, +# http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM +# So, /srv/nfs is root of all NFS exports your system offers, and /srv/nfs/oe is +# OpenEmbedded's subset (think security). +NFS_ROOT=/srv/nfs/oe + +if [ -z "$1" ]; then + echo "$0 - Deploy OpenEmbedded-generated image for device NFS boot" + echo "Usage: $0 <image> | -l" + exit +fi + +if [ "$1" == "-l" ]; then + if [ -n "$2" ]; then + extra="-name *$2*" + fi + find tmp/deploy/ -regextype posix-extended -wholename '*/images/*' -regex '.+\.(tar\.bz2|tar\.gz|cpio\.gz)$' $extra | xargs ls -l + exit +fi + +if [ ! -f $1 ]; then + echo "Cannot find image $1" + exit +fi + +ext=`echo $1 | sed -r -e 's/.+\.([^.]+\.[^.]+)/\1/'` +basename=`basename $1 .$ext` + +if [ -z "$basename" ]; then + echo "Assertion failed" + exit 100 +fi + +echo "Deploying to: $NFS_ROOT/$basename" + +rm -rf $NFS_ROOT/$basename + +mkdir -p $NFS_ROOT/$basename + +if [ "$ext" == "tar.bz2" ]; then + tar -xj -f $1 -C $NFS_ROOT/$basename +elif [ "$ext" == "tar.gz" ]; then + tar -xz -f $1 -C $NFS_ROOT/$basename +else + FPATH=`pwd` + cd $NFS_ROOT/$basename + bash -c "gzip -d -c $FPATH/$1 | cpio -i --no-absolute-filenames" + cd $FPATH +fi diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/changelog b/contrib/distro-packages/debian/openembedded-essential-1.2/debian/changelog deleted file mode 100644 index c0eb3d660c..0000000000 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/changelog +++ /dev/null @@ -1,19 +0,0 @@ -openembedded-essential (1.2) unstable; urgency=low - - * fixed packaging to make lintian happy - * switched to native numbering - - -- Marcin Juszkiewicz <hrw@openembedded.org> Wed, 8 Nov 2006 11:17:42 +0100 - -openembedded-essential (1.1) unstable; urgency=low - - * added gawk - - -- Marcin Juszkiewicz <hrw@openembedded.org> Wed, 8 Nov 2006 11:17:42 +0100 - -openembedded-essential (1.0-1) unstable; urgency=low - - * Initial release - - -- Marcin Juszkiewicz <hrw@openembedded.org> Tue, 17 Oct 2006 12:05:35 +0200 - diff --git a/contrib/distro-packages/debian/openembedded-essential-1.4/.mtn2git_empty b/contrib/distro-packages/debian/openembedded-essential-1.4/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/.mtn2git_empty diff --git a/contrib/distro-packages/debian/openembedded-essential-1.4/debian/.mtn2git_empty b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/.mtn2git_empty diff --git a/contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog new file mode 100644 index 0000000000..8485f3e720 --- /dev/null +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog @@ -0,0 +1,34 @@ +openembedded-essential (1.4) unstable; urgency=low + + * remove gfortran from dependency after a5c7b007eaa675cc904f5285291d2f8a597efc84 caused controversy. + Ultimately it was decided that OE should not depend on gfortran and that another solution ought + to be found. The gfortran check in sanity.bbclass was dropped in 63c7ad87655c2781ad8b9c81af430596f48a24a6 + * add bc and python-pysqlite2 for rpm + + -- Rolf Leggewie <oe-devel@rolf.leggewie.biz> Mon, 19 Jan 2008 14:25:00 +0100 + +openembedded-essential (1.3) unstable; urgency=low + + * add gfortran as dependency to complement a5c7b007eaa675cc904f5285291d2f8a597efc84 + + -- Rolf Leggewie <oe-devel@rolf.leggewie.biz> Mon, 7 Jan 2008 20:25:00 +0100 + +openembedded-essential (1.2) unstable; urgency=low + + * fixed packaging to make lintian happy + * switched to native numbering + + -- Marcin Juszkiewicz <hrw@openembedded.org> Wed, 8 Nov 2006 11:17:42 +0100 + +openembedded-essential (1.1) unstable; urgency=low + + * added gawk + + -- Marcin Juszkiewicz <hrw@openembedded.org> Wed, 8 Nov 2006 11:17:42 +0100 + +openembedded-essential (1.0-1) unstable; urgency=low + + * Initial release + + -- Marcin Juszkiewicz <hrw@openembedded.org> Tue, 17 Oct 2006 12:05:35 +0200 + diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/compat b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/compat index 7ed6ff82de..7ed6ff82de 100644 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/compat +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/compat diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/control b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/control index c7a7e5b9f7..583a13e292 100644 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/control +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: openembedded-essential Architecture: all -Depends: python (>= 2.3), ccache, build-essential, quilt, bison, wget, cvs, subversion, git-core, monotone, coreutils, unzip, texi2html, texinfo, libsdl1.2-dev, docbook-utils, gawk +Depends: python (>= 2.3), ccache, build-essential, quilt, bison, wget, cvs, subversion, git-core, monotone, coreutils, unzip, texi2html, texinfo, libsdl1.2-dev, docbook-utils, gawk, bc, python-pysqlite2 Description: Metapackage to install all needed packages to start using OpenEmbedded OpenEmbedded is a full-featured development environment allowing users to target a wide variety of devices. Supporting multiple build, release paths and diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/copyright b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/copyright index 9e4905f97e..9e4905f97e 100644 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/copyright +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/copyright diff --git a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/rules b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/rules index 586b2ff42f..586b2ff42f 100755 --- a/contrib/distro-packages/debian/openembedded-essential-1.2/debian/rules +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/debian/rules diff --git a/contrib/distro-packages/debian/openembedded-essential-1.4/ubuntu.patch b/contrib/distro-packages/debian/openembedded-essential-1.4/ubuntu.patch new file mode 100644 index 0000000000..80863d59fe --- /dev/null +++ b/contrib/distro-packages/debian/openembedded-essential-1.4/ubuntu.patch @@ -0,0 +1,22 @@ +# +# old_revision [63896b37ec0e055133c2e295f7c89e4677091511] +# +# patch "contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog" +# from [b1e7c5d0ed3dddbab736f23b57df2386b6937e4d] +# to [bb02f8caa6f5eaa903b4d65150392583072c7bea] +# +============================================================ +--- contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog +b1e7c5d0ed3dddbab736f23b57df2386b6937e4d ++++ contrib/distro-packages/debian/openembedded-essential-1.4/debian/changelog +bb02f8caa6f5eaa903b4d65150392583072c7bea +@@ -1,3 +1,9 @@ ++openembedded-essential (1.4ubuntu1) gutsy; urgency=low ++ ++ * prepare ubuntu package ++ ++ -- Rolf Leggewie <oe-devel@rolf.leggewie.biz> Thu, 24 Jan 2008 13:49:26 +0100 ++ + openembedded-essential (1.4) unstable; urgency=low + + * remove gfortran from dependency after a5c7b007eaa675cc904f5285291d2f8a597efc84 caused controversy. diff --git a/contrib/distro-packages/rpm/openembedded-essential-1.1.spec b/contrib/distro-packages/rpm/openembedded-essential-1.4.spec index 2ffa7c413e..f7f47b05d9 100644 --- a/contrib/distro-packages/rpm/openembedded-essential-1.1.spec +++ b/contrib/distro-packages/rpm/openembedded-essential-1.4.spec @@ -1,12 +1,12 @@ Summary: Metapackage to install all needed packages to start using OpenEmbedded Name: openembedded-essential -Version: 1.1 +Version: 1.4 Release: 1 License: MIT Group: Devel BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -Requires: python, ccache, quilt, sed, bison, wget, cvs, subversion, git-core, monotone, coreutils, unzip, texi2html, texinfo, docbook-utils, gawk +Requires: python, ccache, quilt, sed, bison, wget, cvs, subversion, git-core, monotone, coreutils, unzip, texi2html, texinfo, docbook-utils, gawk, bc, python-pysqlite2 %description OpenEmbedded is a full-featured development environment allowing users to @@ -19,6 +19,12 @@ This metapackage depends on all software required by OpenEmbedded. %changelog +* Sun Jan 19 16 2007 Rolf 'Laibsch' Leggewie + +openembedded-essential (1.4) unstable; urgency=low + + * added bc and python-pysqlite2 + * Tue Nov 19 2006 Marcin Juszkiewicz <hrw@openembedded.org> openembedded-essential (1.1-1) unstable; urgency=low diff --git a/contrib/feed-browser/includes/config.inc b/contrib/feed-browser/includes/config.inc index c4a9fc0fc3..c2414b8013 100644 --- a/contrib/feed-browser/includes/config.inc +++ b/contrib/feed-browser/includes/config.inc @@ -1,301 +1,746 @@ <?php -define('DB_FILENAME', './feeds.db'); +define('DB_FILENAME', '/home/angstrom/website/repo/feeds.db'); +$feed_base_url = "http://www.angstrom-distribution.org/unstable/feed/"; $feeds = array( - array( - 'distro_name'=>'OpenZaurus', - 'distro_version'=>'3.5.4', - 'feed_base_url'=>'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4/feed/', - 'feeds'=>array( + array( + 'distro_name'=>'Ångström', + 'distro_version'=>'unstable', + 'feed_base_url'=>'http://www.angstrom-distribution.org/unstable/feed/', + 'feeds'=> array( - 'name'=>'base', - 'url'=>'base', - 'type'=>'normal', - ), - array( - 'name'=>'opie', - 'url'=>'opie', - 'type'=>'normal', - ), - array( - 'name'=>'x11', - 'url'=>'x11', - 'type'=>'normal', - ), - array( - 'name'=>'upgrades', - 'url'=>'upgrades', - 'type'=>'upgrades', - ), - array( - 'name'=>'perl', - 'url'=>'perl', - 'type'=>'normal', - ), - array( - 'name'=>'python', - 'url'=>'python', - 'type'=>'normal', - ), - array( - 'name'=>'Collie upgrades', - 'url'=>'upgrades/machine/collie', - 'type'=>'upgrades', - ), - array( - 'name'=>'Tosa upgrades', - 'url'=>'upgrades/machine/tosa', - 'type'=>'upgrades', - ), - array( - 'name'=>'Poodle upgrades', - 'url'=>'upgrades/machine/poodle', - 'type'=>'upgrades', - ), - array( - 'name'=>'Poodle', - 'url'=>'machine/poodle', - 'type'=>'normal', - ), - array( - 'name'=>'Collie', - 'url'=>'machine/collie', - 'type'=>'normal', - ), - array( - 'name'=>'Tosa', - 'url'=>'machine/tosa', - 'type'=>'normal', - ) - ) - ), - array( - 'distro_name'=>'OpenZaurus', - 'distro_version'=>'3.5.4.1', - 'feed_base_url'=>'http://ewi546.ewi.utwente.nl/mirror/www.openzaurus.org/official/unstable/3.5.4.1/feed/', - 'feeds'=>array( - array( - 'name'=>'base', - 'url'=>'base', - 'type'=>'normal', - ), - array( - 'name'=>'opie', - 'url'=>'opie', - 'type'=>'normal', - ), - array( - 'name'=>'perl', - 'url'=>'perl', - 'type'=>'normal', - ), - array( - 'name'=>'python', - 'url'=>'python', - 'type'=>'normal', - ), - array( - 'name'=>'upgrades', - 'url'=>'upgrades', - 'type'=>'upgrades', - ), - array( - 'name'=>'x11', - 'url'=>'x11', - 'type'=>'normal', - ), - array( - 'name'=>'C7x0', - 'url'=>'machine/c7x0', - 'type'=>'normal', - ), - array( - 'name'=>'Spitz', - 'url'=>'machine/spitz', - 'type'=>'normal', - ), - array( - 'name'=>'Akita', - 'url'=>'machine/akita', - 'type'=>'normal', - ), - array( - 'name'=>'Akita upgrades', - 'url'=>'upgrades/machine/akita', - 'type'=>'upgrades', - ), - array( - 'name'=>'C7x0 upgrades', - 'url'=>'upgrades/machine/c7x0', - 'type'=>'upgrades', - ), - array( - 'name'=>'Spitz upgrades', - 'url'=>'upgrades/machine/spitz', - 'type'=>'upgrades', - ) - ) - ) -); + array( + 'name'=>'All architectures', + 'url'=>'all', + ), + array( + 'name'=>'avr32 base', + 'url'=>'avr32/base', + ), + array( + 'name'=>'blackfin base', + 'url'=>'blackfin/base', + ), + + array( + 'name'=>'armv5te base', + 'url'=>'armv5te/base', + ), + array( + 'name'=>'iwmmxt base', + 'url'=>'iwmmxt/base', + ), + array( + 'name'=>'armv5teb base', + 'url'=>'armv5teb/base', + ), + array( + 'name'=>'arm-oabi base', + 'url'=>'arm-oabi/base', + ), + + array( + 'name'=>'i586 base', + 'url'=>'i586/base', + ), + array( + 'name'=>'i686 base', + 'url'=>'i686/base', + ), + + array( + 'name'=>'armv4t base', + 'url'=>'armv4t/base', + ), + array( + 'name'=>'armv6 base', + 'url'=>'armv6/base', + ), + array( + 'name'=>'ppc603e base', + 'url'=>'ppc603e/base', + ), + array( + 'name'=>'ppc405 base', + 'url'=>'ppc405/base', + ), + + array( + 'name'=>'armv5te perl', + 'url'=>'armv5te/perl', + ), + array( + 'name'=>'armv5te python', + 'url'=>'armv5te/python', + ), + array( + 'name'=>'armv5te debug', + 'url'=>'armv5te/debug', + ), + array( + 'name'=>'armv5te gstreamer', + 'url'=>'armv5te/gstreamer', + ), + array( + 'name'=>'avr32 perl', + 'url'=>'avr32/perl', + ), + array( + 'name'=>'avr32 python', + 'url'=>'avr32/python', + ), + array( + 'name'=>'avr32 debug', + 'url'=>'avr32/debug', + ), + array( + 'name'=>'avr32 gstreamer', + 'url'=>'avr32/gstreamer', + ), + + array( + 'name'=>'blackfin perl', + 'url'=>'blackfin/perl', + ), + array( + 'name'=>'blackfin python', + 'url'=>'blackfin/python', + ), + array( + 'name'=>'blackfin debug', + 'url'=>'blackfin/debug', + ), + array( + 'name'=>'blackfin gstreamer', + 'url'=>'blackfin/gstreamer', + ), + array( + 'name'=>'armv4t perl', + 'url'=>'armv4t/perl', + ), + array( + 'name'=>'armv4t python', + 'url'=>'armv4t/python', + ), + array( + 'name'=>'armv4t debug', + 'url'=>'armv4t/debug', + ), + array( + 'name'=>'armv4t gstreamer', + 'url'=>'armv4t/gstreamer', + ), + + array( + 'name'=>'armv6 perl', + 'url'=>'armv6/perl', + ), + array( + 'name'=>'armv6 python', + 'url'=>'armv6/python', + ), + array( + 'name'=>'armv6 debug', + 'url'=>'armv6/debug', + ), + array( + 'name'=>'armv6 gstreamer', + 'url'=>'armv6/gstreamer', + ), + + array( + 'name'=>'i686 perl', + 'url'=>'i686/perl', + ), + array( + 'name'=>'i686 python', + 'url'=>'i686/python', + ), + array( + 'name'=>'i686 debug', + 'url'=>'i686/debug', + ), + array( + 'name'=>'i686 gstreamer', + 'url'=>'i686/gstreamer', + ), + array( + 'name'=>'ppc603e perl', + 'url'=>'ppc603e/perl', + ), + array( + 'name'=>'ppc603e python', + 'url'=>'ppc603e/python', + ), + array( + 'name'=>'ppc603e debug', + 'url'=>'ppc603e/debug', + ), + array( + 'name'=>'ppc603e gstreamer', + 'url'=>'ppc603e/gstreamer', + ), + + array( + 'name'=>'Motorola A780', + 'url'=>'armv5te/machine/a780', + ), + array( + 'name'=>'HP iPAQ h2200', + 'url'=>'armv5te/machine/h2200', + ), + + array( + 'name'=>'HP iPAQ h4000', + 'url'=>'armv5te/machine/h4000', + ), + + array( + 'name'=>'HTC universal/ iMate jasjar', + 'url'=>'armv5te/machine/htcuniversal', + ), + array( + 'name'=>'HP iPAQ hx4700', + 'url'=>'armv5te/machine/hx4700', + ), + array( + 'name'=>'HP iPAQ hx2000 series', + 'url'=>'armv5te/machine/hx2000', + ), + + array( + 'name'=>'Psion Teklogix NetBook Pro', + 'url'=>'armv5te/machine/netbook-pro', + ), + array( + 'name'=>'HTC Magician', + 'url'=>'armv5te/machine/magician', + ), + array( + 'name'=>'Nokia 770 internet tablet', + 'url'=>'armv5te/machine/nokia770', + ), + array( + 'name'=>'Sharp Zaurus 5600 (Poodle)', + 'url'=>'armv5te/machine/poodle', + ), + array( + 'name'=>'Sharp Zaurus c7x0 (Corgi, Boxer, Husky, Shepher)', + 'url'=>'armv5te/machine/c7x0', + ), + array( + 'name'=>'Sharp Zaurus SL-C1000 (akita)', + 'url'=>'armv5te/machine/akita', + ), + array( + 'name'=>'HP iPAQ h5xxx series', + 'url'=>'armv5te/machine/h5xxx', + ), + array( + 'name'=>'Sharp Zaurus SL-C6000 (Tosa)', + 'url'=>'armv5te/machine/tosa', + ), + array( + 'name'=>'Sharp Zaurus SL-C3xxx (Spitz, Borzoi, Terrier)', + 'url'=>'armv5te/machine/spitz', + ), + array( + 'name'=>'Cirrus Logic ep93xx boards', + 'url'=>'armv4t/machine/ep93xx', + ), + array( + 'name'=>'FIC gta01/Neo1973 phone', + 'url'=>'armv4t/machine/fic-gta01', + ), + array( + 'name'=>'HP iPAQ h6300', + 'url'=>'armv4t/machine/h6300', + ), + array( + 'name'=>'Freescale i.mx31 ADS development board', + 'url'=>'armv6/machine/mx31ads', + ), -$ipkpath = "/var/www/angstrom/unstable/feed/unsorted"; -$cpu_archs = array('arm-oabi', 'armv4', 'armv4t', 'armv5te', 'armv6', 'armv7', 'avr32', 'bfin', 'i386', 'i486', 'i586', 'i686', 'iwmmxt', 'ppc405', 'ppc603e', 'sparc'); -$device_archs = array( - "a1200" => "armv5te", - "a780"=> "armv5te", - "acern30", - "adsp-bf537-stamp" => "bfin", - "adzs-bf538f-ezlite" => "bfin", - "akita" => "armv5te", - "alix", - "amsdelta", - "asus620", - "asus730", - "at32stk1000" => "avr32", - "at91sam9260ek" => "armv5te", - "at91sam9261ek" => "armv5te", - "at91sam9263ek" => "armv5te", - "atngw100" => "avr32", - "aximx50" => "armv5te", - "aximx50v" => "armv5te", - "borzoi" => "armv5te", - "boxer" => "armv5te", - "c7x0" => "armv5te", - "colinux", - "collie", - "compulab-pxa270" => "armv5te", - "corgi" => "armv5te", - "davinci-dvevm", - "db1200", - "devkitidp-pxa255" => "armv5te", - "dht-walnut" => "ppc405", - "e680" => "armv5te", - "efika" => "ppc603e", - "ep93xx" => "armv4t", - "epia", - "er0100" => "armv5te", - "eteng500" => "armv5te", - "fic-gta01" => "armv4t", - "fic-gta02" => "armv4t", - "fsg3be", - "geodegx", - "geodelx", - "guinness", - "gumstix-connex" => "armv5te", - "gumstix-verdex" => "armv5te", - "h1910", - "h1940", - "h2200" => "armv5te", - "h3600" => "arm-oabi", - "h3800" => "arm-oabi", - "h3900" => "armv5te", - "h4000" => "armv5te", - "h5000" => "armv5te", - "h6300" => "armv4t", - "htcalpine", - "htcapache", - "htcblueangel", - "htchimalaya", - "htcsable", - "htctornado", - "htcuniversal" => "armv5te", - "htcwallaby", - "husky" => "armv5te", - "hx2000" => "armv5te", - "hx4700" => "armv5te", - "i586-generic" => "i586", - "i686-generic" => "i586", - "ixp4xx", - "ixp4xxbe" => "armv5teb", - "ixp4xxle" => "armv5te", - "jornada56x", - "jornada6xx", - "jornada7xx", - "kb9202" => "armv4t", - "ks8695", - "lite5200", - "logicpd-pxa270" => "armv5te", - "looxc550", - "lsarm", - "lsppchd", - "lsppchg", - "magicbox", - "magician" => "armv5te", - "mainstone" => "armv5te", - "mnci", - "mtx-1", - "mtx-2", - "mtx-3", - "mtx-3a", - "mx21ads" => "armv5te", - "mx31ads" => "armv6", - "n2100", - "native", - "navman-icn330", - "netbook-pro" => "armv5te", - "netvista", - "nokia770" => "armv5te", - "nokia800", - "nslu2" => "armv5te", - "nslu2be" => "armv5teb", - "nslu2le" => "armv5te", - "omap1510inn" => "armv5te", - "omap1610h2" => "armv5te", - "omap1710h3" => "armv5te", - "omap2420h4", - "omap2430sdp", - "omap5912osk" => "armv5te", - "palmld" => "armv5te", - "palmt650" => "armv5te", - "palmt680", - "palmtc", - "palmtt", - "palmtt2", - "palmtt3", - "palmtt5", - "palmtx", - "palmz31", - "palmz71", - "palmz72", - "poodle" => "armv5te", - "progear", - "qemuarm" => "armv5te", - "qemux86", - "rb500", - "rokre2" => "armv5te", - "rokre6" => "armv5te", - "rt3000", - "rx1950", - "rx3000", - "sarge-at91" => "armv4t", - "sequoia", - "shark" => "arm-oabi", - "shepherd" => "armv5te", - "simpad" => "arm-oabi", - "smdk2440" => "armv4t", - "smdk2443" => "armv4t", - "spitz" => "armv5te", - "storcenter", - "sun4cdm", - "terrier" => "armv5te", - "titan", - "tosa" => "armv5te", - "triton", - "ts72xx", - "turbostation", - "wgt634u", - "wl500g", - "wrap", - "wrt54", - "x86-32-nocona", - "x86-prescott", - "x86-uml", - "x86", - "xilinx-ml403", - "xilinx-ml410", - "xxs1500", - ); + array( + 'name'=>'Tyan thunder K7 s2462 mainboard (guinness)', + 'url'=>'i686/machine/guinness', + ), + array( + 'name'=>'Progear webpad', + 'url'=>'i686/machine/progear', + ), + array( + 'name'=>'Genesi Efika', + 'url'=>'ppc603e/machine/efika', + ), -?> + )// end distro[feeds] + ), //end distro + array( + 'distro_name'=>'Ångström', + 'distro_version'=>'2007.12', + 'feed_base_url'=>'http://www.angstrom-distribution.org/feeds/2007/ipk/glibc/', + 'feeds'=> + array( + array( + 'name'=>'noarch feed', + 'url'=>'all', + ), + array( + 'name'=>'arm-oabi architecture base feed', + 'url'=>'arm-oabi/base', + ), + array( + 'name'=>'arm-oabi architecture gstreamer feed', + 'url'=>'arm-oabi/gstreamer', + ), + array( + 'name'=>'arm-oabi architecture perl feed', + 'url'=>'arm-oabi/perl', + ), + array( + 'name'=>'arm-oabi architecture python feed', + 'url'=>'arm-oabi/python', + ), + array( + 'name'=>'arm-oabi architecture debug feed', + 'url'=>'arm-oabi/debug', + ), + array( + 'name'=>'armv4t architecture base feed', + 'url'=>'armv4t/base', + ), + array( + 'name'=>'armv4t architecture gstreamer feed', + 'url'=>'armv4t/gstreamer', + ), + array( + 'name'=>'armv4t architecture perl feed', + 'url'=>'armv4t/perl', + ), + array( + 'name'=>'armv4t architecture python feed', + 'url'=>'armv4t/python', + ), + array( + 'name'=>'armv4t architecture debug feed', + 'url'=>'armv4t/debug', + ), + array( + 'name'=>'armv5te architecture base feed', + 'url'=>'armv5te/base', + ), + array( + 'name'=>'armv5te architecture gstreamer feed', + 'url'=>'armv5te/gstreamer', + ), + array( + 'name'=>'armv5te architecture perl feed', + 'url'=>'armv5te/perl', + ), + array( + 'name'=>'armv5te architecture python feed', + 'url'=>'armv5te/python', + ), + array( + 'name'=>'armv5te architecture debug feed', + 'url'=>'armv5te/debug', + ), + array( + 'name'=>'armv5teb architecture base feed', + 'url'=>'armv5teb/base', + ), + array( + 'name'=>'armv5teb architecture gstreamer feed', + 'url'=>'armv5teb/gstreamer', + ), + array( + 'name'=>'armv5teb architecture perl feed', + 'url'=>'armv5teb/perl', + ), + array( + 'name'=>'armv5teb architecture python feed', + 'url'=>'armv5teb/python', + ), + array( + 'name'=>'armv5teb architecture debug feed', + 'url'=>'armv5teb/debug', + ), + array( + 'name'=>'armv6 architecture base feed', + 'url'=>'armv6/base', + ), + array( + 'name'=>'armv6 architecture gstreamer feed', + 'url'=>'armv6/gstreamer', + ), + array( + 'name'=>'armv6 architecture perl feed', + 'url'=>'armv6/perl', + ), + array( + 'name'=>'armv6 architecture python feed', + 'url'=>'armv6/python', + ), + array( + 'name'=>'armv6 architecture debug feed', + 'url'=>'armv6/debug', + ), + array( + 'name'=>'i486 architecture base feed', + 'url'=>'i486/base', + ), + array( + 'name'=>'i486 architecture gstreamer feed', + 'url'=>'i486/gstreamer', + ), + array( + 'name'=>'i486 architecture perl feed', + 'url'=>'i486/perl', + ), + array( + 'name'=>'i486 architecture python feed', + 'url'=>'i486/python', + ), + array( + 'name'=>'i486 architecture debug feed', + 'url'=>'i486/debug', + ), + array( + 'name'=>'i586 architecture base feed', + 'url'=>'i586/base', + ), + array( + 'name'=>'i586 architecture gstreamer feed', + 'url'=>'i586/gstreamer', + ), + array( + 'name'=>'i586 architecture perl feed', + 'url'=>'i586/perl', + ), + array( + 'name'=>'i586 architecture python feed', + 'url'=>'i586/python', + ), + array( + 'name'=>'i586 architecture debug feed', + 'url'=>'i586/debug', + ), + array( + 'name'=>'i686 architecture base feed', + 'url'=>'i686/base', + ), + array( + 'name'=>'i686 architecture gstreamer feed', + 'url'=>'i686/gstreamer', + ), + array( + 'name'=>'i686 architecture perl feed', + 'url'=>'i686/perl', + ), + array( + 'name'=>'i686 architecture python feed', + 'url'=>'i686/python', + ), + array( + 'name'=>'i686 architecture debug feed', + 'url'=>'i686/debug', + ), + array( + 'name'=>'iwmmxt architecture base feed', + 'url'=>'iwmmxt/base', + ), + array( + 'name'=>'iwmmxt architecture gstreamer feed', + 'url'=>'iwmmxt/gstreamer', + ), + array( + 'name'=>'iwmmxt architecture perl feed', + 'url'=>'iwmmxt/perl', + ), + array( + 'name'=>'iwmmxt architecture python feed', + 'url'=>'iwmmxt/python', + ), + array( + 'name'=>'iwmmxt architecture debug feed', + 'url'=>'iwmmxt/debug', + ), + array( + 'name'=>'ppc405 architecture base feed', + 'url'=>'ppc405/base', + ), + array( + 'name'=>'ppc405 architecture gstreamer feed', + 'url'=>'ppc405/gstreamer', + ), + array( + 'name'=>'ppc405 architecture perl feed', + 'url'=>'ppc405/perl', + ), + array( + 'name'=>'ppc405 architecture python feed', + 'url'=>'ppc405/python', + ), + array( + 'name'=>'ppc405 architecture debug feed', + 'url'=>'ppc405/debug', + ), + array( + 'name'=>'ppc603e architecture base feed', + 'url'=>'ppc603e/base', + ), + array( + 'name'=>'ppc603e architecture gstreamer feed', + 'url'=>'ppc603e/gstreamer', + ), + array( + 'name'=>'ppc603e architecture perl feed', + 'url'=>'ppc603e/perl', + ), + array( + 'name'=>'ppc603e architecture python feed', + 'url'=>'ppc603e/python', + ), + array( + 'name'=>'ppc603e architecture debug feed', + 'url'=>'ppc603e/debug', + ) + ) // end distro['feeds'] + ), //end distro + array( + 'distro_name'=>'Ångström', + 'distro_version'=>'2008.6', + 'feed_base_url'=>'http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/', + 'feeds'=> + array( + array( + 'name'=>'noarch feed', + 'url'=>'all', + ), + array( + 'name'=>'arm-oabi architecture base feed', + 'url'=>'arm-oabi/base', + ), + array( + 'name'=>'arm-oabi architecture gstreamer feed', + 'url'=>'arm-oabi/gstreamer', + ), + array( + 'name'=>'arm-oabi architecture perl feed', + 'url'=>'arm-oabi/perl', + ), + array( + 'name'=>'arm-oabi architecture python feed', + 'url'=>'arm-oabi/python', + ), + array( + 'name'=>'arm-oabi architecture debug feed', + 'url'=>'arm-oabi/debug', + ), + array( + 'name'=>'armv4t architecture base feed', + 'url'=>'armv4t/base', + ), + array( + 'name'=>'armv4t architecture gstreamer feed', + 'url'=>'armv4t/gstreamer', + ), + array( + 'name'=>'armv4t architecture perl feed', + 'url'=>'armv4t/perl', + ), + array( + 'name'=>'armv4t architecture python feed', + 'url'=>'armv4t/python', + ), + array( + 'name'=>'armv4t architecture debug feed', + 'url'=>'armv4t/debug', + ), + array( + 'name'=>'armv5te architecture base feed', + 'url'=>'armv5te/base', + ), + array( + 'name'=>'armv5te architecture gstreamer feed', + 'url'=>'armv5te/gstreamer', + ), + array( + 'name'=>'armv5te architecture perl feed', + 'url'=>'armv5te/perl', + ), + array( + 'name'=>'armv5te architecture python feed', + 'url'=>'armv5te/python', + ), + array( + 'name'=>'armv5te architecture debug feed', + 'url'=>'armv5te/debug', + ), + array( + 'name'=>'armv5teb architecture base feed', + 'url'=>'armv5teb/base', + ), + array( + 'name'=>'armv5teb architecture gstreamer feed', + 'url'=>'armv5teb/gstreamer', + ), + array( + 'name'=>'armv5teb architecture perl feed', + 'url'=>'armv5teb/perl', + ), + array( + 'name'=>'armv5teb architecture python feed', + 'url'=>'armv5teb/python', + ), + array( + 'name'=>'armv5teb architecture debug feed', + 'url'=>'armv5teb/debug', + ), + array( + 'name'=>'armv6 architecture base feed', + 'url'=>'armv6/base', + ), + array( + 'name'=>'armv6 architecture gstreamer feed', + 'url'=>'armv6/gstreamer', + ), + array( + 'name'=>'armv6 architecture perl feed', + 'url'=>'armv6/perl', + ), + array( + 'name'=>'armv6 architecture python feed', + 'url'=>'armv6/python', + ), + array( + 'name'=>'armv6 architecture debug feed', + 'url'=>'armv6/debug', + ), + array( + 'name'=>'i486 architecture base feed', + 'url'=>'i486/base', + ), + array( + 'name'=>'i486 architecture gstreamer feed', + 'url'=>'i486/gstreamer', + ), + array( + 'name'=>'i486 architecture perl feed', + 'url'=>'i486/perl', + ), + array( + 'name'=>'i486 architecture python feed', + 'url'=>'i486/python', + ), + array( + 'name'=>'i486 architecture debug feed', + 'url'=>'i486/debug', + ), + array( + 'name'=>'i586 architecture base feed', + 'url'=>'i586/base', + ), + array( + 'name'=>'i586 architecture gstreamer feed', + 'url'=>'i586/gstreamer', + ), + array( + 'name'=>'i586 architecture perl feed', + 'url'=>'i586/perl', + ), + array( + 'name'=>'i586 architecture python feed', + 'url'=>'i586/python', + ), + array( + 'name'=>'i586 architecture debug feed', + 'url'=>'i586/debug', + ), + array( + 'name'=>'i686 architecture base feed', + 'url'=>'i686/base', + ), + array( + 'name'=>'i686 architecture gstreamer feed', + 'url'=>'i686/gstreamer', + ), + array( + 'name'=>'i686 architecture perl feed', + 'url'=>'i686/perl', + ), + array( + 'name'=>'i686 architecture python feed', + 'url'=>'i686/python', + ), + array( + 'name'=>'i686 architecture debug feed', + 'url'=>'i686/debug', + ), + array( + 'name'=>'iwmmxt architecture base feed', + 'url'=>'iwmmxt/base', + ), + array( + 'name'=>'iwmmxt architecture gstreamer feed', + 'url'=>'iwmmxt/gstreamer', + ), + array( + 'name'=>'iwmmxt architecture perl feed', + 'url'=>'iwmmxt/perl', + ), + array( + 'name'=>'iwmmxt architecture python feed', + 'url'=>'iwmmxt/python', + ), + array( + 'name'=>'iwmmxt architecture debug feed', + 'url'=>'iwmmxt/debug', + ), + array( + 'name'=>'ppc405 architecture base feed', + 'url'=>'ppc405/base', + ), + array( + 'name'=>'ppc405 architecture gstreamer feed', + 'url'=>'ppc405/gstreamer', + ), + array( + 'name'=>'ppc405 architecture perl feed', + 'url'=>'ppc405/perl', + ), + array( + 'name'=>'ppc405 architecture python feed', + 'url'=>'ppc405/python', + ), + array( + 'name'=>'ppc405 architecture debug feed', + 'url'=>'ppc405/debug', + ), + array( + 'name'=>'ppc603e architecture base feed', + 'url'=>'ppc603e/base', + ), + array( + 'name'=>'ppc603e architecture gstreamer feed', + 'url'=>'ppc603e/gstreamer', + ), + array( + 'name'=>'ppc603e architecture perl feed', + 'url'=>'ppc603e/perl', + ), + array( + 'name'=>'ppc603e architecture python feed', + 'url'=>'ppc603e/python', + ), + array( + 'name'=>'ppc603e architecture debug feed', + 'url'=>'ppc603e/debug', + ) + )// end distro[feeds]s + )// end distro + ); //end $feeds +?> diff --git a/contrib/feed-browser/update.php b/contrib/feed-browser/update.php index 53317ebb03..98751ea26c 100644 --- a/contrib/feed-browser/update.php +++ b/contrib/feed-browser/update.php @@ -46,9 +46,15 @@ if(!check_database()) $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds"); -if($argc > 1 AND $argv[1] == 'upgrades') +if($argc == 2) { - $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_type = 'upgrades'"); + $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_uri = '${argv[1]}'"); +} else if ($argc == 3 && $argv[1] == "--type") { + $feeds = db_query("SELECT f_id, f_name, f_uri FROM feeds WHERE f_type = '${argv[2]}'"); +} + +if (!$feeds) { + die("Cannot find feed(s) in the DB\n"); } $start = time(); diff --git a/contrib/mtn2cl/mtn2cl.sh b/contrib/mtn2cl/mtn2cl.sh index 416d393ccd..15d2722a8b 100755 --- a/contrib/mtn2cl/mtn2cl.sh +++ b/contrib/mtn2cl/mtn2cl.sh @@ -11,7 +11,7 @@ else export OLD_REV="l:\"1 week ago\"" fi -for i in `mtn log --brief --no-graph --no-merges --to ${OLD_REV} --from ${REV_NOW}| awk '{print $2 ":" $1}'` ; do \ +for i in `mtn log --brief --no-graph --no-merges --to "${OLD_REV}" --from "${REV_NOW}"| awk '{print $2 ":" $1}'` ; do \ export REV=`echo $i | awk -F: '{print $2}'` export AUTHOR=`echo $i | awk -F: '{print $1}'` export CL=`mtn ls certs ${REV} | grep -A 1 changelog | grep -v changelog | gawk -F'Value : ' '{ print $2 }'` diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py index cda4f39fca..1de3010756 100755 --- a/contrib/mtn2git/mtn2git.py +++ b/contrib/mtn2git/mtn2git.py @@ -1,7 +1,7 @@ #!/usr/bin/env python """ - Copyright (C) 2006, 2007 Holger Hans Peter Freyther + Copyright (C) 2006, 2007, 2008 Holger Hans Peter Freyther Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27,18 +27,6 @@ # -tag handling # -work with n-merges # -# DISCUSSION: -# -For some reason the get_revision information might be inaccurate -# and I should consider just comparing the manifests. -# I would use the manifests of the parents and consider all files deleted -# and then remove every dir/file that is inside the new manifest from this -# list. -# Benefits: -# - 1:1 match of the manifest regardles of get_revision information -# - Renaming is handled by git anyway -# Downsides: -# - The size of the import will grow. -# import mtn import os @@ -48,6 +36,17 @@ import email.Utils import status +# Interesting revisions: +# Rename with dest==src: 24cba5923360fef7c5cc81d51000e30b90355eb9 +# Recursive rename: fca159c5c00ae4158c289f5aabce995378d4e41b +# Delete+Rename: 91da98265a39c93946e00adf5d7bf92b341de847 +# +# +# + +# Our manifest/tree fifo construct +cached_tree = {} +cached_fifo = [] def get_mark(revision): """ @@ -104,21 +103,6 @@ def reset_git(ops, revision): cmd += [""] print "\n".join(cmd) -def filter_renamed(manifest, renamed): - """ - If we base from a revision that has already done - the move, git-fast-import will complain that the file - has been already moved - """ - if len(renamed) == 0: - return renamed - - for line in manifest: - if line[0] == "file": - renamed = filter(lambda (to,from_,manifest): to != line[1], renamed) - - return renamed - def get_git_date(revision): """ Convert the "date" cert of monotone to a time understandable by git. No timezone @@ -127,135 +111,90 @@ def get_git_date(revision): dt = datetime.datetime.strptime(revision["date"], "%Y-%m-%dT%H:%M:%S").strftime("%a, %d %b %Y %H:%M:%S +0000") return dt -def recursively_delete(ops, manifest, revision, dir_name, to_delete): - """ - Recursively delete all files that dir_name inside the name - """ - for line in manifest: - if line[0] == "dir" or line[0] == "file": - if line[1].startswith(dir_name): - print >> sys.stderr, "Deleting '%s'" % line[1] - to_delete.add((line[1], revision)) - elif line[0] in ["format_version"]: - assert(line[1] == "1") - else: - print >> sys.stderr, line[0] - assert(False) +def is_executable_attribute_set(attributes, rev): + assert(len(attributes) % 3 == 0), rev - return to_delete + if len(attributes) >= 3: + for i in range(0, len(attributes)%3+1): + if attributes[i] == "attr" and attributes[i+1] == "mtn:execute" and attributes[i+2] == "true": + return True + return False -def recursively_rename(ops, manifest, revision, old_name, new_name, to_add_dirs, to_add_files, to_remove_items, files_deleted, files_sticky): - """ - mtn has a rename command and can rename entrie directories. For git we will have to do the recursive renaming - ourselves. Basicly we will get all files and replace old_name with new_name but only: - If the file of the old_manifest is not in our to be deleted list - """ - old_dir = old_name + "/" - for line in manifest: - if line[1].startswith(old_dir) or line[1] == old_name: - already_handled = False - for (deleted,_) in files_deleted: - if line[1] == deleted: - already_handled = True - break - - # Don't rename files that should be in the same directory - if line[1] in files_sticky: - already_handled = True - - if already_handled: - pass - elif line[0] == "file": - print >> sys.stderr, "Will add '%s' old: '%s' new: '%s' => result: '%s'" % (line[1], old_name, new_name, line[1].replace(old_name, new_name, 1)) - to_add_files.add((line[1].replace(old_name, new_name, 1), None, revision)) - elif line[0] == "dir": - to_add_dirs.add((line[1].replace(old_name, new_name, 1), revision)) - elif line[0] in ["format_version"]: - assert(line[1] == "1") - else: - print >> sys.stderr, line[0] - assert(False) - - return (to_add_files, to_add_dirs) +def build_tree(manifest, rev): + """Assemble a filesystem tree from a given manifest""" -# -# We need to recursively rename the directories. Now the difficult part is to undo certain operations. -# -# e.g we rename the whole dir and then rename a file back. We could revive a directory that was marked -# for deletion. -# -# rename "weird/two/three" -# to "unweird/four" -# -# rename "weird/two/three/four" -# to "weird/two/three" -# -# Here we would schedule weird/two/three for deletion but then revive it again. So three does not -# get copied to unweird/four/three -# """ -def recursively_rename_directories(ops, manifests, rename_commands, files_deleted, files_moved_sticky): - to_add_directories = set() - to_add_files = set() - to_remove_items = set() - - for (old_name, new_name, old_revision) in rename_commands: - # Check if we have the above case and rename a more specific directory - # and then we will alter the result... - inner_rename = False - for (other_old_name, other_new_name, other_rev) in rename_commands: - if old_name.startswith(other_old_name + "/") and other_old_name != old_name: - inner_rename = True - print >> sys.stderr, "Inner rename detected", old_name, other_old_name - # Fixup the renaming - def rename(filename, filerev, rev, would_be_new_name): - if filename.startswith(would_be_new_name + "/"): - return filename.replace(would_be_new_name, new_name, 1), filerev, rev - return filename, filerev, rev - - would_be_new_name = other_new_name + "/" + old_name[len(other_old_name)+1:] - to_remove_items = set(filter(lambda (item,_): item != new_name, to_remove_items)) - to_add_directories = set(filter(lambda (item,_): item != would_be_new_name, to_add_directories)) - to_add_directories.add((new_name, old_revision)) - to_add_files = set(map(lambda (fn, fr, r): rename(fn, fr, r, would_be_new_name), to_add_files)) - - if not inner_rename: - to_remove_items.add((old_name, old_revision)) - recursively_delete(ops, manifests[old_revision], old_revision, old_name + "/", to_remove_items) - recursively_rename(ops, manifests[old_revision], old_revision, old_name, new_name, to_add_directories, to_add_files, to_remove_items, files_deleted, files_moved_sticky) - - return (to_add_directories, to_add_files, to_remove_items) - - -def build_tree(manifest): - dirs = {} - files = {} + class tree: + def __init__(self): + self.dirs = {} + self.files= {} + + tree = tree() for line in manifest: if line[0] == "file": - files[line[1]] = (line[3],line[4:]) + tree.files[line[1]] = (line[3], is_executable_attribute_set(line[4:], rev)) elif line[0] == "dir": - dirs[line[1]] = 1 + tree.dirs[line[1]] = 1 elif line[0] != "format_version": - print >> sys.stderr, line[0] - assert(False) - return (dirs,files) + assert(False), "Rev: %s: Line[0]: '%s'" % (rev, line[0]) -def compare_with_manifest(all_added, all_modified, all_deleted, new_manifest, old_manifests): - """ - Sanity check that the difference between the old and the new manifest is the one - we have in all_added, all_modified, all_deleted - """ - old_trees = {} - really_added = {} - really_modified = {} - really_removed = {} + return tree + +def get_and_cache_tree(ops, revision): + """Simple FIFO to cache a number of trees""" + global cached_tree, cached_fifo + + if revision in cached_tree: + return cached_tree[revision] - current_dirs, current_files = build_tree(new_manifest) + tree = build_tree([line for line in ops.get_manifest_of(revision)], revision) + cached_tree[revision] = tree + cached_fifo.append(revision) + + # Shrink + if len(cached_fifo) > 100: + old_name = cached_fifo[0] + cached_fifo = cached_fifo[1:] + del cached_tree[old_name] + + return tree + +def diff_manifest(old_tree, new_tree): + """Find additions, modifications and deletions""" + added = set() + modified = set() + deleted = set() + + # Removed dirs + for dir in old_tree.dirs.keys(): + if not dir in new_tree.dirs: + deleted.add((dir,True)) + + # New dirs + for dir in new_tree.dirs.keys(): + if not dir in old_tree.dirs: + added.add(dir) + + # Deleted files + for file in old_tree.files.keys(): + if not file in new_tree.files: + deleted.add((file,False)) + + # Added files, goes to modifications + for file in new_tree.files.keys(): + if not file in old_tree.files: + modified.add((file, new_tree.files[file][0])) + continue + + # The file changed, either contents or executable attribute + old = old_tree.files[file] + new = new_tree.files[file] + if old != new: + modified.add((file, new_tree.files[file][0])) + - for parent in old_manifests.keys(): - old_trees[parent] = build_tree(old_manifests[parent]) + return (added, modified, deleted) - print >> sys.stderr, len(old_manifests) def fast_import(ops, revision): """Import a revision into git using git-fast-import. @@ -292,27 +231,28 @@ def fast_import(ops, revision): return # Use the manifest to find dirs and files - manifest = [line for line in ops.get_manifest_of(revision["revision"])] - manifests = {} - dirs = {} - for parent in revision["parent"]: - manifests[parent] = [line for line in ops.get_manifest_of(parent)] - for line in manifests[parent]: - if line[0] == "dir": - if not parent in dirs: - dirs[parent] = {} - dirs[parent][line[1]] = 1 + current_tree = get_and_cache_tree(ops, revision["revision"]) - # We can not just change the mode of a file but we need to modifiy the whole file. We - # will simply add it to the modified list and ask to retrieve the status from the manifest - for (file, attribute, value, rev) in revision["set_attributes"]: - if attribute == "mtn:execute": - revision["modified"].append((file, None, rev)) - for (file, attribute, rev) in revision["clear_attributes"]: - if attribute == "mtn:execute": - revision["modified"].append((file, None, rev)) + all_added = set() + all_modifications = set() + all_deleted = set() + + # Now diff the manifests + for parent in revision["parent"]: + (added, modified, deleted) = diff_manifest(get_and_cache_tree(ops, parent), current_tree) + all_added = all_added.union(added) + all_modifications = all_modifications.union(modified) + all_deleted = all_deleted.union(deleted) + if len(revision["parent"]) == 0: + (added, modified, deleted) = diff_manifest(build_tree([],""), current_tree) + all_added = all_added.union(added) + all_modifications = all_modifications.union(modified) + all_deleted = all_deleted.union(deleted) + # TODO: + # Readd the sanity check to see if we deleted and modified an entry. This + # could probably happen if we have more than one parent (on a merge)? cmd = [] cmd += ["commit refs/heads/%s" % branch] @@ -322,97 +262,28 @@ def fast_import(ops, revision): cmd += ["data %d" % len(revision["changelog"])] cmd += ["%s" % revision["changelog"]] - # Emulation for renaming. We will split them into two lists - file_renamed_del = set() - file_renamed_new = set() - file_moved_sticky = set() - if len(revision["parent"]) != 0: cmd += ["from :%s" % get_mark(revision["parent"][0])] - renamed = revision["renamed"] - - to_rename_directories = [] - for (new_name, old_name, old_revision) in renamed: - # 24cba5923360fef7c5cc81d51000e30b90355eb9 is a rev where src == dest but the - # directory got renamed, so this means this file got added to the new directory - # TODO, XXX, FIXME check if this can be done for directories as well - if new_name == old_name and not old_name in dirs[old_revision]: - print >> sys.stderr, "Bogus rename in %s (%s, %s)?" % (revision["revision"], new_name, old_name) - file_moved_sticky.add(old_name) - - # Check if the old_name was a directory in the old manifest - # If we rename a directory we will need to recursively remove and recursively - # add... - # Add the '/' otherwise we might rename the wrong directory which shares the - # same prefix. - # fca159c5c00ae4158c289f5aabce995378d4e41b is quite funny. It renames a directory - # and then renames another directory within the renamed one and in the worse case - # we will revive a deleted directory, file... - elif old_name in dirs[old_revision]: - print >> sys.stderr, "Detected directory rename '%s' => '%s'" % (old_name, new_name) - assert(old_revision in manifests) - to_rename_directories.append((old_name, new_name, old_revision)) - else: - print >> sys.stderr, "Renaming %s => %s" % (old_name, new_name) - file_renamed_new.add((new_name, None, revision["revision"])) - file_renamed_del.add((old_name, old_revision)) # The first parent is our from. for parent in revision["parent"][1:]: cmd += ["merge :%s" % get_mark(parent)] - # Do the renaming now - (renamed_dirs, renamed_new, renamed_old) = recursively_rename_directories(ops, manifests, to_rename_directories, file_renamed_del.union(set(revision["removed"])), file_moved_sticky) - - # Sanity check, don't remove anything we modify - all_added = set(revision["added_dirs"]).union(renamed_dirs) - all_modifications = set(revision["modified"]).union(set(revision["added_files"])).union(renamed_new).union(file_renamed_new) - all_deleted = set(revision["removed"]).union(renamed_old).union(file_renamed_del) - all_deleted_new = all_deleted - - # Check if we delete and add at the same time - for (deleted,rev) in all_deleted: - for (added,_) in all_added: - if added == deleted: - print >> sys.stderr, "Added and Deleted", added, deleted - all_deleted_new = set(filter(lambda (dele,_): dele != added, all_deleted_new)) - assert((added,rev) not in all_deleted_new) - - for (modified,_,_) in all_modifications: - if modified == deleted: - print >> sys.stderr, "Modified and Deleted", modified, deleted - all_deleted_new = set(filter(lambda (dele,_): dele != modified, all_deleted_new)) - assert((modified,rev) not in all_deleted_new) - - # Filtered list of to be deleted items - all_deleted = all_deleted_new - # Check if we delete but the manifest has a file like this - for line in manifest: - if line[0] == "dir" or line[0] == "file": - for (deleted,rev) in all_deleted: - if line[1] == deleted: - # 91da98265a39c93946e00adf5d7bf92b341de847 of mtn has a delete + rename - print >> sys.stderr, "Trying to delete a file which is in the new manifest", line[1], deleted - assert(False) - - compare_with_manifest(all_added, all_modifications, all_deleted, manifest, manifests) - - for (dir_name, rev) in all_added: + for dir_name in all_added: cmd += ["M 644 inline %s" % os.path.join(dir_name, ".mtn2git_empty")] cmd += ["data <<EOF"] cmd += ["EOF"] cmd += [""] - for (file_name, file_revision, rev) in all_modifications: - (mode, file) = get_file_and_mode(ops, manifest, file_name, file_revision, revision["revision"]) + for (file_name, file_revision) in all_modifications: + (mode, file) = get_file_and_mode(ops, current_tree, file_name, file_revision, revision["revision"]) cmd += ["M %d inline %s" % (mode, file_name)] cmd += ["data %d" % len(file)] cmd += ["%s" % file] - for (path, rev) in all_deleted: - assert(rev in dirs) - if path in dirs[rev]: + for (path, is_dir) in all_deleted: + if is_dir: cmd += ["D %s" % os.path.join(path, ".mtn2git_empty")] else: cmd += ["D %s" % path] @@ -428,33 +299,20 @@ def is_trusted(operations, revision): return False return True -def get_file_and_mode(operations, manifest, file_name, _file_revision, rev = None): - mode = 644 +def get_file_and_mode(operations, file_tree, file_name, _file_revision, rev = None): + assert file_name in file_tree.files, "get_file_and_mode: Revision '%s', file_name='%s' " % (rev, file_name) - file_revision = None - for line in manifest: - if line[0] == "file" and line[1] == file_name: - assert(line[1] == file_name) - assert(line[2] == "content") - - if _file_revision: - assert(line[3] == _file_revision) - file_revision = line[3] - - attributes = line[4:] - assert(len(attributes) % 3 == 0) - if len(attributes) >= 3: - for i in range(0, len(attributes)%3+1): - if attributes[i] == "attr" and attributes[i+1] == "mtn:execute" and attributes[i+2] == "true": - mode = 755 - break + (file_revision, executable) = file_tree.files[file_name] + if _file_revision: + assert _file_revision == file_revision, "Same filerevision for file_name='%s' in rev='%s' (%s,%s)" % (file_name, rev, file_revision, _file_revision) - assert(file_revision) - file = "".join([file for file in operations.get_file(file_revision)]) - return (mode, file) + if executable: + mode = 755 + else: + mode = 644 - print >> sys.stderr, file_name, rev - assert(False) + file = "".join([file for file in operations.get_file(file_revision)]) + return (mode, file) def parse_revision(operations, revision): @@ -491,20 +349,12 @@ def parse_revision(operations, revision): old_rev = line[1] elif line[0] == "new_manifest": revision_description["manifest"] = line[1] - elif line[0] == "rename": - revision_description["renamed"].append((line[3], line[1], old_rev)) - elif line[0] == "patch": - revision_description["modified"].append((line[1], line[5], old_rev)) - elif line[0] == "delete": - revision_description["removed"].append((line[1], old_rev)) - elif line[0] == "add_dir": - revision_description["added_dirs"].append((line[1], old_rev)) - elif line[0] == "add_file": - revision_description["added_files"].append((line[1], line[3], old_rev)) elif line[0] == "clear": revision_description["clear_attributes"].append((line[1], line[3], old_rev)) elif line[0] == "set": revision_description["set_attributes"].append((line[1], line[3], line[5], old_rev)) + elif line[0] in ["rename", "patch", "delete", "add_dir", "add_file"]: + pass else: print >> sys.stderr, line assert(False) @@ -519,7 +369,7 @@ def parse_revision(operations, revision): revision_description["committer"] = cert[1] else: print >> sys.stderr, "Unknown Cert: Ignoring", cert[5], cert[7] - assert(False) + #assert(False) return revision_description @@ -565,25 +415,31 @@ def main(mtn_cli, db, rev): ops.automate.stop() all_revs = [] + branch_heads = {} for branch in branches: heads = [head for head in ops.heads(branch)] + if len(heads) != 1: + print >> sys.stderr, "Skipping branch '%s' due multiple heads" % (branch) + continue + if branch in status.former_heads: old_heads = status.former_heads[branch] else: old_heads = [] for head in heads: + print >> sys.stderr, old_heads, head all_revs += ops.ancestry_difference(head, old_heads) status.former_heads[branch] = heads + sorted_revs = [rev for rev in ops.toposort(all_revs)] for rev in sorted_revs: if has_mark(rev): - print >> sys.stderr, "Already having commit '%s'" % rev + print >> sys.stderr, "B: Already having commit '%s'" % rev else: print >> sys.stderr, "Going to import revision ", rev fast_import(ops, parse_revision(ops, rev)) - if __name__ == "__main__": import optparse @@ -608,3 +464,4 @@ if __name__ == "__main__": print >> sys.stderr, "Failed to open the status file" main(options.mtn, options.database, options.rev) status.store(options.status) + diff --git a/contrib/mtn2git/status.py b/contrib/mtn2git/status.py index 47d06b51fd..bd83f85acf 100644 --- a/contrib/mtn2git/status.py +++ b/contrib/mtn2git/status.py @@ -20,7 +20,7 @@ THE SOFTWARE. """ -import pickle +import os, pickle marks = {} last_mark = 0 @@ -39,9 +39,16 @@ def load(status_name): def store(status_name): global marks, last_mark, mark_file, former_heads, same_revisions - file = open(status_name, "wb") + file = open("%s.tmp-foo" % status_name, "wb") pickle.dump(marks, file) pickle.dump(last_mark, file) pickle.dump(former_heads, file) pickle.dump(same_revisions, file) file.close() + + # Almost atomic rename, without the risk to destroy something + try: + os.remove(status_name) + except: + pass + os.rename("%s.tmp-foo" % status_name, status_name) diff --git a/contrib/python/generate-manifest-2.5.py b/contrib/python/generate-manifest-2.5.py index 440434229c..3419cab2e5 100755 --- a/contrib/python/generate-manifest-2.5.py +++ b/contrib/python/generate-manifest-2.5.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # generate Python Manifest for the OpenEmbedded build system -# (C) 2002-2007 Michael 'Mickey' Lauer <mlauer@vanille-media.de> +# (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> # (C) 2007 Jeremy Laine # licensed under MIT, see COPYING.MIT @@ -10,11 +10,11 @@ import sys import time VERSION = "2.5.1" -# increase when touching python-core, this should be the same ml version as in python_2.5.1.bb -BASEREV = 5 +# increase when touching python-core, this should be the same ml version as in python_2.5.x.bb +BASEREV = 7 -__author__ = "Michael 'Mickey' Lauer <mickey@Vanille.de>" -__version__ = "20071205" +__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>" +__version__ = "20080122" class MakefileMaker: @@ -24,7 +24,7 @@ class MakefileMaker: self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] self.output = outfile self.out( "#" * 120 ) - self.out( "### AUTO-GENERATED by '%s' [(C) 2002-2007 Michael 'Mickey' Lauer <mlauer@vanille-media.de>] on %s" % ( sys.argv[0], time.asctime() ) ) + self.out( "### AUTO-GENERATED by '%s' [(C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>] on %s" % ( sys.argv[0], time.asctime() ) ) self.out( "###" ) self.out( "### Visit THE Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy" ) self.out( "###" ) |