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

changing checksum of a commit #3121

Closed
blshkv opened this issue Mar 4, 2021 · 12 comments
Closed

changing checksum of a commit #3121

blshkv opened this issue Mar 4, 2021 · 12 comments

Comments

@blshkv
Copy link

blshkv commented Mar 4, 2021

Hi,

This is a bit unusual, so I'm not going to use a provided template.

At Pentoo, we could not wait for a release due to a critical functionality (please release it btw) and decided to provide a current snapshot of scapy. Here is an example how it is done:
pentoo/pentoo-overlay@ce4040b

In short, we download it from the following location, as an example:
https://github.com/secdev/scapy/archive/f0e3e4452ec63618b09bad30b459b7eba09ebd6b.tar.gz
(notice the hash f0e3e44)

However, we noticed it changes later as it was reported in our issue tracker:
pentoo/pentoo-overlay#703

I compared what changed exactly and figured it out. The problem with the following line:
https://github.com/secdev/scapy/blob/master/scapy/__init__.py#L99

it changes from:
git_archive_id = 'f0e3e4452e (HEAD -> master)'
to
git_archive_id = 'f0e3e4452e '

Could you adjust that format, so it won't be happening?

Thanks

@blshkv
Copy link
Author

blshkv commented Mar 4, 2021

Apparently, this bug was fixed before, so we got a regression
#1520

Can also add a comment "do not use %d here" ? ;-)

@gpotter2
Copy link
Member

gpotter2 commented Mar 4, 2021

This is too old for me to remember anything 😄
I think this was discussed in #1521

@p-l-
Copy link
Member

p-l- commented Mar 4, 2021

We want to have the git_archive_id (because we use it). This makes archives linked to a specific commit unstable (the exact content will differ between when that specific commit is the current HEAD and when more commits have been added), which I understand may be a concern but I think the only correct way to address that is:

  1. we make a release, and
  2. people use pypi archives.

@blshkv
Copy link
Author

blshkv commented Mar 4, 2021

can you add a condition, something like if tag is "release" then add %d? Or if %d contains "HEAD" or "master" dont add it

@p-l-
Copy link
Member

p-l- commented Mar 6, 2021

Do you know how/if this would be possible?

@blshkv
Copy link
Author

blshkv commented Mar 7, 2021

Honestly, I had no idea that even the current implementation is be possible. I was pretty sure that the archive based on a commit is stable and should not change. I haven't looked at it, but you implemented a hack probably.
Can you have a look at the official way

Just an idea, I never used it. There are other hooks too.

@p-l-
Copy link
Member

p-l- commented Mar 7, 2021

Since this is far from being a priority for the project, I do not plan to work on it. If someone is willing to spend time on this issue, please reopen this issue to keep track of your work, and submit a pull request.

Thanks!

@p-l- p-l- closed this as completed Mar 7, 2021
@blshkv
Copy link
Author

blshkv commented Mar 7, 2021

Please keep it open until it is fixed. The open bug doesn't bite, and somebody with more time may fix it.

Also, please release a new version

@gpotter2
Copy link
Member

gpotter2 commented Mar 7, 2021

This was kinda fixed in #1521 but that got reverted (still unsure of the reasons tbh..). But in the meantime we're working on a new release asap

@blshkv
Copy link
Author

blshkv commented Mar 7, 2021

Ok, rip

@guedou
Copy link
Member

guedou commented Mar 7, 2021

Follow #3100 to follow the release of v2.4.5 that will have the Python 3.9 fix. I am planning to release this week.

@gpotter2
Copy link
Member

This should be fixed with #3546, feel free to try it out @blshkv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants