Issue using pkg2appimage in Docker during AppImage generation
JonoYang opened this issue · 0 comments
JonoYang commented
I'm using pkg2appimage in its extracted form in a Docker container to build an AppImage. I've run into the issue where pkg2appimage fails at the AppImage generation step. I get the error:
+ generate_type2_appimage
++ which appimagetool
+ '[' -z /opt/pkg2appimage.AppDir/usr/bin//appimagetool ']'
++ which appimagetool
+ appimagetool=/opt/pkg2appimage.AppDir/usr/bin//appimagetool
+ '[' 1 ']'
++ mktemp -d
+ appimagetool_tempdir=/tmp/tmp.S9ztWZPiVx
+ mv appimagetool /tmp/tmp.S9ztWZPiVx
mv: cannot stat 'appimagetool': No such file or directory
Makefile:63: recipe for target 'build_docker' failed
make: *** [build_docker] Error 1
Looking at https://github.com/AppImageCommunity/pkg2appimage/blob/master/functions.sh#L229, there should be a $
in front of appimagetool
After making that change, I get the following error:
+ generate_type2_appimage
++ which appimagetool
+ '[' -z /opt/pkg2appimage.AppDir/usr/bin//appimagetool ']'
++ which appimagetool
+ appimagetool=/opt/pkg2appimage.AppDir/usr/bin//appimagetool
+ '[' 1 ']'
++ mktemp -d
+ appimagetool_tempdir=/tmp/tmp.1iIe4VRpC7
+ mv /opt/pkg2appimage.AppDir/usr/bin//appimagetool /tmp/tmp.1iIe4VRpC7
+ pushd /tmp/tmp.1iIe4VRpC7
+ ls -al
total 512
drwx------ 2 root root 4096 Jan 30 20:33 .
drwxrwxrwt 1 root root 4096 Jan 30 20:33 ..
-rwxr-xr-x 1 root root 515008 Jan 30 19:55 appimagetool
+ ./appimagetool --appimage-extract
Option parsing failed: Unknown option --appimage-extract
Makefile:63: recipe for target 'build_docker' failed
make: *** [build_docker] Error 1
I tried commenting out https://github.com/AppImageCommunity/pkg2appimage/blob/master/functions.sh#L227 to https://github.com/AppImageCommunity/pkg2appimage/blob/master/functions.sh#L238 and I was able to create an AppImage.
Is appimagetool
in pkg2appimage.AppImage
supposed to be an AppImage or a normal executable?