New format of deb source code package

Source: Internet
Author: User
Tags gz file
Article Title: new format of deb source code package. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

This article is a reading note made by tumashu in man dpkg-source, which contains some introductions to the new format of deb source code. Some may be interested.

I. advantages of the new Lattice

Supports bzip2, lzma (estimated 7z format), and gzip compression formats
Supports multiple upstream tarbils
Binary files are supported. The old format uses the diff file (diff.gz) to store changes to the source code during packaging, while the diff file processes text files, therefore, if you want to add a binary file (such as a png icon), you need to use uencode to convert the binary file to a text file, which is troublesome.
You do not need to re-package the upstream tarball because of the strip debian directory (the debian directory is automatically replaced by the content in .debian .tar. {gz, bz2, lzma} when the deb source code package is decompressed)
The change in Debian-specific is not saved in a single. diff.gz file, but saved in multiple patch files under debian/patches. This processing method is compatible with the quilt processing method, but does not need to use quilt, because dpkg-source can handle all things and uses the patch file during the decompression process, update patch series during Binary Package Construction
NMU workflow is now really: unpack, hack, rebuild (for all 3.0 (quilt) packages ).
Ii. New lattice types

Type: 1.0
Type: 2.0
Format: 3.0 (native)
Format: 3.0 (quilt)
Formats: 3.0 (git)
Format: 3.0 (bzr)
Iii. Format: 1.0 Format Introduction

This is the original format: A. dsc file, a .orig.tar.gz file, a .diff.gz File

Iv. Format: 2.0 Format Introduction

This format is not recommended to be widely used. It is a transitional format.

V. Format: Introduction to the 3.0 (native) Format

This Format is extended by Format: 1.0 and supports multiple compression methods {gz, bz2, lzma}

Vi. Format: 3.0 (quilt) Format Introduction

This Format may be used by the next version of debian. It is an extension of Format: 2.0, because the patch processing method is compatible with quilt, so it is named

Source code package composition:

A. orig.tar. {gz, bz2, lzma} compressed package. This package is obtained after the upstream source code is renamed.
A. debian.tar. {gz, bz2, lzma} compressed package containing all debian changes
Zero or multiple. 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
One. dsc File
Decompress the source code package:

Orig package first decompress to generate a directory, such as: helloworld_0.1.1.orig.tar.gz will generate the helloworld-0.1.1 directory containing the upstream source code
All orig- Extract, generate a directory, such as: helloworld_0.1.1.orig-toy.tar.gz will generate helloworld-0.1.1/toy/directory, this directory contains all the content in the helloworld_0.1.1.orig-toy.tar.gz, the original helloworld-0.1.1/toy/will be replaced (man dpkg-source this paragraph does not understand, may understand wrong .)
Decompress the debian package to generate the debian directory, for example: helloworld_0.1.1.debian.tar.gz will generate the helloworld-0.1.1/debian/directory, the original directory will be deleted in this process .... Note: debian.tar. {gz, bz2, lzma} must contain a debian Directory, which can also contain binary files.
Application Patch: patches listed in the file debian/patches/debian. series or debian/patches/series. The patch must be patch-p1. The patch can also delete files. If some patches are applied during decompression, the debian/patch/. dpkg-source-applied file records them.
Similar to the default quilt, files can be deleted using patches.
Build source code package:

Update debian-changes- Patch: all source code packages (orig package, component package) in the current directory will be decompressed to a temporary directory, and then the debian directory will be copied to this temporary directory, and finally the debian-changes- All patches outside the patch, compared with the temporary directory and source code obtained patches (if different), will be saved as debian/patches/ Patch files, any changes to binary files will not appear in diff, otherwise the build will fail, unless the maintenance staff decides to include binary files in the debian package (relative to the source code directory, debian/source/include-binaries to list the names of added or changed binary files.) If binary files are found in the debian subdirectory, the build will also fail, unless the file name is already listed in debian/source/include-binaries.
Update debian.tar. {gz, bz2, lzma}: The debian package is regenerated through the updated debian directory and the modified binary file (listed ).
Note: The automatically generated diff does not contain changes to the VCS description file and many temporary files (refer to the-I option), for example, used by quilt. the pc directory is ignored when an automatic patch is generated.

VII. Format: 3.0 (git)

The source code format is experimental. It may be used in debian or next version, and may never be used ...... This is a combination of the source code package and Version Control System (git). For details, see man dpkg-source.

8. Format: 3.0 (bzr)

The source code format is experimental. It may be used in debian or next version, and may never be used ......... This is a combination of the source code package and Version Control System (bzr). For details, see man dpkg-source.

Linuxtoy.org/archives/deb-format.html "> http://linuxtoy.org/archives/deb-format.html

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.