man-db

Alexander E. Patrakov patrakov at ums.usu.ru
Tue Jul 19 09:21:14 PDT 2005


The attachment is a patch against the last revision of the utf8 branch 
before Makefile reorganization. This patch updates the versions of 
toolchain packages (you have to "svn cp" the supported_locales glibc 
patch to 2.3.5, somehow this didn't show up in the "svn diff" output), 
switches from GNU Groff-1.19.1 to Debian Groff-1.18.1.1-8, adds gdbm and 
replaces man with man-db (the executable file which displays manual 
pages is still /usr/bin/man).

The changes to groff and man setup are needed so that the user can view 
any manual page in any locale without any configuration. gdbm is needed 
because man-db depends on either gdbm or db. If you prefer me to 
resurrect db instead, I will do that.

I have not committed that just because I think that reorganizing 
Makefiles in the utf8 branch right now was a mistake, but I won't undo 
Jeremy's changes in that branch without his permission.

-- 
Alexander E. Patrakov
-------------- next part --------------
Index: BUGS
===================================================================
--- BUGS	(revision 354)
+++ BUGS	(working copy)
@@ -6,6 +6,7 @@
     strfmon():     Verify this function replaces conversion specifier i
                    with the double argument is formatted according to
 		   the locale's international currency format.
+  TODO: recheck that for glibc-2.3.5
 
 Coreutils:
   /usr/bin/who -Hu header doesn't align with the main table contents in
@@ -18,13 +19,6 @@
   There is a kernel patch that is supposed to circument this limitation, but it
   reliably causes kernel panic on my system. Thus, WONTFIX.
 
-groff/man:
-  Downgrading to debian-patched groff-1.18.1.1 and man-db saves a lot of
-  trouble when displaying non-ISO-8859-1 manual pages. TODO: remove all
-  non-ISO-8859-1 manual pages from the CD, since they require nontrivial
-  configuration of man. Strictly speaking, non-ISO-8859-1 manual pages
-  are not a valid groff input (read: big hack).
-
 texinfo:
   In UTF-8 locales, translations are deliberately disabled by patch.
   Please don't report that as a bug. Without this patch, the status line
@@ -38,7 +32,8 @@
 nano:
   Stable versions of nano don't support UTF-8. Fixed by installing the
   development version. This package will be removed after a single bug
-  report in non-UTF-8 locale without a known fix.
+  report in non-UTF-8 locale without a known fix. (it exited unexpectedly
+  once when I resized the terminal, but I can't reproduce that)
 
 zip/unzip:
   These packages assume ISO-8859-1 as the character set for UNIX and CP850
@@ -49,7 +44,7 @@
   WONTFIX. Package installed only because other packages build-depend on it.
 
 curl:
-  Built without libidn.
+  Built without libidn (this is not the same as glibc libidn add-on).
 
 lynx:
   truncates text in the header and the status line prematurely (uses byte count
Index: Makefile
===================================================================
--- Makefile	(revision 354)
+++ Makefile	(working copy)
@@ -174,8 +174,8 @@
 	ch-readline ch-m4 ch-bison ch-less ch-groff ch-sed ch-flex ch-gettext ch-inetutils \
 	ch-iproute2 ch-perl ch-texinfo ch-autoconf ch-automake ch-bash
 
-post-bash: ch-file ch-libtool ch-bzip2 ch-diffutils ch-kbd ch-e2fsprogs ch-grep ch-grub ch-gzip \
-	ch-hotplug ch-man ch-make ch-module-init-tools ch-patch ch-procps ch-psmisc ch-shadow \
+post-bash: ch-file ch-libtool ch-bzip2 ch-diffutils ch-kbd ch-e2fsprogs ch-gdbm ch-grep ch-grub ch-gzip \
+	ch-hotplug ch-man-db ch-make ch-module-init-tools ch-patch ch-procps ch-psmisc ch-shadow \
 	ch-sysklogd ch-sysvinit ch-tar ch-udev ch-util-linux ch-environment
 
 blfs: ch-openssl ch-wget ch-reiserfsprogs ch-xfsprogs ch-nano ch-joe ch-screen ch-curl ch-zip \
@@ -496,6 +496,10 @@
 	make -C $(PKG)/$@ chroot
 	make unmount
 
+gdbm: prep-chroot
+	make -C $(PKG)/$@ chroot
+	make unmount
+
 diffutils: prep-chroot 
 	make -C $(PKG)/$@ chroot
 	make unmount
@@ -524,7 +528,7 @@
 	make -C $(PKG)/$@ chroot
 	make unmount
 
-man: prep-chroot 
+man-db: prep-chroot 
 	make -C $(PKG)/$@ chroot
 	make unmount
 
@@ -1111,6 +1115,9 @@
 ch-bzip2: popdev
 	make -C $(PKG)/bzip2 stage2
 
+ch-gdbm: popdev
+	make -C $(PKG)/gdbm stage2
+
 ch-diffutils: popdev
 	make -C $(PKG)/diffutils stage2
 
@@ -1132,8 +1139,8 @@
 ch-hotplug: popdev
 	make -C $(PKG)/hotplug stage2
 
-ch-man: popdev
-	make -C $(PKG)/man stage2
+ch-man-db: popdev
+	make -C $(PKG)/man-db stage2
 
 ch-make: popdev
 	make -C $(PKG)/make stage2
Index: packages/gcc/Makefile
===================================================================
--- packages/gcc/Makefile	(revision 354)
+++ packages/gcc/Makefile	(working copy)
@@ -2,7 +2,7 @@
 
 # Package versions
 NM= gcc
-VRS= 3.4.3
+VRS= 3.4.4
 DIR= $(NM)-$(VRS)
 FILE= $(NM)-$(VRS).tar.bz2
 PATCH1= $(NM)-$(VRS)-no_fixincludes-1.patch
Index: packages/binutils/Makefile
===================================================================
--- packages/binutils/Makefile	(revision 354)
+++ packages/binutils/Makefile	(working copy)
@@ -2,7 +2,7 @@
 
 # Package versions
 NM= binutils
-VRS= 2.15.94.0.2.2
+VRS= 2.16.1
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.bz2
 URL= $(HTTP)/$(NM)/$(FILE)
Index: packages/gdbm/Makefile
===================================================================
--- packages/gdbm/Makefile	(revision 0)
+++ packages/gdbm/Makefile	(revision 0)
@@ -0,0 +1,27 @@
+# gdbm Makefile
+
+# Package versions
+NM= gdbm
+VRS= 1.8.3
+DIR= $(NM)-$(VRS)
+FILE= $(DIR).tar.gz
+URL= http://ftp.gnu.org/gnu/$(NM)/$(FILE)
+
+# RULES
+
+.PHONY: clean chroot stage2
+
+chroot:
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
+
+stage2:
+	@echo""
+	@echo "=====> Building $(NM) in chroot"
+	@echo""
+	@if [ ! -f $(FILE) ] ; then $(WGET) $(URL) ; fi
+	@if [ ! -f /usr/lib/libgdbm.a ] ; then unpack $(FILE) && cd $(DIR) && \
+	 ./configure --prefix=/usr && make -j3 && make BINOWN=root BINGRP=root install install-compat ; fi
+	@make clean
+
+clean:
+	@-rm -rf $(DIR)
Index: packages/glibc/glibc-2.3.4-dont_test_installation-1.patch
===================================================================
--- packages/glibc/glibc-2.3.4-dont_test_installation-1.patch	(revision 354)
+++ packages/glibc/glibc-2.3.4-dont_test_installation-1.patch	(working copy)
@@ -1,21 +0,0 @@
-Submitted by: Alexander E. Patrakov
-Date: 2005-07-07
-Initial Package Version: 2.3.4
-Upstream Status: Not Submitted
-Origin: Alexander E. Patrakov
-Description: Don't run test-installation.pl because it is meaningless in LFS.
-It tests Ch5 glibc, not Ch6, because toolchain specs still point to the old
-glibc. And, in fact, the interpreter of the test program is
-/tools/lib/ld-linux.so.2.
-
---- glibc-2.3.4/Makefile.bak	2005-07-07 12:46:48.872805336 +0600
-+++ glibc-2.3.4/Makefile	2005-07-07 12:50:22.955259856 +0600
-@@ -120,7 +120,7 @@
- ifneq (no,$(PERL))
- ifeq (/usr,$(prefix))
- ifeq (,$(install_root))
--	CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx)
-+	echo "Don't forget to re-adjust the toolchain now to point to this glibc."
- endif
- endif
- endif
Index: packages/glibc/glibc-2.3.4-supported_locales-1.patch
===================================================================
--- packages/glibc/glibc-2.3.4-supported_locales-1.patch	(revision 354)
+++ packages/glibc/glibc-2.3.4-supported_locales-1.patch	(working copy)
@@ -1,81 +0,0 @@
-Submitted by: Alexander E. Patrakov
-Date: 2005-07-07
-Initial Package Version: 2.3.4
-Upstream Status: Not Submitted
-Origin: Combined RedHat, ALT Linux and Debian changes
-Description: Alters the list of supported locales
-
-Adds some ISO-8859-15 locales (RedHat)
-Adds ru_RU.CP1251 for Windows compatibility (ALT Linux)
-Changes "russian" alias to point to the de-facto ru_RU.KOI8-R standard (Debian)
-Drops obsolete no_NO alias because it doesn't work (RedHat has a fix)
-Drops vi_VN.TCVN because it causes 100% CPU consumption in bash (bash bug?)
-
---- glibc-2.3.4/localedata/SUPPORTED	2005-07-07 11:19:49.218313432 +0600
-+++ glibc-2.3.4/localedata/SUPPORTED	2005-07-07 11:24:56.235639704 +0600
-@@ -63,6 +63,7 @@
- cy_GB/ISO-8859-14 \
- da_DK.UTF-8/UTF-8 \
- da_DK/ISO-8859-1 \
-+da_DK.ISO-8859-15/ISO-8859-15 \
- de_AT.UTF-8/UTF-8 \
- de_AT/ISO-8859-1 \
- de_AT at euro/ISO-8859-15 \
-@@ -89,6 +90,7 @@
- en_DK/ISO-8859-1 \
- en_GB.UTF-8/UTF-8 \
- en_GB/ISO-8859-1 \
-+en_GB.ISO-8859-15/ISO-8859-15 \
- en_HK.UTF-8/UTF-8 \
- en_HK/ISO-8859-1 \
- en_IE.UTF-8/UTF-8 \
-@@ -103,6 +105,7 @@
- en_SG/ISO-8859-1 \
- en_US.UTF-8/UTF-8 \
- en_US/ISO-8859-1 \
-+en_US.ISO-8859-15/ISO-8859-15 \
- en_ZA.UTF-8/UTF-8 \
- en_ZA/ISO-8859-1 \
- en_ZW.UTF-8/UTF-8 \
-@@ -257,6 +260,7 @@
- ro_RO.UTF-8/UTF-8 \
- ro_RO/ISO-8859-2 \
- ru_RU.KOI8-R/KOI8-R \
-+ru_RU.CP1251/CP1251 \
- ru_RU.UTF-8/UTF-8 \
- ru_RU/ISO-8859-5 \
- ru_UA.UTF-8/UTF-8 \
-@@ -280,6 +284,7 @@
- sv_FI at euro/ISO-8859-15 \
- sv_SE.UTF-8/UTF-8 \
- sv_SE/ISO-8859-1 \
-+sv_SE.ISO-8859-15/ISO-8859-15 \
- ta_IN/UTF-8 \
- te_IN/UTF-8 \
- tg_TJ/KOI8-T \
-@@ -297,7 +302,6 @@
- ur_PK/UTF-8 \
- uz_UZ/ISO-8859-1 \
- uz_UZ at cyrillic/UTF-8 \
--vi_VN.TCVN/TCVN5712-1 \
- vi_VN/UTF-8 \
- wa_BE/ISO-8859-1 \
- wa_BE at euro/ISO-8859-15 \
---- glibc-2.3.4/intl/locale.alias	2005-07-07 11:27:25.729913120 +0600
-+++ glibc-2.3.4/intl/locale.alias	2005-07-07 11:28:04.749981168 +0600
-@@ -58,14 +58,12 @@
- korean.euc 	ko_KR.eucKR
- ko_KR		ko_KR.eucKR
- lithuanian      lt_LT.ISO-8859-13
--no_NO		nb_NO.ISO-8859-1
--no_NO.ISO-8859-1 nb_NO.ISO-8859-1
- norwegian       nb_NO.ISO-8859-1
- nynorsk		nn_NO.ISO-8859-1
- polish          pl_PL.ISO-8859-2
- portuguese      pt_PT.ISO-8859-1
- romanian        ro_RO.ISO-8859-2
--russian         ru_RU.ISO-8859-5
-+russian         ru_RU.KOI8-R
- slovak          sk_SK.ISO-8859-2
- slovene         sl_SI.ISO-8859-2
- slovenian       sl_SI.ISO-8859-2
Index: packages/glibc/Makefile
===================================================================
--- packages/glibc/Makefile	(revision 354)
+++ packages/glibc/Makefile	(working copy)
@@ -2,17 +2,16 @@
 
 # Package versions
 NM= glibc
-VRS= 2.3.4
+VRS= 2.3.5
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.bz2
 FILE1= $(NM)-linuxthreads-$(VRS).tar.bz2
 FILE2= $(NM)-libidn-$(VRS).tar.bz2
 URL= $(HTTP)/$(NM)/$(FILE)
-URL1= $(HTTP)/$(NM)/$(FILE1)
+URL1= http://ftp.gnu.org/gnu/$(NM)/$(FILE1)
 URL2= http://ftp.gnu.org/gnu/$(NM)/$(FILE2)
 
 PATCH2= $(DIR)-supported_locales-1.patch
-PATCH3= $(DIR)-dont_test_installation-1.patch
 
 # RULES
 
@@ -24,9 +23,12 @@
 	@echo ""
 	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
 	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(SRC)/$(FILE2) ] ; then $(WGET) $(URL2) && \
+	 mv $(FILE2) $(SRC) ; fi
 	@if [ ! -f $(WD)/bin/ldd ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
+	 unpack $(SRC)/$(FILE2) && \
 	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
-	 ../$(DIR)/configure --prefix=$(WD) --disable-profile --enable-add-ons=nptl --enable-kernel=2.6.0 \
+	 ../$(DIR)/configure --prefix=$(WD) --disable-profile --enable-add-ons=nptl,libidn --enable-kernel=2.6.0 \
 	 --with-binutils=$(WD)/bin --without-gd --without-cvs --with-headers=$(WD)/include --disable-selinux && \
 	 PARALLELMFLAGS=-j3 make && if [ ! -d $(WD)/etc ] ; then mkdir $(WD)/etc ; fi && \
 	 touch $(WD)/etc/ld.so.conf && make install $ ; fi
@@ -47,7 +49,7 @@
 	 mv $(FILE2) $(SRC) ; fi
 	@if [ ! -f /usr/bin/ldd ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
 	 unpack $(SRC)/$(FILE1) && unpack $(SRC)/$(FILE2) && \
-	 patch -Np1 -i ../$(PATCH2) && patch -Np1 -i ../$(PATCH3) && \
+	 patch -Np1 -i ../$(PATCH2) && \
 	 mkdir ../$(NM)-build && cd ../$(NM)-build && \
 	 ../$(DIR)/configure --prefix=/usr --disable-profile --enable-add-ons=nptl,libidn --enable-kernel=2.6.0 \
 	 --without-cvs --libexecdir=/usr/lib/glibc && \
Index: packages/man-db/Makefile
===================================================================
--- packages/man-db/Makefile	(revision 0)
+++ packages/man-db/Makefile	(revision 0)
@@ -0,0 +1,42 @@
+# man-db Makefile
+# XXX unsatisfied optional deps: col (from util-linux), lynx
+# XXX thus "man -H 5 passwd" doesn't work.
+# Package versions
+NM= man-db
+VRS= 2.4.3
+DIR= $(NM)-$(VRS)
+FILE= $(DIR).tar.gz
+URL= http://savannah.nongnu.org/download/$(NM)/$(FILE)
+
+# RULES
+
+.PHONY: clean chroot stage2
+
+chroot:
+	@chroot "$(MP)" $(chenv2) 'cd $(ROOT) && make ch-$(NM) $(chbash2)'
+
+stage2:
+	@echo""
+	@echo "=====> Building $(NM) in chroot"
+	@echo""
+	@if [ ! -f $(FILE) ] ; then $(WGET) $(URL) ; fi
+	@if [ ! -f /usr/bin/man ] ; then unpack $(FILE) && cd $(DIR) && \
+	 echo Adjusting the installation path for translated manual pages... && \
+	 mv man/de{_DE.88591,} && \
+	 mv man/es{_ES.88591,} && \
+	 mv man/it{_IT.88591,} && \
+	 mv man/ja{_JP.eucJP,} && \
+	 sed -i.bak 's,\*_\*,??,'  man/Makefile.in && \
+	 echo Done. && \
+	 echo '#define WEB_BROWSER "exec /usr/bin/lynx"' >>include/manconfig.h.in && \
+	 echo '#define COL "/usr/bin/col"' >>include/manconfig.h.in && \
+	 echo '#define VGRIND "/usr/bin/vgrind"' >>include/manconfig.h.in && \
+	 echo '#define GRAP "/usr/bin/grap"' >>include/manconfig.h.in && \
+	 sed -i '/\t\/usr\/man/d' src/man_db.conf.in && \
+	 ./configure --prefix=/usr --enable-mb-groff \
+	     --disable-setuid && \
+	 make -j3 && make install ; fi
+	@make clean
+
+clean:
+	@-rm -rf $(DIR)
Index: packages/groff/groff-1.19.1-force_ascii-1.patch
===================================================================
--- packages/groff/groff-1.19.1-force_ascii-1.patch	(revision 354)
+++ packages/groff/groff-1.19.1-force_ascii-1.patch	(working copy)
@@ -1,69 +0,0 @@
-Submitted By: Alexander E. Patrakov
-Date: 2005-07-14
-Initial Package Version: 1.19.1
-Upstream Status: Not submitted, hack
-Origin: Alexander E. Patrakov
-Depends: texinfo-4.8-multibyte-1.patch
-Description: Prevents non-ASCII characters from entering the "info" program
-in multibyte locales since "info" miscalculates their width. Patched "info"
-sets both LC_ALL and LANGUAGE to "C" in such locales when calling "man".
-
-diff -ur groff-1.19.1.orig/src/roff/nroff/nroff.sh groff-1.19.1/src/roff/nroff/nroff.sh
---- groff-1.19.1.orig/src/roff/nroff/nroff.sh	2004-04-06 20:10:32.000000000 +0600
-+++ groff-1.19.1/src/roff/nroff/nroff.sh	2005-07-14 14:26:26.339777584 +0600
-@@ -3,35 +3,16 @@
- 
- prog="$0"
- # Default device.
--# First try the "locale charmap" command, because it's most reliable.
--# On systems where it doesn't exist, look at the environment variables.
-+# This works only for ISO-8859-1 encoded manual pages.
- case "`exec 2>/dev/null ; locale charmap`" in
-   UTF-8)
-     T=-Tutf8 ;;
--  ISO-8859-1)
-+  ISO-8859-1 | ISO-8859-15)
-     T=-Tlatin1 ;;
-   IBM-1047)
-     T=-Tcp1047 ;;
-   *)
--    case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
--      *.UTF-8)
--        T=-Tutf8 ;;
--      iso_8859_1 | *.ISO-8859-1)
--        T=-Tlatin1 ;;
--      *.IBM-1047)
--        T=-Tcp1047 ;;
--      *)
--        case "$LESSCHARSET" in
--          utf-8)
--            T=-Tutf8 ;;
--          latin1)
--            T=-Tlatin1 ;;
--          cp1047)
--            T=-Tcp1047 ;;
--          *)
--            T=-Tascii ;;
--          esac ;;
--     esac ;;
-+    T=-Tascii ;;
- esac
- opts=
- 
-@@ -84,6 +65,16 @@
-   shift
- done
- 
-+# LFS-specific hack, so that non-ascii characters are never sent to "info"
-+# in multibyte locales
-+# Depends upon texinfo-4.8-multibyte-1.patch
-+
-+if [ "$LANGUAGE" = "C" ] && [ $"LANG" = "C" ] && [ "$LC_ALL" = "C" ]
-+then
-+  # Override user-supplied -T option, if any
-+  T=-Tascii
-+fi
-+
- # Set up the `GROFF_BIN_PATH' variable
- # to be exported in the current `GROFF_RUNTIME' environment.
- 
Index: packages/groff/Makefile
===================================================================
--- packages/groff/Makefile	(revision 354)
+++ packages/groff/Makefile	(working copy)
@@ -2,13 +2,18 @@
 
 # Package versions
 NM= groff
