diff mbox series

ccache: don't use non-ASCII quotes

Message ID mailman.1136.1619731704.1230.openwrt-devel@lists.openwrt.org
State Changes Requested
Delegated to: Petr Štetiar
Headers show
Series ccache: don't use non-ASCII quotes | expand

Commit Message

David Adair April 29, 2021, 9:28 p.m. UTC
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Rebased upstream ccache commit: f6202db308e32f9b2 to correct
compilation errors with MANUAL.adoc due to non-ascii characters.

This change enables building 21.02-rc1 on a RHEL8 host where
"LANG=C" is apparently ascii rather than utf8.

Original fix:
Reported-by: Christophe PEREZ
Bug: https://bugs.gentoo.org/762814
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Cleaned up backport to version 4.1 and added to ccache/patches
Signed-off-by: David Adair <djabhead@aol.com>
---
 tools/ccache/patches/020-fix-doc-utf.patch | 96 ++++++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 tools/ccache/patches/020-fix-doc-utf.patch

Comments

Petr Štetiar April 30, 2021, 6:18 a.m. UTC | #1
David Adair via openwrt-devel <openwrt-devel@lists.openwrt.org> [2021-04-29 14:28:08]:

Hi,

> Rebased upstream ccache commit: f6202db308e32f9b2 to correct
> compilation errors with MANUAL.adoc due to non-ascii characters.
> 
> This change enables building 21.02-rc1 on a RHEL8 host where
> "LANG=C" is apparently ascii rather than utf8.

I would rather prefer to disable[1] the documentation.

1. https://github.com/ccache/ccache/pull/842

-- ynezz
David Adair May 13, 2021, 4:18 a.m. UTC | #2
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
> I would rather prefer to disable[1] the documentation.
> 
> 1. https://github.com/ccache/ccache/pull/842

Thank you.  Zero maintenance is much better.

Since master has been updated to 4.2.1 which builds fine it seems no
change there is required until it also has this change.

Is there any interest in placing this in 21.02 along with the Makefile
c
hange to use it ?  The build failure is specific to ccache 4.1 and does
NOT occur using default config ( ccache and sdk disabled ).
Petr Štetiar May 13, 2021, 8:20 a.m. UTC | #3
David Adair via openwrt-devel <openwrt-devel@lists.openwrt.org> [2021-05-12 21:18:44]:

Hi,

> Is there any interest in placing this in 21.02 along with the Makefile c
> hange to use it ?  The build failure is specific to ccache 4.1 and does NOT
> occur using default config ( ccache and sdk disabled ).

feel free to send such patch.

-- ynezz
diff mbox series

Patch

diff --git a/tools/ccache/patches/020-fix-doc-utf.patch b/tools/ccache/patches/020-fix-doc-utf.patch
new file mode 100644
index 0000000000..981b1f4473
--- /dev/null
+++ b/tools/ccache/patches/020-fix-doc-utf.patch
@@ -0,0 +1,96 @@ 
+From 81e72af1dac607d57c55e40c1187ead52cc45e26 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@inbox.ru>
+Date: Mon, 11 Jan 2021 20:17:47 +0000
+Subject: [PATCH] doc/MANUAL.adoc: Don't use non-ASCII quotes (#761)
+
+Some locales like "LANG=fr_FR.iso885915@euro make" can't
+handle UTF-8 single- and double-quotes:
+
+$ LANG=fr_FR.iso885915@euro make
+...
+asciidoc: FAILED: MANUAL.adoc: line 529: unexpected error:
+...
+  File "/usr/lib/python3.8/encodings/iso8859_15.py", line 19, in encode
+    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
+UnicodeEncodeError: 'charmap' codec can't encode character '\u201c'
+  in position 54: character maps to <undefined>
+
+To avoid it the patch uses ASCII equivalents of symbols.
+
+The patch is generated as:
+
+$ sed \
+    -e 's/\xE2\x80\x99/'\''/g' \
+    -e 's/\xE2\x80\x9C/'\`\`'/g' \
+    -e 's/\xE2\x80\x9D/'\'\''/g' \
+    -i doc/MANUAL.adoc
+
+Reported-by: Christophe PEREZ
+Bug: https://bugs.gentoo.org/762814
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ doc/MANUAL.adoc | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc
+index b7d89124..ec0c286a 100644
+--- a/doc/MANUAL.adoc
++++ b/doc/MANUAL.adoc
+@@ -517,9 +517,9 @@ Semantics of *compression_level*:
+     ratio. The maximum possible value depends on the libzstd version.
+     Decompression speed is essentially the same for all levels.
+ *< 0*::
+-    A negative value corresponds to Zstandard's “ultra-fast” compression
++    A negative value corresponds to Zstandard's ``ultra-fast'' compression
+     levels, which are even faster than level 1 but with less good compression
+-    ratios. For instance, level *-3* corresponds to “--fast=3” for the *zstd*
++    ratios. For instance, level *-3* corresponds to ``--fast=3'' for the *zstd*
+     command line tool.
+ *0* (default)::
+     The value *0* means that ccache will choose a suitable level, currently
+@@ -564,8 +564,8 @@ Semantics of *compression_level*:
+ 
+ [[config_file_clone]] *file_clone* (*CCACHE_FILECLONE* or *CCACHE_NOFILECLONE*, see <<_boolean_values,Boolean values>> above)::
+ 
+-    If true, ccache will attempt to use file cloning (also known as “copy on
+-    write”, “CoW” or “reflinks”) to store and fetch cached compiler results.
++    If true, ccache will attempt to use file cloning (also known as ``copy on
++    write'', ``CoW'' or ``reflinks'') to store and fetch cached compiler results.
+     *file_clone* has priority over <<config_hard_link,*hard_link*>>. The
+     default is false.
+ +
+@@ -921,11 +921,11 @@ Incompressible data:      3.5 GB
+ 
+ Notes:
+ 
+-* The “disk blocks” size is the cache size when taking disk block size into
+-  account. This value should match the “cache size” value from “ccache
+-  --show-stats”. The other size numbers refer to actual content sizes.
+-* “Compressed data” refers to result and manifest files stored in the cache.
+-* “Incompressible data” refers to files that are always stored uncompressed
++* The ``disk blocks'' size is the cache size when taking disk block size into
++  account. This value should match the ``cache size'' value from ``ccache
++  --show-stats''. The other size numbers refer to actual content sizes.
++* ``Compressed data'' refers to result and manifest files stored in the cache.
++* ``Incompressible data'' refers to files that are always stored uncompressed
+   (triggered by enabling <<config_file_clone,*file_clone*>> or
+   <<config_hard_link,*hard_link*>>) or unknown files (for instance files
+   created by older ccache versions).
+@@ -1238,11 +1238,11 @@ In the direct mode, ccache uses the 160 bit BLAKE3 hash of the
+ the *ccache-input-c* + *ccache-input-p* data is used in the preprocessor mode.
+ 
+ The *ccache-input-text* file is a combined text version of the three
+-binary input files. It has three sections (“COMMON”, “DIRECT MODE” and
+-“PREPROCESSOR MODE”), which is turn contain annotations that say what kind of
++binary input files. It has three sections (``COMMON'', ``DIRECT MODE'' and
++``PREPROCESSOR MODE''), which is turn contain annotations that say what kind of
+ data comes next.
+ 
+-To debug why you don’t get an expected cache hit for an object file, you can do
++To debug why you don't get an expected cache hit for an object file, you can do
+ something like this:
+ 
+ 1. Build with debug mode enabled.
+-- 
+2.27.0
+