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

[BUG] 3004RC1 zsh completions are not properly packaged #61011

Open
dkacar-oradian opened this issue Oct 7, 2021 · 3 comments
Open

[BUG] 3004RC1 zsh completions are not properly packaged #61011

dkacar-oradian opened this issue Oct 7, 2021 · 3 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior tech-debt

Comments

@dkacar-oradian
Copy link

dkacar-oradian commented Oct 7, 2021

Description
Zsh completion was packaged as a part of #60392, but it's not properly packaged. There are two issues:

  1. The script name should be _salt instead of salt.zsh. I'm not sure if this is cosmetic or not.
  2. Near the end of the completion script there is:
salt_dir="${$(python2 -c 'import salt; print(salt.__file__);')%__init__*}"

Salt is currently being distributed as a Python 3 package, so Python 2 would just get an import error there and wouldn't print the installation path.

The only purpose of that line is to print out the path where Salt is installed, but that was intended as a generic solution for various types of installations.

For an RPM (or any other OS package) the packaging scripts know where Salt is going to be installed at package build time, so that line should be replaced with something like:

salt_dir="/usr/lib/python3.6/site-packages/salt"

Setup
Salt installation from an OS package (RPM, deb, etc.).

Steps to Reproduce the behavior
N/A

Expected behavior
Described above.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
# salt --versions-report
Salt Version:
          Salt: 3004rc1
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 2.11.1
       libgit2: Not Installed
      M2Crypto: 0.35.2
          Mako: Not Installed
       msgpack: 0.6.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: Not Installed
        pygit2: Not Installed
        Python: 3.6.8 (default, Nov 16 2020, 16:55:22)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.0.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.1.4
 
System Versions:
          dist: centos 7 Core
        locale: ISO-8859-2
       machine: x86_64
       release: 3.10.0-1160.42.2.el7.x86_64
        system: Linux
       version: CentOS Linux 7 Core

Additional context
Add any other context about the problem here.

@dkacar-oradian dkacar-oradian added Bug broken, incorrect, or confusing behavior needs-triage labels Oct 7, 2021
@Ch3LL Ch3LL added this to the Silicon v3004.0 milestone Oct 7, 2021
@Ch3LL Ch3LL added the Silicon v3004.0 Release code name label Oct 7, 2021
@bryceml
Copy link
Contributor

bryceml commented Oct 7, 2021

number 1 is fixed here: saltstack/salt-pack-py3#248

@bryceml bryceml closed this as completed Oct 18, 2021
@bryceml bryceml removed the Silicon v3004.0 Release code name label Oct 18, 2021
@bryceml bryceml modified the milestones: Silicon v3004.0, Approved Oct 18, 2021
@bryceml bryceml reopened this Oct 18, 2021
@bryceml
Copy link
Contributor

bryceml commented Oct 18, 2021

@krionbsd looked at it and said that the zsh completion script needs partially re-written to use some newer stuff in zsh that would fix problem 2.

@bryceml bryceml modified the milestones: Approved, Sulphur v3006.0 Oct 18, 2021
@bryceml bryceml added Sulfur v3006.0 release code name and version tech-debt and removed needs-triage labels Oct 18, 2021
@dkacar-oradian
Copy link
Author

You'll have to test the newer zsh stuff on the oldest zsh version you support (probably zsh on CentOS 7 for Linux, I'm not sure which version ships with Solaris). Although I'd just sed that line in the packaging script. But you have a lot of them, I suppose.

@waynew waynew removed the Sulfur v3006.0 release code name and version label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior tech-debt
Projects
None yet
Development

No branches or pull requests

5 participants