Git Product home page Git Product logo

Comments (6)

AdrianWennberg avatar AdrianWennberg commented on May 20, 2024 1

I can't find any good documentation for this, but as far as I can tell, most platforms and tools are gonna support both types of compression. Also of note is that Fedora is moving to zstd compression soon. I don't think compatibility in general will be an issue as long as NFPM supports either xz or gzip.

I think we should consider allowing the user to choose which compression method to use as an optional configuration, but by default use the system default. Issue #40 discusses manually building RPMs, which would be a bit more complex if we supported multiple compression methods, but I think it's doable.

from nfpm.

AdrianWennberg avatar AdrianWennberg commented on May 20, 2024

It seems like it's not just the magic string that is missing, but the entire gzip file is incorrectly compressed. The RPM can still be unpacked using a tool like rpm2cpio so it seems like it is still valid, even though it doesn't conform to the specifications.

Also, if someone could verify this behavior, that would be great.

Steps to reproduce:

  1. Build an RPM using nfpm
  2. run xxd -p filename.rpm | tr -d '\n' | grep -cm 1 '1f8b'

This will output a 0 of no magic string was found, and a 1 if one was found.

from nfpm.

AdrianWennberg avatar AdrianWennberg commented on May 20, 2024

Oh, I just got what the error seems to be. RPMs support different compression methods and the default (for Fedora) seems to be xz source. I can't find any good sources on this though. The official File format documentatiopn is lacking, and other tools like FPM uses gzip it seems. @caarlos0 I don't think this can classify as a bug, but I'm unsure how to move forward with this, and if anything needs to change with NFPM.

from nfpm.

caarlos0 avatar caarlos0 commented on May 20, 2024

hmmm

do you know if other platforms accept xz as well? Maybe we could use it instead 🤔

from nfpm.

AdrianWennberg avatar AdrianWennberg commented on May 20, 2024

Fixed in PR #63

from nfpm.

caarlos0 avatar caarlos0 commented on May 20, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from nfpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.