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
The max lengthe of RPM package name is 66? #974
Comments
The lead is not really the data that's being used and it is only there for legacy purpose. But RPM is expecting it to be in the format that is in the code. You can't just change that data structure. Also this field contains the NEVR of the package (Name:Epoch-Version-Release) Are you running into actual issues with a package with a long name? What error message do you see? And can you post the spec file of the package? |
Thanks, Festi. In fact, I use a java program which to create RPM package, which refer to an old RPM API (RPM 4.4.2). Does the standard rpmbuild command with version 4.4.2 also have the name length limit? And how to solve the the backward compatibility on the latest rpm command? |
No, the package name should not be limited. It looks like there is a bug in the code creating the lead. But it is hard to tell where exactly this is. If your Java program is creating the package directly without creating a spec file and then running rpmbuild I would advice checking the code that creates the lead in there. If it does create a spec it might be a bug in rpm 4.4.2 which is ancient and we won't fix anything in there. But you can try to switch to rpm 4.4.2.3 which contains lots of bug fixes. |
The java program create the RPM package with a spec file as input. |
I meet some problem when try to setup the dev env for debugging. Could you point out the lead structure definition in source file? I find some code that the name length is "66" in struct "rpmlead_s" which I think it's deprecated. Thanks |
See https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/pkgformat.html covers the fundamentals of rpm package file format, http://ftp.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html has more background and rationale about the evolution. But as ffesti already pointed out, the data in the lead is not actually used at all, it mostly just needs to exist, have the right maging and be of right length. 4.4.2 will look at the "type" field as well, but not the name. |
I just truncate the name if its length is more than 66, and it doesn't impact the RPM package generation and extraction. Thanks |
From lib/rpmlead.c, I see the definatino "char name[66];", it means that the limit of the rpm package name length is 66?
I try to set it to a larger one like "98" in my code, it can generate the rpm package success but failed when I use rpm command to extract it.
The text was updated successfully, but these errors were encountered: