Document TARGET naming mechanisms in Jamulus.pro - #3850
Conversation
The two Debian packages get their binary names by different means: the desktop build passes CONFIG+=noupcasename, while the headless build passes TARGET=jamulus-headless on the qmake command line. Nothing in the file said so, and the interaction is easy to get wrong. Record where TARGET is consumed (debian/*.install, the generated .desktop Exec=, and the hardcoded ExecStart= in the headless unit) and note that the assignment in this block overrides any command-line TARGET=, so adding noupcasename to the headless build would silently rename its binary to "jamulus" and break that package. Comment only; no build behaviour changes.
I'm tempted to say both should have
I'd say this is a bug. The AutoBuild workflow should pass in the TARGET for both, making it clear it's not the default build behaviour. That would remove any need for (It would need noting as a breaking change for people cooking their own debs.) |
MY LLM WROTE:
Follow-up to @pljones' review comment on #3799 (#3799 (comment)):
This is that separate PR. Comment only — no build behaviour changes.
What it documents
The two Debian packages get their binary names by different mechanisms, and nothing in
Jamulus.prosaid so:TARGETjamulusCONFIG+=noupcasename(linux/debian/rules:34)jamulusjamulus-headlessTARGET=jamulus-headlesson the command line (linux/debian/rules:35)jamulus-headlessqmakeJamulusTARGETis consumed in three places, so a change here is not local:usr/bin/<TARGET>is whatdebian/jamulus.installanddebian/jamulus-headless.installlist;Exec=in the generated.desktopfiles (linux/jamulus.desktop.in:13isExec=$$TARGET);ExecStart=/usr/bin/jamulus-headlessindebian/jamulus-headless.service:21.The part worth knowing
TARGET = jamulusinside thenoupcasenameblock silently overrides aTARGET=passed on the qmake command line. So addingnoupcasenameto the headless build — which looks like a harmless tidy-up that unifies the two mechanisms — would rename that binary tojamulus, and the failure surfaces as a broken package, not a build error.How this was checked
Each row of the table above was produced by running
qmakeand readingTARGETout of the generatedMakefile.Release, not by reading the.profile. TheExec=claim was checked against the generated.desktopfiles (Exec=jamuluswithnoupcasename,Exec=Jamuluswithout). Environment: qmake 3.1 / Qt 5.15.13, Ubuntu,QT_SELECT=qt5aslinux/debian/rules:3pins.Not exercised: the macOS
server_bundleappend atJamulus.pro:191(TARGET = $${TARGET}Server), and the precedence rule was confirmed on Qt5 only. Neither affects Debian packaging, but say the word if you want either measured before merge.