[ ����� ] [ ���������� ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ ������ ]


The Debian GNU/Linux FAQ
����� 6 - ������ ������� ���������� �������� Debian


6.1 ��� ����� ����� Debian?

������ ������ �������� ��� ����� ����������� ��� ���������� ������������� ������ �������. ���� ��� ���� ������� Debian:

��� ��������� ������������ ����������� ������� ���������� �������� ���������� "�����������" (dependencies), ������� ��������� ���������� �������������� �����. ��� ����������� ������� � ����� control, ��������� � ������ �������. �������� ����� ���������� GNU ���������� C (gcc) "�������" �� ������ binutils, � ������� ���������� ����������� � ���������. ���� ������������ ���������� ���������� gcc �� ���� ��� ��������� binutils, �� ������� ���������� �������� (dpkg) ������ ��������� �� ������, ���������� �������� �� ������������� ���������� binutils, � ������� ��������� ������. (������, ��� ����������� ����� ���� ��������� ����������� �������������, ��. dpkg(8).) ����� �������� ������ ���� � ��� ������������� ������, ��� ����� �������/�����������/������������/�����������/��������/������������� (Depends/Recommends/Suggests/Conflicts/Replaces/Provides) ������ �����?, ������ 6.9.

����������� ���������� �������� Debian ����� �������������� ���:


6.2 ����� ������ � �������� ������� Debian?

"�����" Debian, ��� ����� Debian, �������� ���������� �����, ���������� � ������������ ��������� � ������������ ������� �������� ��� � ���������� ��������������� ��������. ��� �������, ���� ������ Debian ����� ���������� .deb.

���������� ������ �������� ������� Debian ������ � �������� ����������� deb(5). ���� ���������� ������ ����� ���� ������� (� ��������� �������� Debian GNU/Linux), ������� ������ ����������� dpkg-deb(1) ��� ��������� ����������� � ������� .deb.


6.3 ������ � ������� Debian ����� ������� �����?

����� �������� ������� Debian ������������� ���������� ����������: <foo>_<VersionNumber>-<DebianRevisionNumber>.deb

�������, ��� foo ���������� ������ ������. ��� �������� ����� ������ ���������� � ���������� .deb ������ ����� ��������������� ���������� ��������:

��������� VVV -- ����� ������ ������������ ������������ ���������. �� ������ ������ ��� ����� ���� �����������, �� ����� ���� ���������, ����., "19990513" ��� "1.3.8pre1".

��������� RRR ����� ������� Debian, ������������ ������������� Debian (��� ���������� �������������, ���� ��� ����� ��������� ����� ���). ���� ����� ������������� ���������� �����������, �������� ��������� �����, ���, ��� ������ ����������, ������, �������� ��������� � Debian Makefile (debian/rules), ����������� ���� Debian (debian/control), �������� ���������� � �������� (debian/p*), ��� � ����� ������������ ������������ � �������.


6.4 ��� ��� �� ����������� (control) ���� Debian?

������������ ����������� ������������ ����� Debian ���������� � "����������� �� ������� Debian" (Debian Packaging manual), ����� 4, ��. ����� �ݣ ������������ ���������� ��� ������� Debian?, ������ 11.1.

�������� ������ ����� control ��� ������ Debian hello �������� ����:

     Package: hello
     Priority: optional
     Section: devel
     Installed-Size: 45
     Maintainer: Adam Heath <doogie@debian.org>
     Architecture: i386
     Version: 1.3-16
     Depends: libc6 (>= 2.1)
     Description: The classic greeting, and a good example
      The GNU hello program produces a familiar, friendly greeting.  It
      allows nonprogrammers to use a classic computer science tool which
      would otherwise be unavailable to them.
      .
      Seriously, though: this is an example of how to do a Debian package.
      It is the Debian version of the GNU Project's `hello world' program
      (which is itself an example for the GNU Project).

���� Package ���������� ��� ������. ��� ��� �� �������� ����������� ��������� �������� ����� ��� ����������. ������ ����� ��, �� �� �����������, ��� ������ ����� ����� ����� ������ Debian.

���� Version ���������� ������ ������������ � (� ��������� ����������) ����� ������� ������ ������ ��������� ��� �������� � ������ � ������� Debian ����� ������� �����?, ������ 6.3.

���� Architecture ���������� ��� ���������� ��� �������� ��� ������������� ������ �����.

���� Depends �������� ������ �������, ������� ������ ���� ����������� ��� �������� ��������� ������� ������.

Installed-Size ���������� ������� ��������� ������������ ������ ������������� �����. ���� �������� ����� �������������� ����������� ��������� ��� ����������� ����������� ��������� ������������.

������ Section ���������� "������", � ������� �������� ����� Debian �� FTP �������. ��� ��� ����������� (� ����� �� �������� ���������, ��. ��� �������� �������� � FTP-������� Debian?, ������ 5.1) � ������� �������� �����.

���� Priority ���������� ��������� ������ �������� ����� ��� ���������; ��������� ���������, ����., dselect ��� console-apt ����� ����������� ������ �� ����������. ��. ��� ����� ���������/������/�����������/��������������/�������������� (Required/Important/Standard/Optional/Extra) �����?, ������ 6.7.

� ���� Maintainer ������ e-mail ����� ��������, �������������� �� ��������� ������� ������.

� ���� Description ������ ������� �������� ������������, ��������������� �������.

��� ����� ��������� ���������� � �����, ������� ����� ����� �����, �������� ����� 4 ����������� �� ������� Debian, "����������� ����� � �� ����."


6.5 ��� ����� Debian conffile?

Conffile �������� ������ ������ ������������ (������ ���������� � /etc), ������� ������� ���������� �������� �� ����� �������������� ��� ���������� ������. ��� �����������, ��� ���������� ������ ������������ ����� ��������� � ��������� ��������� ������ �� �������� ������ �������.

����� ����� ����������, ����� ����� ����������� ��� ����������, ���������:

     dpkg --status package

� �������� � ������ "Conffiles:".


6.6 ��� ��� �� �������� preinst, postinst, prerm � postrm?

��� ����������� ��������, ������� ������������� ����������� ����� ��� ����� ��������� ������. ������ � ������ control, ��� ����� �������� ������ "������������" ������� ��������� ����� Debian.

����� ��������:

preinst

������ �������� ����������� ����� ���, ��� ����� ����� ���������� �� .deb �����. ������ �������� 'preinst' ������������� �������, ������� ����� ��������� �������, �� ���������� ��������� ��� ����������.

postinst

���� ��������, ������, ��������� ��������� ��������� ������ ����� ����, ��� �� ��� �������� �� .deb �����. �����, �������� 'postinst' ����������� � ������������ ��������� ��������� �/��� ������������� ������������, ��� ���� �� ������ �������� ��-���������, �� ����� ��������� ������������������� �����. ������ �������� ����� 'postinst' ��������� �������, ����������� ��� ������� ��� ����������� ������� ����� ��������� ��� ���������� ������.

prerm

���� ��������, ������, ������������� ���������� ���� �������, ��������� � �������. �� ����������� ����� ��������� ������, ��������� � �������.

postrm

���� ��������, ������ �������� ������ ��� ������ �����, ��������� � �������, �/��� ������� ����� ��������� �������. (��. ����� ��� ����� ����������� �����?, ������ 6.8).

� ��������� ����� ��� ����������� ����� ����� ����� � �������� /var/lib/dpkg/info. �����, ����������� � ������ foo ����� ��� "foo" � ���������� "preinst", "postinst" � �.�. ���� foo.list � ���� �������� �������� ������ ���� ������ ������������� ������� foo. (�������, ��� ��������������� ������ ������������ dpkg; ��� �� ������� ���������� �� ��������� �������).


6.7 ��� ����� ���������/������/�����������/��������������/�������������� (Required/Important/Standard/Optional/Extra) �����?

��� ������� ������ Debian ����������� ������������ ��������� ��������� (priority), � �������� ������ ��� ���������� ��������. ���������� ���������:


6.8 ��� ����� ����������� �����?

����������� ����� - ��� ����� ���, ���������� � ������ �� ������ �������, ��� �� ������� ������������ ���������� ����� ���� �������. ��������, ��������� tintrn, ��� �������� ����������� ��� ������ �������� � ������ ������������� ����������� ���������, ������� ������� ������� � ������� ��������� ������ ��������, ��� ����� ������. ������� ��� ������������� "����������� �����", ���������� news-reader.

����������, smailsendmail ������������ ������� ��������� ������������� ������. ������� ��� ������������� ����������� ����� "mail transport agent". ���� ���� �� ��� ����������, �� ����� ���������, ��������� �� ������ mail-transport-agent, ����� ������������� �������������� ������� ������������ ������.

����� ����, ���� � ������� ����������� ����� ������ ������, ���������������� ������������ ����������� �����, �� Debian ������������ ���������� �������������� ����������, ����������� ���������� ���� �� ���� ������� ����������������. ��� ����� ������� ������� update-alternatives, ��������� ����� � ��������� ������������� �������� mawk, ������ - gawk; ��������� - vim, ������ - elvis; ��������� - trn, ������ - tin; ��� �������������� ��������� ������������ � Debian?, ������ 10.10.


