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

www-servers/lighttpd: refresh configs #35790

Closed
wants to merge 5 commits into from

Conversation

gstrauss
Copy link
Contributor

lighttpd-1.4.75.ebuild

  • use https://wiki.lighttpd.net/ links to lighttpd wiki doc
  • add dev-db/sqlite dependency which is used by mod_webdav
  • remove e2fsprogs; mod_webdav no longer uses uuid_*() from e2fsprogs
  • remove libev; no longer used by lighttpd
    lighttpd directly uses native event frameworks (e.g. epoll)
  • remove 2+ year old deprecation warning trace

lighttpd.initd, lighttpd.service

  • test configs with -tt for a better preflight config test.
  • graceful restart using SIGUSR1

lighttpd.conf

  • remove obsolete modules
  • update syntax and comments
  • use lighttpd builtin mimetype.assign by default (can be overridden)

@thesamesam please review when you have a moment

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @gstrauss
Areas affected: ebuilds
Packages affected: www-servers/lighttpd

www-servers/lighttpd: @thesamesam

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Mar 16, 2024
@gstrauss
Copy link
Contributor Author

Should I also add -Dwith_libdeflate=enabled to the .ebuild since libdeflate is now available in #34767 ?

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-03-16 23:34 UTC
Newest commit scanned: 1630bb4
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/845fe855b9/output.html

@thesamesam
Copy link
Member

Glenn, thank you again for your help with lighttpd packaging. It's much appreciated.

Should I also add -Dwith_libdeflate=enabled to the .ebuild since libdeflate is now available in #34767 ?

Ah, good spot. How useful do you feel it is? Is it worth us supporting it unconditionally, or should we make it optional via a USE flag?

@gstrauss
Copy link
Contributor Author

Should I also add -Dwith_libdeflate=enabled to the .ebuild since libdeflate is now available in #34767 ?

Ah, good spot. How useful do you feel it is? Is it worth us supporting it unconditionally, or should we make it optional via a USE flag?

libdeflate is more performant, but likely uses more resources. To give people the option, it should probably be a USE flag.

@gstrauss
Copy link
Contributor Author

I added a commit (untested) to attempt to add USE_LIBDEFLATE.

Should I add put the changes in this PR made to www-servers/lighttpd/lighttpd-1.4.75.ebuild into www-servers/lighttpd/lighttpd-9999.ebuild instead of www-servers/lighttpd/lighttpd-1.4.75.ebuild ?

Also, there is an ongoing discussion about mime.types in https://bugs.gentoo.org/show_bug.cgi?id=399401 I am looking for guidance on whether or not to include the change to www-servers/lighttpd/files/conf/lighttpd.conf-r1 to use the lighttpd builtin mimetype.assign list or to continue using the manual list compiled by Alan in www-servers/lighttpd/files/conf/mime-types.conf

@gstrauss
Copy link
Contributor Author

The commit to add USE_LIBDEFLATE appears to cause problems due to libdeflate not being available on s390, so I have removed the commit from the PR.

error:

NonsolvableDepsInStable	nonsolvable depset(depend) keyword(~s390) stable profile (default/linux/s390/17.0) (3 total): solutions: [ app-arch/libdeflate ]
NonsolvableDepsInStable	nonsolvable depset(rdepend) keyword(~s390) stable profile (default/linux/s390/17.0) (3 total): solutions: [ app-arch/libdeflate ]

commit:

    www-servers/lighttpd: USE_LIBDEFLATE option
    
diff --git a/www-servers/lighttpd/lighttpd-1.4.75.ebuild b/www-servers/lighttpd/lighttpd-1.4.75.ebuild
index f5ecac41f312..7421e8eaf6d7 100644
--- a/www-servers/lighttpd/lighttpd-1.4.75.ebuild
+++ b/www-servers/lighttpd/lighttpd-1.4.75.ebuild
@@ -17,7 +17,7 @@ SRC_URI="
 LICENSE="BSD GPL-2"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="+brotli dbi gnutls kerberos ldap +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd"
+IUSE="+brotli dbi gnutls kerberos ldap libdeflate +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd"
 RESTRICT="!test? ( test )"
 
 REQUIRED_USE="
@@ -37,6 +37,7 @@ COMMON_DEPEND="
        gnutls? ( net-libs/gnutls )
        kerberos? ( virtual/krb5 )
        ldap? ( >=net-nds/openldap-2.1.26:= )
+       libdeflate? ( app-arch/libdeflate )
        lua? ( ${LUA_DEPS} )
        maxminddb? ( dev-libs/libmaxminddb )
        mbedtls? ( net-libs/mbedtls )
