click manifest name should not contain underscores
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtcreator (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Saucy |
Fix Released
|
High
|
Unassigned |
Bug Description
Currently qtcreator allows people to name their projects with an underscore. This name is used to fill in various parts of the manifest which are then used to generate click packages, etc. click packages, apparmor and the application lifecycle have the concept of an APP_ID. When you install a click package an APP_ID is assigned in the form of $pkgname_
To illustrate, consider the following manifest:
{
"framework": "ubuntu-sdk-13.10",
"hooks": {
}
},
"maintainer": "Jamie Strandboge <email address hidden>",
"name": "com.ubuntu.
"title": "",
"description": "",
"version": "0.1"
}
The APP_ID for the above is: com.ubuntu.
I didn't verify qtcreator's input validation except to see that it allows '_', but here are regular expressions that validate each part:
* manifest 'name': ^[a-z0-
* manifest 'version': ^((\d+)
* manifest 'hooks keys': ^[A-Za-
The allowed characters are based on (which references Debian policy):
http://
http://
Note that the click documentation states that the name should only be the allowable characters for Debian Source packages (which is what the above regex enforces), but click is currently lenient and seems to allow [A-Z] (ie, ^[A-Za-
Related branches
tags: | added: appstore |
description: | updated |
Changed in qtcreator (Ubuntu Saucy): | |
importance: | Undecided → High |
summary: |
- application name verification is too lenient + click manifest name should not contain underscores |
Changed in qtcreator (Ubuntu Saucy): | |
status: | New → Fix Committed |
Changed in qtcreator (Ubuntu Saucy): | |
status: | Fix Committed → In Progress |
In thinking about this more, it is probably a bit extreme to not allow '_' in the projectname (one could do this in src/libs/ utils/projectna mevalidatinglin eedit.cpp) . It would be better to simply substitute all occurrences of '_' with '-' when generating/editing the click manifest. This would solve the usability problem and keep the patch local to our click packaging.