Ubuntu – the standard for naming deb file name

debnaming conventionspackage-management

I want to find out the standard for the deb file names. For example I have file with the name foo_1.0.0-1_all.deb. As I have found out in Debian FAQ there is such convention:

<foo>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb

But this is not a standard. It does not answer to a a lot of questions. For example: how long can be ? What are the permitted characters in ? What values can be in ?

Is there any standard that describes deb file name in detail?

Best Answer

Well, as you said, the name foo_VVV-RRR_AAA.deb for a deb file is just a convention for naming .deb files, where VVV, RRR and AAA are the version, revision and architecture of the package foo.

Also, this convention is suggested (dictated) when building packages with debuild or git-buildpackage.

If you agree with this convention is ok, if not, you can rename your .deb files as you wish, but only by following these rules (in this case maybe you must to run dpkg --info <deb_file> to find a simple information that normaly you can get using the above convention for a deb file name).

Now, as you can read at Filename - Wikipedia:

There is no general encoding standard for filenames.

Because file names have to be exchanged between software environments (think network file transfer, file system storage, backup and file synchronization software, configuration management, data compression and archiving, etc.) it is very important not to lose file name information between applications. This led to wide adoption of Unicode as a standard for encoding file names, although legacy software might be non-Unicode-aware.

[...] Filename maximum length is not standard and might depend on the code unit size. Although it is a serious issue, in most cases this is a limited one.

So, if there is no standard for file names in general, I am almost sure that there is not a special standard for .deb file names. Or, if you are still confused, take the convention as a standard, and follow these rules.

Related Question