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

Remove the cpack command alias #89

Closed
rpavlik opened this issue Feb 9, 2015 · 22 comments · Fixed by #2551
Closed

Remove the cpack command alias #89

rpavlik opened this issue Feb 9, 2015 · 22 comments · Fixed by #2551
Assignees
Labels
5 - Released Breaking Change IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen
Milestone

Comments

@rpavlik
Copy link

rpavlik commented Feb 9, 2015

cpack is the command used by CMake to invoke its package generator. Not sure the polite way to resolve this.

And for reference, it also uses cmake and ctest.

(And apparently Microsoft is using CMake to build their open-source .NET on other platforms now...)

@ferventcoder
Copy link
Member

Aware of this. One reason we are moving away from the shorter ones (at least cpush and cpack).

@ferventcoder ferventcoder modified the milestones: 1.x, 1.0.0 Jun 30, 2015
@ferventcoder ferventcoder changed the title Name collision: cpack Remove some of the command aliases, like cpack Sep 21, 2015
ferventcoder added a commit that referenced this issue Sep 21, 2015
Cpack as a shortcut to choco pack has been deprecated and will be
removed in v1. Note this in the help menu.
ferventcoder added a commit that referenced this issue Sep 21, 2015
* stable:
  (GH-417) Choco config command
  (maint) Config output skip by contains password
  (GH-416) Features should contain description
  (GH-88) Modify existing source
  (GH-71) Sources can have explicit priority order
  (maint) resharper team settings
  (maint) Case insensitive String.contains
  (maint) formatting
  (GH-89) Note cpack has been deprecated
  (GH-33) Allow Shutting off checksumming

# Conflicts:
#	src/chocolatey/chocolatey.csproj
#	src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs
#
src/chocolatey/infrastructure.app/services/ChocolateyConfigSettingsService.cs
@dothebart
Copy link

Chocolatey should either prefix its binary or setup the path environment in a way that it doesn't disturb the packages it installed.

@ferventcoder
Copy link
Member

ferventcoder commented Apr 8, 2016

@dothebart Chocolatey itself does prefix the binary shortcuts with c (like cpack). So it already does this. This is the only known case where that presents an issue.

Or do you mean like choco pack?

@solvingj
Copy link

Just tried to use Cpack for Cmake on windows, chocolatey getting in the way. What's the status of this? Looks like a PR was merged 2 years ago?

@ferventcoder
Copy link
Member

@solvingj Do you have a link to a PR?

@ferventcoder
Copy link
Member

@solvingj If you are talking about e9dcb0c,

deprecation != removal - deprecations keep functionality but announce it is being removed in the future. HTH

@dothebart
Copy link

Maybe once the user installs cmake it could be clear, that he doesn't want a cpack alias and it could be removed then?

@ferventcoder
Copy link
Member

If you install CMake through Chocolatey using the portable version, it will overwrite cpack. However any actions to install packages or outside of Chocolatey's control, it becomes hard to know when those kind of occurrences happen. It's probably best to ensure there is documentation in troubleshooting about this, but over that, it's unknown what we can do until cpack is removed. We must follow a transition (deprecation) in removing things.

@dothebart
Copy link

one sure thing is, that you usually would call the cmake - cpack with -G <packageformat> - maybe even inside of scrips. Unless you handle -G as a valid parameter in chocolateys cpack its a safe bet to search for cpack in the rest of the given paths and call that with $@ - or error out with a clear error message to the user that this is not cmake cpack which he probably desired to invoke, and how he can remove the unwanted cpack with del ...cpack.exe

@ferventcoder
Copy link
Member

@dothebart you mean pass this on to a different cpack based on arguments. That is actually a really good idea!

@ferventcoder
Copy link
Member

See #1317

@native-api
Copy link

native-api commented Oct 21, 2019

Another option:

  • use dashed prefixes like Apt: choco-pack

@solvingj
Copy link

solvingj commented Oct 22, 2019

@ferventcoder an easy way to move forward on this (by that I mean, help all the people it annoys without breaking anyone) is to implement one or more environment variables which toggle the behavior.

CHOCO_ENABLE_ALIASES=True

or if you want to get more granular:

CHOCO_ENABLE_ALIAS_CPACK=True

If the value is False, you can choose to punt the command back to the shell so that CMake's cpack could pick it up, and if True (the default), you can actually handle it in chocolatey the way you do today.

You could also make it an install-time variable which prevents the aliases from ever being installed. As a user, I do not have a preference at this time.

@native-api
Copy link

Per #431 and https://github.com/chocolatey/choco/blob/master/docs/generated/CommandsReference.md#scripting--integration---best-practices--style-guide, the aliases are deprecated since 2015. So this can be used as an opportunity to remove them altogether.

@ferventcoder
Copy link
Member

@native-api per my previous comments - deprecated is not removed. It's something you have to plan for and give folks plenty of time. Deprecated is a warning in the SHIM stating it is going to be removed as of version x - that hasn't been put in yet. So we won't be removing the shims yet. Note the removal is planned for v1 as per the milestone here.

@gep13 gep13 self-assigned this Jan 22, 2022
@corbob corbob added the ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added label Mar 1, 2022
gep13 added a commit to gep13/choco that referenced this issue Mar 11, 2022
There are known incompatibilities with this shim when other applications
are installed on the machine, for example cmake. Since we are moving
towards usage of a ubiquitous choco command, removing this shim makes
a lot of sense.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 11, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm pushed a commit to gep13/choco that referenced this issue Mar 11, 2022
There are known incompatibilities with this shim when other applications
are installed on the machine, for example cmake. Since we are moving
towards usage of a ubiquitous choco command, removing this shim makes
a lot of sense.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 11, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 11, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 14, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
gep13 added a commit to gep13/choco that referenced this issue Mar 14, 2022
There are known incompatibilities with this shim when other applications
are installed on the machine, for example cmake. Since we are moving
towards usage of a ubiquitous choco command, removing this shim makes
a lot of sense.
gep13 pushed a commit to gep13/choco that referenced this issue Mar 14, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm pushed a commit to gep13/choco that referenced this issue Mar 14, 2022
There are known incompatibilities with this shim when other applications
are installed on the machine, for example cmake. Since we are moving
towards usage of a ubiquitous choco command, removing this shim makes
a lot of sense.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 14, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the expected authenticode signature
thumbprint.

The thumbprint being checked against in the thumbprint
used in Chocolatey v0.12.1.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 14, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the an authenticode signature with
the subject set to one of our previously used
authenticode signatures.

The code added makes it easy to extend it when needed
for removal of other shims as well.
AdmiringWorm added a commit to gep13/choco that referenced this issue Mar 14, 2022
This commit updates the installation/upgrading of
the package to remove the cpack shim if they are
signed with the an authenticode signature with
the subject set to one of our previously used
authenticode signatures.

The code added makes it easy to extend it when needed
for removal of other shims as well.
gep13 added a commit that referenced this issue Mar 14, 2022
(#89) Remove cpack shim for choco pack
@dothebart
Copy link

Thanks for getting this finally resolved.

@gep13 gep13 added 4 - Done and removed 3 - Review labels Mar 14, 2022
@gep13
Copy link
Member

gep13 commented Mar 14, 2022

@dothebart while this has been merged, it won't be live until the next release of Chocolatey, but it will go out in the next release 😄

@corbob corbob added IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen and removed ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added labels Mar 14, 2022
gep13 added a commit that referenced this issue Mar 18, 2022
* release/1.0.0: (65 commits)
  (version) v1.0.0
  (#2443) Fix misspellings for profile text
  (#2468) Remove choco update command
  (#2468) Remove choco version command
  (#2602) Add 1.0.0 of shimgen and update shims
  (#89) Remove cpack shims on package upgrades
  (#89) Remove cpack shim for choco pack
  (maint) Update deprecation notice for config settings
  (build) Additional tweaks to version numbers
  (build) Add SolutionVersion.cs file to artifacts
  (docs) Update committers docs with correct/fixed links
  (build) Minor tweaks to build files
  (#2615) Reference CREDITS file for other licenses
  (build) Refactor Nuget Upload
  (build) Added missing Kotlin import
  (maint) Whitespace
  (#2614) Update 7zip / Shimgen licenses
  (#2614) Update project  contributors
  (#2641) Minor tweaks to wording and formatting
  (#2462) Remove mention of alias for search comand
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released Breaking Change IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen
Projects
None yet