Dépôts


Q : Comment ajouter des dépôts supplémentaires ?

  1. Lire Notes Générales
  2. sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
    sudo gedit /etc/apt/sources.list
  3. Chercher cette partie
    ...
    ## Uncomment the following two lines to fetch updated software from the network
    # deb http://us.archive.ubuntu.com/ubuntu hoary main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu hoary main restricted

    ## Uncomment the following two lines to fetch major bug fix updates produced
    ## after the final release of the distribution.
    # deb http://us.archive.ubuntu.com/ubuntu hoary-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu hoary-updates main restricted

    ## Uncomment the following two lines to add software from the 'universe'
    ## repository.
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    # deb http://us.archive.ubuntu.com/ubuntu hoary universe
    # deb-src http://us.archive.ubuntu.com/ubuntu hoary universe

    # deb http://security.ubuntu.com/ubuntu hoary-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted

    # deb http://security.ubuntu.com/ubuntu hoary-security universe
    # deb-src http://security.ubuntu.com/ubuntu hoary-security universe
  4. Remplacer ces lignes par celles-ci
    ## Uncomment the following two lines to fetch updated software from the network
    deb http://fr.archive.ubuntu.com/ubuntu hoary main restricted
    deb-src http://fr.archive.ubuntu.com/ubuntu hoary main restricted

    ## Uncomment the following two lines to fetch major bug fix updates produced
    ## after the final release of the distribution.
    deb http://us.archive.ubuntu.com/ubuntu hoary-updates main restricted
    deb-src http://fr.archive.ubuntu.com/ubuntu hoary-updates main restricted

    ## Uncomment the following two lines to add software from the 'universe'
    ## repository.
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    deb http://fr.archive.ubuntu.com/ubuntu hoary universe
    deb-src http://fr.archive.ubuntu.com/ubuntu hoary universe

    deb http://security.ubuntu.com/ubuntu hoary-security main restricted
    deb-src http://security.ubuntu.com/ubuntu hoary-security main restricted

    deb http://security.ubuntu.com/ubuntu hoary-security universe
    deb-src http://security.ubuntu.com/ubuntu hoary-security universe

    deb http://fr.archive.ubuntu.com/ubuntu hoary multiverse
    deb-src http://fr.archive.ubuntu.com/ubuntu hoary multiverse

    deb ftp://ftp.nerim.net/debian-marillat stable main
    deb ftp://ftp.nerim.net/debian-marillat unstable main
    deb ftp://ftp.nerim.net/debian-marillat testing main
  5. Sauvegarder le fichier (exemple)
  6. gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 1F41B907
    gpg --armor --export 1F41B907 | sudo apt-key add -
    sudo apt-get update

Q : Comment ajouter les "backports" dans vos dépôts (optionnel) ?

  1. Lire Notes Générales
  2. Lire Comment ajouter des dépôts supplémentaires ?
  3. sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
    sudo gedit /etc/apt/sources.list
  4. Ajouter ces lignes à la fin du fichier
    deb http://backports.ubuntuforums.org/backports hoary-backports main universe multiverse restricted
    deb http://backports.ubuntuforums.org/backports hoary-extras main universe multiverse restricted
  5. Sauvegarder le fichier (exemple)
  6. sudo apt-get update

Q : Comment sauvegarder/restaurer les paquets déjà téléchargés en cache ?

  1. Lire Notes Générales
  2. Pour sauvegarder les paquets déjà téléchargés
    mkdir -p $HOME/backup/var/lib/
    sudo cp -R /var/lib/apt/ $HOME/backup/var/lib/
    mkdir -p $HOME/backup/var/cache/
    sudo cp -R /var/cache/apt/ $HOME/backup/var/cache/
    mkdir -p $HOME/backup/etc/apt
    sudo cp -R /etc/apt/ $HOME/backup/etc/
    sudo chown -R $USER $HOME/backup/
  3. Pour restaurer les paquets déjà téléchargés
    sudo cp -fR $HOME/backup/var/* /var/
    sudo cp -fR $HOME/backup/etc/apt/* /etc/apt/