Comments (6)
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.
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:
- Build an RPM using nfpm
- 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.
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.
hmmm
do you know if other platforms accept xz as well? Maybe we could use it instead 🤔
from nfpm.
Fixed in PR #63
from nfpm.
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)
- AppImage support? HOT 4
- Mismatch in rpm package produced by nfpm and it's corresponding ConventionalFileName HOT 1
- setup nur & winget
- RPM cpio name contains the release twice HOT 3
- Support xbps packages HOT 3
- Support env var expansion for `contents.src` HOT 4
- Prerelease version using env HOT 2
- ppc64le support HOT 7
- Configuration Docs tells us not to use v prefix but it is included by nfpm init HOT 1
- no packager registered for the format archinux HOT 1
- Add support for SOURCE_DATE_EPOCH HOT 1
- Bad rights on created subdirectories HOT 10
- [docs] RuntimeDirectory was introduced in 211. Use of < 231 doesn't make sense HOT 1
- `nfpm` does not ensure reproducible builds HOT 8
- `mtime` is not used from config HOT 1
- Introduction of reproducible builds causes Lintian to throw `package-contains-ancient-file` errors for directories HOT 3
- Ability to specify a type as "config|tree" for `/etc` so that all files are referenced in configfiles
- `file_info.mode` is not inherited when using `type: tree` HOT 2
- only last depends/provides/conflicts are written in package HOT 2
- APK: setting release creates invalid package version HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nfpm.