[apparmor] [patch] Make.rules: sort capabilities with LANG=C
Steve Beattie
steve at nxnw.org
Tue Aug 25 19:58:11 UTC 2015
On Tue, Aug 25, 2015 at 09:30:58PM +0200, Christian Boltz wrote:
> Hello,
>
> Am Dienstag, 25. August 2015 schrieb intrigeri:
> > Christian Boltz wrote (25 Aug 2015 17:09:19 GMT) :
> > > this patch changes Make.rules to sort capabilities using LANG=C.
> > >
> > > This is needed to make building apparmor.vim reproducable -
> > > otherwise
> > > the sorting depends on the locale.
> >
> > Excellent, I had this one on my radar, thanks for beating me to it!
> >
> > > LANG=C sort)
> >
> > Isn't LC_COLLATE=C needed as well? IIRC if it's set it can override
> > $LANG for some aspects of sorting.
>
> Good question, let's test it ;-)
>
> cb at geeko:~> export LC_COLLATE=de_DE at euro ; LANG=C locale
> LANG=C
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE=de_DE at euro
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_PAPER="C"
> LC_NAME="C"
> LC_ADDRESS="C"
> LC_TELEPHONE="C"
> LC_MEASUREMENT="C"
> LC_IDENTIFICATION="C"
> LC_ALL=
> cb at geeko:~> export LC_COLLATE=de_DE at euro ; LC_ALL=C locale
> LANG=de_DE at euro
> LC_CTYPE="C"
> LC_NUMERIC="C"
> LC_TIME="C"
> LC_COLLATE="C"
> LC_MONETARY="C"
> LC_MESSAGES="C"
> LC_PAPER="C"
> LC_NAME="C"
> LC_ADDRESS="C"
> LC_TELEPHONE="C"
> LC_MEASUREMENT="C"
> LC_IDENTIFICATION="C"
> LC_ALL=C
>
> I never thought I'll need to send a v2 of that patch, but using LC_ALL
> seems to be the better choice (it doesn't touch LANG, but that
> hopefully shouldn't matter).
Indeed, LC_ALL is the better choice, according to
http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
Quoting above:
LC_ALL
This variable determines the values for all locale categories. The
value of the LC_ALL environment variable has precedence over any
of the other environment variables starting with LC_ (LC_COLLATE,
LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the
LANG environment variable.
> [ make-rules-sort-capabilities.diff ]
Acked-by: Steve Beattie <steve at nxnw.org>
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150825/e457ce23/attachment-0001.pgp>
More information about the AppArmor
mailing list