Important: Please read the Qt Code of Conduct -

[Solved, sort of] Problem using wizard to package an app for Maemo

  • Hi all,

    I'm getting an error when trying to create a debian package using Qt Creator's Publishing Wizard:

    Can't exec "debian/rules": Permission denied at /Users/john/QtSDK/Maemo/4.6.2/madbin/dpkg-buildpackage line 474.
    dpkg-buildpackage: failure: debian/rules clean failed with unknown exit code -1

    I'm wondering if maybe this is because I'm running Qt Creator on a Mac. I've been pleasantly surprised (actually, amazed) at just how easy it has been to develop and test code for Maemo on OS X, but I kinda figured support for running Qt on the Mac would be limited in some manner. Would it be better for me to scrape together a Linux box of some sort to do development work on?

    Thanks in advance!

    Edit: I've gone ahead and created the debian source package by hand. See below for details.

  • Moderators

    debian/rules should not exit with exit code -1... Did you do something to that file that might trigger it to error out?

  • Possibly; I've been fiddling with bits and pieces of the debian packaging stuff, trying to figure out what is wrong. I believe the "rules" file right now is a pristine copy of what the system handed me to start with, but I can't swear it is.

    Is there any way to run the file by hand? I've tried, but I apparently need to set up some environment variables for it...

  • Ok, when building a debian package to deploy to my N900 for testing, Qt has absolutely no problem executing the "rules" file (as found in the build directory). The rules file in the source directory seems fine, too. Only when the wizard tries to run the rules file does it seem to run into trouble.

    The "progress" box notes that the wizard sets up a temporary directory, which I presume contains the copy of "rules" that it is trying to run, but gives no clue as to where that directory exists. Is that directory documented somewhere? (Or, even better, is there documentation available describing exactly what the wizard is attempting to do? Maybe I can just do the packaging by hand, rather than using the wizard...)

  • Well, I'm certain now that I'm doing something seriously wrong. I finally set up the Qt SDK on a Linux box, pulled my project over, and ran the publishing wizard on it. Same problem. So, I tried creating an entirely new project (using the "maemovibration" Qt example project), didn't touch any of its files, and ran the wizard. Same problem.

    Either I'm missing something fundamental. or this wizard simply doesn't work for any project in any environment... :)

    I guess the only option left is to construct a debian source package by hand?

  • Well, after conferring with folks on, it appears that the wizard just doesn't work at all. (Is this still supported software? If not, perhaps it should be removed from the Qt SDK?)

    Anyway, with their help, I finally managed to build a debian source package manually. I'm still trying to work out how to do this in a clean manner, but in short, I copied the entire source directory into a directory called <packagename>-0.1.0 (my initial version of the software being 0.1.0), copied the debian directory from the build directory into that, and ran dpkg-buildpackage in it. Ugly, but it does the job.

    I'll work on improving this.

    Here's a "link": to the t.m.o thread.

  • I faced the same problem. It seems that the wizard copies your whole source directory to /tmp/qtc_packaging/ and starts the packaging process in there. Now, the problem is, that the rules file in there ( /tmp/qtc_packaging/projectname/debian/rules ) is not executable. I always work around the issue with running this in a command line while packaging:

    while [ true ]; do chmod +x /tmp/qtc_packaging/projectname/debian/rules; done

    So far this had a 99% success rate in making the rules file executable between it has been freshly copied (without x-bit) and it is actually executed.

    Hope that helps,

  • Wow; that's... one heck of a workaround. But hey, if that's the only problem, it sounds like it would be easy for the Qt folks to fix. Have you raised a bug on this already? I'll do it if you haven't...



  • There's this:

    It seems there was the same bug already for regular packaging (run on device) after creating a fresh project:

    And then there are a few marked as duplicate.

  • Hmm. It looks like a fix was made back in 2010. Is this a regression, then?

  • After reading the bugreports again I realized that they were slightly different issues. The problem there was that creating a new project did not set the x-bit on the rules files and for thus that failed also during regular deployment. In our case the regular deployment works fine, but the x-bit is lost during the copy for publishing. I have created a new bug report for this issue:

  • Thanks! I'll keep an eye on that bug report.

Log in to reply