Skip to content
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

chore: fix 'make deps' #3472

Closed
wants to merge 3 commits into from
Closed

chore: fix 'make deps' #3472

wants to merge 3 commits into from

Conversation

Yiyiyimu
Copy link
Member

@Yiyiyimu Yiyiyimu commented Feb 1, 2021

Signed-off-by: yiyiyimu wosoyoung@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 first

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Makefile Outdated
@@ -55,7 +55,9 @@ help: default
.PHONY: deps
deps: default
ifeq ($(LUAROCKS_VER),luarocks 3.)
ifeq ("$(wildcard ~/.luarocks)", "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

@Yiyiyimu Yiyiyimu Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use mkdir -p ~/.luarocks would be better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about:

 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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
@Yiyiyimu Yiyiyimu changed the title chore: fix 'mkdir ~/.luarocks' even if exists chore: fix 'make deps' Feb 1, 2021
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
@Yiyiyimu
Copy link
Member Author

Yiyiyimu commented Feb 7, 2021

Fixed in v2.3 #3466. Closed.

@Yiyiyimu Yiyiyimu closed this Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants