Re: [osv-dev] [PATCH V3] Upgrade cli, lua and httpserver-api modules to use OpenSSL 1.1 and Lua 5.3

2019-08-15 Thread Waldek Kozaczuk


Sent from my iPhone

> On Aug 15, 2019, at 07:42, Nadav Har'El  wrote:
> 
>> On Thu, Aug 15, 2019 at 2:29 PM Waldek Kozaczuk  wrote:
>> Hi,
>> 
>> Thanks for applying the patch (BTW as I feared it failed on the Jenkins 
>> machine due to some x86_64 vs i686 conflict, any ideas how to fix it?).
> 
> Thanks. I saw it is most likely a Fedora 27 bug, which takes the wrong 
> package (a i686 one, something I haven't used in a decade ;-)). It is easily 
> solved by a separate "yum install openssl-devel" (separate from the other 
> installation requests) so I did it, and hopefully we can forget about this - 
> we can't need to solve Fedora bugs :-(
>  
>> Now I have everything I need to cut new release minus anything unexpected;-)
> 
> Well, something bothering me personally is the Boost invisibility thing 
> preventing build on Fedora 30. But it doesn't mean we can't release a version 
> as-is, and fix the Boost thing later. 

Couple of weeks ago as I was researching it myself I posted number of new 
comments here -  
https://github.com/cloudius-systems/osv/issues/1040#issuecomment-514383114

>> I am not sure you saw it but couple of days ago I committed  some docker 
>> files to build OSv development environment container images for Fedora and 
>> Ubuntu. If you care you can use the fedora one that would let you build and 
>> run OSv in Fedora 29 docker container running on Fedora 30.
> 
> Thanks. I can, but I don't want to :-) I mean, I want to be reminded that OSv 
> can't be built on Fedora 30, and fix it, instead of working around it :-)
> 
> I have different physical machines with different versions of Fedora on them, 
> so when I want to compile on Fedora 29, I can already do that (this is what I 
> did today to test your patch).
> 
>  
>> This is how I build and run OSv on Fedora 29 when on Ubuntu 19.04 on my 
>> laptop. Btw the docker files delegate to setup.py. 
>> 
>> I do not have much experience with docker hub. Do you think it would help if 
>> we published those docker images to docker hubs so people could pull it from 
>> there instead of building the image from scratch?
> 
> I have no idea, I'm not a big docker expert myself. Is it hard to "build the 
> image from scratch"? Isn't it automatic?
> 
>> 
>> Waldek
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "OSv Development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to osv-dev+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/osv-dev/fcfb10f2-c6d1-4e01-8831-2261f80bb043%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/F75101A9-045D-46F1-AACC-C392032F53BE%40gmail.com.


Re: [osv-dev] [PATCH V3] Upgrade cli, lua and httpserver-api modules to use OpenSSL 1.1 and Lua 5.3

2019-08-15 Thread Nadav Har'El
On Thu, Aug 15, 2019 at 2:29 PM Waldek Kozaczuk 
wrote:

> Hi,
>
> Thanks for applying the patch (BTW as I feared it failed on the Jenkins
> machine due to some x86_64 vs i686 conflict, any ideas how to fix it?).


Thanks. I saw it is most likely a Fedora 27 bug, which takes the wrong
package (a i686 one, something I haven't used in a decade ;-)). It is
easily solved by a separate "yum install openssl-devel" (separate from the
other installation requests) so I did it, and hopefully we can forget about
this - we can't need to solve Fedora bugs :-(


> Now I have everything I need to cut new release minus anything
> unexpected;-)
>

Well, something bothering me personally is the Boost invisibility thing
preventing build on Fedora 30. But it doesn't mean we can't release a
version as-is, and fix the Boost thing later.

>
> I am not sure you saw it but couple of days ago I committed  some docker
> files to build OSv development environment container images for Fedora and
> Ubuntu. If you care you can use the fedora one that would let you build and
> run OSv in Fedora 29 docker container running on Fedora 30.


