configure: put lua-resty libs into a list, and make all operations on lua-resty opts use that list - #362
configure: put lua-resty libs into a list, and make all operations on lua-resty opts use that list#362simpl wants to merge 4 commits into
Conversation
… lua-resty opts use that list
|
Just to let you know, I double-checked to make sure that I hadn't forgotten any libs, and I tested with the following options : which then produced no lualib directory in $PREFIX folder. Obviously leaving these options off installs all the libs, so functionally there is no change to behaviour, just a tidy-up of the script. |
… name contains an underscore
… DESTDIR was non-empty
agentzh
left a comment
There was a problem hiding this comment.
Please rebase to the latest master branch and make sure t/sanity.t test file is still passing (it's currently passing on the latest master). Thanks!
| if ($platform ne 'msys') { | ||
| push @make_install_cmds, | ||
| "ln -sf $ngx_sbin \$(DESTDIR)$prefix/bin/openresty"; | ||
| "ln -sf \$(DESTDIR)$ngx_sbin \$(DESTDIR)$prefix/bin/openresty"; |
There was a problem hiding this comment.
This is wrong. It will create a symlink pointing to the wrong location.
There was a problem hiding this comment.
I guess it depends on where you want to have it link to, but if you have DESTDIR defined, then the symlink will link to the location without
There is also another problem if you have DESTDIR set. That is that because the rpath and link locations are defined statically, nginx doesn't find libluajit, unless you specify it in the environment. IMHO it would be better to have relative symlinks and relative paths set. I was going to make the necessary changes to make them relative paths, so everything worked as expected if you move the output dir and submit them too. It makes more sense to me to be able to move the whole folder and for everything still to work, but let me know if that's not what you want.
There was a problem hiding this comment.
@mclyne The DESTDIR variable is usually used for rpm/deb packaging tools to install the software to a temporary location other than under the real root directory right before generating an rpm or deb package. So it is not meant to be the final location for the installed packages. That's why I said if you add $(DESTDIR) to the symlink target location, it would be completely wrong (the DESTDIR location won't even exist in the final deployment machine).
There was a problem hiding this comment.
@mclyne Seems like you confused DESTDIR with PREFIX. They are for completely different purposes.
There was a problem hiding this comment.
@mclyne So your change above would lead to broken symlinks installed to the final machines after installing the deb/rpm packages.
There was a problem hiding this comment.
I wasn't confusing DESTDIR with PREFIX, however I wasn't thinking of it being used in that way. Thanks for the explanation.
| } | ||
|
|
||
| # configure opm: | ||
| # configure opm |
There was a problem hiding this comment.
Consistency with other comments. It was sort of an accidental inclusion. Same for below. Most comments don't have colons - though actually they're not totally consistent in the formatting.
| } | ||
|
|
||
| # configure resty-cli: | ||
| # configure resty-cli |
Reason for patch
The configure file now has quite a large number of included lua-resty-[name] libs, with all references to them statically included in the following places:
This is both more prone to errors, and is inefficient when adding new libs in the future.
What this patch does
This makes the whole configure script a bit easier to read, makes it quicker to add new lua-resty-[name] libs to OpenResty, and reduces the possibility for bugs in future edits.
What else you might want to change
I've ordered the lua-resty-[name] modules alphabetically, because I think they're easier to read that way. Given that the modules are not listed alphabetically in the ./configure --help, you might want to :
I didn't want to presume your choice about this, but if you'd like me to do a quick patch to change that as well, I'm happy to do so.