ubuntu-cli template tries to execute a non executable file

Bug #1064110 reported by Raúl Soriano on 2012-10-08
38
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Quickly
Undecided
Unassigned

Bug Description

When creating a new project with ubuntu-cli template, a non executable file is placed inside "project/bin" and then it's executed, generating a the following traceback:

$ quickly create ubuntu-cli example
Creating project directory example
Crear un repositorio bzr y publicarlo
Lanzando su proyecto recién creado
Traceback (most recent call last):
  File "/usr/share/quickly/templates/ubuntu-application/create.py", line 93, in <module>
    subprocess.call(['./' + project_name], cwd='bin/', env=env)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied
Error: la orden create ha fallado
Cancelando

Quickly 12.08.1 from repositories on a fully upgraded Ubuntu 12.10 Beta 2.

Related branches

Tony Byrne (tony-badwolf) wrote :

Hi Raúl
 you don't specify in your report which directory where you run the command
$ quickly create ubuntu-cli example

 It may be a permission problem in the directory. You could try these commands to verify.

$ mkdir example
$ mkdir example/bin
$ echo gedit > example/bin/example
$ chmod u+x example/bin/example
$ ./example/bin/example

Raúl Soriano (gatoloko) wrote :

I did it in a sub directory of my home, to be more precise ~/Projects/test

Executing the commands in your message in the same directory creates the file, adds execution permission and then launches gedit as expected.

In fact, after quickly failed, my first test was to make the file executable (chmod +x example/bin/example) and it worked.

What's more, the backtrace in my report fails on "subprocess.call(['./' + project_name], cwd='bin/', env=env)", trying to execute it. The permission change should have happened already at that point, and didn't fail.

This is what would have happened if it didn't even try the chmod part.

Raúl Soriano (gatoloko) wrote :

Ok, I've found what's the problem here.

Looking at the code and comparing ubuntu-cli with ubuntu-application templates, there is no place where the file permissions are changed, but the difference is that, while ubuntu-application template contains an executable file, the ubuntu-cli template contains a non executable file.

So I've made the file inside the ubuntu-cli template executable, tried quickly again and it worked fine.

Then I've grabbed a copy of the source and the same executable/non executable difference is there. Trying to use it from the source I get the same error too. Made the file executable on the sources, tried it and worked. Then tried a "bzr diff" and this is all that needs to be changed:

$ bzr diff
=== modified file 'data/templates/ubuntu-cli/project_root/bin/project_name' (properties changed: -x to +x)
$

Lee Cannon (sp00n1na70r) on 2012-11-01
Changed in quickly:
assignee: nobody → Sp00n1na70r (sp00n1na70r)
Lee Cannon (sp00n1na70r) on 2012-11-01
Changed in quickly:
status: New → In Progress
Lee Cannon (sp00n1na70r) wrote :

Proposed merge that fixes the bug by marking 'data/templates/ubuntu-cli/project_root/bin/project_name' executable.

Lee Cannon (sp00n1na70r) wrote :

Fix committed to main branch revision 688.

Changed in quickly:
status: In Progress → Fix Committed
assignee: Lee Cannon (sp00n1na70r) → nobody
Paul Jaros (madmike77) wrote :

I just stumbled over this error. Why isn't this fix released after almost 2 years?

2014-08-08 20:50 GMT+02:00 Paul Jaros <email address hidden>:

> I just stumbled over this error. Why isn't this fix released after
> almost 2 years?

Apparently it was fixed in the upstream source code, but never published.

The last revision is dated November 2012, so it appears quickly was
abandoned to rot:

Recent revisions
688. By Lee Cannon on 2012-11-01
Fixes bug #1064110 - ubuntu-cli template tries to execute a non executable
file

To be honest, if they don't care to fix it, I don't care to use it any
more.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers