How to include postinst file with my package?

  • hi there,

    the problem is that i want to change a database file permission to be able to write in.
    the only way that i found is to put postinst file in my package which contains the following script

    @chmod ugo=rw /home/user/myApplication/mydatabase.db@

    but when i put this file in my DEBIAN folder it is automatically removed when i build the project?
    So if you know a better way to do this , please tell me?
    Or tell me how can i bundle this file with my package?

  • Moderators

    How about having the application create the database if it is not there yet? Shipping files in /home seems awfully wrong to me.

    The permissions seem rather permissive to me: Why should others and the group be able to write to the database in the first place?

  • Hi Tobias Hunger,

    Thank you for your help.
    The database already deployed with my application so why i should create it?

    where Do you think that i should deploy the DB ?
    and about the permission there is no problem I could make it

    @chmod u=rw /home/user/myapp/myDB.db@

    Thank you

  • Moderators

    I don't know:-) I have hardly any experience with the Maemo/Meego/Harmattan.

    Anyway: In debian the postinst rule is supposed to go as a file called postinst right next to the debian/rules files that does all the packaging. The package building system is then responsible to put them into the DEBIAN folder inside the package.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.