Difference between revisions of "Dependency Updates"
(→Nightlies: simultanous update) |
(Add info on how to update flatpak dependencies) |
||
Line 12: | Line 12: | ||
[gnucash-on-flatpak](https://github.com/gnucash/gnucash-on-flatpak) | [gnucash-on-flatpak](https://github.com/gnucash/gnucash-on-flatpak) | ||
− | + | Flatpak is configured via module files in the [https://github.com/Gnucash/gnucash-on-flatpak/tree/master/modules modules directory]. | |
+ | Each dependency is defined with a download URL and a SHA checksum. | ||
+ | Updating a dependency means updating these URL's with accompanying SHA checskums. | ||
+ | |||
+ | There are two exceptions: | ||
+ | * the gnucash and gnucash-docs version information itself is deduced by the build script. These should never be manually entered in module files. The build script will generate a gnucash.json file in the module's base directory. This file can also be used to update the [https://flathub.org/apps/details/org.gnucash.GnuCash Flathub GnuCash package] which is built automatically from [https://github.com/flathub/org.gnucash.GnuCash gnucash flathub repository]. | ||
+ | * the list of cpan modules in [https://github.com/Gnucash/gnucash-on-flatpak/blob/master/modules/finance-quote-sources.json finance-quote-sources.json] are generated using a script from [https://github.com/flatpak/flatpak-builder-tools flatpak-builder-tools]. Below is a short description on how this can be generated. | ||
+ | |||
+ | === How to generate finance-quote-sources.json === | ||
+ | |||
+ | * Install the required perl modules to run the generator script. This is only needed if these modules are not on your system yet. As mentioned on the flatpak-builder-tools page on Fedora that would be<Syntaxhighlight lang="sh"> | ||
+ | sudo dnf install 'perl(App::cpanminus)' 'perl(Getopt::Long::Descriptive)' 'perl(JSON::MaybeXS)' 'perl(LWP::UserAgent)' 'perl(MetaCPAN::Client)' 'perl(Pod::Simple::SimpleTree)'</Syntaxhighlight> | ||
+ | * Run the generator script<Syntaxhighlight lang="sh"> | ||
+ | FBTDIR=<local-path-to-flatpak-builder-tools-repo> | ||
+ | GOFDIR=<local-path-to-gnucash-on-flatpak-repo> | ||
+ | $FBTDIR/cpan/flatpak-cpan-generator.pl -o $GOFDIR/modules/finance-quote-sources.json Date::Manip Finance::Quote</Syntaxhighlight> | ||
+ | |||
+ | There is one caveat: the generator script fails to keep consistent ordering in the finance-quote dependencies. So two subsequent runs of the generator script can result in plenty of changes even if no dependency has changed at all. This is unfortunately inherent to how cpan works so there's not much we can do about it. As we normally only update finance::quote dependencies whenever there's a new version of finance::quote I don't consider this a big issue. | ||
+ | |||
==Apple MacOS== | ==Apple MacOS== |
Revision as of 19:30, 16 February 2020
GnuCash provides the following binary releases. When feasible and after testing, they can be updated to provide the new version. While the canonical repositories are on code, those are accessible only to the core team so the links are to the Github mirrors.
Keep in mind that these binary distributions are for ordinary users. As a general rule only stable release dependencies should be used for these packages. Exceptions may be made when an unstable release fixes a serious bug, but that should be discussed at length by the core team.
For developers with push privileges, unless you're able to
- test the new dependency version yourself,
- the upgrade is stable, and
- you're certain that there won't be a negative impact on users
create a pull request on Github so that others in the core team can test the change.
Contents
Linux Flatpak
[gnucash-on-flatpak](https://github.com/gnucash/gnucash-on-flatpak)
Flatpak is configured via module files in the modules directory. Each dependency is defined with a download URL and a SHA checksum. Updating a dependency means updating these URL's with accompanying SHA checskums.
There are two exceptions:
- the gnucash and gnucash-docs version information itself is deduced by the build script. These should never be manually entered in module files. The build script will generate a gnucash.json file in the module's base directory. This file can also be used to update the Flathub GnuCash package which is built automatically from gnucash flathub repository.
- the list of cpan modules in finance-quote-sources.json are generated using a script from flatpak-builder-tools. Below is a short description on how this can be generated.
How to generate finance-quote-sources.json
- Install the required perl modules to run the generator script. This is only needed if these modules are not on your system yet. As mentioned on the flatpak-builder-tools page on Fedora that would be
sudo dnf install 'perl(App::cpanminus)' 'perl(Getopt::Long::Descriptive)' 'perl(JSON::MaybeXS)' 'perl(LWP::UserAgent)' 'perl(MetaCPAN::Client)' 'perl(Pod::Simple::SimpleTree)'
- Run the generator script
FBTDIR=<local-path-to-flatpak-builder-tools-repo> GOFDIR=<local-path-to-gnucash-on-flatpak-repo> $FBTDIR/cpan/flatpak-cpan-generator.pl -o $GOFDIR/modules/finance-quote-sources.json Date::Manip Finance::Quote
There is one caveat: the generator script fails to keep consistent ordering in the finance-quote dependencies. So two subsequent runs of the generator script can result in plenty of changes even if no dependency has changed at all. This is unfortunately inherent to how cpan works so there's not much we can do about it. As we normally only update finance::quote dependencies whenever there's a new version of finance::quote I don't consider this a big issue.
Apple MacOS
[gnucash-on-osx](https://github.com/gnucash/gnucash-on-osx)
Microsoft Windows
[gnucash-on-windows](https://github.com/gnucash/gnucash-on-windows)
- Repos, filenames and versions are stored in gnucash-on-windows/blob/master/gnucash.modules,
- on changes of major versions, adjust the include dirs in bundle-mingw64.ps1.
Nightlies
Nightlies are currently built for Flatpak and Windows. Ideally you would update the changes for both.
- Update workflow
-
- Download the .tar.gz file because Flatpak uses sha256, but aqbanking.de currently only displays MD5 checksums,
- Copy the URL into your Flatpak PR (in Redmine each file version has a unique file number directory),
- Copy the relevant parts into branch.module and version of your Windows PR
- Compare
md5sum *.tar.gz
with the website, - Copy the output from
sha256sum *.tar.gz
into Flatpak's sha, - Create PRs on gnucash-on-flatpack and gnucash-on-windows.
- Bundling unstable dependencies
- Enable debug symbols (-g) also on this modules. More detailed stack traces will help their developers to fix critical bugs faster.