1 |
Hi folks, |
2 |
|
3 |
Just a quick note about Escaping+Quoting stuff relevant to the usage of |
4 |
linux-mod.eclass. |
5 |
|
6 |
Up until recently, linux-mod.eclass had a bug where if you passed |
7 |
variables inside the $BUILD_PARAMS variable, AND those inner variables |
8 |
contained spaces, they would not be passed to Make correctly. This would |
9 |
manifest itself as Make trying to compile strange targets (words from |
10 |
contents of the inner variable). |
11 |
|
12 |
After fixing this in linux-mod, alonbl pointed out to me that it was |
13 |
causing some other breakages, for usages of BUILD_PARAMS that did not |
14 |
have correct quoting - and thus the eclass fix now passed some newline |
15 |
characters from the ebuilds to the Make, which also caused failures. |
16 |
|
17 |
Here's the change blob from bestcrypt, as it illustrates how to fix the |
18 |
issue very nicely: |
19 |
> @@ -40,10 +40,10 @@ pkg_setup() { |
20 |
> BUILD_TARGETS="all" |
21 |
> - BUILD_PARAMS=" |
22 |
> - CPP=\"$(tc-getCXX)\" |
23 |
> - KERNEL_DIR=\"${KV_DIR}\" |
24 |
> - VER=${KV_MAJOR}.${KV_MINOR} |
25 |
> + BUILD_PARAMS=" \ |
26 |
> + CPP=\"$(tc-getCXX)\" \ |
27 |
> + KERNEL_DIR=\"${KV_DIR}\" \ |
28 |
> + VER=${KV_MAJOR}.${KV_MINOR} \ |
29 |
> KEXT=${KV_OBJ}" |
30 |
|
31 |
I have fixed the following builds in the tree, but there may be others |
32 |
in overlays out there: |
33 |
app-crypt/bestcrypt |
34 |
app-emulation/mol |
35 |
sys-fs/redirfs |
36 |
sys-fs/fuse |
37 |
|
38 |
x11-drivers/nvidia-drivers and sys-fs/loop-aes were already safe. |
39 |
|
40 |
If your BUILD_PARAMS does not span multiple lines you won't have issues |
41 |
with the newlines, however you should probably check it anyway, test it |
42 |
by having a KV_DIR that contains a space in the pathname. |
43 |
|
44 |
-- |
45 |
Robin Hugh Johnson |
46 |
Gentoo Linux Developer & Infra Guy |
47 |
E-Mail : robbat2@g.o |
48 |
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 |