Jump to content

deb (file format)

This is a fully translated article. Click here for more information.
From DawoumWiki, the free Mathematics self-learning

Debian package
The GNOME icon for deb files.
(Showing the Debian logo on a package)
Filename extension
.deb, .udeb
Internet media type
application/vnd.debian.binary-package[1]
Developed byDebian
Type of formatPackage management system
Container forSoftware package
Extended fromar archive, tarball
Websitedeb format specification

deb데비안 리눅스 배포판그것의 파생 배포판에 대해 소프트웨어 패키지 형식의 확장자일 뿐만 아니라 형식입니다.

Design

GDebi installing a .deb package

데비안 패키지는 두 개의 tar 아카이브를 포함하는 표준 유닉스 ar 아카이브입니다. 한 아카이브는 제어 정보를 보유하고 또 다른 것은 설치-가능 데이터를 포함하고 있습니다.[2]

dpkg는 데비안 패키지를 설치하고 조작하기 위한 기본 기능성을 제공합니다. 일반적으로 최종 사용자는 dpkg를 사용하여 패키지를 직접 관리하지 않고 대신 APT 패키지 관리 소프트웨어 또는 aptitude (nCurses)와 synaptic (GTK)과 같은 다른 APT 프런트-엔드를 사용합니다.[3]

데비안 패키지는 alien을 사용하여 다른 패키지 형식으로 또는 그 반대로 변환할 수 있고, checkinstall 또는 Debian Package Maker를 사용하여 소스 코드에서 생성될 수 있습니다.[4]

일부 핵심 데비안 패키지는 udeb ("micro deb")로 사용할 수 있고, 전형적으로 데비안 설치 부트스트랩에만 사용됩니다. 비록 이들 파일은 udeb 파일 이름 확장자를 사용하지만, 그것들은 보통의 deb 파일과 같은 구조 사양을 따릅니다. 어쨌든, 그것들의 deb 짝과 달리, udb 패키지는 필수 기능 파일만 포함하고 있습니다.[5] 특히, 문서 파일은 통상적으로 생략됩니다. udeb 패키는 표준 데비안 시스템에 설치할 수 없지만, Debian-Installer에서는 사용됩니다.

Implementation

Diagram showing an example file structure of a .deb file
Frhed hex editor displaying the raw data of a Debian package.

데비안 0.93 이전에는, 패키지는 파일 헤더와 연결된 둘의 gzip 아카이브로 구성되었습니다.[6] 데비안 0.93부터, deb 패키지는 ar 아카이브로 구현되었습니다.[7] 이 아카이브는 특정 순서로 세 개의 파일을 포함하고 있습니다:[8][9]

  1. debian-binary – 패키지 형식 버전 번호를 제공하는 한 줄을 포함합니다. (현재 데비안 버전에 대해 2.0).[9]
  2. control archivecontrol.tar라고 이름-지은 tar 아카이브는 관리자 스크립트와 패키지 메타-정보 (패키지 이름, 버전, 의존성, 및 패키지-관리자)를 포함하고 있습니다. gzip 또는 xz로 아카이브 압축이 지원됩니다. 파일 확장자는 압축 방법을 나타내기 위해 변경됩니다.[9][2]
  3. data archivedata.tar라고 이름-지은 tar 아카이브는 실제 설치-가능 파일을 포함하고 있습니다. 아카이브를 gzip, bzip2, lzma, 또는 xz로 압축하는 것이 지원됩니다. 파일 확장자는 압축 방법을 나타내기 위해 변경됩니다.[9][2]

Control archive

제어 아카이브 컨텐츠는 다음 파일을 포함할 수 있습니다:

  • control은 패키지의 간략한 설명과 그것의 의존성과 같은 다른 정보를 포함하고 있습니다.[10][11][12][13]
  • md5sums는 손상되거나 불완전한 파일을 감지하기 위해 패키지에 있는 모든 파일의 MD5 체크섬을 포함합니다.[14]
  • conffiles는 구성 파일로 취급되어야 하는 패키지의 파일을 나열합니다. 구성 파일이 지정하지 않은 한 업데이트 중에 덮어쓰이지 않습니다.[15]
  • preinst, postinst, prerm, 및 postrm는 패키지를 설치하거나 제거하기 전이나 후에 실행되는 선택적 스크립트입니다.[15][16]
  • configdebconf 구성 메커니즘을 지원하는 선택적 스크립트입니다.[17]
  • shlibs는 공유 라이브러리 의존성을 나열합니다.[18][19]

Signed packages

데비안-기반 배포판은 서명된 데비안 패키지의 GPG 서명 확인을 지원하지만, (전부는 아니지만) 대부분은 이 기능을 기본적으로 비활성화합니다.[20] 대신 패키지는 저장소 메타데이터 (즉, Release 파일)에 서명함으로써 확인됩니다. 메타데이터 파일은 파일의 신뢰성을 확인하기 위한 수단으로 저장소 파일에 대해 체크섬을 포함합니다.[21][22] 현재 개별 패키지에 서명하기 위한 두 가지 다른 구현이 있습니다. 첫 번째는 dpkg에 의해 지원되는 debsigs / debsig-verify 도구-모음을 통해 수행됩니다.[20][23] 두 번째는 dpkg에 의해 지원되지 않는 dpkg-sig 프로그램을 통해 수행되므로, 패키지는 dpkg-sig 프로그램과 함께 수동으로 확인되어야 합니다.[20][24][25][26] 형식 둘 다는 서명 정보를 저장하기 위해 ar 아카이브에 새 섹션을 추가하지만, 그 형식은 서로 호환되지 않습니다.[20] 패키지 형식에 대한 수정의 어떤 것도 공식 데비안 핸드북 또는 바이너리 패키지 형식에 대한 매뉴얼 페이지에 나열되어 있지 않습니다.[27][8]

