Summary: | sys-devel/gcc-14.0.1_pre20240407[modula2]: sandbox access violation | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | hugegameartgd |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arsen, frechter, hugegameartgd, jstein, luke5083, toralf |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580 | ||
Attachments: |
sandbox.log
gcc-build-logs m2.patch build.log (m2.patch applied) |
Description
hugegameartgd
2024-04-14 14:08:46 UTC
Created attachment 890824 [details]
gcc-build-logs
VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: mkstemp S: deny P: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX A: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX R: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX C: install-info --dir-file=/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info F: chmod S: deny P: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX A: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX R: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX C: install-info --dir-file=/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info F: remove S: deny P: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX A: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX R: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX C: install-info --dir-file=/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info [31;01m*[0m -------------------------------------------------------------------------------- ---- ``` if [ -f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/work/build/gcc/doc/m2.info ]; then \ rm -f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info*; \ for f in /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/work/build/gcc/doc/m2.info*; do \ realfile=`echo $f | sed -e 's|.*/\([^/]*\)$|\1|'`; \ rm -f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/`basename $realfile`; \ /usr/lib/portage/python3.12/ebuild-helpers/xattr/install -c -m 644 $f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/`basename $realfile`; \ done; \ chmod a-x /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info*; \ else true; fi; \ else true; fi if [ -f gm2 ] && [ -f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info ]; then \ if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \ install-info --dir-file=/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/share/gcc-data/x86_64-pc-linux-musl/14/info/m2.info; \ else true; fi; \ else true; fi [31;01m*[0m [31;01mACCESS DENIED[0m: mkstemp: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX [31;01m*[0m [31;01mACCESS DENIED[0m: chmod: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX [31;01m*[0m [31;01mACCESS DENIED[0m: remove: /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX install-info: Permission denied for /usr/share/gcc-data/x86_64-pc-linux-musl/14/info/dir-XXXXXX make[2]: [/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/work/gcc-14-20240407/gcc/m2/Make-lang.in:416: m2.install-info] Error 1 (ignored) rm -f /var/tmp/portage/sys-devel/gcc-14.0.1_pre20240407/image/usr/x86_64-pc-linux-musl/gcc-bin/14/gcc ``` Looks like failure in the package stage, post install. If such, it should still be possible to merge the package (only without creating a binary package). code: # right after receiving the error message, make sure you're root and then cd /var/db/repos/gentoo/sys-devel/gcc ebuild gcc-<number_of_your_gcc_package>.ebuild qmerge # Should work. You can also do a ebuild gcc-<number_of_your_gcc_package>.ebuild clean # Later, to clean up the waste files. Note you will still be unable to package # it. The bug is still there.. But at least you can use the new gcc. i have a theory: if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ install-info --dir-file=$(infodir)/dir $(DESTDIR)$(infodir)/m2.info; \ else true; fi; \ ^ missing $(DESTDIR) on the --dir-file (m2.install-info) could you try reproducing but changing that line (gcc/m2/Make-lang.in, in m2.install-info) to say '--dir-file=$(DESTDIR)$(infodir)/dir'? *** Bug 931007 has been marked as a duplicate of this bug. *** Created attachment 892701 [details, diff] m2.patch (In reply to Yotam Frechter from comment #3) > If such, it should still be possible to merge the package Yes, the installation can be resumed as a workaround (In reply to Arsen Arsenović from comment #4) > i have a theory: > > if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ > install-info --dir-file=$(infodir)/dir > $(DESTDIR)$(infodir)/m2.info; \ > else true; fi; \ > > ^ missing $(DESTDIR) on the --dir-file (m2.install-info) > > could you try reproducing but changing that line (gcc/m2/Make-lang.in, in > m2.install-info) to say '--dir-file=$(DESTDIR)$(infodir)/dir'? Thanks, rebuilding gcc with the patch resolves the sandbox error Created attachment 892702 [details]
build.log (m2.patch applied)
I sent https://inbox.sourceware.org/gcc-patches/20240520230149.3715520-1-sam@gentoo.org/T/#u upstream. Apparently I didn't backport it. Let me do that now. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=eddf9c85473ad7a63f11c24c664429ebbc8a850f commit eddf9c85473ad7a63f11c24c664429ebbc8a850f Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-27 08:43:50 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-27 08:43:50 +0000 14.1.0: add 77_all_m2_docs_sandbox.patch Bug: https://bugs.gentoo.org/930014 Signed-off-by: Sam James <sam@gentoo.org> 14.1.0/gentoo/77_all_m2_docs_sandbox.patch | 37 ++++++++++++++++++++++++++++++ 14.1.0/gentoo/README.history | 4 ++++ 2 files changed, 41 insertions(+) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58a8301f8c8d595a6a921dc93f0916461ba8d838 commit 58a8301f8c8d595a6a921dc93f0916461ba8d838 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-27 08:46:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-27 08:46:25 +0000 sys-devel/gcc: fix modula2 docs sandbox issue Closes: https://bugs.gentoo.org/930014 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 1 + sys-devel/gcc/gcc-14.1.1_p20240622.ebuild | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) |