Outils pour utilisateurs

Outils du site


tech:notes_debmirror

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_debmirror [2025/11/11 16:21] Jean-Baptistetech:notes_debmirror [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Repo apt deb}}
 +
 +# Notes debmirror
 +
 +Voir :
 +* https://help.ubuntu.com/community/Debmirror
 +* http://wiki.dane.ac-versailles.fr/index.php?title=Utiliser_debmirror
 +* https://forum.ubuntu-fr.org/viewtopic.php?pid=3044707
 +* http://lgallardo.com/en/2012/12/06/como-crear-un-mirror-de-debian-y-ubuntu-con-debmirror/
 +* http://perso.ens-lyon.fr/sebastien.mei/wiki/doku.php?id=documentations:debmirror
 +* https://gist.github.com/kleinig/3110783
 +* https://www.debian-fr.org/t/miroir-depots-debian-debmirror/57321
 +* https://wiki.ordi49.fr/doku.php/en:tech:dev:debmirror
 +* https://www.tobanet.de/dokuwiki/debian:debmirror
 +* http://wiki.dane.ac-versailles.fr/index.php?title=Utiliser_apt-mirror
 +* http://www.linux-admins.net/2013/11/creating-official-debian-mirror-with.html
 +* https://github.com/selectel/mirror-sync/blob/master/deb-mirror
 +
 +
 +Voir aussi :
 +* [[GPG Trust - Faire confiance à une clef sans la signer]]
 +* [[Notes Cobbler|Cobbler]]
 +* reprepro [[Dépôt Debian APT repository]]
 +
 +Bug rsync même pour http/ftp :
 +* https://bugs.launchpad.net/ubuntu/+source/debmirror/+bug/882941
 +* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625696
 +* http://permalink.gmane.org/gmane.linux.debian.devel.bugs.general/1084578
 +
 +~~~bash
 +cp -p /usr/bin/debmirror{,.old}
 +~~~
 +
 +`/usr/bin/debmirror`
 +~~~bash
 +#! /bin/bash
 +
 +/usr/bin/debmirror.old --rsync-extra=none $*
 +~~~
 +
 +Exemple de fichier de conf
 +
 +`/etc/debmirror.conf`
 +~~~perl
 +# Output options
 +$verbose=1;
 +$progress=1;
 +$debug=1;
 +
 +
 +# Download options
 +$host="archive.ubuntu.com";
 +
 +#$user="anonymous";
 +#$passwd="anonymous@";
 +#$remoteroot="debian";
 +#$download_method="ftp";
 +$download_method="http";
 +
 +
 +#@sections="main,main/debian-installer,contrib,non-free";
 +@sections="main,debian-installer,contrib,non-free";
 +@arches="amd64";
 +
 +
 +$omit_suite_symlinks=0;
 +$skippackages=0;
 +$i18n=0;
 +$getcontents=0;
 +$do_source=1;
 +$max_batch=0;
 +$state_cache_days=0;
 +
 +
 +# Security/Sanity options
 +
 +# C'était quoi la config par défault déjà ?
 +#$ignore_release_gpg=1;
 +
 +$ignore_release=0;
 +$check_md5sums=0;
 +$ignore_small_errors=0;
 +
 +# C'était quoi la config par défault déjà ?
 +$cleanup=1;
 +$post_cleanup=1;
 +
 +$timeout=300;
 +
 +#$proxy="http://proxy:8080/";
 +
 +$dry_run=0;
 +$diff_mode="use";
 +
 +# The config file must return true or perl complains.
 +# Always copy this.
 +1;
 +~~~
 +
 +
 +## Debmirror pour Cobbler
 +
 +Laisser la conf par défaut.
 +Juste commenter les lignes suivantes `@dists=` et `@arches=` :
 +
 +`/etc/debmirror.conf`
 +~~~perl
 +@dists="sid";
 +@arches="i386";
 +~~~
 +
 +Devient
 +`/etc/debmirror.conf`
 +~~~perl
 +#@dists="sid";
 +#@arches="i386";
 +~~~
 +
 +Puis si `cobbler check` affiche toujours un avertissement sur debmirror, redémarrer le service cobblerd
 +
 +
 +## Miroir Debian complet 
 +
 +`maj_depoots_debian.sh`
 +~~~bash
 +#!/bin/bash -x
 +## Simple debmirror update script 
 +http_proxy="http://user:P@ssw0rd@192.168.56.1:3128/"
 +hote="ftp.fr.debian.org"
 +racine="debian/"
 +methode="rsync"
 +#distribution="jessie,jessie-updates,wheezy,wheezy-updates"
 +distribution="stretch"
 +#sections="main,main/debian-installer,contrib,non-free"
 +sections="main,contrib,non-free"
 +destination="/media/cache/debian9/"
 +#architecture="amd64,i386,armhf"
 +architecture="amd64"
 +
 +## Synchronisation du mirroir local avec ftp.fr.debian.org
 +/usr/bin/debmirror --i18n --nosource -m -e --passive --host=$hote --root=$racine --method=$methode --getcontents --progress --dist=$distribution --ignore-release-gpg --section=$sections --arch=$architecture --cleanup --diff=none $destination
 +~~~
 +
 +## Autres 
 +
 +### Exemples 
 +
 +~~~bash
 +debmirror --nosource --progress --md5sums -h ftp.fr.debian.org -e rsync -r :debian -d testing --getcontents /home/debian_mirror/ --ignore-release-gpg
 +
 +debmirror -v --method=http -a amd64 --no-check-gpg --exclude='/*' --include='/python3-websocket.*$' -d bionic,bionic-security,bionic-updates --nosource mirror
 +
 +debmirror --method=http --host=ppa.launchpad.net --root=wgrant/experimental/ubuntu --dist xenial --section=main --arch=amd64 --rsync-extra=none --i18n --verbose --ignore-release-gpg tmp-wgrant-experimental
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki