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

Replace unmaintained apache-httpd project with new one #2467

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yakatz
Copy link

@yakatz yakatz commented May 13, 2024

(apache-httpd) (apachelounge-httpd) Replace unmaintained Apache HTTPD package

Description

Create a new package based on the ApacheLounge HTTPD build to replace the Apache Haus build which is no longer maintained. The package name has been changed to reflect that the build has changed, but they are supposed to be binary-compatible.

Motivation and Context

The old package is no longer updated.

Related discussion: https://github.com/orgs/chocolatey-community/discussions/2216

How Has this Been Tested?

Installed manually on Windows 10 and Windows 11.
I was not able to get the chocolatey-test-environment running on my machine - possibly a Vagrant issue

Checklist:

  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • I have updated the package description and it is less than 4000 characters.
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the Chocolatey Test Environment(https://github.com/chocolatey-community/chocolatey-test-environment/). Note that we don't support the use of any other environment.
  • The changes only affect a single package (not including meta package).

Also download expected checksums from ApacheLounge instead of calculating them ourselves

Tested automatic upgrade from 2.4.58 to 2.4.59
httpd.exe assumes the service name is Apache2.4, so we should use that by default.

If you don't want the install script to break your configuration, there is now an option to skip it, but we also need to be able to skip starting the service in that case.
@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review

@yakatz
Copy link
Author

yakatz commented May 14, 2024

Replaces #2381 and #2321

The apache installer was outputting to the error stream. This can impact users who have failOnStandardError enabled, so we prefer to adjust it where found.

This change captures anything output by the installer on the error stream (2) and puts it on the standard success/output stream (1).
setConfiguration = if ($pp.SkipConfiguration) { $false } else { $true }
}

if ($arguements.setConfiguration -and -not (Assert-TcpPortIsOpen $arguments.port)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ($arguements.setConfiguration -and -not (Assert-TcpPortIsOpen $arguments.port)) {
if ($arguments.setConfiguration -and -not (Assert-TcpPortIsOpen $arguments.port)) {

@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review


Start-Service $arguments.serviceName
if ($arguements.StartService) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if ($arguements.StartService) {
if ($arguments.StartService) {

Comment on lines +175 to 176
Write-Warning "This command is expected to write debugging output. Chocolately treats that as an error. Please read the error text to confirm whether service installation succeed."
& $apachePaths.BinPath -k uninstall -n "$($arguments.serviceName)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Write-Warning "This command is expected to write debugging output. Chocolately treats that as an error. Please read the error text to confirm whether service installation succeed."
& $apachePaths.BinPath -k uninstall -n "$($arguments.serviceName)"
# This command outputs to the error stream. 2>&1 redirects that to output.
& $apachePaths.BinPath -k uninstall -n "$($arguments.serviceName)" 2>&1

Replicate the pattern from the other call similar to this.

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