]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Improve stability of generated debug-sections.txt (#1101)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 7 Aug 2022 14:59:20 +0000 (14:59 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 7 Aug 2022 21:18:05 +0000 (21:18 +0000)
Pure "sort" may not produce stable results across different locales.
This may explain why the official order changed in commit 502bcc7 and
why current runs in some unofficial environments reorder sections.

Also fixed two minor problems:
* "sort -n" (i.e. numeric sort) was applied to non-numeric fields
* "sort -u" (i.e. unique sort) was pointlessly applied multiple times

doc/debug-sections.txt
scripts/source-maintenance.sh

index 686e90dc858074af70f35dbed6a935f2674545b5..212cf239e88225ac3145ca01cd5f1cbc40dd166d 100644 (file)
@@ -7,6 +7,9 @@
  */
 
 
+section --    External DISKD process implementation.
+section --    Refcount allocator
+section --    Unlink Daemon
 section 00    Client Database
 section 00    Debug Routines
 section 00    Hash Tables
@@ -56,14 +59,14 @@ section 22    Refresh Calculation
 section 23    URL Parsing
 section 23    URL Scheme parsing
 section 24    SBuf
-section 25    MiME Header Parsing
 section 25    MIME Parsing and Internal Icons
+section 25    MiME Header Parsing
 section 26    Secure Sockets Layer Proxy
 section 27    Cache Announcer
 section 28    Access Control
 section 29    Authenticator
-section 29    Negotiate Authenticator
 section 29    NTLM Authenticator
+section 29    Negotiate Authenticator
 section 30    Ident (RFC 931)
 section 31    Hypertext Caching Protocol
 section 32    Asynchronous Disk I/O
@@ -86,8 +89,8 @@ section 46    Access Log
 section 46    Access Log - Apache combined format
 section 46    Access Log - Apache common format
 section 46    Access Log - Squid Custom format
-section 46    Access Log - Squid format
 section 46    Access Log - Squid ICAP Logging
+section 46    Access Log - Squid format
 section 46    Access Log - Squid referer format
 section 46    Access Log - Squid useragent format
 section 47    Store Directory Routines
@@ -126,8 +129,8 @@ section 79    Squid-side DISKD I/O functions.
 section 79    Squid-side Disk I/O functions.
 section 79    Storage Manager UFS Interface
 section 80    WCCP Support
-section 81    aio_xxx() POSIX emulation on Windows
 section 81    Store HEAP Removal Policies
+section 81    aio_xxx() POSIX emulation on Windows
 section 82    External ACL
 section 83    SSL accelerator support
 section 83    SSL-Bump Server/Peer negotiation
@@ -147,8 +150,5 @@ section 90    HTTP Cache Control Header
 section 90    Storage Manager Client-Side Interface
 section 92    Storage File System
 section 93    Adaptation
-section 93    eCAP Interface
 section 93    ICAP (RFC 3507) Client
-section --    External DISKD process implementation.
-section --    Refcount allocator
-section --    Unlink Daemon
+section 93    eCAP Interface
index 1369ca5b248eaed2bc5d46d877c70a3eb4e33423..99bb9096383c1b7c169b0f96d3322f184190bada 100755 (executable)
@@ -299,7 +299,7 @@ processDebugSections ()
 {
     destination="doc/debug-sections.txt"
 
-    sort -u < doc/debug-sections.tmp | sort -n > doc/debug-sections.tmp2
+    LC_ALL=C sort -u < doc/debug-sections.tmp > doc/debug-sections.tmp2
     cat scripts/boilerplate.h > $destination
     echo "" >> $destination
     cat doc/debug-sections.tmp2 >> $destination
@@ -411,7 +411,7 @@ for FILENAME in `git ls-files`; do
        #
        # DEBUG Section list maintenance
        #
-       grep " DEBUG: section" <${FILENAME} | sed -e 's/ \* DEBUG: //' -e 's%/\* DEBUG: %%' -e 's% \*/%%' | sort -u >>doc/debug-sections.tmp
+       grep " DEBUG: section" <${FILENAME} | sed -e 's/ \* DEBUG: //' -e 's%/\* DEBUG: %%' -e 's% \*/%%' >> doc/debug-sections.tmp
 
        #
        # File permissions maintenance.