lokaler mirror von sarge cds

Warum Debian und/oder eine seiner Spielarten? Was muss ich vorher wissen? Wo geht es nach der Installation weiter?
Antworten
filou
Beiträge: 190
Registriert: 02.02.2004 21:21:40

lokaler mirror von sarge cds

Beitrag von filou » 28.09.2005 09:50:53

Moin,

ich möchte gerne mittels der 14 Sarge CDs mir einen lokalen mirror erstellen.
Der Eintrag für die sources.list sollte dann aber in etwa so aussehen:

Code: Alles auswählen

deb ftp://install/debian sarge main contrib non-free
Wobei install der dns Namen des lokalen ftp Server darstellt.

Jetzt weiß ich nicht, wie ich am besten die CDs auf Platte kopieren soll. Einfach mit

Code: Alles auswählen

 cp -a /mnt/cdrom /verzeichnis
Dabei werden doch wieder Dateien überschrieben ?! Und ich brauche doch auh noch einen Contents.....gz, oder ?

Mit debmirror mir einen Spiegel aufzusetzen scheitert leider immer bei ca. 50%. Deshalb diese Methode.

mfg

Comadevil
Beiträge: 107
Registriert: 19.01.2005 17:31:02

Beitrag von Comadevil » 28.09.2005 10:57:16

Vielleicht hilft dir auch ein How-TO für debmirror weiter

http://www.lug-untermain.de/howto/debmirror.php

filou
Beiträge: 190
Registriert: 02.02.2004 21:21:40

Beitrag von filou » 28.09.2005 11:27:21

Hi Comadevil,

das HowTo ist gut, aber leider hilft es im Moment nicht weiter.

Egal, ich habe mir jetzt die Verzeichnisstruktur vuf ftp.de.debian.org angesehen und lokal erstellt.
Nun kopiere ich von CD die Sektion main, contrib, non-free in die jeweiligen Verzeichnisse.
Anschliesend ein dpkg-scanpkgs für main, contrib und non-free.
Die entstehende Packages.gz kopiere ich dann jeweils unter /debian/dists/sarge/contrib, main, non-free.

Von ftp.de.debian.org kopiere ich mir noch das jeweilige Release - File. Bis jetzt klappt alles wunderbar. Mag sein das es auch einfacher geht, jedach komme ich zurecht.

mfg

moscito
Beiträge: 6
Registriert: 23.12.2004 14:41:46

Beitrag von moscito » 01.10.2005 01:40:48

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

moscito
Beiträge: 6
Registriert: 23.12.2004 14:41:46

Beitrag von moscito » 01.10.2005 01:50:52

oh, habe eben gesehen das die mirrors nun alle die "testing" nicht mehr per symlink auf SARGE linken sondern auf ETCH.
also einfach im script ändern.

hätte beinahe auch so gespiegelt :-)

Antworten