· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Docbook Sgml/Debian-Binary-Package-Building-HOWTO

Debian Binary Package Building HOWTO

Debian Binary Package Building HOWTO

LeeChr. Clemens

ParkM.W.

2002-11-30, $Date: 2007/10/16 13:14:27 $

ÀÌ ¹Ì´Ï ÇÏ¿ìÅõ´Â ÃÖ¼ÒÇÑÀÇ µ¥ºñ¾È .deb ÆÐÅ°Áö¸¦ ¸¸µå´Â ¹æ¹ýÀ» º¸¿©ÁØ´Ù.

고친 과정
고침 4.02005-08-09고친이 ccl
updated email address and added link to Turkish translation by Oguz Yarimtepe
고침 3.02003-12-19고친이 ccl
fixed two typos reported by Claudio Cattazzo
고침 2.02003-12-13고친이 ccl
applying Frank Lichtenheld's feedback
고침 1.02003-11-08고친이 ccl
first version

1. ¼Ò°³

»õ·Î ¸¸µé¾îÁø ¾ÆÄ«À̺êÀÇ ÀûÀýÇÑ »ç¿ë¹æ¹ýÀº °ø½ÄÀûÀÎ µ¥ºñ¾È ¹èÆ÷ÆÇ¿¡¼­ »ç¿ëÇÏÁö´Â ¸»°í, ÀÚ½ÅÀÇ ¹Ú½º¿¡¼­¸¸ ¼³Ä¡ÇÏ´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù. '°ø½ÄÀûÀÎ' °úÁ¤À» µû¸£°í ½Í´Ù¸é, Debian New Maintainers' Guide¸¦ ÂüÁ¶Çϱ⠹ٶõ´Ù.

ÀϹÝÀûÀÎ µ¥ºñ¾È ÆÐÅ°ÁöµéÀº debian/rules ÆÄÀÏÀ» Æ÷ÇÔÇؼ­ ¹ÙÀ̳ʸ® ÆÐÅ°Áö¸¦ ¸¸µé±âÀ§ÇÑ °úÁ¤µéÀ» ÀÚµ¿È­ÇØÁÖ´Â ¼Ò½º ÆÐÅ°Áö¸¦ °¡Áø´Ù. ¿©±â¼­ ¿ì¸®´Â °£´ÜÇÑ ½© ½ºÅ©¸³Æ®³ª ¹ÙÀ̳ʸ® ½ÇÇà ÆÄÀÏÀ» ÀÛÀº ¹ÙÀ̳ʸ® ÆÐÅ°Áö·Î ¹­´Â ¹æ¹ýÀ» º¸ÀÏ °ÍÀÌ´Ù.

±×·±µ¥, ³ª´Â µ¶ÀÚ°¡ 'tar', 'man'ÀÇ »ç¿ë¹ý ±×¸®°í '.tar.gz' ÆÄÀÏ°ú µ¥ºñ¾È ÀÌ ¹«¾ùÀÎÁö¸¦ ¾Ë°í ÀÖ´Ù°í °¡Á¤ÇÒ °ÍÀÌÁö¸¸, 'ar'À̳ª 'dpkg'°°Àº ÇÁ·Î±×·¥À» ´Ù·é ÀûÀº ¾ø´Ù°í »ý°¢ÇÒ °ÍÀÌ´Ù.


1.1. À¥»óÀÇ ÀÚ·áµé

The Debian Reference´Â ÈǸ¢ÇÑ °³°ý°ú ÇÔ²² µ¥ºñ¾È¿¡ ƯȭµÈ ¸ðµç Á¤º¸¸¦ Á¦°øÇÑ´Ù.

ÀڽŸ¸ÀÇ µ¥ºñ¾È ÆÐÅ°Áö¸¦ ¸¸µå´Â °Í¿¡ °üÇÑ °ø½ÄÀûÀÎ ¹®¼­´Â Debian New Maintainers' GuideÀÌ´Ù.


2. ½ÃÀÛÇϱâ

µ¥ºñ¾È ÂüÁ¶¹®¼­ 2.2.2 2002-11-30¿¡´Â "µ¥ºñ¾È ¹ÙÀ̳ʸ® Çü½ÄÀÇ ³»ºÎ±¸Á¶°¡ deb(5) ¸Þ´º¾ó ÆäÀÌÁö¿¡¼­ ¼³¸íµÈ´Ù. ÀÌ ³»ºÎ Çü½ÄÀº (µ¥ºñ¾ÈÀÇ ¸ÞÀÌÀú ¸±¸®Áî »çÀÌ¿¡) º¯°æµÇ±â ½±±â ¶§¹®¿¡, .deb ÆÄÀÏÀ» ´Ù·ê¶§´Â Ç×»ó dpkg-deb(8)À» »ç¿ëÇ϶ó."¶ó´Â ¹®±¸°¡ ÀÖ´Ù.

dpkg-deb man ÆäÀÌÁö¿¡´Â "dpkg-deb´Â µ¥ºñ¾È ¾ÆÄ«À̺긦 ¹­°í, Ç®°í °ü·Ã Á¤º¸¸¦ Á¦°øÇÑ´Ù. .deb ÆÄÀÏÀº ÇÊ¿ä¿¡ µû¶ó ar°ú tar¸¸À¸·Îµµ Á¶ÀÛ °¡´ÉÇÏ´Ù. ÆÐÅ°ÁöµéÀ» ½Ã½ºÅÛ¿¡ ¼³Ä¡Çϰųª »èÁ¦ÇϱâÀ§Çؼ­´Â dpkg¸¦ »ç¿ëÇ϶ó."¶ó´Â ¹®±¸°¡ ÀÖ´Ù.

¾Æ¸¶ µ¶ÀÚ´Â µð·ºÅ丮 '/var/cache/apt/archives/'¿¡¼­ ¸¹Àº .deb ÆÄÀÏ ¿¹Á¦¸¦ ãÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù. 'dpkg-deb -I somepackage.deb' ¸í·ÉÀ¸·Î ÆÐÅ°Áö°¡ Á¦°øÇÏ´Â ±â´ÉÀÌ ¹«¾ùÀÎÁö ÀϹÝÀûÀÎ ¼³¸íÀ» º¼ ¼ö ÀÖ´Ù. 'dpkg-deb -c somepackage.deb'´Â ¼³Ä¡µÉ ÆÄÀϵéÀÇ ¸®½ºÆ®¸¦ º¸¿©ÁØ´Ù.

.deb ÆÄÀÏÀÇ ³»¿ëÀ» º¸·Á¸é 'ar tv somepackage.deb' ¸í·ÉÀ» »ç¿ëÇÑ´Ù. 'x' ¿É¼ÇÀ» »ç¿ëÇÏ¸é ¾ÐÃàÀ» Ǭ´Ù.


3. ÆÐÅ°Áö ±¸Á¶

¿¹Á¦ ÆÐÅ°Áö Çϳª¸¦ Á»´õ ÀÚ¼¼È÷ »ìÆ캸ÀÚ. 'parted_1.4.24-4_i386.deb' ÆÄÀÏÀº ´ÙÀ½ÀÇ ¼¼ ÆÄÀϵéÀ» Æ÷ÇÔÇÏ°í ÀÖ´Ù:

      $ ar tv parted_1.4.24-4_i386.deb
      rw-r--r-- 0/0      4 Mar 28 13:46 2002 debian-binary
      rw-r--r-- 0/0   1386 Mar 28 13:46 2002 control.tar.gz
      rw-r--r-- 0/0  39772 Mar 28 13:46 2002 data.tar.gz
      

ÀÌÁ¦ ¿ì¸®´Â tar ÆÄÀϵéÀÇ ³»¿ë±îÁö Æ÷ÇÔÇؼ­ ¾ÐÃàÀ» Ç® ¼ö ÀÖ´Ù.


3.1. debian-binary

ÀÌ ÆÄÀÏÀÇ ³»¿ëÀº "2.0\n"ÀÌ´Ù. ÀÌ°ÍÀº deb ÆÄÀÏ Çü½ÄÀÇ ¹öÀüÀ» ¾Ë·ÁÁØ´Ù. 2.0¿¡¼­´Â ´Ù¸¥ ¸ðµç ¶óÀÎÀº ¹«½ÃµÈ´Ù.


3.2. data.tar.gz

'data.tar.gz' ÆÄÀÏÀº ƯÁ¤ °æ·Î¿¡ ¼³Ä¡µÉ ¸ðµç ÆÄÀϵéÀ» Æ÷ÇÔÇÑ´Ù:

      drwxr-xr-x root/root         0 2002-03-28 13:44:57 ./
      drwxr-xr-x root/root         0 2002-03-28 13:44:49 ./sbin/
      -rwxr-xr-x root/root     31656 2002-03-28 13:44:49 ./sbin/parted
      drwxr-xr-x root/root         0 2002-03-28 13:44:38 ./usr/
      drwxr-xr-x root/root         0 2002-03-28 13:44:41 ./usr/share/
      drwxr-xr-x root/root         0 2002-03-28 13:44:38 ./usr/share/man/
      drwxr-xr-x root/root         0 2002-03-28 13:44:52 ./usr/share/man/man8/
      -rw-r--r-- root/root      1608 2002-03-28 13:44:37 ./usr/share/man/man8/parted.8.gz
      drwxr-xr-x root/root         0 2002-03-28 13:44:41 ./usr/share/doc/
      drwxr-xr-x root/root         0 2002-03-28 13:44:52 ./usr/share/doc/parted/
      -rw-r--r-- root/root      1880 2002-03-07 14:20:08 ./usr/share/doc/parted/README.Debian
      -rw-r--r-- root/root      1347 2002-02-27 01:40:50 ./usr/share/doc/parted/copyright
      -rw-r--r-- root/root      6444 2002-03-28 13:37:33 ./usr/share/doc/parted/changelog.Debian.gz
      -rw-r--r-- root/root     15523 2002-03-28 02:36:43 ./usr/share/doc/parted/changelog.gz
      

ÀÌ ÆÄÀÏÀº deb ¾ÆÄ«À̺곻ÀÇ ¸¶Áö¸· ÆÄÀÏÀ̾î¾ß¸¸ ÇÑ´Ù.


3.3. control.tar.gz

¿ì¸®ÀÇ ¿¹Á¦¿¡¼­´Â ÀÌ ÆÄÀÏÀº ´ÙÀ½°ú°°Àº ³»¿ëÀ» °¡Áö°í ÀÖ´Ù:

      -rw-r--r--    1 root     root         1336 Mar 28  2002 control
      -rw-r--r--    1 root     root          388 Mar 28  2002 md5sums
      -rwxr-xr-x    1 root     root          253 Mar 28  2002 postinst
      -rwxr-xr-x    1 root     root          194 Mar 28  2002 prerm
      

'md5sums'ÀÇ ³»¿ëÀº data.tar.gz ÆÄÀϾȿ¡ ÀÖ´Â °¢°¢ÀÇ ÆÄÀÏÀÇ md5sumÀÌ´Ù. ¿ì¸®ÀÇ ¿¹Á¦¿¡¼­´Â ´ÙÀ½°ú°°Àº ³»¿ëÀÌ´Ù:

      1d15dcfb6bb23751f76a2b7b844d3c57  sbin/parted
      4eb9cc2e192f1b997cf13ff0b921af74  usr/share/man/man8/parted.8.gz
      2f356768104a09092e26a6abb012c95e  usr/share/doc/parted/README.Debian
      a6259bd193f8f150c171c88df2158e3e  usr/share/doc/parted/copyright
      7f8078127a689d647586420184fc3953  usr/share/doc/parted/changelog.Debian.gz
      98f217a3bf8a7407d66fd6ac8c5589b7  usr/share/doc/parted/changelog.gz
      

