Saturday, May 7, 2011

The new format of the source packages deb

In this article the reader tumashu mandpkg-source process for reading notes containing the deb source some of the new format, maybe a friend is interested.

I. benefits of the new format support bzip2, lzma (7z format is estimated), gzip compression format supports multiple upstream tarballs containing binary files, use the old format diff files (diff.gz) to store the package in the source code changes, but the diff file is a text file, so if you want to add a binary file (for example, png icon), you need to use the uuencode converts the binary file as a text file, the more trouble not needed because stripdebian directory and repackage the upstream tarball (debian directory in the source code package unzip deb when automatically .debian.tar. {Gz, bz2, lzma} inside content replace) the change isn't Debian-specific is saved in a single .diff.gz files but saved in debian/patches/multiple patch files. That approach and quilt approach compatible but do not need to use quilt as dpkg-source can handle all the things that extract the patch files during use, in the process of building binary packages in update patchseriesNMUworkflowisnowreally: unpack, hack, rebuild (forall3.0 (quilt) packages). II. new format type Format: 1.0Format: 2.0Format: 3.0 (native) Format: 3.0 (quilt) Format: 3.0 (git) Format: 3.0 (bzr) Sam .Format: 1.0 format describes the format of this is the original: a .dsc files, a file, a .orig.tar.gz .diff.gz file four .Format: 2.0 format describes this formatting is not recommended for wide use, is a transitional form five .Format: 3.0 (native) format describes the format is an extension of the Format: 1.0, can support a variety of compression methods {gz, bz2, lzma} six .Format: 3.0 (quilt) format describes this formatting may be the next version of debian, it is an extension of the Format: 2.0 because it patches are handled and quilt compatible, so naming the source code package: a .orig.tar. {Gz, bz2, lzma} compressed packages, this package is the upstream source code was changed from a .debian.tar. {Gz, bz2, lzma} compressed packages, this package contains a debian-based all changes of zero or more .orig-.tar. { Gz, bz2, lzma}, for example: .orig-hello.tar. {Gz, bz2, lzma} or .orig-world.tar. {gz,bz2,lzma}。 This is to support multiple upstream tarball .dsc file source package a decompression: first extracting orig package, create a directory, such as: helloworld_0.1.1.orig.tar.gz will build the helloworld-0.1.1-this contains all the upstream source code directory unzip orig-to produce a directory, such as: helloworld_0.1.1.orig-toy.tar.gz will build the helloworld-0.1.1/toy/directory, this directory contains helloworld_0.1.1.orig-toy.tar.gz inside all of the content, the original existing helloworld-0.1.1/toy/will be replaced (this paragraph no mandpkg-source read, probably had misunderstood. Unzip the package, debian) generate debian directory, for example: helloworld_0.1.1.debian.tar.gz will build the helloworld-0.1.1/debian/directory that exists in this directory in this process will be deleted …. Note: debian.tar. {Gz, bz2, lzma} which must contain a debian directory, it can also contain binary files. Apply patch: file debian/patches/debian.series or debian/patches/series which set out the patch. Patch must be patch-p1. Patches can also delete the file. If you extract the process applied some patches to debian/patch/.dpkg-source-applied file will record them. And the default quilt, used here is similar to the patch you can also delete the file structure of the source code package: updated debian-changes-patch: current directory all source packages (orig package component package) will be extracted to a temporary directory, and then copy the debian directory to the temporary directory on the last beat inter debian-changes-all patch patch, compare the proceeds of the temporary directory and the source patches (if different), will be saved as debian/ patches/N > patch file, any binary file changes do not appear in the diff, otherwise it will cause the build to fail, unless the maintenance personnel decisions in the debian package contains binary file (relative to the source code directory, in the debian/source/include-binaries lists add or change the file name of the binary file) if found debian subdirectory there is a binary file, the build will fail unless the file name is already in the debian/source/include-binaries lists. Update debian.tar. {Gz, bz2, lzma}: by updating the Debian directory and changed binary files (listed) will rebuild debian package Note: automatic generation of diff does not contain VCS description file and many temporary files (reference-I option), such as: quilt using .pc directory during the build automatically patch will be ignored. Seven .Format: 3.0 (git) from the source format is experimental in nature, may be in debian's inferior or inferior next release, maybe never use ... This is the source code package and version control system (git), the combination of specific details please: mandpkg-source. Eight .Format: 3.0 (bzr) source code is formatted with the experimental in nature, may be in debian's inferior or inferior next release, maybe never use ... This is the source code package and version control systems (bzr), the combination of specific details please: mandpkg-source. Original link: http://linuxtoy.org/archives/deb-format.tml

No comments:

Post a Comment