Message ID | 20190918061915.31250-3-francois.perrad@gadz.org |
---|---|
State | Changes Requested |
Headers | show |
Series | [pkg-luarocks,1/6] pkg-luarocks: remove LUAROCKS_RUN_ENV | expand |
On Wed, 18 Sep 2019 08:19:12 +0200 Francois Perrad <fperrad@gmail.com> wrote: > Signed-off-by: Francois Perrad <francois.perrad@gadz.org> > --- > package/lsqlite3/lsqlite3.mk | 1 + > package/lua-curl/lua-curl.mk | 1 + > package/lua-flu/lua-flu.mk | 3 +++ > package/lua-iconv/lua-iconv.mk | 1 + > package/luadbi-sqlite3/luadbi-sqlite3.mk | 1 + > package/luaexpat/luaexpat.mk | 1 + > package/luaossl/luaossl.mk | 3 +++ > package/luasec/luasec.mk | 1 + > package/luasql-sqlite3/luasql-sqlite3.mk | 1 + > package/wsapi-fcgi/wsapi-fcgi.mk | 1 + > 10 files changed, 14 insertions(+) > > diff --git a/package/lsqlite3/lsqlite3.mk b/package/lsqlite3/lsqlite3.mk > index bbf6a1db1..51f9516fd 100644 > --- a/package/lsqlite3/lsqlite3.mk > +++ b/package/lsqlite3/lsqlite3.mk > @@ -8,5 +8,6 @@ LSQLITE3_VERSION = 0.9.5-1 > LSQLITE3_SUBDIR = lsqlite3_fsl09y > LSQLITE3_LICENSE = MIT > LSQLITE3_DEPENDENCIES = sqlite > +LSQLITE3_BUILD_OPTS = SQLITE_DIR="$(STAGING_DIR)/usr" I'm not sure to understand this change. It seems a bit redundant for all those packages to say "the native libraries you need are in $(STAGING_DIR)/usr", since native libraries are always there. Why isn't the common infrastructure taking care of this ? Thomas
Le mer. 18 sept. 2019 à 09:35, Thomas Petazzoni < thomas.petazzoni@bootlin.com> a écrit : > On Wed, 18 Sep 2019 08:19:12 +0200 > Francois Perrad <fperrad@gmail.com> wrote: > > > Signed-off-by: Francois Perrad <francois.perrad@gadz.org> > > --- > > package/lsqlite3/lsqlite3.mk | 1 + > > package/lua-curl/lua-curl.mk | 1 + > > package/lua-flu/lua-flu.mk | 3 +++ > > package/lua-iconv/lua-iconv.mk | 1 + > > package/luadbi-sqlite3/luadbi-sqlite3.mk | 1 + > > package/luaexpat/luaexpat.mk | 1 + > > package/luaossl/luaossl.mk | 3 +++ > > package/luasec/luasec.mk | 1 + > > package/luasql-sqlite3/luasql-sqlite3.mk | 1 + > > package/wsapi-fcgi/wsapi-fcgi.mk | 1 + > > 10 files changed, 14 insertions(+) > > > > diff --git a/package/lsqlite3/lsqlite3.mk b/package/lsqlite3/lsqlite3.mk > > index bbf6a1db1..51f9516fd 100644 > > --- a/package/lsqlite3/lsqlite3.mk > > +++ b/package/lsqlite3/lsqlite3.mk > > @@ -8,5 +8,6 @@ LSQLITE3_VERSION = 0.9.5-1 > > LSQLITE3_SUBDIR = lsqlite3_fsl09y > > LSQLITE3_LICENSE = MIT > > LSQLITE3_DEPENDENCIES = sqlite > > +LSQLITE3_BUILD_OPTS = SQLITE_DIR="$(STAGING_DIR)/usr" > > I'm not sure to understand this change. It seems a bit redundant for > all those packages to say "the native libraries you need are in > $(STAGING_DIR)/usr", since native libraries are always there. Why isn't > the common infrastructure taking care of this ? > > Yes, it looks redundant. _BUILD_OPT contains a list of key/value, the value is always the same ($(STAGING_DIR)/usr), but the key (SQLITE_DIR in this case) depends of the rock. This is the LuaRocks way. François > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot >
On Wed, 18 Sep 2019 20:19:14 +0200 François Perrad <francois.perrad@gadz.org> wrote: > Yes, it looks redundant. > _BUILD_OPT contains a list of key/value, > the value is always the same ($(STAGING_DIR)/usr), > but the key (SQLITE_DIR in this case) depends of the rock. > > This is the LuaRocks way. I understand, but before your change such xyz_DIR were not needed, and now they are needed. This looks like a "regression" in the sense that things are worse than they were. Could you explain why the existing solution no longer works ? Thanks! Thomas
Le mer. 18 sept. 2019 à 21:23, Thomas Petazzoni < thomas.petazzoni@bootlin.com> a écrit : > On Wed, 18 Sep 2019 20:19:14 +0200 > François Perrad <francois.perrad@gadz.org> wrote: > > > Yes, it looks redundant. > > _BUILD_OPT contains a list of key/value, > > the value is always the same ($(STAGING_DIR)/usr), > > but the key (SQLITE_DIR in this case) depends of the rock. > > > > This is the LuaRocks way. > > I understand, but before your change such xyz_DIR were not needed, and > now they are needed. This looks like a "regression" in the sense that > things are worse than they were. > > Could you explain why the existing solution no longer works ? > > Previously, there is in the config file: external_deps_dirs = { getenv('STAGING_DIR') .. [[/usr]] } and this path was globally used. The config file is common for host-luarocks and luarocks, so this way is no longer doable. `external_deps_dirs` has no equivalent as CLI option. But for each external dependency `BAR`, a CLI option `BAR_DIR` is available and must be set to `$(STAGING_DIR)/usr` (This is the LuaRocks way). There are some explanations in the commit log 2/6. If you look at the final point of the serie, the LuaRocks infrastructure is greatly improved: - host-luarocks is now supported - luarocks.mk contains no longer the cross-compilation stuff - the macro _INSTALL_TARGET_CMDS in pkg-luarocks, contains all the cross-compilation stuff (better design compatible with per-package folders) - luarocks is called without the full path of host-lua and without LUAROCKS_RUN_ENV François > Thanks! > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com >
Hello François, On Thu, 19 Sep 2019 18:38:14 +0200 François Perrad <francois.perrad@gadz.org> wrote: > Previously, there is in the config file: > external_deps_dirs = { getenv('STAGING_DIR') .. [[/usr]] } > and this path was globally used. > > The config file is common for host-luarocks and luarocks, > so this way is no longer doable. We cannot pass a separate configuration file when building things for the host and building things for the target ? > `external_deps_dirs` has no equivalent as CLI option. > But for each external dependency `BAR`, a CLI option `BAR_DIR` is available > and must be set to `$(STAGING_DIR)/usr` (This is the LuaRocks way). > > There are some explanations in the commit log 2/6. > > If you look at the final point of the serie, the LuaRocks infrastructure is > greatly improved: > - host-luarocks is now supported > - luarocks.mk contains no longer the cross-compilation stuff > - the macro _INSTALL_TARGET_CMDS in pkg-luarocks, contains all the > cross-compilation stuff (better design compatible with per-package folders) > - luarocks is called without the full path of host-lua and without > LUAROCKS_RUN_ENV Don't get me wrong, I definitely agree that the series brings a number of useful improvements. I just find it annoying that now all packages need to pass a BAR_DIR = $(STAGING_DIR)/usr for all their native dependencies, while it was not needed before. So that's why I'm asking a few questions to see if we could do better. Thanks! Thomas
Hello François, On Thu, 19 Sep 2019 18:38:14 +0200 François Perrad <francois.perrad@gadz.org> wrote: > Previously, there is in the config file: > external_deps_dirs = { getenv('STAGING_DIR') .. [[/usr]] } > and this path was globally used. > > The config file is common for host-luarocks and luarocks, > so this way is no longer doable. According to https://github.com/luarocks/luarocks/wiki/config-file-format, the path to the configuration file can be overridden using the environment variable LUAROCKS_CONFIG. This would allow to have one config file to use when building host LuaRocks packages, and one to use when building target LuaRocks packages. Thanks to that, we could keep the external_deps_dirs in the LuaRocks config file used for target packages, and avoid adding all those BAR_DIR, FOO_DIR variables in a number of packages. Could you have a look at whether this is possible ? Thanks! Thomas
diff --git a/package/lsqlite3/lsqlite3.mk b/package/lsqlite3/lsqlite3.mk index bbf6a1db1..51f9516fd 100644 --- a/package/lsqlite3/lsqlite3.mk +++ b/package/lsqlite3/lsqlite3.mk @@ -8,5 +8,6 @@ LSQLITE3_VERSION = 0.9.5-1 LSQLITE3_SUBDIR = lsqlite3_fsl09y LSQLITE3_LICENSE = MIT LSQLITE3_DEPENDENCIES = sqlite +LSQLITE3_BUILD_OPTS = SQLITE_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/lua-curl/lua-curl.mk b/package/lua-curl/lua-curl.mk index d887cb511..13b1d6d9f 100644 --- a/package/lua-curl/lua-curl.mk +++ b/package/lua-curl/lua-curl.mk @@ -10,5 +10,6 @@ LUA_CURL_SUBDIR = Lua-cURLv3-$(LUA_CURL_VERSION_UPSTREAM) LUA_CURL_LICENSE = MIT LUA_CURL_LICENSE_FILES = $(LUA_CURL_SUBDIR)/LICENSE LUA_CURL_DEPENDENCIES = libcurl +LUA_CURL_BUILD_OPTS = CURL_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/lua-flu/lua-flu.mk b/package/lua-flu/lua-flu.mk index 4c7b76547..0c65e6da6 100644 --- a/package/lua-flu/lua-flu.mk +++ b/package/lua-flu/lua-flu.mk @@ -10,5 +10,8 @@ LUA_FLU_SUBDIR = doub-flu-63f077a988cd LUA_FLU_LICENSE = MIT LUA_FLU_LICENSE_FILES = $(LUA_FLU_SUBDIR)/doc/LICENSE.txt LUA_FLU_DEPENDENCIES = attr libfuse +LUA_FLU_BUILD_OPTS = \ + ATTR_DIR="$(STAGING_DIR)/usr" \ + FUSE_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/lua-iconv/lua-iconv.mk b/package/lua-iconv/lua-iconv.mk index ea8e0dd8b..ea0cca29b 100644 --- a/package/lua-iconv/lua-iconv.mk +++ b/package/lua-iconv/lua-iconv.mk @@ -8,5 +8,6 @@ LUA_ICONV_VERSION = 7-1 LUA_ICONV_LICENSE = MIT LUA_ICONV_LICENSE_FILES = $(LUA_ICONV_SUBDIR)/COPYING LUA_ICONV_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LUA_ICONV_BUILD_OPTS = ICONV_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/luadbi-sqlite3/luadbi-sqlite3.mk b/package/luadbi-sqlite3/luadbi-sqlite3.mk index 4ae2b5cf3..755803c43 100644 --- a/package/luadbi-sqlite3/luadbi-sqlite3.mk +++ b/package/luadbi-sqlite3/luadbi-sqlite3.mk @@ -9,5 +9,6 @@ LUADBI_SQLITE3_SUBDIR = luadbi LUADBI_SQLITE3_LICENSE = MIT LUADBI_SQLITE3_LICENSE_FILES = $(LUADBI_SQLITE3_SUBDIR)/COPYING LUADBI_SQLITE3_DEPENDENCIES = sqlite +LUADBI_SQLITE3_BUILD_OPTS = SQLITE_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk index 8c86b24f2..74533385c 100644 --- a/package/luaexpat/luaexpat.mk +++ b/package/luaexpat/luaexpat.mk @@ -8,5 +8,6 @@ LUAEXPAT_VERSION = 1.3.3-1 LUAEXPAT_LICENSE = MIT LUAEXPAT_LICENSE_FILES = $(LUAEXPAT_SUBDIR)/LICENSE LUAEXPAT_DEPENDENCIES = expat +LUAEXPAT_BUILD_OPTS = EXPAT_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/luaossl/luaossl.mk b/package/luaossl/luaossl.mk index 128c320d1..8a636dc74 100644 --- a/package/luaossl/luaossl.mk +++ b/package/luaossl/luaossl.mk @@ -10,5 +10,8 @@ LUAOSSL_SUBDIR = luaossl-rel-$(LUAOSSL_VERSION_UPSTREAM) LUAOSSL_LICENSE = MIT LUAOSSL_LICENSE_FILES = $(LUAOSSL_SUBDIR)/LICENSE LUAOSSL_DEPENDENCIES = openssl +LUAOSSL_BUILD_OPTS = \ + CRYPTO_DIR="$(STAGING_DIR)/usr" \ + OPENSSL_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk index 9ce358753..e338bb74a 100644 --- a/package/luasec/luasec.mk +++ b/package/luasec/luasec.mk @@ -10,5 +10,6 @@ LUASEC_SUBDIR = luasec-luasec-$(LUASEC_VERSION_UPSTREAM) LUASEC_LICENSE = MIT LUASEC_LICENSE_FILES = $(LUASEC_SUBDIR)/LICENSE LUASEC_DEPENDENCIES = openssl +LUASEC_BUILD_OPTS = OPENSSL_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/luasql-sqlite3/luasql-sqlite3.mk b/package/luasql-sqlite3/luasql-sqlite3.mk index 69fc956c9..bcb8676af 100644 --- a/package/luasql-sqlite3/luasql-sqlite3.mk +++ b/package/luasql-sqlite3/luasql-sqlite3.mk @@ -9,5 +9,6 @@ LUASQL_SQLITE3_SUBDIR = luasql LUASQL_SQLITE3_LICENSE = MIT LUASQL_SQLITE3_LICENSE_FILES = $(LUASQL_SQLITE3_SUBDIR)/doc/us/license.html LUASQL_SQLITE3_DEPENDENCIES = sqlite +LUASQL_SQLITE3_BUILD_OPTS = SQLITE_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package)) diff --git a/package/wsapi-fcgi/wsapi-fcgi.mk b/package/wsapi-fcgi/wsapi-fcgi.mk index 677bb774b..d1cb06f79 100644 --- a/package/wsapi-fcgi/wsapi-fcgi.mk +++ b/package/wsapi-fcgi/wsapi-fcgi.mk @@ -11,5 +11,6 @@ WSAPI_FCGI_LICENSE_FILES = \ $(WSAPI_FCGI_SUBDIR)/doc/us/license.html \ $(WSAPI_FCGI_SUBDIR)/doc/us/license.md WSAPI_FCGI_DEPENDENCIES = libfcgi +WSAPI_FCGI_BUILD_OPTS = FASTCGI_DIR="$(STAGING_DIR)/usr" $(eval $(luarocks-package))
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> --- package/lsqlite3/lsqlite3.mk | 1 + package/lua-curl/lua-curl.mk | 1 + package/lua-flu/lua-flu.mk | 3 +++ package/lua-iconv/lua-iconv.mk | 1 + package/luadbi-sqlite3/luadbi-sqlite3.mk | 1 + package/luaexpat/luaexpat.mk | 1 + package/luaossl/luaossl.mk | 3 +++ package/luasec/luasec.mk | 1 + package/luasql-sqlite3/luasql-sqlite3.mk | 1 + package/wsapi-fcgi/wsapi-fcgi.mk | 1 + 10 files changed, 14 insertions(+)