gnucash-on-flatpak master: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Mon Feb 17 17:33:36 EST 2020
Updated via https://github.com/Gnucash/gnucash-on-flatpak/commit/7c8f19f4 (commit)
via https://github.com/Gnucash/gnucash-on-flatpak/commit/32f019ff (commit)
from https://github.com/Gnucash/gnucash-on-flatpak/commit/762653ba (commit)
commit 7c8f19f48022447abc6f7a035e382d51565fd5a6
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Feb 17 18:15:13 2020 +0100
Add a note on relationship with our downstream flathub package repo.
diff --git a/README.md b/README.md
index 7ce31af..c0ba033 100644
--- a/README.md
+++ b/README.md
@@ -258,6 +258,32 @@ already due to the way cpanminus handles dependency resolution. The order in whi
same-level dependencies are processed is not stable. A minor annoyance I can live with
for now.
+## Flathub ##
+
+Flathub builds are derived from the gnucash-on-flatpak repository and will generally
+incorporate all changes made here as well with a few exceptions:
+
+- in gnucash-on-flatpak three files are autogenerated by build_package.sh:
+ - gnucash-source.json
+ - gnucash-docs-source.json
+ - gnucash-extra-modules.json
+ In the flathub source repository these are checked in source files.
+- the org.gnucash.GnuCash.json file is tweaked in the flathub source repository to
+ - pass a GNUCASH_BUILD_ID to the build and
+ - to override the gnucash.releases.xml file.
+
+The gnucash.releases.xml file lists package releases, that is versions
+of the flathub package. There can be more than one per gnucash release
+(for example to update aqbanking versions).
+There are a few commands that can help with generating this file:
+- `git describe --match=<major.minor>` can be used to produce the GNUCASH_BUILD_ID (just drop the -gxzy bit). Replace
+`<major.minor>` with the first tag in the gnucash release series (so not 3.8b-5, but 3.8b, or 3.9 not 3.9-7).
+For this to work, obviously these tags should be set on the commits that will be pushed to flathub.
+- `git log --date=short --format="<li>%ad - %s (%an)</li>" <major.minor-pkg>..HEAD` a short list of commits since
+the last tag ready to add in the releases file. In this case we are only interested in the changes since
+the last package release so replace `<major.minor-pkg>` with the most recent tag in the repo, so 3.8b-5
+rather than 3.8.
+
## TODO ##
- try to build gnucash-docs as an extension instead of directly in the main flatpak
commit 32f019ff2a5e65190591981a1cbfc9cf59dc9898
Author: Geert Janssens <geert at kobaltwit.be>
Date: Mon Feb 17 15:35:32 2020 +0100
More modularization
Rearrange the manifest modules to minimize the variable parts.
Only the source lines and module lines that differ between
git and tar builds are split into separate template files.
This should make it easier for the downstream flathub
build to customize parts of the build.
diff --git a/.gitignore b/.gitignore
index 7863a52..673fcac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,6 @@ custom.sh
code_last_rev
docs_last_rev
gnucash-flatpak.gpg
-gnucash.json
+gnucash-docs-source.json
+gnucash-extra-modules.json
+gnucash-source.json
diff --git a/build_package.sh b/build_package.sh
index 2f1d679..7c88834 100755
--- a/build_package.sh
+++ b/build_package.sh
@@ -131,7 +131,12 @@ then
create_remote_dir "$host"/manifests
create_remote_dir "$host"/manifests/$remote_branch_dir
create_remote_dir "$host"/manifests/$remote_branch_dir/$fp_branch
- rsync -a "$fp_git_dir"/org.gnucash.GnuCash.json "$fp_git_dir"/gnucash.json "$fp_git_dir"/modules "$host/manifests/$remote_branch_dir/$fp_branch"
+ rsync -a "$fp_git_dir"/org.gnucash.GnuCash.json \
+ "$fp_git_dir"/gnucash-source.json \
+ "$fp_git_dir"/gnucash-docs-source.json \
+ "$fp_git_dir"/gnucash-extra-modules.json \
+ "$fp_git_dir"/modules \
+ "$host/manifests/$remote_branch_dir/$fp_branch"
echo "Synchronizing flatpak repository"
rsync -a $fp_repo "$host"
diff --git a/functions.sh b/functions.sh
index 5cabe22..b4f9d52 100644
--- a/functions.sh
+++ b/functions.sh
@@ -177,19 +177,35 @@ function prepare_gpg()
function create_manifest()
{
- echo "Writing org.gnucash.GnuCash.json manifest file"
+ echo "Configuring org.gnucash.GnuCash.json manifest module files"
# Export environment variables used in the templates in order for envsubst to find them
export code_repodir docs_repodir code_checksum docs_checksum revision code_revision docs_revision
- gnucash_targets=
- if [[ -f "$fp_git_dir"/templates/gnucash-targets-${build_type}.json.tpl ]]; then
- # Note the variable names passed to envsubst:
- # this limits the set of variables envsubst will effectively substitute
- # We do this to prevent colisions with flatpak variables in the manifest
- envsubst '$code_repodir $docs_repodir $code_revision $docs_revision $revision $code_checksum $docs_checksum' \
- < "$fp_git_dir"/templates/gnucash-targets-${build_type}.json.tpl \
- > "$fp_git_dir"/gnucash.json
+ # Note we explicitly pass a number of variable names to envsubst in
+ # the commands below. This limits the set of variables envsubst will
+ # effectively substitute
+ # We do this to prevent colisions with flatpak variables in the manifest
+ # and module files
+
+ rm -f "$fp_git_dir"/gnucash-source.json
+ if [[ -f "$fp_git_dir"/templates/gnucash-source-${build_type}.json.tpl ]]; then
+ envsubst '$code_repodir $code_revision $revision $code_checksum' \
+ < "$fp_git_dir"/templates/gnucash-source-${build_type}.json.tpl \
+ > "$fp_git_dir"/gnucash-source.json
+ fi
+
+ rm -f "$fp_git_dir"/gnucash-docs-source.json
+ if [[ -f "$fp_git_dir"/templates/gnucash-docs-source-${build_type}.json.tpl ]]; then
+ envsubst '$docs_repodir $docs_revision $revision $docs_checksum' \
+ < "$fp_git_dir"/templates/gnucash-docs-source-${build_type}.json.tpl \
+ > "$fp_git_dir"/gnucash-docs-source.json
+ fi
+
+ rm -f "$fp_git_dir"/gnucash-extra-modules.json
+ if [[ -f "$fp_git_dir"/templates/gnucash-extra-modules-${build_type}.json.tpl ]]; then
+ cp "$fp_git_dir"/templates/gnucash-extra-modules-${build_type}.json.tpl \
+ "$fp_git_dir"/gnucash-extra-modules.json
fi
}
diff --git a/org.gnucash.GnuCash.json b/org.gnucash.GnuCash.json
index 94f3219..0a77c53 100644
--- a/org.gnucash.GnuCash.json
+++ b/org.gnucash.GnuCash.json
@@ -33,6 +33,34 @@
"modules/boost.json",
"modules/googletest.json",
"modules/perl.json",
- "./gnucash.json"
+ "./gnucash-extra-modules.json",
+ {
+ "name": "gnucash",
+ "buildsystem": "cmake-ninja",
+ "config-opts": [
+ "-DBOOST_ROOT=/app"
+ ],
+ "cleanup": [
+ "/share/info",
+ "/share/doc/gnucash/*.csv",
+ "/share/doc/gnucash/*.qif",
+ "/share/doc/gnucash/*.gnucash",
+ "/share/doc/gnucash/ChangeLog*",
+ "/share/doc/gnucash/HACKING",
+ "/share/doc/gnucash/README*",
+ "/share/doc/gnucash/guile-hackers.txt",
+ "/share/doc/gnucash/projects.html"
+ ],
+ "sources": [
+ "./gnucash-source.json"
+ ]
+ },
+ {
+ "name": "gnucash-docs",
+ "buildsystem": "cmake-ninja",
+ "sources": [
+ "./gnucash-docs-source.json"
+ ]
+ }
]
}
diff --git a/templates/gnucash-docs-source-git.json.tpl b/templates/gnucash-docs-source-git.json.tpl
new file mode 100644
index 0000000..c6e7441
--- /dev/null
+++ b/templates/gnucash-docs-source-git.json.tpl
@@ -0,0 +1,5 @@
+{
+ "type": "git",
+ "path": "${docs_repodir}",
+ "branch": "${docs_revision}"
+}
diff --git a/templates/gnucash-docs-source-tar.json.tpl b/templates/gnucash-docs-source-tar.json.tpl
new file mode 100644
index 0000000..ee3fca7
--- /dev/null
+++ b/templates/gnucash-docs-source-tar.json.tpl
@@ -0,0 +1,5 @@
+{
+ "type": "archive",
+ "url": "http://downloads.sourceforge.net/gnucash/gnucash (stable)/${revision}/gnucash-docs-${docs_revision}.tar.gz",
+ "sha256": "${docs_checksum}"
+}
diff --git a/templates/gnucash-extra-modules-git.json.tpl b/templates/gnucash-extra-modules-git.json.tpl
new file mode 100644
index 0000000..25c9574
--- /dev/null
+++ b/templates/gnucash-extra-modules-git.json.tpl
@@ -0,0 +1,6 @@
+{
+ "name": "gnucash-extra-modules",
+ "modules": [
+ "modules/swig.json"
+ ]
+}
diff --git a/templates/gnucash-extra-modules-tar.json.tpl b/templates/gnucash-extra-modules-tar.json.tpl
new file mode 100644
index 0000000..5189a8e
--- /dev/null
+++ b/templates/gnucash-extra-modules-tar.json.tpl
@@ -0,0 +1,3 @@
+{
+ "name": "gnucash-extra-modules"
+}
diff --git a/templates/gnucash-source-git.json.tpl b/templates/gnucash-source-git.json.tpl
new file mode 100644
index 0000000..4dcb40c
--- /dev/null
+++ b/templates/gnucash-source-git.json.tpl
@@ -0,0 +1,5 @@
+{
+ "type": "git",
+ "path": "${code_repodir}",
+ "branch": "${code_revision}"
+}
diff --git a/templates/gnucash-source-tar.json.tpl b/templates/gnucash-source-tar.json.tpl
new file mode 100644
index 0000000..e26af14
--- /dev/null
+++ b/templates/gnucash-source-tar.json.tpl
@@ -0,0 +1,5 @@
+{
+ "type": "archive",
+ "url": "http://downloads.sourceforge.net/gnucash/gnucash (stable)/${revision}/gnucash-${code_revision}.tar.bz2",
+ "sha256": "${code_checksum}"
+}
diff --git a/templates/gnucash-targets-git.json.tpl b/templates/gnucash-targets-git.json.tpl
deleted file mode 100644
index a3eca83..0000000
--- a/templates/gnucash-targets-git.json.tpl
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "gnucash-nightly-modules",
- "modules": [
- "modules/swig.json",
- {
- "name": "gnucash",
- "buildsystem": "cmake-ninja",
- "config-opts": [
- "-DBOOST_ROOT=/app"
- ],
- "cleanup": [
- "/share/info",
- "/share/doc/gnucash/*.csv",
- "/share/doc/gnucash/*.qif",
- "/share/doc/gnucash/*.gnucash",
- "/share/doc/gnucash/ChangeLog*",
- "/share/doc/gnucash/HACKING",
- "/share/doc/gnucash/README*",
- "/share/doc/gnucash/guile-hackers.txt",
- "/share/doc/gnucash/projects.html"
- ],
- "sources": [
- {
- "type": "git",
- "path": "${code_repodir}",
- "branch": "${code_revision}"
- }
- ]
- },
- {
- "name": "gnucash-docs",
- "buildsystem": "cmake-ninja",
- "sources": [
- {
- "type": "git",
- "path": "${docs_repodir}",
- "branch": "${docs_revision}"
- }
- ]
- }
- ]
-}
diff --git a/templates/gnucash-targets-tar.json.tpl b/templates/gnucash-targets-tar.json.tpl
deleted file mode 100644
index 6a4c693..0000000
--- a/templates/gnucash-targets-tar.json.tpl
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "gnucash-release-modules",
- "modules": [
- {
- "name": "gnucash",
- "buildsystem": "cmake-ninja",
- "config-opts": [
- "-DBOOST_ROOT=/app"
- ],
- "cleanup": [
- "/share/info",
- "/share/doc/gnucash/*.csv",
- "/share/doc/gnucash/*.qif",
- "/share/doc/gnucash/*.gnucash",
- "/share/doc/gnucash/ChangeLog*",
- "/share/doc/gnucash/HACKING",
- "/share/doc/gnucash/README*",
- "/share/doc/gnucash/guile-hackers.txt",
- "/share/doc/gnucash/projects.html"
- ],
- "sources": [
- {
- "type": "archive",
- "url": "http://downloads.sourceforge.net/gnucash/gnucash (stable)/${revision}/gnucash-${code_revision}.tar.bz2",
- "sha256": "${code_checksum}"
- }
- ]
- },
- {
- "name": "gnucash-docs",
- "buildsystem": "cmake-ninja",
- "sources": [
- {
- "type": "archive",
- "url": "http://downloads.sourceforge.net/gnucash/gnucash (stable)/${revision}/gnucash-docs-${docs_revision}.tar.gz",
- "sha256": "${docs_checksum}"
- }
- ]
- }
- ]
-}
-
Summary of changes:
.gitignore | 4 ++-
README.md | 26 +++++++++++++++++
build_package.sh | 7 ++++-
functions.sh | 34 ++++++++++++++++------
org.gnucash.GnuCash.json | 30 +++++++++++++++++++-
templates/gnucash-docs-source-git.json.tpl | 5 ++++
templates/gnucash-docs-source-tar.json.tpl | 5 ++++
templates/gnucash-extra-modules-git.json.tpl | 6 ++++
templates/gnucash-extra-modules-tar.json.tpl | 3 ++
templates/gnucash-source-git.json.tpl | 5 ++++
templates/gnucash-source-tar.json.tpl | 5 ++++
templates/gnucash-targets-git.json.tpl | 42 ----------------------------
templates/gnucash-targets-tar.json.tpl | 42 ----------------------------
13 files changed, 118 insertions(+), 96 deletions(-)
create mode 100644 templates/gnucash-docs-source-git.json.tpl
create mode 100644 templates/gnucash-docs-source-tar.json.tpl
create mode 100644 templates/gnucash-extra-modules-git.json.tpl
create mode 100644 templates/gnucash-extra-modules-tar.json.tpl
create mode 100644 templates/gnucash-source-git.json.tpl
create mode 100644 templates/gnucash-source-tar.json.tpl
delete mode 100644 templates/gnucash-targets-git.json.tpl
delete mode 100644 templates/gnucash-targets-tar.json.tpl
More information about the gnucash-changes
mailing list