Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Support for .deb .rpm .cpio? #125

Open

Description

@ducktype

I think will be cool to support .deb and .rpm and probably others linux packages formats
.deb are custom wrapped tar.gz/tar.bz2/tar.xz/tar.lz4/tar.sz archives
.rpm are custom wrapped cpio archives
the only program that handle these archive types that i'm aware of is 7zip that have a linux port p7zip, but in the latest versions of 7zip some problems arise and i needed to use an older version, having a multiplatform/dependencies free archiver that handle also that common type of linux packages will be great, for my needs will be enought to have the extract operation!

What do you think about that?
thank you in advice :)

Activity

  1. mholt commented on Nov 30, 2018

    @mholt
    Owner

    Sure, pull requests welcome to add additional archive formats.

  2. mholt commented on Dec 2, 2018

    @mholt
    Owner

    @ducktype Hey actually, I just updated the issue templates. Would you mind re-creating one issue per format using the template specifically for requesting new archive formats? Thanks!

  3. ahrav commented on Aug 15, 2023

    @ahrav

    Only 5 years later 🤣 trufflesecurity/trufflehog#1625

  4. mholt commented on Aug 16, 2023

    @mholt
    Owner

    @ahrav That could be a reference implementation, yeah? Feel free to make a PR if we can / want to use it!

  5. ahrav commented on Aug 16, 2023

    @ahrav

    @ahrav That could be a reference implementation, yeah? Feel free to make a PR if we can / want to use it!

    Yea that's correct. It's not a great solution, but it does provide us a way to extract .rpm and .deb file formats. It's really just a convenience helper to extract the files into tarballs which your pkg then nicely takes care of.

  6. mholt commented on Aug 16, 2023

    @mholt
    Owner

    Very cool :)

  7. ducktype commented on Aug 16, 2023

    @ducktype
    Author

    Seems the proposed solution uses external commands, i feel archiver should handle extractions by itself and also avoid double copying the archive.

    There are native golang libs, also recently updated, that handle ar (Deb) and cpio (RPM) formats

    https://pkg.go.dev/pault.ag/go/debian/deb
    https://pkg.go.dev/github.com/u-root/u-root/pkg/cpio

    RPM add some header before the cpio stream so some code to parse and skip to the start cpio offset Is required i think this lib have some of that stuff, but Is old:

    https://pkg.go.dev/github.com/sassoftware/go-rpmutils

  8. reopened this on Aug 16, 2023
  9. taoxinyi commented on Apr 11, 2024

    @taoxinyi

    Would like to see support for .rpm as well!

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions