前回からの続き
6.18. Sed-4.2.1
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # rm -rf sed-4.2.1 # tar xfvj sed-4.2.1.tar.bz2 # cd sed-4.2.1 # ./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/sed-4.2.1 # make # make html # make check # make install # make -C doc install-html |
6.19. Bzip2-1.0.6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# cd /sources/ # rm -rf bzip2-1.0.6 # tar xfvz bzip2-1.0.6.tar.gz # cd bzip2-1.0.6 # patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch # sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile # make -f Makefile-libbz2_so # make clean # make # make PREFIX=/usr install # 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 |
6.20. Ncurses-5.9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# cd /sources/ # rm -rf ncurses-5.9 # tar xfvz ncurses-5.9.tar.gz # cd ncurses-5.9 # ./configure --prefix=/usr --with-shared --without-debug --enable-widec # make # make install # mv -v /usr/lib/libncursesw.so.5* /lib # ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so # 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 # 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 # mkdir -v /usr/share/doc/ncurses-5.9 # cp -v -R doc/* /usr/share/doc/ncurses-5.9 |
6.21. Util-linux-2.20.1
1 2 3 |
# cd /sources/ # tar xfvj util-linux-2.20.1.tar.bz2 # cd util-linux-2.20.1 |
hwclockは/var/lib/hwclockにあったほうがいいらしい。
1 |
# sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' -i $(grep -rl '/etc/adjtime' .) |
1 2 3 |
# ./configure --enable-arch --enable-partx --enable-write # make # make install |
6.22. Psmisc-22.15
1 2 3 4 5 6 7 8 |
# cd /sources/ # tar xfvz psmisc-22.15.tar.gz # cd psmisc-22.15 # ./configure --prefix=/usr # make # make install # mv -v /usr/bin/fuser /bin # mv -v /usr/bin/killall /bin |
6.23. E2fsprogs-1.42
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# cd /sources/ # tar xfvz e2fsprogs-1.42.tar.gz # cd e2fsprogs-1.42 # mkdir -v build # cd build/ # PKG_CONFIG=/tools/bin/true LDFLAGS="-lblkid -luuid" ../configure --prefix=/usr --with-root-prefix="" --enable-elf-shlibs --disable-libblkid --disable-libuuid --disable-uuidd --disable-fsck # make # make check # make install # make install-libs # chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a # 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 |
6.24. Coreutils-8.15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# cd /sources/ # rm -rf coreutils-8.15 # tar xfvJ coreutils-8.15.tar.xz # cd coreutils-8.15 # case `uname -m` in i?86 | x86_64) patch -Np1 -i ../coreutils-8.15-uname-1.patch ;; esac # patch -Np1 -i ../coreutils-8.15-i18n-1.patch # ./configure --prefix=/usr --libexecdir=/usr/lib --enable-no-install-program=kill,uptime # make # make NON_ROOT_USERNAME=nobody check-root # echo "dummy:x:1000:nobody" >> /etc/group # chown -Rv nobody . # su-tools nobody -s /bin/bash -c "make RUN_EXPENSIVE_TESTS=yes check" # 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 # mv -v /usr/bin/{head,sleep,nice} /bin |
6.25. Iana-Etc-2.30
1 2 3 4 5 6 |
# cd /sources/ # tar xfvj iana-etc-2.30.tar.bz2 # cd iana-etc-2.30 # make # make install # history |
6.26. M4-1.4.16
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # rm -rf m4-1.4.16 # tar xfvj m4-1.4.16.tar.bz2 # cd m4-1.4.16 # ./configure --prefix=/usr # make # sed -i -e '41s/ENOENT/& || errno == EINVAL/' tests/test-readlink.h # make check # make install |
6.27. Bison-2.5
1 2 3 4 5 6 7 8 |
# cd /sources/ # tar xfvj bison-2.5.tar.bz2 # cd bison-2.5 # ./configure --prefix=/usr # echo '#define YYENABLE_NLS 1' >> lib/config.h # make # make check # make install |
6.28. Procps-3.2.8
1 2 3 4 5 6 7 8 |
# cd /sources/ # tar xfvz procps-3.2.8.tar.gz # cd procps-3.2.8 # patch -Np1 -i ../procps-3.2.8-fix_HZ_errors-1.patch # patch -Np1 -i ../procps-3.2.8-watch_unicode-1.patch # sed -i -e 's@\*/module.mk@proc/module.mk ps/module.mk@' Makefile # make # make install |
6.29. Grep-2.10
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # rm -rf grep-2.10 # tar xfvJ grep-2.10.tar.xz # cd grep-2.10 # sed -i 's/cp/#&/' tests/unibyte-bracket-expr # ./configure --prefix=/usr --bindir=/bin # make # make check # make install |
6.30. Readline-6.2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# cd /sources/ # tar xfvz readline-6.2.tar.gz # cd readline-6.2 # sed -i '/MV.*old/d' Makefile.in # sed -i '/{OLDSUFF}/c:' support/shlib-install # patch -Np1 -i ../readline-6.2-fixes-1.patch # ./configure --prefix=/usr --libdir=/lib # make SHLIB_LIBS=-lncurses # make install # mv -v /lib/lib{readline,history}.a /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 |
6.31. Bash-4.2
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # rm -rf bash-4.2 # tar xfvz bash-4.2.tar.gz # cd bash-4.2 # patch -Np1 -i ../bash-4.2-fixes-4.patch # ./configure --prefix=/usr --bindir=/bin --htmldir=/usr/share/doc/bash-4.2 --without-bash-malloc --with-installed-readline # make # chown -Rv nobody . # su-tools nobody -s /bin/bash -c "make tests" # make install |
入る。
1 |
# exec /bin/bash --login +h |
6.32. Libtool-2.4.2
1 2 3 4 5 6 7 |
# cd /sources/ # tar xfvz libtool-2.4.2.tar.gz # cd libtool-2.4.2 # ./configure --prefix=/usr # make # make check # make install |
6.33. GDBM-1.10
1 2 3 4 5 6 7 |
# cd /sources/ # tar xfvz gdbm-1.10.tar.gz # cd gdbm-1.10 # ./configure --prefix=/usr --enable-libgdbm-compat # make # make check # make install |
6.34. Inetutils-1.9.1
1 2 3 4 5 6 7 8 9 10 11 |
# cd /sources/ # tar xfvz inetutils-1.9.1.tar.gz # cd inetutils-1.9.1 # ./configure --prefix=/usr --libexecdir=/usr/sbin --localstatedir=/var --disable-ifconfig --disable-logger --disable-syslogd --disable-whois --disable-servers # make # make check # make install # make -C doc html # make -C doc install-html docdir=/usr/share/doc/inetutils-1.9.1 # mv -v /usr/bin/{hostname,ping,ping6} /bin # mv -v /usr/bin/traceroute /sbin |
6.35. Perl-5.14.2
1 2 3 4 5 6 7 8 9 10 11 |
# cd /sources/ # rm -rf perl-5.14.2 # tar xfvj perl-5.14.2.tar.bz2 # cd perl-5.14.2 # echo "127.0.0.1 localhost $(hostname)" > /etc/hosts # patch -Np1 -i ../perl-5.14.2-security_fix-1.patch # 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 # sh Configure -des -Dprefix=/usr -Dvendorprefix=/usr -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dpager="/usr/bin/less -isR" -Duseshrplib # make # make test # make install |
6.36. Autoconf-2.68
1 2 3 4 5 6 7 8 |
# cd /sources/ # tar xfvz autoconf-2.68.tar.bz2 # tar xfvj autoconf-2.68.tar.bz2 # cd autoconf-2.68 # ./configure --prefix=/usr # make # make check # make install |
6.37. Automake-1.11.3
1 2 3 4 5 |
# cd /sources/ # tar xfvJ automake-1.11.3.tar.xz # cd automake-1.11.3 # ./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.11.3 # make |
checkがすごく時間かかる。エラーなのかも良く分からないし直す気もないのでスルー
1 2 3 4 5 6 7 8 9 10 |
# make check ======================================================== All 842 tests behaved as expected (10 expected failures) (96 tests were not run) ======================================================== make[3]: Leaving directory `/sources/automake-1.11.3/tests' make[2]: Leaving directory `/sources/automake-1.11.3/tests' make[1]: Leaving directory `/sources/automake-1.11.3/tests' root:/sources/automake-1.11.3# # make install |
6.38. Diffutils-3.2
1 2 3 4 5 6 7 8 |
# cd /sources/ # rm -rf diffutils-3.2 # tar xfvz diffutils-3.2.tar.gz # cd diffutils-3.2 # ./configure --prefix=/usr # make # make check # make install |
6.39. Gawk-4.0.0
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # rm -rf gawk-4.0.0 # tar xfvj gawk-4.0.0.tar.bz2 # cd gawk-4.0.0 # ./configure --prefix=/usr --libexecdir=/usr/lib # make # make check # make install # mkdir -v /usr/share/doc/gawk-4.0.0 # cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-4.0.0 |
6.40. Findutils-4.4.2
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # rm -rf findutils-4.4.2 # tar xfvz findutils-4.4.2.tar.gz # cd findutils-4.4.2 # ./configure --prefix=/usr --libexecdir=/usr/lib/findutils --localstatedir=/var/lib/locate # make # make check # make install # mv -v /usr/bin/find /bin # sed -i 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb |
6.41. Flex-2.5.35
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# cd /sources/ # tar xfvj flex-2.5.35.tar.bz2 # cd flex-2.5.35 # patch -Np1 -i ../flex-2.5.35-gcc44-1.patch # ./configure --prefix=/usr # make # make check # make install # ln -sv libfl.a /usr/lib/libl.a # cat > /usr/bin/lex << "EOF" exec /usr/bin/flex -l "$@" EOF # chmod -v 755 /usr/bin/lex # mkdir -v /usr/share/doc/flex-2.5.35 # cp -v doc/flex.pdf /usr/share/doc/flex-2.5.35 |
6.42. Gettext-0.18.1.1
checkは時間かかるらいのはもう省略。
1 2 3 4 5 6 7 |
# cd /sources/ # rm -rf gettext-0.18.1.1 # tar xfvz gettext-0.18.1.1.tar.gz # cd gettext-0.18.1.1 # ./configure --prefix=/usr --docdir=/usr/share/doc/gettext-0.18.1.1 # make # make install |
6.43. Groff-1.21
珍しいcppのパッケージ
1 2 3 4 5 6 7 8 |
# cd /sources/ # tar xfvz groff-1.21.tar.gz # cd groff-1.21 # PAGE=A4 ./configure --prefix=/usr # make # make install # ln -sv eqn /usr/bin/geqn # ln -sv tbl /usr/bin/gtbl |
6.44. Xz-5.0.3
1 2 3 4 5 6 7 8 |
# cd /sources/ # rm -rf xz-5.0.3 # tar xfvj xz-5.0.3.tar.bz2 # cd xz-5.0.3 # ./configure --prefix=/usr --libdir=/lib --docdir=/usr/share/doc/xz-5.0.3 # make # make check # make pkgconfigdir=/usr/lib/pkgconfig install |
6.45. GRUB-1.99
1 2 3 4 5 6 |
# cd /sources/ # tar xfvz grub-1.99.tar.gz # cd grub-1.99 # ./configure --prefix=/usr --sysconfdir=/etc --disable-grub-emu-usb --disable-efiemu --disable-werror # make # make install |
6.46. Gzip-1.4
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # rm -rf gzip-1.4 # tar xfvz gzip-1.4.tar.gz # cd gzip-1.4 # ./configure --prefix=/usr --bindir=/bin # make # make check # make install # mv -v /bin/{gzexe,uncompress,zcmp,zdiff,zegrep} /usr/bin # mv -v /bin/{zfgrep,zforce,zgrep,zless,zmore,znew} /usr/bin |
6.47. IPRoute2-3.2.0
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # tar xfvJ iproute2-3.2.0.tar.xz # cd iproute2-3.2.0 # sed -i '/^TARGETS/s@arpd@@g' misc/Makefile # sed -i /ARPD/d Makefile # rm man/man8/arpd.8 # sed -i -e '/netlink\//d' ip/ipl2tp.c # make DESTDIR= # make DESTDIR= MANDIR=/usr/share/man DOCDIR=/usr/share/doc/iproute2-3.2.0 install |
6.48. Kbd-1.15.2
1 2 3 4 5 6 7 8 9 10 |
# cd /sources/ # tar xfvz kbd-1.15.2.tar.gz # cd kbd-1.15.2 # patch -Np1 -i ../kbd-1.15.2-backspace-1.patch # ./configure --prefix=/usr --datadir=/lib/kbd # make # make install # mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin # mkdir -v /usr/share/doc/kbd-1.15.2 # cp -R -v doc/* /usr/share/doc/kbd-1.15.2 |
6.49. Kmod-5
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # tar xfvJ kmod-5.tar.xz # cd kmod-5 # liblzma_CFLAGS="-I/usr/include" liblzma_LIBS="-L/lib -llzma" zlib_CFLAGS="-I/usr/include" zlib_LIBS="-L/lib -lz" ./configure --prefix=/usr --bindir=/bin --libdir=/lib --sysconfdir=/etc --with-xz --with-zlib # make # make check # 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 |
6.50. Less-444
1 2 3 4 5 6 |
# cd /sources/ # tar xfvz less-444.tar.gz # cd less-444 # ./configure --prefix=/usr --sysconfdir=/etc # make # make install |
6.51. Libpipeline-1.2.0
1 2 3 4 5 6 7 |
# cd /sources/ # tar xfvz libpipeline-1.2.0.tar.gz # cd libpipeline-1.2.0 # ./configure CHECK_CFLAGS=-I/tools/include CHECK_LIBS="-L/tools/lib -lcheck" --prefix=/usr # make # make check # make install |
6.52. Make-3.82
1 2 3 4 5 6 7 8 |
# cd /sources/ # rm -rf make-3.82 # tar xfvj make-3.82.tar.bz2 # cd make-3.82 # ./configure --prefix=/usr # make # make check # make install |
6.53. Man-DB-2.6.1
1 2 3 4 5 6 7 |
# cd /sources/ # tar xfvz man-db-2.6.1.tar.gz # cd man-db-2.6.1 # PKG_CONFIG=/tools/bin/true libpipeline_CFLAGS='' libpipeline_LIBS='-lpipeline' ./configure --prefix=/usr --libexecdir=/usr/lib --docdir=/usr/share/doc/man-db-2.6.1 --sysconfdir=/etc --disable-setuid --with-browser=/usr/bin/lynx --with-vgrind=/usr/bin/vgrind --with-grap=/usr/bin/grap # make # make check # make install |
6.54. Patch-2.6.1
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # rm -rf patch-2.6.1 # tar xfvj patch-2.6.1.tar.bz2 # cd patch-2.6.1 # patch -Np1 -i ../patch-2.6.1-test_fix-1.patch # ./configure --prefix=/usr # make # make check # make install |
6.55. Shadow-4.1.5
1 2 3 4 5 6 7 8 9 10 11 |
# cd /sources/ # tar xfvj shadow-4.1.5.tar.bz2 # cd shadow-4.1.5 # patch -Np1 -i ../shadow-4.1.5-nscd-1.patch # sed -i 's/groups$(EXEEXT) //' src/Makefile.in # find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; # sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' -e 's@/var/spool/mail@/var/mail@' etc/login.defs # ./configure --sysconfdir=/etc # make # make install # mv -v /usr/bin/passwd /bin |
shadowedパスワードを有効にする。
ルートパスワード設定
1 2 3 4 5 6 7 8 9 10 11 |
# passwd root Changing password for root Enter the new password (minimum of 5 characters) Please use a combination of upper and lower case letters and numbers. New password: Bad password: too simple. Warning: weak password (enter it again to use it anyway). New password: Re-enter new password: passwd: password changed. # |
6.56. Sysklogd-1.5
1 2 3 4 5 6 |
# cd /sources/ # tar xfvz sysklogd-1.5.tar.gz # cd sysklogd-1.5 # make # make BINDIR=/sbin install # history |
設定
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# 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 # |
6.57. Sysvinit-2.88dsf
1 2 3 4 5 6 7 |
# cd /sources/ # tar xfvj sysvinit-2.88dsf.tar.bz2 # cd sysvinit-2.88dsf # sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c # 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 |
6.58. Tar-1.26
1 2 3 4 5 6 7 8 |
# cd /sources/ # rm -rf tar-1.26 # tar xfvj tar-1.26.tar.bz2 # cd tar-1.26 # FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin # make # make install # make -C doc install-html docdir=/usr/share/doc/tar-1.26 |
6.59. Texinfo-4.13a
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # rm -rf texinfo-4.13 # tar xfvz texinfo-4.13a.tar.gz # cd texinfo-4.13 # ./configure --prefix=/usr # make # make check # make install # make TEXMF=/usr/share/texmf install-tex |
6.60. Udev-181
LFSようのファイルもインストールする。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# cd /sources/ # tar xfvJ udev-181.tar.xz # cd udev-181 # tar -xvf ../udev-config-20100128.tar.bz2 # install -dv /lib/{firmware,udev/devices/pts} # mknod -m0666 /lib/udev/devices/null c 1 3 # BLKID_CFLAGS="-I/usr/include/blkid" BLKID_LIBS="-L/lib -lblkid" KMOD_CFLAGS="-I/usr/include" KMOD_LIBS="-L/lib -lkmod" ./configure --prefix=/usr --with-rootprefix='' --bindir=/sbin --sysconfdir=/etc --libexecdir=/lib --enable-rule_generator --disable-introspection --disable-keymap --disable-gudev --with-usb-ids-path=no --with-pci-ids-path=no --with-systemdsystemunitdir=no # make # make check # make install # rmdir -v /usr/share/doc/udev # cd udev-config-20100128 # make install # make install-doc |
6.61.1. Installation of Vim
テストが面白い。
1 2 3 4 5 6 7 8 9 |
# cd /sources/ # tar xfvj vim-7.3.tar.bz2 # cd vim # cd vim73/ # echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h # ./configure --prefix=/usr --enable-multibyte # make # make test # make install |
Vimの設定
1 2 3 4 5 6 7 8 9 10 11 |
# 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 # |
つづく