AppImage / AppImageKit

Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.libera.chat
http://appimage.org
Other
8.7k stars 557 forks source link

Make mksquashfs binary location (optionally) configurable #612

Open probonopd opened 6 years ago

probonopd commented 6 years ago

@adrianschroeter asked:

It would be nice if the mksquashfs binary location could become a configure/compile time option.

TheAssassin commented 6 years ago

Maybe ask back whether a CMake option would suffice?

probonopd commented 6 years ago

Since he mentioned "compile time option" I think yes.

TheAssassin commented 6 years ago

I created a PR in #618. @adrianschroeter this allows for setting the path like -DMKSQUASHFS_DIR=lib/appimagekit, relative to the install root directory (i.e., the directory which is prepended by CMAKE_INSTALL_PREFIX normally. If set, appimagetool will look for mksquashfs relative to the appimagetool binary.

@probonopd we might think about making the directory openSUSE uses the default, though. It isn't any more difficult than putting it in bin, and could be considered a "sane default" for other distros such as Nitrux, too. Also, it's a bit more explicit, since it doesn't rely on the PATH environment variable.

TheAssassin commented 6 years ago

@adrianschroeter this, by the way, should eliminate any maintainer patches, as the binary is also installed into the right directory, this doesn't just alter the "search path" for it.

probonopd commented 6 years ago

Actually /usr/share/... is for architecture-independent code only.

http://www.pathname.com/fhs/pub/fhs-2.3.html#USRSHAREARCHITECTUREINDEPENDENTDATA

This hierarchy is intended to be shareable among all architecture platforms of a given OS; thus, for example, a site with i386, Alpha, and PPC platforms might maintain a single /usr/share directory that is centrally-mounted.

So we should put it somewhere else.

probonopd commented 6 years ago

/usr/lib/appimagekit might possibly be a better idea: http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLIBLIBRARIESFORPROGRAMMINGANDPA

/usr/lib includes (...) internal binaries that are not intended to be executed directly by users or shell scripts. Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory.

Some distributions use libexec but I can't find that in FHS.

TheAssassin commented 6 years ago

Yes, you're right, it should be lib/appimagekit. Edited the comment.

TheAssassin commented 6 years ago

Closed via #618.

probonopd commented 6 years ago

We are now getting

No such file or directory: /usr/local/bin/../lib/appimagekit/mksquashfs

Reference: https://travis-ci.org/probonopd/linuxdeployqt/builds/328445959#L1588

This currently breaks linuxdeployqt builds.

TheAssassin commented 6 years ago

This is not an issue in AppImageKit, but a linuxdeployqt one. uploadtool should be blamed, as it deleted the release although it couldn't upload files for a new one.