3.27.x backport: getopt_long optstring fixes (#6262) - #6363
claude[bot] wants to merge 11 commits into
Conversation
The --version long option worked, but the advertised -V short form was rejected as an unknown option because 'V' was missing from the getopt option string. The case 'V' handler already existed. Changelog: Fixed cf-check -V (--version) short option (cherry picked from commit 89d8d81)
'1' had no option table entry and no switch case, so -1 fell through to the generic usage error. It is a leftover from a removed undocumented alias for -F; --once/-O supersedes it. Changelog: none (cherry picked from commit da0c3f6)
'S' had no option table entry and no switch case, so -S fell through to the generic usage error. It is a leftover from the --syntax option removed in 2008. Changelog: none (cherry picked from commit fa793f5)
The long options --tls-version and --ciphers worked, but their advertised short forms -t and -c were rejected as unknown options because they were missing from the getopt option string. Both take a required argument and both already have switch case handlers. Changelog: Fixed cf-net -t (--tls-version) and -c (--ciphers) short options (cherry picked from commit 8f1f652)
…tring Neither had an option table entry or a switch case: -S fell through to the generic usage error (leftover from the removed --syntax option), and -i silently swallowed an argument before erroring out. The deliberate deprecated -r error shim is left untouched. Changelog: none (cherry picked from commit 2d43475)
…tring Neither had an option table entry or a switch case: -q silently swallowed an argument before failing with the generic usage error (leftover from --query, which moved to cf-hub in 2013), and -S fell through to the same error (vestigial since 2008). Changelog: none (cherry picked from commit f7817a3)
The -K short option already worked (it sets ignore_locks) but had no option table entry, so it had no long form and was missing from --help and man output. This adds the --no-lock long option and hint, matching cf-agent, cf-execd, cf-serverd and cf-monitord. Changelog: Added --no-lock long option to cf-runagent, matching the existing -K short option (cherry picked from commit 4fd98b4)
The --verbose, --inform and --log-level long options worked and their short forms are advertised in help and man output, but -v, -I and -g were rejected as unknown options because they were missing from the getopt option string. Also removed the stray 'e' left over from the removed --encrypt option. Changelog: Fixed cf-secret -v (--verbose), -g (--log-level) and -I (--inform) short options (cherry picked from commit 443c911)
The option table declares --ld-library-path as required_argument, but the option string had a bare 'L', so '-L <path>' left optarg NULL (dereferenced unconditionally) and the path behind as a stray positional argument. Also removed the stray 'S' left over from the --syntax option removed in 2008. Changelog: Fixed cf-serverd -L (--ld-library-path) to accept its argument (cherry picked from commit 660af3c)
The --report long option worked and -r is advertised in help output, but the short form was rejected because 'r' was missing from the getopt option string. Also removed the orphan 'f:' left behind when --file/-f was renamed to --report/-r. Changelog: none (cherry picked from commit 9bad591)
|
|
Changelog: title Signed-off-by: Victor Moene <victor.moene@northern.tech> As of LMDB 1.0.0, MDB_MAXKEYSIZE defaults to 0 (computed from the page size) instead of the fixed compile-time 511 used by LMDB <1.0.0, and mdb_env_get_maxkeysize() only returns the correct value once the environment has actually been opened (env->me_maxkey is populated by mdb_env_open()). So this can only be checked after a successful open, not beforehand like it could with older LMDB versions. The assertion breaks on macos because the environement there uses a newer lmdb package. (cherry picked from commit 0e31cc1) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QBeMeG8RBD7KoaQchhpCGq
|
CI note: The job failed in the Why this is not this PR's failure:
Fix ported: cherry-picked 0e31cc1 from Related but not needed for CI: Generated by Claude Code |
|
@cf-bottom jenkins, please |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/14705/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-14705/ |
|
CI note: Generated by Claude Code |
|
@claude[bot] : I'm sorry, I cannot do that. @olehermanse please help. |
Requested by Ole Herman · Slack thread
Backport of the getopt_long optstring fixes to 3.27.x. All 10 commits cherry-picked with
-xfrom the original PR: #6262🤖 Generated with Claude Code
https://claude.ai/code/session_01QBeMeG8RBD7KoaQchhpCGq