· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
LFS/Building

¹öÀü: 7.2

Contents

1. LFS system ¸¸µé±â
1.1. ±âº» ¼ÒÇÁÆ®¿þ¾î ¼³Ä¡
1.1.1. ¼Ò°³
1.1.2. Virtual Kernel File System ÁغñÇϱâ
1.1.2.1. ÃʱâÈ­µÈ µð¹ÙÀ̽º ³ëµå ¸¸µé±â
1.1.2.2. /dev ¸¶¿îÆ®, ¿Å±â±â
1.1.2.3. °¡»ó Ä¿³Î ÆÄÀÏ ½Ã½ºÅÛ ¸¶¿îÆ®Çϱâ
1.1.3. ÆÐÅ°Áö °ü¸®
1.1.3.1. ¾÷±×·¹ÀÌµå ¹®Á¦
1.1.3.2. ÆÐÅ°Áö °ü¸® ±â¹ý
1.1.3.2.1. It is All in My Head!
1.1.3.2.2. ºÐ¸®µÈ µð·ºÅ丮¿¡¼­ ¼³Ä¡Çϱâ
1.1.3.2.3. Symlink Style Package Management
1.1.3.2.4. Timestamp Based
1.1.3.2.5. Tracing Installation Scripts
1.1.3.2.6. Creating Package Archives
1.1.3.2.7. User Based Management
1.1.3.3. ´ÙÁß ½Ã½ºÅÛ¿¡¼­ LFS »ç¿ëÇϱâ
1.1.4. chrootȯ°æ¿¡ µé¾î°¡±â
1.1.5. µð·ºÅ丮 ¸¸µé±â
1.1.5.1. FHS¿¡ ´ëÇؼ­
1.1.6. Çʼö file°ú symlink ¸¸µé±â
1.1.7. Æнº¿öµå, ±×·ì, ·Î±×ÆÄÀÏ ¸¸µé±â
1.1.8. Linux-3.5.2 API Çì´õ ¼³Ä¡
1.1.8.1. kernel Çì´õ ¼³Ä¡
1.1.8.1.1. ¸®´ª½º API headers
1.1.8.1.2. platform-specific include/asm symlink¸¸µé±â:
1.1.8.1.3. platform specific-headerÆÄÀÏµé ¼³Ä¡:
1.1.8.2. ¿ì¸®°¡ Ä¿³Î Çì´õµéÀ» º¹»çÇÏ°í symlink¸¦ °ÉÁö¾Ê´Â ÀÌÀ¯
1.1.9. Man-pages-3.42 ¼³Ä¡
1.1.9.1. Man-pages ¼³Ä¡
1.1.9.2. Man-pages ³»¿ë
1.1.9.3. ¿ä¾à
1.1.10. Glibc-2.16.0 ¼³Ä¡
1.1.10.1. Glibc ¼³Ä¡
1.1.10.2. Glibc ¼³Á¤
1.1.10.3. ´ÙÀ̳ª¹Í ·Î´õ ¼³Á¤
1.1.10.4. GlibcÀÇ ³»¿ë
1.1.10.5. ¿ä ¾à
1.1.11. toolchain Àç Á¶Á¤
1.1.12. Zlib-1.2.7 ¼³Ä¡
1.1.12.1. ZlibÀÇ ³»¿ë
1.1.12.2. ¿ä¾à
1.1.13. File-5.11
1.1.13.1. File ¼³Ä¡
1.1.13.2. File ³»¿ë
1.1.13.3. ¿ä¾à
1.1.14. Binutils-2.22 ¼³Ä¡
1.1.14.1. Binutils ¼³Ä¡
1.1.14.2. BinutilsÀÇ ³»¿ë
1.1.14.3. ¿ä¾à
1.1.15. GMP-5.0.5 ¼³Ä¡
1.1.15.1. GMP ¼³Ä¡Çϱâ
1.1.15.2. GMPÀÇ ³»¿ëµé
1.1.16. MPFR-3.1.1 ¼³Ä¡
1.1.16.1. MPFR ¼³Ä¡Çϱâ
1.1.17. MPC-1.0 ¼³Ä¡
1.1.17.1. MPC ¼³Ä¡Çϱâ
1.1.18. GCC-4.7.1 ¼³Ä¡
1.1.18.1. GCC ¼³Ä¡
1.1.18.2. ÄÄÆÄÀÏ°ú ¸µÅ© »óÅ ȮÀÎÇϱâ
1.1.18.3. GCC ³»¿ëµé
1.1.18.4. ¿ä¾à
1.1.19. Sed-4.2.1 ¼³Ä¡
1.1.19.1. Sed ³»¿ë
1.1.19.2. ¿ä¾à
1.1.20. Bzip2-1.0.6 ¼³Ä¡
1.1.20.1. Bzip2 ¼³Ä¡
1.1.20.2. Bzip2 ³»¿ë
1.1.20.3. ¿ä¾à
1.1.21. Pkg-config-0.27 ¼³Ä¡
1.1.21.1. Pkg-config ¼³Ä¡Çϱâ
1.1.22. Ncurses-5.9 ¼³Ä¡
1.1.22.1. Ncurses ¼³Ä¡
1.1.22.2. Ncurses ³»¿ë
1.1.22.3. ¿ä¾à
1.1.23. Util-linux-2.21.2 ¼³Ä¡
1.1.23.1. FHS compliance notes
1.1.23.2. Util-linux ¼³Ä¡Çϱâ
1.1.24. Psmisc-22.19 ¼³Ä¡
1.1.25. E2fsprogs-1.42.5
1.1.26. Shadow-4.1.5.1 ¼³Ä¡
1.1.26.1. Shadow ¼³Ä¡Çϱâ
1.1.26.2. Shadow ¼³Á¤Çϱâ
1.1.26.3. root password ¼³Á¤Çϱâ
1.1.26.4. Shadow of contets
1.1.27. Coreutils-8.19 ¼³Ä¡
1.1.27.1. Coreutils ¼³Ä¡
1.1.27.2. CoreutilsÀÇ ¸ñ·Ï
1.1.27.3. ¿ä¾à
1.1.28. Iana-Etc-2.30 ¼³Ä¡Çϱâ
1.1.28.1. Iana-Etc ¼³Ä¡Çϱâ
1.1.29. M4-1.4.16 ¼³Ä¡Çϱâ
1.1.29.1. M4 ¼³Ä¡
1.1.29.2. M4 ³»¿ë
1.1.29.3. ¿ä¾à
1.1.29.4. Contents of Iana-Etc
1.1.30. Bison-2.6.2 ¼³Ä¡
1.1.30.1. Bison ¼³Ä¡
1.1.30.2. Bison ³»¿ë
1.1.30.3. ¿ä¾à
1.1.31. Procps-3.2.8 ¼³Ä¡Çϱâ
1.1.32. Grep-2.14
1.1.33. Readline-6.2
1.1.34. Bash-4.2 ¼³Ä¡
1.1.34.1. Bash ÀνºÅç
1.1.34.2. Bash ³»¿ë
1.1.34.3. ¿ä¾à
1.1.35. Libtool-2.4.2 ¼³Ä¡
1.1.35.1. Libtool ¼³Ä¡
1.1.35.2. Libtool ³»¿ë
1.1.35.3. ¿ä¾à
1.1.36. GDBM-1.10 ¼³Ä¡Çϱâ
1.1.37. Inetutils-1.9.1 ¼³Ä¡
1.1.37.1. Inetutils ¼³Ä¡
1.1.37.2. Inetutils ³»¿ë
1.1.37.3. ¿ä¾à
1.1.38. Perl-5.16.1 ¼³Ä¡
1.1.38.1. Perl ¼³Ä¡
1.1.38.2. Perl ³»¿ë
1.1.38.3. ¿ä¾à
1.1.39. Autoconf-2.69 ¼³Ä¡
1.1.39.1. Autoconf ¼³Ä¡
1.1.39.2. Autoconf ³»¿ë
1.1.39.3. ¿ä¾à
1.1.40. Automake-1.12.3 ¼³Ä¡
1.1.40.1. AutomakeÀÇ ÀνºÅç
1.1.40.2. Automake ³»¿ë
1.1.40.3. ¿ä¾à
1.1.41. Diffutils-3.2 ¼³Ä¡Çϱâ
1.1.41.1. Diffutils ÀÇ ¼³Ä¡¸ñ·Ï
1.1.42. Gawk-4.0.1 ¼³Ä¡
1.1.42.1. Gawk ¼³Ä¡
1.1.42.2. Gawk ³»¿ë
1.1.42.3. ¿ä¾à
1.1.43. Findutils-4.4.2 ¼³Ä¡
1.1.43.1. Findutils ¼³Ä¡
1.1.43.2. Findutils ³»¿ë
1.1.43.3. ¿ä¾à
1.1.44. Flex-2.5.37 ¼³Ä¡
1.1.44.1. Flex ¼³Ä¡
1.1.44.2. Flex ³»¿ë
1.1.44.3. ¿ä¾à
1.1.45. Gettext-0.18.1.1 ¼³Ä¡
1.1.45.1. Gettext ¼³Ä¡
1.1.45.2. Gettext ³»¿ë
1.1.45.3. ¿ä¾à
1.1.46. Groff-1.21 ¼³Ä¡
1.1.46.1. Groff ¼³Ä¡
1.1.46.2. Groff ³»¿ë
1.1.46.3. ¿ä¾à
1.1.47. Xz-5.0.4 ¼³Ä¡Çϱâ
1.1.48. Grub-2.00 ¼³Ä¡
1.1.49. Less-444 ¼³Ä¡
1.1.49.1. Less ¼³Ä¡
1.1.49.2. Less ³»¿ë
1.1.49.3. ¿ä¾à
1.1.50. Gzip-1.5
1.1.51. IPRoute2-3.5.1
1.1.52. Kbd-1.15.3 ¼³Ä¡
1.1.53. Kmod-9 ¼³Ä¡
1.1.54. Libpipeline-1.2.1 ¼³Ä¡
1.1.55. Make-3.82 ¼³Ä¡
1.1.56. Man-DB-2.6.2 ¼³Ä¡
1.1.57. Patch-2.6.1 ¼³Ä¡
1.1.58. Sysklogd-1.5 ¼³Ä¡
1.1.59. Sysvinit-2.88dsf ¼³Ä¡
1.1.60. Tar-1.26 ¼³Ä¡
1.1.61. Texinfo-4.6 ¼³Ä¡
1.1.61.1. Texinfo-4.13a ¼³Ä¡
1.1.61.2. Texinfo ³»¿ë
1.1.61.3. ¿ä¾à
1.1.62. Udev-188 ¼³Ä¡(systemd-188¿¡¼­ ÃßÃâ)
1.1.63. Vim-7.3 ¼³Ä¡
1.1.63.1. Vim ¼³Ä¡
1.1.63.2. Vim ¼³Á¤
1.1.63.3. Vim ³»¿ë
1.1.63.4. ¿ä¾à
1.1.64. About Debugging Symbols
1.1.65. Stripping Again
1.1.66. Cleaning Up

1. LFS system ¸¸µé±â


1.1. ±âº» ¼ÒÇÁÆ®¿þ¾î ¼³Ä¡


¼Ò°³

°¡»ó Ä¿³Î ÆÄÀÏ ½Ã½ºÅÛ ÁغñÇϱâ

ÆÐÅ°Áö °ü¸®

chrootȯ°æ¿¡ µé¾î°¡±â

µð·ºÅ丮 ¸¸µé±â

ÇÊ¿äÇÑ ÆÄÀÏ, symlinks ¸¸µé±â

Æнº¿öµå, ±×·ì, ·Î±×ÆÄÀÏ ¸¸µé±â

Makedev-1.7·Î µð¹ÙÀ̽º ¸¸µé±â

Linux-3.5.2 API Çì´õ ¼³Ä¡

Man-pages-3.42 ¼³Ä¡

Glibc-2.16.0 ¼³Ä¡

the toolchain Àç Á¶Á¤

Zlib-1.2.7 ¼³Ä¡

File-5.11 ¼³Ä¡

Binutils-2.22 ¼³Ä¡

GMP-5.0.5 ¼³Ä¡

MPFR-3.1.1 ¼³Ä¡

MPC-1.0

GCC-4.7.1 ¼³Ä¡

Sed-4.2.1 ¼³Ä¡

Bzip2-1.0.6 ¼³Ä¡

Pkg-config-0.27 ¼³Ä¡

Ncurses-5.9 ¼³Ä¡

Util-linux-2.21.2 ¼³Ä¡

Psmisc-22.19 ¼³Ä¡

E2fsprogs-1.42.5 ¼³Ä¡

Shadow-4.1.5.1 ¼³Ä¡

Coreutils-8.19 ¼³Ä¡

Iana-Etc-2.30 ¼³Ä¡

M4-1.4.16 ¼³Ä¡

Bison-2.6.2 ¼³Ä¡

Procps-3.2.8 ¼³Ä¡

Grep-2.14 ¼³Ä¡

Readline-6.2 ¼³Ä¡

Bash-4.2 ¼³Ä¡

Libtool-2.4.2 ¼³Ä¡

GDBM-1.10 ¼³Ä¡

Inetutils-1.9.1 ¼³Ä¡

Perl-5.16.1 ¼³Ä¡

Autoconf-2.69 ¼³Ä¡

Automake-1.12.3 ¼³Ä¡

Diffutils-3.2 ¼³Ä¡

Gawk-4.0.1 ¼³Ä¡

Findutils-4.4.2 ¼³Ä¡

Flex-2.5.37 ¼³Ä¡

Gettext-0.18.1.1 ¼³Ä¡

Groff-1.21 ¼³Ä¡

Xz-5.0.4 ¼³Ä¡

Grub-2.00 ¼³Ä¡

Less-444 ¼³Ä¡

Gzip-1.5 ¼³Ä¡

IPRoute2-3.5.1 ¼³Ä¡

Kbd-1.15.3 ¼³Ä¡

Kmod-9 ¼³Ä¡

Libpipeline-1.2.1 ¼³Ä¡

Make-3.82 ¼³Ä¡

Man-DB-2.6.2 ¼³Ä¡

Patch-2.6.1 ¼³Ä¡

Sysklogd-1.5 ¼³Ä¡

Sysvinit-2.88dsf ¼³Ä¡

Tar-1.26 ¼³Ä¡

Texinfo-4.13a ¼³Ä¡

Udev-188(systemd-188·ÎºÎÅÍ ÃßÃâµÊ) ¼³Ä¡

Vim-7.3 ¼³Ä¡

About Debugging Symbols

Stripping Again

Cleaning Up

1.1.1. ¼Ò°³


ÀÌ Àå¿¡¼­ ¿ì¸®´Â ÀÌÀü Àå¿¡¼­ ¼³Ä¡ÇسõÀº ºôµå Àå¼Ò($LFS)·Î µé¾î°£ µÚ LFS½Ã½ºÅÛÀ» ±¸ÃàÇØ ³ª°¥ °ÍÀÔ´Ï´Ù. ÀÌ°ÍÀº ÀÓ½ÃÀÇ ÀÛÀº ¸®´ª½º ½Ã½ºÅÛÀ» ¸¸µé°í ¸î°¡Áö ¸¶¹«¸® Áغñ¸¦ ¸¶Ä£ µÚ¿¡ ¸ðµç ÆÐÅ°Áö¸¦ Çϳª¾¿ ¼³Ä¡¸¦ ½ÃÀÛÇÏ´Â ÀÏÀ» ¸»ÇÕ´Ï´Ù.

ÀÌ ¸ðµç ¼ÒÇÁÆ®¿þ¾î ¼³Ä¡´Â °£´ÜÇÕ´Ï´Ù. ¼³Ä¡ÇÒ ÆÐÅ°ÁöµéÁß ¸¹Àº °ÍµéÀÇ ¼³Ä¡ ¸í·É¾îµéÀÌ °£´ÜÇØÁö°í °øÅëµÇ´Â ºÎºÐµéÀÌ ¸¹¾ÆÁ³Áö¸¸ ¿ì¸®´Â ½Ç¼ö°¡ ÀϾ °¡´É¼ºÀ» ÃÖ¼ÒÈ­Çϱâ À§ÇØ °£´ÜÇÑ °ÍÀ» »ç¿ëÇÏ´Â ´ë½Å Á¦°øµÇ´Â ¼³Ä¡ ¸í·É¾îµéÀ» ÃÖ´ëÇÑ ¸¹ÀÌ »ç¿ëÇÏ¿© ¿Ïº®ÇÏ°Ô ÄÄÆÄÀÏÇÒ °Ì´Ï´Ù.

¿ì¸®´Â ÃÖÀûÈ­ ¿É¼ÇÀ» »ç¿ëÇÏ´Â °ÍÀ» ±ÇÀåÇÏÁö´Â ¾Ê½À´Ï´Ù. ÃÖÀûÈ­¸¦ ÇÏ°Ô µÉ°æ¿ì¿¡ ¾à°£ »¡¶óÁú ¼ö´Â ÀÖÁö¸¸ ÄÄÆÄÀÏÀÌ Èûµé¾îÁö°Å³ª ½ÇÆÐÇÒ °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù. ¸¸¾à ÇØ´ç ÆÐÅ°Áö°¡ ÃÖÀûÈ­¸¦ »ç¿ëÇÏ¿© ÄÄÆÄÀÏÇÏ´Â °ÍÀ» °ÅºÎÇÑ´Ù¸é ÃÖÀûÈ­ ¿É¼ÇÀ» ²ô°í ÄÄÆÄÀÏÇغ¸°í ÇØ´ç ¹®Á¦¿¡ ´ëÇÑ ÆÐÄ¡¸¦ ã¾Æº¸½Ã±â ¹Ù¶ø´Ï´Ù. ¶ÇÇÑ ÄÄÆÄÀϽÿ¡ ÃÖÀûÈ­ ¿É¼ÇÀ» »ç¿ëÇÏÁö ¾Ê´Â´Ù°í Çصµ º¹ÀâÇÑ ÄÚµå¿Í ºôµå ÅøµéÀÇ »óÈ£ÀÛ¿ëµé·Î ÀÎÇؼ­ ¾ðÁ¦µçÁö ÄÄÆÄÀÏÀÌ ½ÇÆÐÇÒ °¡´É¼ºÀº Á¸ÀçÇÕ´Ï´Ù. ¶ÇÇÑ -march¿Í -mtune ¿É¼ÇÀº ÀÌ Ã¥¿¡¼­ Å×½ºÆ®µÇÁö ¾Ê¾Ò´Ù´Â Á¡À» ¸í½ÉÇϽʽÿÀ. ÀÌ ¿É¼ÇµéÀº ÅøüÀÎ ÆÐÅ°Áöµé(Binutils, GCC, Glibc)¸¦ ¼³Ä¡Çϴµ¥ ¹®Á¦¸¦ ÀÏÀ¸Å³¼öµµ ÀÖ½À´Ï´Ù. ¸¸¾à LFS¸¦ óÀ½ ¼³Ä¡Çغ»´Ù¸é ÀÌ·¯ÇÑ ÃÖÀûÈ­ ¿É¼ÇÀ» »ç¿ëÇÏÁö ¾Ê±â¸¦ ±ÇÀåÇص帳´Ï´Ù.

¾î¶°ÇÑ ÇÁ·Î±×·¥µµ °©ÀÚ±â Àϼø°£¿¡ /tools¾È¿¡ ÀÚ½ÅÀÇ À§Ä¡¸¦ °¡Áö°Ô µÇÁö´Â ¾Ê±â ¶§¹®¿¡ ÀÌ Àå¿¡¼­ ¼³Ä¡µÇ´Â ÆÐÅ°Áö¼ø¼­´Â ¹Ýµå½Ã ÁöÄÑÁ®¾ß ÇÕ´Ï´Ù. ¶ÇÇÑ ¹Ýµå½Ã ÄÄÆÄÀÏÀº Çѹø¿¡ Çϳª¾¿¸¸ ÀÌ·ç¾îÁ®¾ß ÇÕ´Ï´Ù. º´·ÄÀûÀ¸·Î ÄÄÆÄÀÏÇÏ´Â °ÍÀº ½Ã°£À» Àý¾àÇÒ ¼ö´Â ÀÖÁö¸¸ /tools °æ·Î¿¡ ´ëÇØ ´Ù¸¥ ÆÐÅ°Áöµé³¢¸® ²¿ÀÏ ¼ö Àֱ⠶§¹®¿¡ ÀÌ·¸°Ô ÄÄÆÄÀÏµÈ ÇÁ·Î±×·¥Àº ¹Ýµå½Ã ¸ØÃß°í ÇØ´ç µð·ºÅ丮¸¦ »èÁ¦ÇؾßÇÕ´Ï´Ù.

¼³Ä¡ Àü¿¡ °¢°¢ ¼³Ä¡ ÆäÀÌÁöµéÀº ÆÐÅ°Áö¿¡ ´ëÇØ ¹«¾ùÀ» Æ÷ÇÔÇÏ°í ºôµåÇϴµ¥ ¾ó¸¶³ª °É¸®´ÂÁö, ¶Ç ÇÊ¿ä °ø°£ÀÌ ¾ó¸¶³ª µÇ´ÂÁö¿¡ ´ëÇÑ Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù. ¶ÇÇÑ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÒ ¶§ »ý¼ºµÇ´Â ÇÁ·Î±×·¥°ú ¶óÀ̺귯¸®¿¡ ´ëÇÑ °£´ÜÇÑ Á¤º¸ ¶ÇÇÑ ¼³Ä¡ ¹®¼­¿¡ ³ª¿ÍÀÖ½À´Ï´Ù.

1.1.2. Virtual Kernel File System ÁغñÇϱâ


´Ù¾çÇÑ ÆÄÀÏ ½Ã½ºÅÛÀÌ Ä¿³Î¿¡ ÀÇÇØ Á¦°øµÇ°í »ç¿ëµË´Ï´Ù. ÀÌ·¯ÇÑ ÆÄÀÏ ½Ã½ºÅÛÀº À̵éÀ» »ç¿ëÇϴµ¥ ÇÊ¿äÇÑ µð½ºÅ©°ø°£À» °¡ÁöÁö ¾Ê´Â "°¡»ó"°³³äÀÔ´Ï´Ù. ÆÄÀϽýºÅÛÀÇ ³»¿ëÀº ¸Þ¸ð¸®¿¡ À§Ä¡ÇÏ°Ô µË´Ï´Ù.

ÆÄÀϽýºÅÛÀÌ ¸¶¿îÆ®µÉ µð·ºÅ丮µéÀ» ¸¸µé¾îÁÝ´Ï´Ù.
mkdir -v $LFS/{dev,proc,sys}

1.1.2.1. ÃʱâÈ­µÈ µð¹ÙÀ̽º ³ëµå ¸¸µé±â

Ä¿³ÎÀÌ ½Ã½ºÅÛÀ» ºÎÆÃÇÒ ¶§ console°ú null device¸¦ Æ÷ÇÔÇÏ¿© ¸î°¡Áö device node¸¦ ÇÊ¿ä·Î ÇÕ´Ï´Ù. device node´Â ÇÏµå µð½ºÅ©¿¡ »ý¼ºµÇ¾î¾ß Çϸç ÀÌ·¡¾ß udevd°¡ ½ÇÇàµÇ°í ¸®´ª½º°¡ init=/bin/bash·Î ½ÇÇàµÇ±â Àü¿¡ »ç¿ë°¡´ÉÇÑ »óÅ°¡ µË´Ï´Ù. ´ÙÀ½ÀÇ ¸í·ÉÀ¸·Î µð¹ÙÀ̽º³ëµå¸¦ ¸¸µé¾îÁÝ´Ï´Ù
mknod -m 600 $LFS/dev/console c 5 1
mknod -m 666 $LFS/dev/null c 1 3

1.1.2.2. /dev ¸¶¿îÆ®, ¿Å±â±â

/dev µð·ºÅ丮¸¦ ¿Å±â´Â ¹æ¹ýÀ¸·Î´Â tmpfs°°Àº °¡»ó ÆÄÀϽýºÅÛÀ» ¸¶¿îÆ®ÇÏ°í °Ë»öµÇ°Å³ª Á¢±ÙµÇ´Â °¡»ó ÆÄÀϽýºÅÛÀ» µ¿ÀûÀ¸·Î »ý¼ºÇÏ´Â ¹æ¹ýÀ» ÃßõÇÕ´Ï´Ù. ÀϹÝÀûÀ¸·Î µð¹ÙÀ̽º »ý¼ºÀº Udev¿¡ ÀÇÇÑ ºÎÆ® °úÁ¤¿¡¼­ ÀϾ´Ï´Ù. ÇÏÁö¸¸ ¾ÆÁ÷ Udev¸¦ ¼³Ä¡ÇÏÁö ¾Ê¾ÒÀ»»Ó´õ·¯ ¾ÆÁ÷ ºÎÆõµ ¾ÈÇßÀ¸´Ï ¼öÀÛ¾÷À¸·Î /dev¸¦ ¿Å°ÜÁà¾ßÇÕ´Ï´Ù. ÀÌ°ÍÀº È£½ºÆ® ½Ã½ºÅÛÀÇ /dev µð·ºÅ丮¸¦ ¹ÙÀÎµå ¸¶¿îÆ®·Î ÇØ°áÇÒ ¼ö ÀÖ½À´Ï´Ù. ¹ÙÀÎµå ¸¶¿îÆ®(bind mount)´Â Ưº°ÇÑ Á¾·ùÀÇ ¸¶¿îÆ®¹æ¹ýÀ¸·Î µð·ºÅ丮³ª ¸¶¿îÆ®Æ÷ÀÎÆ®¿¡ ´ëÇؼ­ ´Ù¸¥ À§Ä¡¿¡ ¹Ì·¯¸¦ »ý¼ºÇÏ´Â °ÍÀ» Çã¿ëÇÕ´Ï´Ù. ´ÙÀ½ÀÇ ¸í·ÉÀ¸·Î À̸¦ ¼öÇàÇÕ´Ï´Ù:
mount -v --bind /dev $LFS/dev

1.1.2.3. °¡»ó Ä¿³Î ÆÄÀÏ ½Ã½ºÅÛ ¸¶¿îÆ®Çϱâ

ÀÌÁ¦ °¡»ó Ä¿³Î ÆÄÀϽýºÅÛ¸¸ ³²¾Ò³×¿ä
mount -vt devpts devpts $LFS/dev/pts
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys

¾î¶² È£½ºÆ® ½Ã½ºÅÛ¿¡¼­´Â /dev/shm°¡ /run/shmÀ¸·Î ½Éº¼¸¯ ¸µÅ©µÇ¾îÀÖ½À´Ï´Ù. chroot ȯ°æÀ¸·Î µé¾î°¡¸é ÀÌ·¯ÇÑ ½Éº¼¸¯¸µÅ©´Â tmpfs¸¦ ¸¶¿îÆ®ÇϱâÀü¿¡ º¯°æµÇ¾î¾ßÇÕ´Ï´Ù.
if [ -h /dev/shm ]; then
   rm -f $LFS/dev/shm
   mkdir $LFS/dev/shm
fi

mount -vt tmpfs shm $LFS/dev/shm

1.1.3. ÆÐÅ°Áö °ü¸®


ÆÐÅ°Áö °ü¸®´Â LFS Ã¥¿¡¼­ °è¼ÓÇؼ­ Ãß°¡µÇ´Â ºÎºÐÀÔ´Ï´Ù. ÆÐÅ°Áö ¸Å´ÏÀú´Â ¼³Ä¡µÉ ÆÄÀÏÀ» Ž»öÇÏ¿© »èÁ¦Çϰųª ¾÷±×·¹À̵å ÇÒ ¶§ ½±µµ·Ï ÇØÁÝ´Ï´Ù. ¹ÙÀ̳ʸ® ÆÄÀÏ°ú ¶óÀ̺귯¸® ÆÄÀϻӸ¸ ¾Æ´Ï¶ó ¼³Á¤ ÆÄÀϵéÀÇ ¼³Ä¡µµ ´Ù·ê °Ì´Ï´Ù. ÇÏÁö¸¸ ¿©·¯ºÐµéÀÌ ÀÌ¿¡ ´ëÇØ ±Ã±ÝÇØ Çϱâ Àü¿¡ ÀÌ Àý¿¡¼­´Â ƯÁ¤ ÆÐÅ°Áö ¸Å´ÏÀú¸¦ ÃßõÇÏÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. °¢°¢ÀÇ ÆÐÅ°Áö ¸Å´ÏÀúµéÀº »ç¿ëµÈ Å×Å©´Ðµé°ú ¾î¶»°Ô ±×°ÍµéÀÌ ÀÛµ¿ÇÏ´ÂÁö¿¡ ´ëÇÑ Á¤º¸µéÀ» Á¾ÇÕÇÏ¿© Á¦°øÇÕ´Ï´Ù. ¿©·¯ºÐ¿¡°Ô ¿Ïº®ÇÑ ÆÐÅ°Áö¸Å´ÏÀú´Â ÀÌ·¯ÇÑ »ç¿ëµÈ Å×Å©´Ðµé(¾î¼¸é µÎ °³ ÀÌ»óÀÇ Å×Å©´ÐÀÌ Á¾ÇÕµÈ °Íµé)¿¡ µû¶ó ´Þ¶óÁú °ÍÀÔ´Ï´Ù. ÀÌ Àý¿¡¼­´Â °£´ÜÇÏ°Ô ÆÐÅ°Áö¸¦ ¾÷±×·¹À̵å ÇÒ¶§ ³ªÅ¸³¯ ¼ö ÀÖ´Â ¹®Á¦µé¿¡ ´ëÇؼ­ ¾ð±ÞÇÒ °ÍÀÔ´Ï´Ù.

´ÙÀ½Àº LFS, BLFS¿¡¼­ ÆÐÅ°Áö¸Å´ÏÀú°¡ ¾ø´ÂÁö¿¡ ´ëÇÑ ÀÌÀ¯µéÀÔ´Ï´Ù:
  • ÆÐÅ°Áö¸Å´ÏÀú¸¦ ´Ù·ç´Ù º¸¸é ÀÌ Ã¥ÀÇ ¸ñÇ¥(¾î¶»°Ô ¸®´ª½º ½Ã½ºÅÛÀÌ ¸¸µé¾îÁö´ÂÁö ¹è¿ì´Â °Í)¿¡¼­ ¹þ¾î³¯ ¼ö ÀÖ½À´Ï´Ù.
  • ÆÐÅ°Áö ¸Å´ÏÀú¸¦ À§ÇÑ ¿©·¯°¡ÁöÀÇ ¹æ¹ýÀÌ ÀÖÁö¸¸ °¢°¢¸¶´Ù Àå´ÜÁ¡ÀÌ ÀÖ½À´Ï´Ù. µû¹®¿¡ Çϳª¸¦ ¼±ÅÃÇÏ¿© ¸ðµç Ã¥ÀÇ µ¶ÀÚµéÀ» ¸¸Á·½ÃÅ°¿¡´Â ¿ªºÎÁ·ÀÔ´Ï´Ù.

ÆÐÅ°Áö ¸Å´ÏÀú¸¦ ÁÖÁ¦·Î ¾´ µµ¿ò¸»ÀÌ ÀÖ½À´Ï´Ù. [http]Hints Project ¿¡ ¹æ¹®¿¡¿© ¿©·¯ºÐ¿¡°Ô ¸Â´Â ÆÐÅ°Áö ¸Å´ÏÀú¸¦ ã¾Æº¸½Ê½Ã¿À.

1.1.3.1. ¾÷±×·¹ÀÌµå ¹®Á¦

ÆÐÅ°Áö¸Å´ÏÀú´Â »õ·Î ¸±¸®ÁîµÈ ¹öÀüÀ¸·Î ½±°Ô ¾÷±×·¹À̵åÇÒ ¼ö ÀÖµµ·Ï ÇØÁÝ´Ï´Ù. ÀϹÝÀûÀ¸·Î LFS¿Í BLFS¿¡ ÀÖ´Â ¼³¸íµéÀº »õ·Î¿î ¹öÀüÀ¸·Î ¾÷±×·¹À̵å Çϱâ À§ÇØ »ç¿ëµÉ ¼ö ÀÖ½À´Ï´Ù. ´ÙÀ½ ¸î°¡Áö ÁÖÀÇ»çÇ×À» Àо½Ã±â ¹Ù¶ø´Ï´Ù:
  • ¸¸¾à ÅøüÀÎ ÆÐÅ°Áö(Glibc, GCC, Binutils) Áß ÇÑ°¡Áö°¡ ¾÷±×·¹À̵尡 µÇ¾î¾ß ÇÑ´Ù¸é, LFS¸¦ ´Ù½Ã ºôµåÇÏ´ÂÆíÀÌ ´õ ¾ÈÀüÇÕ´Ï´Ù. ¿©·¯ºÐÀÌ ¸ðµç ÆÐÅ°Áö¸¦ ÀÇÁ¸¼ºÀ» °í·ÁÇÏ°í ±× ¼ø¼­¿¡ µû¶ó¼­ ¿Ã¹Ù¸£°Ô ¼³Ä¡ÇÒ ¼ö ÀÖ´Ù°í Çصµ ±ÇÀåÇÏÁö ¾Ê½À´Ï´Ù. ¿¹¸¦ µé¸é, ¸¸¾à glibc-2.2.x°¡ glibc-2.3.x·Î ¾÷µ¥ÀÌÆ®µÇ¾î¾ß ÇÑ´Ù°í ÇßÀ» ¶§, ´Ù½Ã ºôµåÇÏ´Â ÆíÀÌ ´õ ¾ÈÀüÇÕ´Ï´Ù. ÇÏÁö¸¸ micro ¹öÀü ¾÷µ¥ÀÌÆ®(2.2.x¿¡¼­ 2.2.x+1·Î ¹Ù²î´Â °Íµé)°°Àº °æ¿ì¿¡´Â °£´ÜÈ÷ ´Ù½Ã ¼³Ä¡ÇÏ¸é º¸ÅëÀº Àß ÀÛµ¿ÇÕ´Ï´Ù¸¸ ¹Ýµå½Ã ±×·¸°Ô µÇ¸®¶ó´Â º¸ÀåÀº ¾ø½À´Ï´Ù. ¿¹¸¦ µé¾î glibc-2.3.4¿¡¼­ glibc-2.3.5·Î ¾÷±×·¹À̵å´Â º¸Åë ¾Æ¹«·± ¹®Á¦µµ ¾ß±âÇÏÁö ¾Ê½À´Ï´Ù.

1.1.3.2. ÆÐÅ°Áö °ü¸® ±â¹ý

´ÙÀ½ÀÇ ¸î°¡Áö °øÅëµÈ ÆÐÅ°Áö °ü¸® ±â¹ýµéÀÌ ÀÖ½À´Ï´Ù. »ç¿ëÇÒ ÆÐÅ°Áö ¸Å´ÏÀú¸¦ °áÁ¤Çϱâ Àü¿¡ ´Ù¾çÇÑ ±â¹ýµé°ú °¢°¢¿¡ ´ëÇÑ Àå´ÜÁ¡µéÀ» ã¾Æº¸±â ¹Ù¶ø´Ï´Ù.

1.1.3.2.1. It is All in My Head!
(chaoxiferÇÊÀÚèØ: ÇÏ....Á¤¸» ³ë°¡´ÙÀÔ´Ï´Ù)

¸Â½À´Ï´Ù, ÀÌ°ÍÀº ÆÐÅ°Áö °ü¸® ±â¹ýÀÔ´Ï´Ù. ¾î¶² À̵éÀº ÀÌ¹Ì °¢°¢ÀÇ ÆÐÅ°Áö¿¡ ´ëÇØ Ä£¼÷ÇÏ°Ô ¾Ë°í ÀÖ°í ¾î¶² ÆÄÀϵéÀÌ °¢°¢ÀÇ ÆÐÅ°Áö¿¡¼­ ¼³Ä¡µÇ´ÂÁö ¾Ë±â ¶§¹®¿¡ ÆÐÅ°Áö ¸Å´ÏÀú¸¦ µû·Î ãÀ» ÇÊ¿ä°¡ ¾ø´Ù°í ¸»ÇÕ´Ï´Ù. ¶Ç ¾î¶² À̵éÀº ÇÑ ÆÐÅ°Áö°¡ º¯ÇßÀ» °æ¿ì ÀüüÀÇ ½Ã½ºÅÛÀ» ÀçºôµåÇÏ¸é µÇ±â ¶§¹®¿¡ ÆÐÅ°Áö °ü¸®´Â ÇÊ¿ä°¡ ¾ø´Ù°í ¸»Çϱ⵵ ÇÕ´Ï´Ù.

1.1.3.2.2. ºÐ¸®µÈ µð·ºÅ丮¿¡¼­ ¼³Ä¡Çϱâ

ÀÌ°ÍÀº ´Ü¼øÇÑ ÆÐÅ°Áö °ü¸®±â¹ý·Î½á ÆÐÅ°Áö°ü¸®¸¦ À§ÇØ µû·Î ÆÐÅ°Áö°¡ ÇÊ¿äÇÏÁö ¾Ê½À´Ï´Ù. °¢°¢ÀÇ ÆÐÅ°Áö´Â ºÐ¸®µÈ µð·ºÅ丮¿¡ ¼³Ä¡µË´Ï´Ù. ¿¹¸¦ µé¾î foo-1.1À̶ó´Â ÆÐÅ°Áö´Â /usr/pkg/foo-1.1¿¡ ¼³Ä¡µÇ°í /usr/pkg/foo¿¡¼­ /usr/pkg/foo-1.1·Î symlink°¡ ¸¸µé¾îÁ®ÀÖ½À´Ï´Ù. ¸¸¾à »õ·Î¿î ¹öÀüÀÎ foo-1.2°¡ ¼³Ä¡µÉ ¶§´Â /usr/pkg/foo-1.2¸¦ ¼³Ä¡ÇÏ°í »õ·Î¿î ¹öÀüÀ» °¡¸®Å°µµ·Ï symlink¸¦ ¹Ù²Ù¸é µË´Ï´Ù.

PATH, LD_LIBRARY_PATH, MANPATH, INFOPATH ±×¸®°í CPPFLAGS¿Í °°Àº ȯ°æ º¯¼öµéÀº /usr/pkg/foo¸¦ Æ÷ÇÔÇÏ¿©¾ß ÇÕ´Ï´Ù. Á¡Á¡ ¸¹Àº ÆÐÅ°Áö°¡ µîÀåÇϸ鼭 ÀÌ·¯ÇÑ ¹æ¹ýÀº Á¡Á¡ °ü¸®ÇϱⰡ Èûµé¾îÁý´Ï´Ù.
1.1.3.2.3. Symlink Style Package Management
ÀÌ°ÍÀº ÀÌÀü ÆÐÅ°Áö °ü¸® ±â¹ý¿¡¼­ º¯È­µÈ ÇüÅÂÀÔ´Ï´Ù. ¼³Ä¡µÈ °¢ ÆÐÅ°ÁöµéÀ» ÀÌÀü°ú ºñ½ÁÇÏ°Ô ºÐ¸®ÇÕ´Ï´Ù. ÇÏÁö¸¸ symlink¸¦ ¸¸µå´Â ´ë½Å¿¡ °¢ ÆÄÀÏÀ» /usr µð·ºÅ丮¾È¿¡ °èÃþÀûÀ¸·Î symlink µË´Ï´Ù. ÀÌ°ÍÀº °¢ ÆÐÅ°Áö¸¶´Ù ȯ°æº¯¼ö¿¡ Ãß°¡ÇؾߵǴ ´ÜÁ¡À» ÇØ°áÇÏ¿´½À´Ï´Ù. »ç¿ëÀÚ¿¡ ÀÇÇØ ÀÚµ¿ÀûÀ¸·Î symlink¸¦ »ý¼ºÇÒ ¼ö ÀÖÁö¸¸ ¸¹Àº ÆÐÅ°Áö ¸Å´ÏÀúµéÀÌ ÀÌ Á¢±Ù¹æ½ÄÀ» »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù. À¯¸íÇÑ ¸î°¡Áö¸¦ ³ª¿­ÇÏÀÚ¸é Stow, Epkg, Graft, Depot µîÀÌ ÀÖ½À´Ï´Ù.

ÆÐÅ°Áö°¡ /usr/pkg ¾Æ·¡¿¡ ¼³Ä¡µÇ¾úÁö¸¸ /usr¿¡ ¼³Ä¡µÇ¾î ÀÖ´Ù°í ¸¸µé±â À§ÇØ ¼³Ä¡´Â fake·Î µÇ¾î¾ß ÇÕ´Ï´Ù. ÀÌ·¯ÇÑ ¹æ½ÄÀ¸·Î ¼³Ä¡ÇÏ´Â °ÍÀº º¸Åë ÈûµçÀÏÀÌ ¾Æ´Õ´Ï´Ù. ¿¹¸¦ µé¾î ¿©·¯ºÐÀÌ libfoo-1.1À» ¼³Ä¡ÇÏ·Á°í ÇÑ´Ù°í »ý°¢ÇϽʽÿÀ. ´ÙÀ½ÀÇ ¸í·É¾î´ë·Î Çϸé ÆÐÅ°Áö°¡ Á¤»óÀûÀ¸·Î ¼³Ä¡µÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù.
./configure --prefix=/usr/pkg/libfoo/1.1
make
make install

¼³Ä¡´Â Àß µÇ°ÚÁö¸¸ ÀÇÁ¸ ÆÐÅ°ÁöµéÀÌ libfoo¿¡ Á¦´ë·Î ¿¬°áµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ¸¸¾à ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÏ¿© libfoo¿¡ ´ëÇØ ¸µÅ©ÇÏ·Á¸é ¹Ýµå½Ã /usr/lib/libfoo.so.1µ¥½Å¿¡ /usr/pkg/libfoo/1.1/lib/libfoo.so.1·Î ¿¬°áµÇ¾î¾ß ÇÕ´Ï´Ù. ¶§¹®¿¡ ¿Ã¹Ù¸¥ Á¢±Ù¹æ¹ýÀº DESTDIRÀ» ÀÌ¿ëÇÏ¿© fake ¼³Ä¡¸¦ ÇÏ´Â °ÍÀÔ´Ï´Ù:
./configure --prefix=/usr
make
make DESTDIR=/usr/pkg/libfoo/1.1 install

´ëºÎºÐÀÇ ÆÐÅ°ÁöµéÀÌ ÀÌ·¯ÇÑ Á¢±Ù ¹æ¹ýÀ» Á¦°øÇÏ°í ÀÖÁö¸¸ ¸ðµÎ´Ù ±×·± °ÍÀº ¾Æ´Õ´Ï´Ù. ÄÄÆÄÀÏÀÌ ÇÊ¿ä¾ø´Â ÆÐÅ°ÁöÀÇ °æ¿ì ¿©·¯ºÐµéÀÌ Á÷Á¢ ÆÐÅ°Áö¸¦ ÀÏÀÏÀÌ ¼³Ä¡ÇØÁְųª ¹®Á¦¸¦ ÀÏÀ¸Å°´Â ÆÐÅ°ÁöµéÀº /opt ¾È¿¡ ¼³Ä¡ÇØ¾ß ÇÒ °ÍÀÔ´Ï´Ù.
1.1.3.2.4. Timestamp Based
ÀÌ ±â¹ý¿¡¼­´Â ÆÐÅ°Áö¸¦ ¼³Ä¡Çϱâ Àü¿¡ ÇØ´ç ÆÄÀÏÀÇ º¯°æ³¯Â¥°¡ °»½ÅµË´Ï´Ù. ¼³Ä¡ ÈÄ¿¡ °£´ÜÇÏ°Ô findÄ¿¸Çµå¿¡ ÀûÀýÇÑ ¿É¼ÇÀ» »ç¿ëÇÏ¿© ŸÀÓ½ºÅÆÇÁ(»õ·Î °»½ÅµÈ ÆÄÀÏ)°¡ Àû¿ëµÈ ÆÄÀϵé·ÎºÎÅÍ ·Î±×ÆÄÀÏÀ» ¸¸µé¾î³¾ ¼ö ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ Á¢±Ù¹æ¹ýÀ¸·Î ¸¸µé¾îÁø ÆÐÅ°Áö ¸Å´ÏÀú¿¡´Â install-log°¡ ÀÖ½À´Ï´Ù.

ÀÌ·¯ÇÑ ¹æ¹ýÀº ¸Å¿ì °£´ÜÇÏ´Ù´Â ÀåÁ¡ÀÌ ÀÖÁö¸¸ µÎ°¡Áö °áÁ¡ÀÌ ÀÖ½À´Ï´Ù. ¸ÕÀú, ¼³Ä¡Áß¿¡ ¾î¶² ÆÄÀÏÀÌ ÇöÀç½Ã°£°ú ´Ù¸¥ ½Ã°£À¸·Î °»½ÅµÈ´Ù¸é ÀÌ ÆÄÀϵéÀº ³ªÁß¿¡ ÆÐÅ°Áö °ü¸®ÀÚ¿¡ ÀÇÇØ °Ë»öµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ¶ÇÇÑ ÀÌ ¹æ¹ýÀº Çѹø¿¡ ÇÑ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏ´Â °æ¿ì¿¡¸¸ Àû¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. µÎ °³ÀÇ ÄܼÖȯ°æ¿¡¼­ µÎ °³ÀÇ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏ´Â °æ¿ì ÀÌ ¶§ »ý¼ºµÇ´Â logÆÄÀÏÀº ½Å·Ú¼ºÀ» ÀÒ¾î¹ö¸³´Ï´Ù.
1.1.3.2.5. Tracing Installation Scripts
ÀÌ Á¢±Ù ¹æ¹ýÀº ¼³Ä¡ ½ºÅ©¸³Æ®ÀÇ ½ÇÇàÈçÀûµéÀ» ¸ðµÎ ±â·ÏÇÕ´Ï´Ù. À̸¦ À§ÇØ »ç¿ëÇÒ ¼ö ÀÖ´Â ¹æ¹ýÀº µÎ°¡Áö°¡ ÀÖ½À´Ï´Ù:

LD_PRELOAD ¶ó´Â ȯ°æ º¯¼ö´Â ¼³Ä¡ Àü¿¡ ¹Ì¸® ·ÎµåµÉ ¶óÀ̺귯¸®ÀÇ °æ·Î¸¦ °¡¸®Å°µµ·Ï ¼³Á¤µÉ ¼ö ÀÖ½À´Ï´Ù. ¼³Ä¡ÇϰԵǸé, ¶óÀ̺귯¸®´Â ¼³Ä¡Çϸ鼭 »ç¿ëÇÏ°ÔµÉ cp, install, mv°°Àº ÆÐÅ°Áö°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö¸¦ °Ë»öÇÏ°í ÆÄÀϽýºÅÛÀ» ¼öÁ¤ÇÑ system callÀ» Ž»öÇÕ´Ï´Ù. ÀÌ·¯ÇÑ Á¢±Ù¹æ¹ýÀ» °¡´ÉÇÏ°Ô Çϱâ À§Çؼ­´Â ¸ðµç ½ÇÇàÆÄÀϵéÀº suid³ª sgid°¡ ¼³Á¤µÇÁö ¾ÊÀº »óÅ·Πµ¿ÀûÀ¸·Î ¿¬°áµÇ¾î ÀÖ¾î¾ß µË´Ï´Ù. ÇÏÁö¸¸ Preloading the library´Â ¿¹»óÄ¡¸øÇÑ ºÎÀÛ¿ëÀ» ÀÏÀ¸Å³¼ö ÀÖ½À´Ï´Ù. ±×·¸±â ¶§¹®¿¡ Ç×»ó ÆÐÅ°Áö ¸Å´ÏÀú°¡ ½Ã½ºÅÛÀ» °íÀå³»´Â°É ¹æÁöÇÏ°í Ç×»ó ÀûÀýÇÑ ·Î±×ÆÄÀÏÀ» ±â·ÏÇϵµ·Ï ÇϱâÀ§ÇØ Å×½ºÆ®¸¦ ¹Ýµå½Ã ½ÇÇàÇØÁÖ¾î¾ß ÇÕ´Ï´Ù.

µÎ¹ø° ±â¹ýÀº strace¸¦ ÀÌ¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. strace´Â ¼³Ä¡ ½ºÅ©¸³Æ®°¡ ½ÇÇàµÇ´Â µ¿¾È ¸ðµç system callÀ» ±â·ÏÇÕ´Ï´Ù.
1.1.3.2.6. Creating Package Archives
ÀÌ°ÍÀº Symlink style package management¿¡¼­ ±â¼úÇÑ ºÐ¸®µÈ µð·ºÅ丮¿¡ ÆÐÅ°Áö¸¦ fake·Î ¼³Ä¡ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù. ¼³Ä¡ ÈÄ¿¡´Â ÆÐÅ°Áö ¾ÆÄ«À̺갡 ¼³Ä¡µÈ ÆÄÀϵéÀ» ÀÌ¿ëÇÏ¿© ¸¸µé¾îÁý´Ï´Ù. ÀÌ ¾ÆÄ«À̺ê´Â ·ÎÄà ÄÄÇ»Åͳª ´Ù¸¥ ÄÄÇ»ÅÍ¿¡ ¼³Ä¡Çϱâ À§ÇØ »ç¿ëµË´Ï´Ù.

ÀÌ Á¢±Ù¹æ¹ýÀº ´ëºÎºÐÀÇ ÆÐÅ°Áö ¸Å´ÏÀú¿¡¼­ »ç¿ëµË´Ï´Ù. ¿¹¸¦ µé¸é RPM([http]Linux Standard Base Specification)¿¡ ºÎ°¡ÀûÀ¸·Î ¿ä±¸µÇ´Â), pkg-utils, µ¥¹Ù¾ÈÀÇ apt, GentooÀÇ portage ½Ã½ºÅÛ µîÀÌ ÀÖ½À´Ï´Ù. ¾î¶»°Ô LFS ½Ã½ºÅÛ¿¡ ÆÐÅ°Áö ¸Å´ÏÀú¸¦ Àû¿ëÇÏ´ÂÁö¿¡ ´ëÇØ ±â¼úÇÑ µµ¿ò¸»ÀÌ ÀÖ½À´Ï´Ù. ´ÙÀ½À» Âü°íÇϼ¼¿ä: [http]http://www.linuxfromscratch.org/hints/downloads/files/fakeroot.txt

ÀÇÁ¸¼º Á¤º¸¸¦ ´ã°í ÀÖ´Â ÆÐÅ°ÁöÆÄÀÏÀ» ¸¸µå´Â °ÍÀº º¹ÀâÇÏ°í LFSº¸´Ù´Â BLFS¿¡¼­ ÇÏ´Â °ÍÀÌ ÀûÇÕÇÕ´Ï´Ù.

slackware´Â tar¸¦ ±âº»À¸·Î ÇÑ ½Ã½ºÅÛÀ» »ç¿ëÇÕ´Ï´Ù. ÀÌ ½Ã½ºÅÛÀº ÀϺη¯ ÆÐÅ°Áö ¸Å´ÏÀú°¡ ´Ù·ç´Â º¹ÀâÇÑ ÆÐÅ°ÁöµéÀÇ ÀÇÁ¸¼º ¹®Á¦¸¦ ´Ù·çÁö ¾Ê°Ú´Ù´Â °ÍÀÔ´Ï´Ù.(¸ðµç ÆÐÅ°Áö¿¡ ´ëÇØ slackware°¡ stable¹öÀü¸¸ Á¦°øÇÏ´Â ÀÌÀ¯°¡ ¹Ù·Î ÀÌ°Ì´Ï´Ù) SlackwareÀÇ ÆÐÅ°Áö °ü¸®¹æ¹ý¿¡ ´ëÇØ ÀÚ¼¼ÇÏ°Ô º¸·Á¸é ´ÙÀ½À» Âü°íÇϼ¼¿ä: [http]http://www.slackbook.org/html/package-management.html
1.1.3.2.7. User Based Management
ÀÌ ÀÌ·ÐÀº LFSÀÇ Æ¯Â¡À¸·Î Matthias Benkmann¿¡ ÀÇÇØ °í¾ÈµÇ¾ú°í ÇöÀç [http]Hints Project·ÎºÎÅÍ ÀÌ¿ë°¡´ÉÇÕ´Ï´Ù. ÀÌ°ÍÀº °¢°¢ÀÇ ÆÐÅ°ÁöµéÀÌ ¼³Ä¡µÉ ¶§ Ç¥ÁØ À§Ä¡·Î °¢°¢ ´Ù¸¥ À¯Àú·Î½á ¼³Ä¡µÇ´Â °ÍÀÔ´Ï´Ù. ÆÐÅ°Áö¿¡ µû¸¥ ÆÄÀϵéÀº userID¸¦ ÅëÇؼ­ ½Äº°ÀÌ °¡´ÉÇÕ´Ï´Ù. ÀÌ·¯ÇÑ Æ¯Â¡°ú ¿©±â¿¡ ´ëÇÑ ´ÜÁ¡¿¡ ´ëÇØ ¼³¸íÇÏ·Á¸é ÀÌ Àý¿¡¼­ ¼³¸íÇϱ⿡´Â ³Ê¹« º¹ÀâÇÕ´Ï´Ù. ´õ ÀÚ¼¼È÷ ¾Ë°íÀÚ ÇÑ´Ù¸é ´ÙÀ½ ¸µÅ©¸¦ Âü°íÇϽʽÿÀ: [http]http://www.linuxfromscratch.org/hints/downloads/files/more_control_and_pkg_man.txt

1.1.3.3. ´ÙÁß ½Ã½ºÅÛ¿¡¼­ LFS »ç¿ëÇϱâ

LFS ½Ã½ºÅÛÀÇ ÀåÁ¡ Áß Çϳª´Â µð½ºÅ© ½Ã½ºÅÛ¿¡¼­ÀÇ ÆÄÀÏÀÇ À§Ä¡¿¡ ÀÇÁ¸ÇÏ´Â ÆÄÀÏÀÌ ¾ø´Ù´Â °ÍÀÔ´Ï´Ù. tar¸¦ ÀÌ¿ëÇؼ­ ¾ÆÅ°ÅØÃÄ°¡ ºñ½ÁÇÑ ±âº» ½Ã½ºÅÛÀ¸·ÎºÎÅÍ ´Ù¸¥ ÄÄÇ»ÅÍ·Î rootµð·ºÅ丮¸¦ Æ÷ÇÔÇÑ LFS ÆÄƼ¼ÇÀ» ³×Æ®¿öÅ©¸¦ ÅëÇØ Àü¼ÛÇϰųª CD-ROMÀ» ÀÌ¿ëÇÏ¿© À̵¿½Ãų ¼ö ÀÖ½À´Ï´Ù. ¿©±â¼­ Áß¿äÇÑ Á¡Àº ¸î°¡Áö ¼³Ã» ÆÄÀϵéÀÌ º¯°æµÇ¾î¾ßÇÑ´Ù´Â Á¡ÀÔ´Ï´Ù. ¼³Á¤ ÆÄÀÏ¿¡´Â ´ÙÀ½ÀÇ °ÍµéÀÌ Æ÷ÇԵ˴ϴÙ: /etc/hosts, /etc/fstab, /etc/passwd, /etc/group, /etc/shadow, /etc/ld.so.conf, /etc/sysconfig/rc.site, /etc/sysconfig/network, /etc/sysconfig/ifconfig.eth0

Ä¿³Î¼³Á¤Àº »õ·Î¿î ½Ã½ºÅÛÀÇ Çϵå¿þ¾î¿¡ µû¶ó ´Þ¶óÁö¸ç ¿øº» Ä¿³Î ¼³Á¤°ú ´Ù¸¥Á¡¿¡ µû¶ó ¼³Á¤ÇÏ¿© ÄÄÆÄÀÏÇÏ¸é µË´Ï´Ù.

¸¶Áö¸·À¸·Î »õ·Î¿î ½Ã½ºÅÛÀ» ºÎÆà °¡´ÉÇϵµ·Ï ¸¸µå·Á¸é Using GRUB to Set Up the Boot Process¸¦ Âü°íÇϽʽÿÀ.

1.1.4. chrootȯ°æ¿¡ µé¾î°¡±â


ÀÌÁ¦ ¿ì¸®°¡ ÇÊ¿äÇÑ ÆÐÅ°ÁöµéÀ» ¼³Ä¡Çϱâ À§Çؼ± chroot ȯ°æÀ¸·Î µé¾î °¡¾ß ÇÕ´Ï´Ù. root°è Á¤¸¸ÀÌ chroot¸¦ ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù. root·Î ·Î±×ÀÎ ÇսôÙ.


Áö±Ý±îÁö ÀÌ Ã¥¿¡¼­ Áö½ÃÇѵ¥·Î Àß µû¶ó Çß´Ù¸é /mnt/lfs¶õ µð·ºÅ丮°¡ Á¦´ë·Î ¸¸µé¾îÁ® ÀÖÀ» °ÍÀÔ´Ï´Ù.

root ¿¡¼­ chrootȯ°æº¯¼ö·Î µé¾î°¡´Â ¸í·É¾î¸¦ ½ÇÇàÇϼ¼¿ä. (Âü°í·Î ¾Æ·¡ ¸í·É¾îµéÀº ½ºÅ©¸³Æ®·Î ¸¸µé¾î µÎ´Â °ÍÀÌ ÆíÇÕ´Ï´Ù.)

chroot "$LFS" /tools/bin/env -i \
    HOME=/root                  \
    TERM="$TERM"                \
    PS1='\u:\w\$ '              \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
    /tools/bin/bash --login +h
-i ¿É¼ÇÀ» ÁÖ¸é env ¸í·É¾î´Â chrootÀÇ ¸ðµç º¯¼öµéÀ» ÃʱâÈ­ ÇÒ °ÍÀÔ´Ï´Ù. ±× ÈÄ¿¡ HOME, TERM, PS1 ±×¸®°í PATH º¯¼ö¸¸ÀÌ ´Ù½Ã ¼ÂÆõ˴ϴÙ. TERM=$TERM ¸í·É¾î´Â TERM º¯¼öÀÇ chroot ³»ºÎÀÇ °ªÀ» ¿ÜºÎ chroot¿Í °°Àº °ªÀ¸·Î ¼ÂÆÃÇÒ °ÍÀÔ´Ï´Ù, ÀÌ º¯¼ö´Â vim °ú less ÇÁ·Î±×·¥ÀÌ Á¤È®ÇÏ°Ô µ¿ÀÛÇϴµ¥ ÇÊ¿äÇÕ´Ï´Ù´Ù. ¸¸¾à ´ç½Å¿¡°Ô CFLAGS, CXXFLAGS ¿Í °°Àº º¯¼öµéÀÌ ÇÊ¿äÇÏ´Ù¸é ±×°ÍµéÀ» ´Ù½Ã ¼ÂÆÃÇϱ⿡ ÁÁÀº Àå¼ÒÀÔ´Ï´Ù.


Áö±Ý À̽ÃÁ¡À¸·Î ºÎÅÍ LFS º¯¼ö´Â ´õÀÌ»ó »ç¿ëµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ¿Ö³ÄÇϸé shellÀÌ LFS º¯¼ö°¡ chroot¸í·ÉÀ¸·Î Àü´ÞµÇ¾ú´Ù°í »ý°¢ÇÑ ÈÄ ´ç½ÅÀÌ ÇÏ´Â ¸ðµç °ÍµéÀÌ LFS½Ã½ºÅÛ(chroot ¸í·É¿¡ ÀÇÇØ º¸³»Áø value of $LFS)À¸·Î ºÎÅÍ Á¦ÇѹÞÀ» °ÍÀ̱⠶§¹®ÀÔ´Ï´Ù. since what the shell thinks is / is actually the value of $LFS, which was passed to the chroot command.


PATH¿¡ /tools/bin ÀÌ ¸¶Áö¸· °æ·Î·Î ÁöÁ¤Çß½À´Ï´Ù. ÀÌ ¶æÀº ¸¶Áö¸· ¹öÁ¯ÀÌ ÀνºÅçµÈÈÄ ÀÓ½ÃÅøÀº ´õÀÌ»ó »ç¿ëµÇÁö ¾Ê´Â´Ù´Â ¶æÀÔ´Ï´Ù. ½©ÀÌ ½ÇÇàµÈ ¹ÙÀ̳ʸ®ÀÇ À§Ä¡¸¦ ±â¾ïÇÏÁö ¸øÇÒ¶§ bash¿¡+h À» ÁÜÀ¸·Î½á ¾²·¹±â°ªÀÌ Ã³¸®µË´Ï´Ù.



´ç½ÅÀº ÀÌ Àå¿¡¼­ ³ª¿À´Â ³ª¸ÓÁö ¸í·É¾îµéÀ» È®½ÇÈ÷ ¾Ë¾Æ¾ß ÇÏ°í chroot ȯ°æ³»¿¡¼­ À̹ø ÀåÀÇ ³»¿ëÀ» µû¶ó ½ÇÇà½ÃÄÑ¾ß ÇÕ´Ï´Ù. ¸¸¾à ¾î¶² ÀÌÀ¯¿¡¼­µç ÀÌ È¯°æÀ» ¶°³µ´Ù¸é ´ç½ÅÀº ¹Ýµå½Ã ´Ù½Ã chroot·Î µé¾î¿Í¾ß ÇÑ´Ù´Â °ÍÀ» ±â¾ïÇؾßÇÏ°í proc ¿Í devpts ÆÄÀÏ ½Ã½ºÅÛ(³ªÁß¿¡ ¼³¸í)À» ÀνºÅçÀ» °è¼Ó ÁøÇàÇϱâ Àü¿¡ ¼³Ä¡Çϴ°ÍÀ» ±â¾ïÇؾßÇÕ´Ï´Ù.


À§¿Í °°ÀÌ chroot ¸í·ÉÀ» ½ÇÇàÇϸç "I have no name!:/# "¶õ ¸Þ¼¼Áö°¡ ÇÁ·ÒÇÁÆ® Á¦ÀÏ ¾Õ¿¡ ³ª¿À°Ô µÇ´Â°Ô /etc/passwd ÆÄÀÏÀ» ¸¸µéÁö ¾Ê¾Ò±â ¶§¹®¿¡ »ý±â´Â ¸Þ¼¼Áö´Ï±î ½Å°æ ¾È ¾²¼Åµµ µË´Ï´Ù.


1.1.5. µð·ºÅ丮 ¸¸µé±â


ÀÌÁ¦ LFS ÆÄÀÏ ½Ã½ºÅÛ ³»¿¡¼­ »õ·Î¿î µð·ºÅ丮¸¦ ¸¸µé¾î º¾½Ã´Ù. ¸í·É¾î °á°ú¿¡ µû¶ó ´õ ¸¹°Å³ª ÀûÀº ±âº» Æ®¸®°¡ ¸¸µé¾î Áú °ÍÀÔ´Ï´Ù:

{{{{
mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib,mnt,opt,run}
mkdir -pv /{media/{floppy,cdrom},sbin,srv,var}
install -dv -m 0750 /root
install -dv -m 1777 /tmp /var/tmp
mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src}
mkdir -pv /usr/{,local/}share/{doc,info,locale,man}
mkdir -v  /usr/{,local/}share/{misc,terminfo,zoneinfo}
mkdir -pv /usr/{,local/}share/man/man{1..8}
for dir in /usr /usr/local; do
  ln -sv share/{man,doc,info} $dir
done
case $(uname -m) in
 x86_64) ln -sv lib /lib64 && ln -sv lib /usr/lib64 ;;
esac
mkdir -v /var/{log,mail,spool}
ln -sv /run /var/run
ln -sv /run/lock /var/lock
mkdir -pv /var/{opt,cache,lib/{misc,locate},local}
}}}      

   /rootÀÇ Æ۹̼ÇÀ» 0750À¸·Î ¹Ù²Ù¾î ÁÖ¸é ¾Æ¹«³ª /root¿¡ µé¾î °¡Áö ¸øÇÏ°Ô ÇØ ÁÝ´Ï´Ù. µÎ ¹ø° chmod¸í·ÉÀº ¾Æ¹«³ª /tmp ³ª /var/tmp µð·ºÅ丮¿¡ writeÇÒ ¼ö ÀÖ°Ô ÇØ ÁÝ´Ï´Ù.  ±×·¯³ª ´Ù¸¥ »ç¿ëÀÚµéÀÌ »ý¼ºÇÑ  ÆÄÀÏÀ» Áö¿ï¼ö´Â ¾ø½À´Ï´Ù. Æ۹̼ÇÀÌ 777Àε¥  ´Ù¸¥ »ç¿ëÀÚÀÇ ÆÄÀÏÀ» Áö¿ï ¼ö ¾ø°Ô ÇÏ´Â °ÍÀº  "sticky bit"(±î´Ù·Î¿î ºñÆ®)¶ó°í ºÒ¸®´Â °Í¿¡ ÀÇÇØ ¼³Á¤µË´Ï´Ù. --(1777 bit mask¿¡¼­ °¡Àå³ôÀº ºñÆ®) 