°ÆÁ¤¸¶¶ó. 'md5sum' ¹× 'postinst'¿Í 'prerm' ÆÄÀϵéÀº µ¶ÀÚÀÇ Ã³³àÀÛ ÆÐÅ°Áö¸¦ ¸¸µé±â¿¡¼­ ÇʼöÀûÀÌÁö´Â ¾Ê´Ù. ±×·¸Áö¸¸ ±×°ÍµéÀÇ Á¸Àç¿¡ °üÇؼ­´Â À¯³äÇؾßÇÑ´Ù. ¸ðµç °ø½ÄÀûÀÎ µ¥ºñ¾È ÆÐÅ°ÁöµéÀº ¿©·¯ ÀÌÀ¯·ÎÇؼ­ À̰͵éÀ» °¡Áö°í ÀÖ´Ù.

'prerm'°ú 'postinst'´Â ¿¹Àü ¹®¼­ ÆÄÀϵéÀ» Áö¿ì°í doc¿¡¼­ share/docÀ¸·ÎÀÇ ¸µÅ©¸¦ »ý¼ºÇÏ´Â °ÍÀ¸·Î º¸ÀδÙ.

>$ cat postinst
      #!/bin/sh
      set -e
      # Automatically added by dh_installdocs
      if [ "$1" = "configure" ]; then
      if [ -d /usr/doc -a ! -e /usr/doc/parted -a -d /usr/share/doc/parted ]; then
      ln -sf ../share/doc/parted /usr/doc/parted
      fi
      fi
      # End automatically added section

      $ cat prerm
      #!/bin/sh
      set -e
      # Automatically added by dh_installdocs
      if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/parted ]; then
      rm -f /usr/doc/parted
      fi
      # End automatically added section
      

±×¸®°í ¸¶Áö¸·À¸·Î Á¦ÀÏ Èï¹ÌÀÖ´Â ÆÄÀÏ:

      $ cat control
      Package: parted
      Version: 1.4.24-4
      Section: admin
      Priority: optional
      Architecture: i386
      Depends: e2fsprogs (>= 1.27-2), libc6 (>= 2.2.4-4), libncurses5 (>= \
      5.2.20020112a-1), libparted1.4 (>= 1.4.13+14pre1), libreadline4 (>= \
      4.2a-4), libuuid1
      Suggests: parted-doc
      Conflicts: fsresize
      Replaces: fsresize
      Installed-Size: 76
      Maintainer: Timshel Knoll <timshel@debian.org>
      Description: The GNU Parted disk partition resizing program
      GNU Parted is a program that allows you to create, destroy,
      resize, move and copy hard disk partitions. This is useful
      for creating space for new operating systems, reorganizing
      disk usage, and copying data to new hard disks.
      .
      This package contains the Parted binary and manual page.
      .
      Parted currently supports DOS, Mac, Sun, BSD, GPT and PC98
      disklabels/partition tables, as well as a 'loop' (raw disk)
      type which allows use on RAID/LVM. Filesystems supported are
      ext2, ext3, FAT (FAT16 and FAT32) and linux-swap. Parted can
      also detect HFS (Mac OS), JFS, NTFS, ReiserFS, UFS and XFS
      filesystems, but cannot create/remove/resize/check these
      filesystems yet.
      .
      The nature of this software means that any bugs could cause
      massive data loss. While there are no known bugs at the moment,
      they could exist, so please back up all important files before
      running it, and do so at your own risk.
      

'man 5 deb-control'¿¡¼­ control ÆÄÀÏ¿¡ ´ëÇÑ ´õ ¸¹Àº Á¤º¸¸¦ ¾òÀ» ¼ö ÀÖ´Ù.


4. ½ÇÁ¦

ÀÌÁ¦ ¿ì¸®µéÀÌ ½ÇÁ¦·Î ¸¸µé¾îº¼ ½Ã°£ÀÌ´Ù. ³ª´Â 'linuxstatus'¶ó´Â À̸§ÀÇ °£´ÜÇÑ ½ºÅ©¸³Æ®¸¦ '/usr/bin/linuxstatus'·Î ¼³Ä¡ÇÏ°íÀÚÇÑ´Ù. ±×·¡¼­ ÀÏ´Ü 'linuxstatus' ÆÄÀÏ ´ÙÀ½À¸·Î 'debian'À̶ó´Â À̸§ÀÇ µð·ºÅ丮¸¦ ¸¸µç´Ù.

      $ mkdir -p ./debian/usr/bin
      $ cp linuxstatus ./debian/usr/bin
      

4.1. control

control ÆÄÀϺÎÅÍ ½ÃÀÛÇÏÀÚ. ¹öÀü ¹øÈ£´Â µ¥½Ã¿Í ÇÔ²² ºÎ°¡ÀûÀÎ µ¥ºñ¾È ÆÐÅ°Áö ¹öÀü ¹øÈ£¸¦ °¡Á®¾ß¸¸ÇÑ´Ù. ¿¹, '1.1-1'. ÇÁ·Î±×·¥ÀÌ À̽ļºÀÖ´Â ½© ½ºÅ©¸³Æ®µé·Î¸¸ ±¸¼ºµÇ¾îÀÖ´Ù¸é, 'Architecture'¸¦ 'all'·Î ÁöÁ¤ÇÑ´Ù.

