pmtiles-swarm 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/docs/running-as-a-service.md +46 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
### 🐞 Bug fixes
|
|
8
8
|
- _...Add new stuff here..._
|
|
9
9
|
|
|
10
|
+
## 0.45.0
|
|
11
|
+
### ✨ Features and improvements
|
|
12
|
+
- **Requires pmtiles-torrent 0.9.1**, which stops the sidecar rewriting resume data that has not
|
|
13
|
+
changed. A hybrid torrent carries a merkle tree of 32 bytes per 16 KiB block in its resume data —
|
|
14
|
+
a few hundred megabytes for a 128 GiB archive — and it was being restaged, fsynced and renamed
|
|
15
|
+
every five minutes for every archive at once, to record that nothing had moved. It also gives each
|
|
16
|
+
torrent its own share of the save budget instead of five seconds for the whole library, which is
|
|
17
|
+
why a node with four archives persisted two of them and a different two next time.
|
|
18
|
+
- **Running as a service documents a newer libtorrent than the distribution ships.** `apt` gives you
|
|
19
|
+
whatever your release froze on, `pip install` into the system Python is refused under PEP 668, and
|
|
20
|
+
`--break-system-packages` is not the way round it. A virtualenv plus the existing
|
|
21
|
+
`libtorrent.python` key is, reversibly and without touching apt. The upgrade section now also says
|
|
22
|
+
that libtorrent is a third thing an update never moves, and how to check which one the service
|
|
23
|
+
actually imports.
|
|
24
|
+
|
|
25
|
+
### 🐞 Bug fixes
|
|
26
|
+
|
|
10
27
|
## 0.44.0
|
|
11
28
|
### ✨ Features and improvements
|
|
12
29
|
- **Web seeds are added where they are listed.** The **HTTP sources** tab now has a field and an Add
|
|
@@ -553,6 +553,36 @@ rather than exiting. Name the interpreter explicitly when the service user's
|
|
|
553
553
|
{ "libtorrent": { "python": "/usr/bin/python3" } }
|
|
554
554
|
```
|
|
555
555
|
|
|
556
|
+
### A newer libtorrent than the distribution ships
|
|
557
|
+
|
|
558
|
+
`apt` gives you whatever your release froze on, which on Ubuntu 24.04 is
|
|
559
|
+
libtorrent 2.0.x. `pip install libtorrent` into the system Python is refused —
|
|
560
|
+
`externally-managed-environment`, because apt owns that Python — and
|
|
561
|
+
`--break-system-packages` is not the way round it.
|
|
562
|
+
|
|
563
|
+
Give the service account a virtualenv instead and point the sidecar at it. The
|
|
564
|
+
same `python` key does the work, so nothing else changes:
|
|
565
|
+
|
|
566
|
+
```sh
|
|
567
|
+
sudo -u pmtiles-swarm python3 -m venv /var/lib/pmtiles-swarm/venv
|
|
568
|
+
sudo -u pmtiles-swarm /var/lib/pmtiles-swarm/venv/bin/pip install libtorrent
|
|
569
|
+
sudo -u pmtiles-swarm /var/lib/pmtiles-swarm/venv/bin/python -c "import libtorrent; print(libtorrent.__version__)"
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
```json
|
|
573
|
+
{ "libtorrent": { "python": "/var/lib/pmtiles-swarm/venv/bin/python" } }
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
Reversible in one line: delete the key and the node is back on the distribution
|
|
577
|
+
package, with no uninstall and nothing done to apt. `ReadWritePaths` already
|
|
578
|
+
covers `/var/lib/pmtiles-swarm`, so the venv needs no unit change — put it
|
|
579
|
+
anywhere else and it does.
|
|
580
|
+
|
|
581
|
+
Worth doing for a node seeding very large hybrid archives, where v2 support has
|
|
582
|
+
had the most work since 2.0. Change one thing at a time, though: take a version
|
|
583
|
+
of the node first, confirm what it did, then move libtorrent, so a difference in
|
|
584
|
+
behaviour has one candidate rather than two.
|
|
585
|
+
|
|
556
586
|
## Ports
|
|
557
587
|
|
|
558
588
|
Five listeners, and only the peer ports want a firewall rule. See
|
|
@@ -615,6 +645,22 @@ sudo -u pmtiles-swarm -H npm ls --prefix /var/lib/pmtiles-swarm --depth 1 \
|
|
|
615
645
|
pmtiles-swarm pmtiles-torrent
|
|
616
646
|
```
|
|
617
647
|
|
|
648
|
+
**libtorrent itself is a third thing, and an update never touches it.** The
|
|
649
|
+
sidecar is Python that ships with the package; libtorrent is the binding it
|
|
650
|
+
imports, which came from `apt` or from a virtualenv you made. Neither moves when
|
|
651
|
+
the node does:
|
|
652
|
+
|
|
653
|
+
```sh
|
|
654
|
+
sudo -u pmtiles-swarm python3 -c "import libtorrent; print(libtorrent.__version__)"
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
Run that against whatever `libtorrent.python` names, not your login shell's
|
|
658
|
+
Python — they are frequently different interpreters, and the one that matters is
|
|
659
|
+
the one the service uses. See
|
|
660
|
+
[a newer libtorrent than the distribution ships](#a-newer-libtorrent-than-the-distribution-ships)
|
|
661
|
+
for moving it, and move it on its own: a node upgrade and a libtorrent upgrade in
|
|
662
|
+
one restart leaves two candidates for whatever happens next.
|
|
663
|
+
|
|
618
664
|
An install runs the dependency install scripts again, so check WebRTC survived
|
|
619
665
|
it — see [the allowScripts warning](#the-allowscripts-warning):
|
|
620
666
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmtiles-swarm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "BitTorrent distribution for PMTiles map archives: create torrents, watch folders, publish and subscribe to RSS feeds, and seed through qBittorrent or an embedded client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"maplibre-gl": "^6.2.0",
|
|
47
47
|
"parse-torrent": "^11.0.24",
|
|
48
48
|
"pmtiles": "^4.4.1",
|
|
49
|
-
"pmtiles-torrent": "^0.9.
|
|
49
|
+
"pmtiles-torrent": "^0.9.1",
|
|
50
50
|
"webtorrent": "^3.0.21"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|