aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-08 21:48:53 +0200
committerDanilo M. <danix@danix.xyz>2026-08-08 21:48:53 +0200
commitd97e4c801e14597d070813be15073bb2257c101d (patch)
tree703b2e9a8ee1c61fe1ae231fa9c5f6ef14872951
parent4e34c235cd982baa2b8f8e01d081f3d148050cba (diff)
downloadmy-slackbuilds-d97e4c801e14597d070813be15073bb2257c101d.tar.gz
my-slackbuilds-d97e4c801e14597d070813be15073bb2257c101d.zip
typora-bin: fix root-only install directory
Upstream ships its top directory as 0700. The standard SBo perm-normalize block only remaps the modes it enumerates (777/775/750/711/555/511 and the 6xx/4xx file set), so 0700 passed through untouched and the whole tree installed root-only. Launching as a normal user died with "Permission denied" on the binary. Normalize every directory to 755 explicitly, before the chrome-sandbox chmod so the setuid bit is unaffected. BUILD bumped so the fixed package supersedes the broken one. Worth noting for other repacks: neither sbopkglint nor a container build catches this, both run as root, where 0700 is traversable. Verified here by extracting the package as a normal user and launching the real binary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-rw-r--r--typora-bin/typora-bin.SlackBuild10
1 files changed, 9 insertions, 1 deletions
diff --git a/typora-bin/typora-bin.SlackBuild b/typora-bin/typora-bin.SlackBuild
index c8788e1..2e5110f 100644
--- a/typora-bin/typora-bin.SlackBuild
+++ b/typora-bin/typora-bin.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=typora-bin
SRCNAM=Typora
VERSION=${VERSION:-1.14.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -142,6 +142,14 @@ find -L $PKG \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+# Every directory must be world-traversable. The block above only remaps the
+# modes it lists, and upstream ships its top directory (and some below it) as
+# 0700, which is in neither list and so passes through untouched. That leaves
+# the tree readable only by root, and a non-root launch dies with "Permission
+# denied" on the binary. Root-run lint and root-run builds cannot see this,
+# since 0700 is traversable by root.
+find $PKG -type d -exec chmod 755 {} \+
+
# chrome-sandbox needs setuid root (4755) for Chromium's SUID sandbox. Set it
# LAST, after the find -L perm-normalize above would otherwise strip it.
chmod 4755 $PKG$APPDIR/chrome-sandbox