¼³Ä¡µÉ »õ·Î¿î ÆÐÅ°Áö°¡ ÀÇÁ¸ÇÏ´Â ÆÄÀÏÀ̳ª ÇÁ·Î±×·¥À» Æ÷ÇÔÇÏ´Â ÆÐÅ°Áö°¡ ¼³Ä¡µÇ¾îÀÖ´ÂÁö ¾Ë¾Æº¼ ¼ö ÀÖµµ·Ï 'Depends'¸¦ ¼³Á¤ÇؾßÇÒ ¼öµµ ÀÖ´Ù. ÀÌ°ÍÀ» À§ÇØ 'dpkg -S <file>'¸¦ ½ÇÇàÇØ º¼ ¼ö ÀÖ´Ù. ¿¹:

      $ dkpg -S /bin/cat
      coreutils: /bin/cat
      

'coreutils' ÆÐÅ°Áö¿¡ ´ëÇØ Á»´õ ¾Ë¾Æº¸°í ½Í´Ù¸é, 'apt-cache showpkg coreutils' ¸í·ÉÀ» »ç¿ëÇؼ­ ÇöÀç ½Ã½ºÅÛ¿¡ ¼³Ä¡µÈ ¹öÀü ¹× ´Ù¸¥ ºÎ°¡Á¤º¸¸¦ º¼ ¼öµµ ÀÖ´Ù.

Á»´õ ÷¾ðÇÏÀÚ¸é, µ¿ÀÏÇÑ Á¤º¸¸¦ ã´Âµ¥ µÎ°¡Áö ¹æ¹ýÀÌ ´õ ÀÖ´Ù. µ¥ºñ¾È ÆÄÀϵéÀ» ãÀ» ¼ö ÀÖ´Â À¥ ÆäÀÌÁö°¡ ÀÖ´Ù: http://www.debian.org/distrib/packages. ÆäÀÌÁöÀÇ ¸Ç ¾Æ·¡ÂÊÀ¸·Î °¡¼­ ¾ç½ÄÀ» ä¿ì¸é µÈ´Ù.

¸¶Áö¸·À¸·Î 'kpackage'¶ó´Â °£ÆíÇÑ ÆÐÅ°Áö ºê¶ó¿ì¡ ¿É¼Ç°ú °³º° ÆÄÀÏ À̸§À» ÀÔ·ÂÇϸé ÆÐÅ°Áö¸¦ ã¾ÆÁÖ´Â ÁÁÀº GUI ÀÀ¿ë ÇÁ·Î±×·¥ÀÌÀÖ´Ù.

'Suggests', 'Conflicts'¿Í 'Replaces' µîÀº ÇÊ¿äÇÏÁö ¾ÊÀ¸¸é ºñ¿öµÑ ¼ö ÀÖ´Ù.

±×·¡¼­ ÀÌ°ÍÀÌ ¿ì¸®ÀÇ Ã¹ 'control' ÆÄÀÏÀÇ °á°úÀÌ´Ù:

Package: linuxstatus
      Version: 1.1-1
      Section: base
      Priority: optional
      Architecture: all
      Depends: bash (>= 2.05a-11), textutils (>= 2.0-12), awk, procps (>= \
      1:2.0.7-8), sed (>= 3.02-8), grep (>= 2.4.2-3), coreutils (>= 5.0-5)
      Maintainer: Chr. Clemens Lee <clemens@kclee.de>
      Description: Linux system information
      This script provides a broad overview of different
      system aspects.

'control' ÆÄÀÏÀº ´Ù¸¥ 'debian' µð·ºÅ丮³»ÀÇ 'DEBIAN'À̶ó´Â À̸§ÀÇ µð·ºÅ丮·Î º¹»çµÈ´Ù.

      $ mkdir -p debian/DEBIAN
      $ find ./debian -type d | xargs chmod 755   # this is necessary on Debian Woody, don't ask me why
      $ cp control debian/DEBIAN
      

¸¸µé°í ÀÖ´Â ÆÐÅ°Áö°¡ ¹Ì·¡¿¡ ¸¹Àº »ç¶÷µéÀÌ »ç¿ëÇÒ°ÍÀ¸·Î ¿¹»óµÈ´Ù¸é Writing Debian package descriptions¸¦ Àо´Â °ÍÀÌ µµ¿òÀÌ µÉ°ÍÀÌ´Ù.


4.2. dpkg-deb

ÀÌÁ¦ °ÅÀÇ ´Ù µÆ´Ù. ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÑ´Ù:

      $ dpkg-deb --build debian
      dpkg-deb: building package `linuxstatus' in `debian.deb'.
      $ mv debian.deb linuxstatus_1.1-1_all.deb
      

Èì, »ý°¢Çß´ø °Í º¸´Ù ÈξÀ ½±´Ù. ÀÌÁ¨ ÀÌ ÆÐÅ°Áö¸¦ ¿ì¸®ÀÇ ¹Ú½º¿¡ ¼³Ä¡ÇÏ¸é ´Ù µÇ´Â °ÍÀÌ´Ù:

      root# dpkg -i ./linuxstatus_1.1-1_all.deb
      

'linuxstatus' ¶Ç´Â 'ls -l /usr/bin/linuxstatus'¸¦ ÀÔ·ÂÇؼ­ Á¦´ë·Î µ¿ÀÛÇÏ´ÂÁö È®ÀÎÇÑ´Ù. ÆÐÅ°Áö°¡ ´õÀÌ»ó ÇÊ¿ä¾ø´Ù¸é, 'dpkg -r linuxstatus'¸¦ ÀÔ·ÂÇÏ°í ÆÐÅ°Áö°¡ Á¦°ÅµÇ¾ú´ÂÁö È®ÀÎÇÑ´Ù. »õ·Î¿î ¹öÀüÀ» ¼³Ä¡ÇÑ´Ù¸é ¿¾ ¹öÀüÀ» ¸ÕÀú Áö¿ö¾ßÇÒ ÇÊ¿ä´Â ¾ø´Ù.

