Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't enable TLS when --without-* flags are used #7994

Closed

Conversation

@stanhu
Copy link
Contributor

@stanhu stanhu commented Nov 12, 2021

Previously specifying --without-gnutls would unexpectedly attempt to compile with GnuTLS, effectively interpeting this as --with-gnutls. This caused a significant amount of confusion when libcurl was built with SSL disabled since GnuTLS wasn't present.

68d89f2 dropped the --without-* options from the configure help, but AC_ARG_WITH still defines these flags automatically. As https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
describes, the action-if-given is called when the user specifies --with-* or --without-* options:

— Macro: AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])

    If the user gave configure the option --with-package or --without-package, run shell commands action-if-given.

The scripts didn't check whether "yes" or "no" was specified, so "yes" was the default.

To prevent this confusion, we make the --without flag do the right thing by ignoring the value if it set to "no".

@stanhu stanhu force-pushed the sh-really-disable-without-ssl-flags branch from 2fbffca to 8e3080a Nov 12, 2021
Previously specifying `--without-gnutls` would unexpectedly attempt to
compile with GnuTLS, effectively interpreting this as
`--with-gnutls`. This caused a significant amount of confusion when
`libcurl` was built with SSL disabled since GnuTLS wasn't present.

68d89f2 dropped the `--without-*` options from the configure help, but
`AC_ARG_WITH` still defines these flags automatically. As
https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
describes, the `action-if-given` is called when the user specifies
`--with-*` or `--without-*` options.

To prevent this confusion, we make the `--without` flag do the right
thing by ignoring the value if it set to "no".
@stanhu stanhu force-pushed the sh-really-disable-without-ssl-flags branch from 8e3080a to 4041674 Nov 12, 2021
maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this issue Nov 12, 2021
curl/curl@68d89f2
dropped the use of `--without-gnutls` in favor of `--with-*`
options. This commit actually had the opposite effect of enabling GnuTLS
when `--without-gnutls` were set. curl/curl#7994
fixes this behavior.

We can drop this now that this does completely the opposite of what it
is supposed to be doing.

Discovered in https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/5592#note_731305703

Changelog: fixed
@bagder bagder added the build label Nov 12, 2021
bagder
bagder approved these changes Nov 12, 2021
@bagder bagder closed this in b589696 Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants