-
Notifications
You must be signed in to change notification settings - Fork 183
cmd-build-with-buildah: update meta.json with pkg/advisory diffs #4327
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,8 @@ Usage: coreos-assembler build-with-buildah | |
non-strict build. | ||
--skip-prune Skip pruning previous builds. | ||
--strict Only allow installing locked packages when using lockfiles. | ||
--parent-build=VERSION This option does nothing and is provided for backwards compatibility. | ||
--parent-build=VERSION The version that represents the parent to this build. Used for RPM diffs | ||
that get added to the meta.json | ||
--force Import a new build even if inputhash has not changed. | ||
EOF | ||
} | ||
|
@@ -58,7 +59,7 @@ while true; do | |
DIRECT=1 | ||
;; | ||
--autolock) | ||
shift; | ||
shift | ||
AUTOLOCK_VERSION=$1 | ||
;; | ||
--skip-prune) | ||
|
@@ -69,6 +70,7 @@ while true; do | |
;; | ||
--parent-build) | ||
shift | ||
PARENT_BUILD=$1 | ||
dustymabe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
;; | ||
--force) | ||
FORCE=1 | ||
|
@@ -232,6 +234,19 @@ build_with_buildah() { | |
/usr/lib/coreos-assembler/cmd-import "${final_ref}" ${SKIP_PRUNE:+--skip-prune} | ||
fi | ||
|
||
# For the logs, print the RPM diff | ||
/usr/lib/coreos-assembler/cmd-diff \ | ||
--rpms ${PARENT_BUILD:+--from=$PARENT_BUILD} | ||
|
||
# For meta.json let's record the RPM diff and advisory diff information | ||
/usr/lib/coreos-assembler/cmd-diff \ | ||
--rpms-json ${PARENT_BUILD:+--from=$PARENT_BUILD} | | ||
jq '{"pkgdiff": .pkgdiff, "advisories-diff": .advisories}' > "${tempdir}/diff.json" | ||
/usr/lib/coreos-assembler/cmd-meta --build="${VERSION}" \ | ||
--skip-validation --artifact-json "${tempdir}/diff.json" | ||
# Run a 'dump' now to perform schema validation since we skipped it above. | ||
/usr/lib/coreos-assembler/cmd-meta --dump --build="${VERSION}" > /dev/null | ||
|
||
Comment on lines
+237
to
+249
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I think this probably should instead live in And also that way, we can populate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I initially had started working to do just what you propose and I still wish I had a local stash, but I don't see it. Let me explain why I backed off of that approach.
Fast forwarding to today. The diff should be lightweight regardless of where it is run so we should be able to do it in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened #4336 |
||
rm -rf "${tempdir}" | ||
} | ||
|
||
|
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.
Cool, and with this, we now no longer have any "no-op compat" switches!