µ¥ºñ¾È ÆÐÅ°ÁöÀÇ ¹öÀü ¼ýÀÚ Ã¼°è ¹× À̸§ Áþ±â¿¡°üÇØ ¾Ë°í ½Í´Ù¸é, The Debian ReferenceÀÇ ÀÌ ÀýÀ» Àо±æ ±ÇÇÑ´Ù.


5. ¹Ýº¹ È®ÀÎ

Áö±Ý±îÁö ùÀλóÀ» ¹Þ°í ÀڽŸ¸ÀÇ ¹ÙÀ̳ʸ® ÆÐÅ°Áö¸¦ ¸¸µé¾ú´Ù. ÀÌÁ¦´Â Á»´õ ±í°Ô µé¾î°¡¼­ ¿ì¸®°¡ ¸¸µç ÆÐÅ°ÁöÀÇ Ç°Áú¿¡°üÇØ ¾Ë¾Æº¸ÀÚ.


5.1. lintian

´ÙÇེ·´°Ôµµ µ¥ºñ¾È ÇÁ·ÎÁ§Æ®´Â 'lintian'À̶ó´Â À̸§ÀÇ, 'lint'¿Í ºñ½ÁÇÑ µ¥ºñ¾È ÆÐÅ°Áö °Ë»çµµ±¸¸¦ Á¦°øÇÑ´Ù. ¾ÆÁ÷ ÀÌ µµ±¸¸¦ ¼³Ä¡ÇÏÁö ¾Ê¾Ò´Ù¸é, Áö±ÝÀÌ ¼³Ä¡ÇÒ ¶§´Ù (apt-get install lintian).

ÀÌÁ¦ ÀÌ ÀÛ°í ¼ÒÁßÇÑ µµ±¸¸¦ ¿ì¸®ÀÇ »õ ÆÐÅ°Áö ÆÄÀÏ¿¡ »ç¿ëÇØ º¸ÀÚ:

$ lintian linuxstatus_1.1-1_all.deb
      E: linuxstatus: binary-without-manpage linuxstatus
      E: linuxstatus: no-copyright-file
      W: linuxstatus: prerm-does-not-remove-usr-doc-link
      W: linuxstatus: postinst-does-not-set-usr-doc-link

Èì, ±×¸® ¿Ïº®ÇØ º¸ÀÌÁö´Â ¾Ê´Â´Ù. man page, copyright ÆÄÀÏÀÌ ¾ø°í, ¶Ç 'prerm'°ú 'postinst' ½ºÅ©¸³Æ®µµ ¾ø´Ù.


5.2. ÃÖ¼ÒÇÑÀÇ ¹®¼­È­

¿©±â¿¡¼­ man page ¾²±â¿Í ¸¸µé±â¿¡°üÇؼ­ ±æ°Ô À̾߱â Çϱ⿡´Â ¹«¸®°¡ ÀÖ´Ù. ÀÌ ÁÖÁ¦¿¡ °üÇؼ­´Â ÇѵΠÀåÀ» ÇÒ¾ÖÇÑ ¸¹Àº Ã¥µéÀÌ ÀÖ°í ¿Â¶óÀÎ ¹®¼­·Î´Â The Linux MAN-PAGE-HOWTOÀÌ ÀÖ´Ù. ÀÌÁ¦ Á¶±Ý¸¸ ¹Ì·¡·Î ½Ã°£ ¿©ÇàÀ» Çß´Ù°í °¡Á¤ÇÏ°í, µ¶ÀÚÀÇ ½ºÅ©¸³Æ®¿¡ °üÇÑ ¿Ïº®ÇÑ man page°¡ ./man/man1/linuxstatus.1¿¡ ÀÖ´Ù°í Ä¡ÀÚ.

'copyright' ÆÄÀϵµ ¸¶Âù°¡ÁöÀÌ´Ù. /usr/share/doc µð·ºÅ丮³»¿¡¼­ ÃæºÐÇÑ ¿¹Á¦µéÀ» ¾òÀ» ¼ö ÀÖ´Ù. ÀÌ ¸í·ÉÀ» ½ÇÇàÇ϶ó: find /usr/share/doc -name "copyright"

¿©±â ¿ì¸®ÀÇ 'copyright' ÆÄÀÏ ¿¹Á¦¸¦ º¸ÀδÙ:

linuxstatus

      Copyright: Chr. Clemens Lee <clemens@kclee.de>

      2002-12-07

      The home page of linuxstatus is at: 
      http://www.kclee.de/clemens/unix/index.html#linuxstatus

      The entire code base may be distributed under the terms of the GNU General
      Public License (GPL), which appears immediately below.  Alternatively, all
      of the source code as any code derived from that code may instead be
      distributed under the GNU Lesser General Public License (LGPL), at the
      choice of the distributor. The complete text of the LGPL appears at the
      bottom of this file.

      See /usr/share/common-licenses/(GPL|LGPL)

'prerm'°ú 'postinst' ½ºÅ©¸³Æ®´Â À§¿¡ ³ª¿Ô´ø 'parted' ÆÐÅ°Áö¿¡¼­ »ç¿ëÇß´ø ¿¹Á¦µé¿¡¼­ ¿ì¸®ÀÇ ÇÁ·ÎÁ§Æ® µð·ºÅ丮·Î Çϳª¾¿ º¹»çÇؼ­ ¾´´Ù. ÀÌ ÆÄÀϵéÀº ¿ì¸®ÀÇ ÇÁ·ÎÁ§Æ®¿¡¼­µµ Á¦´ë·Î µ¿ÀÛÇؾßÇÑ´Ù.

ÀÌÁ¦ µ¥ºñ¾È ÆÐÅ°Áö¸¦ ´Ù½Ã Çѹø ¸¸µç´Ù. ¸ÕÀú 'control' ÆÄÀÏ¿¡¼­ ¹öÀü ¹øÈ£¸¦ 1.1-1¿¡¼­ 1.2-1·Î ¿Ã¸°´Ù(¿ì¸®´Â »õ·Î¿î man page¸¦ ÀÛ¼ºÇßÀ¸¹Ç·Î ³»ºÎ ¸±¸®Áî ¹øÈ£¸¦ ¿Ã¸°´Ù). ¶ÇÇÑ »õ·Î¿î ÆÄÀϵéÀ» Àû´çÇÑ °÷¿¡ º¹»çÇÏ´Â ÀÛ¾÷µµ ÇÊ¿äÇÏ´Ù:

$ mkdir -p ./debian/usr/share/man/man1
      $ mkdir -p ./debian/usr/share/doc/linuxstatus
      $ find ./debian -type d | xargs chmod 755
      $ cp ./man/man1/linuxstatus.1 ./debian/usr/share/man/man1
      $ cp ./copyright ./debian/usr/share/doc/linuxstatus
      $ cp ./prerm ./postinst ./debian/DEBIAN
      $ gzip --best ./debian/usr/share/man/man1/linuxstatus.1
      $
      $ dpkg-deb --build debian
      dpkg-deb: building package `linuxstatus' in `debian.deb'.
      $ mv debian.deb linuxstatus_1.2-1_all.deb

GzipÀÌ ÇÊÈ¿ÇÑ ÀÌÀ¯´Â lintianÀº man page ÆÄÀϵéÀÌ °¡´ÉÇÑ ÀÛÀº Å©±â·Î ¾ÐÃàµÇ±â¸¦ ¿øÇϱ⠶§¹®ÀÌ´Ù.


5.3. fakeroot

ÀÌÁ¦ ¿ì¸®ÀÇ ÆÐÅ°Áö°¡ Á» ´õ ³ªÀº µ¥ºñ¾È ±¸¼º¿øÀÌ µÇ¾ú´ÂÁö ¾Ë¾Æº¸ÀÚ:

$ lintian linuxstatus_1.2-1_all.deb
      E: linuxstatus: control-file-has-bad-owner prerm clemens/clemens != root/root
      E: linuxstatus: control-file-has-bad-owner postinst clemens/clemens != root/root
      E: linuxstatus: bad-owner-for-doc-file usr/share/doc/linuxstatus/ clemens/clemens != root/root
      E: linuxstatus: bad-owner-for-doc-file usr/share/doc/linuxstatus/copyright clemens/clemens != root/root
      E: linuxstatus: debian-changelog-file-missing

À¸Èì, »õ·Î¿î ºÒÆòµéÀÌ´Ù. ÁÁ´Ù, ¿ì¸®´Â Æ÷±âÇÏÁö ¾ÊÀ»°ÍÀÌ´Ù. ½ÇÁ¦·Î ´ëºÎºÐÀÇ ¿À·ùµéÀº °°Àº ¹®Á¦·Î º¸ÀδÙ. ³ª´Â ´ëºÎºÐÀÇ »ç¶÷µéÀÌ 'root/root'·Î ¼³Ä¡µÇ´Â °ÍÀ» ´õ ¼±È£ÇÑ´Ù°í »ý°¢ÇÏÁö¸¸, ¿ì¸®ÀÇ ¸ðµç ÆÄÀÏÀº »ç¿ëÀÚ¿Í ±×·ìÀÌ ¸ðµÎ 'clemens'·Î ÆÐŰ¡µÇ¾ú´Ù. ÀÌ°ÍÀº 'fakeroot' µµ±¸¸¦ »ç¿ëÇÏ¸é ½±°Ô ÇØ°áµÈ´Ù. °íÄ¡°í ³ª¼­ À绡¸® È®ÀÎÇغ¸ÀÚ (changelog ¹®Á¦´Â Àá½Ã ¹«½ÃÇÏÀÚ):

$ fakeroot dpkg-deb --build debian
      dpkg-deb: building package `linuxstatus' in `debian.deb'.
      $ mv debian.deb linuxstatus_1.2-1_all.deb
      $ lintian linuxstatus_1.2-1_all.deb
      E: linuxstatus: debian-changelog-file-missing

ÁÁ´Ù, ±×·¡µµ ¾ÆÁ÷ ÆÐÅ°Áö¿¡ ´Ù¸¥ ÆÄÀÏÀ» Ãß°¡ÇÒ °ÍÀÌ ³²¾Ò´Ù.


5.4. ´õ ¸¹Àº ¹®¼­È­

'doc/linuxstatus' µð·ºÅ丮 ³»ÀÇ 'changelog' ÆÄÀÏ ´ÙÀ½À¸·Î 'changelog.Debian' ÆÄÀϵµ ÇÊ¿äÇÏ´Ù. ¶ÇÇÑ µÑ´Ù gzipÀ¸·Î ¾ÐÃàµÇ¾î¾ßÇÑ´Ù.

¿©±â µÎ ÆÄÀÏÀÇ ¿¹Á¦°¡ ÀÖ´Ù, 'changelog':

linuxstatus (1.2-1)

      * Made Debian package lintian clean.

      -- Chr. Clemens Lee <clemens@kclee.de>  2002-12-13

±×¸®°í 'changelog.Debian':

linuxstatus Debian maintainer and upstream author are identical.
      Therefore see also normal changelog file for Debian changes.

The Debian Policy file has more details regarding the format of the changelog file.

ÀÌÁ¦ ¿ì¸®ÀÇ ¸¶Áö¸· ´Ü°è´Â ´ÙÀ½°ú °°´Ù:

$ cp ./changelog ./changelog.Debian ./debian/usr/share/doc/linuxstatus
      $ gzip --best ./debian/usr/share/doc/linuxstatus/changelog 
      $ gzip --best ./debian/usr/share/doc/linuxstatus/changelog.Debian
      $ fakeroot dpkg-deb --build ./debian
      dpkg-deb: building package `linuxstatus' in `debian.deb'.
      $ mv debian.deb linuxstatus_1.2-1_all.deb
      $ lintian linuxstatus_1.2-1_all.deb

