Skip to content

cmake: fix cached SET vars with CURL_CA_BUNDLE/CURL_CA_PATH set to none#14778

Closed
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:cm-reset-ca-set-vars
Closed

cmake: fix cached SET vars with CURL_CA_BUNDLE/CURL_CA_PATH set to none#14778
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:cm-reset-ca-set-vars

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Sep 4, 2024

Follow-up to 6a9489d #1461
Ref: #6313


edit: I cannot reproduce the referenced issue. Also the suggested fix doesn't make a difference in the generated config.h and CMakeCache.txt when running the repro setup.

edit2: The options seems to behave unexpectedly, but it may be my lack of understanding of caching and the ideas around how this should work. I expected the CURL_CA_BUNDLE and CURL_CA_PATH settings to "stick" between cmake invocations. They don't. On each run they spring back to "auto". Meanwhile other options (e.g. ENABLE_UNIX_SOCKETS) retain their previously set values.

edit3: It seems a 3rd variable would be necessary to cache the builder's intent in all cases. For now, e.g. none cannot stick around because its unsets CURL_CA_BUNDLE, which triggers a reset even after guarding the option initialization with a NOT DEFINED. (or store this information in the _SET var maybe?)

@vszakats vszakats added the cmake label Sep 4, 2024
@github-actions github-actions bot added the build label Sep 4, 2024
@vszakats vszakats changed the title cmake: reset CURL_CA_*_SET variables in cache cmake: reset CURL_CA_{BUNDLE|PAT}_SET variables in cache Sep 4, 2024
@vszakats vszakats changed the title cmake: reset CURL_CA_{BUNDLE|PAT}_SET variables in cache cmake: reset CURL_CA_BUNDLE_SET/CURL_CA_PATH_SET variables in cache Sep 4, 2024
Reported-by: Chang-Ning Tsai
Fixes curl#6313 (KNOWN_BUGS 15.11)
@vszakats vszakats force-pushed the cm-reset-ca-set-vars branch from 66e102c to 2888522 Compare September 4, 2024 08:56
@vszakats
Copy link
Member Author

vszakats commented Sep 4, 2024

Untested.

vszakats added a commit that referenced this pull request Sep 4, 2024
They were renamed recently as internal variables, but they are both
cached, so let's keep the original names for consistency and
compatibility.

Partial revert of c2889a7 #14388
Tested via #14778
@vszakats vszakats marked this pull request as draft September 4, 2024 10:21
@vszakats vszakats changed the title cmake: reset CURL_CA_BUNDLE_SET/CURL_CA_PATH_SET variables in cache cmake: fix cached SET vars with CURL_CA_BUNDLE/CURL_CA_PATH set to none Sep 4, 2024
@vszakats
Copy link
Member Author

vszakats commented Sep 4, 2024

Abandoning this effort for now.

@vszakats vszakats closed this Sep 4, 2024
@vszakats vszakats deleted the cm-reset-ca-set-vars branch September 4, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant