New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] kernel-libc-headers: update to 5.10. #27145
Conversation
f525923
to
b159a6c
Compare
diff --git Makefile Makefile | ||
index e30cf02..d023d8a 100644 | ||
--- Makefile | ||
+++ Makefile | ||
@@ -1277,8 +1277,7 @@ export INSTALL_HDR_PATH = $(objtree)/usr | ||
quiet_cmd_headers_install = INSTALL $(INSTALL_HDR_PATH)/include | ||
cmd_headers_install = \ | ||
mkdir -p $(INSTALL_HDR_PATH); \ | ||
- rsync -mrl --include='*/' --include='*\.h' --exclude='*' \ | ||
- usr/include $(INSTALL_HDR_PATH) | ||
+ find usr/include -type f -name '*.h' -exec sh -c 'set -e; f="$${1\#usr/}"; dd="$(INSTALL_HDR_PATH)/$${f%/*}"; [ -d "$$dd" ] || mkdir -p "$$dd"; cp "usr/$$f" $(INSTALL_HDR_PATH)/"$$f"' -- '{}' ';' | ||
|
||
PHONY += headers_install | ||
headers_install: headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this patch, just follow what LFS do:
diff --git a/srcpkgs/kernel-libc-headers/template b/srcpkgs/kernel-libc-headers/template
index 715e0be817..358197d26c 100644
--- a/srcpkgs/kernel-libc-headers/template
+++ b/srcpkgs/kernel-libc-headers/template
@@ -26,12 +26,13 @@ esac
do_build() {
make mrproper
- make ARCH=${_arch} headers_check
+ make ARCH=${_arch} headers
}
do_install() {
- make ARCH=${_arch} INSTALL_HDR_PATH=${DESTDIR}/usr headers_install
- # Remove unused files.
- rm -f $(find ${DESTDIR}/usr/include -name .install -or -name ..install.cmd)
+ vmkdir usr/include
+ vcopy usr/include usr
+ find $DESTDIR/usr/include -name '.*' -delete
+ rm $DESTDIR/usr/include/Makefile
# Remove drm headers, use libdrm.
rm -rf ${DESTDIR}/usr/include/drm
}
Notes that headers_check
is nop, now.
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-headers.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this template patch could break more easily IMO this is muchhhh much cleaner so i think we should go @sgn 's route.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works for us since we have a package destdir, so I'm okay with it. However, ideally I'd like to have this patch into upstream, if I can get it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good luck on sending this patch :-p Meanwhile, I'm inclined to not patch the build system with that long command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW if you want to copy a tree w/o rsync you can achieve similar results with find
and a {bsd,}tar
pipe like:
find usr/include \! -type d -iname "*.h" | tar cf - -T - | tar xpf - -C $(INSTALL_HDR_PATH)
This is untested and may need find -print0
and tar --null
in case of blanks in path or filenames.
Any news? |
@sgn or someone else, feel free to take over. I haven't had the mind space to look at our patches to the headers, so I don't know which, if any, are still required, nor if we need new ones. |
b159a6c
to
2503851
Compare
Taking this over. I have adopted it to use the LFS install snippet, and I only kept patch 1-4 which Alpine still has. Alpine also has another patch that I included. I tried building a few packages that need these headers, no issues. |
Haven't tried building anything with them yet. Also, this requires a revbump to all the cross toolchains. And the
rsync
part breaks bootstrap, afaik. So gotta turn that into some nicecp $(find ...)
https://github.com/torvalds/linux/blob/v5.10/Makefile#L1280