¾Æ, ÀÌÁ¦ ´õÀÌ»óÀÇ ºÒÆòÀÌ ¾ø´Ù :-). ·çÆ® ±ÇÇÑÀ¸·Î 'dpkg -i' Ç¥ÁØ ¸í·ÉÀ» ³»·Á¼­ ¿¹Àü ÆÐÅ°Áö¸¦ »õ °ÍÀ¸·Î ´ëÄ¡ÇÒ ¼ö ÀÖ´Ù.

root# dpkg -i ./linuxstatus_1.2-1_all.deb
      (Reading database ... 97124 files and directories currently installed.)
      Preparing to replace linuxstatus 1.1-1 (using linuxstatus_1.2-1_all.deb) ...
      Unpacking replacement linuxstatus ...
      Setting up linuxstatus (1.2-1) ...

6. ¿ä¾à

È¥¶õ¿¡ ºüÁöÁö¾Ê±âÀ§ÇØ, ¹ÙÀ̳ʸ® µ¥ºñ¾È ÆÐÅ°Áö¸¦ ¸¸µå´Â ´Ü°èµéÀ» µÇ¤¾îº¸ÀÚ.

¹Ì¸® ¸¸µé¾î¾ßÇÏ´Â ÆÄÀϵé:

  1. Çϳª ÀÌ»óÀÇ ¹ÙÀ̳ʸ® ½ÇÇà ÆÄÀÏ ¶Ç´Â ½© ½ºÅ©¸³Æ® ÆÄÀÏ

  2. °¢°¢ÀÇ ½ÇÇà ÆÄÀÏ¿¡ ´ëÀÀµÇ´Â man page

  3. 'control' ÆÄÀÏ Çϳª

  4. 'copyright' ÆÄÀÏ Çϳª

  5. 'changelog'¿Í 'changelog.Debian' ÆÄÀÏ

Àӽà 'debian' µð·ºÅ丮 ¼³Á¤:

  1. 'debian/usr/bin' µð·ºÅ丮(¶Ç´Â ½ÇÇàÆÄÀϵéÀ» ³ÖÀ» µð·ºÅ丮) »ý¼º

  2. 'debian/usr/share/man/man1'(¶Ç´Â man page°¡ ¼ÓÇÒ ¼½¼Ç) »ý¼º

  3. 'debian/DEBIAN' µð·ºÅ丮 »ý¼º

  4. 'debian/usr/share/doc/<ÆÐÅ°Áö_À̸§>' »ý¼º

  5. 'debian' µð·ºÅ丮ÀÇ ¸ðµç ÇÏÀ§ µð·ºÅ丮µéÀÌ 0755 Æ۹̼ÇÀ» °¡Áö°Ô ÇÑ´Ù.

Àӽà 'debian' Æ®¸®·Î ÆÄÀϵéÀ» º¹»ç:

  1. ½ÇÇà ÆÄÀÏÀ» 'debian/usr/bin' µð·ºÅ丮(¶Ç´Â ½ÇÇàÆÄÀϵéÀ» ³ÖÀ» µð·ºÅ丮)·Î º¹»ç

  2. man page ÆÄÀÏÀ» 'debian/usr/share/man/man1' µð·ºÅ丮·Î º¹»ç

  3. 'control' ÆÄÀÏÀ» 'debian/DEBIAN' µð·ºÅ丮·Î º¹»ç

  4. 'copyright', 'changelog', 'changelog.Debian' ÆÄÀϵéÀ» 'debian/usr/share/doc/<ÆÐÅ°Áö_À̸§>' µð·ºÅ丮·Î º¹»ç

  5. Àӽà 'debian' Æ®¸® ¾È¿¡¼­ gzipÀ¸·Î man page, 'copyright', 'changelog', 'changelog.Debian' ÆÄÀϵéÀ» '--best' ¿É¼ÇÀ¸·Î ¾ÐÃà

µ¥ºñ¾È ÆÐÅ°Áö¸¦ ºôµåÇÏ°í °Ë»ç:

  1. 'debian' µð·ºÅ丮¸¦ ´ë»óÀ¸·Î 'fakeroot'¸¦ ÀÌ¿ëÇÏ¿© 'dpkg-deb --build'¸¦ ½ÇÇà

  2. °á°ú·Î ³ª¿À´Â 'debian.deb' ÆÄÀÏÀ» ¹öÀü°ú ¾ÆÅ°ÅØÃÄ Á¤º¸¸¦ Æ÷ÇÔÇÏ´Â ÃÖÁ¾ ÆÐÅ°Áö À̸§À¸·Î º¯°æ

  3. °á°ú .deb ÆÐÅ°Áö ÆÄÀÏÀ» 'lintian'À» »ç¿ëÇÏ¿© µ¥ºñ¾È Á¤Ã¥À» ÁؼöÇÏ´ÂÁö °Ë»ç


7. ±×¹ÛÀÇ °Íµé

À¯´Ð½º µ¥¸óÀ̳ª ¼³Á¤ ÆÄÀϵéÀ» ¹èÆ÷ÇÏ´Â ¹æ¹ý µî ¿©±â¼­ ´Ù·çÁö ¾ÊÀº ¾ÆÁÖ ¸¹Àº »ó¼¼ÇÑ °ÍµéÀÌ ÀÖ´Ù.

