source: xsoft/other/thunderbird.xml@ 96e0c171

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 96e0c171 was 96e0c171, checked in by Xi Ruoyao <xry111@…>, 5 months ago

mozilla: Drop SHELL=/bin/bash

Note that if you build something relying on $SHELL, it may still fail to
build in chroot.

In the chroot we first use "env -i" to clean the environment variables.
When bash starts with no $SHELL set, it *sets* SHELL=(the login shell
of current user specified in /etc/passwd), but it *does not export this
variable*.

For example:

$ cat > t.c << EOF
#include <stdio.h>
#include <stdlib.h>
int main() { puts (getenv ("SHELL") ?: "(nullptr)"); }
$ ./a.out
/bin/zsh/
$ cc t.c
$ env -i bash -c "echo $SHELL"
/bin/zsh
$ env -i bash -c "./a.out"
(nullptr)

We can remove this now only because Mozilla has added a workaround into
their building system at
https://hg.mozilla.org/mozilla-central/rev/5afe7b911f61 for some Mac
builder, inadvertently fixing our issue.

Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2014-11/msg00050.html
Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-dev/2023-11/msg00136.html

  • Property mode set to 100644
File size: 16.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY thunderbird-download-http "&mozilla-http;/thunderbird/releases/&thunderbird-version;/source/thunderbird-&thunderbird-version;.source.tar.xz">
8 <!ENTITY thunderbird-download-ftp " ">
9 <!ENTITY thunderbird-md5sum "ed051b825c14e99eaa600254bc3078b9">
10 <!ENTITY thunderbird-size "509 MB">
11 <!ENTITY thunderbird-buildsize "6.7 GB (235 MB installed)">
12 <!ENTITY thunderbird-time "10 SBU (on a 8-core machine)">
13 <!-- Removed the -j1 time because python and rust do not obey it, although
14 the C/C++ code appears to obey it.
15
16 Version 102.3.3: I disabled all but 4 cores. SBU was 20 (2019 seconds)
17 -->
18]>
19
20<sect1 id="thunderbird" xreflabel="Thunderbird-&thunderbird-version;">
21 <?dbhtml filename="thunderbird.html" ?>
22
23
24 <title>Thunderbird-&thunderbird-version;</title>
25
26 <indexterm zone="thunderbird">
27 <primary sortas="a-Thunderbird">Thunderbird</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to Thunderbird</title>
32
33 <para>
34 <application>Thunderbird</application> is a stand-alone mail/news client
35 based on the <application>Mozilla</application> codebase. It uses the
36 Gecko rendering engine to enable it to display and compose HTML emails.
37 </para>
38
39 &lfs120_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&thunderbird-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&thunderbird-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &thunderbird-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &thunderbird-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &thunderbird-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &thunderbird-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75
76 <bridgehead renderas="sect3">Thunderbird Dependencies</bridgehead>
77
78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="cbindgen"/>,
81 <xref linkend="dbus-glib"/>,
82 <xref linkend="gtk3"/>,
83 <xref linkend="llvm"/> including clang, <!-- used by default if found -->
84 <xref linkend="nodejs"/>,
85 <xref linkend="pulseaudio"/> (or <xref linkend="alsa-lib"/> if you edit
86 the mozconfig; although it is now deprecated by mozilla),
87 <xref linkend="python3"/> (rebuilt with the sqlite module),
88 <xref linkend="six"/>,
89 <xref linkend="startup-notification"/>, and
90 <xref linkend="unzip"/>
91 <!--<xref linkend="yasm"/>-->
92 </para>
93
94 <bridgehead renderas="sect4">Recommended</bridgehead>
95 <para role="recommended">
96 <!-- When using system ICU, a problem occurs where the calendar and mail
97 functions do not render correctly and it causes other strange
98 behavior to occur. See Ticket #18323 for more details, as well as
99 https://lore.kernel.org/distributions/075a20b1-869b-78f3-9ace-e106a4d43ac4@linuxlounge.net/T/#u -->
100 <!--<xref linkend="icu"/>,-->
101 <xref linkend="libevent"/>,
102 <xref linkend="libvpx"/>,
103 <xref linkend="libwebp"/>,
104 <xref linkend="nasm"/>,
105 <xref linkend="nspr"/>, and
106 <xref linkend="nss"/>
107 </para>
108
109 <note>
110 <para>
111 If you don't install recommended dependencies,
112 then internal copies of those packages will
113 be used. They might be tested to work, but
114 they can be out of date or contain security
115 holes.
116 </para>
117 </note>
118
119 <bridgehead renderas="sect4">Optional</bridgehead>
120 <para role="optional">
121 <xref role="runtime" linkend="pciutils"/> (runtime),
122 <xref linkend="wget"/>,
123 <xref linkend="wireless_tools"/>, and
124 <ulink url="https://facebook.github.io/watchman/">watchman</ulink>
125 </para>
126
127 <para condition="html" role="usernotes">
128 Editor Notes: <ulink url="&blfs-wiki;/Thunderbird"/>
129 </para>
130 </sect2>
131
132 <sect2 role="installation">
133 <title>Installation of Thunderbird</title>
134
135 <note>
136 <para>
137 The build process for Thunderbird can use 8GB+ of RAM when linking.
138 Make sure that you have adequate swap or RAM before continuing.
139 </para>
140 </note>
141
142 <para>
143 The building system ships several internal copies of the Python 3
144 modules <application>setuptools</application> and
145 <filename>six.py</filename>. The shipped copies are too old
146 to work well with Python 3.12 or later. Replace them with the
147 symlinks to the LFS <application>setuptools</application> package and
148 <xref linkend='six'/> already installed on the system, and adapt the
149 building system for these updated Python modules. We also need to
150 rewrite the code based on the <filename>imp</filename> module removed
151 in Python 3.12 and later using the <filename>importlib</filename>
152 module:
153 </para>
154
155<screen><userinput>(for i in $(find -name six.py); do
156 ln -sfv /usr/lib/python&python3-majorver;/site-packages/six.py $i
157 [ $? = 0 ] || exit $?
158 done) &amp;&amp;
159
160sed '/ConfigParser/s/Safe//' \
161 -i testing/mozbase/mozprofile/mozprofile/prefs.py &amp;&amp;
162
163(for i in setuptools distutils-precedence.pth \
164 pkg_resources _distutils_hack; do
165 rm -rf third_party/python/setuptools/$i &amp;&amp;
166 ln -sv /usr/lib/python&python3-majorver;/site-packages/$i \
167 third_party/python/setuptools
168 [ $? = 0 ] || exit $?
169 done) &amp;&amp;
170
171sed 's/distutils/setuptools._&amp;/' \
172 -i python/mozbuild/mozbuild/nodeutil.py &amp;&amp;
173
174sed -e '/^import/s/imp$/importlib.util/' \
175 -e 's/imp.new_module/__import__/' \
176 -e "s/imp.load_source\(.*\)/spec = \
177 importlib.util.spec_from_file_location\1; \
178 mod = importlib.util.module_from_spec(spec); \
179 spec.loader.exec_module(mod)/" -i python/mach/mach/main.py &amp;&amp;
180sed '/import imp/d' -i netwerk/dns/prepare_tlds.py
181</userinput></screen>
182
183 <para>
184 The configuration of <application>Thunderbird</application> is
185 accomplished by creating a <filename>mozconfig</filename> file containing
186 the desired configuration options. A default
187 <filename>mozconfig</filename> is created below. To see the entire list
188 of available configuration options (and a brief description of each),
189 issue <command>./mach configure -- --help | less</command>. Create the file with
190 the following command:
191 </para>
192
193<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
194<literal># If you have a multicore machine, all cores will be used.
195
196# If you have installed wireless-tools comment out this line:
197ac_add_options --disable-necko-wifi
198
199# Uncomment the following option if you have not installed PulseAudio
200#ac_add_options --enable-audio-backends=alsa
201
202# Comment out following options if you have not installed
203# recommended dependencies:
204ac_add_options --with-system-libevent
205ac_add_options --with-system-libvpx
206ac_add_options --with-system-nspr
207ac_add_options --with-system-nss
208ac_add_options --with-system-webp
209<!-- With Thunderbird ESR 128 we'd replace the following part with
210"- -enable-elf-hack=relr", or remove it if relr becomes the default. -->
211# on some machines. It is supposed to improve startup time and it shrinks
212# libxul.so by a few MB. With recent Binutils releases the linker already
213# supports a much safer and generic way for this.
214ac_add_options --disable-elf-hack
215export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
216
217# The BLFS editors recommend not changing anything below this line:
218ac_add_options --prefix=/usr
219ac_add_options --enable-application=comm/mail
220
221ac_add_options --disable-crashreporter
222ac_add_options --disable-updater
223ac_add_options --disable-debug
224ac_add_options --disable-debug-symbols
225ac_add_options --disable-tests
226
227# This enables SIMD optimization in the shipped encoding_rs crate.
228ac_add_options --enable-rust-simd
229
230ac_add_options --enable-strip
231ac_add_options --enable-install-strip
232
233# You cannot distribute the binary if you do this.
234ac_add_options --enable-official-branding
235
236ac_add_options --enable-system-ffi
237ac_add_options --enable-system-pixman
238
239ac_add_options --with-system-jpeg
240ac_add_options --with-system-png
241ac_add_options --with-system-zlib
242
243# Using sandboxed wasm libraries has been moved to all builds instead
244# of only mozilla automation builds. It requires extra llvm packages
245# and was reported to seriously slow the build. Disable it.
246ac_add_options --without-wasm-sandboxed-libraries</literal>
247EOF</userinput></screen>
248
249 <para>
250 Now invoke the Python <command>mach</command> script to compile
251 <application>Thunderbird</application>:
252 </para>
253
254 <note>
255 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
256 href="../../xincludes/mozshm.xml"/>
257 </note>
258
259<screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
260export MOZBUILD_STATE_PATH=./mozbuild &amp;&amp;
261./mach configure &amp;&amp;
262./mach build</userinput></screen>
263
264 <para>
265 This package does not come with a test suite.
266 </para>
267
268 <para>
269 Install <application>Thunderbird</application> by running the following
270 commands as the <systemitem class="username">root</systemitem> user:
271 </para>
272
273<screen role="root"><userinput>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none ./mach install</userinput></screen>
274<!-- devs: For DESTDIR install, prepend DESTDIR=<dest> to the above -->
275 <para>
276 Empty the environment variables which were set above:
277 </para>
278
279<screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH</userinput></screen>
280
281 </sect2>
282
283 <sect2 role="commands">
284 <title>Command Explanations</title>
285
286 <para>
287 <command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none</command>: Use the
288 system python to create a virtual environment for <command>mach</command>
289 without downloading any python wheels nor using the system python modules.
290 This prevent version mismatches between system modules and bundled ones.
291 </para>
292
293 <para>
294 <command>./mach configure</command>: This validates the supplied
295 dependencies and the <filename>mozconfig</filename>.
296 </para>
297
298 <para>
299 <option>./mach build --verbose</option>: Use this alternative if you
300 need details of which files are being compiled, together with any C or
301 C++ flags being used.
302 </para>
303
304 <para>
305 <option>./mach build -jN</option>: The build should, by default, use
306 all the online CPU cores. If using all the cores causes the build to swap
307 because you have insufficient memory, using fewer cores can be faster.
308 </para>
309
310 <para>
311 <option><envar>CC=gcc CXX=g++</envar></option>: BLFS used to
312 prefer to use gcc and g++ instead of upstream's defaults of the
313 <application>clang</application> programs. With the release of
314 gcc-12 the build takes longer with gcc and g++, primarily because
315 of extra warnings, and is bigger. Set these environment variables
316 <emphasis>before you run the configure script</emphasis>
317 if you wish to continue to use gcc, g++. Building
318 with GCC on i?86 is currently broken.
319 </para>
320
321 </sect2>
322
323 <sect2 role="configuration">
324 <title>Configuring Thunderbird</title>
325
326 <sect3><title>Configuration Information</title>
327
328 <para>
329 If your Window Manager or Desktop Environment does not allow you to
330 configure a default browser, you can add a configuration parameter to
331 <application>Thunderbird</application> so that a browser will start when
332 you click on an Internet/intranet/local URL. The procedure to check
333 or modify any of the configuration parameters is quite simple and the
334 instructions here can be used to view or modify any of the parameters.
335 </para>
336
337 <para>
338 First, open the configuration dialog by opening the <quote>Edit</quote>
339 drop-down menu. Choose <quote>Preferences</quote> and then scroll down
340 to the bottom of the page. Then, click the <quote>Config Editor</quote>
341 button. Click on the <quote>I accept the risk!</quote> button.
342 This will display a list of the configuration preferences and
343 information related to each one. You can use the <quote>Filter:</quote>
344 bar to enter search criteria and narrow down the listed items. Changing
345 a preference can be done using two methods. One, if the preference has a
346 boolean value (True/False), simply double-click on the preference to
347 toggle the value and two, for other preferences simply right-click on
348 the desired line, choose <quote>Modify</quote> from the menu and change
349 the value. Creating new preference items is accomplished in the same
350 way, except choose <quote>New</quote> from the menu and provide the
351 desired data into the fields when prompted.
352 </para>
353
354 <para>
355 The configuration preference item you need to check so that
356 <application>Thunderbird</application> uses a specified browser is the
357 <parameter>network.protocol-handler.app.http</parameter> which should be
358 set to the path of the desired browser, e.g.
359 <option>/usr/bin/firefox</option>.
360 </para>
361<!-- Bad URL
362 <tip>
363 <para>
364 There is a multitude of configuration parameters you can tweak to
365 customize <application>Thunderbird</application>. A very extensive,
366 but not so up-to-date list of these parameters can be found at
367 <ulink url="http://preferential.mozdev.org/preferences.html"/>.
368 </para>
369 </tip>
370-->
371 <para>
372
373 If you use a desktop environment such as <application>GNOME</application>
374 or <application>KDE</application>, a desktop file
375 <filename>thunderbird.desktop</filename> may be created, in order to
376 include a <quote><application>Thunderbird</application></quote> entry in
377 the menu. <!--If you didn't enable
378 <application>startup-notification</application> in your mozconfig, then
379 change the StartupNotify line to false.--> Run the following commands as the
380 <systemitem class="username">root</systemitem> user:
381
382 </para>
383
384<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
385
386cat &gt; /usr/share/applications/thunderbird.desktop &lt;&lt; "EOF" &amp;&amp;
387<literal>[Desktop Entry]
388Name=Thunderbird Mail
389Comment=Send and receive mail with Thunderbird
390GenericName=Mail Client
391Exec=thunderbird %u
392Terminal=false
393Type=Application
394Icon=thunderbird
395Categories=Network;Email;
396MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;x-scheme-handler/mailto;
397StartupNotify=true</literal>
398EOF
399
400ln -sfv /usr/lib/thunderbird/chrome/icons/default/default256.png \
401 /usr/share/pixmaps/thunderbird.png</userinput></screen>
402 </sect3>
403 </sect2>
404
405 <sect2 role="content">
406 <title>Contents</title>
407
408 <segmentedlist>
409 <segtitle>Installed Program</segtitle>
410 <segtitle>Installed Libraries</segtitle>
411 <segtitle>Installed Directory</segtitle>
412
413 <seglistitem>
414 <seg>
415 thunderbird
416 </seg>
417 <seg>
418 Numerous libraries and modules in the /usr/lib/thunderbird directory
419 </seg>
420 <seg>
421 /usr/lib/thunderbird
422 </seg>
423 </seglistitem>
424 </segmentedlist>
425
426 <variablelist>
427 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
428 <?dbfo list-presentation="list"?>
429 <?dbhtml list-presentation="table"?>
430
431 <varlistentry id="thunderbird-prog">
432 <term><command>thunderbird</command></term>
433 <listitem>
434 <para>
435 is <application>Mozilla</application>'s email and newsgroup client
436 </para>
437 <indexterm zone="thunderbird thunderbird-prog">
438 <primary sortas="b-thunderbird">thunderbird</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 </variablelist>
444
445 </sect2>
446
447</sect1>
Note: See TracBrowser for help on using the repository browser.