==== FHS¿¡ ´ëÇؼ­ ====
µð·ºÅ丮 Æ®¸®´Â Filesystem Hierarchy Standard (FHS) ([http://www.pathname.com/fhs/ http://www.pathname.com/fhs/]¿¡¼­ Âü°í)¸¦ ±âº»À¸·Î ÇÕ´Ï´Ù. ¿ì¸®´Â ¾ÆÁ÷µµ ¸¹Àº ÆÐÅ°ÁöµéÀÌ /usr/share/<directory>³ª /usr/local/share/<directory>¿Í´Â ¹Ý´ë·Î /usr/<directory> ¶Ç´Â /usr/local/<directory> ¾È¿¡ ¹®¼­µéÀ» ¼³Ä¡ÇÏ°Ô²û ¼³Á¤µÇ¾î À־ man, doc, info µð·ºÅ丮¸¦ À§ÇØ ÀûÀýÇÑ symlink¸¦ ¸¸µé °ÍÀÔ´Ï´Ù. FHS´Â /usr/local/share ¾È¿¡ ÀÖ´Â ¼­ºêµð·ºÅ丮¸¸Å­ Á¤¹ÐÇÏÁö´Â ¾Ê½À´Ï´Ù. ¶§¹®¿¡ ¿ì¸®´Â ¿ì¸®°¡ ÇÊ¿äÇÑ µð·ºÅ丮¸¸ ¸¸µé °ÍÀÔ´Ï´Ù.


=== Çʼö file°ú symlink ¸¸µé±â ===

ÀϺΠÇÁ·Î±×·¥µéÀº ¾ÆÁ÷ Á¸ÀçÇÏÁö ¾Ê´Â ÇÁ·Î±×·¥µé°ú ÇÏµå ¸µÅ© µÇ¾î ÀÖ½À´Ï´Ù. ¿ì¸®´Â ¾ÈÁ¤¼ºÀ» º¸ÀåÇϱâ À§ÇØ ½ÇÁ¦ ÆÄÀϵéÀ» ´ë½ÅÇÒ ½Éº¼¸¯ ¸µÅ©¸¦ »ý¼ºÇÏ¿© ÀνºÅç ÇÏ´Â µ¿¾È »ç¿ëÇÏ°Ô µË´Ï´Ù. 

{{{
ln -sv /tools/bin/{bash,cat,echo,pwd,stty} /bin
ln -sv /tools/bin/perl /usr/bin
ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -sv /tools/lib/libstdc++.so{,.6} /usr/lib
sed 's/tools/usr/' /tools/lib/libstdc++.la > /usr/lib/libstdc++.la
ln -sv bash /bin/sh
}}}      
 
¸®´ª½º ½Ã½ºÅÛÀº ¸¶¿îÆ®µÈ ÆÄÀϽýºÅÛÀÇ ¸ñ·ÏÀ» /etc/mtab¿¡ º¸°üÇÏ°í ÀÖ½À´Ï´Ù. º¸ÅëÀûÀ¸·Î ÀÌ ÆÄÀÏÀº ¿ì¸®°¡ »õ·Î¿î ÆÄÀϽýºÅÛÀ» ¸¶¿îÆ®ÇÒ ¶§ »ý¼ºµË´Ï´Ù. ÇÏÁö¸¸ ¿ì¸®´Â chrootȯ°æÀ¸·Î µé¾î°£ ÈĺÎÅÍ ¾Æ¹«·± ÆÄÀϽýºÅÛµµ ¸¶¿îÆ®ÇÏÁö ¾Ê¾Ò±â ¶§¹®¿¡ ´ÙÀ½°ú °°ÀÌ »õ·Î¿î /etc/mtabÆÄÀÏÀ» ¸¸µé¾îÁÖ¾î¾ß ÇÕ´Ï´Ù.
{{{
touch /etc/mtab
}}}

=== Æнº¿öµå, ±×·ì, ·Î±×ÆÄÀÏ ¸¸µé±â ===

root·Î ·Î±×ÀÎ Çϱâ À§ÇØ /etc/passwd¿Í /etc/group ÆÄÀÏÀÌ ÇÊ¿äÇÕ´Ï´Ù.


¾Æ·¡ ¸í·ÉÀ» ½ÇÇàÇؼ­ /etc/passwd ¸¦ ¸¸µå¼¼¿ä:
{{{
cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
EOF
}}}      
 

rootÀÇ Á¤È®ÇÑ Æнº¿öµå´Â ³ªÁß¿¡ ¼³Á¤ÇÒ °ÍÀÔ´Ï´Ù. (¿©±â¿¡¼­ÀÇ "x"´Â ±×³É ºóÄ­À» ä¿ì±â À§ÇØ »ç¿ëÇÕ´Ï´Ù.)

¾Æ·¡ ¸í·É¾î¸¦ ½ÇÇàÇؼ­ /etc/group ¸¦ »ý¼ºÇϼ¼¿ä:
{{{
cat > /etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
kmem:x:3:
tape:x:4:
tty:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
usb:x:14:
cdrom:x:15:
mail:x:34:
nogroup:x:99:
EOF
}}}      
 

  »ý¼ºµÈ ±×·ìµéÀº Ç¥ÁØÀÌ ¾Æ´Õ´Ï´Ù. ÀÌ ±×·ìµéÀº ´ÙÀ½ ÆäÀÌÁöÀÇ MAKEDEV Script°¡ ÀÌ¿ëÇÏ°Ô µË´Ï´Ù.  LSB(http://www.linuxbase.org)¿¡ ¼­´Â  root ±×·ìÀ» À» Á¦¿ÜÇÑ ³ª¸ÓÁö ±×·ìµéÀÇ À̸§°ú GID¿¡ ´ëÇؼ­ Á¤ÇØ ³õÁö ¾Ê¾Ò½À´Ï´Ù. ´Ù¸¸, binÀ̶ó´Â ±×·ì¸í°ú binÀÇ GID´Â 1·Î ÇÒ °ÍÀ» ÃßõÇÏ°í ÀÖ½À´Ï´Ù. ¸ðµç ´Ù¸¥ ±×·ìÀÇ À̸§À̳ª ±×·ì¾ÆÀ̵ð´Â À¯Àú¿¡ ÀÇÇؼ­ ÀÚÀ¯·Ó°Ô ¼±ÅÃµÉ ¼ö ÀÖ½À´Ï´Ù. Àß ¾²¿©Áø ÆÐÅ°ÁöµéÀº GID¼ýÀڵ鿡 ÀÇÇØ ¿µÇâ¹ÞÁö ¾Ê½À´Ï´Ù. 

"I have no name!"À̶õ ¸Þ¼¼Áö¸¦ ÇØ°áÇϱâ À§ÇØ ¿ì¸®´Â »õ·Î¿î ½©À» ½ÃÀÛÇÒ °ÍÀÔ´Ï´Ù. ¿ì¸®´Â 5Àå¿¡¼­ Glibc¸¦ ¿Ïº®ÇÏ°Ô ¼³Ä¡ÇÑ »óÅÂÀÌ°í, ¹æ±ÝÀü¿¡/etc/passwd ¿Í /etc/group ÆÄÀÏÀ» »ý¼ºÇÑÈĺÎÅÍ À¯Àú À̸§°ú ±×·ìÀ̸§Àº ÀÛµ¿Çϱ⠽ÃÀÛÇÕ´Ï´Ù.
{{{
exec /tools/bin/bash --login +h
}}}  
 

+h :  +h´Â bash°¡ ³»ºÎ path Hashing ±â´ÉÀ» »ç¿ëÇÏÁö ¾Êµµ·Ï ÇØ ÁÝ´Ï´Ù.  ÀÌ ¿É¼ÇÀÌ ¾øÀ¸¸é, bash´Â ½ÇÇàµÇ¾ú´ø ¹ÙÀ̳ʸ® °æ·ÎµéÀ» ±â¾ïÇÒ °ÍÀÔ´Ï´Ù. ¿ì¸®µéÀÌ ¾ÕÀ¸·Î ÆÑÅ°ÁöµéÀ» ´Ù ¼³Ä¡ÇÒ ¶§±îÁö´Â ÀÌ ¿É¼ÇÀ» ÀÌ¿ëÇؼ­ Path Hashing ±â´ÉÀ» ²¨ ³õÀ» °ÍÀÔ´Ï´Ù.

The login, agetty ±×¸®°í init ÇÁ·Î±×·¥(±×¸®°í ¾î¶² ´Ù¸¥ÇÁ·Î±×·¥µé)Àº ´©°¡ ¾ðÁ¦ ½Ã½ºÅÛ¿¡ ·Î±×ÀÎ Çß´ÂÁö ±â·ÏÇÒ ¸î°³ÀÇ ·Î±×ÆÄÀϵéÀ» »ç¿ëÇÕ´Ï´Ù. ±×·¯³ª ÀÌ ÇÁ·Î±×·¥µéÀº Á¢¼ÓÀÚ°¡ ÀÌ¹Ì Á¸ÀçÇÏÁö ¾Ê´Ù¸é ±â·ÏÇÏÁö ¾Ê½À´Ï´Ù. ·Î±×ÆÄÀϵéÀ» ÃʱâÈ­ÇÏ°í ±×°Íµé¿¡ Àû´çÇÑ Çã°¡±ÇÀ» ºÎ¿©ÇÕ´Ï´Ù:

{{{
touch /var/log/{btmp,lastlog,wtmp}
chgrp -v utmp /var/log/lastlog
chmod -v 664  /var/log/lastlog
chmod -v 600  /var/log/btmp
}}}  
 

/var/run/utmp ÆÄÀÏÀº ÇöÀç ·Î±×ÀÎµÈ »ç¿ëÀÚµéÀ» ±â·ÏÇÕ´Ï´Ù.   

/var/log/wtmp ÆÄÀÏÀº ¸ðµç ·Î±×Àΰú ·Î±×¾Æ¿ôÀ» ±â·ÏÇÕ´Ï´Ù.    

/var/log/lastlog ÆÄÀÏÀº »ç¿ëÀÚ°¡ ¾ðÁ¦ ¸¶Áö¸·À¸·Î ·Î±×ÀÎÇß´ÂÁö ±â·ÏÇÕ´Ï´Ù.    

/var/log/btmp À߸ø ½ÃµµµÈ ·Î±×ÀÎÀ» ±â·ÏÇÕ´Ï´Ù.     




=== Linux-3.5.2 API Çì´õ ¼³Ä¡ ===
--¿ªÁÖ)5.1.1 ¹öÀü¿¡´Â 2.4.26 À» »ç¿ëÇÕ´Ï´Ù. Â÷ÈÄ¿¡ º¯°æÇϵµ·Ï ÇÏ°Ú½À´Ï´Ù.--
{{{
Approximate build time:  0.1 SBU
Required disk space:     515 MB
}}}

==== kernel Çì´õ ¼³Ä¡ ====
¸®´ª½º Ä¿³ÎÀº C ¶óÀ̺귯¸®(Glibc)¿¡ Application Programming Interface(API)¸¦ Á¦°øÇϱâ À§ÇØ ¹Ýµå½Ã ÇÊ¿äÇÕ´Ï´Ù. ÀÌ°ÍÀº ¸®´ª½º Ä¿³Î ¼Ò½º ÆÄÀϷκÎÅÍ Çì´õÆÄÀϸ¸ µû·Î Á¤¸®Çؼ­ ÇØ°áÇÒ ¼ö ÀÖ½À´Ï´Ù.

¸ÕÀú ÀÌÀüÀÇ make·Î Ȥ½Ã³ª Áö¿öÁöÁö ¾Ê°í ³²¾ÆÀÖ´Â ºÒÇÊ¿äÇÑ ÆÄÀÏÀÌ ÀÖ´ÂÁö È®ÀÎÇÏ°í Á¤¸®ÇÕ´Ï´Ù:
{{{
make mrproper
}}}
ÀÌÁ¦ »ç¿ëÀÚ°¡ Ä¿³Î ¼Ò½º·ÎºÎÅÍ º¼ ¼ö ÀÖ´Â Ä¿³Î Çì´õÆÄÀϵéÀ» ÃßÃâÇÕ´Ï´Ù. ÃßÃâµÈ ÆÄÀϵéÀº Áß°£ ·ÎÄà µð·ºÅ丮¿¡ ³õ¿©Áø µÚ º¹»çµÇ´Âµ¥ ÀÌ·¯ÇÑ ÃßÃâ °úÁ¤ÀÌ ³¡³ª¸é target µð·ºÅ丮¿¡ ³²¾ÆÀÖ´Â ÆÄÀϵéÀ» Áö¿ö¹ö¸®°í ÇØ´ç À§Ä¡·Î ¹Ù·Î º¹»çÇعö¸®±â ¶§¹®¿¡ º¹»çÇÒ À§Ä¡(&#4447;target µð·ºÅ丮)¸¦ Á¤ÇØÁÖ¾î¾ß ÇÕ´Ï´Ù. ¿©±â¿¡´Â Ä¿³Î °³¹ßÀÚµéÀÌ »ç¿ëÇÏ´Â ¸î¸î ¼û°ÜÁø ÆÄÀϵéÀÌ ÀÖÁö¸¸ ÀÌ·¯ÇÑ ÆÄÀϵéÀº Áö±Ý LFS¿¡¼­´Â ÇÊ¿äÇÏÁö ¾Ê½À´Ï´Ù.
{{{
make headers_check
make INSTALL_HDR_PATH=dest headers_install
find dest/include \( -name .install -o -name ..install.cmd \) -delete
cp -rv dest/include/* /usr/include
}}}

===== ¸®´ª½º API headers =====
6.7.2. Contents of Linux API Headers
'''Installed headers:'''

/usr/include/asm/*.h, /usr/include/asm-generic/*.h, /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, /usr/include/sound/*.h, /usr/include/video/*.h, /usr/include/xen/*.h

'''Installed directories:'''

/usr/include/asm, /usr/include/asm-generic, /usr/include/drm, /usr/include/linux, /usr/include/mtd, /usr/include/rdma, /usr/include/scsi, /usr/include/sound, /usr/include/video, /usr/include/xen

'''Short Descriptions'''

 * /usr/include/asm/*.h: The Linux API ASM Headers

 * /usr/include/asm-generic/*.h: The Linux API ASM Generic Headers

 * /usr/include/drm/*.h: The Linux API DRM Headers

 * /usr/include/linux/*.h: The Linux API Linux Headers

 * /usr/include/mtd/*.h: The Linux API MTD Headers

 * /usr/include/rdma/*.h: The Linux API RDMA Headers

 * /usr/include/scsi/*.h: The Linux API SCSI Headers

 * /usr/include/sound/*.h: The Linux API Sound Headers

 * /usr/include/video/*.h: The Linux API Video Headers

 * /usr/include/xen/*.h: The Linux API Xen Headers 

===== platform-specific include/asm symlink¸¸µé±â: =====
{{{
make symlinks
}}}  
 

===== platform specific-headerÆÄÀÏµé ¼³Ä¡: =====
{{{
cp -HR include/asm /usr/include
cp -R include/asm-generic /usr/include
}}}  
 

==== cross-platform kernel headerÆÄÀÏµé ¼³Ä¡: =====
{{{
cp -R include/linux /usr/include
}}}      
 

  ÀϺΠĿ³Î Çì´õÆÄÀÏÀº autoconf.h Çì´õÆÄÀÏÀ» »ç¿ëÇÕ´Ï´Ù. ¾ÆÁ÷ Ä¿³ÎÀ» ±¸¼ºÇÏÁö ¾Ê¾Ò±â ¶§¹®¿¡, ÄÄÆÄÀÏÀÇ ½ÇÆи¦ ÇÇÇϱâ À§ÇÑ ÆÄÀÏÀ» ¸¸µé ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù. ºñ¾îÀÖ´Â autoconf.h ÆÄÀÏÀ» ¸¸µé¾î ÁÖ¼¼¿ä. 
{{{
touch /usr/include/linux/autoconf.h
}}}      
 

==== ¿ì¸®°¡ Ä¿³Î Çì´õµéÀ» º¹»çÇÏ°í symlink¸¦ °ÉÁö¾Ê´Â ÀÌÀ¯ ====
¿¹Àü¿¡´Â /usr/include/{linux,asm}°ú /usr/src/linux/include/{linux,asm}À» ½Éº¼¸¯ ¸µÅ©·Î ¿¬°áÇØ ÁÖ¾ú¾ú½À´Ï´Ù. 
ÇÏÁö¸¸ ¿äÁòÀº ÀÌ·± ¹æ½ÄÀ» »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. (¾È ÁÁÀº ¹æ¹ýÀ̶ó°í ÇÏ´õ±º¿ä) 
´ÙÀ½Àº Linus Torvalds ÀÇ the Linux Kernel Mailing List¿¡¼­ ¹ßÃéÇÑ ³»¿ëÀÔ´Ï´Ù. 


 I would suggest that people who compile new kernels should:  - not have a single symbolic link in sight (except the one that the    kernel build itself sets up, namely the "linux/include/asm" symlink    that is only used for the internal kernel compile itself) And yes, this is what I do. My /usr/src/linux still has the old 2.2.13 header files, even though I haven't run a 2.2.13 kernel in a _loong_ time. But those headers were what Glibc was compiled against, so those headers are what matches the library object files. And this is actually what has been the suggested environment for at least the last five years. I don't know why the symlink business keeps on living on, like a bad zombie. Pretty much every distribution still has that broken symlink, and people still remember that the linux sources should go into "/usr/src/linux" even though that hasn't been true in a _loong_ time.
 
 The essential part is where Linus states that the header files should be the ones which Glibc was compiled against. These are the headers that should be used when you later compile other packages, as they are the ones that match the object-code library files. By copying the headers, we ensure that they remain available if later you upgrade your kernel.




±×·±µ¥, /usr/include/{linux,asm}symlinkµéÀÌ ÇÊ¿ä ¾øÀ» ¸¸Å­ /usr/src/linux°¡ ¿Ïº®ÇØ Á³½À´Ï´Ù. 





=== Man-pages-3.42 ¼³Ä¡ ===

Approximate build time:  <=0.1 SBU
Required disk space:     22 MB

¼³¸í: 1,900°³°¡ ³Ñ´Â man ÆäÀÌÁö¸¦ Æ÷ÇÔÇÑ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
==== Man-pages ¼³Ä¡ ====

´ÙÀ½°ú °°ÀÌ ½ÇÇàÇؼ­ Man-pages¸¦ ¼³Ä¡Ç϶ó:
{{{
make install      
}}}


==== Man-pages ³»¿ë ====

¼³Ä¡µÈ ÆÄÀϵé: various manual pages


==== ¿ä¾à ====

manual pages´Â C¿Í C++ÇÔ¼ö, Áß¿äÇÑ µð¹ÙÀ̽º ÆÄÀϵé, Áß¿äÇÑ ±¸¼º ÆÄÀϵéÀ» ¼­¼úÇÑ ÆäÀÌÁöÀÔ´Ï´Ù.



=== Glibc-2.16.0 ¼³Ä¡ ===
GlibcÆÐÅ°Áö´Â ÁÖ¿äÇÑ C ¶óÀ̺귯¸®¸¦ Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ ¶óÀ̺귯¸®´Â ¸ðµç ¸Þ¸ð¸®ÇÒ´ç, µð·ºÅ丮 °Ë»ö, ÆÄÀÏ ÀÔÃâ·Â, ±×°Íµé¿¡ ´ëÇÑ ÀÐ°í ¾²±â,  ÆÐÅÏÀÏÄ¡, °è»ê, ±×¸®°í ¿©·¯°¡Áö ÀϵéÀÇ ±âÃÊÀûÀÎ ±ÔÄ¢À» Á¦°øÇÕ´Ï´Ù.

{{{
Approximate build time:  17.6 SBU
Required disk space:     852 MB
}}}

Glibc (2.16.0)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/glibc/

Glibc¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Gettext, Grep, Make, Perl, Sed, Texinfo.


==== Glibc ¼³Ä¡ ====
 '''Note'''
 
 ¸î¸îÀÇ LFS¿¡ Æ÷ÇÔµÇÁö ¾Ê´Â ÆÐÅ°ÁöµéÀº data¸¦ ´Ù¸¥°ÍÀ¸·Î ÀÎÄÚµùÇÏ¿© Àü¼ÛÇϱâ À§ÇØ GNU libiconv¸¦ ¼³Ä¡Ç϶ó°í ÇÏ´Â °Íµµ ÀÖ½À´Ï´Ù. libiconvÀÇ ÇÁ·ÎÁ§Æ® ȨÆäÀÌÁö([http://www.gnu.org/software/libiconv/ http://www.gnu.org/software/libiconv/])¿¡¼­´Â "ÀÌ ¶óÀ̺귯¸®´Â iconv()¸¦ °¡Áö°í ÀÖÁö ¾Ê°Å³ª unicode¿¡¼­ ȤÀº unicode·Î º¯È¯ÇÏÁö ¸øÇÏ´Â °æ¿ì¸¦ À§ÇØ Á¦°øµÇ´Â ¶óÀ̺귯¸®ÀÔ´Ï´Ù."¶ó°í ¸»ÇÏ°í ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ Glibc¿¡¼­ ÀÌ¹Ì iconv()¸¦ Á¦°øÇϸç ÀÌ°Í ¶ÇÇÑ À¯´ÏÄڵ尣ÀÇ µ¥ÀÌÅÍ º¯È¯À» Á¦°øÇÕ´Ï´Ù. À̶§¹®¿¡ LFS¿¡¼­´Â libiconv¸¦ µû·Î ¼³Ä¡ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù.

Glibc ¼³Ä¡ ½Ã½ºÅÛÀº ÄÄÆÄÀÏ·¯ ½ºÆå ÆÄÀÏ°ú ¸µÄ¿°¡ ¾ÆÁ÷ /tools¿¡ ¿¬°áµÇ¾î À־ ¿Ïº®ÇÏ°Ô ¼³Ä¡µÉ °ÍÀÔ´Ï´Ù. Glibc¸¦ ¼³Ä¡Çϱâ Àü¿¡´Â ½ºÆå°ú ¸µÄ¿¸¦ Àû¿ëÇÒ¼ö ¾øÀ¸¹Ç·Î GlibcÀÇ ÀÚµ¿ ¼³Á¤Å×½ºÆ®´Â ¿À·ùÀÇ °á°ú¸¦ ÁÙ°ÍÀÌ¸ç ¿Ïº®ÇÑ ½Ã½ºÅÛÀ» ¼ºÃëÇÏ´Â ¸ñÇ¥¸¦ ½ÇÆÐÇÏ°Ô µÉ °ÍÀÔ´Ï´Ù.

Glibc¸¦ ±¸ÃàÇϱâÀü¿¡ ¾î¶² ȯ°æº¯¼ö¸¦ ÃÖÀûÈ­µÈ ±âº» Ç÷¡±×·Î ´Ù½Ã ¼³Á¤ÇÏ´Â °ÍÀ» ÀØÁö ¸¶¼¼¿ä.

¸ÕÀú LFSȯ°æ¿¡¼­ ºôµå ½ÇÆи¦ ¾ß±âÇÒ ¼ö ÀÖ´Â ºÎºÐÀ» ´ÙÀ½°ú °°ÀÌ °íĨ´Ï´Ù:
{{{
sed -i 's#<rpc/types.h>#"rpc/types.h"#' sunrpc/rpc_clntout.c
}}}

'''make install'''¸¦ ½ÇÇàÇÏ¸é ½ºÅ©¸³Æ®´Â test-installation.pl¸¦ ½ÇÇàÇÏ¿© »õ·Î ¼³Ä¡µÈ Glibc¸¦ Å×½ºÆ®ÇÒ °ÍÀÔ´Ï´Ù. ÇÏÁö¸¸ ÀÌ°ÍÀº ¹ö±×¸¦ °¡Áö°í À־ ºôµå½ÇÆзΠÀ̾îÁú ¼ö Àֱ⠶§¹®¿¡ ¹Ì¸® test-installation.plÀ» ½ÇÇàÇÏÁö ¸øÇϵµ·Ï ¼³Á¤ÇÕ´Ï´Ù.
{{{
sed -i '/test-installation.pl/d' Makefile
}}}

'''ldd''' ¼Ð ½ºÅ©¸³Æ®´Â Bash·Î ±¹ÇѵǾî ÀÖ´Â ±¸¹®À» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. ±×·¸±â ¶§¹®¿¡ ¸í·É¾î Çؼ®±â·Î /bin/bash¸¦ ±âº»À¸·Î »ç¿ëÇϵµ·Ï ¼³Á¤ÇÕ´Ï´Ù.(/bin/sh -> /bin/bash)
{{{
sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
}}}

´ÙÀ½Àº ¸î¸î ¾îÇø®ÄÉÀ̼ǿ¡¼­ ³×ÀÓ¼­¹ö¸¦ ÀÌ¿ëÇÒ ¶§ ¹ß»ýÇÏ´Â ¹®Á¦¸¦ ¼öÁ¤ÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../glibc-2.16.0-res_query_fix-1.patch
}}}

Glibc ¼³¸í¼­´Â Glibc¸¦ ±¸ÃàÇÒ¶§ ±¸Ãà´ë»óÀ̵Ǵ µð·ºÅ丮¿¡¼­ ¼Ò½º µð·ºÅ丮¸¦ ¹ÛÀ¸·Î »©³»µµ·Ï ±Ç°íÇÏ°í ÀÖ½À´Ï´Ù:

{{{
mkdir -v ../glibc-build
cd ../glibc-build
}}}      

Áö±Ý Glibc¸¦ ÄÄÆÄÀÏÇϱâÀ§ÇÑ Áغñ¸¦ Çضó:(5Àå¿¡¼­µµ ¼³¸íÇßÁö¸¸, Glibc¸¦ ±¸ÃàÇÒ ¶§´Â, GlibcÀÇ ¾ÐÃàÀ»  Ǭ ´ÙÀ½ ±× µð·ºÅ丮 ¹Û¿¡¼­ configure¸¦ ½ÇÇàÇØ¾ß ÇÑ´Ù.)
{{{
../glibc-2.16.0/configure  \
    --prefix=/usr          \
    --disable-profile      \
    --enable-add-ons       \
    --enable-kernel=2.6.25 \
    --libexecdir=/usr/lib/glibc
}}}      

Configure ¿É¼ÇÀÇ ÀǹÌ:

    * --libexecdir=/usr/lib: ÀÌ°ÍÀº ÇÁ·Î±×·¥ÀÇ pt_chown ÀÇ ±âº»À§Ä¡ÀÎ /usr/libexec ¿¡¼­ /usr/lib·Î À§Ä¡¸¦ º¯°æÇØÁØ´Ù. libexec ¸¦ »ç¿ëÇϴ°ÍÀº FHS-compliant¸¦ »ý°¢ÇÏÁö ¾Ê±âÀ§Çؼ­ÀÌ´Ù. ¿Ö³ÄÇϸé FHS¸¦ ¾ð±ÞÇÏÁö ¾Ê±âÀ§Çؼ­ÀÌ´Ù.

ÆÐÅ°Áö ÄÄÆÄÀÏÇϱâ:
{{{
make
}}}      

 ÁÖÀÇ: ÀÌ Àý¿¡¼­ Glibc¸¦ À§ÇÑ test suite´Â Á¤¸» Áß¿äÇÕ´Ï´Ù. Àý´ë ±×³É Áö³ªÄ¡½Ã¸é ¾ÈµË´Ï´Ù.

Å×½ºÆ® Çϱâ :
{{{
make -k check 2>&1 | tee glibc-check-log
grep Error glibc-check-log
}}}      

ÀϹÝÀûÀ¸·Î ¸î¸î Å×½ºÆ®´Â Åë°úµÇÁö ¸øÇÒ °Ì´Ï´Ù. ÇÏÁö¸¸ ¿©·¯ºÐµéÀº ¾Æ·¡ ÀÖ´Â Å×½ºÆ® ½ÇÆеéÀº ±×³É ¹«½ÃÇϼŵµ µË´Ï´Ù. 

¿©·¯ºÐµéÀº ¾Æ¸¶µµ ''posix/annexc''¿Í ''conform/run-conformtest'' Å×½ºÆ®¿¡¼­ ½ÇÆÐÇÒ °ÍÀÔ´Ï´Ù. °Ô´Ù°¡ Glibc test suite´Â È£½ºÆ® ½Ã½ºÅÛ¿¡ ÀÇÁ¸ÇÏ´Â °ÍÀÌ Àֱ⠶§¹®¿¡ ½ÇÆÐÇÏ´Â °ÍÀÌ ÀÖÀ» ¼öµµ ÀÖ½À´Ï´Ù. ´ÙÀ½Àº °øÅëÀûÀ¸·Î ¹ß»ýµÇ´Â °ÍµéÀÔ´Ï´Ù:
 * ''nptl/tst-clock2, nptl/tst-attr3, tst/tst-cputimer1, rt/tst-cpuclock2'' Å×½ºÆ®´Â ¿øÀÎÀº ¿Ïº®ÇÏ°Ô ÀÌÇØÇÒ ¼ö ¤Ô¤·¤Ó¤´Áö¸¸ ÀÛÀº ŸÀÌ¹Ö ¹®Á¦°¡ ÀÌ·¯ÇÑ ½ÇÆÐÀÇ ¿øÀÎÀÏ °ÍÀÔ´Ï´Ù.
 
 * ¸¸ÀÏ ¿©·¯ºÐÀÇ CPU°¡ Intel ¶Ç´Â AMD ÇÁ·Î¼¼¼­ Á¾·ù°¡ ¾Æ´Ò °æ¿ì¿¡´Â math test°¡ °¡²û¾¿ ½ÇÆÐÇÒ ¼ö ÀÖ½À´Ï´Ù.

 * Á¤¸» ¿À·¡µÇ¾ú°Å³ª ´À¸° Çϵå¿þ¾î¸¦ »ç¿ëÇÏ´Â °æ¿ì Å×½ºÆ® timeoutÀ» ÃÊ°úÇÏ¿© ½ÇÆÐÇÒ ¼öµµ ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº make check¿¡ '''TIMEOUTFACTOR=16 make -k check'''ó·³ TIMEOUTFACTORÀ» ¼³Á¤ÇÏ¿© Àç¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.

 * ´Ù¸¥ Å×½ºÆ®µé:poxis/bug-regex32, misc/tst-writev, elf/check-textrel, nptl/tst-getpid2, stdio-common/bug22 µîÀº ¸î¸î ¾ÆÅ°ÅØÃÄ¿¡¼­ ½ÇÆÐÇÑ´Ù°í ¾Ë·ÁÁ® ÀÖ½À´Ï´Ù.

¹«½ÃÇصµ µÇ´Â ¸Þ¼¼ÁöÀÌÁö¸¸ Glibc°¡ /etc/ld.so.conf ÆÄÀÏÀÌ ¾ø´Ù°í ¼³Ä¡½Ã¿¡ ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÒ °Ì´Ï´Ù. ÀÌ·¯ÇÑ °æ°í ¸Þ¼¼Áö¸¦ ¸·±â À§ÇØ ÆÄÀÏÀ» Çϳª »ý¼ºÇØÁÝ´Ï´Ù.
{{{
touch /etc/ld.so.conf
}}}

ÆÑÅ°Áö¸¦ ÀνºÅçÇϼ¼¿ä.
{{{
make install
}}}

NIS¿Í PRC¿¡ °ü·ÃµÈ Çì´õÆÄÀϵéÀ» ¼³Ä¡ÇØÁÝ´Ï´Ù. À̰͵éÀº ³ªÁß¿¡ BLFS ÆÐÅ°ÁöµéÀ» ¼³Ä¡ÇÒ ¶§ Glibc¸¦ ÀçºôµåÇÏÁö ¾Ê±â À§ÇØ ÇÊ¿äÇÑ °úÁ¤ÀÔ´Ï´Ù.
{{{
cp -v ../glibc-2.16.0/sunrpc/rpc/*.h /usr/include/rpc
cp -v ../glibc-2.16.0/sunrpc/rpcsvc/*.h /usr/include/rpcsvc
cp -v ../glibc-2.16.0/nis/rpcsvc/*.h /usr/include/rpcsvc
}}}

¾Æ·¡ ¸í·ÉÀ» ÀÔ·ÂÇÏ¸é ¸ðµç ·ÎÄÉÀÏÀÌ ¼³Ä¡µÈ´Ù.
{{{
make localedata/install-locales
}}}      

ÀÌÀüÀÇ ¸í·ÉÀ» ½ÇÇàÇÔÀ¸·Î½á  ¸ðµç ·ÎÄÉÀÏÀ» ¼³Ä¡ÇÒ ¼ö ÀÖ¾ú´Ù. ÇÏÁö¸¸ ¿øÇÏ´Â localses¸¸À» ¼³Ä¡ ÇÒ¼öµµ ÀÖ´Ù.  localedef ¸í·ÉÀ» »ç¿ëÇÔÀ¸·Î¼­ ÇÊ¿äÇÑ ·ÎÄÉÀϸ¸À» ¼³Ä¡ÇÒ ¼ö ÀÖ´Â °ÍÀÌ´Ù. Glibc ¼Ò½ºÀÇ INSTALL ÆÄÀÏ¿¡¼­ ÀÌ Á¤º¸¸¦ ãÀ» ¼ö ÀÖ´Ù.  ¾ÕÀ¸·ÎÀÇ ÆÐÅ°Áö¸¦ ¼³Ä¡ÇϱâÀ§ÇÑ Å×½ºÆ®µé Áß¿äÇÑ ´Ù¼öÀÇ locales°¡ ÀÖ´Ù. ƯÈ÷ GCCÀÇ libstdc++ Å×½ºÅ͵éÀÌ ±×·¯ÇÏ´Ù. ¼³Ä¡¸¦ ÇÏ´Ùº¸¸é install-locales ¸ñÇ¥¸¦ ³Ñ¾î Å×½ºÆ®¸¦ ¼º°øÀûÀ¸·Î ½ÇÇàÇϱâÀ§ÇØ ÃÖ¼ÒÇÑÀ¸·Î locales¿¡ ¼³Ä¡µÉ°ÍÀÌ´Ù.
{{{
mkdir -pv /usr/lib/locale
localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
localedef -i de_DE -f ISO-8859-1 de_DE
localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
localedef -i de_DE -f UTF-8 de_DE.UTF-8
localedef -i en_GB -f UTF-8 en_GB.UTF-8
localedef -i en_HK -f ISO-8859-1 en_HK
localedef -i en_PH -f ISO-8859-1 en_PH
localedef -i en_US -f ISO-8859-1 en_US
localedef -i en_US -f UTF-8 en_US.UTF-8
localedef -i es_MX -f ISO-8859-1 es_MX
localedef -i fa_IR -f UTF-8 fa_IR
localedef -i fr_FR -f ISO-8859-1 fr_FR
localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i it_IT -f UTF-8 it_IT.UTF-8
localedef -i ja_JP -f EUC-JP ja_JP
localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
localedef -i zh_CN -f GB18030 zh_CN.GB18030
}}}      


==== Glibc ¼³Á¤ ====

  ¿ì¸®´Â /etc/nsswitch.conf ÆÄÀÏÀ» ¸¸µé¾î¾ß ÇÕ´Ï´Ù.  ¿Ö³ÄÇϸé, Glibc´Â ±âº»ÀûÀ¸·Î ÀÌ ÆÄÀÏÀÌ ¾ø°Å³ª ¼Õ»óµÇ¾úÀ»¶§ Glibc´Â ³×Æ®¿öÅ©¿Í °ü·ÃµÈ ÀÛ¾÷À» ÇÏÁö ¾Ê±â ¶§¹®ÀÔ´Ï´Ù.  ¶ÇÇÑ ½Ã°£´ë¸¦ ¼³Á¤Çϱâ À§Çؼ­µµ ÇÊ¿äÇÕ´Ï´Ù.


¾Æ·¡ÀÇ ³»¿ëÀ» ÂüÁ¶ÇÏ¿©(½ÇÇàÇÏ¿©) /etc/nsswitch.conf ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù.

{{{
cat > /etc/nsswitch.conf << "EOF"
# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

hosts: files dns
networks: files

protocols: files
services: files
ethers: files
rpc: files

# End /etc/nsswitch.conf
EOF
}}}      

´ç½ÅÀÌ ÀÖ´Â ½Ã°£´ë¸¦ ã±âÀ§ÇØ ¾Æ·¡ÀÇ ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇϼ¼¿ä.
{{{
tzselect
}}}      

  ´ç½ÅÀÇ À§Ä¡¿¡ °üÇÑ ¾à°£ÀÇ Áú¹®ÀÇ ´äº¯À» ÇÏ¸é ±× ½ºÅ©¸³Æ®´Â EST5EDT or Canada/Eastern ¿Í °°Àº ´ç½ÅÀÇ ½Ã°£´ëÀÇ À̸§À» Ãâ·ÂÇØ ÁÙ°ÍÀÔ´Ï´Ù. ±×¸®°í ³ª¼­ ¾Æ·¡¿Í °°ÀÌ ÇÔÀ¸·Î½á /etc/localtime À» »ý¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.
{{{
cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime
(Çѱ¹ÀÏ °æ¿ì¿¡´Â)
cp --remove-destination /usr/share/zoneinfo/Asia/Seoul /etc/localtime
}}}

¿É¼ÇÀÌ ÀǹÌÇÏ´Â °Í:

    *

      --remove-destination: ÀÌ°ÍÀº ÀÌ¹Ì Á¸ÀçÇÏ´Â ½Éº¼¸¯ ¸µÅ©¸¦ °­Á¦ Á¦°ÅÇϱâÀ§ÇØ ÇÊ¿äÇÕ´Ï´Ù. ½Éº¼¸¯ ¸µÅ© ´ë½Å º¹»çÇÏ´Â ÀÌÀ¯´Â /usr ÀÌ ºÐ¸®µÈ ÆÄƼ¼ÇÀÇ »óȲÀ¸·ÎºÎÅÍ º¸È£Çϱâ À§Çؼ­ÀÌ´Ù. ÀÌ°ÍÀº ½Ì±Û À¯Àú¸ðµå·Î ºÎÆÃÇßÀ»¶§ ¹®Á¦°¡ µÉ ¼ö ÀÖ½À´Ï´Ù.

¹°·Ð, Canada/Eastern´ë½Å¿¡, tzselect ½ºÅ©¸³Æ®·Î½á ŸÀÔÁ¸ÀÇ À̸§À» ÁÖ¾ú´Ù.(°¢ Áö¿ªÀÇ Å¸ÀÓÁ¸ÀÌ /usr/share/zoneinfo ¿¡ Á¸ÀçÇÕ´Ï´Ù)

==== ´ÙÀ̳ª¹Í ·Î´õ ¼³Á¤ ====

  ±âº»ÀûÀ¸·Î µ¿Àû ·Î´õ(/lib/ld-linux.so.2)´Â /lib ¿Í /usr/lib¿¡¼­ ãÀ¸¸ç ´ç½ÅÀÌ ÇÁ·Î±×·¥¿¡¼­ µ¿Àû ¶óÀ̺귯¸®¸¦ ½ÇÇà½Ãų¶§ ÇÊ¿äÇÕ´Ï´Ù. ±×·¯³ª, ¸¸¾à ¶óÀ̺귯¸®°¡ /lib and /usr/lib¿ÜÀÇ ´Ù¸¥°÷¿¡ ÀÖ´Ù¸é, ´ç½ÅÀº /etc/ld.so.conf ÆÄÀÏ¿¡ µ¿Àû·Î´õ°¡ ¹ß°ßÇÒ ¼ö ÀÖµµ·Ï Ãß°¡ÇØ ÁÙ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù. /usr/local/lib ¿Í /opt/lib µð·ºÅ丮´Â ÀϹÝÀûÀ¸·Î Ãß°¡ÀûÀ¸·Î Æ÷ÇÔ µË´Ï´Ù. ±×·¡¼­ ¿ì¸®´Â ÀÌ µð·ºÅ丮µéÀ» µ¿Àû·Î´õÀÇ Å½»ö °æ·Î¿¡ Ãß°¡ÇØ¾ß ÇÕ´Ï´Ù.

¾Æ·¡ÀÇ ³»¿ëÀ¸·Î½á /etc/ld.so.conf ÆÄÀÏÀ» »õ·Î »ý¼ºÇÑ´Ù.
{{{
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf

/usr/local/lib
/opt/lib

# End /etc/ld.so.conf
EOF
 }}}     

==== GlibcÀÇ ³»¿ë ====

Installed programs: catchsegv, gencat, getconf, getent, glibcbug, iconv, iconvconfig, ldconfig, ldd, lddlibc4, locale, localedef, mtrace, nscd, nscd_nischeck, pcprofiledump, pt_chown, rpcgen, rpcinfo, sln, sprof, tzselect, xtrace, zdump and zic

Installed libraries: ld.so, libBrokenLocale.[a,so], libSegFault.so, libanl.[a,so], libbsd-compat.a, libc.[a,so], libc_nonshared.a, libcrypt.[a,so], libdl.[a,so], libg.a, libieee.a, libm.[a,so], libmcheck.a, libmemusage.so, libnsl.a, libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so, libnss_nis.so, libnss_nisplus.so, libpcprofile.so, libpthread.[a,so], libresolv.[a,so], librpcsvc.a, librt.[a,so], libthread_db.so and libutil.[a,so]


==== ¿ä ¾à ====

catchsegv ÇÁ·Î±×·¥ÀÌ ¼¼±×¸ÕÆ® ºÎÀç·Î Á¾·áµÇ¾úÀ»¶§ ½ºÅà Ʈ·¹À̽º¸¦ »ý¼ºÇϴµ¥ »ç¿ëµÇ°ï ÇÑ´Ù.

gencat ¸Þ¼¼Áö ¸ñ·Ï »ý¼º.

getconf ½Ã½ºÅÛÀÇ ÀϹÝÀûÀÎ °¡º¯ÀÇ ÆÄÀÏÀÇ ¼³Á¤°ªÀ» º¸¿©ÁØ´Ù.

getent °ü¸®ÀÚ µ¥ÀÌÅÍ º£À̽º·ÎºÎÅÍ ¸ñ·ÏÀ» ¾ò´Â´Ù.

glibcbug ¹ö±× ¸®Æ÷Æ®¸¦ »ý¼ºÇÏ°í ±×°ÍÀ» À̸ÞÀÏÀ» º¸³½´Ù.

iconv ¹®ÀÚÀÇ º¯È¯À» ¼öÇàÇÑ´Ù.

iconvconfig iconv ¸ðµâÀÇ ºü¸¥ ½ÇÇàÀ»À§ÇØ ¼³Á¤ ÆÄÀÏÀ» »ý¼ºÇÑ´Ù.

ldconfig ·±Å¸ÀÓ ¹ÙÀεù½Ã µ¿Àû ¸µÄ¿¸¦ ¼³Á¤ÇÑ´Ù.

ldd °¢ ÇÁ·Î±×·¥À̳ª °øÀ¯¶óÀ̺귯¸®¿¡ ÇÊ¿äÇÑ °øÀ¯¶óÀ̺귯¸®¸¦ º¸°íÇÑ´Ù.

lddlibc4 objectÆÄÀÏ°ú ÇÔ²² ldd¸í·ÉÀ» º¸Á¶ÇÑ´Ù.

locale is a Perl program that tells the compiler to enable or disable the use of POSIX locales for built-in operations. built-in ¼öÇàÀ» À§ÇØ POSIX locales¸¦ °¡´ÉÇÏ°ÔÇϰųª ȤÀº ºÒ°¡´ÉÇÏ°Ô ÇÏ´Â ÄÄÆÄÀÏ·¯¶ó ºÒ¸®¿ì´Â PerlÇÁ·Î±×·¥ÀÌ´Ù.

localedef locale ÄÄÆÄÀÏ ¼³¸í¼­.

mtrace...

nscd is a name service cache daemon providing a cache for the most common name service requests.

nscd_nischeck º¸È£ ¸ðµâÀÌ NIS+ ã´Âµ¥ ÇÊ¿äÇÑÁö ¾ÈÇÑÁö üũÇÑ´Ù.

pcprofiledump dumps information generated by PC profiling.

pt_chown is a helper program for grantpt to set the owner, group and access permissions of a slave pseudo terminal.

rpcgen generates C code to implement the RPC protocol.

rpcinfo makes an RPC call to an RPC server.

sln is used to make symbolic links. The program is statically linked, so it is useful for making symbolic links to dynamic libraries if the dynamic linking system for some reason is nonfunctional.

sprof reads and displays shared object profiling data.

tzselect asks the user about the location of the system and reports the corresponding time zone description.

xtrace traces the execution of a program by printing the currently executed function.

zdump is the time zone dumper.

zic is the time zone compiler.

ld.so is the helper program for shared library executables.

libBrokenLocale is used by programs, such as Mozilla, to solve broken locales.

libSegFault is a segmentation fault signal handler. It tries to catch segfaults.

libanl is an asynchronous name lookup library.

libbsd-compat provides the portability needed in order to run certain BSD programs under Linux.

libc is the main C library -- a collection of commonly used functions.

libcrypt is the cryptography library.

libdl is the dynamic linking interface library.

libg is a runtime library for g++.

libieee is the IEEE floating point library.

libm is the mathematical library.

libmcheck contains code run at boot.

libmemusage is used by memusage to help collect information about the memory usage of a program.

libnsl is the network services library.

libnss* are the Name Service Switch libraries, containing functions for resolving host names, user names, group names, aliases, services, protocols,and the like.

libpcprofile contains profiling functions used to track the amount of CPU time spent in which source code lines.

libpthread is the POSIX threads library.

libresolv contains functions for creating, sending, and interpreting packets to the Internet domain name servers.

librpcsvccontains functions providing miscellaneous RPC services.

librt contains functions providing most of the interfaces specified by the POSIX.1b Realtime Extension.

libthread_db contains functions useful for building debuggers for multi-threaded programs.

libutil contains code for "standard" functions used in many different Unix utilities.




=== toolchain Àç Á¶Á¤ === 


 ÀÌÁ¦ »õ C¶óÀ̺귯¸®µéÀº ¼³Ä¡°¡ ¿Ï·á µÇ¾ú°í toolchainÀ» ´Ù½Ã Á¶ÀýÇÒ ¶§ÀÔ´Ï´Ù. ¿Ö³ÄÇϸé ÄÄÆÄÀÏµÈ ¿©·¯ ÇÁ·Î±×·¥ÀÌ »õ C¶óÀ̺귯¸®·Î ¸µÅ©µÉ °ÍÀ̱⠶§¹®ÀÔ´Ï´Ù. ±âº»ÀûÀ¸·Î, Àü Àå¿¡¼­ ½ÃÀÛÇÑ "locking in"ºÎºÐ¿¡¼­ ÇÑ°ÍÀ» °Å²Ù·Î ÇÑ°ÍÀÔ´Ï´Ù.

  ù ¹ø°·Î ÇÒ°ÍÀº linker¸¦ Á¶ÀýÇÏ´Â °ÍÀÔ´Ï´Ù. /tools ¸µÄ¿¸¦ ¹é¾÷ÇÏ°í ÀÌÀü Àå¿¡¼­ ¸¸µé¾î³õÀº ¸µÄ¿·Î ´ëüÇÕ´Ï´Ù. ¶ÇÇÑ ¿ì¸®´Â /tools/$(gcc -dumpmachine)/binÀ¸·Î ¸µÅ©¸¦ Çϳª ¸¸µé °Ì´Ï´Ù.

{{{
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
}}}      

´ÙÀ½Àº »õ·Î¿î µ¿Àû ¸µÄ¿¸¦ °¡¸®Å°µµ·Ï GCC spec ÆÄÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù. ´Ü¼øÇÏ°Ô /toolsÀÇ ¸ðµç ÀνºÅϽºµéÀ» Áö¿ü±â ¶§¹®¿¡ ´ÙÀ̳ª¹Í ¸µÄ¿·Î ¿Ã¹Ù¸¥ °æ·Î¸¦ ¼³Á¤À» ÇØÁÖ¾î¾ßÇÕ´Ï´Ù. spec ÆÄÀÏÀ» Á¶Á¾ÇÏ´Â °ÍÀº GCC°¡ ¾îµð¿¡¼­ Çì´õÆÄÀÏ°ú Glibc start ÆÄÀϵéÀ» ã¾Æ¾ßÇÏ´ÂÁö ¾Ë·ÁÁÖ±â À§ÇÑ °ÍÀÔ´Ï´Ù. '''sed''' Ä¿¸Çµå¸¦ ´ÙÀ½°ú °°ÀÌ »ç¿ëÇÕ´Ï´Ù:
{{{
gcc -dumpspecs | sed -e 's@/tools@@g' \
    -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
    -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
    `dirname $(gcc --print-libgcc-file-name)`/specs
}}}

¸ðµç ÄÄÆÄÀÏµÈ ÇÁ·Î±×·¥µéÀº ÀÌÁ¦ ºÎÅÍ /usr/lib ¿Í /libÀÇ ±× ¶óÀ̺귯¸®µé¿¡°Ô¸¸ ¸µÅ©µÉ °ÍÀÔ´Ï´Ù.

´ÙÀ½À¸·Î ÇÒ°ÍÀº »õ ´ÙÀ̳ª¹Í ¸µÄ¿¸¦ Æ÷ÀÎÆ®Çϱâ À§ÇØ GCC ½ºÆåÀ» ¼öÁ¤ÇÏ´Â °ÍÀÔ´Ï´Ù. Áö³­¹ø¿¡ ÇÑ °Íó·³, ¿ì¸®´Â ÀÌ ÀÛ¾÷À» Çϱâ À§ÇØ sed¸¦ »ç¿ëÇÒ °ÍÀÔ´Ï´Ù.

{{{
SPECFILE=/tools/lib/gcc-lib/*/*/specs &&
sed -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g' \
    $SPECFILE > newspecfile &&
mv -f newspecfile $SPECFILE &&
unset SPECFILE
}}}

À§ÀÇ ¸í·É¾îµéÀ» ÀÏÀÏÈ÷ ¼ÕÀ¸·Î ÀÔ·ÂÇÏ´Â °Íµµ ÁÁÁö¸¸, ¿ÀŸ°¡ ¹ß»ýÇÒ °¡´É¼ºÀÌ Àֱ⠶§¹®¿¡ ºÙ¿©³Ö±â ÇÏ´Â °ÍÀÌ ´õ ÁÁÀ» °ÍÀÔ´Ï´Ù.
±×¸®°í ÁøÂ¥ ¸¸µé¾îÁ³´Ù´Â°ÍÀ» Áõ¸íÇϱâ À§ÇØ ½ºÆÑÆÄÀϵéÀ» ½Ã°¢ÀûÀ¸·Î Á¶»çÇϴ°ÍÀº ÁÁÀº ¹æ¹ýÀÔ´Ï´Ù.

¿©±â¼­ ÀçÁ¶Á¤µÈ ÅøüÀÎÀÇ ±âº» ±â´Éµé(ÄÄÆÄÀÏ, ¸µÅ©)µéÀÌ Á¦´ë·Î ÀÛµ¿ÇÏ´ÂÁö È®½ÇÇÏ°Ô °Ë»çÇÏ¿©¾ß ÇÕ´Ï´Ù. À̸¦ À§Çؼ­ ´ÙÀ½ÀÇ sanity check¸¦ ½ÇÇàÇÕ´Ï´Ù:
{{{
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl, --verbose &> dummy.log
readelf -l a.out | grep ': /lib'
}}}

¸¸¾à Á¦´ë·Î ÀÛµ¿Çß´Ù¸é, ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂÇÒ °ÍÀÔ´Ï´Ù:
{{{
[Requesting program interpreter: /lib/ld-linux.so.2]
}}}

/lib ÀÌ µ¿Àû ¸µÄ¿ÀÇ °æ·Î·Î µÇ¾ú´Ù´Â °ÍÀ» È®ÀÎÇÏ¿´½À´Ï´Ù. ÀÌÁ¦ ÀûÀýÇÑ startfileÀ» »ç¿ëÇß´ÂÁö ´ÙÀ½°ú °°ÀÌ È®ÀÎÇÕ´Ï´Ù.
{{{
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
}}}

¸¸¾à Á¦´ë·Î ÀÛµ¿Çß´Ù¸é ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÉ °ÍÀÔ´Ï´Ù:
{{{
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded
}}}

ÀÌÁ¦ ÄÄÆÄÀÏ·¯°¡ ¿Ã¹Ù¸¥ Çì´õ ÆÄÀÏÀ» °Ë»öÇÏ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
{{{
grep -B1 '^ /usr/include' dummy.log
}}}

Á¦´ë·Î ÀÛµ¿ÇÒ°æ¿ì ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµË´Ï´Ù:
{{{
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");
}}}

´ÙÀ½°ú °°ÀÌ ¿Ã¹Ù¸¥ libc¸¦ »ç¿ëÇϵµ·Ï ¼³Á¤ÇØÁÝ´Ï´Ù:
{{{
grep "/lib.*/libc.so.6 " dummy.og
}}}

Á¦´ë·Î ÀÛµ¿ÇÒ°æ¿ì ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµË´Ï´Ù:
{{{
found ld-linux.so.2 at /lib/ld-linux.so.2
}}}

¸¸¾à¿¡ Ãâ·Â°á°ú°¡ À§¿Í °°ÀÌ µÇÁö ¾Ê´Â´Ù¸é ¾îµò°¡¿¡¼­ ½É°¢ÇÏ°Ô À߸øµÈ °ÍÀÔ´Ï´Ù. ´Ù½Ã µÇµ¹¾Æ°¡¼­ óÀ½ºÎÅÍ ´Ù½Ã ½ÇÇàÇϽʽÿÀ. ´ëºÎºÐÀº specÆÄÀÏ ÀçÁ¶Á¤À» À߸øÇÑ °ÍÀÌ ¿øÀÎÀÔ´Ï´Ù. ÀÌ·¯ÇÑ ¹®Á¦µéÀº ºôµå °úÁ¤À» ´Ù½ÃÇϸé ÇØ°áµÉ °ÍÀÔ´Ï´Ù.

¸ðµç °ÍÀÌ ¿Ã¹Ù¸£°Ô Å×½ºÆ®µÈ °ÍÀ» È®ÀÎÇß´Ù¸é Å×½ºÆ® ÆÄÀÏÀ» Á¦°ÅÇÕ´Ï´Ù:
{{{
rm -v dummy.c a.out dummy.log
}}} 

=== Zlib-1.2.7 ¼³Ä¡ ===

The Zlib package contains compression and uncompression routines used by some programs.
{{{
Approximate build time:  0.1 SBU
Required disk space:     3.9 MB
}}}
Zib(1.2.7)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ® :
http://www.gzip.org/zlib/

Zib¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Binutils, Coreutils, GCC, Glibc, Make, Sed.
Zib ¼³Ä¡

Zlib ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr
}}}
    Note: Zlib is known to build its shared library incorrectly if CFLAGS is specified in the environment. If you are using your own CFLAGS variable, be sure to add the -fPIC directive to your CFLAGS for the duration of the above command, then remove it afterwards.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
