[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#343602: xserver-xorg: [a-z] must be used in maintainer scripts only under C locale

Package: xserver-xorg
Version: 6.8.2.dfsg.1-11
Severity: normal
Tags: patch


[a-z] may not represent all 26 ASCII lowercase letters in regular
expressions, eg. Estonian collation sorts z between s and t:
  $ LC_ALL=et_EE.UTF-8 expr tuv : [a-z]
  $ LC_ALL=C expr tuv : [a-z]

One must then switch to C locale to avoid those collation issues,
see attached patch.


Index: debian/xserver-xorg.config.in
--- debian/xserver-xorg.config.in	(révision 950)
+++ debian/xserver-xorg.config.in	(copie de travail)
@@ -244,13 +244,13 @@
         # Accept any non-null sequence of lowercase letters followed by a
         # non-null sequence of decimal digits.  This handles "fbN" and "nameN".
-        expr "$RET" : "SBUS:[a-z]\+[0-9]\+" >/dev/null 2>&1 && break
+        LC_ALL=C expr "$RET" : "SBUS:[a-z]\+[0-9]\+" >/dev/null 2>&1 && break
         # Now for the PROM path.  I am lazy; accept a slash followed a non-null
         # sequence of letters and commas, an at sign, a non-null sequence of
         # hexadecimal digits, a comma, and another non-null sequence of
         # hexadecimal digits.  Furthermore, accept multiple occurences of this
         # entire sequence.  Whew.
-        expr "$RET" : "SBUS:\(/[A-Za-z,]\+@[0-9A-Fa-f]\+,[0-9A-Fa-f]\+\)\+$" \
+        LC_ALL=C expr "$RET" : "SBUS:\(/[A-Za-z,]\+@[0-9A-Fa-f]\+,[0-9A-Fa-f]\+\)\+$" \
           >/dev/null 2>&1 && break

Reply to: