diff options
author | Matt Turner <mattst88@gentoo.org> | 2017-09-10 23:54:57 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2017-09-10 23:54:57 +0000 |
commit | aad1346b925d1937ad37898d9f6111f0899526ef (patch) | |
tree | 56070510c87d130b062241f9055c70ffd831a872 | |
parent | Fix category of net-vpn/ipsec-tools and resort list (diff) | |
download | gentoo-aad1346b925d1937ad37898d9f6111f0899526ef.tar.gz gentoo-aad1346b925d1937ad37898d9f6111f0899526ef.tar.bz2 gentoo-aad1346b925d1937ad37898d9f6111f0899526ef.zip |
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.
-rw-r--r-- | src/patchsets/gentoo-headers/rip-headers.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/patchsets/gentoo-headers/rip-headers.sh b/src/patchsets/gentoo-headers/rip-headers.sh index 17812edfd5..74577d53dc 100644 --- a/src/patchsets/gentoo-headers/rip-headers.sh +++ b/src/patchsets/gentoo-headers/rip-headers.sh @@ -28,8 +28,13 @@ rm -rf ${dst} 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}* \ |