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

Fix running flatpak-builder from inside flatpak #100

Closed
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@chergert
Contributor

chergert commented Jan 12, 2018

This series of patches allows us to be able to run a bundled flatpak-builder with Builder and execute the necessary flatpak operations on the host.

There may still be some operations that are direct subprocesses (build-export, etc), but I couldn't justify why they should run on the host so I left them as is.

One of the interesting fixes in this series is the GUnixFDList fix. Without that, running on the host would indefinitely block while waiting for an async splice to occur.

chergert added some commits Jan 11, 2018

utils: add GSubprocessFlags parameter
This allows us to pass it through in the case we're running in the same
pid namespace as the flatpak-builder process.
utils: clear GUnixFDList before entering main loop
If we do not clear the FDList before entering the main loop, the splice
async command may not complete because the pipe fd is still held. This
fixes an issue where builder_maybe_host_spawnv() hangs indefinitely when
run inside a Flatpak application.
manifest: run flatpak on the host if inside of flatpak
This allows us to be run from inside of a flatpak application and
successfully build by proxying the flatpak commands to the host.
@rh-atomic-bot

This comment has been minimized.

Collaborator

rh-atomic-bot commented Jan 12, 2018

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once
@alexlarsson

This comment has been minimized.

Member

alexlarsson commented Jan 12, 2018

bot, add author to whitelist

@alexlarsson

This comment has been minimized.

Member

alexlarsson commented Jan 12, 2018

@rh-atomic-bot

This comment has been minimized.

Collaborator

rh-atomic-bot commented Jan 12, 2018

📌 Commit 6110d9a has been approved by alexlarsson

@rh-atomic-bot

This comment has been minimized.

Collaborator

rh-atomic-bot commented Jan 12, 2018

⌛️ Testing commit 6110d9a with merge dce8981...

rh-atomic-bot added a commit that referenced this pull request Jan 12, 2018

utils: add GSubprocessFlags parameter
This allows us to pass it through in the case we're running in the same
pid namespace as the flatpak-builder process.

Closes: #100
Approved by: alexlarsson

rh-atomic-bot added a commit that referenced this pull request Jan 12, 2018

rh-atomic-bot added a commit that referenced this pull request Jan 12, 2018

manifest: run flatpak on the host if inside of flatpak
This allows us to be run from inside of a flatpak application and
successfully build by proxying the flatpak commands to the host.

Closes: #100
Approved by: alexlarsson

rh-atomic-bot added a commit that referenced this pull request Jan 12, 2018

utils: use g_debug() for debug information
Closes: #100
Approved by: alexlarsson
@rh-atomic-bot

This comment has been minimized.

Collaborator

rh-atomic-bot commented Jan 12, 2018

☀️ Test successful - status-papr
Approved by: alexlarsson
Pushing dce8981 to master...

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