View Issue Details

IDProjectCategoryView StatusLast Update
0011076Talermerchant backendpublic2026-03-20 23:55
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version1.5Fixed in Version1.5 
Summary0011076: merchant report PDF generation fails with permission error on Debian trixie
DescriptionThe report generation works locally on my system, but on the server we run into a permission problem. See logs below.
Additional InformationFeb 14 21:55:57 betel taler-merchant-httpd[329291]: error: failed to load package (failed to create temporary package directory: Permission denied (os error 13))
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: ┌─ usr/share/taler-merchant/typst-forms/transactions.typ:1:8
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: │
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: 1 │ #import "@preview/cetz:0.4.2": canvas, draw, palette
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: │ ^^^^^^^^^^^^^^^^^^^^^
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: help: error occurred while importing this module
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: ┌─ tmp/taler-typst-zXYooV/0/input.typ:1:8
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: │
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: 1 │ #import "/usr/share/taler-merchant/typst-forms/transactions.typ": form
Feb 14 21:55:57 betel taler-merchant-httpd[329291]: │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 14 21:55:57 betel taler-merchant-httpd[329227]: (SQABCVGPAAJK7MQH63Y4WKY51R) ERROR typst exited with status 1
Tagsdiscussion-needed

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0010588 closedChristian Grothoff After installing taler-merchant (Deb/trixie-testing): /var/lib/taler-merchant missing, instead /var/lib/taler-exchange is there 

Activities

Florian Dold

2026-02-14 22:09

manager   ~0027722

Note that running it as root *works*:

$ typst compile --root / /tmp/taler-typst-zXYooV/0/input.typ

Running it via `sudo -u taler-merchant-httpd ...` results in the same error message we see above.

Florian Dold

2026-02-14 22:12

manager   ~0027723

Note that typst does try to download packages while building (!), so it might be that downloading the packages causes the permission issues. We either need to accommodate for this somehow or download the packages beforehand / during installation if possible.

Florian Dold

2026-02-14 22:18

manager   ~0027724

The folder that typst wants to write to is: /var/lib/taler-merchant/.cache/typst/packages/

Florian Dold

2026-02-14 22:19

manager   ~0027725

While typst does't have an official way to download packages for "offline use", we should either hack around this or not use the package.

Florian Dold

2026-02-14 22:22

manager   ~0027726

We fixed it manually by creating the .cache directory and setting the permissions.

We should still discuss how to properly solve this / what to do about the dynamic package downloads.

Florian Dold

2026-02-14 22:44

manager   ~0027727

Last edited: 2026-02-14 23:01

IMO, the proper way is to use local packages (https://github.com/typst/packages?tab=readme-ov-file#local-packages).

TL;DR: Typst can load packages from $XDG_DATA_HOME/typst/packages/local/$NAME/$VERSION.

It solves multiple problems:
* We don't need to rely on dynamically downloaded packages anymore
* You don't need to break the sandbox anymore. Common files (i.e. .typ files or images) just go into a local typst package (i.e. a taler-merchant or taler-exchange typst package) that is installed with whatever package we're installing.

Christian Grothoff

2026-03-04 22:01

manager   ~0027989

I've now packaged the *exchange* typst resources. Next: same for merchant.

Christian Grothoff

2026-03-06 14:18

manager   ~0028012

Merchant modified, next need to test the Debian packages.

Issue History

Date ModifiedUsernameFieldChange
2026-02-14 22:02Florian DoldNew Issue
2026-02-14 22:02Florian DoldStatusnew => assigned
2026-02-14 22:02Florian DoldAssigned To => Christian Grothoff
2026-02-14 22:09Florian DoldNote Added: 0027722
2026-02-14 22:12Florian DoldNote Added: 0027723
2026-02-14 22:18Florian DoldNote Added: 0027724
2026-02-14 22:19Florian DoldNote Added: 0027725
2026-02-14 22:22Florian DoldNote Added: 0027726
2026-02-14 22:22Florian DoldStatusassigned => feedback
2026-02-14 22:44Florian DoldNote Added: 0027727
2026-02-14 22:44Florian DoldStatusfeedback => assigned
2026-02-14 22:45Florian DoldStatusassigned => feedback
2026-02-14 22:46Florian DoldNote Edited: 0027727
2026-02-14 23:01Florian DoldNote Edited: 0027727
2026-02-22 13:27Christian GrothoffTarget Version1.5 => 1.6
2026-02-22 14:15Christian GrothoffRelationship addedrelated to 0010588
2026-02-26 19:02Christian GrothoffTag Attached: discussion-needed
2026-02-26 19:02Christian GrothoffPrioritynormal => high
2026-02-26 19:04Christian GrothoffRelationship addedrelated to 0011072
2026-02-26 19:04Christian GrothoffRelationship deletedrelated to 0011072
2026-03-04 22:00Christian GrothoffStatusfeedback => assigned
2026-03-04 22:01Christian GrothoffNote Added: 0027989
2026-03-06 14:18Christian GrothoffNote Added: 0028012
2026-03-06 20:34Christian GrothoffStatusassigned => informing
2026-03-06 20:34Christian GrothoffResolutionopen => fixed
2026-03-06 20:34Christian GrothoffFixed in Version => 1.5
2026-03-06 20:34Christian GrothoffTarget Version1.6 => 1.5
2026-03-20 23:55Christian GrothoffStatusinforming => closed