[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] Escaping+Quoting notes for linux-mod.eclass
From:       "Robin H. Johnson" <robbat2 () gentoo ! org>
Date:       2008-03-23 21:59:03
Message-ID: 20080323215903.GF22954 () curie-int ! orbis-terrarum ! net
[Download RAW message or body]

Hi folks,

Just a quick note about Escaping+Quoting stuff relevant to the usage of
linux-mod.eclass.

Up until recently, linux-mod.eclass had a bug where if you passed
variables inside the $BUILD_PARAMS variable, AND those inner variables
contained spaces, they would not be passed to Make correctly. This would
manifest itself as Make trying to compile strange targets (words from
contents of the inner variable).

After fixing this in linux-mod, alonbl pointed out to me that it was
causing some other breakages, for usages of BUILD_PARAMS that did not
have correct quoting - and thus the eclass fix now passed some newline
characters from the ebuilds to the Make, which also caused failures.

Here's the change blob from bestcrypt, as it illustrates how to fix the
issue very nicely:
> @@ -40,10 +40,10 @@ pkg_setup() {
>  	BUILD_TARGETS="all"
> -	BUILD_PARAMS="
> -		CPP=\"$(tc-getCXX)\"
> -		KERNEL_DIR=\"${KV_DIR}\"
> -		VER=${KV_MAJOR}.${KV_MINOR}
> +	BUILD_PARAMS=" \
> +		CPP=\"$(tc-getCXX)\" \
> +		KERNEL_DIR=\"${KV_DIR}\" \
> +		VER=${KV_MAJOR}.${KV_MINOR} \
>  		KEXT=${KV_OBJ}"

I have fixed the following builds in the tree, but there may be others
in overlays out there:
app-crypt/bestcrypt
app-emulation/mol
sys-fs/redirfs
sys-fs/fuse

x11-drivers/nvidia-drivers and sys-fs/loop-aes were already safe.

If your BUILD_PARAMS does not span multiple lines you won't have issues
with the newlines, however you should probably check it anyway, test it
by having a KV_DIR that contains a space in the pathname.

-- 
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail     : robbat2@gentoo.org
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

[Attachment #3 (application/pgp-signature)]
-- 
gentoo-dev@lists.gentoo.org mailing list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic