the agent prints the daemon's version, from the constant the packaging reads

The agent answered --version with "fingerprintd-agent 0.2.2", the string
it was written with, while the daemon's constant went 0.2.3, 0.2.4, 0.2.5:
the subpackage carried the package's version and reported another. The
constant moves from main.cpp into the module both products import, with
its note on what a bump publishes; the two scripts that derive pkgver
from it, the APKBUILD's header and the CI comment name the new file. The
APKBUILD's own pkgver stays a hand-kept copy, which a bump changes too.
This commit is contained in:
Jorijn van der Graaf 2026-10-13 21:55:27 +02:00
commit 51f476e596
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
7 changed files with 21 additions and 14 deletions

View file

@ -66,10 +66,6 @@ import Fingerprintd;
namespace {
// Bumping this is what publishes a package: the registry answers 409 for a
// version it already has, which a build treats as a no-op.
constexpr const char* Version = "0.2.5";
bool g_verbose = false;
// 500 ms was the research harness's pace, chosen so a human could read the
// transcript scroll by. It is not a design. The matcher rejects the early
@ -3383,7 +3379,7 @@ int RunDaemon() {
// The session comes up on the worker; the bus answers "still starting"
// until it posts Ready.
worker.Start();
std::println("fingerprintd {} starting on the system bus", Version);
std::println("fingerprintd {} starting on the system bus", fingerprintd::Version);
g_main_loop_run(g_loop);
worker.Quit();
@ -3546,7 +3542,7 @@ int main(int argc, char** argv) {
std::uint32_t gid = 0;
int frames = 120;
for (std::string_view a : args.subspan(1)) {
if (a == "--version") { std::println("fingerprintd {}", Version); return 0; }
if (a == "--version") { std::println("fingerprintd {}", fingerprintd::Version); return 0; }
if (a == "--daemon") daemon = true;
if (a == "--probe-tee") probe = true;
if (a.starts_with("--ta=")) g_taPath = a.substr(5);
@ -3611,6 +3607,6 @@ int main(int argc, char** argv) {
" --standby-unlock=on|off unlock the locked session in front by finger,\n"
" via logind (default on)\n"
" --sfs-root=DIR --sfs-writable --rpmb-write storage policy",
Version);
fingerprintd::Version);
return 1;
}