Zlib ÆÑÅ°Áö´Â ÄÄÆÄÀÏÀÌ Á¦´ë·Î µÇ¾ú´ÂÁö¸¦ °Ë»çÇϱâ À§ÇÑ Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. ZlibÀÇ Test suiteÀº ¼Óµµ°¡ ºü¸£°í ±²ÀåÈ÷ ½±½À´Ï´Ù. ±×·¯¹Ç·Î Çѹø ÇØ º¸±æ ¹Ù¶ø´Ï´Ù. ¾Æ·¡ ¸í·É¾î¸¦ ½ÇÇàÇÏ¸é °øÀ¯ ¶óÀ̺귯¸®¸¦ Å×½ºÆ® ÇÏ°Ô µË´Ï´Ù.
{{{
make check      
}}}
¶óÀ̺귯¸® ¼³Ä¡Çϱâ:
{{{
make install      
}}}

¾Æ·¡ ¸í·ÉÀ» ½ÇÇàÇؼ­ ¶óÀ̺귯¸®µéÀ» /lib·Î ¿Å±é½Ã´Ù. 
{{{
mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/libz.so.1.2.7 /usr/lib/libz.so
}}}

==== ZlibÀÇ ³»¿ë ====
¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libz{a,so}

==== ¿ä¾à ====
libz* contains compression and uncompression functions used by some programs.

=== File-5.11  ===

The File package contains a utility for determining the type of files.
{{{
Approximate build time:  0.1 SBU
Required disk space:     12.5 MB
}}}
File (5.11) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.astron.com/pub/file/

File¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Sed, Zlib.
==== File ¼³Ä¡ ====

File ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}
ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}
test suite½ÇÇàÇϱâ:
{{{
make check
}}}
¼³Ä¡Çϱâ:
{{{
make install      
}}}
==== File ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: file

¼³Ä¡µÈ ¶óÀ̺귯¸®: libmagic.{a,so}
==== ¿ä¾à ====
file tries to classify each given file. It does this by performing several tests: file system tests, magic number tests, and language tests. The first test that succeeds determines the result.

libmagic contains routines for magic number recognition, used by the file program.s

=== Binutils-2.22 ¼³Ä¡ ===

The Binutils package contains a linker, an assembler, and other tools for handling object files.
{{{
Approximate build time:  1.9 SBU
Required disk space:     343 MB
}}}
Binutils (2.22)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/binutils/

Bunutils¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed, Texinfo.

==== Binutils ¼³Ä¡ ====

  ÀÌÁ¦ pseudoÅ͹̳ÎÀÌ ch-root(su)ȯ°æ¿¡¼­ Á¤È®ÇÏ°Ô µ¿ÀÛÇÏ´ÂÁö È®ÀÎÇØ¾ß ÇÒ ½Ã°£ÀÔ´Ï´Ù:
{{{
expect -c "spawn ls"
}}}      

¸¸¾à ´ç½ÅÀÌ ÀÔ·ÂÇÑ ³»¿ë°ú °°Àº ÀÀ´äÀ» ¹Þ¾Ò´Ù¸é Á¤»óÀÔ´Ï´Ù. ÇÏÁö¸¸ ±×·¸Áö ¾Ê°í ´Ù¸¥ ¸Þ¼¼Áö¸¦ ¹Þ¾Ò´Ù¸é:

The system has no more ptys.  Ask your system administrator to create more.

chrootȯ°æÀÌ ÀûÀýÇÑ PTY ¿¬»êÀ» ÇÏÁö ¸øÇÑ °ÍÀÔ´Ï´Ù. ÀÌ ¹®Á¦´Â Binutils°ú GCCÀÇ test suite¸¦ ½ÇÇàÇϱâ Àü¿¡ ¹Ýµå½Ã ÇØ°áµÇ¾î¾ß ÇÕ´Ï´Ù.

standards.info ÆÄÀÏÀÇ ¼³Ä¡´Â ±ÝÁöÇÕ´Ï´Ù. ÀÌ ÆÄÀÏÀº ³ªÁß¿¡ Autoconf ¼³Ä¡¿¡¼­ ´õ »õ·Î¿î ¹öÀüÀ¸·Î ¼³Ä¡µÉ °ÍÀÔ´Ï´Ù.
{{{
rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in
}}}

ÄÄÆÄÀÏ ÃÖÀûÈ­¸¦ »ç¿ëÇÒ ¶§ ºôµå ½ÇÆи¦ ¹æÁöÇϱâ À§ÇØ ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../binutils-2.22-build_fix-1.patch
}}}

binutils ¹®¼­¿¡¼­´Â binutils¸¦ ¼³Ä¡ÇÒ¶§ »õ·Î¿î µð·ºÅ丮¸¦ ¸¸µé¾î¼­ ¼³Ä¡Çϴ°ÍÀ» ±ÇÀåÇÕ´Ï´Ù:
{{{
mkdir -v ../binutils-build
cd ../binutils-build
}}}


Binutils ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
../binutils-2.22/configure --prefix=/usr --enable-shared
}}}      

package ÄÄÆÄÀÏÇϱâ:
{{{
make tooldir=/usr
}}}      

Normally, the tooldir (the directory where the executables end up) is set to $(exec_prefix)/$(target_alias), which expands into, for example, /usr/i686-pc-linux-gnu. ÀÌÁ¦ºÎÅÍ´Â /usr ¾È¿¡ ±×·± µð·ºÅ丮°¡ ÀÖÀ» ÇÊ¿ä°¡ ¾ø½À´Ï´Ù. ±×·± µð·ºÅ丮µéÀº Cross-compile (ÀÎÅÚ °è¿­ PC¿¡¼­ PowerPC °è¿­¿¡¼­ µ¹¾Æ°¡´Â ÇÁ·Î±×·¥À» ÄÄÆÄÀÏ ÇÏ´Â)À» ÇßÀ» °æ¿ì¿¡¸¸ »ç¿ëµË´Ï´Ù.

    Áß¿ä: ÀÌ Àå¿¡¼­´Â Test suite°¡ »ó´çÈ÷ Áß¿äÇÕ´Ï´Ù. ÁÖÀÇÇØ ÁÖ¼¼¿ä.

Test Çϱâ:
{{{
make -k check
}}}      

test suite¿¡ ´ëÇؼ± the Section called Installing Binutils-2.22 - Pass 2 in Chapter 5 ¿¡ Àß ³ª¿Í ÀÖÀ¸¹Ç·Î ¹®Á¦°¡ »ý±â¸é ²À Âü°íÇÏ±æ ¹Ù¶ø´Ï´Ù.

Package ÀνºÅçÇϱâ:
{{{
make tooldir=/usr install
}}}      

libiberty Çì´õ ÆÄÀÏÀ» »ç¿ëÇÏ´Â ÆÑÅ°ÁöµéÀ» À§ÇØ libibertyÇì´õµéÀ» ¼³Ä¡ÇսôÙ:
{{{
cp -v ../binutils-2.22/include/libiberty.h /usr/include
}}}      

==== BinutilsÀÇ ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump, ranlib, readelf, size, strings and strip

¼³Ä¡µÈ ¶óÀ̺귯¸®: libiberty.a, libbfd.[a,so] and libopcodes.[a,so]


==== ¿ä¾à ====

addr2line translates program addresses to file names and line numbers. Given an address and the name of an executable, it uses the debugging information in the executable to figure out which source file and line number are associated with the address.

ar creates, modifies, and extracts from archives. An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive).

as is an assembler. It assembles the output of gcc into object files.

c++filt is used by the linker to demangle C++ and Java symbols, to keep overloaded functions from clashing.

gprof displays call graph profile data.

ld is a linker. It combines a number of object and archive files into a single file, relocating their data and tying up symbol references.

nm lists the symbols occurring in a given object file.

objcopy is used to translate one type of object file into another.

objdump displays information about the given object file, with options controlling what particular information to display. The information shown is mostly only useful to programmers who are working on the compilation tools.

ranlib generates an index of the contents of an archive, and stores it in the archive. The index lists all the symbols defined by archive members that are relocatable object files.

readelf displays information about elf type binaries.

size lists the section sizes -- and the grand total -- for the given object files.

strings outputs for each file given the sequences of printable characters that are of at least the specified length (defaulting to 4) For object files it prints by default only the strings from the initializing and loading sections. For other types of files it scans the whole file.

strip discards symbols from object files.

libiberty contains routines used by various GNU programs, including getopt, obstack, strerror, strtol and strtoul.

libbfd is the Binary File Descriptor library.

libopcodes is a library for dealing with opcodes. It is used for building utilities like objdump. Opcodes are the "readable text" versions of instructions for the processor.

=== GMP-5.0.5 ¼³Ä¡ ===
ºôµå ½Ã°£: 1.2 SBU
ÇÊ¿ä °ø°£:  50 MB
¼³Ä¡ ³»¿ë: GMP ÆÐÅ°Áö´Â math ¶óÀ̺귯¸®µéÀ» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº ÀÓÀÇ ¼öÀÇ Á¤¹ÐÇÑ »ê¼ú¿¬»êÀ» À§ÇÑ À¯¿ëÇÑ ÇÔ¼öµéÀ» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù.
==== GMP ¼³Ä¡Çϱâ ====
 '''Note'''
 ¸¸¾à ¿©·¯ºÐÀÌ x86 32-bit¸¦ ºôµåÇÏ°í ÀÖÁö¸¸ 64-bit Äڵ带 ½ÇÇàÇÒ ¼ö ÀÖ´Â CPU¸¦ °¡Áö°í ÀÖ°í CFLAGS¸¦ ÁöÁ¤ÇسõÀº ȯ°æÀ̶ó¸é configure ½ºÅ©¸³Æ®´Â 64-bit·Î configure¸¦ ÁøÇàÇÏ·ÁÇÒ °ÍÀÔ´Ï´Ù. À̸¦ ÇÇÇϱâ À§Çؼ­´Â ´ÙÀ½ÀÇ ¸í·ÉÀ» ½ÇÇàÇϽʽÿÀ:
 {{{
 ABI=32 ./configure ...
 }}}

GMP ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù:
{{{
./configure --prefix=/usr --enable-cxx --enable-mpbsd
}}}

* '''--enable-cxx''': C++ Áö¿øÇÏ°Ô ÇÕ´Ï´Ù.
* '''--enable-mpbsd''': Berkeley MP ȣȯ ¶óÀ̺귯¸®¸¦ ºôµåÇϵµ·Ï ¸¸µì´Ï´Ù.

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù.
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÏ¿© °Ë»çÇÕ´Ï´Ù:
{{{
make check 2>&1 | tee gmp-check-log
}}}

166 Å×½ºÆ® ¸ðµÎ Åë°úµÇ¾ú´ÂÁö ¹Ýµå½Ã È®ÀÎÇϽʽÿÀ:
{{{
awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù:
{{{
make install
}}}

¸¸¾à °ü·Ã ¹®¼­µµ °°ÀÌ ¼³Ä¡ÇÏ°í ½Í´Ù¸é ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ:
{{{
mkdir -v /usr/share/doc/gmp-5.0.5
cp    -v doc/{isa_abi_headache,configuration} doc/*.html \
         /usr/share/doc/gmp-5.0.5
}}}

==== GMPÀÇ ³»¿ëµé ====
¼³Ä¡ ¶óÀ̺귯¸®: libgmp.{a,so}, libgmpxx.{a,so}, libmp.{a,so}
¼³Ä¡ µð·ºÅ丮  : /usr/share/doc/gmp-5.0.5

* libgmp: Contains precision math functions.

* libgmpxx: Contains C++ precision math functions.

* libmp: Contains the Berkeley MP math functions. 

=== MPFR-3.1.1 ¼³Ä¡ ===
ºôµå ½Ã°£: 0.8 SBU
ÇÊ¿ä °ø°£:  27 MB
¼³Ä¡ ³»¿ë: The MPFR package contains functions for multiple precision math.

==== MPFR ¼³Ä¡Çϱâ ====
ÄÄÆÄÀÏ Áغñ¸¦ ÇÕ´Ï´Ù:
{{{
./configure  --prefix=/usr        \
             --enable-thread-safe \
             --docdir=/usr/share/doc/mpfr-3.1.1
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù:
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù. ¹Ýµå½Ã ¸ðµç Å×½ºÆ®µéÀÌ Åë°úµÇ¾î¾ß ÇÕ´Ï´Ù:
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}

¹®¼­¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make html
make install-html
}}}

=== MPC-1.0 ¼³Ä¡ ===
ºôµå ½Ã°£:  0.4 SBU
ÇÊ¿ä ¿ë·®: 10.2 MB

The MPC package contains a library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. 

==== MPC ¼³Ä¡Çϱâ ====
MPC ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù:
{{{
./configure --prefix=/usr
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}

=== GCC-4.7.1 ¼³Ä¡ ===

GCC ÆÑÅ°Áö¿¡´Â C³ª C++°ú °°Àº GNU compilerµéÀÌ ÀÖ½À´Ï´Ù.
{{{
Approximate build time:  11.7 SBU
Required disk space:     294 MB
}}}
GCC(4.7.1) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.gnu.org/pub/gnu/gcc/

GCC ¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, Texinfo.

==== GCC ¼³Ä¡ ====

  ±âº» ÃÖÀûÈ­ Ç÷¡±×(including the -march and -mcpu options)µéÀ» º¯°æÇϴ°ÍÀº ±×¸® ÁÁÁö ½À°üÀÌ ¾Æ´Õ´Ï´Ù. ±×·¯¹Ç·Î ¸¸¾à¿¡ ´ç½ÅÀÌ CFLAGS³ª CXXFLAG °°Àº ÀÌ¹Ì ÃÖÀûÈ­ µÇ¾îÀִ ȯ°æº¯¼öµéÀ» º¯°æÇßÀ» °æ¿ì¿¡´Â Glibc¸¦ ¼³Ä¡ÇÒ ¶§ ¿ø»óº¹±Í ½ÃÄÑÁÖ¼¼¿ä.

'''sed'''¸¦ ÀÌ¿ëÇØ libiberty.aÀÇ ¼³Ä¡ºÎºÐÀ» Á¦°ÅÇÕ´Ï´Ù. libiberty.a´Â Binutils¿¡¼­ ´ë½Å ¼³Ä¡µÉ °ÍÀÔ´Ï´Ù.
{{{
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
}}}

ÀÌÀü Àå¿¡¼­ ¼³¸íÇßµíÀÌ -fomit-frame-pointerÀ» ÄÄÆÄÀÏ Ç÷¡±×·Î »ç¿ëÇϱâ À§ÇØ '''sed'''¸¦ ÀÌ¿ëÇØ ¼³Á¤À» ¹Ù²ãÁÝ´Ï´Ù.
{{{
case `uname -m` in
  i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
esac
}}}

Makefile¿¡¼­ checkÀÇ ¿¡·¯ºÎºÐÀ» °íĨ´Ï´Ù:
{{{
sed -i -e /autogen/d -e /check.sh/d fixincludes/Makefile.in
}}}

GCC ¹®¼­¿¡¼­´Â GCC¸¦ ºôµåÇÒ ¶§ ¼Ò½º µð·ºÅ丮 ¹Û¿¡¼­ ÇÏ´Â °ÍÀ» ±ÇÀåÇ߱⠶§¹®¿¡ ´ÙÀ½°ú °°ÀÌ ¹Û¿¡ µð·ºÅ丮¸¦ Çϳª ¸¸µé¾îÁÝ´Ï´Ù
{{{
mkdir -v ../gcc-build
cd ../gcc-build
}}}

GCC ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
../gcc-4.7.1/configure --prefix=/usr            \
                       --libexecdir=/usr/lib    \
                       --enable-shared          \
                       --enable-threads=posix   \
                       --enable-__cxa_atexit    \
                       --enable-clocale=gnu     \
                       --enable-languages=c,c++ \
                       --disable-multilib       \
                       --disable-bootstrap      \
                       --with-system-zlib
}}}      

'''--with-system-zlib'''

GCC°¡ ³»ºÎ¿¡ zlibÀ» º¹»çÇÏÁö ¾Ê°í ¼³Ä¡µÈ Zlib ¶óÀ̺귯¸®·Î ¸µÅ©Çϵµ·Ï ¼³Ä¡ÇÕ´Ï´Ù.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make
}}}      

GCC testsuiteÁß Çϳª´Â ½ºÅÃÀÌ ºÎÁ·ÇÏ´Ù°í ¾Ë·ÁÁ®Àֱ⠶§¹®¿¡ ´ÙÀ½°ú °°ÀÌ Å×½ºÆ®Àü¿¡ ½ºÅà »çÀÌÁ ¼³Á¤ÇØÁÝ´Ï´Ù
{{{
ulimit -s 32768
}}}
    Áß¿ä: ÀÌ Àå¿¡¼­´Â Test suite°¡ »ó´çÈ÷ Áß¿äÇÕ´Ï´Ù. ÁÖÀÇÇØ ÁÖ¼¼¿ä.

Å×½ºÆ®¸¦ ÇØ º¾½Ã´Ù. Å×½ºÆ® °á°ú¿¡¼­ ¿¡·¯°¡ ¹ß»ýÇÏ´õ¶óµµ ¼³Ä¡¸¦ Æ÷±â ÇÏÁö ¸»°í °è¼Ó ³ë·ÂÇØ º¾½Ã´Ù.
{{{
make -k check
}}}      

test suite¿¡ ´ëÇؼ± 5Àå GCC-4.7.1 - Pass 2 ÀνºÅç ¿¡ Àß ³ª¿Í ÀÖÀ¸¹Ç·Î ¹®Á¦°¡ »ý±â¸é ²À Âü°íÇÏ±æ ¹Ù¶ø´Ï´Ù.

test suite °á°úÀÇ ¿ä¾àµÈ Á¤º¸¸¦ ¾ò°íÀÚ ÇÑ´Ù¸é ´ÙÀ½À» ½ÇÇàÇϽʽÿÀ:
{{{
../gcc-4.7.1/contrib/test_summary
}}}

Package ¼³Ä¡Çϱâ:
{{{
make install
}}}      

ÀϺΠÆÑÅ°ÁöµéÀº C PreProcess°¡ /lib ¾È¿¡ ¼³Ä¡µÈ °É·Î ¾Ë°í ÀÖ½À´Ï´Ù. ¿¡·¯¸¦ ¾ø¾Ö±â À§Çؼ­ ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µé¾î ÁݽôÙ.
{{{
ln -s /usr/bin/cpp /lib
}}}      

¸¹Àº ÆÑÅ°ÁöµéÀÌ Gcc´ë½Å cc¸¦ »ç¿ëÇÕ´Ï´Ù. ´ÙÀ½°ú °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ °É¾î ÁÖ¸é ¿¡·¯¸¦ ¹æÁö ÇÒ ¼ö ÀÖ½À´Ï´Ù.:
{{{
ln -s gcc /usr/bin/cc
}}}      

    ÁÖÀÇ: Àü Àå¿¡¼­ ÇÑ °Í°ú °°Àº sanity check¸¦ ÇØ º¸´Â °ÍÀÌ Áß¿äÇÕ´Ï´Ù.  toolchain ÀçÀû¿ëÀ» ÂüÁ¶Çؼ­  sanity check(dummy.c¸¦ ÄÄÆÄÀÏ ÇÏ´Â)¸¦ ÇØ º¾½Ã´Ù. ¹®Á¦°¡ »ý±ä´Ù¸é, 5Àå ¿¡¼­ ÇÑ "GCC specs Patch" ºÎºÐºÎÅÍ À߸øµÇ¾úÀ» °¡´É¼ºÀÌ ÀÖ½À´Ï´Ù.
     

==== ÄÄÆÄÀÏ°ú ¸µÅ© »óÅ ȮÀÎÇϱâ ====
ÀÌÀü¿¡ Çß´ø sanity check¿Í ¸¶Âù°¡Áö·Î ¶È°°ÀÌ ÇÒ °ÍÀÔ´Ï´Ù.
{{{
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
}}}

Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
[Requesting program interpreter: /lib/ld-linux.so.2]
}}}

ÀÌÁ¦ ¿Ã¹Ù¸¥ startfilesÀ» »ç¿ëÇϵµ·Ï Á¦´ë·Î ¼³Á¤µÇ¾ú´ÂÁö È®ÀÎÇÕ´Ï´Ù:
{{{
grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
}}}


Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crt1.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crti.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../crtn.o succeeded
}}}

ÄÄÇ»ÅÍÀÇ ¾ÆÅ°ÅØÃÄ¿¡ µû¶ó /usr/lib/gcc/´ÙÀ½¿¡ ¿À´Â µð·ºÅ丮ÀÇ À̸§ÀÌ ¾à°£¾¿ ´Ù¸¦°Ì´Ï´Ù. ¸¸¾à¿¡ ¿©·¯ºÐÀÇ ÄÄÇ»ÅÍ°¡ 64-bit ½Ã½ºÅÛÀÌ¸é ¹®ÀÚ¿­ÀÇ ³¡ÀÇ ¾Õ¿¡¼­ lib64À» º¼ ¼ö ÀÖÀ» °ÍÀÔ´Ï´Ù. Áß¿äÇÑ °Ç /usr/lib µð·ºÅ丮¾È¿¡ '''gcc'''°¡ ¼¼°³ÀÇ crt*.o °¡ ÀÖ´ÂÁö¸¦ ¸ðµÎ ã¾Æ³Â´Â°¡°¡ Áß¿äÇÕ´Ï´Ù.

´ÙÀ½Àº ÄÄÆÄÀÏ·¯°¡ ¿Ã¹Ù¸¥ Çì´õ ÆÄÀÏÀ» ¤Ô¤º¤¿¤º°íÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù
{{{
grep -B4 '^ /usr/include' dummy.log
}}}

Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.7.1/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.7.1/include-fixed
 /usr/include
}}}

À§ÀÇ °á°ú¶ÇÇÑ ¾ÆÅ°ÅØÃÄ¿¡ µû¶ó ´Þ¶óÁú ¼ö ÀÖ½À´Ï´Ù.

 '''Note'''
 GCCÀÇ 4.3.0¹öÀüºÎÅÍ´Â ¹«Á¶°ÇÀûÀ¸·Î limits.h ÆÄÀÏÀÌ include-fixed µð·ºÅ丮 ¾È¿¡ ¼³Ä¡ÇÕ´Ï´Ù. ±×·¸±â ¶§¹®¿¡ ÇØ´ç µð·ºÅ丮°¡ À§Ä¡¿¡ Á¸ÀçÇؾ߸¸ ÇÕ´Ï´Ù.

´ÙÀ½Àº »õ·Î¿î ¸µÄ¿°¡ Á¦´ë·Î °æ·Î¸¦ ã´ÂÁö È®ÀÎÇÕ´Ï´Ù.
{{{
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.7.1/include
 /usr/lib/gcc/i686-pc-linux-gnu/4.7.1/include-fixed
 /usr/include
}}}


Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
}}}

64-bit ½Ã½ºÅÛ¿¡¼­´Â ¾Æ¸¶ ¸î°³ÀÇ µð·ºÅ丮°¡ ´õ º¸Àϼöµµ ÀÖ½À´Ï´Ù. ´ÙÀ½Àº x86_64¿¡¼­ÀÇ Ãâ·ÂµÈ °á°úÀÔ´Ï´Ù.
{{{
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");
}}}

´ÙÀ½Àº ¿Ã¹Ù¸¥ libc¸¦ »ç¿ëÇÏ°í ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
{{{
grep "/lib.*/libc.so.6 " dummy.log
}}}

Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
attempt to open /lib/libc.so.6 succeeded
}}}

¸¶Áö¸·À¸·Î GCC°¡ ¿Ã¹Ù¸¥ µ¿Àû ¸µÄ¿¸¦ »ç¿ëÇÏ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
{{{
grep found dummy.log
}}}

Á¦´ë·Î ÀÛµ¿¤Ô¤¾¤É¤¶´Ù¸é ¿¡·¯¾øÀÌ ´ÙÀ½°ú °°ÀÌ Ãâ·ÂµÇ¾î¾ß ÇÕ´Ï´Ù.
{{{
found ld-linux.so.2 at /lib/ld-linux.so.2
}}}

¸¸¾à Á¦´ë·Î Ãâ·Â°ªÀÌ ³ª¿ÀÁö ¾Ê¾Ò´Ù¸é ¾îµò°¡¿¡¼­ À߸øµÈ °ÍÀÔ´Ï´Ù. ´Ù½Ã óÀ½À¸·Î µ¹¾Æ°¡¼­ ´Ü°èÀûÀ¸·Î ºôµå¸¦ ´Ù½Ã Çغ¸½Ê½Ã¿À. ¾Æ¸¶µµ ´ëºÎºÐÀÇ ÀÌÀ¯´Â specs ÆÄÀÏÀ» ÀçÁ¶Á¤ÇÒ ¶§ À߸øµÇ¾úÀ» °Ì´Ï´Ù. 

¸ðµç °ÍÀÌ ¿Ã¹Ù¸£°Ô Ãâ·ÂµÇ¾ú´Ù¸é, Å×½ºÆ®ÆÄÀÏÀ» »èÁ¦ÇÕ´Ï´Ù.
{{{
rm -v dummy.c a.out dummy.log
}}}

¸¶Áö¸·À¸·Î, À߸øµÈ À§Ä¡¸¦ ¹Ù·ÎÀâ¾ÆÁÝ´Ï´Ù
{{{
mkdir -pv /usr/share/gdb/auto-load/usr/lib
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
}}}

==== GCC ³»¿ëµé ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: c++, cc (link to gcc), cc1, cc1plus, collect2, cpp, g++, gcc, gccbug, and gcov

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so] and libsupc++.a


==== ¿ä¾à ====

cpp ´Â CÀü󸮱âÀÌ´Ù. ÀÌ°ÍÀº ÄÄÆÄÀÏ·¯¿¡ ÀÇÇØ #include¿Í #define¿Í ±×·± »óŵéÀ» ¼Ò½ºÆÄÀϾȿ¡¼­ È®ÀåµÇ¾î °¡Áö´Â°ÍÀ» »ç¿ëÇÑ´Ù.

g++ ´Â C++ ÄÄÆÄÀÏ·¯ÀÌ´Ù.

gcc ´Â C ÄÄÆÄÀÏ·¯ÀÌ´Ù. ±×°ÍÀº ÇÁ·Î±×·¥ÀÇ ¼Ò½ºÄڵ带 ¾î¼ÀÄÚµå·Î º¯È¯Çϴµ¥ »ç¿ëµÈ´Ù.

gccbug ´Â ÁÁÀº bugº¸°í¼­¸¦ ¸¸µå´Â µµ¿ò¸»ÀÌ »ç¿ëµÈ shell scriptÀÌ´Ù.

gcov ´Â ½ÃÇèÇÑ toolÀÇ Àû¿ë¹üÀ§ÀÌ´Ù. ÀÌ°ÍÀº °¡¹æ È¿°úÀûÀÎ ÃÖÀûÈ­µÈ ¹æ¹ýÀ» ã±âÀ§ÇØ ÇÁ·Î±×·¥À» ºÐ¼®Çϴµ¥ »ç¿ëµÈ´Ù.

libgcc* ´Â gcc¸¦ À§ÇÑ run-timeÁ¦°øÀ» Æ÷ÇÔÇÑ´Ù.

libstdc++ ´Â standard C++¶óÀ̺귯¸®ÀÌ´Ù. ÀÌ°ÍÀº ¸¹Àº ÀÚÁÖ »ç¿ëµÇ´Â ÇÔ¼öµéÀ» Æ÷ÇÔÇÑ´Ù.

libsupc++ Àº C++ÇÁ·Î±×·¥¾ð¾î¸¦ À§ÇÑ Á¦°øµÈ ÀÏ°ý󸮰úÁ¤À» Á¦°øÇÑ´Ù.

=== Sed-4.2.1 ¼³Ä¡ ===

The Sed package contains a stream editor.
{{{
Approximate build time:  0.2 SBU
Required disk space:     6.7 MB
}}}
Sed (4.2.1) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.gnu.org/gnu/sed/

Sed¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Texinfo.
ed ¼³Ä¡

testsuite ÆÐÄ¡:
{{{
patch -Np1 -i ../sed-4.2.1-testsuite_fixes-1.patch
}}}

ÄÄÆÄÀÏÁغñ:
{{{
./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/sed-4.2.1
}}}

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}

HTML ¹®¼­ ¸¸µé±â
{{{
make html
}}}

ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ¾Æ·¡ ¸í·É¾î¸¦ ÀÔ·ÂÇϼ¼¿ä:
{{{
make check      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}

HTML ¹®¼­ ¼³Ä¡Çϱâ
{{{
make -C doc install-html
}}}
==== Sed ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: sed

==== ¿ä¾à ====

sed is used to filter and transform text files in a single pass.

=== Bzip2-1.0.6 ¼³Ä¡ ===

The Bzip2 package contains programs for compressing and decompressing files. On text files they achieve a much better compression than the traditional gzip.
{{{
Approximate build time:  <=0.1 SBU
Required disk space:       6.9 MB
}}}
Bzip2 (1.0.6) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://sources.redhat.com/pub/bzip2/

Bzip2¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make.
==== Bzip2 ¼³Ä¡ ====
ÆÐÅ°Áö¿¡ ÀÖ´Â ¹®¼­¸¦ ¼³Ä¡Çϵµ·Ï ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù
{{{
patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch
}}}

°ü·ÃµÈ ½Éº¼¸µ ¸µÅ©µéÀ» ¼³Ä¡Çϵµ·Ï ÇÕ´Ï´Ù.
{{{
sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
}}}

man ÆäÀÌÁöµéÀÌ ¿Ã¹Ù¸¥ À§Ä¡¿¡ ¼³Ä¡µÇµµ·Ï ÇÕ´Ï´Ù.
{{{
sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
}}}

Bzip2 ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
make -f Makefile-libbz2_so
make clean
}}}      

  -f flag´Â ´Ù¸¥ MakefileµéÀ» »ç¿ëÇؼ­ ÄÄÆÄÀÏÇÒ ¶§ »ç¿ëÇÕ´Ï´Ù. µ¿Àû ¶óÀ̺귯¸®ÀÎ  libbz2.so¸¦ ¸¸µé°í Bzip2 utilities¸¦ ±× ¶óÀ̺귯¸®¿Í ¿¬°á½ÃÅ°Áö ¾Ê¾ÒÀ» °æ¿ì Makefile-libbz2_so ¸¦  »ç¿ëÇÕ´Ï´Ù.

ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}
  ¸¸¾à ´ç½ÅÀÌ Bzip2¸¦ ´Ù½Ã ¼³Ä¡ÇÏ·Á¸é ¿ì¼± rm -f /usr/bin/bz* ¸í·ÉÀ¸·Î /usr/bin¿¡ ÀÖ´Â bz·Î ½ÃÀÛÇÏ´Â ¸ðµç ÆÄÀÏÀ» Áö¿ö¾ß ÇÕ´Ï´Ù. ¾Æ·¡¿Í °°ÀÌ make install¸í ·ÉÀ¸·Î µ¤¾î¾²±â¸¦ ÇÒ °æ¿ì¿¡´Â ½ÇÆÐÇÒ °ÍÀÔ´Ï´Ù.

¼³Ä¡Çϱâ:
{{{
make PREFIX=/usr install
}}}      

°øÀ¯µÇ´Â(shared) bzip2ÇÁ·Î±×·¥µéÀº /bin directory¿¡ ¼³Ä¡ÇÕ´Ï´Ù. ±×¸®°í ³ª¼­ symbolic linkµéÀ» ¸¸µé°í  ÇÊ¿ä ¾ø´Â °ÍµéÀº Áö¿ì¼¼¿ä.
{{{
cp -v bzip2-shared /bin/bzip2
cp -av libbz2.so* /lib
ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
rm -v /usr/bin/{bunzip2,bzcat,bzip2}
ln -sv bzip2 /bin/bunzip2
ln -sv bzip2 /bin/bzcat
}}}

==== Bzip2 ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff, bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless and bzmore

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to libbz2.so.1.0.2) and libbz2.so.1.0.2

==== ¿ä¾à ====

bunzip2 decompresses bzipped files.

bzcat decompresses to standard output.

bzcmp runs cmp on bzipped files.

bzdiff runs diff on bzipped files.

bzgrep and friends run grep on bzipped files.

bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm with Huffman coding. The compression rate is generally considerably better than that achieved by more conventional compressors using LZ77/LZ78, like gzip.

bzip2recover tries to recover data from damaged bzip2 files.

bzless runs less on bzipped files.

bzmore runs more on bzipped files.

libbz2* is the library implementing lossless, block-sorting data compression, using the Burrows-Wheeler algorithm.

=== Pkg-config-0.27 ¼³Ä¡ ===
ºôµå ½Ã°£: 0.4 SBU
ÇÊ¿ä °ø°£:  30 MB

==== Pkg-config ¼³Ä¡Çϱâ ====
ÄÄÆÄÀÏÁغñ:
{{{
./configure --prefix=/usr         \
            --with-internal-glib  \
            --docdir=/usr/share/doc/pkg-config-0.27
}}}

ÄÄÆÄÀÏ
{{{
make
}}}
test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}
ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}

=== Ncurses-5.9 ¼³Ä¡ ===

The Ncurses package contains libraries for the terminal-independent handling of character screens.
{{{
Approximate build time:  0.6 SBU
Required disk space:     40 MB
}}}

Ncurses (5.9)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/ncurses/

Ncurses¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed.

==== Ncurses ¼³Ä¡ ====

NcursesÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --mandir=/usr/share/man --with-shared \
            --without-debug --enable-widec
}}}

'''--enable-widec'''

ÀÌ ½ºÀ§Ä¡´Â wide-character ¶óÀ̺귯¸®(libcursesw.so.5.9)¸¦ libncurses.so.5.9 ´ë½Å ¼³Ä¡µÇµµ·Ï ÇÕ´Ï´Ù. ÀÌ·¯ÇÑ wide-character ¶óÀ̺귯¸®´Â ¿¹Àü¿¡ »ç¿ëµÇ´ø 8bit ·ÎÄÉÀÏ°ú multibyte¿¡¼­ »ç¿ë°¡´ÉÇÏÁö¸¸ ¿¹Àü¿¡ »ç¿ëµÇ´ø ¶óÀ̺귯¸®´Â 8bit¿¡¼­¸¸ ÀÛµ¿ÇÕ´Ï´Ù. ¶§¹®¿¡ ¿ì¸®´Â wide-character°ú º¸ÅëÀÇ ¶óÀ̺귯¸®¿¡ ȣȯ°¡´ÉÇϵµ·Ï Çϱâ À§ÇØ ÀÌ ¿É¼ÇÀ» »ç¿ëÇÒ °Ì´Ï´Ù.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}

°øÀ¯ ¶óÀ̺귯¸®¸¦ /lib µð·ºÅ丮·Î ¿Å±é´Ï´Ù.
{{{
mv -v /usr/lib/libncursesw.so.5* /lib
}}}

¶óÀ̺귯¸®¸¦ ¿Å±â°Ô µÉ°æ¿ì symlink°¡ °¡¸®Å°´Â ÆÄÀÏÀÌ ¾ø¾îÁö°Ô µÇ¹Ç·Î ´Ù½Ã ¸¸µé¾îÁÝ´Ï´Ù
{{{
ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so
}}}

¸¹Àº ¾îÇø®ÄÉÀ̼ÇÀÌ ¾ÆÁ÷µµ ¸µÄ¿°¡ non-wide-character°¡ Ncurses ¶óÀ̺귯¸®¿¡¼­ ã´Â´Ù°í °¡Á¤ÇÏ°í ÀÖ½À´Ï´Ù. ´ÙÀ½°ú°°ÀÌ ÇØ´ç ¾îÇø®ÄÉÀ̼ǿ¡ wide-character ¶óÀ̺귯¸®¸¦ ¿¬°áÇØÁÖ¾î ¹®Á¦¸¦ ÇØ°áÇØÁÝ´Ï´Ù
{{{
for lib in ncurses form panel menu ; do \
    rm -vf /usr/lib/lib${lib}.so ; \
    echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
    ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
done
ln -sfv libncurses++w.a /usr/lib/libncurses++.a
}}}

¸¶Áö¸·À¸·Î ºôµåŸÀÓ¶§ -lcurses¸¦ ã¾Æ¼­ »ç¿ëÇß´ø ¿À·¡µÈ ¾îÇø®ÄÉÀ̼ÇÀ» ã¾Æ¼­ ¸²Å©¸¦ ¸¸µé¾îÁÝ´Ï´Ù.
{{{
rm -vf /usr/lib/libcursesw.so
echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so
ln -sfv libncursesw.a /usr/lib/libcursesw.a
ln -sfv libncurses.a /usr/lib/libcurses.a
}}}

