configure: honour --with-ocf instead of silently disabling OCF - #4759
Merged
amarts merged 1 commit intoSep 23, 2026
Merged
Conversation
The AC_ARG_WITH([ocf], ...) call placed OCF_SUBDIR='ocf' only in the
action-if-not-given slot and left the action-if-given slot empty. Any
explicit --with-ocf or --without-ocf therefore ran the empty action and
left OCF_SUBDIR unset, so --with-ocf -- the flag a packager uses to
request the OCF resource agents -- silently disabled them, exactly like
--without-ocf. Only the default (no flag at all) built them.
OCF_SUBDIR feeds SUBDIRS in extras/Makefile.am, so the mis-handled flag
dropped extras/ocf from both the build and the install.
Capture $withval in the action-if-given slot, default with_ocf=yes, and
set OCF_SUBDIR only when with_ocf is not "no". Now --with-ocf and the
default build the agents and only --without-ocf skips them. Also correct
the --without-ocf help text, which described the opposite behaviour.
This is the same value-discard idiom already fixed for
--with-{tcmalloc,libtirpc,ipv6-default} in commit a249d07
("configure: honour the value given to --with-{tcmalloc,libtirpc,
ipv6-default}").
Signed-off-by: Thales Antunes de Oliveira Barretto <thales.barretto.git@gmail.com>
ThalesBarretto
force-pushed
the
build-ocf-with-value-ignored
branch
from
September 10, 2026 12:58
f185d87 to
4560d8f
Compare
ThalesBarretto
marked this pull request as ready for review
September 11, 2026 02:06
amarts
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
configure: honour --with-ocf instead of silently disabling OCF
Fixes: #4760
AC_ARG_WITH([ocf], …)setOCF_SUBDIR='ocf'only in theaction-if-not-given slot and left action-if-given empty. Any explicit
--with-ocftherefore ran the empty action and leftOCF_SUBDIRunset, so--with-ocf— the flag a packager uses to request the OCF resourceagents — silently disabled them, identically to
--without-ocf. Only theno-flag default built them.
OCF_SUBDIRfeedsSUBDIRSinextras/Makefile.am, so the mishandled flag droppedextras/ocffrom boththe build and the install.
The fix captures
$withvalin action-if-given, defaultswith_ocf=yes,and sets
OCF_SUBDIRonly whenwith_ocfis notno— the samevalue-discard idiom already fixed for
--with-{tcmalloc,libtirpc,ipv6-default}in
a249d07656. The backwards--without-ocfhelp text is corrected too.Behaviour (install-verified)
Real out-of-source
configure+make installA/B ondevel; the twoDESTDIRtrees differ by exactly…/lib/ocf/resource.d/glusterfs/{glusterd,volume}:./configureinput--without-ocf--with-ocf=no--with-ocf--with-ocf=yes--with-ocf=<other>yes)Only the affirmative
--with-ocf[=…]path changes; the default and--without-ocfare unchanged. Upstreamglusterfs.spec.innever passes--with-ocf(only nothing, or--without-ocfunder--without server),so packaging is unaffected.
Provenance
--with-ocf40f5ce0db60f851d4dd8The option was born working as an opt-in flag in
40f5ce0db6, whereAM_CONDITIONAL(WITH_OCF, [test "$with_ocf" = "yes"])read the value theargument parser set.
0f851d4dd8flipped OCF on by default and switched theplumbing to
OCF_SUBDIR/SUBDIRS, but dropped that read of$with_ocf—leaving the affirmative
--with-ocfpath dead. Untouched since.Risk
Build-system only; no runtime code touched. Default behaviour (agents built)
is unchanged.