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

ability to search for buildinfo's by hash #26

Closed
vagrantc opened this issue Oct 25, 2017 · 5 comments
Closed

ability to search for buildinfo's by hash #26

vagrantc opened this issue Oct 25, 2017 · 5 comments
Assignees

Comments

@vagrantc
Copy link

As a correlary to:

https://buildinfo.debian.net/binaries/u-boot
https://buildinfo.debian.net/sources/u-boot

Where you can search for buildinfo files based on binary package or source package, it would be nice if I could search for all buildinfo's containing certain hashes:

e.g. https://buildinfo.debian.net/by-hash/c9070da17f8dd59c9c09698add69453b7c78270b

It would either autodetect the hash type based on length, or possibly an alternate URL form to specify the hash type:

https://buildinfo.debian.net/by-hash/sha1/c9070da17f8dd59c9c09698add69453b7c78270b

This should produce a list of links to .buildinfo that contain the hash of the binary packages (.deb) or "other checksums" (.dsc, .orig.tar., debian.tar.). The above example links should provide a link to the following buildinfo, and possibly others:

https://buildinfo.debian.net/71a17701cd1b1b49dcbee51ae364d3bf8d6f7c10/u-boot_2016.09+dfsg1-2_amd64

The output produced by the binary package view "Generated by source packages" section should be sufficient to convey the desired information. There's some theoretical possibility that differing source/binary packages would produce the same hashes, but it doesn't seem very likely... but would be very interesting to find if that were so!

Hopefully that's enough to go on!

@lamby
Copy link
Owner

lamby commented Oct 25, 2017

@vagrantc

https://buildinfo.debian.net/by-hash/sha1/c9070da17f8dd59c9c09698add69453b7c78270b

This should produce a list of links to .buildinfo that contain the hash of [artifacts]

I'd want to clarify in the URI that it's doing a search for the artifacts, not buildinfo files. How about /artifacts/by-sha1/c9070da17f8dd59c9c09698add69453b7c78270b/ ?

@vagrantc
Copy link
Author

works for me!

@lamby
Copy link
Owner

lamby commented Oct 26, 2017

@vagrantc By search, do you want JSON or HTML? :)

@vagrantc
Copy link
Author

Well, I was originally just thinking html, but since you brought up json, it would obviously be nice to have both! :)

Guess that would require another url, though... is there an /api/ namespace or something like that already? json seems like something that would go in such an "api".

@lamby
Copy link
Owner

lamby commented Oct 27, 2017

@vagrantc Ignoring the URI for now, can you provide the rough (JSON) output you are after. That will ensure we are definitely talking about the right things, as well as "complete" this bug in the sense of "when I do X I want to get Y..."

@lamby lamby closed this as completed in 5d69f38 Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants