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

Split bindgen to separate build #1573

Closed
wants to merge 2 commits into from

Conversation

cgwalters
Copy link
Member

The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

This also opens the door to potentially using an external bindgen
binary if available (as it likely will be soon in Fedora again).

Oh and I know this totally doesn't work with the vendoring
code yet...

Closes: #1557

@cgwalters
Copy link
Member Author

(Aside from still needing to touch the vendoring code, this was a surprisingly painless patch)

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh and I know this totally doesn't work with the vendoring
code yet...

Ahh OK. Would it be better to hold this PR until it also contains the vendoring fixes? Just in case we don't get around to this before the next release.

cd $(top_srcdir)/bindgen && \
export CARGO_TARGET_DIR=@abs_top_builddir@/bindgen-target && \
$(cargo) build --verbose && \
ln -sf $${CARGO_TARGET_DIR}/debug/rpmostree-bindgen $(abs_top_builddir)/rpmostree-bindgen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: looks like inconsistent spacing?

The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

Since Fedora will now again ship a `cbindgen` package, let's
also support using it if we find it, saving ourselves
the cost of building it.

For distros that don't ship it (e.g. CentOS) for CI purposes
we build it.  For downstream builds that are offline, rather
than vendor the cbindgen sources like we do with our main Rust,
let's just vendor the `rpmostree-rust.h` file as was suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1608670

Closes: coreos#1557
@cgwalters
Copy link
Member Author

OK, I reworked this. We now save rpmostree-rust.h in the tarball, which solves the vendoring problem.

configure.ac Outdated Show resolved Hide resolved
@jlebon
Copy link
Member

jlebon commented Sep 25, 2018

@rh-atomic-bot r+ a89ec34

@rh-atomic-bot
Copy link

⌛ Testing commit a89ec34 with merge 2386ea0...

rh-atomic-bot pushed a commit that referenced this pull request Sep 25, 2018
The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

Since Fedora will now again ship a `cbindgen` package, let's
also support using it if we find it, saving ourselves
the cost of building it.

For distros that don't ship it (e.g. CentOS) for CI purposes
we build it.  For downstream builds that are offline, rather
than vendor the cbindgen sources like we do with our main Rust,
let's just vendor the `rpmostree-rust.h` file as was suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1608670

Closes: #1557

Closes: #1573
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member

jlebon commented Sep 25, 2018

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit a89ec34 with merge ac2588a...

rh-atomic-bot pushed a commit that referenced this pull request Sep 25, 2018
The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

Since Fedora will now again ship a `cbindgen` package, let's
also support using it if we find it, saving ourselves
the cost of building it.

For distros that don't ship it (e.g. CentOS) for CI purposes
we build it.  For downstream builds that are offline, rather
than vendor the cbindgen sources like we do with our main Rust,
let's just vendor the `rpmostree-rust.h` file as was suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1608670

Closes: #1557

Closes: #1573
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

😢

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit a89ec34 with merge 8403c57...

rh-atomic-bot pushed a commit that referenced this pull request Sep 25, 2018
The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

Since Fedora will now again ship a `cbindgen` package, let's
also support using it if we find it, saving ourselves
the cost of building it.

For distros that don't ship it (e.g. CentOS) for CI purposes
we build it.  For downstream builds that are offline, rather
than vendor the cbindgen sources like we do with our main Rust,
let's just vendor the `rpmostree-rust.h` file as was suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1608670

Closes: #1557

Closes: #1573
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member

jlebon commented Sep 25, 2018

I believe in you, Homu!
@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit a89ec34 with merge 03b5f6b...

rh-atomic-bot pushed a commit that referenced this pull request Sep 25, 2018
The problem is building bindgen as part of our single run
locks serde to way old versions, and I want to use newer versions.

Since Fedora will now again ship a `cbindgen` package, let's
also support using it if we find it, saving ourselves
the cost of building it.

For distros that don't ship it (e.g. CentOS) for CI purposes
we build it.  For downstream builds that are offline, rather
than vendor the cbindgen sources like we do with our main Rust,
let's just vendor the `rpmostree-rust.h` file as was suggested
in https://bugzilla.redhat.com/show_bug.cgi?id=1608670

Closes: #1557

Closes: #1573
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@jlebon
Copy link
Member

jlebon commented Sep 25, 2018

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit a89ec34 with merge f50f9e8...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing f50f9e8 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants