Bladeren bron

fix(build): a DEBIAN/control file takes no comments

dpkg-deb rejects a '#' line with "parsing file ... near line N", so the
explanation I put above the Breaks: field in control.server failed the
whole release build - no 0.4.0 packages were produced.

The reasoning now lives next to build_deb() in create-debs.sh, which does
support comments, together with a note about the restriction so the next
person does not rediscover it the same way.

Verified by inspecting all three built packages: both directions of the
server/runner Breaks relationship are present, and the two packages claim
separate conffiles (config.json and runner.json) - two packages shipping
one conffile is a dpkg unpack error.
fszontagh 1 maand geleden
bovenliggende
commit
4dd0bc286a
2 gewijzigde bestanden met toevoegingen van 8 en 3 verwijderingen
  1. 8 0
      packaging/deb/create-debs.sh
  2. 0 3
      packaging/deb/templates/control.server

+ 8 - 0
packaging/deb/create-debs.sh

@@ -33,6 +33,14 @@ calc_installed_size() {
     echo "$total"
 }
 
+# NOTE: a DEBIAN/control file takes NO comments - dpkg-deb rejects a '#' line
+# with "parsing file ... near line N". So the reasoning behind the relationships
+# in templates/control.* lives here instead:
+#   server Breaks an older runner, and runner Breaks an older server, because
+#   both link libsmartbotic-db-client and are compiled against the same
+#   DB_CLIENT_VERSION pin. Every 2.x client shares one SONAME, so a mismatched
+#   pair installs cleanly and only segfaults on the next restart - the two
+#   binaries have to move together.
 build_deb() {
     local pkg_name="$1" staging_dir="$2" arch="$3"
     local installed_size; installed_size="$(calc_installed_size "$staging_dir")"

+ 0 - 3
packaging/deb/templates/control.server

@@ -12,8 +12,5 @@ Section: contrib/utils
 Priority: optional
 Depends: libsmartbotic-db-client (>= 2.3.0), libssl3t64, libsystemd0, libspdlog1.15
 Recommends: smartbotic-vectorapi-webui (= {{VERSION}})
-# The runner links the same libsmartbotic-db-client and is compiled against the
-# same pin, so the two binaries must move together: every 2.x client shares one
-# SONAME, and a stale runner against a new server only segfaults on restart.
 Breaks: smartbotic-vectorapi-runner (<< {{UPSTREAM_VERSION}})
 Installed-Size: {{INSTALLED_SIZE}}