Author: alexander
Date: 2007-01-19 09:05:59 -0700 (Fri, 19 Jan 2007)
New Revision: 6433
Modified:
trunk/BOOK/general.ent
trunk/BOOK/general/sysutils/mc.xml
trunk/BOOK/introduction/welcome/changelog.xml
Log:
Fixed UTF-8 issues and bash-3.2 compatibility in mc.
Modified: trunk/BOOK/general/sysutils/mc.xml
===================================================================
--- trunk/BOOK/general/sysutils/mc.xml 2007-01-19 05:06:26 UTC (rev 6432)
+++ trunk/BOOK/general/sysutils/mc.xml 2007-01-19 16:05:59 UTC (rev 6433)
@@ -35,17 +35,6 @@
making many frequent file operations more efficient and preserving the
full power of the command prompt.</para>
- <caution>
- <para>The <application>MC</application> package has major issues when
- used in a UTF-8 based locale because it assumes the characters are
- always one byte wide. See <ulink url="&files-anduin;/mc-bad.png">this
- screenshot</ulink> (taken in a ru_RU.UTF-8 locale).
- See the <ulink url="&blfs-wiki;/MC">MC Wiki</ulink> page for a way
- to work around these problems.
- For a general discussion of these types of issues, see
- the <xref linkend="locale-issues"/> page.</para>
- </caution>
-
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
@@ -68,17 +57,49 @@
</listitem>
</itemizedlist>
+ <bridgehead renderas="sect3">Additional Downloads</bridgehead>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para>Required patch: <ulink
+ url="&patch-root;/mc-&mc-version;-bash32-1.patch"/></para>
+ </listitem>
+ <listitem>
+ <para>Recommended Patch: <ulink
+ url="&patch-root;/mc-&mc-version;-debian_fixes-1.patch"/></para>
+ </listitem>
+ </itemizedlist>
+
+ <bridgehead renderas="sect3">Do I Need the Debian Patch?</bridgehead>
+ <para>Midnight Commander without the Debian patch is completely unusable
+ in multibyte locales because it assumes that characters and
+ bytes are the same thing. The issue manifests itself as massive screen
+ contents corruption similar to what is depicted in
+ <ulink url="&files-anduin;/mc-bad.png">this screenshot</ulink>
+ (taken in the ru_RU.UTF-8 locale). For a general discussion of this type
+ of issues, see the <xref linkend="locale-issues"/> page. The Debian patch
+ mostly fixes this issue, and adds support for recoding remote FTP
+ filenames. Debian also fixed 64-bit issues, rare segfaults in
+ <command>mcedit</command>, and improved syntax highlighting.</para>
+
+ <para>If you do not use a multibyte locale and do not need any of the new
+ features or fixes, the patch is still supposed to be harmless.
+ However, the patch changes the dependencies and build instructions, and
+ in the past it caused unacceptable regressions for non-UTF-8 locale users.
+ Thus, failsafe instructions without the patch are left in the book just
+ in case. Due to the size and unofficial nature of the patch, please
+ do not report bugs in the patched MC to the original MC developers.</para>
+
<bridgehead renderas="sect3">MC Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
- <para role="required"><xref linkend="GLib"/> or
+ <para role="required"><xref linkend="GLib"/> (untested with Debian patch)
or
<xref linkend="glib2"/></para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional"><xref linkend="gpm"/>,
<xref linkend="x-window-system"/>,
<xref linkend="samba3"/>,
- <xref linkend="slang"/>,
+ <xref linkend="slang"/> (required when building with Debian patch),
<xref linkend="zip"/>,
<xref linkend="unzip"/>, and
<xref linkend="gnome-libs"/></para>
@@ -91,20 +112,78 @@
<sect2 role="installation">
<title>Installation of MC</title>
+ <para>Fix incompatibility of MC-&mc-version; with Bash-3.2:</para>
+<screen><userinput>patch -Np1 -i
../mc-&mc-version;-bash32-1.patch</userinput></screen>
+
+ <para>If desired, apply Debian fixes:</para>
+<screen><userinput>patch -Np1 -i
../mc-&mc-version;-debian_fixes-1.patch</userinput></screen>
+
<para>Install <application>MC</application> by
running the following commands:</para>
-<screen><userinput>./configure --prefix=/usr &&
-make</userinput></screen>
+<screen><userinput>CPPFLAGS="-DUTF8" ./configure --prefix=/usr \
+ --enable-charset &&
+make
+</userinput></screen>
+ <para>MC with Debian patches expects its documentation to be stored in the
+ UTF-8 encoding on disk, and automatically converts it to the locale
+ encoding when displaying on the terminal. This is different from the
+ expectations of the unpatched MC, so the documentation files have to be
+ converted if (and only if) the Debian patch has been applied:</para>
+<screen><userinput>convert-mans ISO-8859-1 UTF-8 lib/mc.hint{,.es,.it,.nl}
&&
+convert-mans ISO-8859-2 UTF-8 lib/mc.hint{.cs,.hu,.pl} &&
+convert-mans ISO-8859-5 UTF-8 lib/mc.hint.sr &&
+convert-mans KOI8-R UTF-8 lib/mc.hint.ru &&
+convert-mans KOI8-U UTF-8 lib/mc.hint.uk &&
+convert-mans BIG5 UTF-8 lib/mc.hint.zh &&
+convert-mans ISO-8859-1 UTF-8 doc/{es,it}/mc.hlp.* &&
+convert-mans ISO-8859-2 UTF-8 doc/{hu,pl}/mc.hlp.* &&
+convert-mans ISO-8859-5 UTF-8 doc/sr/mc.hlp.sr &&
+convert-mans KOI8-R UTF-8 doc/ru/mc.hlp.ru</userinput></screen>
+
<para>This package does not come with a test suite.</para>
<para>Now, as the <systemitem class="username">root</systemitem>
user:</para>
-<screen role="root"><userinput>make install</userinput></screen>
+<screen role="root"><userinput>make install &&
+chmod 1755 /usr/lib/mc/cons.saver</userinput></screen>
</sect2>
+ <sect2 role="commands">
+ <title>Command Explanations</title>
+
+ <para><parameter>CPPFLAGS="-DUTF8"</parameter>: This parameter activates
+ UTF-8 support in the Debian patch and has no effect without this
patch.</para>
+
+ <para><parameter>--enable-charset</parameter>: This option adds support
+ to <command>mcedit</command> for editing files in encodings different from
the one implied
+ by the current locale. This feature works in non-UTF-8 locales only,
+ even with the Debian patch.</para>
+
+ <para><parameter>--with-screen=(slang|mcslang|ncurses)</parameter>: This
+ parameter selects the screen library used by MC. NCurses support is
+ currently buggy (MC does not handle mouse events in xterm correctly).
+ UTF-8 support in the Debian patch is functional
+ only when external <xref linkend="slang"/> is used as a screen library
+ (this is the default).</para>
+
+ <para><parameter>--with-codepagedir=DIR</parameter>: This parameter was
useful
+ only with SAMBA-2.x. New versions of SAMBA do not have codepage
files.</para>
+
+ <para><command>chmod 1755 /usr/lib/mc/cons.saver</command>: The
+ <command>cons.saver</command> program on LFS has to be installed setuid
root,
+ because on LFS regular users have no access to
<filename>/dev/vcsa*</filename>
+ devices. This step is optional if MC is going to be started from X terminal
+ emulators or ssh sessions only (thus rendering the
<command>cons.saver</command>
+ binary completely unneeded).</para>
+
+ <!-- Other distributions make the devices owned by the vcsa group
+ and make the cons.saver program setgid vcsa instead -->
+
+ </sect2>
+
<sect2 role="configuration">
<title>Configuring MC</title>
@@ -141,7 +220,7 @@
<segtitle>Installed Directories</segtitle>
<seglistitem>
- <seg>mc, mcedit, mcmfmt, and mcview</seg>
+ <seg>cons.saver, mc, mcedit, mcmfmt, and mcview</seg>
<seg>None</seg>
<seg>/usr/share/mc and /usr/lib/mc</seg>
</seglistitem>
@@ -152,6 +231,17 @@
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
+ <varlistentry id="conssaver">
+ <term><command>cons.saver</command></term>
+ <listitem>
+ <para>is used internally by <command>mc</command> for saving and
+ restoring the text behind the panels on Linux text console.</para>
+ <indexterm zone="mc conssaver">
+ <primary sortas="b-conssaver">cons.saver</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="mc-prog">
<term><command>mc</command></term>
<listitem>
@@ -172,6 +262,16 @@
</listitem>
</varlistentry>
+ <varlistentry id="mcmfmt">
+ <term><command>mcmfmt</command></term>
+ <listitem>
+ <para>is used internally by <command>mcview</command> when viewing
mailbox files.</para>
+ <indexterm zone="mc mcmfmt">
+ <primary sortas="b-mcmfmt">mcmfmt</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="mcview">
<term><command>mcview</command></term>
<listitem>
Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent 2007-01-19 05:06:26 UTC (rev 6432)
+++ trunk/BOOK/general.ent 2007-01-19 16:05:59 UTC (rev 6433)
@@ -3,7 +3,7 @@
$Date$
-->
-<!ENTITY day "18"> <!-- Always 2 digits -->
+<!ENTITY day "19"> <!-- Always 2 digits -->
<!ENTITY month "01"> <!-- Always 2 digits -->
<!ENTITY year "2007">
<!ENTITY version "svn-&year;&month;&day;">
Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml 2007-01-19 05:06:26 UTC
(rev 6432)
+++ trunk/BOOK/introduction/welcome/changelog.xml 2007-01-19 16:05:59 UTC
(rev 6433)
@@ -42,6 +42,16 @@
-->
<listitem>
+ <para>January 19th, 2007</para>
+ <itemizedlist>
+ <listitem>
+ <para>[alexander] - Added Debian patch and bash-3.2
+ compatibility patch to MC. Fixes #2189.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>January 18th, 2007</para>
<itemizedlist>
<listitem>
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page