mattst88 17/09/10 23:54:57
Modified: rip-headers.sh
Log:
Update rip-headers.sh to handle kernels >= 4.12
Upstream kernel commit fcc8487d477a3452a1d0ccbdd4c5e0e1e3cb8bed ("uapi: export
all headers under uapi directories") removed include/Kbuild and the Kbuild
files from most directories within include/, thus breaking rip-headers.sh.
I have modified rip-headers.sh to simply rip all of include/ if it cannot find
the Kbuild files. This increase the size of gentoo-headers-base-*.tar.xz from
~4M to ~8M, but that's still significantly better than the size of the whole
kernel.
Revision Changes Path
1.16 src/patchsets/gentoo-headers/rip-headers.sh
file :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?rev=1.16&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?rev=1.16&content-type=text/plain
diff :
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/rip-headers.sh?r1=1.15&r2=1.16
Index: rip-headers.sh
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/gentoo-headers/rip-headers.sh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- rip-headers.sh 2 Aug 2016 15:22:58 -0000 1.15
+++ rip-headers.sh 10 Sep 2017 23:54:57 -0000 1.16
@@ -28,8 +28,13 @@
mkdir ${dst}
cp ${src}/Makefile ${dst}/
mkdir ${dst}/include
-cp ${src}/include/Kbuild ${dst}/include/
-cp -r $(find ${src}/include -mindepth 2 -maxdepth 2 -name 'Kbuild*' -printf
%h' ') ${dst}/include/
+[ -f ${src}/include/Kbuild ] && cp ${src}/include/Kbuild ${dst}/include/
+directories=$(find ${src}/include -mindepth 2 -maxdepth 2 -name 'Kbuild*'
-printf %h' ')
+if [ -n "${directories}" ] ; then
+ cp -r ${directories} ${dst}/include/
+else
+ cp -r ${src}/include/* ${dst}/include
+fi
mkdir ${dst}/scripts
cp -r \
${src}/scripts/{Makefile,Kbuild}* \