Closed vinniec2 closed 3 months ago
In my case the AppImageis created, steps to create it:
The sequence is: blank, blank, Y, Y
Be sure you have imagemagick and tar installed on your host.
The AppImage for me is 72,6 MB
but it didn't work because the files are installed in .junest/opt , one of the directories mounted in the JuNest container
this is the root of the AppDir
and this is the error messafe I've got by running the app
/usr/bin/infra-arcana: line 2: cd: /opt/infra-arcana: No such file or directory
/usr/bin/infra-arcana: line 3: /home/ivan/Scrivania/tmp/ia: No such file or directory
/tmp/.mount_Infra-LcmCEm/.local/share/junest/lib/core/wrappers.sh: riga 30: /home/ivan/Scrivania/tmp/Infra-Arcana_22.1.0-1-archimage3.4-x86_64.AppImage.home/.cache/junest_wrapper.old: File o directory non esistente
which means that you need to add manually extra steps to move the content of /opt to /usr/share, for example, and also you need to let the AppRun script point to the "ia" binary using JuNest, like this, change:
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- $EXEC "$@"
with
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- /usr/share/infra-arcana/ia "$@"
you can take my ocenaudio Archimage as an example
mine contains an additional step like, lines 113/114
# MOVE OCENAUDIO TO /usr/share
mv ./.junest/opt/ocenaudio ./.junest/usr/share/ocenaudio
the change in my AppRun is this (lines 106 to 109)
case "$1" in
'') $HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV" -- /usr/share/ocenaudio/bin/ocenaudio "$@";;
*) $HERE/.local/share/junest/bin/junest -n -b "$ETC_RESOLV" -- /usr/share/ocenaudio/bin/ocenvst "$@";;
esac
you only need one line there instead, ocenaudio have two binaries, so I had to do so.
And that is.
I tried but it still fails to build the appimage, this is my edited infra-arcana-junest.sh
the edited parts are:
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- /usr/share/infra-arcana/ia "$@"
mv ./.junest/opt/infra-arcana ./.junest/usr/share/infra-arcana
somehow toward the end it doesn't create the appimage so that the script can't rename it in the last instruction that fails.
The dependencies I provide before trying the script are these:
apk add tar imagemagick bash fuse3 git rsync wget xdg-user-dirs
strange, I suggest to take track of the commands used in this script (not the ones used inside JuNest) and install them on your host.
Now I'll try to buid it for you, if I reach I'll share the script here, so you can see the differences between yours and mine.
Again, if you can't built the AppImage, you may have some missing dependences on the host, not in JuNest.
In the meantime see if your app's structure is the same as mine in the screenshots.
@vinniec2 this is the one I've built with the changes I suggested above:
for now I only get an error about missing dsp device and failed to init SDL, I'll try to fix it. In the meantime, compare the two scripts, try to run this one on your PC and, if it fails, check what are the missing commands on your host system.
PS: is AppStream installed on your system? this new version on Appimagetool I use needs it to validate and bundle the AppImages.
From LD_DEBUG=libs ./*AppImage
:
40835: find library=libpipewire-0.3.so.0 [0]; searching
40835: search cache=/etc/ld.so.cache
40835: trying file=/usr/lib/libpipewire-0.3.so.0
40835:
40835:
40835: calling init: /usr/lib/libpipewire-0.3.so.0
40835:
[E] pw.loop [loop.c:67 pw_loop_new()] 0x2367ec0: can't make support.system handle: No such file or directory
40835:
40835: calling fini: /usr/lib/libpipewire-0.3.so.0 [0]
40835:
ERROR: Failed to init SDL
dsp: No such audio device
also installing "libpipewire" does not solves the issue.
I don't know what "infra-arcana" is, but it seems to be dependent from a Pipewire-related dependence I don't know
I've solved the above by changing DEPENDENCES like this:
DEPENDENCES="ca-certificates libpipewire pipewire"
however I get another error
50469: calling fini: /usr/lib/pipewire-0.3/libpipewire-module-rt.so [0]
50469:
ERROR: Failed to init SDL_mixer
Pipewire: Failed to connect stream
ERROR: Failed to find or read xml file at: data/colors/colors.xml
tinyxml2 reported error: XML_ERROR_FILE_NOT_FOUND
that is related to a "colors.xml" file that should be in /opt, while we have moved all in /usr/share
I need to mount /opt because my package manager "AM" installs all apps there, so symlinks are not recognized if the directory on the host system is not detected. This is the bad of JuNest container into an AppImage.
I've started a new test by removing /opt in the mountpoints and installing infra-arcana in /opt as it should be.
Also I added the following dependences listed on the AUR: " sdl2_image and sdl2_mixer"
So DEPENDENCES loks like this:
DEPENDENCES="ca-certificates libpipewire pipewire sdl2_image sdl2_mixer"
the result is the app is stuck with this message (without interrupting its running):
87024: calling fini: /usr/lib/pipewire-0.3/libpipewire-module-rt.so [0]
87024:
ERROR: Failed to init SDL_mixer
Pipewire: Failed to connect stream
so the error related to "colors.xml" is disappeared.
You should investigate on why we have this SDL error. I'm not an expert about SDL, Pipewire and similar stuff.
I'll copy/paste the experimental script I used here:
"experimental" because I don't think it would be suitable for AM Application Manager.
See if you figure out on how to made the AppImage work first.
And again, if you're unable to run this script correctly, take track of the commands used in the script, also install imagemagick and appstream.
Last and more important thing: for any compatibility test, I suggest to install your app inside a normal JuNest installation. From there you will see if it is only an issue related to the missing libraries or if it it the app itself that can't work into this kind of container.
See the original project on which this, Archimage, is based on, at https://github.com/fsquillace/junest
In the meantime see if your app's structure is the same as mine in the screenshots.
/media/date/archimage/archimage/infra6 $ ls -Ax --group-directories-first ./ base deps infra-arcana.AppDir junest-backups stock-cache stock-local appimagetool depdeps infra-arcana-junest.sh
In the main dir it seems that I don't have
Infra-Arcana...Appimage
and...home
/media/date/archimage/archimage/infra6 $ ls -Ax --group-directories-first ./infr
a-arcana.AppDir/.junest/opt/
opt/ is empty, the infra-arcana dir is in ./junest-backups/opt/
/media/date/archimage/archimage/infra6 $ ls -Ax --group-directories-first ./infra-arcana.AppDir/
.cache .config .junest
.local .wget-hsts AppRun
infra-arcana.desktop infra-arcana.png
in ./infra-arcana.AppDir
are missing: .gnupg
and .DirIcon
I keep reading your next posts
I am comparing my version of the generated script with your latest version, so far the differences are:
./.local/share/junest/bin/junest -- gpg --keyserver keyserver.ubuntu.com --recv-key C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF # UNCOMMENT IF YOU USE THE AUR
uncommented .gnupg
mentioned before#mv ./.junest/opt/$APP ./.junest/usr/share/$APP
at line 118, I had put the equivalent at line 171 ( mv ./.junest/opt/infra-arcana ./.junest/usr/share/infra-arcana
)$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- $EXEC "$@"
) instead of variation ( $HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- /usr/share/infra-arcana/ia "$@"
)/usr/lib/locale /usr/lib/locale
instead of /opt /opt
I'm going to try running your version now and see what happens. I had already tried junest a few years ago but didn't understand much about how it works.
keep me updated
Any news?
In the meantime I've built this script using the new template
all I've got is this error message and I'm stucl on it
[E] pw.loop [loop.c:67 pw_loop_new()] 0xf046a0: can't make support.system handle: No such file or directory
ERROR: Failed to init SDL_mixer
I've added the following dependences
DEPENDENCES="ca-certificates alsa-lib alsa-utils dbus libpipewire pipewire pipewire-alsa pipewire-audio pulseaudio sdl2 sdl2_image sdl2_mixer"
and these keywords
BINSAVED="certificates pipewire pw-" # Enter here keywords to find and save in /usr/bin
SHARESAVED="certificates SAVESHAREPLEASE" # Enter here keywords or file/folder names to save in both /usr/share and /usr/lib
LIBSAVED="pk p11 alsa jack pipewire pulse SAVELIBSPLEASE" # Enter here keywords or file/folder names to save in /usr/lib
also I've commented the line 177, in the AppRun
#if test -d /opt; then OPT_DIR=' --bind /opt /opt '; fi
so the AppImage is created, about 85 MB.
About the audio issue, this is another topic. If you know what happens, let me know here.
I close this issue.
I have done several trials without success, I am doing the trial with infra-arcana, I am on alpine linux and I had to install git and bash to start archimage-cli.
The log is too long and I can't attach text files to issues (!) so i created some gists. This is the editet infra-arcana script: https://gist.githubusercontent.com/vinniec2/154bb0a3e5bd17d4e8ed8068faaa3142/raw/9a7ae1d98543c524979a2df1a9b6bed2d35b4701/gistfile2.txt
And this is the full log: https://gist.githubusercontent.com/vinniec2/154bb0a3e5bd17d4e8ed8068faaa3142/raw/9a7ae1d98543c524979a2df1a9b6bed2d35b4701/gistfile1.txt