-
Notifications
You must be signed in to change notification settings - Fork 169
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
Multi-arch build layout prep patches #590
Merged
Merged
Conversation
This file contains 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
r4f4
reviewed
Jul 2, 2019
jlebon
force-pushed
the
pr/build-layout-prep
branch
from
July 2, 2019 20:38
c98c120
to
a3edd8d
Compare
This was referenced Jul 2, 2019
|
jlebon
force-pushed
the
pr/build-layout-prep
branch
from
July 3, 2019 13:31
a3edd8d
to
18464d6
Compare
ajeddeloh
approved these changes
Jul 3, 2019
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.
LGTM aside from one "take it or leave it" nit.
jlebon
force-pushed
the
pr/build-layout-prep
branch
from
July 3, 2019 20:52
18464d6
to
7ff9d45
Compare
Add some helper functions for retrieving the dnf value of `${basearch}`. Note there are many places over the codebase where we use `uname -m` or `arch`, but we semantically mean `${basearch}`. I didn't bother replacing them because (1) for the architectures we care about, it actually makes no difference (if e.g. one day we want to support 32-bit ARM or x86, then it will) and (2) given the above, the refactor risk didn't seem worth it.
Mark the OSTree commit with the actual `${basearch}` we used to assemble it. The major user for this will be Zincati. Putting it in the commit metadata means this will then show up in e.g. `rpm-ostree status --json`, which Zincati already executes today. We could also do this directly in rpm-ostree. Though really, after digging into this quite a bit, I lean towards making this a CoreOS-ism for the time being. There aren't many software out there that care about the specific `basearch` string; it's something that mostly only matters to yum/dnf/rpm-ostree (hence why it's not really exposed in any easy way). As one can guess, any portable software that needs arch-specific behaviours would use e.g. compiler flags or `uname(2)`, rather than any kind of distro-specific concept. I also didn't make this part of `/etc/os-release` because if Fedora does end up shipping it there as well eventually, we'll have to carry *two* variants of the same tag. OTOH, keeping it in the commit metadata forces the few classes of software that care about this to be specific to rpm-ostree systems, over which we likely have more control.
The default loader is not considered safe. Use `safe_load`, which disables some of the more funky YAML features we don't need.
This is a common pattern to signal that anything that subclasses us is expected to implement these methods.
This is useful for hacking on the codebase, but also in a devel pipeline context.
Otherwise, an ill-timed `SIGINT` can interrupt `createrepo_c` while it's creating the yumrepo and a follow-up invocation will barf on `.repodata` already existing.
Minor follow-ups from the OSTree-in-builddir work. - prune_builds: we don't need to remember the `ostree_timestamp` anymore when collecting builds. - prune_builds: drop the `subprocess` module, since we no longer need to call out to the `ostree` CLI either. - cmd-clean: drop the reference to OSTree repo objects
Use `builds_dir` instead of `build_dir` to refer to `builds/`, and `build_dir` instead of `build_root` to refer to `builds/$id/`. This matches the convention used in the rest of the codebase.
jlebon
force-pushed
the
pr/build-layout-prep
branch
from
July 3, 2019 21:06
7ff9d45
to
6bf8b8e
Compare
And rebased! |
ajeddeloh
approved these changes
Jul 3, 2019
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.
Split out of #580. See individual commit messages for details.