← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1215133] Re: click manifest name should not contain underscores

 

This bug was fixed in the package qtcreator - 2.7.1-0ubuntu9

---------------
qtcreator (2.7.1-0ubuntu9) saucy; urgency=low

  * debian/patches/qtcreator-plugin-ubuntu.patch:
    - Update to latest version to truly fix (LP: #1215133)
 -- Timo Jyrinki <timo-jyrinki@xxxxxxxxxx>   Wed, 28 Aug 2013 16:39:01 +0300

** Changed in: qtcreator (Ubuntu Saucy)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to qtcreator in Ubuntu.
https://bugs.launchpad.net/bugs/1215133

Title:
  click manifest name should not contain underscores

Status in “qtcreator” package in Ubuntu:
  Fix Released
Status in “qtcreator” source package in Saucy:
  Fix Released

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_$app_$version where $pkgname is
  com.ubuntu.developer.<userid>.$appname (note, $app and $appname are
  often the same, but may be different when in the future we support
  multiple desktop files per click package). The underscore is a
  delimiter for the APP_ID and therefore must not be allowed in
  $pkgname, $app or $version. Because qtcreator allows it, developers
  could find themselves in a situation where their app is rejected and
  they have to rename their files and adjust their project.

  To illustrate, consider the following manifest:
  {
      "framework": "ubuntu-sdk-13.10",
      "hooks": {
          "untitled17": {
              "apparmor": "untitled17.json",
              "desktop": "untitled17.desktop"
          }
      },
      "maintainer": "Jamie Strandboge <jamie@xxxxxxxxxxxxx>",
      "name": "com.ubuntu.developer.jdstrand.untitled17",
      "title": "",
      "description": "",
      "version": "0.1"
  }

  The APP_ID for the above is:
  com.ubuntu.developer.jdstrand.untitled17_untitled17_0.1. The APP_ID is
  derived based on the 'name' , hooks dictionary key(s) and the version
  from the click manifest. The apparmor hook looks at these manifest
  fields to generate a profile name and policy while the desktop hook
  looks at them to generate a desktop file. Unity will look at these
  fields to derive an APP_ID to launch applications in compliance with
  application lifecycle and application lifecycle.

  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-9][a-z0-9+.-]+$
   * manifest 'version': ^((\d+):)?([A-Za-z0-9.+:~-]+?)(-([A-Za-z0-9+.~]+))?$
   * manifest 'hooks keys': ^[A-Za-z0-9+-.:~-]+$

  The allowed characters are based on (which references Debian policy):
  http://bazaar.launchpad.net/~click-hackers/click/trunk/view/head:/doc/file-format.rst
  http://bazaar.launchpad.net/~click-hackers/click/trunk/view/head:/doc/hooks.rst

  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-z0-9][A-Za-z0-9\+\-\.]+$). I'm not sure this
  is a bug in click or a feature (please talk to cjwatson for
  clarification). The review process currently enforces click documented
  behavior.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/1215133/+subscriptions