-# XXX: add Japanese and ascii8 patches. ascii8 exists only for groff-1.18.1.1
-VRS= 1.19.1
+# ascii8 and nippon devices exist only for groff-1.18.1.1 as a patch
+# rejected upstream.
+#
+# Do not upgrade this package before Debian does it!
+# http://bugs.debian.org/196762
+
+VRS= 1.18.1.1
 DIR= $(NM)-$(VRS)
 FILE= $(DIR).tar.bz2
-PATCH= $(DIR)-force_ascii-1.patch
+PATCH= groff_1.18.1.1-8.diff
 URL= $(HTTP)/$(NM)/$(FILE)
-
+URL1= http://ftp.debian.org/debian/pool/main/g/$(NM)/$(PATCH).gz
 # RULES
 
 .PHONY: clean chroot stage2
@@ -22,9 +27,13 @@
 	@echo ""
 	@if [ ! -f $(SRC)/$(FILE) ] ; then $(WGET) $(URL) && \
 	 mv $(FILE) $(SRC) ; fi
+	@if [ ! -f $(PATCH) ] ; then wget $(URL1) && gunzip $(PATCH).gz ; fi
 	@if [ ! -f /usr/bin/gtbl ] ; then unpack $(SRC)/$(FILE) && cd $(DIR) && \
 	 patch -Np1 -i ../$(PATCH) && \
-	 PAGE=$(pagesize) ./configure --prefix=/usr && make && make install && \
+	 sed -i 's,2010,002D,' font/devutf8/R.proto && \
+	 sed -i 's,2212,002D,' font/devutf8/R.proto && \
+	 PAGE=$(pagesize) ./configure --prefix=/usr --enable-multibyte && \
+	 make && make install && \
 	 ln -sf soelim /usr/bin/zsoelim && ln -sf eqn /usr/bin/geqn && \
 	 ln -sf tbl /usr/bin/gtbl ; fi
 	@make clean


More information about the livecd mailing list