Package: madison-lite
Version: 0.6
Severity: wishlist

I'm using madison-lite for comparing which versions of a given package
are in debian and ubuntu. I think other users would find it handy to
find ready to use scripts/config in the examples/ directory for that.

I'm attaching my config and my update script for that. If you think they
are useful, please add them to the examples directory.

cheers!

-- System Information:
Debian Release: testing/unstable
  APT prefers dapper
  APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-16-686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)

Versions of packages madison-lite depends on:
ii  perl                     5.8.7-10ubuntu1 Larry Wall's Practical Extraction 

Versions of packages madison-lite recommends:
ii  perl [libdigest-md5-perl 5.8.7-10ubuntu1 Larry Wall's Practical Extraction 

-- no debconf information
#! /bin/sh -e

# This is an example of how to build a local mirror containing only the
# index files, not the packages themselves. If you put something similar to
# this in a cron job, then you can run madison-lite locally. Be sure to
# change the various hostnames to appropriate mirrors, set MIRROR to a
# suitable directory, and fill the mirror directory into your madison-lite
# configuration file.
#
# If you are reading this after the release of sarge, then you may need to
# change the lists of distributions and architectures.

HOST_MAIN=${HOST_MAIN:-'ftp://ftp.debian.org/debian'}
HOST_UBUNTU=${HOST_UBUNTU:-'http://archive.ubuntu.com/ubuntu'}
HOST_SECURITY=${HOST_SECURITY:-'http://mirrors.geekbone.org/debian-security/'}
MIRROR=${MIRROR:-/var/cache/madison-lite/mirror}

#debian has no amd64 yet!
DEBIANARCHS='i386 powerpc'
UBUNTUARCHS='i386 powerpc amd64'

WGET_OPTS=${WGET_OPTS-'-q -N --passive-ftp'}

umask 002

mkdir -p "$MIRROR"
cd "$MIRROR"

mkdir -p dists
cd dists

archives='ubuntu main'
components='main contrib non-free'
ubuntucomponents='main restricted universe multiverse'
arches="${DEBIANARCHS}"

for archive in $archives; do
    case $archive in
        main)
            host="$HOST_MAIN"
            suitesuffix=''
            #suites='stable proposed-updates testing testing-proposed-updates 
unstable experimental'
            suites='unstable experimental'
            components='main contrib non-free'
            arches="${DEBIANARCHS}"
            ;;
        security)
            host="$HOST_SECURITY"
            suitesuffix='/updates'
            suites='stable testing'
            ;;
        ubuntu)
            host="$HOST_UBUNTU"
            suitesuffix=''
            #suites='warty hoary breezy dapper'
            suites='warty hoary breezy dapper'
            components="${ubuntucomponents}"
            arches="${UBUNTUARCHS}"
            ;;
        *)
            echo "Internal error: archive '$archive'?" >&2
            exit 1
    esac

    for suite in $suites; do
        if [ "$archive" = main -o "$archive" = ubuntu ]; then
            suitehere="$suite"
        else
            suitehere="$suite-$archive"
        fi

        mkdir -p "$suitehere"
        root=dists
        for component in $components; do
            mkdir -p "$suitehere/$component"
            for arch in $arches; do
                mkdir -p "$suitehere/$component/binary-$arch"
                wget $WGET_OPTS -O 
"$suitehere/$component/binary-$arch/Packages.gz" 
"$host/$root/$suite$suitesuffix/$component/binary-$arch/Packages.gz"
            done
            mkdir -p "$suite/$component/source"
            wget $WGET_OPTS -O "$suite/$component/source/Sources.gz" 
"$host/$root/$suite$suitesuffix/$component/source/Sources.gz"
        done
    done
done

exit 0
# This madison-lite configuration is suitable for a typical debian.org host
# with a complete mirror.
mirror /var/cache/madison-lite/mirror
suite unstable dists/unstable main contrib non-free
suite experimental dists/experimental main contrib non-free
suite warty dists/warty main restricted universe multiverse
suite hoary dists/hoary main restricted universe multiverse
suite breezy dists/breezy main restricted universe multiverse
suite dapper dists/dapper main restricted universe multiverse

Reply via email to