Thanks. I can, but I don't want to :-) I mean, I want to be reminded that
OSv can't be built on Fedora 30, and fix it, instead of working around it
:-)

I have different physical machines with different versions of Fedora on
them, so when I want to compile on Fedora 29, I can already do that (this
is what I did today to test your patch).



> This is how I build and run OSv on Fedora 29 when on Ubuntu 19.04 on my
> laptop. Btw the docker files delegate to setup.py.
>
> I do not have much experience with docker hub. Do you think it would help
> if we published those docker images to docker hubs so people could pull it
> from there instead of building the image from scratch?
>

I have no idea, I'm not a big docker expert myself. Is it hard to "build
the image from scratch"? Isn't it automatic?


> Waldek
>
> --
> You received this message because you are subscribed to the Google Groups
> "OSv Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osv-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osv-dev/fcfb10f2-c6d1-4e01-8831-2261f80bb043%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/CANEVyjudHWxuifF7U4i1KoEPskVkdXMsrBby%3D0P-aXbcW9mF-w%40mail.gmail.com.


Re: [osv-dev] [PATCH V3] Upgrade cli, lua and httpserver-api modules to use OpenSSL 1.1 and Lua 5.3

2019-08-15 Thread Waldek Kozaczuk
Hi,

Thanks for applying the patch (BTW as I feared it failed on the Jenkins machine 
due to some x86_64 vs i686 conflict, any ideas how to fix it?). Now I have 
everything I need to cut new release minus anything unexpected;-)

I am not sure you saw it but couple of days ago I committed  some docker files 
to build OSv development environment container images for Fedora and Ubuntu. If 
you care you can use the fedora one that would let you build and run OSv in 
Fedora 29 docker container running on Fedora 30. This is how I build and run 
OSv on Fedora 29 when on Ubuntu 19.04 on my laptop. Btw the docker files 
delegate to setup.py. 

I do not have much experience with docker hub. Do you think it would help if we 
published those docker images to docker hubs so people could pull it from there 
instead of building the image from scratch?

Waldek

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/fcfb10f2-c6d1-4e01-8831-2261f80bb043%40googlegroups.com.


Re: [osv-dev] [PATCH V3] Upgrade cli, lua and httpserver-api modules to use OpenSSL 1.1 and Lua 5.3

2019-08-15 Thread Nadav Har'El
Thanks, I tested this on Fedora 29 and it is working well (on Fedora 30, I
can't build because of the unrelated
https://github.com/cloudius-systems/osv/issues/1040) and I finally don't
need that "compat" library - thanks.
Commited!


On Tue, Aug 13, 2019 at 6:33 AM Waldemar Kozaczuk 
wrote:

> As the issue #1022 explains, building the default OSv image that
> implicitly adds cli module that in turn implicitly pulls httpserver-api
> and cli modules, requires some bizarre workarounds on modern Linux
> distribution.
> This is caused by the fact that the lua module is based on Lua 5.2 and
> older version
> of LuaSec (OpenSSL library for Lua) which requires old version of OpenSSL
> 1.0.
>
> This patch updates following modules:
> 1) cli:
> - makes necessary changes to work with Lua 5.3
> - drops explicit dependency on the modules ncurses and libedit in lieu of
>   new terminfo and the script manifest_from_host.sh that pulls all
> necessary
>   dependencies from host
> - creates common cli executable that can be used on both host and OSv side
>
> 2) httpserver-api
> - drops explicit dependency on the module libyaml in lieu of using
>   manifest_from_host.sh that pulls all necessary dependencies from host
>
> 3) lua
> - revamps this module completely by upgrading to Lua 5.3
> - removes custom-made makefiles to build Lua from the source
> - extensively employs manifest_from_host.sh to pull Lua libraries
>   from host (see changes to setup.py) and minimize building from source
> - updates Lua modules (like LuaSec) to the newest versions
>
> 4) openssl
> - instead of using hardcoded usr.manifest that pulls openssl 1.0 libraries
> from external,
>  new Makefile employs manifest_from_host.sh to find relevant main OpenSSL
> 1.1 library
>  and its required dependencies from host
>

