14

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 a lot of questions. For example:

  • How long can <foo> be?
  • What are the permitted characters in <foo>?
  • What values can be in <DebianArchitecture>?

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

1

3 Answers 3

5

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.

2

The Debian package names are defined in the Debian policy, section 3.1 The package name here, which leads to section 5.6.1 Source here. Note that it is expressly stated that the package name is used as the file name.

Ubuntu adds an ubuntuX version number on top of that. This is documented in the Ubuntu Packaging Guide section The changelog here. I'll copy it just to stay safe if the URL changes in the future:

Notice that the version has a -0ubuntu1 appended to it, this is the distro revision, used so that the packaging can be updated (to fix bugs for example) with new uploads within the same source release version.

Ubuntu and Debian have slightly different package versioning schemes to avoid conflicting packages with the same source version. If a Debian package has been changed in Ubuntu, it has ubuntuX (where X is the Ubuntu revision number) appended to the end of the Debian version. So if the Debian hello 2.6-1 package was changed by Ubuntu, the version string would be 2.6-1ubuntu1. If a package for the application does not exist in Debian, then the Debian revision is 0 (e.g. 2.6-0ubuntu1).

-1

Here are some thoughts about naming conventions:

If you've used Debian for any amount of time, you might have noticed that Debian package files all follow certain naming conventions. Every Debian binary package should have a filename that follows this format: packagename_version_arch.deb, where "packagename" is the name of the package, "version" is the package version with major, minor, and revision numbers, and "arch" is the architecture for the package. <..>

From IBM.com

Although this one is for RPM, it has a pretty nice naming convention aswell: name-version-release.architecture.rpm

where:

  • name is a name describing the packaged software.

  • version is the version of the packaged software.

  • release is the number of times this version of the software has been packaged.

  • architecture is a shorthand name describing the type of computer hardware the packaged software is meant to run on. It may also be the string src, or nosrc. Both of these strings indicate the file is an RPM source package. The nosrc string means that the file contains only package building files, while the src string means the file contains the necessary package building files and the software's source code.

From RPM.org

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .