Sourcetrail icon indicating copy to clipboard operation
Sourcetrail copied to clipboard

FHS

Open jubalh opened this issue 5 years ago • 9 comments

It would be good if Sourcetrail would follow FHS.

Note: Linux Release packages (.tar.gz and .AppImage) currently depend on linuxdeployqt and are created via the setup/Linux/createPackages.sh script, which documents everything that goes into each package.

jubalh avatar Nov 27 '19 13:11 jubalh

Our Linux build is a bit messy at the moment, mostly because none of us is a real Linux expert. Feel free to restructure.

egraether avatar Nov 27 '19 17:11 egraether

This is very important if the goal is to make Sourcetrail popular, and more users means more contributors, which in turn means more languages supported :smile_cat:

This post by @jubalh basically summarized the things most needed to easily package Sourcetrail, which are:

  1. FHS support, which is very trivial actually - more or less, the executable goes in /usr/bin, libraries go in /usr/lib and data goes in /usr/share/Sourcetrail. The only tricky thing is that some distros (like openSUSE) use /usr/lib64 instead of /usr/lib when building on 64-bit systems, but CMake is able to take care of that. Then there are a bunch of things like icons and manuals which packagers can install themselves, if that's a problem - the main priority is binaries, libraries and data used by the program.
  2. Use system libraries
  3. (This is mine) Do not require an internet connection to build at any point. This is very important for automatic build systems, which are used to distribute official packages

Edit: there are a bunch of GNU/Linux users here, I see from the tracker. Some of us might not be well acquainted with CMake or with the codebase in general but we can provide any help and feedback necessary.

fpesari avatar Dec 31 '19 13:12 fpesari

Do not require an internet connection to build at any point. This is very important for automatic build systems, which are used to distribute official packages

I don't think it does that. We build Sourcetrail for openSUSE in a build system with no network.

jubalh avatar Dec 31 '19 21:12 jubalh

Currently Sourcetrail requires an internet connection when building for the first time to

  • let Maven download the Java dependencies for building the java indexer
  • download the configured release of the Sourcetrail Python indexer for Python language support.

mlangkabel avatar Jan 01 '20 14:01 mlangkabel

Does it require this to build? Because the latest two releases build just fine in our network-less build system.

jubalh avatar Jan 01 '20 16:01 jubalh

It is not required if you build Sourcetrail without Python and Java language support (can be enabled or disabled in cmake).

mlangkabel avatar Jan 01 '20 21:01 mlangkabel

Right. I didn't do that.

Then I agree that this should be changed :)

jubalh avatar Jan 03 '20 09:01 jubalh

I suggest you familiarize yourself with these if you are going to deal with Linux-based desktops and not GUI-less terminals. Especially the basedir-spec. FHS is hardly the full story for "desktop" applications.

PyroSamurai avatar Mar 09 '20 00:03 PyroSamurai

With #1034 we unified all of our Linux release packages to depend on linuxdeployqt.

Now the setup/Linux/createPackages.sh script creates both Linux release packages (.tar.gz and .AppImage) and documents everything that goes into each package.

I think this is as far as I can take it with my Linux knowledge. Anyone looking to improve this can start working from there.

egraether avatar Jun 11 '20 07:06 egraether