Play Deb bag, create apt source warehouse

Source: Internet
Author: User

How to make a Deb package and the corresponding software warehouse, in fact this is very simple. It is recommended that you use Dpkg to create, edit, and make Deb packages.

First look at the file structure of the Deb package:

The structure inside the Deb package, it has Debian and software specific installation directory (such as etc, USR, opt, tmp, etc.). There is at least a control file in the Debian directory, followed by Postinst (postinstallation), POSTRM (Postremove), Preinst (preinstallation), Prerm ( Preremove), Copyright (copyright), Changlog (Revision Records) and Conffiles.

Control: This file mainly describes the name of the package (Package), version, and description (Description), and so on, which is a descriptive file that the Deb package must have to facilitate the installation management and indexing of the software. At the same time, in order to be able to fully manage the package, you may also have the following fields:

Section: This field affirms the category of software, common have ' utils ', ' net ', ' mail ', ' text ', ' x11′ etc.

Priority: This field affirms the importance of the software to the system, such as ' required ', ' standard ', ' optional ', ' extra ', etc.

Essential: This field declares whether the system is the most basic package (option is), if it is, this means that the software is to maintain the system stable and normal operation of the package, do not allow any form of uninstall (unless a mandatory uninstall)

Architecture: Declare the package structure, such as based on ' i386′, ' m68k ', ' SPARC ', ' alpha ', ' PowerPC ' and so on, options for;

Source: The source name of the package;

Depends: Other packages and library files that the software relies on. If you are relying on multiple packages and library files, separate them with commas;

Pre-depends: Software must install, configure dependencies of the package and library files before installation, it is often used for the required pre-run script requirements;

Recommends: This field indicates the recommended installation of other packages and library files;

Suggests: Other packages and library files that are recommended for installation.

For control, here's a complete example:

Package:bioinfoserv-arb

Version:2007_14_08

Section:bioinfoserv

Priority:optional

Depends:bioinfoserv-base-directories (>= 1.0-1), XVIEWG (>= 3.2p1.4), XFig (>= 1-3), libstdc++2.10-glibc2.2

Suggests:fig2ps

Architecture:i386

installed-size:26104

Maintainer:mingwei Liu

Provides:bioinfoserv-arb

Description:the ARB Software is a graphically oriented package comprising various tools for sequence database handling a d Data Analysis.

If you are want to print your graphs your probably need to install the suggested fig2ps.

Preinst: This file is the work to be done before the software is installed, and the execution of the work will be based on the script;

Postinst This file contains the configuration work that the software needs to perform after copying the normal directory files to the system.

Prerm: Scripts to be executed before software is unloaded

POSTRM: Scripts to execute after software uninstall

Now look at how to revise an existing Deb package software

If you have obtained bioinfoserv-base-directories_1.1-22_i386.deb from this bioinfoserv Deb warehouse, use Dpkg-x Bioinfoserv-base-directories_ 1.1-22_i386.deb bioinfoserv-base-directories

This allows you to unpack the packaged bioinfoserv-base-directories_1.1-22_i386.deb in the Bioinfoserv-base-directories directory, at which time the unpacked package The Bioinfoserv-base-directories directory is a list of files and corresponding files.

Using DPKG-E bioinfoserv-base-directories_1.1-22_i386.deb Bioinfoserv-base-directories/debian

At this point, you can unlock the Bioinfoserv-base-directories_1.1-22_i386.deb software package rules file, you can see the control, POSTRM, and other files containing scripts, if you want to modify the software information and installation behavior, Then open the files and make the changes.

Modification completed, you can use Dpkg-b bioinfoserv-base-directories bioinfoserv-base-directories_1.1-22_i386.deb to repackage the package.

How do I package deb from source?

This can refer to the Deb package.

How do I make a deb warehouse?

A simple Deb warehouse can be used apt-get install * for fast Software installation. The production of a software package warehouse is actually very simple:

First, put the made Deb package in a directory, and of course you can also build a subdirectory based on the name of the software, and then store the Deb package, as you build a version1.1-xubuntu6.06 directory to store the packages you've built.

Then, using sudo dpkg-scanpackages version1.1-xubuntu6.06/dev/null | gzip-9c >packages.gz Build the warehouse index file

Then, untie packages.gz to edit: gzip-d packages.gz, get Packages file at this time

Editor, Nano Packages, replaces the version1.1-xubuntu6.06/field in Packages with a replacement function, and then saves

Repackage the gzip Packages packages.gz into the directory version1.1-xubuntu6.06.

Now set the warehouse source in the/etc/apt/sources.list, if the version1.1-xubuntu6.06 directory is under/var/www/version1.1-xubuntu6.06 in your system, it can be/etc/apt/ Sources.list Add:

Deb file:////var/www/Version1.1-Xubuntu6.06//

After saving, with the Apt-get update update, you can use the Apt-get install Bioinfoserv-base-directories_1.1-22_i386.deb to install the Deb software you created.

Of course, if you need to publish this software warehouse to the Internet, assuming that your network address is http://cydia.reyo.cn, its Internet access path is http://cydia.reyo.cn/bioinfoservdeb/ version1.1-xubuntu6.06, then add in/etc/apt/spurce.list:

Deb Http://cydia.reyo.cn/BioinfoServD ... buntu6.06//

At this point, other people can use your Deb repository using the Internet.

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.