{{tag>version-8-08}} ====== Remastering du CD/DVD quand on touche aux fichiers deb ====== Si vous touchez aux fichiers deb du cd/dvd il faut absolument suivre les indications suivantes: Les fichiers Release.gpg sont GPG signés. Si vous modifiez un fichier et que vous ne recréez pas un nouveau fichier signé, le système APT refusera d'installer votre nouveau paquet - il jugera le paquet corrompu ! Pour que vous puissiez faire cela il faut entre autres (je n'ai pas le temps de tout documenter, il faudrait y revenir lors d'une formation @ryxeo) : Créer un répertoire /opt/cd-image et y copier tout le contenu du cédérom d'installation: mkdir -p /opt/cd-image cp -rT /cdrom /opt/cd-image Créer votre paquet deb avec votre clé gpg cd /opt/build sudo apt-get install fakeroot apt-get source ubuntu-keyring cd ubuntu-keyring-2005.01.12.1/keyrings gpg --import < ubuntu-archive-keyring.gpg gpg --list-keys "Votre nom" gpg --export FBB75451 437D05B5 VOTREIDENTIFIANTDECLE > ubuntu-archive-keyring.gpg cd .. dpkg-buildpackage -rfakeroot -m"Votre Nom -kVOTREIDENTIFIANTDECLE cd .. cp ubuntu-keyring*deb /cd-image/pool/main/u/ubuntu-keyring === Re-créer le dépôt avec apt-ftparchives === * Fichier /opt/apt-ftparchive/release.conf APT::FTPArchive::Release::Origin "Ubuntu"; APT::FTPArchive::Release::Label "Ubuntu"; APT::FTPArchive::Release::Suite "dapper"; APT::FTPArchive::Release::Version "6.06"; APT::FTPArchive::Release::Codename "dapper"; APT::FTPArchive::Release::Architectures "i386"; APT::FTPArchive::Release::Components "main restricted"; APT::FTPArchive::Release::Description "Ubuntu 6.06 LTS"; * Fichier /opt/apt-ftparchive/apt-ftparchive-deb.conf Dir { ArchiveDir "/opt/cd-image/"; }; TreeDefault { Directory "pool/"; }; BinDirectory "pool/main" { Packages "dists/dapper/main/binary-i386/Packages"; BinOverride "/opt/indices/override.dapper.main"; ExtraOverride "/opt/indices/override.dapper.extra.main"; }; BinDirectory "pool/restricted" { Packages "dists/dapper/restricted/binary-i386/Packages"; BinOverride "/opt/indices/override.dapper.restricted"; ; Default { Packages { Extensions ".deb"; Compress ". gzip"; }; }; Contents { Compress "gzip"; }; * Fichier /opt/apt-ftparchive/apt-ftparchive-udeb.conf Dir { ArchiveDir "/opt/cd-image/"; }; TreeDefault { Directory "pool/"; }; BinDirectory "pool/main" { Packages "dists/dapper/main/debian-installer/binary-i386/Packages"; BinOverride "/opt/indices/override.dapper.main.debian-installer"; }; BinDirectory "pool/restricted" { Packages "dists/dapper/restricted/debian-installer/binary-i386/Packages"; BinOverride "/opt/indices/override.dapper.restricted.debian-installer"; }; Default { Packages { Extensions ".udeb"; Compress ". gzip"; }; }; Contents { Compress "gzip"; }; BUILD=/opt/cd-image/ APTCONF=/opt/apt-ftparchive/release.conf DISTNAME=dapper pushd $BUILD apt-ftparchive -c $APTCONF generate /opt/apt-ftparchive/apt-ftparchive-deb.conf apt-ftparchive -c $APTCONF generate /opt/apt-ftparchive/apt-ftparchive-udeb.conf # si vous avez ajoute une branche extra ...apt-ftparchive -c $APTCONF generate /opt/apt-ftparchive/apt-ftparchive-extra.conf apt-ftparchive -c $APTCONF release $BUILD/dists/$DISTNAME > dists/dapper/Release gpg --default-key "E5DD0910" --output $BUILD/dists/$DISTNAME/Release.gpg -ba $BUILD/dists/$DISTNAME/Release find . -type f -print0 | xargs -0 md5sum > md5sum.txt popd