Adoption

See also

References

  1. ^ "Media Type Registration for vnd.debian.binary-package". Internet Assigned Numbers Authority. Retrieved 21 May 2014.
  2. ^ a b c Raphaël Hertzog (17 Sep 2010). "How to create Debian packages with alternative compression methods". raphaelhertzog.com. Retrieved 26 Aug 2016.
  3. ^ "Debian Courses/Maintaining Packages/Packages Management". debian.org. 31 Oct 2010. Retrieved 26 Aug 2016.
  4. ^ "Overview of Debian Maintainer Tools / Alien". debian.org. n.d. Retrieved 26 Aug 2016.
  5. ^ "Chapter 3. D-I components or udebs". debian.org. n.d. Archived from the original on 3 December 2011. Retrieved 26 Aug 2016.
  6. ^ "deb-old(5) man page: Debian old binary package format". manpages.debian.org. Retrieved 2017-04-23.
  7. ^ Lucas Nussbaum (16 Oct 2014). "Debian Packaging Tutorial" (PDF). debian.org. Retrieved 26 Aug 2016.
  8. ^ a b "deb(5) man page: Debian binary package format". manpages.debian.org. Retrieved 2017-04-23.
  9. ^ a b c d "Debian Binary Package Building HOWTO/3. Package Structure". tldp.org. n.d. Retrieved 26 Aug 2016.
  10. ^ "deb-control(5) man page: Debian packages' master control file format". manpages.debian.org. Retrieved 2017-04-23.
  11. ^ "Debian Policy Manual Chapter 5 - Control files and their fields". debian.org. 30 Mar 2016. Retrieved 26 Aug 2016.
  12. ^ Josip Rodin and Osamu Aoki (9 Jun 2015). "Debian New Maintainers' Guide - Ch4 Required files under the debian directory". debian.org. Retrieved 26 Aug 2016.
  13. ^ "Debian Policy Manual Ch7 - Declaring relationships between packages". debian.org. 30 Mar 2016. Retrieved 26 Aug 2016.
  14. ^ "The Debian Administrator's Handbook - Package Meta-Information". debian-handbook.info. n.d. Retrieved 26 Aug 2016.
  15. ^ a b "Chapter 7. Basics of the Debian package management system". debian.org. 12 August 2019. Retrieved 27 May 2021.
  16. ^ "Debian Maintainer Scripts". debian.org. 11 Oct 2012. Retrieved 26 Aug 2016.
  17. ^ Joey Hess (n.d.). "The Debconf Programmer's Tutorial - The Config Script". fifi.org. Retrieved 26 Aug 2016.
  18. ^ "dpkg-shlibdeps(1) man page". manpages.debian.org. Retrieved 2017-04-23.
  19. ^ "Debian Policy - 8.6 Dependencies between the library and other packages". debian.org. 30 Mar 2016. Retrieved 26 Aug 2016.
  20. ^ a b c d Joe Damato (28 Oct 2014). "HOWTO: GPG sign and verify deb packages and APT repositories". packagecloud.io. Retrieved 26 Aug 2016.
  21. ^ "APT repository internals". packagecloud.io. 4 Aug 2015. Retrieved 26 Aug 2016.
  22. ^ "SecureApt - All about secure apt". debian.org. 22 Sep 2015. Retrieved 26 Aug 2016.
  23. ^ "debsig-verify(1) man page". manpages.debian.org. Retrieved 2017-04-23.
  24. ^ "debsigs(1) man page". manpages.debian.org. Retrieved 2017-04-23.
  25. ^ Andreas Barth (29 Dec 2003). "Integrating signatures into Debian archive files". turmzimmer.net. Archived from the original on 2006-02-22. Retrieved 29 Dec 2003.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  26. ^ "policy for debsigs". turmzimmer.net. 1 Feb 2004. Archived from the original on 2006-07-14. Retrieved 1 Feb 2004.{{cite web}}: CS1 maint: bot: original URL status unknown (link)
  27. ^ "The Debian Administrator's Handbook - Ch5. Packaging System: Tools and Fundamental Principles". debian.org. n.d. Retrieved 26 Aug 2016.
  28. ^ "Fink FAQ - General Questions". finkproject.org. 6 Jun 2015. Retrieved 26 Aug 2016.
  29. ^ "Fink FAQ - Installing, Using and Maintaining Fink". finkproject.org. 6 Jun 2015. Retrieved 26 Aug 2016.
  30. ^ Jay Freeman (n.d.). "Bringing Debian APT to the iPhone". saurik.com. Retrieved 26 Aug 2016.
  31. ^ Erica Sadun (28 Feb 2008). "Debian-style installation arrives on iPhone". engadget.com. Retrieved 26 Aug 2016.

External links