¿øÇÑ´Ù¸é Ncurses ¹®¼­¸¦ ¼³Ä¡ÇϽʽÿÀ:
{{{
mkdir -v       /usr/share/doc/ncurses-5.9
cp -v -R doc/* /usr/share/doc/ncurses-5.9
}}}

==== Ncurses ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: captoinfo (link to tic), clear, infocmp, infotocap (link to tic), reset (link to tset), tack, tic, toe, tput and tset

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so], libncurses++.a, libncurses.[a,so], libpanel.[a,so]


==== ¿ä¾à ====

captoinfo converts a termcap description into a terminfo description.

clear clears the screen, if this is possible.

infocmp compares or prints out terminfo descriptions.

infotocap converts a terminfo description into a termcap description.

reset reinitializes a terminal to its default values.

tack is the terminfo action checker. It is mainly used to test the correctness of an entry in the terminfo database.

tic is the terminfo entry-description compiler. It translates a terminfo file from source format into the binary format needed for the ncurses library routines. A terminfo file contains information on the capabilities of a certain terminal.

toe lists all available terminal types, for each giving its primary name and its description.

tput makes the values of terminal-dependent capabilities available to the shell. It can also be used to reset or initialize a terminal, or report its long name.

tset can be used to initialize terminals.

libncurses* contain functions to display text in many complicated ways on a terminal screen. A good example of the use of these functions is the menu displayed during the kernel's make menuconfig.

libform* contain functions to implement forms.

libmenu* contain functions to implement menus.

libpanel* contain functions to implement panels.

=== Util-linux-2.21.2 ¼³Ä¡ ===
ºôµå ½Ã°£: 0.7 SBU
ÇÊ¿ä °ø°£:  81 MB

==== FHS compliance notes ====
FHS´Â /etc µð·ºÅ丮 ´ë½Å¿¡ /var/lib/hwclockÀ» »ç¿ëÇϱ⸦ ±ÇÀåÇÏ°í ÀÖ½À´Ï´Ù. FHS¿¡ ¸Â°Ô ¼³Ä¡Çϱâ À§ÇØ hwclockÀ» ¼³Á¤ÇÕ´Ï´Ù.
{{{
sed -i -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
    $(grep -rl '/etc/adjtime' .)
mkdir -pv /var/lib/hwclock
}}}
==== Util-linux ¼³Ä¡Çϱâ ====
{{{
./configure
make
make install
}}}

Util-linux¿¡¼­ ¼³Ä¡µÇ´Â ÇÁ·Î±×·¥ ¸ñ·ÏÀ» º¸·Á¸é ´ÙÀ½À» Âü°íÇϽʽÿÀ:
[http://www.linuxfromscratch.org/lfs/view/stable/chapter06/util-linux.html http://www.linuxfromscratch.org/lfs/view/stable/chapter06/util-linux.html]

=== Psmisc-22.19 ¼³Ä¡ ===
ºôµå ½Ã°£: <= 0.1 SBU
ÇÊ¿ä °ø°£:    4.2 MB

{{{
./configure --prefix=/usr

make

make install
}}}

¸¶Áö¸·À¸·Î '''killall'''°ú '''fuser''' ÇÁ·Î±×·¥À» FHS¿¡ ¸Â°Ô À§Ä¡¸¦ ¹Ù²ß´Ï´Ù.
{{{
mv -v /usr/bin/fuser   /bin
mv -v /usr/bin/killall /bin
}}}

=== E2fsprogs-1.42.5 ===
ºôµå ½Ã°£: 1.7 SBU
ÇÊ¿ä °ø°£:  64 MB

E2fsprogs ¹®¼­´Â ¼Ò½º µð·ºÅ丮ÀÇ ÇÏÀ§ µð·ºÅ丮¿¡¼­ ºôµåÇϱ⸦ ±ÇÀåÇÏ°í ÀÖ½À´Ï´Ù.
{{{
mkdir -v build
cd build
}}}

E2fsprogsÀÇ ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù
{{{
../configure --prefix=/usr         \
             --with-root-prefix="" \
             --enable-elf-shlibs   \
             --disable-libblkid    \
             --disable-libuuid     \
             --disable-uuidd       \
             --disable-fsck
}}}

'''--with-root-prefix=""'''

'''e2fsck'''°°Àº ƯÁ¤ ÇÁ·Î±×·¥µéÀº Çʼö ÇÁ·Î±×·¥À¸·Î °í·ÁµË´Ï´Ù. ¿¹¸¦µé¸é /usr°¡ ¸¶¿îÆ®µÇÁö ¾Ê¾ÒÀ» ¶§ ÀÌ·¯ÇÑ ÇÁ·Î±×·¥µéÀº ÀÌ·¯ÇÑ »óȲ¿¡¼­µµ »ç¿ë°¡´ÉÇÕ´Ï´Ù. ÀÌ ÇÁ·Î±×·¥µéÀº /lib°ú /sbin°°Àº µð·ºÅ丮¿¡ Àֱ⠶§¹®ÀÔ´Ï´Ù. ¸¸¾à ÀÌ ¿É¼ÇÀÌ ¾ø´Ù¸é ÇÁ·Î±×·¥Àº /usr µð·ºÅ丮 ³»ºÎ¿¡ ¼³Ä¡µÉ °ÍÀÔ´Ï´Ù.

'''--enable-elf-shlibs'''

ÆÐÅ°Áö°¡ »ç¿ëÇÒ ÇÁ·Î±×·¥µé¿¡ ´ëÇÑ °øÀ¯ ¶óÀ̺귯¸®¸¦ ¸¸µì´Ï´Ù.

'''--disable-*'''

ÀÌ°ÍÀº E2fsprogs°¡ ''libuuid''¿Í ''libblkid'' ¶óÀ̺귯¸®¸¦ ºôµåÇÏ°í ¼³Ä¡ÇÏ´Â °ÍÀ» ¸·½À´Ï´Ù. ''uuidd'' µ¥¸ó°ú '''fsck'''´Â Util-linux¿¡¼­ ÀÌÀü¿¡ ÀÌ¹Ì ¼³Ä¡µÇ¾ú±â ¶§¹®¿¡ Á¦¿ÜÇÕ´Ï´Ù.

{{{
make
make -k check
make install
}}}

Á¤Àû ¶óÀ̺귯¸®¿Í Çì´õ ÆÄÀϵéÀ» ¼³Ä¡ÇÕ´Ï´Ù.
{{{
make install-libs
}}}

¼³Ä¡ÇÑ Á¤Àû ¶óÀ̺귯¸®µéÀ» ³ªÁß¿¡ debugging symbolÀ» Áö¿ì±â À§ÇØ ¾²±â°¡ °¡´ÉÇϵµ·Ï ¹Ù²îÁÝ´Ï´Ù.
{{{
chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
}}}

ÀÌ ÆÐÅ°Áö´Â gzipped·Î ¾ÐÃàµÈ .info ÆÄÀÏÀ» ¼³Ä¡ÇÏÁö¸¸ system-wide dir ÆÄÀÏÀ» ¾÷µ¥ÀÌÆ®ÇÏÁö´Â ¾Ê½À´Ï´Ù. ÀÌ ÆÄÀÏÀ» Ç®¾î¼­ system dir ÆÄÀÏÀ» ´ÙÀ½°ú °°ÀÌ ¾÷µ¥ÀÌÆ® ÇØÁÝ´Ï´Ù.
{{{
gunzip -v /usr/share/info/libext2fs.info.gz
install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info
}}}

Ãß°¡ÀûÀÎ ¹®¼­µéÀ» ¼³Ä¡ÇÏ°í ½Í´Ù¸é ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ:
{{{
makeinfo -o      doc/com_err.info ../lib/et/com_err.texinfo
install -v -m644 doc/com_err.info /usr/share/info
install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info
}}}

=== Shadow-4.1.5.1 ¼³Ä¡ ===
ºôµå ½Ã°£: 0.2 SBU
ÇÊ¿ä ¿ë·®:  42 MB

==== Shadow ¼³Ä¡Çϱâ ====
 '''Note'''
 ¸¸¾à º¸¾È¼ºÀÌ °­ÇÑ Æнº¿öµå¸¦ »ç¿ëÇÏ°í ½Í´Ù¸é [http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cracklib.html http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cracklib.html] Shadow¸¦ ºôµåÇϱ⿡ ¾Õ¼­ CrackLibÀ» ¼³Ä¡Çϱ⠹ٶø´Ï´Ù. ±×¸®°í ¾Æ·¡ÀÇ '''configure'''¿¡¼­ --with-libcrackÀ» ÇÏ¸é µË´Ï´Ù.

'''groups'''¿Í ÇØ´ç ÇÁ·Î±×·¥ÀÇ man ÆäÀÌÁö ¼³Ä¡¸¦ ÇÏÁö ¾Ê±â À§ÇØ ´ÙÀ½°ú °°ÀÌ ¼³Ã»ÇÕ´Ï´Ù. '''groups'''´Â Coreutils¿¡¼­ ´õ ³ªÀº ¹öÀüÀ¸·Î Á¦°øµË´Ï´Ù.
{{{
sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
}}}

±âº» ''crypt'' ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â ´ë½Å 8°³ÀÇ ¹®ÀÚ¸¦ ÀÌ¿ëÇÏ´Â ''SHA-512'' ¶ó´Â º¸¾È ¸Þ¼­µå¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ºñ¹Ð¹øÈ£ ¾Ïȣȭ¿¡ ´õ ¾ÈÀüÇÕ´Ï´Ù. ¶ÇÇÑ Àý´ë°æ·ÎÀÎ /var/spool/mailÀÇ À§Ä¡µµ Shadow°¡ ±âº»À¸·Î /var/mail °æ·Î¸¦ »ç¿ëÇϱ⠶§¹®¿¡ ¹Ù²ãÁà¾ß ÇÕ´Ï´Ù.
{{{
sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
       -e 's@/var/spool/mail@/var/mail@' etc/login.defs
}}}

 '''Note'''
 ¸¸¾à¿¡ CracklibÀ» Áö¿øÇÏ´Â Shadow¸¦ ºôµåÇÏ°í ½ÍÀ¸¸é ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ:
 {{{
 sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \
    etc/login.defs
 }}}

Shadow ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù
{{{
./configure --sysconfdir=/etc
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

ÀÌ ÆÐÅ°Áö´Â test suite¸¦ °¡Áö°í ÀÖÁö ¾Ê½À´Ï´Ù.

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇսôÙ
{{{
make install
}}}

ÇÁ·Î±×·¥ÀÇ À§Ä¡¸¦ ¼öÁ¤ÇØÁÝ´Ï´Ù
{{{
mv -v /usr/bin/passwd /bin
}}}

==== Shadow ¼³Á¤Çϱâ ====

ÀÌ ÆÐÅ°Áö´Â »ç¿ëÀÚ³ª ±×·ìÀ» Ãß°¡Çϰųª ¼öÁ¤, »èÁ¦ÇÏ´Â À¯Æ¿¸®Æ¼¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. ¶ÇÇÑ Æнÿöµå¸¦ ¼³Á¤ÇÏ°í ¹Ù²Ù°Å³ª ´Ù¸¥ °ÍµéÀ» °ü¸®ÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. ''password shadowing''ÀÇ ¿Ïº®ÇÑ Àǹ̿¡ ´ëÇÑ ¼³¸íÀ» À§Çؼ­ ¼Ò½º Æ®¸®¾ÈÀÇ doc/HOWTO ¸¦ »ìÆ캸½Ê½Ã¿À. ¸¸¾à¿¡ Shadow support¸¦ »ç¿ëÇÏ·Á¸é ÇØ´ç Æнº¿öµå°¡ ÇÊ¿äÇÑ ÇÁ·Î±×·¥(display manager, FTP program, pop3 daemons, etc)ÀÌ Shadow¿Í ȣȯÀÌ Àß µÇ´ÂÁö¸¦ È®½ÇÈ÷ ¾Ë¾ÆµÎ¾î¾ß ÇÔÀ» ¸í½ÉÇϽʽÿÀ. Áï, ÀÌ·¯ÇÑ ÇÁ·Î±×·¥µéÀÌ shadow¸¦ ÀÌ¿ëÇÑ Æнº¿öµå·Î Àß ÀÛµ¿ÀÌ µÇ´ÂÁö ¾Ë¾Æ¾ßÇÕ´Ï´Ù.

shadow Æнº¿öµå¸¦ »ç¿ëÇϱâ À§Çؼ­´Â ´ÙÀ½ÀÇ ¸í·ÉÀ» ½ÇÇàÇϽʽÿÀ:
{{{
pwconv
}}}

shadowµÈ group Æнº¿öµå¸¦ »ç¿ëÇÏ·Á¸é ´ÙÀ½°ú °°ÀÌ ½ÇÇàÇϽʽÿÀ:
{{{
grpconv
}}}

'''useradd''' À¯Æ¿¸®Æ¼¸¦ À§ÇØ Shadow°¡ º¸°üÇÏ°í ÀÖ´Â ¼³Á¤µé¿¡ ´ëÇØ ¼³¸íÇÏÀÚ¸é ¾à°£ÀÇ ºÎ´ãÀÌ ÀÖ½À´Ï´Ù. ¸ÕÀú '''useradd'''À¯Æ¿¸®Æ¼ÀÇ ±âº» µ¿ÀÛÀº »ç¿ëÀÚ¸¦ »ý¼ºÇÏ°í »ç¿ëÀÚ¿Í °°Àº À̸§ÀÇ ±×·ìÀ» ¸¸µå´Â °ÍÀÔ´Ï´Ù. ±âº»ÀûÀ¸·Î user ID(UID)¿Í group ID(GID) ¼ýÀÚ´Â 1000ºÎÅÍ ½ÃÀ۵˴ϴÙ. ÀÌ°ÍÀº ¸¸¾à '''useradd'''·Î ÆĶó¹ÌÅ͸¦ º¸³»Áö ¾ÊÀ¸¸é °¢°¢ÀÇ »ç¿ëÀÚµéÀº °í¾ßÇÑ ±×·ìÀ» °¡Áö°Ô µÉ °ÍÀÔ´Ï´Ù. ÀÌ·¯ÇÑ °á°ú¸¦ ¿øÁö ¾Ê´Â´Ù¸é -g ¶ó´Â ÆĶó¹ÌÅ͸¦ »ç¿ëÇÏ¿© '''useradd'''¸¦ »ç¿ëÇÏ¿©¾ß ÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î »ç¿ëµÉ ÆĶó¹ÌÅÍÀÇ ³»¿ëÀº /etc/default/useradd ÆÄÀÏ¿¡ ÀúÀåµÇ¾î ÀÖ½À´Ï´Ù. ¿©·¯ºÐÀÌ ÇÊ¿ä·Î ÇÏ´Â °Í¿¡ ¸Â°Ô ´ÙÀ½ÀÇ µÎ°¡Áö¸¦ ¼öÁ¤ÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.

'''/etc/default/useradd''' ÆĶó¹ÌÅÍ ¼³¸í
 
 ''GROUP=1000''
 
 ÀÌ ÆĶó¹ÌÅÍ´Â /etc/group ÆÄÀÏ¿¡ ÀÖ´Â group numberÀÇ ½ÃÀÛÁ¡À» ¼³Á¤ÇÕ´Ï´Ù. ¿©·¯ºÐµéÀº ¿©·¯ºÐµéÀÌ ¿øÇϴ´ë·Î ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. ´ë½Å ¾Ë¾ÆµÎ¾î¾ß ÇÒ Á¡Àº '''useradd'''´Â Àý´ë·Î UID³ª GID¸¦ ´Ù½Ã Àç»ç¿ëÇؼ­´Â ¾ÈµÈ´Ù´Â Á¡ÀÔ´Ï´Ù. ¸¸¾à ¾î¶² °íÀ¯ ½Äº° ¹øÈ£¸¦ ÆĶó¹ÌÅÍ·Î »ç¿ëÇß´Ù¸é ´ÙÀ½¹ø¿¡´Â ±× ¼ýÀÚ ´ÙÀ½ºÎÅÍ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ¶Ç ÇÑ°¡Áö ¾Ë¾ÆµÎ¾î¾ß ÇÒÁ¡Àº ¹Ýµå½Ã ½Ã½ºÅÛ¿¡¼­ óÀ½ ¿©·¯ºÐÀÌ -g ÆĶó¹ÌÅÍ ¾øÀÌ '''useradd'''¸¦ »ç¿ëÇÒ ¶§ group 1000¸¦ »ç¿ëÇؾßÇÏ´Â °ÍÀº ¾Æ´Õ´Ï´Ù. ¿©·¯ºÐµéÀÌ ±×·¸°Ô Çß´Ù°í Çصµ ´ÙÀ½°ú °°Àº Ãâ·Â °á°ú¸¦ º¼ °ÍÀÔ´Ï´Ù: useradd: unknown GID 1000. You may disregard this message and group number 1000 will be used.

 ''CREATE_MAIL_SPOOL=yes''
 
 ÀÌ ÆĶó¹ÌÅÍ´Â '''useradd'''°¡ »õ·Î¿î »ç¿ëÀÚ¿¡°Ô mailbox¸¦ »ý¼ºÇÒ°ÇÁö¸¦ Á¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. '''useradd'''´Â ÀÌ ÆÄÀÏÀÇ group ¼ÒÀ¯±ÇÀ» mail groupÀ¸·Î 0660ÀÇ ±ÇÇÑÀ» ÁÖ¾î º¯°æÇÒ °ÍÀÔ´Ï´Ù. ¸¸¾à ÀÌ·¯ÇÑ mailbox ÆÄÀÏÀ» »ý»ýÇÏ°í ½ÍÁö ¾ÊÀ¸½Ã´Ù¸é ´ÙÀ½ÀÇ ¸í·ÉÀ» ½ÇÇàÇϽʽÿÀ:
{{{
sed -i 's/yes/no' /etc/default/useradd
}}}
==== root password ¼³Á¤Çϱâ ====

root °èÁ¤ÀÇ ºñ¹Ð¹øÈ£¸¦ ¼³Á¤ÇÕ´Ï´Ù.
{{{
passwd root
}}}
==== Shadow of contets ====

¼³Ä¡µÇ´Â ÇÁ·Î±×·¥: chage, chfn, chgpasswd, chpasswd, chsh, expiry, faillog, gpasswd, groupadd, groupdel, groupmems, groupmod, grpck, grpconv, grpunconv, lastlog, login, logoutd, newgrp, newusers, nologin, passwd, pwck, pwconv, pwunconv, sg (link to newgrp), su, useradd, userdel, usermod, vigr (link to vipw), and vipw

chage: Used to change the maximum number of days between obligatory password changes

chfn: Used to change a user's full name and other information

chgpasswd: Used to update group passwords in batch mode

chpasswd: Used to update user passwords in batch mode

chsh: Used to change a user's default login shell

expiry: Checks and enforces the current password expiration policy

faillog: Is used to examine the log of login failures, to set a maximum number of failures before an account is blocked, or to reset the failure count

gpasswd: Is used to add and delete members and administrators to groups

groupadd: Creates a group with the given name

groupdel: Deletes the group with the given name

groupmems: Allows a user to administer his/her own group membership list without the requirement of super user privileges.

groupmod: Is used to modify the given group's name or GID

grpck: Verifies the integrity of the group files /etc/group and /etc/gshadow

grpconv: Creates or updates the shadow group file from the normal group file

grpunconv: Updates /etc/group from /etc/gshadow and then deletes the latter

lastlog: Reports the most recent login of all users or of a given user

login: Is used by the system to let users sign on

logoutd: Is a daemon used to enforce restrictions on log-on time and ports

newgrp: Is used to change the current GID during a login session

newusers: Is used to create or update an entire series of user accounts

nologin: Displays a message that an account is not available. Designed to be used as the default shell for accounts that have been disabled

passwd: Is used to change the password for a user or group account

pwck: Verifies the integrity of the password files /etc/passwd and /etc/shadow

pwconv: Creates or updates the shadow password file from the normal password file

pwunconv: Updates /etc/passwd from /etc/shadow and then deletes the latter

sg: Executes a given command while the user's GID is set to that of the given group

su: Runs a shell with substitute user and group IDs

useradd: Creates a new user with the given name, or updates the default new-user information

userdel: Deletes the given user account

usermod: Is used to modify the given user's login name, User Identification (UID), shell, initial group, home directory, etc.

vigr: Edits the /etc/group or /etc/gshadow files

vipw: Edits the /etc/passwd or /etc/shadow files 
=== Coreutils-8.19 ¼³Ä¡ ===

The Coreutils package contains utilities for showing and setting the basic system characteristics.
{{{
Approximate build time:  4.0 SBU
Required disk space:     154 MB
}}}
Coreutils (8.19)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.gnu.org/gnu/coreutils/
CoreutilsÀÇ ÆÐÄ¡¸¦ ¹ÞÀ» ¼ö ÀÖ´Â »çÀÌÆ®:
ftp://ftp.osuosl.org/pub/lfs/lfs-packages/7.2/

Coreutils¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed.

==== Coreutils ¼³Ä¡ ====

test caseÀÇ ¹ö±×¸¦ °íĨ´Ï´Ù:
{{{
sed -i -e 's/! isatty/isatty/' \
       -e '45i\              || errno == ENOENT' gnulib-tests/test-getlogin.c
}}}

POSIX´Â CoreutilsÀÇ ÇÁ·Î±×·¥ÀÌ multibyte ·ÎÄÉÀÏÀÎ °æ¿ì¿¡µµ ¿Ã¹Ù¸£°Ô ¹®ÀÚÀÇ bit°æ°è¸¦ ¾Ë ¼ö ÀÖ¾î¾ß ÇÑ´Ù°í ¿ä±¸Çߴµ¥, ´ÙÀ½¿¡ ½ÇÇàÇÒ ÆÐÄ¡´Â À̸¦ À§ÇÑ °ÍÀÔ´Ï´Ù.
{{{
patch -Np1 -i ../coreutils-8.19-i18n-1.patch
}}}

Coreutils ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
FORCE_UNSAFE_CONFIGURE=1 ./configure \
            --prefix=/usr         \
            --libexecdir=/usr/lib \
            --enable-no-install-program=kill,uptime
}}}
kill, uptimeÀº ³ªÁß¿¡ ¼³Ä¡ÇÒ ¹ÙÀ̳ʸ®µéÀ̱⠶§¹®¿¡ ¼³Ä¡¿É¼ÇÀ¸·Î Á¦¿Ü½ÃÄÑÁÖ¾ú½À´Ï´Ù.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}

ÀÌÁ¦ test suite¸¦ ½ÇÇàÇÒ Â÷·ÊÀÔ´Ï´Ù. ¸ÕÀú root »ç¿ëÀÚ·Î test¸¦ ½ÇÇàÇÕ´Ï´Ù.
{{{
make NON_ROOT_USERNAME=nobody check-root
}}}

¿ì¸®´Â ''nobody'' »ç¿ëÀÚ·Î ³ª¸ÓÁö testµéÀ» ½ÇÇàÇÒ °ÍÀÔ´Ï´Ù. ÇÏÁö¸¸ ƯÁ¤ testµéÀº ƯÁ¤ »ç¿ëÀÚ »Ó¸¸ ¾Æ´Ï¶ó ƯÁ¤ groupµµ ¿ä±¸ÇÏ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ Å×½ºÆ®µé ¶§¹®¿¡ Àӽà ±×·ìÀ» ¸¸µé°í ''nobody''¶ó´Â »ç¿ëÀÚ¸¦ ±×·ìÀÇ ¸â¹ö·Î ¸¸µé±â Àü±îÁö´Â °è¼ÓÇؼ­ ¼³Ä¡¸¦ ÁøÇàÇÒ ¼ö ¾ø½À´Ï´Ù. 

¾Æ·¡¿Í °°ÀÌ echo ¸í·ÉÀ» ÀÌ¿ëÇÏ¿© »ç¿ëÀÚ¿Í ±×·ìÀ» Ãß°¡ÇսôÙ:
{{{
echo "dummy:x:1000:nobody" >> /etc/group   
}}}

nobody¿¡ ´ëÇÑ ±ÇÇÑÀ» ¼³Ã»Çؼ­ non-root »ç¿ëÀÚµµ ÄÄÆÄÀÏ°ú test¸¦ ÇÒ ¼ö ÀÖµµ·Ï ¼³Á¤ÇÕ´Ï´Ù:
{{{
chown -Rv nobody .
}}}

ÀÌÁ¦ Å×½ºÆ®¸¦ ½ÇÇàÇÒ ¼ö ÀÖ½À´Ï´Ù. '''su''' ȯ°æ¿¡¼­ PATH(ȯ°æ º¯¼ö)¿¡ /tools/binÀ» Æ÷ÇÔ½ÃÅ°´Â °ÍÀ» ÀØÁö ¸¶¼¼¿ä
{{{
su nobody -s /bin/bash \
          -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes -k check || true"
}}}

ÀÌÁ¦ Àӽ÷Π¸¸µé¾î³õÀº groupÀ» Áö¿ó´Ï´Ù.
{{{
sed -i '/dummy/d' /etc/group
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
{{{
make install
}}}

ÀϺΠÇÁ·Î±×·¥µéÀº Àû´çÇÑ À§Ä¡·Î ¿Å°Ü ÁݽôÙ:
{{{
mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8
}}}

'''head, sleep, nice'''¿¡ ÀÇÁ¸¼ºÀ» °¡Áö´Â LFS-Bootscript ÆÐÅ°Áö ½ºÅ©¸³Æ®°¡ ÀÖ½À´Ï´Ù. ÇÏÁö¸¸ À̰͵éÀº /usr¿¡ Àֱ⠶§¹®¿¡ booting ½ºÅ×ÀÌÁö¿¡¼­ ½ÇÇàµÉ ¼ö ¾øÀ¸¹Ç·Î root ÆÄƼ¼ÇÀ¸·Î ¿Å°ÜÁÝ´Ï´Ù:
{{{
mv -v /usr/bin/{head,sleep,nice} /bin
}}}
==== CoreutilsÀÇ ¸ñ·Ï ====

ÀνºÅçµÈ ÇÁ·Î±×·¥µé: basename, cat, chgrp, chmod, chown, chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, head, hostid, hostname, id, install, join, link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum, shred, sleep, sort, split, stat, stty, su, sum, sync, tac, tail, tee, test, touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who, whoami and yes

==== ¿ä¾à ====

basename strips any path and a given suffix from the given file name.

cat concatenates files to standard output.

chgrp changes the group ownership of each given file to the given group. The group can be either given a a name or a numeric ID.

chmod changes the permissions of each given file to the given mode. The mode can be either a symbolic representation of the changes to make, or an octal number representing the new permissions.

chown changes the user and/or group ownership of each given file to the given user:group pair.

chroot runs a given command with the specified directory as the / directory. The given command can be an interactive shell. On most systems only root can do this.

cksum prints the CRC checksum and the byte counts of each specified file.

comm compares two sorted files, outputting in three columns the lines that are unique, and the lines that are common.

cp copies files.

csplit splits a given file into several new files, separating them according to given patterns or line numbers, and outputting the byte count of each new file.

cut prints parts of lines, selecting the parts according to given fields or positions.

date displays the current time in the given format, or sets the system date.

dd copies a file using the given blocksize and count, while optionally performing conversions on it.

df reports the amount of disk space available (and used) on all mounted file systems, or only on the file systems holding the given files.

dir is the same as ls.

dircolors outputs commands to set the LS_COLOR environment variable, to change the color scheme used by ls.

dirname strips the non-directory suffix from a given file name.

du reports the amount of disk space used by the current directory, or by each of the given directories including all their subdirectories, or by each of the given files.

echo displays the given strings.

env runs a command in a modified environment.

expand converts tabs to spaces.

expr evaluates expressions.

factor prints the prime factors of all specified integer numbers.

false does nothing, unsuccessfully. It always exits with a status code indicating failure.

fmt reformats the paragraphs in the given files.

fold wraps the lines in the given files.

groups reports a user's group memberships.

head prints the first ten lines (or the given number of lines) of each given file.

hostid reports the numeric identifier (in hexadecimal) of the host.

hostname reports or sets the name of the host.

id reports the effective user ID, group ID, and group memberships of the current user, or of a given user.

install copies files while setting their permission modes and, if possible, their owner and group.

join joins from two files the lines that have identical join fields.

link creates a hard link with the given name to the given file.

ln makes hard links or soft links between files.

logname reports the current user's login name.

ls lists the contents of each given directory. By default it orders the files and subdirectories alphabetically.

md5sum reports or checks MD5 checksums.

mkdir creates directories with the given names.

mkfifo creates FIFOs with the given names.

mknod creates device nodes with the given names. A device node is a character special file, or a block special file, or a FIFO.

mv moves or renames files or directories.

nice runs a program with modified scheduling priority.

nl numbers the lines from the given files.

nohup runs a command immune to hangups, with output redirected to a log file.

od dumps files in octal and other formats.

paste merges the given files, joining sequentially corresponding lines side by side, separated by TABs.

pathchk checks whether file names are valid or portable.

pinky is a lightweight finger. It reports some information about the given users.

pr paginates and columnates files for printing.

printenv prints the environment.

printf prints the given arguments according to the given format -- much like the C printf function.

ptx produces from the contents of the given files a permuted index, with each keyword in its context.

pwd reports the name of the current directory.

readlink reports the value of the given symbolic link.

rm removes files or directories.

rmdir removes directories, if they are empty.

seq prints a sequence of numbers, within a given range and with a given increment.

sha1sum prints or checks 160-bit SHA1 checksums.

shred overwrites the given files repeatedly with strange patterns, to make it real hard to recover the data.

sleep pauses for the given amount of time.

sort sorts the lines from the given files.

split splits the given file into pieces, by size or by number of lines.

stty sets or reports terminal line settings.

su runs a shell with substitute user and group IDs.

sum prints checksum and block counts for each given file.

sync flushes file system buffers. It forces changed blocks to disk and updates the super block.

tac concatenates the given files in reverse.

tail prints the last ten lines (or the given number of lines) of each given file.

tee reads from standard input while writing both to standard output and to the given files.

test compares values and checks file types.

touch changes file timestamps, setting the access and modification times of the given files to the current time. Files that do not exist are created with zero length.

tr translates, squeezes, and deletes the given characters from standard input.

true does nothing, successfully. It always exits with a status code indicating success.

tsort performs a topological sort. It writes a totally ordered list according to the partial ordering in a given file.

tty reports the file name of the terminal connected to standard input.

uname reports system information.

unexpand converts spaces to tabs.

uniq discards all but one of successive identical lines.

unlink removes the given file.

uptime reports how long the system has been running, how many users are logged on, and the system load averages.

users reports the names of the users currently logged on.

vdir is the same as ls -l.

wc reports the number of lines, words, and bytes for each given file, and a total line when more than one file is given.

who reports who is logged on.

whoami reports the user name associated with the current effective user ID.

yes outputs 'y' or a given string repeatedly, until killed.

===  Iana-Etc-2.30 ¼³Ä¡Çϱâ ===

 The Iana-Etc package provides data for network services and protocols.
{{{
Approximate build time:  <=0.1 SBU
Required disk space:       2.2 MB
}}}
The installation dependencies for Iana-Etc haven't been checked yet.

==== Iana-Etc ¼³Ä¡Çϱâ ====

´ÙÀ½ÀÇ ¸í·É¾î°¡ IANA¿¡¼­ Á¦°øµÇ´Â raw µ¥ÀÌÅ͸¦ /etc/protocols ¿Ü /etc/services µ¥ÀÌÅÍ ÆÄÀÏÀÇ Çü¼®À¸·Î ÀûÀýÇÏ°Ô ¹Ù²Ü °ÍÀÔ´Ï´Ù.
{{{
make
}}}

ÀÌ ÆÐÅ°Áö´Â test suite°¡ Á¦°øµÇÁö ¾Ê½À´Ï´Ù. ±×³É ¼³Ä¡ÇÏ½Ã¸é µË´Ï´Ù.
{{{
make install
}}}

=== M4-1.4.16 ¼³Ä¡Çϱâ ===

The M4 package contains a macro processor.

Approximate build time:  0.4 SBU
Required disk space:    26.6 MB

M4 (1.4.16)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/m4/

M4¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed.

==== M4 ¼³Ä¡ ====

Glibc-2.16.0°úÀÇ È£È¯¼º ¹®Á¦¸¦ ÇØ°áÇÕ´Ï´Ù.
{{{
sed -i -e '/gets is a/d' lib/stdio.in.h
}}}

M4ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}

ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù.  °Ë»ç¸¦ ¿øÇÑ´Ù¸é ´ÙÀ½ ¸í·É¾î¸¦ ½ÇÇàÇϼ¼¿ä.
{{{
sed -i -e '41s/ENOENT/& || errno == EINVAL/' tests/test-readlink.h
make check
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}

==== M4 ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: m4


==== ¿ä¾à ====

m4 copies the given files while expanding the macros that they contain. These macros are either built-in or user-defined and can take any number of arguments. Besides just doing macro expansion, m4 has built-in functions for including named files, running Unix commands, doing integer arithmetic, manipulating text in various ways, recursion, and so on. The m4 program can be used either as a front-end to a compiler or as a macro processor in its own right.

==== Contents of Iana-Etc ====

Installed files: /etc/protocols, /etc/services

=== Bison-2.6.2 ¼³Ä¡ ===

The Bison package contains a parser generator.
{{{
Approximate build time:  1.3 SBU
Required disk space:      34 MB
}}}
Bison (2.6.2) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/bison/

Bison¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed.

==== Bison ¼³Ä¡ ====

Bison ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}

configure ½Ã½ºÅÛÀº BisonÀ» ºôµåÇÏ·Á ÇÒ¶§ $PATH¸¦ ¾ÆÁ÷ °®°í ÀÖÁö ¾Ê±â ¶§¹®¿¡ internationalizationÀ» Áö¿øÇÏÁö ¾Ê´Â °æ¿ì¿¡ ¿¡·¯¸Þ¼¼Áö°¡ ³ªÅ¸³¯ ¼ö ÀÖ½À´Ï´Ù. ´ÙÀ½ÀÇ ¸í·ÉÀ¸·Î À̸¦ ¿Ã¹Ù¸£°Ô Àâ¾ÆÁÝ´Ï´Ù:
{{{
echo '#define YYENABLE_NLS 1' >> lib/config.h
}}}

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ´ÙÀ½ ¹®ÀåÀ» ½ÇÇàÇϼ¼¿ä.(´ë½Å ½Ã°£Àº Á» ¿À·¡ °É¸³´Ï´Ù.)
{{{
make check
}}}      

±×¸®°í ÆÐÅ°Áö¸¦ ¼³Ä¡:
{{{
make install
}}}      

==== Bison ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: bison and yacc

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: liby.a

==== ¿ä¾à ====

bison generates, from a series of rules, a program for analyzing the structure of text files. Bison is a replacement for yacc (Yet Another Compiler Compiler).

yacc is a wrapper for bison, meant for programs that still call yacc instead of bison. It calls bison with the -y option.

liby.a is the Yacc library containing implementations of Yacc-compatible yyerror and main functions. This library is normally not very useful, but POSIX requires it.

=== Procps-3.2.8 ¼³Ä¡Çϱâ ===
ºôµå ½Ã°£: 0.1 SBU
ÇÊ¿ä °ø°£: 2.6 MB

¸ÕÀú Ä¿³Î ½Ã°£ÀÇ tick ¹ß»ý·üÀ» ÁöÁ¤ÇØÁ־ ¿¡·¯ ¸Þ¼¼Áö°¡ Ãâ·ÂµÉ ¼ö Àֱ⠶§¹®¿¡ ¹Ì¸® ÆÐÄ¡ÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../procps-3.2.8-fix_HZ_errors-1.patch
}}}

'''watch''' ÇÁ·Î±×·¥°ú °ü·ÃµÈ À¯´ÏÄÚµå ¹®Á¦¸¦ ÆÐÄ¡ÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../procps-3.2.8-watch_unicode-1.patch
}}}

Makefile¿¡ ÀÖ´Â ¹ö±×¸¦ ÆÐÄ¡ÇÏ¿© procps°¡ make-3.82¸¦ ºôµåÇÏ´Â °ÍÀ» ¹æÁöÇÕ´Ï´Ù:
{{{
sed -i -e 's@\*/module.mk@proc/module.mk ps/module.mk@' Makefile
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù.
{{{
make
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
{{{
make install
}}}

=== Grep-2.14 ===
ºôµå ½Ã°£: 0.4 SBU
ÇÊ¿ä °ø°£:  30 MB
¼³Ä¡ ³»¿ë: egrep, fgrep, grep
{{{
./configure --prefix=/usr --bindir==/bin
make
make check
make install
}}}

=== Readline-6.2 ===
ºôµå ½Ã°£:  0.1 SBU
ÇÊ¿ä °ø°£: 17.2 MB

ReadlineÀ» ´Ù½Ã ¼³Ä¡ÇÏ¸é ±âÁ¸¿¡ ÀÖ´ø ¶óÀ̺귯¸®¸¦ <libraryname>.oldÀÇ ÇüÅ·Π¹Ù²Ü¼ö ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº ÀϹÝÀûÀ¸·Î ¹®Á¦¸¦ ÀÏÀ¸Å°Áö´Â ¾ÊÁö¸¸ '''ldconfig'''¿¡¼­ ¸µÅ©¿¡ °ü·ÃµÈ ¹ö±×¸¦ ÀÏÀ¸Å³ ¼ö Àֱ⠶§¹®¿¡ ´ÙÀ½ÀÇ sed ¸í·ÉÀ¸·Î ÀÌ ºÎºÐÀ» »èÁ¦ÇÕ´Ï´Ù.
{{{
sed -i '/MV.*old/d' Makefile.in
sed -i '/{OLDSUFF}/c:' support/shlib-install
}}}

¹ö±× ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù.
{{{
patch -Np1 -i ../readline-6.2-fixes-1.patch
}}}

ReadlineÀ» configure, ÄÄÆÄÀÏÇÕ´Ï´Ù.
{{{
./configure --prefix=/usr --libdir=/lib
make SHLIB_LIBS=-lncurses
}}}

'''SHLIB_LIBS=-lncurses''': ÀÌ ¿É¼ÇÀº ReadlineÀÌ libncurses(really, libncursesw) ¶óÀ̺귯¸®¿Í ¸µÅ©Çϵµ·Ï ¼³Á¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù:
{{{
make install
}}}

ÀÌÁ¦ Á¤Àû ¶óÀ̺귯¸®¸¦ ÀûÀýÇÑ À§Ä¡·Î ¿Å±é´Ï´Ù.
{{{
mv -v /lib/lib{readline,history}.a /usr/lib
}}}

/lib¾È¿¡ ÀÖ´Â .so ÆÄÀϵéÀ» »èÁ¦ÇÏ°í /usr/libÀ¸·Î ¸µÅ©¸¦ ´Ù½Ã °É¾îÁÝ´Ï´Ù.
{{{
rm -v /lib/lib{readline,history}.so
ln -sfv ../../lib/libreadline.so.6 /usr/lib/libreadline.so
ln -sfv ../../lib/libhistory.so.6 /usr/lib/libhistory.so
}}}

¿øÇÑ´Ù¸é ¹®¼­¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
{{{
mkdir   -v       /usr/share/doc/readline-6.2
install -v -m644 doc/*.{ps,pdf,html,dvi} \
                 /usr/share/doc/readline-6.2
}}}

=== Bash-4.2 ¼³Ä¡ ===

The Bash package contains the Bourne-Again SHell.
{{{
Approximate build time:  1.7 SBU
Required disk space:     45 MB
}}}
Bash (4.2) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/bash/

BashÀÇ ÆÐÄ¡¸¦ ¹ÞÀ» ¼ö ÀÖ´Â »çÀÌÆ®:
ftp://ftp.osuosl.org/pub/lfs/lfs-packages/7.2/

Bash¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Ncurses, Sed.
==== Bash ÀνºÅç ====

ÆÐÄ¡ Çϱâ:
{{{
patch -Np1 -i ../bash-4.2-fixes-8.patch
}}}
Bash ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr                     \
            --bindir=/bin                     \
            --htmldir=/usr/share/doc/bash-4.2 \
            --without-bash-malloc             \
            --with-installed-readline
}}}

ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}
test suite¸¦ ½ÇÇàÇÏÁö ¾ÊÀ¸·Á¸é ÆÐÅ°Áö ¼³Ä¡ºÎºÐÀ¸·Î ³Ñ¾î°¡¼¼¿ä.

test suite¸¦ À§ÇØ ¼Ò½º Æ®¸®¿¡¼­ ''nobody'' »ç¿ëÀÚ°¡ ¾µ ¼ö ÀÖ´Â ±ÇÇÑÀ» ºÎ¿©ÇÕ´Ï´Ù.
{{{
chown -Rv nobody .
}}}

ÀÌÁ¦ ''nobody'' »ç¿ëÀÚ·Î Å×½ºÆ®¸¦ ½ÇÇàÇÕ´Ï´Ù.
{{{
make tests      
}}}

ÆÐÅ°Áö ¼³Ä¡Çϱâ:
{{{
make install      
}}}

À̹ø¿¡ »õ·Î ÄÄÆÄÀÏÇÑ bash ÇÁ·Î±×·¥À» ½ÇÇàÇÏÀÚ:
{{{
exec /bin/bash --login +h      
}}}
==== Bash ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: bash, sh (link to bash) and bashbug
==== ¿ä¾à ====

bash is a widely-used command interpreter. It performs all kinds of expansions and substitutions on a given command line before executing it, thus making this interpreter a powerful tool.

bashbug is a shell script to help the user compose and mail bug reports concerning bash in a standard format.

sh is a symlink to the bash program. When invoked as sh, bash tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.

=== Libtool-2.4.2 ¼³Ä¡ ===
ºôµå ½Ã°£: 3.0 SBU
ÇÊ¿ä °ø°£:  37 MB

Libtool () °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/libtool/

Libtool°ú ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Sed.
==== Libtool ¼³Ä¡ ====

Libtool ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}

ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}

  ÀÌ ÆÑÅ°Áö´Â ÆÑÅ°Áö°¡ Á¦´ë·Î ºôµå µÇ¾ú´ÂÁö¸¦ ´Ù¾çÇÏ°Ô °Ë»çÇÒ ¼ö ÀÖ´Â Test suite ¸¦ ÀÌ¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Å×½ºÆ®¸¦ Çغ¸·Á¸é ´ÙÀ½°ú °°Àº ¸í·ÉÀ» ½ÇÇàÇϼ¼¿ä:
{{{
make check      
}}}
¼³Ä¡Çϱâ:
{{{
make install      
}}}

==== Libtool ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: libtool and libtoolize

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libltdl.[a,so].
==== ¿ä¾à ====
libtool provides generalized library-building support services.

libtoolize provides a standard way to add libtool support to a package.

libltdl hides the various difficulties of dlopening libraries.

=== GDBM-1.10 ¼³Ä¡Çϱâ ===
¼³¸í: GDBM ÆÐÅ°Áö´Â GNU Database Manager¸¦ Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº ÇϳªÀÇ ÆÄÀÏ¿¡ key/data-pairs¿¡ ´ëÇÑ Á¤º¸µéÀ» ÀúÀåÇÏ´Â µ¥ÀÌÅͺ£À̽º Çü½ÄÀÔ´Ï´Ù.

ºôµå ½Ã°£: 0.1 SBU
ÇÊ¿ä °ø°£: 8.5 MB

ÄÄÆÄÀÏ Áغñ¸¦ ÇÕ´Ï´Ù:
{{{
./configure --prefix=/usr --enable-libgdbm-compat
}}}

'''--enable-libgdbm-compat''' 

LFS ÀÌ¿ÜÀÇ ÆÐÅ°ÁöµéÀº ¿À·¡µÈ DBM ·çƾÀ» ÇÊ¿ä·Î ÇÒ ¶§µµ Àֱ⠶§¹®¿¡ ÀÌ ¿É¼ÇÀ» ÅëÇØ libgdbm ȣȯ ¶óÀ̺귯¸®¸¦ ºôµåÇϵµ·Ï ¸¸µì´Ï´Ù. 

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}

=== Inetutils-1.9.1 ¼³Ä¡ ===

The Inetutils package contains programs for basic networking.
{{{
Approximate build time:  0.4 SBU
Required disk space:      27 MB
}}}
Inetutils (1.9.1) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.gnu.org/gnu/inetutils/

InetutilsÀÇ ÆÐÄ¡¸¦ ¹ÞÀ» ¼ö ÀÖ´Â »çÀÌÆ®:
ftp://ftp.osuosl.org/pub/lfs/lfs-packages/7.2/

Inetutils¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed.

==== Inetutils ¼³Ä¡ ====

Glibc-2.16.0°úÀÇ È£È¯¼º ¹®Á¦¸¦ À§ÇØ ´ÙÀ½°ú °°ÀÌ ÆÐÅ°Áö¸¦ ¼öÁ¤ÇÕ´Ï´Ù
{{{
sed -i -e '/gets is a/d' lib/stdio.in.h
}}}

Inetutils ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr  \
    --libexecdir=/usr/sbin \
    --localstatedir=/var   \
    --disable-ifconfig     \
    --disable-logger       \
    --disable-syslogd      \
    --disable-whois        \
    --disable-servers
}}}
Configure ¿É¼ÇÀÇ ÀǹÌ:

    * '''--disable-ifconfig:''' InetutilsÀÌ '''ifconfig''' ÇÁ·Î±×·¥À» ¼³Ä¡Çϴ°ÍÀ» ¸·½À´Ï´Ù. LFS¿¡¼­´Â IPRoute2 ÆÐÅ°Áö¾ÈÀÇ '''ip'''¸¦ »ç¿ëÇÕ´Ï´Ù.
    * '''--disable-logger:''' ÀÌ ¿É¼ÇÀº Inetutiles ÆÑÅ°ÁöÁß¿¡¼­ logger ÇÁ·Î±×·¥À» ¼³Ä¡ÇÏÁö ¾Êµµ·Ï  ÇØ ÁÝ´Ï´Ù. (UTil-linux ÆÑÅ°Áö¿¡ ´õ ÁÁÀº ÇÁ·Î±×·¥ÀÌ Àֱ⠶§¹®¿¡)
    * '''--disable-syslogd:''' ÀÌ ¿É¼ÇÀº inetutils ÆÑÅ°Áö ¾È¿¡ ÀÖ´Â "System Log Daemon"À» ¼³Ä¡ÇÏÁö ¾Êµµ·Ï ÇÕ´Ï´Ù. µÚ¿¡ ¼³Ä¡ÇÒ Sysklogd ÆÑÅ°Áö¿¡¼­ ¼³Ä¡Çϱ⠶§¹®ÀÔ´Ï´Ù.
    * '''--disable-whois:''' ÀÌ ¿É¼ÇÀº Whois client¸¦ ¼³Ä¡ÇÏÁö ¾Êµµ·Ï ÇØ ÁÝ´Ï´Ù. Inetutils¿¡ Æ÷ÇԵǾî ÀÖ´Â Whois client´Â ±¸¹öÀüÀ̱⠶§¹®ÀÔ´Ï´Ù. ½Å ¹öÀüÀÇ Whois client¸¦ ¼³Ä¡ÇϽǷÁ¸é http://www.linuxfromscratch.org/blfs/view/stable/basicnet/inetutils.html ¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
    * '''--disable-servers:''' ÀÌ ¿É¼ÇÀº Ineutils package ¾È¿¡ Æ÷ÇÔµÈ ´Ù¾çÇÑ ³×Æ®¿÷ ¼­ºñ½ºµéÀ» ¼³Ä¡ÇÏÁö ¾Ê°Ô ÇØÁÝ´Ï´Ù. ÀÌ ¼­ºñ½ºµéÀº ³×Æ®¿÷ÀÇ ¾ÈÁ¤¼ºÀ» À¯ÁöÇϴµ¥ ¾Ç¿µÇâÀ» ³¢Ä¥ °¡´É¼ºÀÌ Àֱ⠶§¹®¿¡ »ç¿ëÇÏÁö ¾Êµµ·Ï ÇÏ°Ú½À´Ï´Ù. ´õ ¸¹Àº °É ¾Ë°í ½Í´Ù¸éhttp://www.linuxfromscratch.org/blfs/view/stable/basicnet/inetutils.html À» ÂüÁ¶ÇØÁÖ¼¼¿ä.  ÀÌ ÆÑÅ°Áö¿¡ Æ÷ÇԵǾî ÀÖ´Â ¸¹Àº ¼­¹ö ÇÁ·Î±×·¥µéÀº ´Ù¸¥ ´õ ³ªÀº ¼­¹ö ÇÁ·Î±×·¥µé·Î ´ëüÇØ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.

ÆÑÅ°Áö ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù:
{{{
make check
}}}

ÆÑÅ°Áö ¼³Ä¡Çϱâ:
{{{
make install 
make -C doc html
make -C doc install-html docdir=/usr/share/doc/inetutils-1.9.1    
}}}

FHS¿¡ ¸¸Á·Çϱâ À§ÇØ ping programÀ» /binÀ¸·Î ¿Å±é½Ã´Ù.
{{{
mv -v /usr/bin/{hostname,ping,ping6} /bin
mv -v /usr/bin/traceroute /sbin
}}}

==== Inetutils ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: ftp, ping, rcp, rlogin, rsh, talk, telnet and tftp

==== ¿ä¾à ====

ftp is the ARPANET file transfer program.

ping sends echo-request packets and reports how long the replies take.

rcp does remote file copy.

rlogin does remote login.

rsh runs a remote shell.

talk is used to chat up another user.

telnet is an interface to the TELNET protocol.

tftp is a trivial file transfer program.

=== Perl-5.16.1 ¼³Ä¡ ===

The Perl package contains the Practical Extraction and Report Language.
{{{
Approximate build time:  7.5 SBU
Required disk space:     247 MB
}}}
Perl (5.16.1) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
http://www.perl.com/

Perl°ú ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed.

==== Perl ¼³Ä¡ ====

/etc/hosts ÆÄÀÏÀ» ¸¸µé¾î¼­ ºÎ°¡ÀûÀÎ test suite¸¦ ½ÇÇàÇßÀ» ¶§ Á¤»óÀûÀ¸·Î ÀÛµ¿µÇµµ·Ï ´ÙÀ½°ú °°ÀÌ ¼³Á¤ÇØÁÝ´Ï´Ù.
{{{
echo "127.0.0.1 localhost $(hostname)" > /etc/hosts
}}}

PerlÀÇ ¹öÀüÀº ÀÌÁ¦ Compress::Raw::Zlib ¸ðµâÀ» ºôµåÇÕ´Ï´Ù. ±âº»ÀûÀ¸·Î PerlÀº ³»ºÎÀûÀ¸·Î Zlib ¼Ò½º¸¦ º¹»çÇÏ¿© ºôµåÇÕ´Ï´Ù. ¿©±â¿¡ »ç¿ëµÉ ¼Ò½º ¶óÀ̺귯¸®¸¦ À§ÇØ ´ÙÀ½°ú °°ÀÌ ½Ã½ºÅÛ¿¡ ÀÖ´Â Zlib ¶óÀ̺귯¸®¸¦ »ç¿ëÇϵµ·Ï ¼³Á¤ÇØÁÝ´Ï´Ù
{{{
sed -i -e "s|BUILD_ZLIB\s*= True|BUILD_ZLIB = False|"           \
       -e "s|INCLUDE\s*= ./zlib-src|INCLUDE    = /usr/include|" \
       -e "s|LIB\s*= ./zlib-src|LIB        = /usr/lib|"         \
    cpan/Compress-Raw-Zlib/config.in
}}}


¸¸¾à PerlÀÇ default ¼³Á¤À¸·Î ÄÄÆÄÀÏ Çϱ⺸´Ù ´Ù¸¥ ´õ ÀÚ¼¼ÇÑ ¿É¼ÇÀ» ÁÖ°í ½Í´Ù¸é, "-des"¿É¼ÇÀ» Á¦°ÅÇÏ°í Interactive Configure Script¸¦ ½ÇÇàÇÏ°í ÄÄÆÄÀϽÿ¡ ´Ù¾çÇÏ°Ô ¼öÁ¤(ÆíÁý)Çؼ­ ÄÄÆÄÀÏ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ·¸°Ô ÀÏÀÏÀÌ ¼³Á¤ÇÏ´Â °Ô ½È´Ù¸é PerlÀÌ ÀÚµ¿ÀûÀ¸·Î °Ë»öÇÏ¿© ¼³Á¤ÇÏ´Â ±âº»¹æ¹ýÀ» »ç¿ëÇϽʽÿÀ:
{{{
sh Configure -des -Dprefix=/usr                 \
                  -Dvendorprefix=/usr           \
                  -Dman1dir=/usr/share/man/man1 \
                  -Dman3dir=/usr/share/man/man3 \
                  -Dpager="/usr/bin/less -isR"  \
                  -Duseshrplib
}}}

Configure ¿É¼ÇÀÇ ÀǹÌ:
    * -Dvendorprefix=/usr: '''perl'''ÀÌ ¾îµð¿¡ perlÀ» ¼³Ä¡ÇؾߵǴÂÁö °æ·Î¸¦ ¾Ë·ÁÁÖ´Â ¿É¼ÇÀÔ´Ï´Ù.
    * -Dpager="/bin/less -isR": '''perldoc'''ÀÌ '''less'''ÇÁ·Î±×·¥À» ÀÌ¿ëÇØ ¿¡·¯¸¦ °íĨ´Ï´Ù.
    * -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3: ¾ÆÁ÷ Groff°¡ ¼³Ä¡µÇÁö ¾Ê¾Ò±â ¶§¹®¿¡ '''Configure'''Àº PerlÀ» À§ÇØ man ÆäÀÌÁö¸¦ ¼³Ä¡ÇÏÁö ¾ÊÀ¸·Á ÇÒ °ÍÀ̱⠶§¹®¿¡ ÀÌ·¸°Ô ÆĶó¹ÌÅ͸¦ Á¤ÇØÁÖ¾î¾ß manÆäÀÌÁö¸¦ ¼³Ä¡ÇÒ ¼ö ÀÖ½À´Ï´Ù.
    * -Duseshrplib: Perl ¸ðµâÀÌ »ç¿ëµÉ ¶§ ÇÊ¿äÇÑ shared libperl¸¦ ºôµåÇÒ ¶§ »ç¿ëÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù.

ÆÑÅ°Áö ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}

Å×½ºÆ®¸¦ ÇØ º¾½Ã´Ù:
{{{
make -k test      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}
==== Perl ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: a2p, c2ph, dprofpp, enc2xs, find2perl, h2ph, h2xs, libnetcfg, perl, perl5.8.3 (link to perl), perlbug, perlcc, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text, pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link to c2ph), s2p, splain and xsubpp

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: (too many to name)
==== ¿ä¾à ====

a2p translates awk to perl.

c2ph dumps C structures as generated from "cc -g -S" stabs.

dprofpp displays perl profile data.

en2cxs builds a Perl extension for the Encode module, from either Unicode Character Mappings or Tcl Encoding Files.

find2perl translates find commands to perl.

h2ph converts .h C header files to .ph Perl header files.

h2xs converts .h C header files to Perl extensions.

libnetcfg can be used to configure the libnet.

perl combines some of the best features of C, sed, awk and sh into a single swiss-army language.

perlbug is used to generate bug reports about Perl or the modules that come with it, and mail them.

perlcc generates executables from Perl programs.

perldoc displays a piece of documentation in pod format that is embedded in the perl installation tree or in a perl script.

perlivp is the Perl Installation Verification Procedure. It can be used to verify that Perl and its libraries have been installed correctly.

piconv is a Perl version of the character encoding converter iconv.

pl2pm is a rough tool for converting Perl4 .pl files to Perl5 .pm modules.

pod2html converts files from pod format to HTML format.

pod2latex converts files from pod format to LaTeX format.

pod2man converts pod data to formatted *roff input.

pod2text converts pod data to formatted ASCII text.

pod2usage prints usage messages from embedded pod docs in files.

podchecker checks the syntax of pod format documentation files.

podselect displays selected sections of pod documentation.

psed is a Perl version of the stream editor sed.

pstruct dumps C structures as generated from "cc -g -S" stabs.

s2p translates sed to perl.

splain is used to force verbose warning diagnostics in perl.

xsubpp converts Perl XS code into C code.

=== Autoconf-2.69 ¼³Ä¡ ===

The Autoconf package contains programs for producing shell scripts that can automatically configure source code.
{{{
Approximate build time:  4.5 SBU
Required disk space:    17.1 MB
}}}
Autoconf (2.69) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/autoconf/

Autoconf¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Coreutils, Diffutils, Grep, M4, Make, Perl, Sed.

==== Autoconf ¼³Ä¡ ====

Autoconf ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}

ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}

ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ´ÙÀ½ ¹®ÀåÀ» ½ÇÇàÇϼ¼¿ä.(´ë½Å ½Ã°£Àº Á» ¿À·¡ °É¸³´Ï´Ù.)
{{{
make check      
}}}

ÆÑÅ°Áö ¼³Ä¡Çϱâ:
{{{
make install      
}}}

==== Autoconf ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate and ifnames
==== ¿ä¾à ====

autoconf is a tool for producing shell scripts that automatically configure software source code packages to adapt to many kinds of Unix-like systems. The configuration scripts it produces are independent -- running them does not require the autoconf program.

autoheader is a tool for creating template files of C #define statements for configure to use.

autom4te is a wrapper for the M4 macro processor.

autoreconf comes in handy when there are a lot of autoconf-generated configure scripts around. The program runs autoconf and autoheader repeatedly (where appropriate) to remake the autoconf configure scripts and configuration header templates in a given directory tree.

autoscan can help to create a configure.in file for a software package. It examines the source files in a directory tree, searching them for common portability problems and creates a configure.scan file that serves as as a preliminary configure.in for the package.

autoupdate modifies a configure.in file that still calls autoconf macros by their old names to use the current macro names.

ifnames can be helpful when writing a configure.in for a software package. It prints the identifiers that the package uses in C preprocessor conditionals. If a package has already been set up to have some portability, this program can help to determine what configure needs to check. It can fill in some gaps in a configure.in file generated by autoscan.

=== Automake-1.12.3 ¼³Ä¡ ===

The Automake package contains programs for generating Makefiles for use with Autoconf.
{{{
Approximate build time:  <=0.1 SBU(testÇϴµ¥ 34.1 SBU)
Required disk space:     100 MB
}}}
Automake (1.12.3) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/automake/

Automake¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Autoconf, Bash, Coreutils, Diffutils, Grep, M4, Make, Perl, Sed.

==== AutomakeÀÇ ÀνºÅç ====

Automake ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.12.3
}}}
ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}
 ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ´ÙÀ½ ¹®ÀåÀ» ½ÇÇàÇϼ¼¿ä.(´ë½Å ½Ã°£Àº Á» ¿À·¡ °É¸³´Ï´Ù.)

[chaoxifer]: ÁøÂ¥ ¿À·¡°É¸³´Ï´Ù.....¹®¼­¿¡¼­µµ test suite ½ÇÇàÇÏ´Â °ÍÀ» ±ÇÇÏÁö ¾Ê½À´Ï´Ù.
{{{
make check 
}}}
¼³Ä¡Çϱâ:
{{{
make install      
}}}

==== Automake ³»¿ë ====
¼³Ä¡µÈ ÇÁ·Î±×·¥µé: acinstall, aclocal, aclocal-1.8, automake, automake-1.8, compile, config.guess, config.sub, depcomp, elisp-comp, install-sh, mdate-sh, missing, mkinstalldirs, py-compile, symlink-tree, ylwrap

==== ¿ä¾à ====
acinstall is a script that installs aclocal-style M4 files.

aclocal generates aclocal.m4 files based on the contents of configure.in files.

automake is a tool for automatically generating Makefile.in's from files called Makefile.am. To create all the Makefile.in files for a package, run this program in the top level directory. By scanning the configure.ins it automatically finds each appropriate Makefile.am and generate the corresponding Makefile.in.

compile is a wrapper for compilers.

config.guess is a script that attempts to guess the canonical triplet for the given build, host, or target architecture.

config.sub is a configuration validation subroutine script.

depcomp is a script for compiling a program so that not only the desired output is generated but also dependency information.

elisp-comp byte-compiles Emacs Lisp code.

install-sh is a script that installs a program, a script, or a datafile.

mdate-sh is a script that prints the modification time of a file or directory.

missing is a script acting as a common stub for missing GNU programs during an installation.

mkinstalldirs is a script that creates a directory tree.

py-compile compiles a Python program.

symlink-tree is a script to create a symlink tree of a directory tree.

ylwrap is a wrapper for lex and yacc.

=== Diffutils-3.2 ¼³Ä¡Çϱâ ===
ºôµå ½Ã°£: 0.5 SBU
ÇÊ¿ä °ø°£:  25 MB

Glibc-2.16.0°úÀÇ È£È¯¼ºÀ» À§ÇØ ´ÙÀ½°ú °°ÀÌ ÆÐÅ°Áö¸¦ ¼öÁ¤ÇÕ´Ï´Ù:
{{{
sed -i -e '/gets is a/d' lib/stdio.in.h
}}}

ÄÄÆÄÀÏ Áغñ¸¦ ÇÕ´Ï´Ù:
{{{
./configure --prefix=/usr
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù:
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù:
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù:
{{{
make install
}}}

==== Diffutils ÀÇ ¼³Ä¡¸ñ·Ï ====

¼³Ä¡µÇ´Â ÇÁ·Î±×·¥: cmp, diff, diff3, sdiff

=== Gawk-4.0.1 ¼³Ä¡ ===

The Gawk package contains programs for manipulating text files.
{{{
Approximate build time:  0.2 SBU
Required disk space:     30 MB
}}}
Gawk (4.0.1)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/gawk/

Gawk¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed.

==== Gawk ¼³Ä¡ ====

GawkÀ» ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --libexecdir=/usr/lib
}}}      

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ¿øÇÑ´Ù¸é ´ÙÀ½ ¸í·ÉÀ» ÀÔ·ÂÇϼ¼¿ä.
{{{
make check      
}}}
±×¸®°í ÆÐÅ°Áö ¼³Ä¡:
{{{
make install
}}}      

¸¸¾à °ü·Ã ¹®¼­¸¦ ¼³Ä¡ÇÏ°í ½Í´Ù¸é ´ÙÀ½À» ½ÇÇàÇϽʽÿÀ:
{{{
mkdir -v /usr/share/doc/gawk-4.0.1
cp    -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-4.0.1
}}}

==== Gawk ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: awk (link to gawk), gawk, gawk-3.1.3, grcat, igawk, pgawk, pgawk-3.1.3 and pwcat


==== ¿ä¾à ====

gawk is a program for manipulating text files. It is the GNU implementation of awk.

grcat dumps the group database /etc/group.

igawk gives gawk the ability to include files.

pgawk is the profiling version of gawk.

pwcat dumps the password database /etc/passwd.

=== Findutils-4.4.2 ¼³Ä¡ ===

The Findutils package contains programs to find files. The finding is done either by doing a live recursive search through a directory tree, or by consulting a previously set up database.
{{{
Approximate build time:  0.4 SBU
Required disk space:      29 MB
}}}
Findutils (4.4.2)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://alpha.gnu.org/gnu/findutils/

FindutilsCoreutils¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed.

==== Findutils ¼³Ä¡ ====
ÄÄÆÄÀÏ ÁغñÇϱâ
{{{
./configure --prefix=/usr                   \
            --libexecdir=/usr/lib/findutils \
            --localstatedir=/var/lib/locate
}}}
µ¥ÀÌŸº£À̽ºÀÇ ±âº» À§Ä¡´Â /usr/varÀÔ´Ï´Ù. FHS À» ±âÁØÀ¸·Î µ¥ÀÌÅÍ º£À̽º ÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÏ°íÀÚ Çϸé configure¸¦ ÇÒ ¶§, ½ÃÅ°´Â´ë·Î ÀÌ  --localstatedir=/var/lib/misc ¸¦ Ãß°¡Çϼ¼¿ä.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½ÍÀ¸¸é ´ÙÀ½ ¸í·ÉÀ» ½ÇÇàÇϼ¼¿ä.
{{{
make check      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}
LFS-Bootscript ÆÐÅ°Áö¿¡ ÀÖ´Â ½ºÅ©¸³Æ® Áß '''find'''¿¡ ÀÇÁ¸ °ü°è¿¡ ÀÖ´Â °ÍÀÌ ÀÖ½À´Ï´Ù. ¶§¹®¿¡ /usr ¿¡ ÀÖÀ¸¸é boot ½ºÅ×ÀÌÁö°¡ ÀûÀýÇÏ°Ô ½ÇÇàµÇÁö ¾ÊÀ» °Ì´Ï´Ù. À̸¦ ¼öÁ¤Çϱâ À§ÇØ ÇØ´ç ÇÁ·Î±×·¥À» root ÆÄƼ¼ÇÀ¸·Î ¿Å°ÜÁÝ´Ï´Ù.
{{{
mv -v /usr/bin/find /bin
sed -i 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb
}}}

==== Findutils ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: bigram, code, find, frcode, locate, updatedb and xargs

==== ¿ä¾à ====

bigram Àº µ¥ÀÌŸº£À̽ºÀÇ À§Ä¡¸¦ »êÃâÇس»±â À§ÇØ Àü¿¡ »ç¿ëµÇ¾ú´Ù.

code ´Â µ¥ÀÌŸº£À̽ºÀÇ À§Ä¡¸¦ »êÃâÇس»±â À§ÇØ Àü¿¡ »ç¿ëµÇ¾ú´Ù. ±×°ÍÀº frcodeÀÇ Á¶»óÀÌ´Ù.

find ´Â ¿­°ÅµÈ criteria¸¦ °°Àº ÆÄÀÏÀ» À§ÇÑ ÀÔ·ÂÇÑ µð·ºÅ丮À» ã´Â´Ù.

frcode ´Â ÆÄÀÏÀ̸§ÀÇ ¸ñ·ÏÀ» ¾ÐÃàÇϱâÀ§ÇØ updatedb¿¡ ÀÇÇØ ºÒ·ÁÁø´Ù. ±×°ÍÀº ¾Õ-¾ÐÃàÀ» »ç¿ëÇÑ´Ù, 4¿¡¼­ 5±îÁöÀÇ ¿ø¼Ò¿¡ ÀÇÇÑ µ¥ÀÌŸº£À̽º»çÀÌÁ ÁÙÀδÙ.

locate ´Â ÆÄÀÏÀ̸§µéÀÇ µ¥ÀÌŸº£À̽º¸¦ ÅëÇØ Ã£´Â´Ù. ±×¸®°í ±× À̸§µéÀ» º¸°íÇÑ´Ù.

updatedb ´Â µ¥ÀÌŸ¹èÀ̽º À§Ä¡¸¦ ¾÷µ¥ÀÌÆ®ÇÑ´Ù. ±×°ÍÀº Àüü ÆÄÀϽýºÅÛÀ» Á¶»çÇÑ´Ù.(´Ù¸¥ ÆÄÀÏ ½Ã½ºÅÛÀ» Æ÷ÇÔ. ÇöÁ¦ ¸¶¿îÆ®µÈ, ¸¸¾à ¾ê±â ÇÏÁö ¾Ê¾Ò´Ù¸é) ±×¸®°í µ¥ÀÌŸº£À̽º¾È¿¡ ãÀº ¸ðµç ÆÄÀÏÀ̸§À» ¿Ã¸°´Ù.

xargs ´Â ÀÔ·ÂµÈ ÆÄÀÏÀÇ ¸ñ·Ï¿¡¼­ ¸í·ÉÀ» °ø±ÞÇϴµ¥ »ç¿ëÇÒ¼öÀÖ´Ù.

=== Flex-2.5.37 ¼³Ä¡ ===

The Flex package contains a utility for generating programs that recognize patterns in text.
.
{{{
Approximate build time:  0.4 SBU
Required disk space:      39 MB
}}}
(2.5.37)°ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
http://flex.sourceforge.net/

Flex¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Bison, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed.

==== Flex ¼³Ä¡ ====
¸ÕÀú, test°ü·Ã ¹ö±×¸¦ ÆÐÄ¡ÇÕ´Ï´Ù
{{{
patch -Np1 -i ../flex-2.5.37-bison-2.6.1-1.patch
}}}

Flex ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
}}}

ÆÐÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}

ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ¾Æ·¡ ¸í·É¾î¸¦ ÀÔ·ÂÇϼ¼¿ä:
{{{
make -k check
}}}
±×¸®°í ÆÐÅ°Áö ¼³Ä¡:
{{{
make install      
}}}
ÀϺΠÇÁ·Î±×·¥µéÀº /usr/lib¾ÈÀÇ  Lex¶óÀ̺귯¸®¸¦ »ç¿ëÇÕ´Ï´Ù.  ¾Æ·¡¿Í °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µé¾î ÁÖ¼¼¿ä:
{{{
ln -sv libfl.a /usr/lib/libl.a
}}}
ÀϺΠÇÁ·Î±×·¥µéÀº flex°¡ ¾Æ´Ï¶ó  lex¸¦ »ç¿ë ÇÕ´Ï´Ù. ±×·± ÇÁ·Î±×·¥µéÀ» À§Çؼ­  Lex emulation modeÀÇ  flex¸¦ lex¶ó´Â À̸§ÀÇ  shell½ºÅ©¸³Æ®¸¦ ¸¸µì½Ã´Ù.
{{{
cat > /usr/bin/lex << "EOF"
#!/bin/sh
# Begin /usr/bin/lex

exec /usr/bin/flex -l "$@"

# End /usr/bin/lex
EOF
chmod -v 755 /usr/bin/lex
}}}

¿øÇÑ´Ù¸é flex.pdf ¹®¼­ ÆÄÀÏÀ» ¼³Ä¡ÇÕ´Ï´Ù
{{{
mkdir -v /usr/share/doc/flex-2.5.37
cp    -v doc/flex.pdf /usr/share/doc/flex-2.5.37
}}}
==== Flex ³»¿ë ====
¼³Ä¡µÈ ÇÁ·Î±×·¥µé: flex, flex++ (link to flex) and lex

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libfl.a

==== ¿ä¾à ====

flex is a tool for generating programs that recognize patterns in text. Pattern recognition is useful in many applications. From a set of rules on what to look for flex makes a program that looks for those patterns. The reason to use flex is that it is much easier to specify the rules for than to write the actual pattern-finding program.

flex++ invokes a version of flex that is used exclusively for C++ scanners.

libfl.a is the flex library.

=== Gettext-0.18.1.1 ¼³Ä¡ ===

The Gettext package contains utilities for internationalization and localization. These allow programs to be compiled with Native Language Support (NLS), enabling them to output messages in the user's native language.
{{{
Approximate build time:  2.3 SBU
Required disk space:     180 MB
}}}
Gettext (0.18.1.1) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/gettext/

Gettext¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Bison, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed.

==== Gettext ¼³Ä¡ ====
Glibc-2.16.0°úÀÇ È£È¯¼º ¹®Á¦¸¦ ÇØ°áÇÕ´Ï´Ù:
{{{
sed -i -e '/gets is a/d' gettext-*/*/stdio.in.h
}}}

Gettext ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr \
            --docdir=/usr/share/doc/gettext-0.18.1.1
}}}
ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ´ÙÀ½ ¹®ÀåÀ» ½ÇÇàÇϼ¼¿ä.(´ë½Å ½Ã°£Àº Á» ¿À·¡ °É¸³´Ï´Ù.)
{{{
make check      
}}}
ÆÐÅ°Áö ¼³Ä¡:
{{{
make install      
}}}

==== Gettext ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: autopoint, config.charset, config.rpath, envsubst, gettext, gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen, msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq, ngettext, project-id, team-address, trigger, urlget, user-email and xgettext

¼³Ä¡µÈ ¶óÀ̺귯¸®µé: libasprintf[a,so], libgettextlib[a,so], libgettextpo[a,so] and libgettextsrc[a,so]


==== ¿ä¾à ====

autopoint copies standard gettext infrastructure files into a source package.

config.charset outputs a system-dependent table of character encoding aliases.

config.rpath outputs a system-dependent set of variables, describing how to set the runtime search path of shared libraries in an executable.

envsubst substitutes environment variables in shell format strings.

gettext translates a natural language message into the user's language, by looking up the translation in a message catalog.

gettextize copies all standard Gettext files into the given top-level directory of a package, to begin internationalizing it.

hostname displays a network hostname in various forms.

msgattrib filters the messages of a translation catalog according to their attributes and manipulates the attributes.

msgcat concatenates and merges the given .po files.

msgcmp compares two .po files to check that both contain the same set of msgid strings.

msgcomm finds the messages that are common to to the given .po files.

msgconv converts a translation catalog to a different character encoding.

msgen creates an English translation catalog.

msgexec applies a command to all translations of a translation catalog.

msgfilter applies a filter to all translations of a translation catalog.

msgfmt generates a binary message catalog from from a translation catalog.

msggrep extracts all messages of a translation catalog that match a given pattern or belong to some given source files.

msginit creates a new .po file, initializing the meta information with values from the user's environment.

msgmerge combines two raw translations into a single file.

msgunfmt decompiles a binary message catalog into raw translation text.

msguniq unifies duplicate translations in a translation catalog.

ngettext displays native language translations of a textual message whose grammatical form depends on a number.

xgettext extracts the translatable message lines from the given source files, to make the first translation template.

libasprintf defines the autosprintf class which makes C formatted output routines usable in C++ programs, for use with the <string> strings and the <iostream> streams.

libgettextlib is a private library containing common routines used by the various gettext programs. They're not meant for general use.

libgettextpo is used to write specialized programs that process PO files. This library is used when the standard applications shipped with gettext won't suffice (such as msgcomm, msgcmp, msgattrib and msgen).

libgettextsrc is a private library containing common routines used by the various gettext programs. They're not meant for general use.

=== Groff-1.21 ¼³Ä¡ ===

The Groff package contains programs for processing and formatting text.
{{{
Approximate build time:  0.5 SBU
Required disk space:     83 MB
}}}
Groff (1.21) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ® :
ftp://ftp.gnu.org/gnu/groff/

Groff¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed.


==== Groff ¼³Ä¡ ====

Groff´Â ±âº» ¹®¼­ »çÀÌÁ Æ÷ÇÔÇϴ ȯ°æº¯¼ö PAGE¸¦ ÇÊ¿ä·Î ÇÕ´Ï´Ù. ¹Ì±¹¿¡¼­´Â PAGE=letter·Î ÁöÁ¤ÇÏÁö¸¸, ¸¸¾à ´ç½ÅÀÌ ¹Ì±¹ÀÌ ¾Æ´Ñ ´Ù¸¥ °÷¿¡¼­ »ì°í ÀÖ´Ù¸é PAGE=letter¸¦ PAGE=A4·Î ¹Ù²ã ÁÖ¾î¾ß ÇÕ´Ï´Ù.

GroffÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
PAGE=A4 ./configure --prefix=/usr (PAGE¸¦ Çѱ¹ ½ÇÁ¤¿¡ ¸Â°Ô A4·Î)      
}}}
ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install      
}}}
'''xman'''°°Àº ÀϺΠdocumentation programµéÀº ´ÙÀ½°ú °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µé¾î ÁÖÁö ¾ÊÀ¸¸é ½ÇÇàµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù:
{{{
ln -s soelim /usr/bin/zsoelim
ln -s eqn /usr/bin/geqn
ln -s tbl /usr/bin/gtbl      
}}}

