Skip to content

Conversation

@KotoishiHeart
Copy link
Contributor

What to do if you don't have php and eselect-php support?

@stkw0
Copy link
Contributor

stkw0 commented Apr 30, 2025

What to do if you don't have php and eselect-php support?

Can you explain a bit more what do you mean? What are you trying to achieve and how is openlitespeed related?


LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if it's the case. Just a reminder that only the arch that have been tested should be added to KEYWORDS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since openlitespeed supports ARM, I don't think there's any problem. I confirmed that I can build it.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a common confusion. Even if upstream supports it,if it has not been personally tested it should not be added. In this case it's okay since you tested it.

@KotoishiHeart
Copy link
Contributor Author

KotoishiHeart commented Apr 30, 2025

Can you explain a bit more what do you mean? What are you trying to achieve and how is openlitespeed related?

Openlitespeed requires a special php that supports litespeed.
The currently available PHP is not compatible with Litespeed.
The default PHP provided by openlitespeed is version 5.6 with no support.

Openlitespeed cannot be run with just the ebuild you add.
Is it possible to put openlitespeed in guru?

@KotoishiHeart KotoishiHeart force-pushed the add_openlitespeed branch 2 times, most recently from a2ed505 to 8289339 Compare April 30, 2025 12:44
@demize
Copy link
Contributor

demize commented May 2, 2025

Openlitespeed requires a special php that supports litespeed.

It looks like PHP has support for litespeed, but it needs to be enabled at compile-time. The best solution would be to submit a separate pull request to ::gentoo, adding a litespeed USE flag so that this package can depend on dev-lang/php[litespeed].

Unfortunately I don't think the alternative solutions to provide PHP are good fits for GURU, since they would mean either creating an entirely separate PHP ebuild in ::guru solely to support litespeed, bundling a custom build of PHP with openlitespeed, or expecting the user to provide their own PHP installation.

Theoretically you could add openlitespeed without providing any PHP support, but I'd probably try to get a USE flag added in ::gentoo first, since otherwise it leaves potential users in an awkward situation here.

@KotoishiHeart
Copy link
Contributor Author

As a workaround until litespeed support is added, would it be better to install the official lsphp8.1 package for ubuntu?

@demize
Copy link
Contributor

demize commented May 8, 2025

As a workaround until litespeed support is added, would it be better to install the official lsphp8.1 package for ubuntu?

Ultimately this is just a webserver, so I don’t think we should block adding it because there’s no easy way to build support for it with PHP in ::gentoo.

I don’t think we can add or include our own PHP server in ::guru, either as part of this package or as its own package, since it would conflict with the duplicates policy. And I don’t want to hold this up myself, so if we can add it without any PHP support (unless the user installs a custom build), I think that’s fine for now. Did you (or are you planning to) open a PR in ::gentoo to add the USE flag?

Either way, @stkw0 has provided a lot more feedback already, so if he doesn’t have any objections to adding as-is then don’t worry about me :)

@stkw0
Copy link
Contributor

stkw0 commented May 8, 2025

I think it's worthy to send a PR to ::gentoo adding the litespeed support, as it may be useful for other cases and would simplify things. Mixing a source ebuild and a pre-built binary from Ubuntu is a bit of a mess.

btw the current PR still has a number of issues (will add some more comments). There is no sign-off tag and there are two Metadata files for acct-user and acct-group ebuilds that should not be there.
Is there a need to add both, openlitespeed version 1.8.1 and version 1.8.3.1?

-OPTION(MOD_PAGESPEED "Whether pagespeed should be built" ${LINUX_X64})
-OPTION(MOD_SECURITY "Whether mod_security should be built" ${NOT_MACOS})
-OPTION(MOD_LUA "Whether Lua should be built" ${LINUX_X64})
+OPTION(MOD_PAGESPEED "Whether pagespeed should be built" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be passed to mycmakeargs instead of being patched here

@@ -0,0 +1,84 @@
I plan to eventually change the patch to install openlitespeed in the appropriate location instead of installing it in /usr/local/lsws/.
Copy link
Contributor

@stkw0 stkw0 May 8, 2025

Choose a reason for hiding this comment

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

yeah. This should be fixed before merging this. Nothing should be installed in /usr/local directory.
Usually web pages read-only data is stored in /usr/share

A bit of reference in case it's useful:

fi
OPENLSWS_EXAMPLEPORT=8088

sed -e "s/%ADMIN_PORT%/$OPENLSWS_ADMINPORT/" "${S}/dist/admin/conf/admin_config.conf.in" > "${S}/dist/admin/conf/admin_config.conf" || die
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it might be better to move all this configuration part to pkg_config and print an informational message about it. Something similar to what postgresql ebuild does

@KotoishiHeart
Copy link
Contributor Author

Is there a need to add both, openlitespeed version 1.8.1 and version 1.8.3.1?

There's no need. It works only with Version 1.8.3.1.

Did you (or are you planning to) open a PR in ::gentoo to add the USE flag?

I don't have the code knowledge to open a PR to add the litespeed flag to "eselect-php" or "php", and I don't have the time to do the work for that.
It might be possible if you do it for a long time, but other developers might be faster to change it.

@stkw0
Copy link
Contributor

stkw0 commented May 9, 2025

There's no need. It works only with Version 1.8.3.1.

Then please, remove the other one.

I don't have the code knowledge to open a PR to add the litespeed flag to "eselect-php" or "php", and I don't have the time to do the work for that.
It might be possible if you do it for a long time, but other developers might be faster to change it.

I just opened a PR to add litespeed USE to php: gentoo/gentoo#42003

dev-libs/ls-hpack:=[static-libs=]
"

RDEPEND="
Copy link
Member

Choose a reason for hiding this comment

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

Several libraries are missing from RDEPEND here.

KEYWORDS="~amd64 ~arm64"

IUSE="static-libs ruby systemd"
RESTRICT=""
Copy link
Member

Choose a reason for hiding this comment

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

?

IUSE="static-libs ruby systemd"
RESTRICT=""

DEPEND="
Copy link
Member

Choose a reason for hiding this comment

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

Unsorted contents. Also, conditionals inside should go last.

sed "s:%LSWS_CTRL%:$SERVERROOT/bin/lswsctrl:" "${S}/dist/admin/misc/lsws.rc.gentoo.in" > "${S}/dist/admin/misc/lsws.rc.gentoo" || die
sed "s:%LSWS_CTRL%:$SERVERROOT/bin/lswsctrl:" "${S}/dist/admin/misc/lshttpd.service.in" > "${S}/dist/admin/misc/lshttpd.service" || die

local mycmakeargs=(
Copy link
Member

Choose a reason for hiding this comment

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

Why?

}

src_install() {
default
Copy link
Member

Choose a reason for hiding this comment

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

This should surely be cmake_src_install.


src_install() {
default
systemd_dounit "${D}"/admin/misc/lshttpd.service || die
Copy link
Member

Choose a reason for hiding this comment

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

ED, not D, but no need for die here (it dies for us).

app-arch/brotli
dev-libs/yajl
virtual/libcrypt
ruby? ( dev-lang/ruby )
Copy link
Member

Choose a reason for hiding this comment

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

This is unlikely to be right by itself and should use an eclass.

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.

4 participants