[entt, libharu, libopensp, minizip, smf, vlpp, vulkan-headers] Fix incorrect versions#28571
[entt, libharu, libopensp, minizip, smf, vlpp, vulkan-headers] Fix incorrect versions#28571vicroms merged 7 commits intomicrosoft:masterfrom
Conversation
|
@microsoft-github-policy-service agree |
versions/e-/entt.json
Outdated
versions/l-/libharu.json
Outdated
There was a problem hiding this comment.
We should find the proper SHA for version 2017-08-15 if it exsits.
Error: While reading versions for port libharu from file: /workspaces/vcpkg/versions/l-/libharu.json
While validating version: 2017-08-15#11.
The version declared in file does not match checked-out version: 2017-08-15#10
Checked out Git SHA: 312f4b697d2f46818c218e270bd447cdeb76322c
There was a problem hiding this comment.
While checking the history of this port, it seems we do not have a valid git tree for 2017-08-15#11: We move from 2017-08-15#10 (#19979) to 2.4.0-rc1#0 (#25569) directly. Therefore, I simply removed the version entry.
versions/l-/libopensp.json
Outdated
versions/m-/minizip.json
Outdated
There was a problem hiding this comment.
Since pointing to different manifest or control files with different package and port versions trigger validation errors when running ./vcpkg x-ci-verify-versions --verify-git-trees, the version was removed.
versions/s-/smf.json
Outdated
versions/v-/vlpp.json
Outdated
versions/v-/vulkan-headers.json
Outdated
|
@njakob out of curiosity, how did you find those incorrect versions? There already is a GitHub bot that makes sure the version database is updated correctly but as you have seen, there are ways to fool the bot. |
|
<off-topic> |
That's a good question @Thomas1664! Since this should have been part of the PR description, I added some details on how I did find these broken versions. First of all, I haven't checked in detail how the bot is generating suggestions. However, it seems we're not performing an integrity check of the changed versions file. We could imagine adding a separate GitHub action performing a I could take a look at this in the following days if that's something you believe could be valuable! |
That's very valuable feedback @dg0yt, I have not considered this case and missed the meaning of the Quickly searching over the repository, it seems we also have cases with a license file without any indication in the manifest (e.g. vulkan). I'm wondering if we should somehow either always add the "complex license" as part of the port or enable contributors to specify an external URL for it. This, however, deserves its own issue to be discussed and tracked. I'll make sure to address the issue you raised @dg0yt today! Edit: I pushed an update that includes your suggestion! |
|
There is an existing |
versions/l-/libharu.json
Outdated
There was a problem hiding this comment.
We should find the proper SHA for version 2017-08-15 if it exsits.
Error: While reading versions for port libharu from file: /workspaces/vcpkg/versions/l-/libharu.json
While validating version: 2017-08-15#11.
The version declared in file does not match checked-out version: 2017-08-15#10
Checked out Git SHA: 312f4b697d2f46818c218e270bd447cdeb76322c
c18d3e4
njakob
left a comment
There was a problem hiding this comment.
Thank you for having a look @vicroms and pointing out ./vcpkg x-ci-verify-versions --verify-git-trees, I was not aware of this command!
Looking quickly at the current implementation, we could imagine only validating files that change in PRs instead of every single port.
Regarding the two new errors you raised for libharu and minizip, I simply removed the version entries since we do not have any git tree with a matching package and port version.
versions/l-/libharu.json
Outdated
There was a problem hiding this comment.
While checking the history of this port, it seems we do not have a valid git tree for 2017-08-15#11: We move from 2017-08-15#10 (#19979) to 2.4.0-rc1#0 (#25569) directly. Therefore, I simply removed the version entry.
versions/m-/minizip.json
Outdated
There was a problem hiding this comment.
Since pointing to different manifest or control files with different package and port versions trigger validation errors when running ./vcpkg x-ci-verify-versions --verify-git-trees, the version was removed.
|
Thanks for the PR! |
|
Related to this, in the process of trying to establish a maintenance branch for our code consuming libharu at version 2017-08-15#10, I seem to have come across issue 25518, which was fixed by PR2553. The problem appears to be that the fix is the removal of the TIFF symbols and not fixing the original hash: url : [ https://github.com/libharu/libharu/pull/157.diff ] This means building the versions prior to the fix still produce the hash error. I hope I've understood this correctly. This is on a fresh install of vcpkg and after doing a git pull. This is the vcpkg.json I was using: |
|
The SHA However, since GitHub keeps the PR refs around (and thus the git objects), one can obtain the files for that specific SHA from GitHub via If you must take that version and cannot upgrade the port, then you should download the port files form the URL provided above and create a port overlay for |
|
@vicroms @gharwo The problem in #28571 (comment) is the occassional vcpkg habbit of downloading diffs from other repos instead of committing them to vcpkg. You will always get a valid diff from GH, but it is not binary stable over time. So SHA512 checks can fail after some time. The variable part in the downloaded diffs ist the format of the index lines. Example for the given diff: A regex substitution e.g. in VS Code transforms the download from the actual hash to the expected hash: (Hey, I produced a SHA512 collission ;-) |
|
OK. Thanks for the hint. I'll see how I get on.
…On Wed, 11 Jan 2023 at 18:34, Victor Romero ***@***.***> wrote:
@gharwo <https://github.com/gharwo>
The SHA bfeaf0d13fce9156ac216daa37a2c945290fc0ed is invalid in a local
clone of vcpkg, and because of that, removing them from the version
database was the right thing to do.
However, since vcpkg keeps the PR refs around (and thus the git objects),
one can obtain the files for that specific SHA from GitHub via
https://github.com/Microsoft/vcpkg/archive/bfeaf0d13fce9156ac216daa37a2c945290fc0ed.zip
.
If you must take that version and cannot upgrade the port, then you should
download the port files form the URL provided above and create a port
overlay for libharu.
—
Reply to this email directly, view it on GitHub
<#28571 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXENQ5YVA5RLUPUBAGLI4UTWR34LFANCNFSM6AAAAAATKAF2II>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Pulling that specific PR ref worked perfectly and enabling the overlay port in vcpkg-configuration embedded in vcpkg.json of the maintenance branch means less churn for maintenance releases. Thanks. |
Describe the pull request
What does your PR fix?
While working on vcpkg.link, I realized that some ports' versions point to invalid git trees. Therefore, this PR fixes these different issues.
In order to find these invalid git trees, it is possible to check the output of the
git ls-treecommand. For example, the duplicatesdl23.10.0#0has a git tree of965c440d8611528f1069a2a494f11da420110408and running the command produces the following output:This is incorrect as we should be able to retrieve the git tree containing all the files as the working
3.10.0#0version entry:It is also possible to directly see the content of a file in a given tree by using
git showWhen updating git refs, since
./vcpkg x-ci-verify-versions --verify-git-treesvalidates that it links to a matching manifest or control file with the given package version and port version, we have to either find an existing tree with the right version or remove the invalid entry. In this PR, it was only possible to reverse the changes forlibopenspand invalid versions has been removed forentt,libharu,minizip,smf,vlppandvulkan-headers.Semi-related to this PR, How do I get history versions of a port now #27451 suggests using
git blamein order to get the history of a port. While changing the file would alter this history, usinggit blamealready doesn't provide any data before the introduction of the versions files. In other words, vcpkg does not and should not rely ongit blamefor simulating this functionality.Which triplets are supported/not supported? Have you updated the CI baseline?
Support was not changed in this PR
Does your PR follow the maintainer guide?
Yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --alland committed the result?N/A
The output of
./vcpkg x-ci-verify-versions --verify-git-treesnow only show unknown errors ([many ports] Fix version files #24277)