±×·¯³ª °¡Àå Áß¿äÇÑ, ³»°¡ µ¥ºñ¾È ¸ÞÀÎÅ×À̳ʵ鿡°Ô ´Ù½ÃÇѹø °­Á¶ÇÏ°í ½ÍÀº °ÍÀº, ÆÐÅ°Áö´Â ¹ÙÀ̳ʸ® ÆÐÅ°Áö°¡ ¾Æ´Ï¶ó, ¼Ò½º ÆÐÅ°ÁöµéÀÌ´Ù. ¹ÙÀ̳ʸ® ÆÐÅ°ÁöÀÇ ³»ºÎÀûÀÎ °Íµé°ú´Â ¾Æ¹« »ó°üÀÌ ¾ø´Ù. »ç½Ç 'dpkg-deb' ¹× 'dpkg' °³¹ßÀڵ鸸 ±×°ÍÀ» ¾Ë ÇÊ¿ä°¡ ÀÖ´Ù. ½ÇÀº ÀÌ·¸°Ô ÇÏ´Â °ÍÀº ±ÇÀåµÇÁö ¾Ê´Â´Ù.

¸¸¾à °³¹ßÀÚ°¡ ´Ù¸¥ »ç¶÷¿¡°Ô µ¥ºñ¾È ÆÐÅ°Áö¸¦ ¸¸µå´Â ¹æ¹ý¿¡°üÇØ ¼³¸íÇؾßÇÑ´Ù¸é, ±×´Â Ʋ¸²¾øÀÌ ¼Ò½º ÆÐÅ°Áö¸¦ ¸¸µå´Â ¹æ¹ý°ú ±×°ÍÀ» ºôµåÇÏ´Â ¹æ¹ý¿¡ °üÇؼ­ ¼³¸íÇÒ °ÍÀÌ´Ù.

´Ù¸¥ Ãø¸é¿¡¼­ º¸ÀÚ¸é, ¸ðµç °³¹ßÀÚµéÀÌ ÀÚ½ÅÀÇ ¼ÒÇÁÆ®¿þ¾î¸¦ µ¥ºñ¾È¿¡ (¾ÆÁ÷Àº) Á¦ÃâÇϱ⸦ ¿øÇÏ´Â °ÍÀº ¾Æ´ÏÁö¸¸, ÆÐÅ°Áö ¼Ò½º Äڵ带 ¹èÆ÷ÇÏÁö ¾ÊÀ¸¸é¼­ 'dpkg' °°Àº ÆÐŰ¡ ½Ã½ºÅÛÀÌ Á¦°øÇÏ´Â ÀÌÁ¡µéÀ» ÃëÇÏ°í ½Í¾îÇÑ´Ù. °³ÀÎÀûÀ¸·Î ³ª´Â ¾ÆÁ÷µµ ¸ðµç Á¾·ùÀÇ Ç÷§ÆûÀ» À§ÇØ ³ªÀÇ ÇÁ¸®¿þ¾î ÇÁ·ÎÁ§Æ®µéÀ» ¼Ò½º ÄÚµåµîÀ» Æ÷ÇÔÇÑ tar.gz ÆÄÀϵé·Î ¹èÆ÷ÇÏ´Â ¹Ý¸é¿¡, ³» ¼ÒÇÁÆ®¿þ¾î¸¦ ±×³É °£´ÜÈ÷ ¼³Ä¡Çؼ­ »ç¿ëÇϱ⸦ ¿øÇÏ´Â µ¥ºñ¾È »ç¿ëÀÚµéÀ» À§ÇØ ´õ ¸¹Àº '.deb' ÆÄÀϵéÀ» Á¦°øÇÒ °ÍÀ» °èȹÇÏ°í ÀÖ´Ù.

¸¸ÀÏ ¼ÒÇÁÆ®¿þ¾î ÆÐÅ°Áö¸¦ µ¥ºñ¾È¿¡ Á¦ÃâÇϱâÀ§ÇÑ ´ÙÀ½ ´Ü°è¸¦ ¹â±â¿øÇÑ´Ù¸é, Debian New Maintainers' Guide ¹× Debian Policy ManualÀ» ¸ÕÀú º¸±æ ±ÇÇÑ´Ù. µ¥ºñ¾È ¼Ò½º ÆÐÅ°Áö ÀÛ¼º¿¡ °üÇؼ­´Â, °æÇè ¸¹Àº °³¹ßÀÚ¿Í Ãʺ¸ °³¹ßÀÚµéÀÌ ¼­·Î »óÈ£ÀÛ¿ëÇÏ¸ç ´ç½ÅÀÌ ¸¸³ª°Ô µÉÁöµµ ¸ð¸¦ ºñ½ÁÇÑ ¹®Á¦¿¡ °üÇØ Åä·ÐÇÏ´Â debian-mentors ¸ÞÀϸµ ¸®½ºÆ®¸¦ Çѹø º¼°ÍÀ» ±ÇÇÑ´Ù.


8. Credits

Thanks to

  • Colin Watson for contributing a sentence in the abstract and giving feedback regarding structure, focus and title of this HowTo,

  • Bill Allombert for contributing a sentence in the 'What Else' section and giving feedback reinforcing what Colin had said as well,

  • Santiago Vila for pointing out that 'md' is a local alias and the (Unix) world has standardized on 'mkdir',

  • Tabatha Marshall from the TLDP project for general support,

  • Joey Hess, Carlo Perassi, and Joe Riel for minor corrections,

  • Claudio Cattazzo for conversion of my private xml document to standard docbook format together which resulted also in a number of minor corrections and improvements [2003-10-04],

  • Frank Lichtenheld for finding errors introduced when the HTML pages get generated and for suggesting to use 'dpkg -S <file>' when looking for a package containing a certain file [2003-12-13],

  • Hugh Hartmann for translating this HOWTO to Italian and Claudio Cattazzo for revising the translation [2003-12-13], and

  • Oguz Yarimtepe for translating this HOWTO to Turkish [2005-08-09].


ID
Password
Join
Put your trust in those who are worthy.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2007-10-16 22:14:27
Processing time 0.0019 sec