commit:     fb4f46b331081ce7aaf4272f4b1c93e34e6047dd
Author:     Mason Rocha <turret <AT> turret <DOT> cyou>
AuthorDate: Sat Dec 13 23:57:18 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Dec 15 08:26:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb4f46b3

app-text/zathura: add info message for sandboxing functionality

Closes: https://bugs.gentoo.org/967373
Signed-off-by: Mason Rocha <turret <AT> turret.cyou>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 app-text/zathura/zathura-0.5.13.ebuild | 15 +++++++++++++++
 app-text/zathura/zathura-9999.ebuild   | 15 +++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/app-text/zathura/zathura-0.5.13.ebuild 
b/app-text/zathura/zathura-0.5.13.ebuild
index 75463e98d553..9508572450f2 100644
--- a/app-text/zathura/zathura-0.5.13.ebuild
+++ b/app-text/zathura/zathura-0.5.13.ebuild
@@ -75,3 +75,18 @@ src_install() {
                dosym zathura-sandbox /usr/bin/zathura
        fi
 }
+
+pkg_postinst() {
+       if use seccomp || use landlock; then
+               elog "Zathura has been installed as a symlink to 
zathura-sandbox due to USE"
+               elog "seccomp or USE landlock.  Some features such as printing 
or hyperlinks"
+               elog "may be unavailable when running with the default 
executable (zathura)."
+               elog "If you require these features, you can temporarily switch 
to using"
+               elog "zathura-full or disable these use flags."
+               if ! use elibc_glibc; then
+                       ewarn ""
+                       ewarn "Upstream zathura does not test sandboxing rules 
on non-glibc"
+                       ewarn "environments.  Your mileage may vary using the 
sandboxed variant."
+               fi
+       fi
+}

diff --git a/app-text/zathura/zathura-9999.ebuild 
b/app-text/zathura/zathura-9999.ebuild
index 75463e98d553..9508572450f2 100644
--- a/app-text/zathura/zathura-9999.ebuild
+++ b/app-text/zathura/zathura-9999.ebuild
@@ -75,3 +75,18 @@ src_install() {
                dosym zathura-sandbox /usr/bin/zathura
        fi
 }
+
+pkg_postinst() {
+       if use seccomp || use landlock; then
+               elog "Zathura has been installed as a symlink to 
zathura-sandbox due to USE"
+               elog "seccomp or USE landlock.  Some features such as printing 
or hyperlinks"
+               elog "may be unavailable when running with the default 
executable (zathura)."
+               elog "If you require these features, you can temporarily switch 
to using"
+               elog "zathura-full or disable these use flags."
+               if ! use elibc_glibc; then
+                       ewarn ""
+                       ewarn "Upstream zathura does not test sandboxing rules 
on non-glibc"
+                       ewarn "environments.  Your mileage may vary using the 
sandboxed variant."
+               fi
+       fi
+}

Reply via email to