wiki/HowtoDebian/Backports.md

105 lines
3.2 KiB
Markdown
Raw Normal View History

2016-12-29 11:25:39 +01:00
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
# Howto Debian backports
2017-03-14 01:20:31 +01:00
Une distribution stable de Debian garde en permanence (ou presque) les mêmes versions des logiciels (c'est le principe d'une version stable). Certaines versions plus récentes sont néanmoins distribuées via des paquets Debian de _backports_.
2016-12-29 11:25:39 +01:00
## Utilisation
2017-03-14 01:20:31 +01:00
Pour disposer des backports, on ajoutera le dépôt Debian Backports dans un fichier `/etc/apt/sources.list.d/backports.list` :
2016-12-29 11:25:39 +01:00
~~~
2017-02-06 14:11:46 +01:00
deb http://mirror.evolix.org/debian jessie-backports main
2016-12-29 11:25:39 +01:00
~~~
2017-03-14 01:20:31 +01:00
On utilisera le _pinning APT_ pour bénéficier des mises-à-jour régulières en créant le fichier `/etc/apt/preferences.d/backports` ainsi, par exemple pour les paquets Samba :
2016-12-29 11:25:39 +01:00
~~~
Package: *
Pin: release n=jessie-backports
2016-12-29 11:25:39 +01:00
Pin-Priority: 50
Package: samba samba-common samba-common-bin libwbclient0
Pin: release n=jessie-backports
2016-12-29 11:25:39 +01:00
Pin-Priority: 999
~~~
2017-03-14 01:20:31 +01:00
2016-12-29 11:25:39 +01:00
## Mise-à-jour du noyau Linux
Pour Squeeze :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
2017-03-14 01:20:31 +01:00
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
2016-12-29 11:25:39 +01:00
~~~
~~~
# aptitude install linux-image-3.2.0-0.bpo.4-amd64 initramfs-tools=0.99~bpo60+1 linux-base=3.4~bpo60+1 firmware-bnx2=0.36+wheezy.1~bpo60+1
~~~
2018-04-17 16:48:35 +02:00
## [Stretch] Créer une image CD netinst avec un kernel backporté stretch-backports
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 16:48:35 +02:00
# apt build-dep debian-installer
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 17:35:20 +02:00
~~~
# dpkg-checkbuilddeps
~~~
2016-12-29 11:25:39 +01:00
~~~
$ apt-get source debian-installer
2018-04-17 16:48:35 +02:00
$ cd debian-installer-20170615+deb9u3/build
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 16:48:35 +02:00
Éditer le fichier ./build/config/amd64.cfg:
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 16:48:35 +02:00
KERNELVERSION = 4.15.0-0.bpo.2-amd64
KERNELMAJOR = 4.15
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 17:35:20 +02:00
Éditer le fichier ./build/config/common:
~~~
LINUX_KERNEL_ABI ?= 4.15.0-0.bpo.2
DEBIAN_RELEASE = stretch
USE_UDEBS_FROM ?= stable
~~~
2018-04-17 16:48:35 +02:00
Éditer le fichier ./build/sources.list.udeb.local :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 16:48:35 +02:00
deb http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch main/debian-installer
deb http://deb.debian.org/debian stretch-backports main/debian-installer
~~~
~~~
# make reallyclean
# fakeroot make build_netboot
2018-04-17 17:35:20 +02:00
[...]
install -m 644 -D ./tmp/netboot/mini.iso dest/netboot/mini.iso
update-manifest dest/netboot/mini.iso "tiny CD image that boots the netboot installer" ./tmp/netboot/udeb.list
~~~
Si tout se passe bien, vous obtiendrez un nouvel ISO:
~~~
$ file ./tmp/netboot/mini.iso dest/netboot/mini.iso
./tmp/netboot/mini.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 240, 832 sectors; partition 3 : ID=0x1, start-CHS (0x25,0,1), end-CHS (0x2a,63,32), startsector 75776, 12288 sectors
dest/netboot/mini.iso: DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 240, 832 sectors; partition 3 : ID=0x1, start-CHS (0x25,0,1), end-CHS (0x2a,63,32), startsector 75776, 12288 sectors
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 17:35:20 +02:00
Pour copier le fichier ISO sur une clé USB:
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
2018-04-17 17:35:20 +02:00
$ cat dest/netboot/mini.iso > /dev/sdX
$ fdisk -l /dev/sdX
Disque /dev/sdX : 14,6 GiB, 15664676864 octets, 30595072 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x0421e6d7
2016-12-29 11:25:39 +01:00
~~~