6.9 ��� ������������� ������, ��� ����� �������/�����������/������������/�����������/��������/������������� (Depends/Recommends/Suggests/Conflicts/Replaces/Provides) ������ �����?

� ������� ������� Debian ������� ������� "�����������" ����� ��������, ������� ���������� ��������� ���������� ������ ��������� � ������� �� ������������� ��������� � �� ������ �������:

����� ��������� ���������� �� ������������� ���� �������� ����� ���� ������� � ����������� �� ������� (Packaging manual) � � ����������� �� �������� (Policy manual).


6.10 ��� �������� ����� Pre-Depends (����-�����������)?

"Pre-Depends" ��� ����������� ����� �����������. ����������� ������� ����� ��������� dpkg �� �������� ������ ���������� �� ����, ���������� �� ����� �� ������� ��� ������� ��� ���. ����� ������, dpkg ��������� ����� ������ �� ������ � �������� �� �� ���������� �����. ���� ����� ������� �� ������������� ������ �������, �� dpkg ��������� ��������� ��������� (�������� ������������) �� ��������� ����������� �������.

������, ��� ��������� �������, dpkg ��������� ���� ������������� ����� �� ���������� ������������. ����� ������ ���������, ��� ��� "Pre-depend" �� ������� ������ �������. ������ Debian ������������ �������� ��� ����������� ���������� ������� � ������� a.out �� ������ ELF, ��� �������� �������, � ������� ������ ����� �����������. ���������� � ������ ��������, ����� ����� ����������� ���� �����.

����� ��������� ���������� ����� ���� ������� � ����������� �� �������.


6.11 ��� �������� ����� ����������/����������/�������/��������/���������� (unknown/install/remove/purge/hold) � ������� ������?

��� ����� ����������, ��� ������������ ����� ������� � ������� (��� ������������ ���� ���������� ������������ ��� ������ � ������� "�����" ("Select") ��������� dselect, ���� ����������������� ����������� ������������ � dpkg).

�� ��������:


6.12 ��� � ���� ��������� ����� � ������������ (hold) ���������?

���� ��� ����, �������� ����� ��������� ����� � ������������ ��������� -- ��� ������ dpkg ��� dselect.

� dpkg, �� ������ ������������� ������ ��������� �������:

     dpkg --get-selections > selections.txt

����� ������������ ���������� ���� selections.txt, ��������� ������, ���������� ��������� ���� ��� ����������� �����, ����. libc6, �:

     libc6                                           install

��:

     libc6                                           hold

���������� ���� � ���������� ��� � ���� ������ dpkg:

     dpkg --set-selections < selections.txt

C dselect, �� ������ ���������� � ���� ����� (Select), �������� ������ ����� � ��������� ������� '=' (��� 'H'). ��������� ������� � ���� ����� �� ����� ������ ������ �� ������ �����.


6.13 ��� � ���� ���������� ����� �������� �������?

������ �������� ������� Debian �� ����� ���� "�����������", ��� ������ ��������������� � ��� ��������, � ������� �� ������ ������� �������� �����. �������� ������ ������������� � �������� source, � �� ������ ���� ��������� �� �������, ���� ���������������� ��������:

     apt-get source foo

(��. �������� ����������� apt-get(8)).


6.14 ��� � ���� ��������� �������� ����� �� ���������?

��� ���������� foo_*.dsc, foo_*.tar.gz � foo_*.diff.gz ����� ��� ���������� ��������� ������ (��� ������ ������� Debian ����� .diff.gz ����� �� ����).

���� � ��� ���� ��� ����� � ���������� ����� dpkg-dev, �� ��������� �������:

     dpkg-source -x foo_version-revision.dsc

�������� ����� � ������� foo-version.

���� �� ������ �������������� �����, �� ��������� � ������� foo-version � ��������� �������

     debian/rules build

��� ���������� ���������, �����

     debian/rules binary

��� ������������ root, ��� ������ ������, � �����

     dpkg -i ../foo_version-revision_arch.deb

��� ��������� ������.


6.15 ��� ��� ������ ������� ����� Debian?

��������� �������� ����� �������� ���������� � "����������� ����������� ������������ Debian", ��������� � ������ maint-guide-ru, ��� ftp://ftp.debian.org/debian/doc/package-developer/maint-guide.html.tar.gz.


[ ����� ] [ ���������� ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ ������ ]


The Debian GNU/Linux FAQ

������ 4.0.3, 26 June 2008

������, ������ 15.1