331.8. tryton-7.0.44
Desktop client for the Tryton business platform and GNU Health, in GTK 3
| Version | 7.0.44, release 1 |
| Shelf | office — Office suites, word processors, spreadsheets, presentations, accounting and finance, and office-format import libraries |
| Phase | 44_apps (Applications), 317 of 422 in build order |
| Licence | GPL-3.0-or-later |
| Homepage | https://www.tryton.org/ |
| Build time | 0.3 SBU |
| Installed size | 3.3 MiB in 346 files |
| Recipe | ports/core/office/tryton/kpkgbuild |
About
Tryton is the GTK 3 desktop client of the Tryton business platform, the ERP that GNU Health runs on: accounting, stock, sales and the rest, served by a Tryton server elsewhere. This port is the client alone. The recipe follows the long-term series that GNU Health runs on, and a client speaks only to a server of its own series.
Sources
tryton-7.0.44.tar.gz(619.6 KiB)
sha256ceb3ba429b352565eb87fca0000291221f61d8cd33f600e3844a4bf8606fdf55
upstream: https://files.pythonhosted.org/packages/source/t/tryton/tryton-7.0.44.tar.gz
archive copy: sources-3/office--tryton-7.0.44.tar.gztryton-vendor-7.0.44.tar.xz(2.7 MiB)
sha256417d80c079ad434a3b48089a8fc1c84e6dfc0f43ef6d535eb0806173d461a941
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-3/office--tryton--tryton-vendor-7.0.44.tar.xz
Dependencies
Depends on: python3, python3-setuptools, python3-pip, python3-wheel, python3-hatchling, python3-hatch-tryton, python3-gobject, python3-cairo, python3-dateutil, gtk3, pango, gdk-pixbuf, librsvg, hicolor-icon-theme.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install tryton'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/office/tryton.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/office/tryton
echo 'ceb3ba429b352565eb87fca0000291221f61d8cd33f600e3844a4bf8606fdf55 tryton-7.0.44.tar.gz' | sha256sum -c -
echo '417d80c079ad434a3b48089a8fc1c84e6dfc0f43ef6d535eb0806173d461a941 tryton-vendor-7.0.44.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/tryton
SRC=$SRC_ROOT/tryton-7.0.44
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf tryton-7.0.44.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers pyrequirements, pyruntime and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p vendor
tar -xf $PORT_SRC/$name-vendor-$version.tar.xz --strip-components=1 -C vendor
pip3 install --ignore-installed --no-deps --no-index --find-links=vendor --no-build-isolation \
--root=$PKG --prefix=/usr goocalendar .
_site=$(python3 -c 'import sys, sysconfig; print(sysconfig.get_path("purelib", vars={"base": sys.argv[1]}))' "$PKG/usr")
find "$_site/tryton/data/locale" -mindepth 1 -maxdepth 1 ! -name 'tryton.pot' -exec rm -rf {} +
install -d "$PKG/usr/share/icons/hicolor/128x128/apps"
rsvg-convert -w 128 -h 128 tryton/data/pixmaps/tryton/tryton.svg \
-o "$PKG/usr/share/icons/hicolor/128x128/apps/tryton.png"
install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/tryton.desktop" <<'EOF2'
[Desktop Entry]
Type=Application
Name=Tryton
GenericName=Business Client
Comment=Accounting, stock, sales and GNU Health, from a Tryton server
Exec=tryton %u
Icon=tryton
Terminal=false
StartupWMClass=tryton
Categories=Office;Finance;GTK;
MimeType=x-scheme-handler/tryton;
Keywords=erp;accounting;invoice;stock;business;health;gnuhealth;tryton;
EOF2
chmod 644 "$PKG/usr/share/applications/tryton.desktop"
The switches, and why each is set:
--ignore-installed— pip installs the named packages into$PKGeven when the build root already has them, instead of reporting the requirement as satisfied and installing nothing.--no-deps,--no-index,--find-links=vendor,--no-build-isolation— The offline Python install: nothing is resolved or downloaded, the one bundled package comes fromvendor/, and the build backends are the ones in the build root: setuptools for the client, and hatchling with python3-hatch-tryton, its Tryton plugin, for GooCalendar.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/tryton, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf tryton-7.0.44-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/tryton, and runs the triggers its paths call for.
Contents
Installed programs: tryton.
Installed directories: /usr/lib/python3.14/site-packages/goocalendar, /usr/lib/python3.14/site-packages/goocalendar-1.0.0.dist-info, /usr/lib/python3.14/site-packages/tryton, /usr/lib/python3.14/site-packages/tryton-7.0.44.dist-info, /usr/share/licenses/tryton.
Notes
The vendor bundle is made by ports/fetch from the recipe’s pypackages line, which names GooCalendar alone. GooCalendar is the widget of the client’s calendar view, nothing else in the tree imports it, and it is not a port, so it is installed into this package beside the client. The bundle also holds the build tools the fetch downloaded with it; build.sh installs only goocalendar from it, and the client itself from the source tree. See The three Python keys.
Every interface translation under tryton/data/locale except the template tryton.pot is deleted from the package. build.sh renders the SVG logo to a 128-pixel PNG with rsvg-convert and writes the desktop entry, which registers the tryton:// URL scheme.
The login dialog’s Wayland app id is the program name, tryton, which the entry’s StartupWMClass names. After login the client registers a GtkApplication whose id names the server, org.tryton.Tryton-<major><minor>._<md5 of host:port/database>, so the main window carries that id and no StartupWMClass can name it.