maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How to give permission to a script file inside a deb? (https://talk.maemo.org/showthread.php?t=89562)

flotron 2013-03-22 23:33

Re: How to give permission to a script file inside a deb?
 
the content of my script remove files from themes/base folders and it replace them with symlinks

peterleinchen 2013-03-22 23:34

Re: How to give permission to a script file inside a deb?
 
Then it should work with hints given above ...

flotron 2013-03-22 23:36

Re: How to give permission to a script file inside a deb?
 
but how to execute the script now, what i need to put before ?
sudo script.sh?
devel-su script.sh?
su script.sh?
#sudo script.sh?

Schturman 2013-03-22 23:52

Re: How to give permission to a script file inside a deb?
 
OK, you can do it like this..
1. Before packaging you need your_package.aegis file that include this:
Code:

<aegis>
    <request policy="add">
    <credential name="UID::root" />
    <credential name="GID::root" />
    <credential name="GRP::root" />

    <for path="/opt/mytheme/changer/script.sh" />
    </request>
</aegis>

2. The .desktop file should look like this:
Code:

[Desktop Entry]
Type=Application
Name=My Theme
Exec=/usr/bin/aegis-exec -s -u user -l "/opt/mytheme/changer/script.sh"
Icon=/opt/mytheme/icon/icon.png
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable


flotron 2013-03-23 00:01

Re: How to give permission to a script file inside a deb?
 
where is should be placed in the package? your_package.aegis

that would be "packagename.aegis"?

Schturman 2013-03-23 00:16

Re: How to give permission to a script file inside a deb?
 
yes "packagename.aegis"

P.S. I don't know how you package your .deb file, but I use this method: http://talk.maemo.org/showthread.php?t=86291
By what I wrote before I removed password prompt from N9QT.

flotron 2013-03-23 00:17

Re: How to give permission to a script file inside a deb?
 
but where it should be placed? inside the DEBIAN folder?

Schturman 2013-03-23 00:21

Re: How to give permission to a script file inside a deb?
 
No, in: your_packagename/debian
full path:
Code:

/scratchbox/users/your_name/home/your_name/package_name/debian

Schturman 2013-03-23 00:24

Re: How to give permission to a script file inside a deb?
 
P.S. Also add to the "rules" file:
Code:

chmod 4755 debian/your_packagename/opt/mytheme/changer/script.sh

flotron 2013-03-23 00:53

Re: How to give permission to a script file inside a deb?
 
thank you schturman, but im kind confused because i dont understand so much of this
i only package the folder to deb and do you mean debian folder inside the package?
and the rules file must be inside debian folder too?


All times are GMT. The time now is 00:22.

vBulletin® Version 3.8.8