-
Notifications
You must be signed in to change notification settings - Fork 29
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
update twoliter and buildsys to put RPMs into per-package sub-directories #210
Conversation
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.
Looks good, just some minor notes.
twoliter/embedded/rpm2kit
Outdated
# FIXME: should this be a versioned directory? | ||
# - needs to change whenever the kit changes? | ||
# - needs to be predictable for publishing to work? | ||
# - needs to avoid ambiguity if we have other local builds of the same kit? |
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.
If we're emitting the right cargo:rerun-if-changed
and cargo:rerun-if-env-changed
directives in buildsys
then we can drop this. Just need to make sure #198 (comment) is addressed.
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.
I think the answer is as simple as rm -rf "${KIT_DIR}"
since, if this script is running, then we know we are re-creating the kit. That's what I've pushed.
1d2df8b
to
6eaabe9
Compare
Add a check to Makefile.toml to tell the user when they need to run |
@bcressey this is ready for another review after adding the flat RPMs dir check. |
Place output RPMs into a subdirectory using the package-name.
Signed-off-by: Ben Cressey <[email protected]>
Update the buildsys Dockerfile so that it works with RPM packages being outputted to sub-directories, i.e. build/package-name/ Co-authored-by: Matt Briggs <[email protected]> Co-authored-by: Ben Cressey <[email protected]> Signed-off-by: Ben Cressey <[email protected]>
Add a check to Makefile.toml to see if the user has rpms in the build/rpms directory. If so, this is likely a problem because the new version of Buildsys will expect per-package subdirectories, and Cargo will not know it needs to rebuild. Raise an error that informs the user they need to run cargo make clean.
Rebase to fix Makefile.toml conflict |
done | ||
|
||
createrepo_c "${KIT_DIR}" | ||
dnf --disablerepo '*' --repofrompath "kit,file:///${KIT_DIR}" repoquery --all |
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.
just for my understanding, what does this do? is it just disabling the kit dnf repo by default so that it has to be explicitly enabled in the variant build?
Issue number:
Related #185
Related #73
Builds on #198
Description of changes:
In order to construct kits containing the correct RPMs, we need to stop using a flat
build/rpms
structure. Instead we need to put each RPM into a sub-directory. Then we can use the package-name to find the right RPMs to build repos with the correct RPMs on-the-fly when building packages, kits and variants.Testing done:
twoliter: error if old rpm structure is discovered
commit. Buildsys failed as expected withNo matching package to install: 'bottlerocket-glibc-devel'
twoliter: error if old rpm structure is discovered
, got the helpful message:PLEASE RUN: cargo make clean
cargo make clean
and the build succeededTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.