Appimagekit: Error: Could not find section .sig_key in runtime

Created on 5 Jun 2018  路  18Comments  路  Source: AppImage/AppImageKit

I can not sign my AppImage anymore; i use a VM based on Debian Jessie. It's broken since an update of AppImageKit.

appimagetool, continuous build (commit 15473cf), build 1754 built on 2018-06-01 00:34:21 UTC
WARNING: appstreamcli command is missing, please install it if you want to use AppStream metadata
Using architecture x86_64
/home/blupi/planetblupi-dev/Release/src/planetblupi_Project-build/deploy/linux-appimage/planetblupi should be packaged as /home/blupi/planetblupi-dev/Release/src/planetblupi_Project-build/package/linux-appimage/planetblupi.AppImage
WARNING: AppStream upstream metadata is missing, please consider creating it
         in usr/share/metainfo/planetblupi.appdata.xml
         Please see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
         for more information or use the generator at http://output.jsbin.com/qoqukof.
Generating squashfs...
Parallel mksquashfs: Using 6 processors
Creating 4.0 filesystem on /home/blupi/planetblupi-dev/Release/src/planetblupi_Project-build/package/linux-appimage/planetblupi.AppImage, block size 131072.
[======================================================================================|] 1361/1361 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
    compressed data, compressed metadata, compressed fragments, compressed xattrs
    duplicates are removed
Filesystem size 104659.16 Kbytes (102.21 Mbytes)
    73.52% of uncompressed filesystem size (142355.55 Kbytes)
Inode table size 6846 bytes (6.69 Kbytes)
    37.38% of uncompressed inode table size (18314 bytes)
Directory table size 3064 bytes (2.99 Kbytes)
    34.32% of uncompressed directory table size (8928 bytes)
Number of duplicate files found 6
Number of inodes 438
Number of files 386
Number of fragments 86
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 52
Number of ids (unique uids + gids) 1
Number of uids 1
    root (0)
Number of gids 1
    root (0)
Embedding ELF...
Marking the AppImage as executable...
Embedding MD5 digest
gpg2 and sha256sum are installed and user requested to sign, hence signing
gpg: WARNING: The GNOME keyring manager hijacked the GnuPG agent.
gpg: WARNING: GnuPG will not work properly - please configure that tool to not interfere with the GnuPG system!
Could not find section .sig_key in runtime

WTF?

Thanks

high-priority

Most helpful comment

Release is on the way.

All 18 comments

How do you invoke appimagetool?

Here this CMake file that I use:
https://github.com/blupi-games/planetblupi/blob/master/cmake/LinuxAppImageBuild.cmake

# Do the actual packaging step with AppImageKit
add_custom_command (
    TARGET ${TARGET}
    POST_BUILD
    COMMAND "${APPIMAGE_ASSISTANT_PROGRAM}" -s "${APPIMAGE_INTERMEDIATE_DIR}" "${APPIMAGE_FINAL_NAME}"
)

Where APPIMAGE_ASSISTANT_PROGRAM is the path on appimagetool-x86_64.AppImage APPIMAGE_INTERMEDIATE_DIR if for the AppDir, APPIMAGE_FINAL_NAME is "${APPIMAGE_OUTPUT_DIRECTORY}/${APPIMAGE_TITLE}.AppImage" for the output.

appimagetool comes from here:

set (APPIMAGE_TOOL_BIN     "appimagetool-x86_64.AppImage")
set (APPIMAGE_TOOL_URL "https://github.com/probonopd/AppImageKit/releases/download/continuous/${APPIMAGE_TOOL_BIN}")

Here the exact call when compiling with make VERBOSE=1

/home/schroeterm/devel/planetblupi-dev/Release/bin/appimagetool-x86_64.AppImage -s /home/schroeterm/devel/planetblupi-dev/Release/src/planetblupi_Project-build/deploy/linux-appimage/planetblupi /home/schroeterm/devel/planetblupi-dev/Release/src/planetblupi_Project-build/package/linux-appimage/planetblupi.AppImage

@Skywalker13 hm, that's definitely an issue. I initially assumed you were using an outdated version of appimagetool or a custom runtime that was too old.

I just saw you were actually trying to sign your AppImage. The .sig_key section is used to embed your public key in the AppImage. It _should_ be there.

There's been some changes about how the runtime is built recently. I guess this issue is related to it. See #792 and #789. CC @nurupo @probonopd

Why didn't we encounter this issue for our own AppImages?

I have no clue. But somebody should try to reproduce the issue.

Since I don't have the possibility to investigate, can you have a look please @TheAssassin? Can you say when it stopped working @Skywalker13 or which version still produced a working result?

I must try by bisecting your releases of appimagetool...

How can I download previous releases please? It seems that the release is always replaced by the new one https://github.com/AppImage/AppImageKit/releases

My last release of Planet Blupi was the 2018.03.14 (working perfectly with the same VM); my last use of appimagetool was just yesterday and I always used the last release provided by https://github.com/probonopd/AppImageKit/releases/download/continuous/

Note that I've exactly the same problem with all my computers. The bug is the same on Debian Buster.

@Skywalker13 you can't really test it as @probonopd suggested... The old releases aren't stored anywhere (yet).

I'll try to have a look today.

How can I help you ? For me it's very easy to reproduce because it fails with all my systems. I'm blocked on this regression for my release.

The file does indeed contain a .sig_key section, I just checked this with readelf:

  [28] .sig_key          PROGBITS         0000000000000000  00023e88
       0000000000002000  0000000000000000           0     0     1

I just tried, though, and get the same error message. I am pretty sure this bug is not related to the other issues. I'll check the source code to find out the cause of this false positive.

PR WIP in #802.

@Skywalker13 fixed, but I'd like you to confirm before merging the PR. Please try https://transfer.sh/teVMU/appimagetool-x86_64.AppImage.

Marking the AppImage as executable...
Embedding MD5 digest
gpg2 and sha256sum are installed and user requested to sign, hence signing
gpg: using "FB28B3C927C0A0EA" as default secret key for signing
Success
/home/schroeterm/devel/planetblupi-dev/Release/src/planetblupi_Project-build/package/linux-appimage/planetblupi.AppImage --appimage-signature
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEPxpdP3aajPAoLxrbi5FFpfqdqKgFAlsZRxYACgkQi5FFpfqd
qKhqJwf/W/g6PPRhHy5voSCyk4i9j+DZXXnJx0Vt3BB4gSlYVixRHGIxd3a4I3+G
98zey5Wfoo3d7DbA9CH4KoSwqL54sRsrYvuFY9bbeFKW5uBcd4rwyCrHun7K+HOI
BhBmTI508DwdI4zqtvhxTI1WpxdkPRAFGehyufv/bmM4hrRzLIfshpfAFu9sQE5X
HvWOwm0YcvukvHNjaYKgVjp/bLOZPZnOEe6KGoDJi6Fjn5cIjeVGpJissffxzHu2
/nU5OVjqV9SqW8UBXMn+WtifoLx/9lE8eRNeJuM93IZKkQkhdZV6hQp9dndx6cuL
rE4t4UjwtYlELwEB2y0X51rpwWJqjw==
=MbWG
-----END PGP SIGNATURE-----

It's working perfectly, thank you!

Release is on the way.

Thanks a lot.

Was this page helpful?
0 / 5 - 0 ratings