Hi
Hast du DSL?
Du kannst dir recht simpel einen reinen i386 mirror mit dem script debmirror-wrapper erzeugen.
quelle:
http://people.debian.org/~absurd/debmirror-wrapper
ich habe mir das script etwas umgebaut für einen reinen i386 mirror.
pfad zum mirror ist /mirror. dort drinnen ist /debian und unterhalb liegen die ganzen dirs für einen internen mirror (werden erzeugt glaube ich, ist schon so lange her*g*)
proftp habe ich als annonymous verzeichniss /mirror gegeben.
Code: Alles auswählen
#!/bin/bash -e
# $Id: debmirror-wrapper,v 1.13 2003/11/28 20:14:12 absurd Exp $
# Copyright (c) 2002, 2003 Stephan A Suerken <absurd@debian.org>, GPL.
#
# README:
#
# NOTE [2003-Nov-24]: You must use at least debmirror-20030829; non-US
# and security can't be mirrored with that version of debmirror -- I
# temporarily use "mirror" (selecting archs but no dists -- this is
# easily configured) to mirror those relatively small sections.
#
# debmirror "bug"-workarounds:
#
# #149888 => *Skipped, using ftp again* Using rsync method (ftp method is likely to timeout after Packages.*/Sources.* read)
# #154966 => Using "sync_disks" after and "--ignore" during debmirror run
# #153680 => Using "sync_tlf" after and "--ignore" during debmirror run
# #151164 => *Skipped, should be fixed now* Horrible Pre-Checking if rsync method currently works on the mirror.
#
# crontab example:
#
# # Do weekly nightly mirrors of debian + debian-non-US
# 30 2 * * Sat debmirror-wrapper debian
#
# $Log: debmirror-wrapper,v $
# Revision 1.13 2003/11/28 20:14:12 absurd
# Mirror directory change.
#
# Revision 1.12 2003/11/28 14:55:23 absurd
# Adding sarge-proposed-updates.
#
# Revision 1.11 2003/11/28 14:06:28 absurd
# Adding experimental.
#
# Revision 1.10 2003/11/24 21:51:12 absurd
# o Disableing security and non-US mirrors (newer debmirror won't work with them ;(.
# o Some updates to commentaries on top.
#
# Revision 1.9 2003/11/24 15:06:26 absurd
# o Removing braindead precheck for rsync availablity.
# o Adding note about min version fo debmirror to use (see above).
# o Using ftp again instead of rsync.
#
# Revision 1.8 2003/11/17 22:05:52 absurd
# Adding success logs after debmirror runs for better debugging.
#
# Revision 1.7 2003/02/20 00:15:03 absurd
# Fix: Make check_rsync_host work for security, non-US
#
# Revision 1.6 2003/02/16 20:24:48 absurd
# Adding note about bug workaround for #151164.
#
# Revision 1.5 2003/02/16 20:16:44 absurd
# Adding cvs log into file.
#
# Copy configuration to this file to overwrite defaults
CONFFILE=${HOME}/.debmirror-wrapper.conf
######################################################################
# CONFIGURATION DEFAULTS
#
# COMMON
#
# Directories "debian", "debian-non-US" and "debian-security" are going
# to reside under this directory
MIRROR_DIR="/mirror"
# debmirror options: What architectures (including source) to mirror
ARCHS="--arch=i386 --nosource --ignore-release-gpg"
# debmirror options: Controlling additional output
#DEBUG="--debug --progress"
DEBUG="--progress"
# DEBIAN MIRROR
#
# host name of debian mirror
DEB_HOST="ftp2.de.debian.org"
# comma-separated list of distributions to mirror
DEB_DISTS="testing"
# comma-separated list of sections to mirror
DEB_SECTIONS="main,contrib,non-free"
# space-separated list of disk architectures to mirror; will be tried for all DEB_DISTS
DEB_DISK_ARCHS="i386"
# DEBIAN MIRROR (NONUS)
#
# host name of debian mirror (for nonus)
#DEB_HOST_NONUS="ftp.de.debian.org"
# comma-separated list of non-us sections to mirror
#DEB_SECTIONS_NONUS="non-US/main,non-US/contrib,non-US/non-free"
# SECURITY MIRROR
#
# host name of security mirror
SEC_HOST="security.debian.org"
# comma-separated list of distributions to mirror
SEC_DISTS="testing"
# comma-separated list of sections to mirror
SEC_SECTIONS="updates/main,updates/contrib,updates/non-free"
#
# END CONFIGURATION
######################################################################
[ ! -e ${CONFFILE} ] || source ${CONFFILE}
if [ -z "$*" ]; then
echo "Usage: `basename $0` {debian|all}" >&2
exit 1
fi
# Sync disk images
function sync_disks
{
local DIST=$1
local ARCH=$2
if ! rsync --delete --archive --progress --verbose \
${DEB_HOST}::debian/dists/${DIST}/main/disks-${ARCH} ${MIRROR_DIR}/debian/dists/${DIST}/main/ ; then
echo "WARNING: Could not mirror disks in ${DIST} for ${ARCH}." >&2
fi
}
# Sync Top Level Files
function sync_tlf
{
local HOST=$1
local ARCHIVE=$2
local FILES=$3
rsync --archive --delete --verbose --progress ${HOST}::${ARCHIVE}/${FILES} ${MIRROR_DIR}/${ARCHIVE}
}
for i in $*; do
echo -e "\n\nStarting Mirror Run For: ${i}\n"
#
# debian
#
if [ "${i}" = "debian" -o "${i}" = "all" ]; then
debmirror ${MIRROR_DIR}/debian/ \
--host=${DEB_HOST} \
--passive --method=ftp --root=debian --nocleanup\
--dist=${DEB_DISTS} \
${ARCHS} \
--section=${DEB_SECTIONS} \
--ignore=".*/disks-.*" --ignore="^tools/.*" --ignore="^doc/.*" --ignore="^project/.*" --ignore="^indices/.*" --ignore="^README.*" \
${DEBUG}
echo "Debmirror run successfully finished."
# Sync disks -- debmirror can't do it (yet)
for d in `echo "${DEB_DISTS}" | tr "," " "` ; do
for a in ${DEB_DISK_ARCHS} ; do
sync_disks ${d} ${a}
done
done
# Sync other top level files/dirs -- debmirror can't do it (yet)
sync_tlf ${DEB_HOST} debian "tools"
sync_tlf ${DEB_HOST} debian "doc"
sync_tlf ${DEB_HOST} debian "project"
sync_tlf ${DEB_HOST} debian "indices"
sync_tlf ${DEB_HOST} debian "README*"
fi
#
# debian-non-US
#
# if [ "${i}" = "debian-non-US" -o "${i}" = "all" ]; then
# echo "${i} DISABLED. Use s.t.h else."
# exit 1
#
# debmirror ${MIRROR_DIR}/debian-non-US/ \
# --host=${DEB_HOST_NONUS} \
# --passive --method=ftp --root=debian-non-US \
# --dist=${DEB_DISTS} \
# ${ARCHS} \
# --section=${DEB_SECTIONS_NONUS} \
# --ignore="^indices-non-US/.*" --ignore="^README.*" \
# ${DEBUG}
#
# echo "Debmirror run successfully finished."
#
# sync_tlf ${DEB_HOST_NONUS} debian-non-US "indices-non-US"
# sync_tlf ${DEB_HOST_NONUS} debian-non-US "README*"
# fi
#
#
# debian-security
#
if [ "${i}" = "security" -o "${i}" = "all" ]; then
# echo "${i} DISABLED. Use s.t.h else."
# exit 1
#
debmirror ${MIRROR_DIR}/debian-security/ \
--host=${SEC_HOST} \
--passive --method=ftp --root=debian-security --nocleanup\
--dist=${SEC_DISTS} \
${ARCHS} \
--section=${SEC_SECTIONS} \
--ignore="^indices/.*" --ignore="^README.*" \
${DEBUG}
echo "Debmirror run successfully finished."
sync_tlf ${SEC_HOST} debian-security indices
sync_tlf ${SEC_HOST} debian-security "README*"
fi
done
echo
echo "Sync run successfully finished."
exit 0
der workaround zum ziehen der disketten ist noch von meinem Woody mirror übrig geblieben. die fehlermeldung kannst du ignorieren.
die pfade sind noch auf "testing" und ich habe mir symlinks für Sarge und Stable drauf gelegt.
Der mirror wird nicht gecleant und es werden keine archs gezogen. alles in allem so um die 4,5GB.
ich habe 3 debian kisten im intranet und lasse alle von dem mirror updaten und upgraden. selbst ein dist-upgrade war problemlos möglich.
mit etwas umbau kann man sich auch wieder cd´s davon ziehen und selbstredend vom mirror installieren mit der netzinstall cd (nutze die buiss. cd mit knapp 100mb)
cu