pgserve 2.6.7 → 2.6.8

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 CHANGED
@@ -14,6 +14,41 @@ All notable changes to `pgserve` are documented here. The format follows
14
14
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres
15
15
  to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
16
16
 
17
+ ## [2.6.8] - 2026-05-12
18
+
19
+ **Final v2.x maintenance release with full signed-tarball GH Release.**
20
+ v2.6.7 closed the `autopg --version` smoke gate but Build Tarballs
21
+ still failed on the next smoke check — `postgres --version` couldn't
22
+ load `libicui18n.so.60`. Root cause: `fetch-postgres-bins.sh` was
23
+ copying `native/bin` + `native/share` from the npm
24
+ `@embedded-postgres` payload but skipping `native/lib`, AND was not
25
+ recreating the SONAME symlinks described in `pg-symlinks.json`
26
+ (`libicui18n.so.60 → libicui18n.so.60.2`).
27
+
28
+ ### Fixed
29
+
30
+ - `scripts/fetch-postgres-bins.sh:stage_from_pkg` now copies
31
+ `native/lib/` into the staging directory + replays
32
+ `native/pg-symlinks.json` to recreate the 14 SONAME aliases. The
33
+ postgres binary's RPATH is `../lib/` (origin-relative), so all
34
+ bundled deps (libxml2, libssl, libcrypto, libz, libicudata,
35
+ libicui18n, libicuuc, libecpg, libpgtypes, libpq, …) now resolve at
36
+ runtime regardless of what the host system has installed.
37
+
38
+ ### Validated
39
+
40
+ - Local reproduction: extracted tarball, ran
41
+ `./postgres/bin/postgres --version` →
42
+ `postgres (PostgreSQL) 18.3` ✅
43
+
44
+ ### Cohort wrap-up
45
+
46
+ This is the LAST `pgserve`-named npm publish. Subsequent development
47
+ moves to the `autopg` package starting at v3.0.0 from the new
48
+ `automagik-dev/autopg` repo (post org transfer). Consumers like
49
+ `@withone/cli` (`pgserve: ^2.x`) stay on npm latest indefinitely;
50
+ v2.6.8 is the cohort's final stable polish.
51
+
17
52
  ## [2.6.7] - 2026-05-12
18
53
 
19
54
  **Stability-focused follow-up to v2.6.6** — closes the missing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgserve",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
4
4
  "description": "Embedded PostgreSQL server with true concurrent connections - zero config, auto-provision databases",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -142,6 +142,56 @@ EOF
142
142
 
143
143
  cp -R "${native}/bin" "${out_dir}/bin"
144
144
  cp -R "${native}/share" "${out_dir}/share" 2>/dev/null || mkdir -p "${out_dir}/share"
145
+
146
+ # The postgres binary's RPATH is `../lib/` (origin-relative), so it
147
+ # looks for libxml2 / libssl / libcrypto / libicu* in
148
+ # ${out_dir}/lib at runtime. The npm payload bundles all of these
149
+ # under native/lib (verified: libicui18n.so.60.2, libssl.so.1.1,
150
+ # etc. — 25 MB of bundled deps). Without copying lib/ the tarball
151
+ # extracts a postgres binary that fails with
152
+ # `error while loading shared libraries: libicui18n.so.60: cannot
153
+ # open shared object file: No such file or directory` on any
154
+ # platform that doesn't ship libicu60 system-wide (Ubuntu >= 20.04
155
+ # ships libicu70/74; only 18.04 ships libicu60).
156
+ #
157
+ # The package's normal postinstall creates SONAME symlinks
158
+ # (libicui18n.so.60 → libicui18n.so.60.2) from pg-symlinks.json, but
159
+ # we install with `--ignore-scripts` (security posture), so we must
160
+ # replay the symlink manifest manually. Without these symlinks the
161
+ # binary still can't find libicui18n.so.60 because npm packs only
162
+ # the real `.so.60.2` files, not the SONAME aliases.
163
+ if [[ -d "${native}/lib" ]]; then
164
+ cp -R "${native}/lib" "${out_dir}/lib"
165
+ fi
166
+
167
+ if [[ -f "${native}/pg-symlinks.json" ]]; then
168
+ # Strip the `native/` prefix from `source` + `target` and recreate
169
+ # symlinks under out_dir using relative names. Uses node so we get
170
+ # robust JSON parsing without yanking jq in as a dep.
171
+ OUT_DIR="$out_dir" MANIFEST="${native}/pg-symlinks.json" node -e '
172
+ const fs = require("fs");
173
+ const path = require("path");
174
+ const out = process.env.OUT_DIR;
175
+ const manifest = JSON.parse(fs.readFileSync(process.env.MANIFEST, "utf8"));
176
+ let made = 0;
177
+ for (const entry of manifest) {
178
+ // {"source":"native/lib/libicui18n.so.60.2","target":"native/lib/libicui18n.so.60"}
179
+ const src = entry.source.replace(/^native\//, "");
180
+ const tgt = entry.target.replace(/^native\//, "");
181
+ const tgtPath = path.join(out, tgt);
182
+ const srcRel = path.basename(src);
183
+ try { fs.unlinkSync(tgtPath); } catch {}
184
+ try {
185
+ fs.mkdirSync(path.dirname(tgtPath), { recursive: true });
186
+ fs.symlinkSync(srcRel, tgtPath);
187
+ made++;
188
+ } catch (err) {
189
+ console.error(" symlink failed: " + tgt + " -> " + srcRel + ": " + err.message);
190
+ }
191
+ }
192
+ console.error(" -> created " + made + " library SONAME symlinks");
193
+ ' || echo " -> warning: pg-symlinks.json processing failed (postgres may not load shared libs)"
194
+ fi
145
195
  popd >/dev/null
146
196
  }
147
197