Chocolatey-coreteampackages: (apache-httpd) installLocation is not the apache root

Created on 23 Nov 2019  路  10Comments  路  Source: chocolatey-community/chocolatey-coreteampackages

Specifying installLocation leads to a folder having the readme file and main apache folder.
Can we fix it so installationLocation should specify to a folder containing bin subfolder.

Also, the port is 8080 by default while the repo says it's 80

Enhancement Pending closure QuestioDiscussion

All 10 comments

Port docs fixed (will be visible in next releaase)

Regarding installLocation, such is the vendor archive. I agree with you that original decision was bad. This can be changed, but it may be problematic to anyone who already uses current package. The parameter is also named wrong, it should have been /InstallDir as usual.

I discovered this in the package yesterday, and I've fix this by modifying the package to not create the Apache24 directory. I would love to have my fix included in the official package and I can do a pull request if you are interested. I solved it by adding a /noApacheDir option, so the package should be perfectly backward compatible.

The problem was that I wanted to install apache in the C:\myapp\apache directory but when I installed the package using command choco install apache-httpd -y --params '"/installLocation:C:\myapp\apache"' it installed Apache in the C:\myapp\apache\Apache24 directory.
With my modified package I can use this command choco install apache-httpd -y --params '"/installLocation:C:\myapp\apache /noApacheDir"' and Apache is correctly installed in the C:\myapp\apache directory as I wished.

I've also ensured that upgrades and uninstalling works fine.
Would you be interested in merging this pull request into the official package?

Would you be interested in merging this pull request into the official package?

choco install apache-httpd -y --params '"/installLocation:C:\myapp\apache /noApacheDir"'

This looks terrible, and is not intuitive and nobody does that ever :)

I will accept PR that works as this:

  • It should install in the dir provided, not subdir, always, by default it should install the current way.
  • installLocation should be also provided as installDir which is standard

There is no need for any mumbo jumbo sush as /noApacheDir.

This ofc breaks compatibility for those that used this param which is IMO better then mumbo jumbo. We could depricate current package.

Regarding names: https://repology.org/project/apache/packages

So let me make sure I understand you correctly =) The pull request should change the package so:

choco install apache-httpd -y --params '"/installDir:C:\myapp\apache

or:

choco install apache-httpd -y --params '"/installLocation:C:\myapp\apache

installs to C:\myapp\apache, and:

choco install apache-httpd -y

installs to same directory as before which is $Env:AppData\Apache24.

Yes.

I believe that is the best approach. That way,

  • those that didn't specify custom location will have the same thing (majority)
  • those that did are minority and for them it will break (NOTE would be required if current package is used).

You simply if ($pp.InstallDir) { unwrrap the folder after install and before everything else } else { keep the same }

I think its better to have new package that always do correct dir and deprecate this one.

This is relateivelly new package and its better to fix things now then later.
Maybe someobody else doesn't think so (/cc @AdmiringWorm @gep13 ).

I provided names from other repos in case deprecation is choosen.

馃憤 Sounds good! I'll modify my changes to work like that and let you know when I have a pull request ready for this issue.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

I'm still interested in doing this. Will look at it in about a month.

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sc250024 picture sc250024  路  3Comments

Foadsf picture Foadsf  路  4Comments

majkinetor picture majkinetor  路  4Comments

jnm2 picture jnm2  路  3Comments

Technetium1 picture Technetium1  路  4Comments