README-libmicrohttpd.md (2973B)
1 # libmicrohttpd packaging 2 3 ## Why Taler packages libmicrohttpd 4 5 Ubuntu 24.04 (Noble) provides `libmicrohttpd-dev` version 6 `1.0.0-2.1ubuntu2`. The corresponding runtime package is named 7 `libmicrohttpd12t64`; the `t64` suffix denotes Ubuntu's 64-bit `time_t` ABI 8 transition and does not indicate a newer libmicrohttpd API version. 9 10 The current Taler Exchange packaging requires `libmicrohttpd-dev (>= 1.0.1)`. 11 That minimum must not be relaxed merely to use Noble's package. Version 1.0.1 12 contains an upstream fix for `MHD_queue_response()`: while the daemon is 13 shutting down, the function returns `MHD_NO` instead of incorrectly reporting 14 success with `MHD_YES`. Taler's HTTP code calls `MHD_queue_response()` 15 extensively and needs its result to state reliably whether a response was 16 queued. The upstream change is 17 [commit 09fa10e9](https://git.gnunet.org/gnunet/libmicrohttpd/commit/09fa10e988e93ac6f7b8d906db0e1a98e8d48192.html). 18 19 Because Noble cannot satisfy the declared minimum, this repository builds GNU 20 libmicrohttpd 1.0.10 before GNUnet and the Exchange. Version 1.0.10 is a newer 21 stable release containing the required fix. The generated Noble packages are 22 `libmicrohttpd12t64` and `libmicrohttpd-dev`, with version 23 `1.0.10-0+noble`; this version takes precedence over Noble's 1.0.0 packages in 24 the local build repository. 25 26 The same locally built package is used for Debian Trixie. Keeping both build 27 targets on one MHD version avoids distro-specific behavior in this security- 28 and correctness-sensitive HTTP path. 29 30 ## How it is packaged 31 32 The source is taken from the `v1.0.10` tag of the libmicrohttpd repository 33 configured in `packages.toml`. Upstream does not carry the Debian packaging 34 used here, so the `debian-overlay` builder copies 35 `buildscripts/debian-overlays/libmicrohttpd/debian/` into the checked-out 36 source tree before installing build dependencies and invoking 37 `dpkg-buildpackage`. It refuses to replace an existing `debian/` directory. 38 39 The overlay is based on the Debian packaging tag `debian/1.0.10-1` from 40 <https://salsa.debian.org/debian/libmicrohttpd.git>. The distro builder images 41 deliberately do not install their native `libmicrohttpd-dev`; subsequent GNUnet 42 and Exchange builds resolve the development package from the local package 43 repository instead. 44 45 ## Updating libmicrohttpd 46 47 The package has `auto_upgrade = false` because its source tag and Debian 48 overlay must be updated and reviewed together. To update it: 49 50 1. Select the new upstream source tag in `packages.toml`. 51 2. Refresh the overlay from the corresponding Debian packaging revision. 52 3. Review `debian/control`, patches, install manifests, and the shared-library 53 symbols file for ABI or package-name changes. 54 4. Build and test the MHD package on every supported distribution and 55 architecture before rebuilding GNUnet and the Exchange. 56 57 An explicitly named `taler-pkg upgrade libmicrohttpd` may update the configured 58 tag; the default bulk upgrade intentionally skips it.