`OWD` is not set when `APPIMAGE_EXTRACT_AND_RUN=1`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- c
- Ambito
- operating-systems
Direzione di ricerca
Inizia con src/runtime/runtime.c attorno alla gestione di OWD alla riga 1710, quindi esegui la riproduzione Bazel fornita con e senza APPIMAGE_EXTRACT_AND_RUN=1. Confronta l’output dell’ambiente in entrambe le modalità e verifica che il percorso di esecuzione estratto imposti OWD in modo coerente con il percorso montato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
See https://github.com/lalten/rules_appimage/issues/156
To reproduce:
cd `mktemp -d`
echo 'bazel_dep(name="rules_appimage", version="1.8.0")' > MODULE.bazel
cat <<'EOF' >BUILD
load("@rules_appimage//appimage:appimage.bzl", "appimage")
sh_binary(
name = "test_sh",
srcs = ["test.sh"],
)
appimage(
name = "test.appimage",
binary = ":test_sh",
)
EOF
cat <<'EOF' >test.sh
#!/bin/bash
pwd
env | sort
EOF
chmod +x test.sh
bazel build //:test.appimage
I've attached the resulting test.appimage:
test.appimage.tar.gz
❯ env -i -- PATH="/bin" bazel-bin/test.appimage
/tmp/.mount_test.aIPOIGM/test_sh.runfiles/_main
APPDIR=/tmp/.mount_test.aIPOIGM
APPIMAGE=/home/user/.cache/bazel/_bazel_user/5f48ff965103b174f3c248651ebad24d/execroot/_main/bazel-out/k8-fastbuild/bin/test.appimage
ARGV0=bazel-bin/test.appimage
BUILD_WORKING_DIRECTORY=/home/user/repo
OLDPWD=/home/user/repo
OWD=/home/user/repo
PATH=/bin
PWD=/tmp/.mount_test.aIPOIGM/test_sh.runfiles/_main
RUNFILES_DIR=/tmp/.mount_test.aIPOIGM/test_sh.runfiles
SHLVL=1
TMPDIR=/tmp
_=/bin/env
❯ env -i -- PATH="/bin" APPIMAGE_EXTRACT_AND_RUN=1 bazel-bin/test.appimage
/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles/_main
APPDIR=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36
APPIMAGE=/home/user/.cache/bazel/_bazel_user/5f48ff965103b174f3c248651ebad24d/execroot/_main/bazel-out/k8-fastbuild/bin/test.appimage
APPIMAGE_EXTRACT_AND_RUN=1
ARGV0=bazel-bin/test.appimage
BUILD_WORKING_DIRECTORY=
OLDPWD=/home/user/repo
PATH=/bin
PWD=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles/_main
RUNFILES_DIR=/tmp/appimage_extracted_065248ba50a9cbfc7dc25b7b2eaffc36/test_sh.runfiles
SHLVL=1
TMPDIR=/tmp
_=/bin/env
you can see the OWD variable from https://github.com/AppImage/type2-runtime/blob/9594e2b1306a83b1020145f4e4e29c61065536a4/src/runtime/runtime.c#L1710 is set only when the appimage is mounted via fuse, but not when running with APPIMAGE_EXTRACT_AND_RUN=1.
It probably also makes sense to prefix the env var with APPIMAGE_ but that's a different issue.
- Lingua principale
- C
- Stelle
- 74
- Fork
- 38
- Merge medio
- 3h 31m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AppImage/type2-runtime
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
AppImage/type2-runtime#153 ·
-
fusermount3 get's skipped if not setuid, which breaks new fuse implementationsForse già presa @probonopd l’ha presa 18 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
AppImage/type2-runtime#150 · 4 commenti ·
-
Some apps can break unless it is run extractedForse già presa @probonopd l’ha presa 6 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AppImage/type2-runtime#144 · 2 commenti ·
-
Tagged ReleasesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
AppImage/type2-runtime#140 · 17 commenti · 3 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
AppImage/type2-runtime#133 · 11 commenti · 1 reazione ·
Tutte le issue di AppImage/type2-runtime
Issue simili
-
chore(gateway): emit INFO budget reserved/settled logs for proactivity v2 (chip task_2855f4ec)Apertabackend
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
BasedHardware/omi#20940 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kovidgoyal/kitty#10625 ·
I maintainer di solito rispondono entro 1 giorno
-
Feature Status: Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno