1 |
>>>>> On Tue, 20 Oct 2015, Mike Frysinger wrote: |
2 |
|
3 |
> On 21 Oct 2015 00:03, Ulrich Mueller wrote: |
4 |
>> Therefore I'd make it a recommendation at most. Something along the |
5 |
>> lines of: "The interpreter is assumed to be GNU bash, version as |
6 |
>> listed in table xyz, or any later version. If possible, the package |
7 |
>> manager should set the shell's compatibility level to the exact |
8 |
>> version specified." |
9 |
|
10 |
> and include the recommended snippet as well as add a warning about |
11 |
> not exporting the variable less it break external shell scripts. |
12 |
|
13 |
"The interpreter is assumed to be GNU bash, version as listed in table |
14 |
xyz, or any later version. If possible, the package manager should set |
15 |
the shell's compatibility level to the exact version specified. It |
16 |
must ensure that any such compatibility settings (e.g. the BASH_COMPAT |
17 |
variable) are not exported to external programs." |
18 |
|
19 |
Ulrich |
20 |
|
21 |
|
22 |
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o> |
23 |
Date: Wed, 21 Oct 2015 09:31:06 +0200 |
24 |
Subject: [PATCH] Recommend setting the bash compatibility level. |
25 |
|
26 |
--- |
27 |
ebuild-format.tex | 13 ++++++++----- |
28 |
1 file changed, 8 insertions(+), 5 deletions(-) |
29 |
|
30 |
diff --git a/ebuild-format.tex b/ebuild-format.tex |
31 |
index c741398..6eab1d5 100644 |
32 |
--- a/ebuild-format.tex |
33 |
+++ b/ebuild-format.tex |
34 |
@@ -3,11 +3,14 @@ |
35 |
|
36 |
The ebuild file format is in its basic form a subset of the format of a bash script. The interpreter |
37 |
is assumed to be GNU bash, version as listed in table~\ref{tab:system-commands-table} on |
38 |
-page~\pageref{tab:system-commands-table}, or any later version. The file encoding must be UTF-8 |
39 |
-with Unix-style newlines. When sourced, the ebuild must define certain variables and functions |
40 |
-(see sections~\ref{sec:ebuild-vars} and~\ref{sec:ebuild-functions} for specific information), and |
41 |
-must not call any external programs, write anything to standard output or standard error, or modify |
42 |
-the state of the system in any way. |
43 |
+page~\pageref{tab:system-commands-table}, or any later version. If possible, the package manager |
44 |
+should set the shell's compatibility level to the exact version specified. It must ensure that any |
45 |
+such compatibility settings (e.g. the \t{BASH\_COMPAT} variable) are not exported to external programs. |
46 |
+ |
47 |
+The file encoding must be UTF-8 with Unix-style newlines. When sourced, the ebuild must define |
48 |
+certain variables and functions (see sections~\ref{sec:ebuild-vars} and~\ref{sec:ebuild-functions} |
49 |
+for specific information), and must not call any external programs, write anything to standard |
50 |
+output or standard error, or modify the state of the system in any way. |
51 |
|
52 |
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : |
53 |
|
54 |
-- |
55 |
2.6.2 |