@@ -120,6 +121,8 @@ src_configure() {
                $(meson_feature kerberos with_krb5)
                $(meson_feature ldap with_ldap)
 
+               $(meson_feature libdeflate with_libdeflate)
+
                $(meson_feature unwind with_libunwind)
 
                $(meson_use lua with_lua)
diff --git a/www-servers/lighttpd/metadata.xml b/www-servers/lighttpd/metadata.xml
index 9782f1c51425..3426d551c9b7 100644
--- a/www-servers/lighttpd/metadata.xml
+++ b/www-servers/lighttpd/metadata.xml
@@ -16,6 +16,7 @@
        <use>
                <flag name="brotli">Enable output compression via <pkg>app-arch/brotli</pkg> (recommended)</flag>
                <flag name="gnutls">Build module for TLS via <pkg>net-libs/gnutls</pkg></flag>
+               <flag name="libdeflate">Enable output compression via <pkg>app-arch/libdeflate</pkg></flag>
                <flag name="maxminddb">Add support for geolocation using <pkg>dev-libs/libmaxminddb</pkg></flag>
                <flag name="mbedtls">Build module for TLS via <pkg>net-libs/mbedtls</pkg></flag>
                <flag name="mmap">Use mmap when sendfile is not available</flag>

@gstrauss
Copy link
Contributor Author

While looking at the logs, I see
PotentialGlobalUse local USE flag 'nettle' is a potential global used by 5 packages: [...] www-servers/lighttpd

Is there a recommended way to address this? One option would be to remove USE_NETTLE from lighttpd and to unconditionally build lighttpd to use nettle for crypto functions (such as to compute SHA-256). Another option would be to rename USE_NETTLE to something else to give Gentoo build the option to select the crypto library used by lighttpd (nettle, mbedtls, wolfssl, openssl, gnutls, nss). In practice, the choice is usually between nettle, mbedtls, and wolfssl if trying to build lighttpd as small as possible and using mbedtls or wolfssl for TLS (and for crypto functions such as to compute SHA-256).

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-03-18 21:27 UTC
Newest commit scanned: 1630bb4
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/f719034d0e/output.html

@gstrauss
Copy link
Contributor Author

1.4.75 MissingVersionedVirtualPerlDependency missing version restriction for virtual perl: 'virtual/perl-Test-Harness'

I do not see any packages outside /dev-perl/... with a version restriction on virtual/perl-Test-Harness. Should I select a random version to quiet this noise from the output report?

* test configs with -tt for a better preflight config test.
* graceful restart using SIGUSR1

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
* use https://wiki.lighttpd.net/ links to lighttpd wiki doc
* add dev-db/sqlite dependency which is used by mod_webdav
* remove e2fsprogs; mod_webdav no longer uses uuid_*() from e2fsprogs
* remove libev; no longer used by lighttpd
  lighttpd directly uses native event frameworks (e.g. epoll)
* remove 2+ year old deprecation warning trace
* remove reference to lighttpd2; no lighttpd2 production release planned

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
* remove obsolete modules
* update syntax and comments

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
* use lighttpd builtin mimetype.assign by default (can be overridden)

x-ref:
  https://bugs.gentoo.org/399401
  gentoo#19507

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
@gstrauss
Copy link
Contributor Author

gstrauss commented May 4, 2024

@thesamesam ping: please review when you have a chance

  • lighttpd 1.4.76 was been released almost a month ago. New commit with lighttpd-1.4.76.ebuild included here.
  • The USE_LIBDEFLATE change requested above in this PR was reverted due to missing dependency failure on s390.
  • minor questions in comments above ask how to address some minor gentoo policy warnings
    (and should not hold this PR up)
  • one outstanding question about whether or not to use lighttpd builtin-default for mimetype.assign

Thanks!

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-04 05:24 UTC
Newest commit scanned: 76f68ec
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/c4c4928a39/output.html

@thesamesam
Copy link
Member

Thanks, sorry for the delay, and appreciate your patience. Let me try get to this today..

@thesamesam
Copy link
Member

OK! I've rebased it on master where I got newer lighttpd stabled (had to backport the sparc patch from git), cleaned up old, and then also made your changes start with a new revision in ~arch/testing (to not change existing versions).

I've hopefully done that right, but if I didn't, it's my fault, and not yours. I'll note in the commit message I mangled them.

@thesamesam
Copy link
Member

I do not see any packages outside /dev-perl/... with a version restriction on virtual/perl-Test-Harness. Should I select a random version to quiet this noise from the output report?

Don't worry about this for now. We're trying out a new QA check for Perl packages to remove deps where they're not very useful because they're dual-life Perl modules where no new version is needed.

@thesamesam
Copy link
Member

The USE_LIBDEFLATE change requested above in this PR was reverted due to missing dependency failure on s390.

For this, let's put libdeflate in (in a followup/force-push once I push the changes I've got queued locally now), but drop ~s390. Then I'll file a rekeywording bug once the PR is merged (https://devmanual.gentoo.org/keywording/index.html#keywording-on-upgrades).

@thesamesam
Copy link
Member

Should I add put the changes in this PR made to www-servers/lighttpd/lighttpd-1.4.75.ebuild into www-servers/lighttpd/lighttpd-9999.ebuild instead of www-servers/lighttpd/lighttpd-1.4.75.ebuild ?

Yeah, you're absolutely right. This is why I like having live ebuilds. It makes it way easier to see the diffs of changes. We should add one in.

Is there a recommended way to address this? One option would be to remove USE_NETTLE from lighttpd and to >unconditionally build lighttpd to use nettle for crypto functions (such as to compute SHA-256). Another option would be to >rename USE_NETTLE to something else to give Gentoo build the option to select the crypto library used by lighttpd >(nettle, mbedtls, wolfssl, openssl, gnutls, nss). In practice, the choice is usually between nettle, mbedtls, and wolfssl if >trying to build lighttpd as small as possible and using mbedtls or wolfssl for TLS (and for crypto functions such as to >compute SHA-256).

Is it okay if we consider this together with the libdeflate changes? I don't want to hold up the rest of your improvements, but my head is somewhat fried for the rest of the day.

Also, there is an ongoing discussion about mime.types in https://bugs.gentoo.org/show_bug.cgi?id=399401 I am looking for guidance on whether or not to include the change to www-servers/lighttpd/files/conf/lighttpd.conf-r1 to use the lighttpd builtin mimetype.assign list or to continue using the manual list compiled by Alan in www-servers/lighttpd/files/conf/mime-types.conf

My inclination is to merge your PR's changes as-is for now, and then I think we should later move to generating from mime-types, and maybe put a comment in the ebuild describing how people can opt-out if they want a tiny embedded build...

@gentoo-bot gentoo-bot closed this in 495e325 May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits.
Projects
None yet
4 participants