-
Notifications
You must be signed in to change notification settings - Fork 267
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
OpenSSL compatible ./config wrapper #40
Conversation
I presume there are other 'no-*' arguments that come along for the ride in this script, that are ignored by ./configure. Is this an issue? Could you rework it is a whitelist than a blacklist, so only options that actually do something get passed (for other users of the script). Otherwise, you may be playing sed whack-a-mole. |
Thanks for this feedback. There are definitely no other commands "ignored" - the reason for the 'sed' is that ./configure just fails and dies when it sees input it doesn't like, like 'no-shared' (therefore, for anything that compiles, it's not an issue). The ./config script accepts --prefix which I've had it pass directly onto ./configure to set the directory correctly. I can't imagine what, other than --prefix, would ever be a wanted option in the whitelist, but I took this path because it felt safer at the time. I'm noting a lot of the options, like "no-srp" and "no-ssl3" would clearly be useless against LibreSSL, so I'll work on a whitelist edition. |
I've written a whitelist based model. Here's an example call based on as many commands as I could find on the OpenSSL wiki: $ ./config --prefix=/tmp/install no-threads no-shared -DOPENSSL_NO_HEARTBEATS no-idea It shows in the config.log with: And the Makefile contains this: I'm fully aware OPENSSL_NO_HEARTBEATS should refer to non-existent code in LibreSSL, but that was the only define I found in the wiki and I'm aware there are hundreds. |
After this extra commit, the same command produces this in config.log: |
Cool. I like the idea, but those regexes seem to be the wrong tool for the job. The --prefix regex doesn't actually work with OpenBSD's sed, and might not support paths with spaces. I think we should also mask any passed CFLAGS definitions, since those are unlikely to have the expected effect in LibreSSL compared to OpenSSL. How about something like this, which does not require any external commands, and adds support for no-asm as well. If it works for you, I could commit this.
|
Hi Busterb, No problems, that would totally work also, it would be great if that got committed. Frankly, the sed had already hit a point where, from a code point of view, I kept verging on rewriting in Perl, but didn't want to introduce that into the codebase. |
I've tested the script given and can confirm it produces a correct config.log, containing: $ ./configure --enable-shared=no --prefix=/tmp/install I've rebased to this, and confirmed that "make test" passes based on the above configuration call. |
Thank you, 1c55919 |
OpenSSL, for some reason, uses the ./config command to prepare its installation. This script is called directly by at least one application.
I have operated Nginx 1.7.5 linked statically against Libressl-portable on CentOS 6.5, and this is the one issue that currently needs patching out as part of that process.
By adding the thin wrapper included in this PR, libressl-portable becomes truly "drop-in" for this scenario and, I would imagine, many others.