Summary: | media-sound/lmms-9999: sandbox violation | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Samuel Bauer <samuel.bauer> |
Component: | Current packages | Assignee: | Alexis Ballier <aballier> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | egorov_egor, opal, polynomial-c, proaudio, sam |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
lmms-9999.ebuild
lmms-9999.patch lmms-9999.patch Add 'cmake-utils_src_install' command to the previous patch lmms-9999.patch |
Can you please attach a unified diff (diff -u) of the ebuild rather than the full ebuild? This would make it much simpler for us to track your changes. Created attachment 554667 [details, diff]
lmms-9999.patch
Sorry I always forget submitting diffs instead of full ebuilds.
Thanks for your patch Samuel. Non-maintainer nitpick: This ebuild inherits cmake-utils, thus when overriding src_prepare it must call cmake-utils_src_prepare. Run that as the first thing in src_prepare, and you can drop eapply_user. Created attachment 555008 [details, diff]
lmms-9999.patch
I have the same issue with LMMS. And with the latest patch it installs only: --- /usr/ --- /usr/share/ --- /usr/share/doc/ >>> /usr/share/doc/lmms-9999/ >>> /usr/share/doc/lmms-9999/README.md.bz2 >>> /usr/share/doc/lmms-9999/AUTHORS.bz2 --- /usr/share/bash-completion/ --- /usr/share/bash-completion/completions/ >>> /usr/share/bash-completion/completions/lmms Created attachment 556948 [details, diff]
Add 'cmake-utils_src_install' command to the previous patch
In this patch I added 'cmake-utils_src_install' command, so now it installs correctly
Isn't it better to use bash-completion-r1.eclass for this? Created attachment 699360 [details, diff]
lmms-9999.patch
Use bash-completion-r1 eclass, I didn't know this eclass, that's why it wasn't used
Remove pkg_preinst() pkg_postinst() pkg_postrm():
all calls to xdg.eclass functions are automatised
Update the patch to use cmake eclass instead of cmake-utils.
Thanks all for suggestions
LGTM, just a note that this seems to affect lmms-1.2.2 as well and same ebuild patch can apply to both. I've built this locally with the patch and it works for me. From my side I didn't encounter sandbox violation with 1.2.2. But if the patch fixes it for both, it's costless to patch both. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb733a28123a671d54a63883dfc694ae30c0798d commit eb733a28123a671d54a63883dfc694ae30c0798d Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2021-04-14 08:21:01 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2021-04-14 08:24:30 +0000 media-sound/lmms: Reliably set bash-completion dir via eclass Thanks-to: Samuel Bauer <samuel.bauer@yahoo.fr> Bug: https://bugs.gentoo.org/670722 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> media-sound/lmms/lmms-9999.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Please test the latest live ebuild and report back your findings. I went a different route than patching the cmake module as it provides a way to override bash-completion path. Please see also https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=205badc11fe29bc12ee3a206ff25f83d874c3b3f So thanks for your contributions and sorry it took so long to fix this. If cmake exposes something it is better. From what I remember, at the time I opened the bug, I didn't find options in the cmake options. I see freebsd guys also opened a bug about this last summer, maybe that gave a boost to lmms team, and leaded to add an option for the completion directory. I think everything should be in order, but didn't compile as currently I stick to stable lmms. |
Created attachment 554582 [details] lmms-9999.ebuild Path for /usr/share/bash-completion/completions/lmms is hardcoded in cmake/modules/BashCompletion.cmake. As a quickfix, I just disabled anything in cmake/modules/BashCompletion.cmake, and intalled the target file via doins.