-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Merge r1511033, r1528032, r1608686, r1608694, r1608703, r1838271, r1899784, r1916312, r1916344 from trunk #515
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
Closed
rpluem
wants to merge
10
commits into
apache:2.4.x
from
rpluem:1511033_1528032_1608686_1608694_1608703_1899784_1916312_1916344
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
Thank you very much indeed for doing this @rpluem ! |
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1511033 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit ba9ab90)
autoconf warnings; define HAVE_SYSTEMD rather than using CPPFLAGS. * server/listen.c: Use HAVE_SYSTEMD for systemd #define. * modules/arch/unix/config5.m4: Update systemd headers check. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528032 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit f6f568d)
activation, fix addrlen in getsockname() call. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608686 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 3d6f0d2)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608694 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 48d05b9)
…ds(), drop the support for "Listen systemd" and use standard Listen syntax instead. This allows using the same configuration file with or without socket activation and allows setting protocol when using socket activation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608703 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 4eff9ee)
Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries. This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin. Fixed mixed declaration and wrongly declared variable. Submitted by: Luboš Uhliarik <luhliari redhat.com> Github: closes apache#312 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899784 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit db0631e)
…ning. ap_find_systemd_socket() and ap_systemd_listen_fds() are already declared in "ap_listen.h", so just include them. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916312 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit e343347)
context at startup, since this may vary when httpd is started via systemd vs being started directly. * modules/arch/unix/mod_systemd.c (systemd_post_config): Do nothing for the pre-config iteration. Log the SELinux context if available. * modules/arch/unix/config5.m4: Detect libselinux. Have at least one CI job build mod_systemd. Github: closes apache#422 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916344 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 9b17700)
Remove some dead code. Updating 'last' is pointless here. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1838271 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit e9d215e)
alloc_listener initializes more fields in the created ap_listen_rec structure than alloc_systemd_listener as it has more data to add to this structure. Ensure that all fields of the ap_listen_rec structure are initialized at least with 0 as later code using this structure depends on this. Submitted by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1926091 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit 32ebb6b)
d2c5f66 to
9434236
Compare
asfgit
pushed a commit
that referenced
this pull request
Jun 4, 2025
…16312, r1916344, r1838271, r1926091 from trunk: Add support for systemd socket activation to listener sockets. * configure.in: Simplify/fix systemd detection: move later to fix autoconf warnings; define HAVE_SYSTEMD rather than using CPPFLAGS. * server/listen.c: Use HAVE_SYSTEMD for systemd #define. * modules/arch/unix/config5.m4: Update systemd headers check. * server/listen.c: duplicate sockets correctly when using systemd socket activation, fix addrlen in getsockname() call. Follow up r1608686, pass process to alloc_systemd_listener. * server/listen.c: detect systemd socket activation using sd_listen_fds(), drop the support for "Listen systemd" and use standard Listen syntax instead. This allows using the same configuration file with or without socket activation and allows setting protocol when using socket activation. Remove libsystemd dependency from main httpd binary Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries. This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin. Fixed mixed declaration and wrongly declared variable. Submitted by: Luboš Uhliarik <luhliari redhat.com> mod_systemd: Axe APR_OPTIONAL_FN redeclarations to avoid compiler warning. ap_find_systemd_socket() and ap_systemd_listen_fds() are already declared in "ap_listen.h", so just include them. mod_systemd: if SELinux is available and enabled, log the SELinux context at startup, since this may vary when httpd is started via systemd vs being started directly. * modules/arch/unix/mod_systemd.c (systemd_post_config): Do nothing for the pre-config iteration. Log the SELinux context if available. * modules/arch/unix/config5.m4: Detect libselinux. Have at least one CI job build mod_systemd. Fix a cppcheck warning. Remove some dead code. Updating 'last' is pointless here. Ensure that ALL fields of the ap_listen_rec structure are initialized alloc_listener initializes more fields in the created ap_listen_rec structure than alloc_systemd_listener as it has more data to add to this structure. Ensure that all fields of the ap_listen_rec structure are initialized at least with 0 as later code using this structure depends on this. Reviewed by: rpluem, jorton, ylavic Github: closes #515 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926113 13f79535-47bb-0310-9956-ffa450edef68
Collaborator
Author
|
Backported |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge r1511033, r1528032, r1608686, r1608694, r1608703, r1899784, r1838271, r1916312, r1916344 from trunk