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 DEB archive support #332

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gasinvein
Copy link
Member

This requires dpkg-deb utility (part of dpkg) on host. While we could use ar p | tar x instead, using dpkg itself for this task is easier and surely more robust.
I have literally zero C programming skill, so possibly did some mistakes here.

@rh-atomic-bot
Copy link

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

@barthalion
Copy link
Member

Are there any actual issues caused by using ar and tar? Extract utilties are used from the host and we expect packagers to include them as dependencies. I don't see it happening with dpkg, especially when it can be replaced easily.

@alexlarsson
Copy link
Member

I don't think its a great idea to pull in a dependency on dpkg, because either all distros will need to packaged deb, or app authors can't rely on the deb support in flatpak-builder.

Anyway, debs are just ar archives, so i think we could extract them manually.

@gasinvein
Copy link
Member Author

@barthalion Most nowadays .deb packages contain data.tar.xz, but xz is not the only option, so we would need list ar contents before extraction.

@alexlarsson dpkg is available on most non-deb-based distros. I believe it's beacause it's debootstrap's dependency, which is widely used for containers bootstrapping.

@refi64
Copy link
Contributor

refi64 commented Mar 19, 2020 via email

@alexlarsson
Copy link
Member

@gasinvein Its available on some distros yes, but it is rarely installed. Pulling in a hard dep on it is not an easy sell.

@gasinvein
Copy link
Member Author

@alexlarsson Well, how to approach this, then? Assume there is always data.tar.xz? Listing ar contents and selecting correct compression type is beyond my C skill.

@barthalion
Copy link
Member

barthalion commented Mar 19, 2020 via email

@gasinvein
Copy link
Member Author

There is already RPM archive support (via rpm2cpio), I thought it would be nice to support deb as well, especially since there are already some apps on Flathub that unpack .deb packages.

@barthalion
Copy link
Member

Interesting, I don't think I've seen it used on Flathub. But that's fair enough.

@gasinvein
Copy link
Member Author

Given that flatpak-builder already depends on the uncommon rpm2cpio utility, should I still rewrite this to use ar | tar, or is dpkg-deb acceptable?

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.

None yet

5 participants