Skip to content
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 overrides/rootfs #521

Merged
merged 1 commit into from
Jun 11, 2019
Merged

Add overrides/rootfs #521

merged 1 commit into from
Jun 11, 2019

Conversation

cgwalters
Copy link
Member

This is strongly related to coreos/fedora-coreos-config#66

For development iteration, we want the ability to directly overlay
binaries. This depends on
coreos/rpm-ostree#1830
which adds rpm-ostree ability to inject ostree refs into the build.

We could implement this in cosa by building an RPM but I think that's
silly - we end up compressing the data only to immediately decompress it.
Plus, while there are advantages to having entries for files in the RPM
database, in practice we're lying about having these files built by RPM.
So let's just directly generate an OSTree commit from them and inject
that.

(In practice for this use case rpm-ostree could actually learn
a way to directly consume a directory, but indirecting via OSTree
means it's equally easy to manage pre-generated ostree branches too
in an efficient way rather than re-committing each time)

@dustymabe
Copy link
Member

dustymabe commented May 14, 2019

(In practice for this use case rpm-ostree could actually learn
a way to directly consume a directory,

i.e. coreos/rpm-ostree#1645 and enabling that mechanism to overwrite files?

@cgwalters
Copy link
Member Author

i.e. coreos/rpm-ostree#1645 and enabling that mechanism to overwrite files?

Yeah I linked the PR to that issue, though your second point i we should probably explicitly separate ostree-layers and ostree-override-layers or something?

@dustymabe
Copy link
Member

i.e. projectatomic/rpm-ostree#1645 and enabling that mechanism to overwrite files?

Yeah I linked the PR to that issue,

oh cool, thanks. From just reading the PR titles (rpm-ostree is the last repo I haven't caught up on since leave) I didn't realize ostree-layers was solving coreos/rpm-ostree#1645. Could we possibly just re-use the add-files name for this or is ostree-layers doing something more complex?

though your second point i we should probably explicitly separate ostree-layers and ostree-override-layers or something?

Yeah I think it would be worth making a distinction. It is a problem I've hit with add-files before. We could add a boolean that enables overwriting for dev purposes (i.e. ostree-layers-overwrite: true or add-files-overwrite: true.

@jlebon
Copy link
Member

jlebon commented May 14, 2019

Definitely like the idea of being able to make install DESTDIR=... and letting that get slurped up into the build. Super minor bikeshed: overrides/rootfs instead? I initially thought this was exclusively about overriding things in /usr/bin.

though your second point i we should probably explicitly separate ostree-layers and ostree-override-layers or something?

Yeah I think it would be worth making a distinction. It is a problem I've hit with add-files before. We could add a boolean that enables overwriting for dev purposes (i.e. ostree-layers-overwrite: true or add-files-overwrite: true.

Hmm, let's discuss this in coreos/rpm-ostree#1645? AFAIK, the UX itself would be the same regardless on the cosa side.

@cgwalters cgwalters force-pushed the bin-overlay branch 2 times, most recently from 5f98efe to cdc8b47 Compare June 10, 2019 18:22
@cgwalters cgwalters marked this pull request as ready for review June 10, 2019 18:22
@cgwalters
Copy link
Member Author

🆕 Updated and is working for me!

I'm playing with a new workflow which is (from my rpm-ostree builddir):
make; and make install DESTDIR=/srv/walters/fcos/overrides/rootfs/
Then
cd /srv/walters/fcos; and cosa build; and cosa run

This itself is incremetal step towards either having cosa grow support for something like:
ln -s ~/src/github/projectatomic/rpm-ostree overrides/sources
and/or teaching rpm-ostree how to invoke cosa as part of doing that for tests.

src/cmdlib.sh Show resolved Hide resolved
src/cmdlib.sh Outdated Show resolved Hide resolved
This is strongly related to coreos/fedora-coreos-config#66

For development iteration, we want the ability to directly overlay
binaries.  This depends on
coreos/rpm-ostree#1830
which adds to rpm-ostree the ability to inject ostree refs into the build.

We could implement this in cosa by building an RPM (like we do for the overlay mentioned above)
but I think that's silly - we end up compressing the data only to immediately decompress it.
Plus, while there are advantages to having entries for files in the RPM
database, in practice we're lying about having these files built by RPM.
So let's just directly generate an OSTree commit from them and inject
that.

In practice for *this* use case rpm-ostree could actually learn
a way to directly consume a directory, but indirecting via OSTree
means it's equally easy to manage pre-generated ostree branches too
in an efficient way rather than re-committing each time.
@jlebon jlebon changed the title WIP: Add overrides/bin Add overrides/rootfs Jun 11, 2019
@jlebon
Copy link
Member

jlebon commented Jun 11, 2019

LGTM!

@jlebon jlebon merged commit c8cab23 into coreos:master Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants