Questions About the Following Group of Packages
allison at canonical.com
Mon Nov 7 00:43:35 UTC 2011
On 11/06/2011 04:12 PM, Nathan Osman wrote:
> Stefano Palazzo <https://launchpad.net/~stefano-palazzo> has written a
> Unity lens for the Ask Ubuntu website <http://askubuntu.com> that offers
> users the ability to search for questions, users, and tags on the site
> using the Unity interface. The lens originally made use of Ask Ubuntu's
> API to perform the question searches but the API was too latent for
> search-as-you-type and so another solution was sought - the solution was
> to use the site's quarterly data dumps
> to generate a special index file and for me to write a small HTTP server
> that used the index file to perform the searches. This drastically
> reduced search times (down to the order of a few milliseconds) and now I
> have created a local server that can be installed on the user's machine
> to further speed up the searches.
> The branch for the lens
> <https://code.launchpad.net/~stefano-palazzo/askubuntu-lens/trunk> in
> Launchpad contains Debian packaging and I have carefully packaged the
> other components necessary for running the local data server on a user's
> machine. All of the packages I have written run cleanly through Lintian
> (with one exception, which I will get to in a minute). We (Stefano and
> I) are hoping to submit the packages either to the archives or the
> Software Center - but therein lies the problem.
> According to the guidelines for submission
> <http://developer.ubuntu.com/publish/my-apps-packages/> to the Software
> Center, package data and binaries should be placed in /opt. This
> presents a challenge for some of the packages which require files to be
> in other places (such as init.d scripts and Python modules). I have
> created a Google Document
> which explains the various components of the packages and the locations
> in the filesystem that are used. You can find all of these packages in
> this PPA <https://launchpad.net/~askubuntu-tools/+archive/ppa>. Because
> an init.d script is useless anywhere else in the filesystem, it needs to
> be placed in a specific folder. Likewise, some of the packages contain
> compiled binaries and executable scripts that need to be placed in a
> location contained in the $PATH environment variable. How can these
> conditions be met if the files are in /opt?
Saying "Software Center" is a little confusing here, since Software
Center actually includes the main and universe archives. I figure you
mean submitting through http://myapps.developer.ubuntu.com to appear in
the extras archive.
The key piece here is that MyApps submissions for extras should be
lightweight GUI apps. If you have an architecture like this where the
package includes .so shared libraries and an HTTP daemon, it's a good
sign that it belongs in universe or main instead of in extras.
Specifically, init.d files aren't allowed in extras packages. The only
discoverable binaries/executables allowed are the ones loaded from the
.desktop file. You can include additional command-line tools, you just
can't get them in the $PATH. (This is a security policy, extras apps are
locked-down quite heavily.)
Python modules aren't a problem in /opt, you just have to add the
application-specific /opt/extras.ubuntu.com/appname/lib/... path to
sys.path in the application's Python programs.
So, I'd recommend submitting the new and improved Ask Ubuntu Lens to
universe or main for Precise, and once it's accepted there, request a
Backport for Oneiric.
More information about the Ubuntu-app-devel