Repository navigation
Fixed broken package install scripts - #2614
Conversation
|
@cf-bottom Jenkins please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15028/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15028/ |
b998342 to
28474c7
Compare
|
@cf-bottom Jenkins please :) |
produce-script now reads the LMDB version from the first mirror line only|
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15039/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15039/ |
|
claude says there are blockers
|
craigcomstock
left a comment
There was a problem hiding this comment.
I will monitor the current build and if green will make the changes I proposed (which are for maintainability sake, not functional sake) and confirm all OK.
…e only Since the GitHub mirror was added, `deps-packaging/lmdb/source` has two lines, so `LMDB_VERSION` got the version twice. The second copy became a line of its own in the generated install scripts, which failed with `1.0.3: not found` and broke package installation. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
Commit 403df91 changed build-scripts/package to generate a patched <type>-script-common.sh, but only when the build prefix was not /var/cfengine. produce-script expects it to always be there. It is now always generated. Replacing the prefix with the same prefix does not matter. The templates are renamed to <type>-script-common.sh.in to make it obvious that they are templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
This makes it obvious what build-scripts/package substitutes, instead of rewriting /var/cfengine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
The previous commit generated only the template named after $PACKAGING (lpp, solaris, hpux), but produce-script reads the one named after the package type (rpm, pkg, depot). Now all templates are generated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
produce-script silently skipped any missing snippet, so a build could succeed with broken install scripts. The four snippets every package needs now fail the build when missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
5d837dc to
6295cac
Compare
|
@cf-bottom jenkins no tests |
|
Alright, I triggered a build: [NO TESTS] Jenkins: https://ci.cfengine.com/job/pr-pipeline/15050/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15050/ |
|
green enough. merging. |
|
@craigcomstock are you planning to backport the macOS code? Otherwise I will only backport the last commit. |
Fixed two bugs that broke the generated package install scripts:
deps-packaging/lmdb/source(Added a GitHub mirror for the LMDB source tarball #2594), the file has two lines, andproduce-scriptsetLMDB_VERSIONto the version twice. The second copy ended up on a line of its own, sopreinstfailed with1.0.3: not found.sednow quits after the first line.build-scripts/packageto generate a patched<type>-script-common.shonly when the build prefix was not/var/cfengine, butproduce-scriptexpects it to always be there. Default builds shipped scriptlets withoutos_typeand the other helpers, so%postfailed. It is now always generated.<type>-script-common.sh.inand use an@BUILD_PREFIX@placeholder, to make it obvious what is substituted.Generated with Claude Code