-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add dev-util/pkgcheck to SDK #2205
Conversation
0f90dc2
to
3b84832
Compare
Before reviewing, I see there is a Docker image: https://github.com/pkgcore/pkgcheck/pkgs/container/pkgcheck did you try it? Something like:
You can also override the |
Build action triggered: https://github.com/flatcar/scripts/actions/runs/10703937027 |
Ha, honestly, not really, I haven't tried using docker image. So not sure, I'm thinking that having it in SDK out-of-the-box still may be useful. It's something I could eventually add to the automation to check ebuilds in overlay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've changed some packages (pip, u-boot-tools, gflags, glog, tcl...) that aren't needed for pkgcheck, which makes this addition look heavier than it is.
I'm strongly in favour of adding this tool using packages rather than using Docker. It's part of my regular Gentoo workflow, and it's extremely good at catching QA issues. I feel like I'm flying blind without it. Using it with Flatcar from Gentoo itself is a bit of a pain because it's hardcoded to look at /etc/portage, which is pointing to the wrong repositories. I've had to make a wrapper to work around this.
#!/bin/bash
if [[ ${PWD} == ${HOME}/Projects/flatcar/scripts/sdk_container/src/third_party/* ]]; then
exec bwrap --bind / / --bind ~/etc/portage/repos.conf /etc/portage/repos.conf --dev-bind /dev /dev /usr/bin/pkgcheck "${@}"
else
exec /usr/bin/pkgcheck "${@}"
fi
Oh, I just need to rebase it. I think I based this branch on top of a branch that was adding dev-python/pip to automation, which resulted in bringing in a bunch of packages. Will do it on Monday.
Thanks for the hint. Talking about wrappers: do you think that having a wrapper inside SDK would be useful? I mean wrappers like Also, would pkgcheck maintainers be open to the idea of specifying a different config root? That way the bubblewrap-like wrappers wouldn't be necessary.
|
I don't think that's needed. Although pkgcheck seems to need a profile configured, it shows warnings across different profiles.
It used to support that, but they dropped that support for some reason. |
Alright.
Reason isn't very detailed: pkgcore/pkgcheck@b659846 |
3b84832
to
87dfe3b
Compare
87dfe3b
to
6a9f553
Compare
It seems to be unusable by default right now - got some traceback when invoking
|
It certainly works for me outside the SDK. I'll give this a try. |
Just to be clear - that was me trying to run pkgcheck inside the SDK container. |
For the record, what I did was basically: |
Reproduced. I'll see if I can figure it out. |
It works when |
Actually, it fails in a similar way when run against packages in coreos-overlay, regardless of the profile. I guess it just doesn't like something about coreos-overlay, but it works outside the SDK. 🤔 |
Got it! It's pkgcore/pkgcore#435, which I already fixed, but the fix hasn't been released yet. You could patch it in. |
It's from Gentoo commit 28c84fdb12e224eb39caff2a9e3f5979ebbeb6a0.
It's from Gentoo commit 0534a4d8d9c7ee83e868051fe33db8d0e88d9ab7.
It's from Gentoo commit 5a6bf87099bc8fb106d17f77fad7b9aef5036325.
It's from Gentoo commit 2b39a8d7500f05c364de764662755cdd58a9918a.
It's from Gentoo commit 7b7fb48115669de91e0e5b0abea5524aa945cd51.
It's from Gentoo commit 79431052dbb681133cb401ceea571c622ebb925d.
It's from Gentoo commit cd426afc7f32ac84206f4156fc8ed0d20bd79246.
6a9f553
to
2d1c959
Compare
Seems to be working now. It will spit a lot of warnings about nonsolvable or nondexistent deps for some packages though, because of our repos being a subset of Gentoo. |
This might be a good idea: /etc/pkgcheck/pkgcheck.conf [DEFAULT]
keywords = -NonexistentDeps,-NonsolvableDepsInDev,-NonsolvableDepsInExp,-NonsolvableDepsInStable |
It is a good idea. Please see the new commit. |
sdk_container/src/third_party/coreos-overlay/coreos/config/env/dev-util/pkgcheck
Outdated
Show resolved
Hide resolved
Co-authored-by: James Le Cuirot <[email protected]>
Tested locally, seems to be working. |
It seems to be a useful tool, especially when trying to upstream things to Gentoo, as there is now a requirement to call pkgcheck on the changed packages.
CI: http://jenkins.infra.kinvolk.io:8080/job/container/job/sdk/1704/cldsv/
Blocked on #2193.changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.