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

Signed commits break building and installing from git repo if log.showSignature=true in git #1756

Open
AdrianVollmer opened this issue Jun 4, 2024 · 0 comments · May be fixed by #1757
Open
Labels
bug Unexpected problem or unintended behavior

Comments

@AdrianVollmer
Copy link
Contributor

You recently started to sign commits, which is great. However, it breaks constructing the version number in setup.py. When someone has set log.showSignature=true in git, building and installing impacket from sources fails.

Configuration

impacket version: 15eff88
Python version: 3.7.3 (but affects all)
Target OS: Debian Sid

Debug Output With Command String

$ git clone https://github.com/fortra/impacket.git
$ cd impacket
$ python3 setup.py --version
/usr/lib/python3/dist-packages/setuptools/dist.py:475: UserWarning: Normalizing '0.12.0.dev1+20240523.075507.15eff880' to '0.12.0.dev1+20240523.75507.15eff880'
  normalized_version,
0.12.0.dev1+20240523.75507.15eff880
$ git config log.showSignature true
$ python3 setup.py --version
/usr/lib/python3/dist-packages/setuptools/dist.py:484: UserWarning: The version specified ("0.12.0.dev1+gpg: Signature made Thu May 23 10:55:08 2024 UTC\ngpg:                using RSA key B5690EEEBB952194\ngpg: Can't check signature: No public key\n20240523.075507.15eff880") is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
  "details." % self.metadata.version
0.12.0.dev1+gpg: Signature made Thu May 23 10:55:08 2024 UTC
gpg:                using RSA key B5690EEEBB952194
gpg: Can't check signature: No public key
20240523.075507.15eff880

Additional context

If you're parsing git output, you should use the last line. An even better solution would be to use a modern build system such as hatch.

@AdrianVollmer AdrianVollmer linked a pull request Jun 4, 2024 that will close this issue
@anadrianmanrique anadrianmanrique added in review This issue or pull request is being analyzed bug Unexpected problem or unintended behavior and removed in review This issue or pull request is being analyzed labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants