Package: base-config Version: 2.08 Severity: important Tags: patch I've already sent a patch to debian-boot, but alioth continues down. This bug report for recording.
This bug is critical rather than important, but I record this as important first. Current base-config is unusable for Japanese, Korean, Chinese, Russian or any other who uses special terminal. Second stage will fill screen with unreadable glyph. Bad. This is caused by two factor. A. 2nd stage doesn't provide Framebuffer and terminal check routine is corrupted, so special terminal (I recommend jfbterm) can't be used. B. Moreover base-config don't do language fall back to English for them, so unreadable glyph comes (it means symbol or control characters are used. Of course this is unreadable and unmeaningful). This patch fixes: 1. unset_lang_language unset LANG and LANGUAGES, but need to unset LC_ALL (and maybe ENCODING) also. 2. prebaseconfig.udeb removed for inserting FB module. As Pere said, base-config should cover it only if LANG needs (try_load_fb). 3. WRAPPER check routine is broken. New variable, WRAPPER_OPTION is needed (Bug#225865). 4. When WRAPPER goes fail, LANGs which use special terminal should unset its LANG (fall back to English). 5. Fix typo (small, but very critical) in jfbterm launch routine of Japanese. --- termwrap.old 2003-12-19 05:01:52.000000000 +0900 +++ termwrap 2004-01-02 19:33:24.000000000 +0900 @@ -66,6 +66,8 @@ if [ "$LANG" ] ; then warning "Disabling unsupported locale '$LANG'." unset LANG + unset LC_ALL + unset ENCODING fi if [ "$LANGUAGE" ] ; then warning "Disabling unsupported language list '$LANGUAGE'." @@ -92,6 +94,11 @@ esac } +try_load_fb() { + # Load framebuffer module + modprobe -q vesafb || modprobe -q vga16fb || true +} + ###################################################################### ## Generate the locale data files if missing ###################################################################### @@ -217,6 +224,7 @@ ## Select suitable terminal as wrapper. ###################################################################### WRAPPER="" +WRAPPER_OPTION="" # For this to work, the current locale must be valid. The block # generating the locale should have taken care of that. If it isn't @@ -246,19 +254,58 @@ case $TERMINAL in x) #WRAPPER="/usr/X11R6/bin/kterm -e" - WRAPPER="/usr/X11R6/bin/krxvt -e" + WRAPPER="/usr/X11R6/bin/krxvt" + WRAPPER_OPTION="-e" ;; console) if [ "$SUBARCH" != pc9800 -a "$TERMINAL" = console ]; then # Any platform except PC9800 require jfbterm # to display japanese fonts on console. - WRAPPER="/usr/bin/jfbterm -c other,EUC-JP,iconv.UTF-8 -e" + try_load_fb + WRAPPER="/usr/bin/jfbterm" + WRAPPER_OPTION="-q -c other,EUC-JP,iconv,UTF-8 -e" fi ;; # On pseudo and serial, we can't tell # if the terminal can display japanese fonts... esac ;; +eucKR|euc-KR) + case $TERMINAL in + console) + try_load_fb + WRAPPER="/usr/bin/jfbterm" + WRAPPER_OPTION="-q -c other,EUC-KR,iconv,UTF-8 -e" + ;; + esac + ;; +zh_CN|GB2312) + case $TERMINAL in + console) + try_load_fb + WRAPPER="/usr/bin/jfbterm" + WRAPPER_OPTION="-q -c other,GB2312,iconv,UTF-8 -e" + ;; + esac + ;; +zh_TW|BIG5) + case $TERMINAL in + console) + try_load_fb + WRAPPER="/usr/bin/jfbterm" + WRAPPER_OPTION="-q -c other,BIG5,iconv,UTF-8 -e" + ;; + esac + ;; +KOI8-R) + case $TERMINAL in + console) + try_load_fb + WRAPPER="/usr/bin/jfbterm" + WRAPPER_OPTION="-q -c other,KOI8-R,iconv,UTF-8 -e" + ;; + esac + ;; UTF-8) # Enable UTF-8 in console if [ "$TERMINAL" = console ] ; then @@ -284,7 +331,17 @@ ## Execute Wrapper. ###################################################################### if [ ! -z "$WRAPPER" -a -x "$WRAPPER" ]; then - $WRAPPER /bin/true && exec $WRAPPER $@ + $WRAPPER $WRAPPER_OPTION /bin/true && exec $WRAPPER $WRAPPER_OPTION $@ + + case $ENCODING in + eucJP|EUC-JP|ujis|EUC-KR|zh_CN|zh_TW|KOI8-R) + # Unset LANG + unset_lang_language + ;; + *) + # Nothing to do + ;; + esac fi $@ @@ -305,7 +362,7 @@ # Unload ISO-8859-15 charset mapping, by loading ISO-8859-1 instead try_load_charset "$ENCODING" iso01 ;; -eucJP|EUC-JP|ujis) +eucJP|EUC-JP|ujis|EUC-KR|zh_CN|zh_TW|KOI8-R) # Nothing to do, using wrapper error "Should never end up here when using '$ENCODING'" ;;
pgp00000.pgp
Description: PGP signature