<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi<br>
<br>
With current Harbour QA rules, application like that is not allowed. Issues:<br>
- privileged group is reserved for Jolla applications only, harbour apps are not allowed to have it<br>
- applications that install rpm packages are not allowed before there is setting for allowing 3rd party rpm in some future update<br>
<br>
Most likely you could do an application that uses holes in the system that passes the QA, but the current answer is that unfortunately that kind of application is not allowed.
<br>
But not all hope is lost, in some coming update the policy might change when the 3rd party rpm setting comes to device.<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF985193"><font color="#000000" face="Tahoma" size="2"><b>From:</b> devel-bounces@lists.sailfishos.org [devel-bounces@lists.sailfishos.org] on behalf of Semuonov Basil [basil.semuonov@gmail.com]<br>
<b>Sent:</b> Saturday, January 11, 2014 11:45 PM<br>
<b>To:</b> devel@lists.sailfishos.org<br>
<b>Subject:</b> [SailfishDevel] Scriptlets in RPM hot allowed to Harbour<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">I guess, that I am the person who started this story about scriptlets.
<div><br>
<div>As Thomas suggested at his mail ( <a href="https://lists.sailfishos.org/pipermail/devel/2014-January/002767.html" target="_blank">
https://lists.sailfishos.org/pipermail/devel/2014-January/002767.html</a> ), here is the problem which I personally trying to solve using postinst scriplet:</div>
<div>Sailfish use zypp as backend, packagekit as frontend, and ssu for repository management.</div>
<div>Ssu does have "global" repositories, and "user" repositories. By using packagekit you can only enable and disable repositories. You should use ssu to add or remove  repositories. But as "nemo" user, you cannot add/remove "user" repositories, root permissions
 are required to perform actual repository list update (ssu ur).</div>
<div><br>
</div>
<div>Scriptlet is used to create nemo:privileged file at /etc/zypp/repos.d/ so it can be updated(rw access) from warehouse application.</div>
<div>Of course you can use %files with</div>
<div>
<pre style="margin-top:0px; margin-bottom:0px">%defattr(-,nemo,privileged,-)</pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">/etc/zypp/repos.d/openrepos.repo</span><br></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">but this way is already banned, since you can only deploy to predefined locations.</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial"><br></span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">So, the question is, how to achieve this, don't violate policy and be at harbour?</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial"><br></span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">Another use-case (as </span><font face="arial">Andrey Kozhevnikov mentioned)</font><span style="font-family:arial"> is sending "quit" signal to app which constantly running at background(recieving updates or whatever).</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">So it does quits before update, and auto-starts after update completes.</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial"><br>
</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">With all that recent discussion, please do update </span><font face="arial"><a href="https://harbour.jolla.com/faq" target="_blank">https://harbour.jolla.com/faq</a> and specify, that scriptlets are forbidden.</font></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial"><br></span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">Regards,</span></pre>
<pre style="margin-top:0px; margin-bottom:0px"><span style="font-family:arial">Basil.</span></pre>
</div>
<div>
<div><br>
</div>
-- <br>
Semuonov Basil<br>
--- Line of cut --- Linux everywhere... </div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>