You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/01 10:11:27 UTC

[GitHub] [apisix] Yiyiyimu opened a new pull request #3472: chore: fix 'mkdir ~/.luarocks' even if exists

Yiyiyimu opened a new pull request #3472:
URL: https://github.com/apache/apisix/pull/3472


   Signed-off-by: yiyiyimu <wo...@gmail.com>
   
   ### What this PR does / why we need it:
   related to #3415 
   
   ### Pre-submission checklist:
   
   * [ ] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r568295463



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       Yeah that would be better! Thanks!
   
   And I made a mistake yesterday. No matter how we install luarocks, the config would always write to `/usr/local/etc/luarocks`, so we all need sudo permission. Is that the same on your side?

##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       It's weird... I installed lua5.3 and configure luarocks to it this morning to do some stuff, and found out it changes some config  that even though I re-configure luarocks to luajit from openresty, it still tries to find lua5.3.
   
   So I remove everything about luarocks, and re-install it with the script. Now this time, it would write config to `~/.luarocks` without the `--local` flag.
   
   I'm not so sure right now. If you could not reproduce this problem, I'll close it




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567746883



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       Got it I installed luarocks with `apt`, so when it changes luarocks config, it needs sudo privilege. I'll change to the method mentioned in #3467 and see if it works.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r568362869



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       It's weird... I installed lua5.3 and configure luarocks to it this morning to do some stuff, and found out it changes some config  that even though I re-configure luarocks to luajit from openresty, it still tries to find lua5.3.
   
   So I remove everything about luarocks, and re-install it with the script. Now this time, it would write config to `~/.luarocks` without the `--local` flag.
   
   I'm not so sure right now. If you could not reproduce this problem, I'll close it




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r568295463



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       Yeah that would be better! Thanks!
   
   And I made a mistake yesterday. No matter how we install luarocks, the config would always write to `/usr/local/etc/luarocks`, so we all need sudo permission. Is that the same on your side?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567804421



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       Use `mkdir -p ~/.luarocks` would be better.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3472: chore: fix 'mkdir ~/.luarocks' even if exists

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567704635



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       I think calling `mkdir ~/.luarocks` even it exists doesn't do any harm?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r568301053



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       What about:
   ```diff
    deps: default
    ifeq ($(LUAROCKS_VER),luarocks 3.)
           mkdir ~/.luarocks || true
   -       luarocks config variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
   +       luarocks config --local variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
           luarocks config variables.OPENSSL_INCDIR $(addprefix $(OR_PREFIX), openssl/include)
           luarocks install rockspec/apisix-master-0.rockspec --tree=deps --only-deps --local
    else
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567709218



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       It would leave an error message, which confused me at first before I realize it does no harm and what I missed is `sudo`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu closed pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu closed pull request #3472:
URL: https://github.com/apache/apisix/pull/3472


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on a change in pull request #3472: chore: fix 'mkdir ~/.luarocks' even if exists

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567709218



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       It would leave an error message, which confused me at first before I realize it does no harm




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r568301053



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       What about:
   ```diff
    deps: default
    ifeq ($(LUAROCKS_VER),luarocks 3.)
           mkdir ~/.luarocks || true
   -       luarocks config variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
   +       luarocks config --local variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
           luarocks config variables.OPENSSL_INCDIR $(addprefix $(OR_PREFIX), openssl/include)
           luarocks install rockspec/apisix-master-0.rockspec --tree=deps --only-deps --local
    else
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#issuecomment-774684007


   Fixed in v2.3 #3466. Closed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #3472: chore: fix 'make deps'

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #3472:
URL: https://github.com/apache/apisix/pull/3472#discussion_r567740838



##########
File path: Makefile
##########
@@ -55,7 +55,9 @@ help: default
 .PHONY: deps
 deps: default
 ifeq ($(LUAROCKS_VER),luarocks 3.)
+ifeq ("$(wildcard ~/.luarocks)", "")

Review comment:
       @Yiyiyimu 
   I think you are making something wrong. The `make deps` only install dependencies locally. There is no need to call `sudo`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org