Flameshot: Fix packages (rpm, deb, flatpak, snap)

Created on 4 Sep 2020  路  15Comments  路  Source: flameshot-org/flameshot

Moving to cmake broke the package builds. These need to be fixed and added to CI.

Bug High Priority

All 15 comments

I am in charge of deb packaging in Debian official repository so let me know if you have any question in this area.

For current repo, deb packaging will be usable after merging #814 . After the PR is merged, one only need to move /data/debian/ one level up to be /debian/ and run the package building commands as usual.

Ok thanks for the help. I got that PR merged in and will restructure the folders after fixing the cmake install... Almost done with that (mostly get work done while the baby naps and at night).

It look like we cannot build debian package under 18.04 xenial anymore (cmake 3.13 required when xenial have 3.10).

I am in charge of deb packaging in Debian official repository so let me know if you have any question in this area.

For current repo, deb packaging will be usable after merging #814 . After the PR is merged, one only need to move /data/debian/ one level up to be /debian/ and run the package building commands as usual.

I am newbie, but since now I always build from git repository with auto generating incremented version of package like this :

DEBEMAIL="COLIN Stephane <[email protected]>" dch -b -v $(git --git-dir .git --work-tree . describe --always --tags | cut -c2-) "Update to latest GIT Version..." && sed -i '$!N; /^\(.*\)\n\1$/!P; D' debian/changelog ; head -10 debian/changelog

It generate something like that in 芦 debian/changelog 禄 file avoiding versions collide :

flameshot (0.6.0-85-g3cad32d) UNRELEASED; urgency=medium

  * Update to latest GIT Version...

 -- COLIN Stephane <[email protected]>  Fri, 04 Sep 2020 22:26:13 +0200

For a local repository usage...

It look like we cannot build debian package under 18.04 xenial anymore (cmake 3.13 required when xenial have 3.10).

OK let me see if we are compatible with 3.10. My intention is to support 18.04

That's also one issue that might worth consideration: the minimum version requirement for CMake.

| Distribution version | CMake version | End-Of-Life date |
| ------------- | ------------- | ----------- |
| Debian 9 | 3.7.2 | 2022-06 |
| Debian 10 | 3.13.4 (with 3.16.3 in backports repo) | 2024-06 |
| Ubuntu 16.04 | 3.5.1 | 2021-04 |
| Ubuntu 18.04 | 3.10.2 | 2028-04 |
| Ubuntu 20.04 | 3.16.3 | 2030-04 |


Since we need the nice feature of include(GNUInstallDirs), I believe the minimum cmake version cannot be lower than 3.0.2. On top of that, I would suggest lowering the cmake version requirement to either 3.7 or 3.10 to benefit Ubuntu 18.04 users.

Turns out it requires a minimum of 3.13 due to https://cmake.org/cmake/help/latest/policy/CMP0076.html#policy:CMP0076

I am of the strong opinion that anyone building from source should be open to upgrading build tools like cmake since it is not a runtime dependency. Being stuck on old build tool versions can be really tedious.

If this isn't reasonable from a distro maintainer standpoint I can see what I can do to rollback the behavior but this is not my preference.

That's also one issue that might worth consideration: the minimum version requirement for CMake.
Distribution version CMake version End-Of-Life date
Debian 9 3.7.2 2022-06
Debian 10 3.13.4 (with 3.16.3 in backports repo) 2024-06
Ubuntu 16.04 3.5.1 2021-04
Ubuntu 18.04 3.10.2 2028-04
Ubuntu 20.04 3.16.3 2030-04

Since we need the nice feature of include(GNUInstallDirs), I believe the minimum cmake version cannot be lower than 3.0.2. On top of that, I would suggest lowering the cmake version requirement to either 3.7 or 3.10 to benefit Ubuntu 18.04 users.

I agree...

I have no objection on using CMake 3.13's feature to ease the construction of buildsystem.

Since after all it's flameshot upstream providing the new prebuilt packages, the task is now about installing a new CMake when preparing the prebuilt package before new version release (e.g. 0.8.0) and this _might_ be able to integrate into CI/CD.

There are a few things I'd like to say about CI/CD in the flameshot previous qmake build system: it uses this python tool https://github.com/packpack/packpack to package RPMs & Debian based on docker images from different distributions with the I've forked the repositories to organization flameshot-org(previously called flameshotapp).
some related links:

This sounds like a great idea. I can work on this after fixing the packages. Or feel free to submit a pr if you have time.

If anyone is particularly good with snaps I could use help fixing the snap. I have a branch with the deb, rpm, and flatpak updated but am struggling to get the snap working properly.

This PR https://github.com/flameshot-org/flameshot/pull/851 only for deb & rpm. For flatpak, snap and appimage need some time to resolve.

Thanks @ZetaoYang !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

makz27 picture makz27  路  4Comments

abba23 picture abba23  路  3Comments

bingoIsCoder picture bingoIsCoder  路  4Comments

mrinvisible0 picture mrinvisible0  路  4Comments

gdude2002 picture gdude2002  路  4Comments