==== Groff ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: addftinfo, afmtodit, eqn, eqn2graph, geqn (link to eqn), grn, grodvi, groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl (link to tbl), hpftodit, indxbib, lkbib, lookbib, mmroff, neqn, nroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, refer, soelim, tbl, tfmtodit, troff and zsoelim (link to soelim)

==== ¿ä¾à ====

addftinfo reads a troff font file and adds some additional font-metric information that is used by the groff system.

afmtodit creates a font file for use with groff and grops.

eqn compiles descriptions of equations embedded within troff input files into commands that are understood by troff.

eqn2graph converts an EQN equation into a cropped image.

grn is a groff preprocessor for gremlin files.

grodvi is a driver for groff that produces TeX dvi format.

groff is a front-end to the groff document formatting system. Normally it runs the troff program and a post-processor appropriate for the selected device.

groffer displays groff files and man pages on X and tty.

grog reads files and guesses which of the groff options -e, -man, -me, -mm, -ms, -p, -s, and -t are required for printing files, and reports the groff command including those options.

grolbp is a groff driver for Canon CAPSL printers (LBP-4 and LBP-8 series laser printers).

grolj4 is a driver for groff that produces output in PCL5 format suitable for an HP Laserjet 4 printer.

grops translates the output of GNU troff to Postscript.

grotty translates the output of GNU troff into a form suitable for typewriter-like devices.

gtbl is the GNU implementation of tbl.

hpftodit creates a font file for use with groff -Tlj4 from an HP-tagged font metric file.

indxbib makes an inverted index for the bibliographic databases a specified file for use with refer, lookbib, and lkbib.

lkbib searches bibliographic databases for references that contain specified keys and reports any references found.

lookbib prints a prompt on the standard error (unless the standard input is not a terminal), reads from the standard input a line containing a set of keywords, searches the bibliographic databases in a specified file for references containing those keywords, prints any references found on the standard output and repeats this process until the end of input.

mmroff is a simple preprocessor for groff.

neqn formats equations for ascii output.

nroff is a script that emulates the nroff command using groff.

pfbtops translates a Postscript font in .pfb format to ASCII.

pic compiles descriptions of pictures embedded within troff or TeX input files into commands understood by TeX or troff.

pic2graph converts a PIC diagram into a cropped image.

pre-grohtml translates the output of GNU troff to html.

post-grohtml translates the output of GNU troff to html.

refer copies the contents of a file to the standard output, except that lines between .[ and .] are interpreted as citations, and lines between .R1 and .R2 are interpreted as commands about how citations are to be processed.

soelim reads files and replaces lines of the form .so file by the contents of the mentioned file.

tbl compiles descriptions of tables embedded within troff input files into commands that are understood by troff.

tfmtodit creates a font file for use with groff -Tdvi.

troff is highly compatible with Unix troff. Usually it should be invoked using the groff command, which will also run preprocessors and post-processors in the appropriate order and with the appropriate options.

zsoelim is the GNU implementation of soelim.

=== Xz-5.0.4 ¼³Ä¡Çϱâ ===
ºôµå ½Ã°£: 0.3 SBU
ÇÊ¿ä ¿ë·®:  18 MB

Xz ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù:
{{{
./configure --prefix=/usr --libdir=/lib --docdir=/usr/share/doc/xz-5.0.4
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù:
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make pkgconfigdir=/usr/lib/pkgconfig install
}}}

=== Grub-2.00 ¼³Ä¡ ===
ºôµå ½Ã°£: 0.7 SBU
ÇÊ¿ä °ø°£: 112 MB

Glibc-2.16.0°úÀÇ È£È¯¼º ¹®Á¦¸¦ ¼öÁ¤ÇÕ´Ï´Ù:
{{{
sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h
}}}

GRUBÀ» ÄÄÆÄÀÏÇÒ Áغñ¸¦ ÇÕ´Ï´Ù
{{{
./configure --prefix=/usr          \
            --sysconfdir=/etc      \
            --disable-grub-emu-usb \
            --disable-efiemu       \
            --disable-werror
}}}

{{{
make 
make install
}}}

=== Less-444 ¼³Ä¡ ===

The Less package contains a text file viewer.
{{{
Approximate build time:  0.1 SBU
Required disk space:     3.8 MB
}}}
Less (444) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®: 
ftp://ftp.gnu.org/gnu/less/

Less¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed.

==== Less ¼³Ä¡ ====
Less ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc      
}}}
Configure ¿É¼ÇÀÇ ÀǹÌ:

    * --sysconfdir=/etc: This option tells the programs created by the package to look in /etc for their configuration files.

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÆÑÅ°Áö ¼³Ä¡Çϱâ:
{{{
make install      
}}}
==== Less ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: less, lessecho and lesskey

==== ¿ä¾à ====

less is a file viewer or pager. It displays the contents of the given file, letting you scroll around, find strings, and jump to marks.

lessecho is needed to expand metacharacters, such as * and ?, in filenames on Unix systems.
lesskey is used to specify the key bindings for less.

=== Gzip-1.5 ===
ÄÄÆÄÀÏÇÏ¿© ¼³Ä¡ÇÕ´Ï´Ù
{{{
./configure --prefix=/usr --bindir=/bin
make
make check
make install
}}}

·çÆ® ÆÄÀϽýºÅÛ¿¡ ÇÊ¿äÇÏÁö ¾Ê´Â ÇÁ·Î±×·¥µéÀ» /usr/bin À¸·Î ¿Å±é´Ï´Ù.
{{{
mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin
mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin
}}}

=== IPRoute2-3.5.1 ===
ÆÐÅ°Áö¿¡ Æ÷ÇԵǾîÀÖ´Â '''arpd''' ¹ÙÀ̳ʸ®´Â berkeley DB¿¡ ´ëÇØ ÀÇÁ¸¼ºÀ» °¡Áö°í ÀÖ½À´Ï´Ù. '''arpd'''°¡ ¸®´ª½º ½Ã½ºÅÛ ±â¹Ý¿¡¼­ °øÅëÀûÀ¸·Î ¿ä±¸µÇÁö ¾Ê±â ¶§¹®¿¡ ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î Berkeley DB¿¡ ´ëÇÑ ÀÇÁ¸¼ºÀ» ¾ø¾Ù ¼ö ÀÖ½À´Ï´Ù. ¸¸¾à '''arpd''' ¹ÙÀ̳ʸ®°¡ ÇÊ¿äÇÏ´Ù¸é BLFS Ã¥¿¡ ³ª¿ÍÀÖ´Â Berkeley DB¸¦ ÄÄÆÄÀÏÇÏ´Â ¹æ¹ýÀ» »ìÆ캸½Ê½Ã¿À:
[http://www.linuxfromscratch.org/blfs/view/svn/server/databases.html#db http://www.linuxfromscratch.org/blfs/view/svn/server/databases.html#db]

{{{
sed -i '/^TARGETS/s@arpd@@g' misc/Makefile
sed -i /ARPD/d Makefile
sed -i 's/arpd.8//' man/man8/Makefile
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make DESTDIR=
}}}

¿©±â¼­ DESTDIR= À̶ó°í ÇÑ °ÍÀº IPRoute2 ¹ÙÀ̳ʸ®°¡ ¼³Ä¡µÉ µð·ºÅ丮¸¦ ¼³Á¤ÇØ ÁØ °Ì´Ï´Ù. ¿©±â¼­´Â µðÆúÆ®°ªÀ¸·Î /usr °¡ µË´Ï´Ù.

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù:
{{{
make DESTDIR=              \
     MANDIR=/usr/share/man \
     DOCDIR=/usr/share/doc/iproute2-3.5.1 install
}}}

=== Kbd-1.15.3 ¼³Ä¡ ===

¼³¸í: Kbd ÆÐÅ°Áö´Â key-table ÆÄÀÏ°ú, ÄÜ¼Ö ÆùÆ®, Å°º¸µå À¯Æ¿¸®Æ¼¸¦ Æ÷ÇÔÇÕ´Ï´Ù.

ºôµå ½Ã°£: 0.1 SBU
ÇÊ¿ä °ø°£:  20 MB

'''loadkeys'''´Â À̹ø ¸±¸®Áî¿¡¼­ filenameÀÌ ¾øÀÌ ½ÇÇàÇÏ¸é ¼Õ»óµÇ´Âµ¥ À̸¦ ÆÐÄ¡ÇØÁÝ´Ï´Ù:
{{{
patch -Np1 -i ../kbd-1.15.3-upstream_fixes-1.patch
}}}

Backspace¿Í Delete Å°ÀÇ µ¿ÀÛÀº Kbd ÆÐÅ°Áö¿¡¼­ Áö¼ÓÀûÀ¸·Î ¿µÇâÀ» ÁÖ°í ÀÖ½À´Ï´Ù. i386 Å°¸Ê¿¡¼­ ¹ß»ýÇÏ´Â ¹ö±×¸¦ ÆÐÄ¡ÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../kbd-1.15.3-backspace-1.patch
}}}

ÆÐÄ¡ ÈÄ¿¡ Backspace Å°´Â 127Äڵ带, Delete Å°´Â escape ½ÃÄö½º¸¦ »êÃâÇÒ°ÍÀÔ´Ï´Ù.

½ºÆäÀÎ¾î ¸Þ¼¼Áö ¹ø¿ªÀÌ kbd°¡ gettext-1.18.1.1¿Í ÇÔ²² ºôµåµÇ´Â °ÍÀ» ¹æÇØÇÏ´Â °ÍÀ» ÆÐÄ¡ÇÕ´Ï´Ù.
{{{
sed -i '/guardado\ el/s/\(^.*en\ %\)\(.*\)/\14\$\2/' po/es.po
}}}

ºÒÇÊ¿äÇÑ '''resizecons''' ÇÁ·Î±×·¥°ú ÇØ´ç man ÆäÀÌÁö¸¦ »èÁ¦ÇÕ´Ï´Ù.(32-bit x86¿¡¸¸ ÇØ´çµË´Ï´Ù.)

configure.acÀÇ ¹öÀüÀº aclocal.m4º¸´Ù »õ ¹öÀüÀ̱⠶§¹®¿¡ autotools´Â '''make'''¸¦ ½ÇÇàÇÏ¿© configure¸¦ µ¤¾î¾²±âÇÏ·Á ÇÒ °ÍÀÔ´Ï´Ù. configure.acÀÇ ½Ã°£°ú ³¯Â¥ ´ë½Å¿¡ ½Ã½ºÅÛÀÇ timezoneÀ» »ç¿ëÇϵµ·Ï ´ÙÀ½°ú °°ÀÌ ¹Ù²ãÁÝ´Ï´Ù.
{{{
sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/' configure &&
sed -i 's/resizecons.8 //' man/man8/Makefile.in &&
touch -d '2011-05-07 08:30' configure.ac
}}}

Kbd ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù
{{{
./configure --prefix=/usr --datadir=/lib/kbd
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÕ´Ï´Ù
{{{
make
make install
}}}

ºÎÆ® ½ºÅ©¸³Æ®¿¡ ÇÊ¿äÇÑ ÆÄÀϵéÀ» root ÆÄƼ¼ÇÂÊÀ¸·Î ¿Å±é´Ï´Ù.
{{{
mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin
}}}

¿øÇϽô ºÐµé¸¸ ¹®¼­¸¦ ¼³Ä¡Çϼ¼¿ä:
{{{
mkdir -v /usr/share/doc/kbd-1.15.3
cp -R -v doc/* \
         /usr/share/doc/kbd-1.15.3
}}}
=== Kmod-9 ¼³Ä¡ ===
¼³¸í: Kmod ÆÐÅ°Áö´Â Ä¿³Î ¸ðµâÀ» ·ÎµåÇϱâ À§ÇÑ ¶óÀ̺귯¸®¿Í À¯Æ¿¸®Æ¼¸¦ °¡Áö°í ÀÖ½À´Ï´Ù.

ºôµå ½Ã°£: 0.1 SBU
ÇÊ¿ä °ø°£:  30 MB

x86 È£½ºÆ®½Ã½ºÅÛ¿¡¼­ test suite¸¦ ½ÇÇàÇÒ ¶§ »ý±â´Â ¹®Á¦¸¦ ÆÐÄ¡ÇÕ´Ï´Ù:
{{{
patch -Np1 -i ../kmod-9-testsuite-1.patch
}}}

Kmod ÄÄÆÄÀÏÀ» ÁغñÇմϤ§
{{{
./configure --prefix=/usr       \
            --bindir=/bin       \
            --libdir=/lib       \
            --sysconfdir=/etc   \
            --with-xz           \
            --with-zlib
}}}

ÄÄÆÄÀÏ ¿É¼Ç ¼³¸í:
  * '''lib* and --with-*''': ÀÌ ¿É¼ÇµéÀº Kmod°¡ ¾ÐÃàµÈ Ä¿³Î ¸ðµâµéÀ» Çڵ鸵 ÇÒ ¼ö ÀÖµµ·Ï ÇÕ´Ï´Ù. xz¿Í zlib Çì´õÆÄÀÏ°ú ¶óÀ̺귯¸®°¡ ÇÊ¿ä·ÎÇÏ´Â ¼Ð º¯¼ö°¡ pkg-config¿¡ ºüÁ®Àֱ⠶§¹®¿¡ ÀÌ ¿É¼ÇÀ» ¼³Á¤ÇØ ÁÖ¾î¾ßÇÕ´Ï´Ù. 

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏ°í module-init-tools°úÀÇ È£È¯¼ºÀ» À§ÇØ symlink¸¦ ¸¸µé¾îÁÝ´Ï´Ù.
{{{
make pkgconfigdir=/usr/lib/pkgconfig install

for target in depmod insmod modinfo modprobe rmmod; do
  ln -sv ../bin/kmod /sbin/$target
done

ln -sv kmod /bin/lsmod
}}}
=== Libpipeline-1.2.1 ¼³Ä¡ ===

¼³¸í: Libpipeline ÆÐÅ°Áö´Â ÇÏÀ§ÇÁ·Î¼¼½ºµéÀÇ ÆÄÀÌÇÁ¶óÀÎÀ» Á¦°øÇÏ´Â ¶óÀ̺귯¸®ÀÔ´Ï´Ù.

ºôµå ½Ã°£: 0.2 SBU
ÇÊ¿ä °ø°£: 7.4 MB

Glibc-2.16.0°úÀÇ À¯¿¬¼ºÀ» À§ÇØ ´ÙÀ½°ú °°ÀÌ °íÃÄÁÝ´Ï´Ù:
{{{
sed -i -e '/gets is a/d' gnulib/lib/stdio.in.h
}}}

Libpipeline ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù
{{{
PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure --prefix=/usr
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}
=== Make-3.82 ¼³Ä¡ ===
¼³¸í: Make ÆÐÅ°Áö´Â ÄÄÆÄÀÏ ÆÐÅ°Áö¸¦ Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù

ºôµå ½Ã°£:  0.4 SBU
ÇÊ¿ä °ø°£: 11.3 MB

upstream ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù
{{{
patch -Np1 -i ../make-3.82-upstream_fixes-2.patch
}}}

ÄÄÆÄÀÏ Áغñ¸¦ ÇÕ´Ï´Ù
{{{
./configure --prefix=/usr
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù.
{{{
make
}}}

test suite¸¦ ½ÇÇàÇÕ´Ï´Ù
{{{
make check
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù
{{{
make install
}}}
=== Man-DB-2.6.2 ¼³Ä¡ ===

Man-DB ÆÐÅ°Áö´Â man page¸¦ ã°Å³ª º¼ ¼ö ÀÖ´Â ÇÁ·Î±×·¥À» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù.

ÇÊµå ½Ã°£: 0.5 SBU
ÇÊ¿ä ¿ë·®: 27  MB

Glibc-2.16.0°úÀÇ È£È¯¼º ¹®Á¦¸¦ ÇØ°áÇÕ´Ï´Ù
{{{
sed -i -e '/gets is a/d' gnulib/lib/stdio.in.h
}}}

ÄÄÆÄÀÏ Áغñ¸¦ ÇÕ´Ï´Ù
{{{
./configure --prefix=/usr                        \
            --libexecdir=/usr/lib                \
            --docdir=/usr/share/doc/man-db-2.6.2 \
            --sysconfdir=/etc                    \
            --disable-setuid                     \
            --with-browser=/usr/bin/lynx         \
            --with-vgrind=/usr/bin/vgrind        \
            --with-grap=/usr/bin/grap
}}}

ÄÄÆÄÀÏ ¿É¼Ç ¼³¸í

  * '''--disable-setuid:''' '''man'''ÇÁ·Î±×·¥ÀÌ '''man'''»ç¿ëÀÚÀÇ setuid¸¦ Çϵµ·Ï ÇÏ´Â °ÍÀ» ¹æÁöÇÕ´Ï´Ù.
  * '''--with-...: ''' ÀÌ ¼¼°³ÀÇ ÆĶó¹ÌÅ͵éÀº ±âº» ÇÁ·Î±×·¥µéÀ» ¼³Á¤ÇϱâÀ§ÇØ »ç¿ëµË´Ï´Ù. '''lynx'''´Â ÅؽºÆ®±â¹ÝÀÇ À¥ ºê¶ó¿ìÀúÀÌ°í '''vgrind'''´Â ÇÁ·Î±×·¥ÀÇ ¼Ò½º¸¦ Groff ÀÔ·ÂÀ¸·Î º¯È¯ÇÏ´Â ÇÁ·Î±×·¥, '''grap'''Àº Groff ¹®¼­µéÀ» ¼³Á¤µÈ Çü½ÄÀÇ ±×·¡ÇÁ·Î À¯¿ëÇÑ ÇÁ·Î±×·¥µéÀÔ´Ï´Ù. '''vgrind'''¿Í '''grap'''ÇÁ·Î±×·¥Àº manual ÆäÀÌÁö¸¦ º¸´Âµ¥ ÀϹÝÀûÀ¸·Î ÇÊ¿äÇÏÁö´Â ¾Ê½À´Ï´Ù. ÀÌ°ÍÀº LFS³ª BLFS¿¡ ¼ÓÇÏÁö´Â ¾ÊÁö¸¸ ¿©·¯ºÐµéÀÌ LFS¸¦ ¼³Ä¡ÇÏ°í ³­ ÈÄ¿¡ ¿øÇÏ´Â °ÍÀ» Çϱâ À§ÇØ ¼³Ä¡ÇؾßÇÒ °ÍÀÔ´Ï´Ù.

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÕ´Ï´Ù
{{{
make
make check
make install
}}}
=== Patch-2.6.1 ¼³Ä¡ ===

'''diff''' ÇÁ·Î±×·¥¿¡ ÀÇÇØ ±¸ÇöµÈ ÇÁ·Î±×·¥À¸·Î patch ÆÄÀÏÀ» Àû¿ëÇÏ¿© ÆÄÀÏÀ» ¼öÁ¤Çϰųª ¸¸µé ¼ö ÀÖ´Â ÇÁ·Î±×·¥ÀÔ´Ï´Ù.

ºôµå ½Ã°£: <= 0.1 SBU
ÇÊ¿ä ¿ë·®:    3.4 MB

¸ÕÀú test suite¸¦ ½ÇÇàÇÒ ¶§ '''ed'''¸¦ ãÁö ¾Êµµ·Ï ÆÐÄ¡¸¦ Àû¿ëÇÕ´Ï´Ù.
{{{
patch -Np1 -i ../patch-2.6.1-test_fix-1.patch
}}}

ÄÄÆÄÀÏ ÈÄ ¼³Ä¡ÇÕ´Ï´Ù
{{{
./configure --prefix=/usr
make
make -k check
make install
}}}
=== Sysklogd-1.5 ¼³Ä¡ ===

syslogd ÆÐÅ°Áö´Â ½Ã½ºÅÛ ¸Þ¼¼Áö¸¦ ·Î±ëÇÏ´Â ÇÁ·Î±×·¥À» °¡Áö°í ÀÖ½À´Ï´Ù.

ºôµå ½Ã°£: <= 0.1 SBU
ÇÊ¿ä °ø°£:    0.6 MB

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù
{{{
make
}}}

ÀÌ ÆÐÅ°Áö´Â test suite¸¦ Á¦°øÇÏÁö ¾Ê½À´Ï´Ù.

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
{{{
make BINDIR=/sbin install
}}}

ÀÌÁ¦ /etc/syslog.conf ÆÄÀÏÀ» ´ÙÀ½°ú °°ÀÌ ¸¸µé¾îÁÝ´Ï´Ù.
{{{
cat > /etc/syslog.conf << "EOF"
# Begin /etc/syslog.conf

auth,authpriv.* -/var/log/auth.log
*.*;auth,authpriv.none -/var/log/sys.log
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
*.emerg *

# End /etc/syslog.conf
EOF
}}}
=== Sysvinit-2.88dsf ¼³Ä¡ ===

ÀÌ ÆÐÅ°Áö´Â ½Ã½ºÅÛÀÇ start, running, shutdown µîÀ» ÄÁÆ®·ÑÇÏ´Â ÇÁ·Î±×·¥À» Á¦°øÇÕ´Ï´Ù.

run-levelÀÌ ¹Ù²ð¶§(¿¹¸¦ µé¾î, ½Ã½ºÅÛÀ» ²ô·Á°í ÇÒ ¶§), '''init'''Àº termination ½Ã±×³ÎÀ» »õ·Î¿î run-level¿¡ ÀÖÁö ¾ÊÀº ÇÁ·Î¼¼½º¿Í ÀÚ±â Àڽſ¡°Ô º¸³À´Ï´Ù. ÀÌ ¶§ '''init'''Àº "Sending processes the TERM signal" À̶ó´Â ¸Þ¼¼Áö¸¦ Ãâ·ÂÇϸ鼭 ÇöÀç ÀÛµ¿ÇÏ°í ÀÖ´Â ¸ðµç ÇÁ·Î¼¼½º¿¡°Ô ½Ã±×³ÎÀ» º¸³À´Ï´Ù. ÇÏÁö¸¸ À߸ø Çؼ®ÇÏ´Â °ÍÀ» ÇÇÇϱâ À§ÇØ À̸¦ "Sending processes configured via /etc/inittab the TERM signal"·Î ¹Ù²ãÁݽôÙ
{{{
sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c
}}}

¿©±â¿¡ Æ÷ÇÔµÈ '''wall'''°ú '''mountpoint'''ÇÁ·Î±×·¥ÀÇ ¹öÀüÀº ÀÌÀü¿¡ Util-linux¿¡¼­ ¼³Ä¡µÇ¾ú±â ¶§¹®¿¡ ÀÌ µÑÀ» ¼³Ä¡¸ñ·Ï¿¡¼­ Á¦¿Ü½Ãŵ´Ï´Ù.
{{{
sed -i -e 's/utmpdump wall/utmpdump/' \
       -e '/= mountpoint/d' \
       -e 's/mountpoint.1 wall.1//' src/Makefile
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÏ°í ¼³Ä¡ÇÕ´Ï´Ù
{{{
make -C src
make -C src install
}}}
=== Tar-1.26 ¼³Ä¡ ===

ºôµå ½Ã°£: 2.4 SBU
ÇÊ¿ä °ø°£:  34 MB

Glibc-2.16.0°úÀÇ È£È¯¹®Á¦¸¦ ÇØ°áÇÕ´Ï´Ù.
{{{
sed -i -e '/gets is a/d' gnu/stdio.in.h
}}}

T&#4447;ar ÆÐÅ°Áö ÄÄÆÄÀÏÀ» ÁغñÇÕ´Ï´Ù
{{{
FORCE_UNSAFE_CONFIGURE=1  \
./configure --prefix=/usr \
            --bindir=/bin \
            --libexecdir=/usr/sbin
}}}

'''FORCE_UNSAFE_CONFIGURE=1''': ÀÌ°ÍÀº mknod¸¦ ½ÇÇàÇÒ ¶§ root·Î ½ÇÇàÇ϶ó°í ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. ÀϹÝÀûÀ¸·Î test suite¸¦ root·Î ½ÇÇàÇÏ°Ô µÇ¸é À§ÇèÇÏÁö¸¸ ¿©±â¿¡¼­´Â ºôµå ½Ã½ºÅÛÀÇ ÀϺο¡¼­¸¸ ½ÇÇàµÇ¹Ç·Î »ç¿ëÇصµ ±¦Âú½À´Ï´Ù.

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÏ¿© ¼³Ä¡ÇÕ´Ï´Ù
{{{
make
make check
make install
make -C doc install-html docdir=/usr/share/doc/tar-1.26
}}}
=== Texinfo-4.6 ¼³Ä¡ ===

The Texinfo package contains programs for reading, writing, and converting Info documents.
{{{
Approximate build time:  0.2 SBU
Required disk space:     17 MB
}}}
Texinfo (4.6) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.gnu.org/gnu/texinfo/

Texinfo¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed.
==== Texinfo-4.13a ¼³Ä¡ ====

Texinfo ÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr      
}}}
ÄÄÆÄÀÏÇϱâ:
{{{
make      
}}}
  ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. °Ë»ç¸¦ ÇÏ°í ½Í´Ù¸é ´ÙÀ½ ¹®ÀåÀ» ½ÇÇàÇϼ¼¿ä.
{{{
make check      
}}}
¼³Ä¡Çϱâ:
{{{
make install      
}}}
TeXÀÇ ´Ù¾çÇÑ ºÎ°¡ÀûÀÎ ÄÁÆ÷³ÍÆ®µéÀ»  ¼³Ä¡ÇÒ ¼ö ÀÖ½À´Ï´Ù:
{{{
make TEXMF=/usr/share/texmf install-tex      
}}}
make Æĸ®¹ÌÅÍÀÇ ÀǹÌ:

    *

      TEXMF=/usr/share/texmf:  The TEXMF makefile variable holds the location of the root of your TeX tree if, for example, you plan to install a TeX package later on.

  Info documentation½Ã½ºÅÛÀº ¸Þ´º¿£Æ®¸® ¸®½ºÆ®¸¦ À¯ÁöÇϱâ À§Çؼ­ °£´ÜÇÑ ÅؽºÆ® ÆÄÀÏÀ» »ç¿ëÇÕ´Ï´Ù. ±× ÆÄÀÏÀº /usr/share/info/dir ¿¡ À§Ä¡ÇÕ´Ï´Ù. ºÒÇàÇÏ°Ôµµ °¡²û½Ä ½Ã½ºÅÛ¿¡¼­  Info manualµéÀ» ½ÇÁ¦·Î ¼³Ä¡ÇÒ¶§, ÆÑÅ°ÁöµéÀÇMakefileÀÇ ³»¿ë¿¡ µû¶ó ¹®Á¦°¡ »ý±æ¼ö ÀÖ½À´Ï´Ù. ´ç½ÅÀÌ /usr/share/info/dir fileÀ» ´Ù½Ã ¸¸µé ÇÊ¿ä°¡ ÀÖÀ»¶§´Â ´ÙÀ½°ú °°Àº ÀÛ¾÷À» ¼öÇàÇϼ¼¿ä:
{{{
cd /usr/share/info
rm dir
for f in *
do install-info $f dir 2>/dev/null
done      
}}}
==== Texinfo ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥µé: info, infokey, install-info, makeinfo, texi2dvi and texindex
==== ¿ä¾à ====

info is used to read Info documents. Info documents are a bit like man pages, but often go much deeper than just explaining all the flags. Compare for example man tar and info tar.

infokey compiles a source file containing Info customizations into a binary format.

install-info is used to install Info files. It updates entries in the Info index file.

makeinfo translates the given Texinfo source documents into various other formats: Info files, plain text, or HTML.

texi2dvi is used to format the given Texinfo document into a device-independent file that can be printed.

texindex is used to sort Texinfo index files.

=== Udev-188 ¼³Ä¡(systemd-188¿¡¼­ ÃßÃâ) ===

ºôµå ½Ã°£:  0.1 SBU
ÇÊ¿ä °ø°£: 17.4 MB

Udev ÆÐÅ°Áö´Â µ¿ÀûÀ¸·Î µð¹ÙÀ̽º ³ëµå¸¦ »ý¼ºÇØÁÖ´Â ÇÁ·Î±×·¥ÀÔ´Ï´Ù.

udev-lfs tarballÀº Udev¸¦ ºôµåÇϱâ À§ÇÑ LFS-specific ÆÄÀÏÀ» Æ÷ÇÔÇÏ°í ÀÖ½À´Ï´Ù. systemd ¼Ò½º µð·ºÅ丮¿¡ Ç®¾îÁÝ´Ï´Ù.

{{{
tar -xvf ../udev-lfs-188-3.tar.bz2
}}}

ÆÐÅ°Áö¸¦ ÄÄÆÄÀÏÇÕ´Ï´Ù.
{{{
make -f udev-lfs-188/Makefile.lfs
}}}

ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
{{{
make -f udev-lfs-188/Makefile.lfs install
}}}

¸¶Áö¸·À¸·Î network udev rules¸¦ ÀÛ¼ºÇÕ´Ï´Ù. ¿©±â¿¡ ´ëÇØ ÀÚ¼¼È÷ º¸·Á¸é [http://www.linuxfromscratch.org/lfs/view/stable/chapter07/network.html#stable-net-names http://www.linuxfromscratch.org/lfs/view/stable/chapter07/network.html#stable-net-names]¸¦ Âü°íÇϽʽÿÀ. Áß¿äÇÑ°Ç /sys¿Í /proc ÆÄÀϽýºÅÛÀº chrootȯ°æ¿¡¼­ ¹Ýµå½Ã ¸¶¿îÆ®µÇ¾î¾ß ÇÑ´Ù´Â °ÍÀ» È®ÀÎÇØÇá ÇÑ´Ù´Â Á¡ÀÔ´Ï´Ù. ´ÙÀ½ ½ºÅ©¸³Æ®´Â ¸¶¿îÆ®°¡ µÇ¾îÀÖ¾î¾ß Á¦´ë·Î ÀÛµ¿ÇÒ ¼ö ÀÖ½À´Ï´Ù.
{{{
bash udev-lfs-188/init-net-rules.sh
}}}
=== Vim-7.3 ¼³Ä¡ ===

The Vim package contains a powerful text editor.
{{{
Approximate build time:  1.1 SBU
Required disk space:     96 MB
}}}
Vim (7.3) °ø½Ä ´Ù¿î·Îµå »çÀÌÆ®:
ftp://ftp.vim.org/pub/editors/vim/unix/

Vim¿Í ÀÇÁ¸¼º °ü°è¿¡ ÀÖ´Â ÇÁ·Î±×·¥µé: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed.
Vim ´ë¾È

Emacs, Joe, ¶Ç´Â Nano °°Àº ´Ù¸¥ ¿¡µðÅ͵éÀ» »ç¿ëÇÏ°í ½ÍÀ» °æ¿ì¿¡´Â-- http://www.linuxfromscratch.org/blfs/view/stable/postlfs/editors.html ¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.

==== Vim ¼³Ä¡ ====
/etc¿¡ vimrc ¼³Á¤ÆÄÀÏÀÌ À§Ä¡Çϵµ·Ï ±âº» À§Ä¡¸¦ ¹Ù²ãÁÝ´Ï´Ù.
{{{
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
}}}

vimrc ¿Í gvimrc ÆÄÀÏÀÇ ±âº»À§Ä¡¸¦ /etc·Î ¹Ù²ã ÁÖ¼¼¿ä.
{{{
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h      
}}}
VimÄÄÆÄÀÏ ÁغñÇϱâ:
{{{
./configure --prefix=/usr --enable-multibyte
}}}

'''--enable-multibyte: ''' ÀÎÄÚµùÀ» À§ÇØ ¼³Á¤ÇÏ´Â ¿É¼ÇÀÔ´Ï´Ù. 

ÆÑÅ°Áö ÄÄÆÄÀÏ:
{{{
make      
}}}
ÀÌ ÆÑÅ°Áö´Â Á¦´ë·Î ÄÄÆÄÀÏ µÇ¾ú´ÂÁö¸¦ °Ë»ç ÇÒ ¼ö ÀÖ´Â Test suite¸¦ °¡Áö°í ÀÖ½À´Ï´Ù. ÇÏÁö¸¸, Vim test suite´Â ¸¹Àº ¾²·¹±â Ãâ·Â°ªµéÀ» º¸¿© ÁÙ °ÍÀÌ°í, °¡²û¾¿Àº Å͹̳ÎÀ» ¸ØÃß°Ô Çϱ⵵ ÇÕ´Ï´Ù. ±×·¯¹Ç·Î ²À ÇÏ½Ç ÇÊ¿ä´Â ¾ø½À´Ï´Ù. Vim test suite¸¦ ½ÇÇàÇϽ÷Á¸é, ´ÙÀ½ ¸í·ÉÀ» ÀÔ·ÂÇϼ¼¿ä:
{{{
make test      
}}}
ÆÑÅ°Áö ¼³Ä¡:
{{{
make install     
}}}
´ÙÀ½°ú °°ÀÌ ½Éº¼¸¯ ¸µÅ©¸¦ ¸¸µé¾î ÁÖ¼¼¿ä. (vi¿¡ Àͼ÷ÇÑ »ç¿ëÀÚµéÀ» À§Çؼ­..)
{{{
ln -sv vim /usr/bin/vi
for L in  /usr/share/man/{,*/}man1/vim.1; do
    ln -sv vim.1 $(dirname $L)/vi.1
done

ln -sv ../vim/vim73/doc /usr/share/doc/vim-7.3
}}}
´ç½ÅÀÇ LFS ½Ã½ºÅÛ¿¡ XÀ©µµ¿ì¸¦ ¼³Ä¡ÇÒ ¿¹Á¤À̶ó¸é, VimÀ» Àç ÄÄÆÄÀÏ Çؼ­ X¿¡ ¼³Ä¡ÇÏ°í ½Í¾îÁú °ÍÀÔ´Ï´Ù. VimÀÇ GUI¹öÀüÀ» »ç¿ëÇÏ·Á¸é X À©µµ¿ì¿Í ±× ¹Û¿¡ ´Ù¸¥ ¶óÀ̺귯¸®µéÀ» ¸ÕÀú ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù. ´õ ¸¹Àº Á¤º¸´Â Vim¹®¼­¸¦ ÂüÁ¶ÇØ ÁÖ¼¼¿ä.
==== Vim ¼³Á¤ ====

±âº»ÀûÀ¸·Î, vimÀº vi-compatible¸ðµå·Î ½ÇÇàµË´Ï´Ù. ÇÏÁö¸¸, ¸î¸î »ç¶÷µéÀº ÀÚ½ÅÀÇ ¹æ¹ý(ÀÌ Ã¥¿¡¼± ´Ù·çÁö ¾Ê½À´Ï´Ù. )À¸·Î vimÀ» ½ÇÇàÇϱ⸦ ¿øÇÕ´Ï´Ù. ¾Æ·¡¿Í °°ÀÌ ±âº»ÀûÀÎ vim±¸¼º ÆÄÀÏÀ» ¸¸µå¼¼¿ä.
{{{
cat > /etc/vimrc << "EOF"
" Begin /etc/vimrc

set nocompatible
set backspace=2
syntax on
if (&term == "iterm") || (&term == "putty")
  set background=dark
endif

" End /etc/vimrc
EOF
}}}

The set nocompatible will make vim behave in a more useful way than the default vi-compatible manner. The set backspace=2 allows backspacing over line breaks, autoindent and the start of insert. And the syntax on switches on vim's semantic colouring.

»ç¿ë°¡´ÉÇÑ ¿É¼Ç¿¡ °ü·ÃµÈ ¹®¼­¸¦ º¸·Á¸é ´ÙÀ½°ú °°ÀÌ ÇϽʽÿÀ
{{{
vim -c ':options'
}}}
==== Vim ³»¿ë ====

¼³Ä¡µÈ ÇÁ·Î±×·¥: efm_filter.pl, efm_perl.pl, ex (link to vim), less.sh, mve.awk, pltags.pl, ref, rview (link to vim), rvim (link to vim), shtags.pl, tcltags, vi (link to vim), view (link to vim), vim, vim132, vim2html.pl, vimdiff (link to vim), vimm, vimspell.sh, vimtutor and xxd


==== ¿ä¾à ====

efm_filter.pl is a filter for creating an error file that can be read by vim.

efm_perl.pl reformats the error messages of the Perl interpreter for use with the quickfix mode of vim.

ex starts vim in ex mode.

less.sh is a script that starts vim with less.vim.

mve.awk processes vim errors.

pltags.pl creates a tags file for perl code, for use by vim.

ref checks the spelling of arguments.

rview is a restricted version of view: no shell commands can be started and view can't be suspended.

rvim is a restricted version of vim: no shell commands can be started and vim can't be suspended.

shtags.pl generates a tag file for perl scripts.

tcltags generates a tag file for TCL code.

vi starts vim in vi-compatible mode.

view starts vim in read-only mode.

vim is the editor.

vim132 starts vim with the terminal in 132-column mode.

vim2html.pl converts vim documentation to HTML.

vimdiff edits two or three versions of a file with vim and show differences.

vimm enables the DEC locator input model on a remote terminal.

vimspell.sh is a script which spells a file and generates the syntax statements necessary to highlight in vim.

vimtutor teaches you the basic keys and commands of vim.

xxd makes a hexdump of the given file. It can also do the reverse, so it can be used for binary patching.

=== About Debugging Symbols ===
´ëºÎºÐÀÇ ÇÁ·Î±×·¥°ú ¶óÀ̺귯¸®µéÀÌ ±âº»ÀûÀ¸·Î µð¹ö±ë ½Éº¼°ú ÇÔ²² ÄÄÆÄÀÏ µË´Ï´Ù.(gccÀÇ -g ¿É¼ÇÀÌ Æ÷ÇÔµÈ) ÀÌ°ÍÀº ÇÁ·Î±×·¥À̳ª ¶óÀ̺귯¸®°¡ µð¹ö±ë Á¤º¸¸¦ Æ÷ÇÔÇÑ »óÅ·ΠÄÄÆÄÀϵȴٴ ÀǹÌÀÔ´Ï´Ù. ÀÌ ¶§ µð¹ö°Å´Â ¸Þ¸ð¸® ÁÖ¼Ò »Ó¸¸ ¾Æ´Ï¶ó ·çƾ°ú º¯¼öÀÇ À̸§±îÁö Á¦°øÇÕ´Ï´Ù.

±×·¯³ª ÀÌ·¯ÇÑ µð¹ö±ë ½Éº¼ÀÇ Æ÷ÇÔÀº Á¤¸»·Î Å®´Ï´Ù. ´ÙÀ½Àº ½Éº¼ÀÌ ³ªÅ¸³»´Â ¿ë·®À» ³ª¿­ÇÑ °ÍÀÔ´Ï´Ù:
 * µð¹ö±ë ½Éº¼ÀÌ Æ÷ÇÔµÈ '''bash''' ¹ÙÀ̳ʸ® ÆÄÀÏ: 1200 KB
 * µð¹ö±ë ½Éº¼ÀÌ Æ÷ÇÔµÇÁö ¾ÊÀº '''bash''' ¹ÙÀ̳ʸ® ÆÄÀÏ: 480 KB
 * µð¹ö±ë ½Éº¼ÀÌ Æ÷ÇÔµÈ Glibc¿Í GCC ÆÄÀϵé(lib, /usr/lib): 87 MB
 * µð¹ö±ë ½Éº¼ÀÌ Æ÷ÇÔµÇÁö ¾ÊÀº Glibc, GCC ÆÄÀϵé : 16 MB

Å©±â´Â ÄÄÆÄÀÏ·¯¿Í »ç¿ëµÈ C ¶óÀ̺귯¸®¿¡ ÀÇÇØ ´Þ¶óÁöÁö¸¸ debugging symbol¿¡ µû¶ó¼­µµ Å©°Ô º¯È­ÇÕ´Ï´Ù.

´ëºÎºÐÀÇ »ç¿ëÀÚµéÀÌ µð¹ö°Å¸¦ »ç¿ëÇÏÁö ¾Ê±â ¶§¹®¿¡ »ç¿ëÇÏÁö ¾ÊÀ» °æ¿ì¿¡´Â µð¹ö±ë ½Éº¼À» Á¦¿ÜÇÏ°í ÄÄÆÄÀÏÇؼ­ °ø°£ÀÇ ³¶ºñ¸¦ ÁÙÀÌ½Ç ¼ö ÀÖ½À´Ï´Ù.

=== Stripping Again ===

¸¸¾à ÀǵµÇÑ »ç¿ëÀÚ°¡ ÇÁ·Î±×·¡¸Ó°¡ ¾Æ´Ï°í ½Ã½ºÅÛ ¼ÒÇÁÆ®¿þ¾î¸¦ µð¹ö±ëÇÒ ÀÏÀÌ ¾ø´Ù¸é ¹ÙÀ̳ʸ®¿Í ¶óÀ̺귯¸®·ÎºÎÅÍ µð¹ö±ë ½Éº¼À» ¾ø¾Ö¼­ ´ë·« 90MB Á¤µµÀÇ °ø°£À» Àý¾àÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ ¶§¹®¿¡ ¼ÒÇÁÆ®¿þ¾î¸¦ ¿ÏÀüÇÏ°Ô µð¹ö±×ÇÏÁö ¸øÇÑ´Ù´Â Á¡À» »©°í´Â ¾Æ¹«·± ºÒÆíÇÔÀÌ ¾ø½À´Ï´Ù.

´ëºÎºÐÀÇ »ç¶÷µéÀº ¾Õ¼­ ¾ð±ÞÇÑ ¸í·É¾îµéÀ» »ç¿ëÇϴµ¥ ¾î·Á¿òÀ» ´À³¢Áö ¸øÇÒ °ÍÀÔ´Ï´Ù. ÇÏÁö¸¸ »õ·Î¿î ½Ã½ºÅÛÀ» °íÀå³»´Â °Ç ¼ø½Ä°£À̹ǷΠ'''strip''' ¸í·É¾î¸¦ ½ÇÇàÇϱâ Àü¿¡ ÇöÀç »óÅÂÀÇ LFS ½Ã½ºÅÛÀ» ¹é¾÷ÇÏ´Â °Íµµ ÁÁÀº ¹æ¹ýÀÔ´Ï´Ù. '''strip''' ¸í·É¾î´Â ¹ÙÀ̳ʸ®ÀÇ Á¤º¸¸¦ ¼öÁ¤ÇÏ´Â ÀÛ¾÷À» ¼öÇàÇÕ´Ï´Ù.

strippingÀ» Çϱâ Àü¿¡ ½ÇÇàµÇ°í ÀÖ´Â ¹ÙÀ̳ʸ® ÆÄÀÏÀÌ ¾ø´ÂÁö È®½ÇÇÏ°Ô È®ÀÎÇØ¾ß ÇÕ´Ï´Ù. ¸¸¾à chroot »óÅÂÀÎÁö È®½ÇÇÏÁö ¾Ê´Ù¸é ¸ÕÀú chroot ȯ°æ¿¡¼­ ³ª¿É´Ï´Ù.
{{{
logout
}}}

´Ù½Ã chroot ȯ°æÀ¸·Î µé¾î°©´Ï´Ù.
{{{
chroot $LFS /tools/bin/env -i \
    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /tools/bin/bash --login
}}}

ÀÌÁ¦ ¾ÈÀüÇÏ°Ô ¹ÙÀ̳ʸ®¿Í ¶óÀ̺귯¸®¸¦ stripÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù.
{{{
/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
  -exec /tools/bin/strip --strip-debug '{}' ';'
}}}

¸¹Àº ¼öÀÇ ÆÄÀϵéÀÌ ±×µéÀÇ ÆÄÀÏ Çü½ÄÀ» ¾Ë ¼ö ¾ø´Ù´Â ¸Þ¼¼Áö¸¦ Ãâ·ÂÇÒ °ÍÀÔ´Ï´Ù. ÇÏÁö¸¸ ÀÌ·¯ÇÑ °æ°íµéÀº ¹«½ÃÇصµ µË´Ï´Ù. ÀÌ·¯ÇÑ °æ°í´Â ÇØ´ç ÆÄÀϵéÀÌ ¹ÙÀ̳ʸ® ÆÄÀÏÀÌ ¾Æ´Ï¶ó ½ºÅ©¸³Æ®À̱⠶§¹®¿¡ ¹ß»ýÇÕ´Ï´Ù.

=== Cleaning Up ===

ÀÌÁ¦ chroot ȯ°æ¿¡¼­ ³ª¿Ô´Ù°¡ ´Ù½Ã µé¾î°¥ ¶§´Â Ç×»ó ´ÙÀ½ÀÇ ¼öÁ¤µÈ chroot Ä¿¸Çµå¸¦ »ç¿ëÇϽʽÿÀ:
{{{
chroot "$LFS" /usr/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login
}}}

ÀÌ·¸°Ô Çؾ߸¸ ÇÏ´Â ÀÌÀ¯´Â ´õÀÌ»ó /tools¾È¿¡ ÀÖ´Â ÇÁ·Î±×·¥À» ÇÊ¿ä·Î ÇÏÁö ¾Ê±â ¶§¹®ÀÔ´Ï´Ù. ¸¸¾à ¿øÇÑ´Ù¸é /tools µð·ºÅ丮¸¦ Áö¿ì¼Åµµ µË´Ï´Ù.

¸¸¾à¿¡ °¡»ó Ä¿³Î ÆÄÀÏ ½Ã½ºÅÛÀÌ ¸¶¿îÆ®µÇÁö ¾Ê¾Ò´Ù¸é Á÷Á¢ ÀçºÎÆÃÀ» ÅëÇؼ­ ¸¶¿îÆ®ÇØÁÖ¾î¾ß ÇÕ´Ï´Ù. chroot ȯ°æÀ¸·Î ÁøÀÔÇÒ ¶§ Ç×»ó virtual kernel file systemÀÌ ¸¶¿îÆ® µÇ¾îÀÖ´ÂÁö È®ÀÎÇϽʽÿÀ. ¹Ýµå½Ã ¸¶¿îÆ® µÇ¾îÀÖ¾î¾ß ÇÕ´Ï´Ù. 

ÀÌÁ¦ Bootscript¸¦ ÀÛ¼ºÇÒ Â÷·ÊÀÔ´Ï´Ù. [LFS/Bootscripts]¸¦ Âü°íÇϼ¼¿ä

ID
Password
Join
You have an unusual equpment for success. Be sure to use if properly.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2013-01-28 21:09:16
Processing time 0.0180 sec