SOURCES: rpm.macros - need double escape

glen glen at pld-linux.org
Thu Apr 3 22:23:53 CEST 2008


Author: glen                         Date: Thu Apr  3 20:23:53 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- need double escape

---- Files affected:
SOURCES:
   rpm.macros (1.447 -> 1.448) 

---- Diffs:

================================================================
Index: SOURCES/rpm.macros
diff -u SOURCES/rpm.macros:1.447 SOURCES/rpm.macros:1.448
--- SOURCES/rpm.macros:1.447	Thu Apr  3 21:57:43 2008
+++ SOURCES/rpm.macros	Thu Apr  3 22:23:48 2008
@@ -283,11 +283,12 @@
 %apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api
 
 # kernel version-release handling
-%__kernel_ver	 %{expand:%%global __kernel_ver %(
-	Z=$(awk -F'"' '/UTS_RELEASE/{print $2}' %{_kernelsrcdir}/include/linux/{version,utsrelease}.h 2>/dev/null); \
-	Z=${Z:-$(awk -F' = ' '/^VERSION/{v=$2} /^PATCHLEVEL/{p=$2} /^SUBLEVEL/{s=$2} /^EXTRAVERSION/{e=$2} END {printf("%d.%d.%d%s", v, p, s, e)}' %{_kernelsrcdir}/Makefile 2>/dev/null)}; \
-	echo ${Z:-ERROR}; \
+%__kernel_ver	 %{expand:%%global __kernel_ver %( \\
+	Z=$(awk -F'"' '/UTS_RELEASE/{print $2}' %{_kernelsrcdir}/include/linux/{version,utsrelease}.h 2>/dev/null); \\
+	Z=${Z:-$(awk -F' = ' '/^VERSION/{v=$2} /^PATCHLEVEL/{p=$2} /^SUBLEVEL/{s=$2} /^EXTRAVERSION/{e=$2} END {printf("%d.%d.%d%s", v, p, s, e)}' %{_kernelsrcdir}/Makefile 2>/dev/null)}; \\
+	echo ${Z:-ERROR}; \\
 )}%__kernel_ver
+
 %__kernel_rel	%{expand:%%global __kernel_rel %(Z=$(LC_ALL=C rpm -qf %{_kernelsrcdir}/include/linux/fs.h 2>/dev/null --qf "%{R}" | grep -v "is not"); echo ${Z:-ERROR})}%__kernel_rel
 %__kernel_rpmvr	%{expand:%%global __kernel_rpmvr %(Z=$(LC_ALL=C rpm -qf %{_kernelsrcdir}/include/linux/fs.h 2>/dev/null --qf "%{V}-%{R}" | grep -v "is not"); echo ${Z:-ERROR})}%__kernel_rpmvr
 %_kernel_ver	%{expand:%%global _kernel_ver %{__kernel_ver}%{?with_dist_kernel:%(echo %{__kernel_ver} | grep -q -e - || echo -%{__kernel_rel})}}%_kernel_ver
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm.macros?r1=1.447&r2=1.448&f=u



More information about the pld-cvs-commit mailing list