Check for unrecognized *-sys dependencies#1688
Merged
Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom Nov 18, 2024
Merged
Check for unrecognized *-sys dependencies#1688Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
*-sys dependencies#1688Sebastian Thiel (Byron) merged 2 commits intoGitoxideLabs:mainfrom
Conversation
This adds another step to `pure-rust-build` that fails -- and fails the job -- when there are any dependencies named `*-sys` other than `linux-raw-sys`, which is known about. (This is independent of the use of C in `ring` -- discussed in GitoxideLabs#1681, GitoxideLabs#1682, and GitoxideLabs#1684 -- because `ring` is not, and does not use, a `*-sys` dependency.) This should fail prior to 3506afb (GitoxideLabs#1684) and pass afterwards.
d233d8c to
8ff49c4
Compare
This uses the variable name `package` rather than `pattern` for the variable that expands to an argument to `dpkg-query --status`, since this argument is always treated as a literal package name. (I had originally named it `pattern` because I had initially been thinking of using a different search command.)
5f9830a to
a1414c8
Compare
Sebastian Thiel (Byron)
approved these changes
Nov 18, 2024
Member
Sebastian Thiel (Byron)
left a comment
There was a problem hiding this comment.
Thanks a lot for the follow-up!
Indeed, it should be much harder to sneak sqlite (or similar packages) back in now than it was before, where this could easily have happened without being noticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a regression test for the improvement in 3506afb (#1684) that fixed the unintended
libsqlite3-sysdependency ofmax-purereported in #1681. This also tries to guard against the introduction of other such crates asmax-puredependencies.Specifically, this builds on #1682 by adding another step to
pure-rust-build-- this one short, and allowed to fail the job (i.e. notcontinue-on-error) -- that verifies there are no dependencies named like*-sys, other thanlinux-raw-sys, which is known about.I've verified in my fork that the new step fails when applied prior to 3506afb (#1684), and passes afterwards.
Edit: I had meant to do things in such a way as to verify that here, too, but I forgot about how checks are actually run as if on a merge commit that would integrate a PR rather than at the tip of the PR (actions/checkout#504), even though that behavior is something I had recently reviewed for something else. I've edited out the misleading details that were inaccurate with respect to upstream checks.
I've also taken this opportunity to improve a shell variable I had somewhat misnamed, in another
pure-rust-buildstep.