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

Test lighttpd was build with lua support #5073

Closed
wants to merge 1 commit into from
Closed

Conversation

yubiuser
Copy link
Member

What does this PR aim to accomplish?:

Adds a test to check if the installed lighttpdwas compiled with lua support. In the light of possible upcoming changes regarding lighttpd, this test might become useful


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

@yubiuser yubiuser requested a review from a team December 18, 2022 10:44
@yubiuser yubiuser force-pushed the lighttpd_lua branch 2 times, most recently from f90f723 to c07501f Compare December 18, 2022 13:52
Signed-off-by: Christian König <ckoenig@posteo.de>
@PromoFaux
Copy link
Member

I don't think this is required at the moment - but we can come back to it should we need to in the future.

The recent changes in #5065 and #5075 went the way of simplifying the config, rather than introducing the lua script via mod_magnet

@gstrauss
Copy link
Contributor

gstrauss commented Dec 20, 2022

As @PromoFaux mentioned, this does not seem to be needed at the moment, though it is an option that is mentioned at pi-hole/docs#824 (awaiting review)

FYI: lighttpd reporting that it was built with lua support does not necessarily mean that mod_magnet is available. The packager may have built lighttpd with lua support, but then made a separate package containing mod_magnet (e.g. lighttpd-mod-magnet) dependent of the lighttpd package. That separate package might not be installed on the system.

A more sure-fired way to determine if mod_magnet is available:

  • Attempt to install the appropriate package on the system
    (lighttpd-mod_magnet or lighttpd-mod-magnet on many systems; lighttpd-modules-lua on Debian 11 and later)
  • Create /tmp/test.conf
server.document-root = "/tmp"
server.modules = ("mod_magnet")
  • Run lighttpd -f /tmp/test.conf -tt. If the command exits success (0), then mod_magnet is available. If the command exits non-zero, mod_magnet is not available.

@yubiuser
Copy link
Member Author

@gstrauss Thanks for the extended and improved test example.
As there is currently not *.lua config planed anymore, I'm going to close the PR. We can revive it later if needed.

@yubiuser yubiuser closed this Dec 20, 2022
@yubiuser yubiuser deleted the lighttpd_lua branch December 20, 2022 21:02
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.

3 participants