If nothing uses the openssl from external/ any more, maybe we should
separately remove it from there, so nobody will be tempted to use it in the
future. Of course this will be a separate patch, later.


> Finally it adds new terminfo module and changes setup.py to uninstall
> compat-openssl10-devel if present and install openssl-devel and lua 5.3
> packages.
>
> This patch has been tested with following Linux distribution using Docker:
> - Ubuntu 18.10 (OpenSSL 1.0 -> OpenSSL 1.1 upgrade)
> - Ubuntu 19.04
> - Fedora 27 (OpenSSL 1.0 -> OpenSSL 1.1 upgrade)
> - Ubuntu 29
>
> Fixes #1022
>
> Signed-off-by: Waldemar Kozaczuk 
> ---
>  modules/cli/.gitignore|   2 +-
>  modules/cli/Makefile  |  33 +++-
>  modules/cli/cli.c |  65 +--
>  modules/cli/lib/osv_api.lua   |   4 +-
>  modules/cli/module.py |   8 +-
>  modules/cli/rpmbuild/Makefile |   8 +-
>  modules/httpserver-api/Makefile   |   1 +
>  modules/httpserver-api/module.py  |   1 -
>  modules/lua/.gitignore|   8 +-
>  modules/lua/Makefile  | 133 +++---
>  modules/lua/check-openssl-version |  16 
>  modules/lua/module.py |   6 +-
>  modules/lua/src/Makefile  | 119 --
>  modules/openssl/.gitignore|   1 +
>  modules/openssl/Makefile  |  22 +
>  modules/openssl/usr.manifest  |  37 -
>  modules/terminfo/.gitignore   |   1 +
>  modules/terminfo/Makefile |  16 
>  modules/terminfo/module.py|   4 +
>  scripts/setup.py  |  15 ++--
>  20 files changed, 150 insertions(+), 350 deletions(-)
>  delete mode 100755 modules/lua/check-openssl-version
>  delete mode 100644 modules/lua/src/Makefile
>  create mode 100644 modules/openssl/.gitignore
>  create mode 100644 modules/openssl/Makefile
>  delete mode 100644 modules/openssl/usr.manifest
>  create mode 100644 modules/terminfo/.gitignore
>  create mode 100644 modules/terminfo/Makefile
>  create mode 100644 modules/terminfo/module.py
>
> diff --git a/modules/cli/.gitignore b/modules/cli/.gitignore
> index 773de15c..64545030 100644
> --- a/modules/cli/.gitignore
> +++ b/modules/cli/.gitignore
> @@ -1,2 +1,2 @@
>  cli
> -cli.so
> +usr.manifest
> diff --git a/modules/cli/Makefile b/modules/cli/Makefile
> index e2abe632..8a3b037e 100644
> --- a/modules/cli/Makefile
> +++ b/modules/cli/Makefile
> @@ -1,34 +1,27 @@
> +LUA_LIB = $(shell pkg-config --libs lua53 2>/dev/null || pkg-config
> --libs lua || echo 'ERROR: Could not find lua, please run
> ./scripts/setup.py')
> +LUA_INCLUDES = $(shell pkg-config --cflags lua53 2>/dev/null ||
> pkg-config --cflags lua || echo 'ERROR: Could not find lua, please run
> ./scripts/setup.py')
> +
>  CC=gcc
>  CFLAGS=-O2 -g -Wall -std=gnu99
> -INCLUDES=-I../lua/src \
> -   -I$(lastword $(wildcard ../ncurses/build/*/include)) \
> -   -I$(lastword $(wildcard ../libedit/build/*/src))
> -LFLAGS=-L../lua/src \
> -   -L$(lastword $(wildcard ../ncurses/build/*/lib)) \
> -   -L$(lastword $(wildcard ../libedit/build/*/src/.libs))
> -LIBS=-ledit -ltinfo -llua
> +LIBS=-ledit -ltinfo $(LUA_