* Use apt/preferences.d directory from git repository to provide the preferences.d system directory.

This commit is contained in:
gardouille 2015-09-21 17:41:54 +02:00
parent 151c2703f5
commit 2580d2b2ba
6 changed files with 70 additions and 72 deletions

View File

@ -15,4 +15,5 @@
* Disable Openvpn service (System tools for shell).
* No longer install nfs-kernel-server and samba. It will need a manual install.
* Add Debian repositories files from old-stable to experimental.
* Use sources-list.d directory from git repository to provide the sources-list.d system directory.
* Use apt/sources-list.d directory from git repository to provide the sources-list.d system directory.
* Use apt/preferences.d directory from git repository to provide the preferences.d system directory.

View File

@ -9,6 +9,11 @@ Script to complete the installation of Debian Sid on my laptop.
#### Apt configuration
##### preferences files
* Use apt/preferences.d directory from git repository to provide the preferences.d system directory.
* Default preferences: Sid < Stretch < Stable < Old-stable < Experimental
* Iceweasel/Icedove preferences: Experimental
##### sources-list files
* Use sources-list.d directory from git repository to provide the sources-list.d system directory.
* Add Wheezy (official + backports), Jessie (official + backports), Stretch (official), Sid (official + multimedia) and Experimental (official) repositories.

46
apt/preferences.d/default Normal file
View File

@ -0,0 +1,46 @@
#### Fichier généré à partir du script de post-installation
Explanation: Paquet de la branche main de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=main
Pin-Priority: 900
Explanation: Paquet de la branche contrib de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=contrib
Pin-Priority: 900
Explanation: Paquet de la branche non-free de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=non-free
Pin-Priority: 900
Explanation: Ensemble des paquets venant d'Experimental
Package: *
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 10
Explanation: Ensemble des paquets venant de Stretch (Testing)
Package: *
Pin: release o=Debian,a=testing,n=stretch,l=Debian
Pin-Priority: 310
Explanation: Ensemble des paquets venant de Jessie (Stable)
Package: *
Pin: release o=Debian,a=stable,n=jessie,l=Debian
Pin-Priority: 210
Explanation: Backports Jessie (Stable)
Package: *
Pin: release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports
Pin-Priority: 210
Explanation: Ensemble des paquets venant de Wheezy (Oldstable)
Package: *
Pin: release o=Debian,a=oldstable,n=wheezy,l=Debian
Pin-Priority: 110
Explanation: Backports Wheezy (Oldstable)
Package: *
Pin: release o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports
Pin-Priority: 110

View File

@ -0,0 +1,4 @@
Explanation: Version expérimentale d'Icedove
Package: icedove iceowl-extension
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 1001

View File

@ -0,0 +1,5 @@
Explanation: Version expérimentale d'Iceweasel
Explanation: xulrunner et libmozjs à incrémenter en fonction des versions
Package: iceweasel iceweasel-l10n-fr xulrunner-40 libmozjs40d
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 1001

View File

@ -530,86 +530,23 @@ APT::Cache-Limit 100000000;
APT::Default-Release "unstable";
EOF
## Backup initial sources.list
## Sources.list
### Backup initial
test -f /etc/apt/sources.list && mv /etc/apt/sources.list /etc/apt/sources.list.bkp
rm -f /etc/apt/sources.list\~
## Copy all local sources.list files
### Copy all local sources.list files
cp -f ./apt/sources-list.d/* /etc/apt/sources.list.d/
## Fichier de preferences
# Backup previous preferences file
## Preferences
### Backup initial
test -f /etc/apt/preferences && mv /etc/apt/preferences /etc/apt/preferences.bkp
# Default preferences
cat > /etc/apt/preferences.d/default << EOF
#### Fichier généré à partir du script de post-installation
Explanation: Paquet de la branche main de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=main
Pin-Priority: 900
Explanation: Paquet de la branche contrib de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=contrib
Pin-Priority: 900
Explanation: Paquet de la branche non-free de Sid (Unstable)
Package: *
Pin: release o=Debian,a=unstable,n=sid,l=Debian,c=non-free
Pin-Priority: 900
Explanation: Ensemble des paquets venant d'Experimental
Package: *
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 10
Explanation: Ensemble des paquets venant de Stretch (Testing)
Package: *
Pin: release o=Debian,a=testing,n=stretch,l=Debian
Pin-Priority: 310
Explanation: Ensemble des paquets venant de Jessie (Stable)
Package: *
Pin: release o=Debian,a=stable,n=jessie,l=Debian
Pin-Priority: 210
Explanation: Backports Jessie (Stable)
Package: *
Pin: release o=Debian Backports,a=jessie-backports,n=jessie-backports,l=Debian Backports
Pin-Priority: 210
Explanation: Ensemble des paquets venant de Wheezy (Oldstable)
Package: *
Pin: release o=Debian,a=oldstable,n=wheezy,l=Debian
Pin-Priority: 110
Explanation: Backports Wheezy (Oldstable)
Package: *
Pin: release o=Debian Backports,a=wheezy-backports,n=wheezy-backports,l=Debian Backports
Pin-Priority: 110
EOF
# Iceweasel preferences
cat > /etc/apt/preferences.d/iceweasel << EOF
Explanation: Version expérimentale d'Iceweasel
Explanation: xulrunner et libmozjs à incrémenter en fonction des versions
Package: iceweasel iceweasel-l10n-fr xulrunner-40 libmozjs40d
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 1001
EOF
# Icedove preferences
cat > /etc/apt/preferences.d/icedove << EOF
Explanation: Version expérimentale d'Icedove
Package: icedove icedove-l10n-fr iceowl-extension
Pin: release o=Debian,a=experimental,n=experimental,l=Debian
Pin-Priority: 1001
EOF
### Copy all local preferences files
cp -f ./apt/preferences.d/* /etc/apt/preferences.d/
aptitude update
check_output "Première mise à jour des dépôts"
check_output "Update Debian repositories"
## Installation de la clé pour le dépôt multimédia
# Restauration des sorties standard pour pouvoir confirmer l'installation de la clé