Created attachment 863043 [details] build log My /etc/portage/savedconfig/sys-kernel/linux-firmware file is a symlink to a file in /etc/kernel. When restore_config() copies it, it copies it as a symlink, rather than following the symlink to the linked file. When the ebuild tries to write to it (to generate/save the default config again), this causes a sandbox violation. I'm not sure if this is the expected behavior, but I think storing savedconfig entries as symlinks makes a lot of sense, and symlinking config files is well-supported across the rest of the portage tree. * ACCESS DENIED: open_wr: /var/tmp/portage/sys-kernel/linux-firmware-20230515/work/linux-firmware-20230515/linux-firmware.conf /var/tmp/portage/sys-kernel/linux-firmware-20230515/temp/environment: line 2121: /var/tmp/portage/sys-kernel/linux-firmware-20230515/work/linux-firmware-20230515/linux-firmware.conf: Permission denied * ERROR: sys-kernel/linux-firmware-20230515::gentoo failed (install phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_install * environment, line 2121: Called die * The specific snippet of code: * echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die; * * If you need support, post the output of `emerge --info '=sys-kernel/linux-firmware-20230515::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-kernel/linux-firmware-20230515::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-kernel/linux-firmware-20230515/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/linux-firmware-20230515/temp/environment'. * Working directory: '/var/tmp/portage/sys-kernel/linux-firmware-20230515/image/lib/firmware' * S: '/var/tmp/portage/sys-kernel/linux-firmware-20230515/work/linux-firmware-20230515' * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY ----------------------- * LOG FILE: "/var/tmp/portage/sys-kernel/linux-firmware-20230515/temp/sandbox.log" * 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: open_wr S: deny P: /var/tmp/portage/sys-kernel/linux-firmware-20230515/work/linux-firmware-20230515/linux-firmware.conf A: /var/tmp/portage/sys-kernel/linux-firmware-20230515/work/linux-firmware-20230515/linux-firmware.conf R: /etc/portage/kernel/modprobed_db/firmwared_6.1.db C: bash /usr/lib/portage/python3.11/ebuild.sh install * --------------------------------------------------------------------------------
Created attachment 863083 [details, diff] patch Give this patch a spin and let me know if it resolves your issue.
Sorry for the delay, just tested it and it works flawlessly! Thanks for fixing this!
Forgot to add, though, why is -R being removed? Are you sure there's no packages that put directories in savedconfig? I figure only removing -P would be enough.
(In reply to Esteve Varela Colominas from comment #3) This cp command is only executed when copying a single config file. Directories are handled via the "treecopy" function just below this.
completely forgot about this until the bug just hit me again right now. it works perfectly, so feel free to apply it.
> https://gitweb.gentoo.org/repo/gentoo.git/commit/? id=6d77f748b77942bcfa792b9d6b436e14e19d5f6e https://sprunki-retake.io Fixed upstream, please bump to 1.2.12!