[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: Review Request 127445: "make install" sometimes creates a share directory owned by root in the s
From:       Maurizio Paolini <paolini () dmf ! unicatt ! it>
Date:       2016-03-21 21:41:29
Message-ID: 20160321214129.21226.32957 () mimi ! kde ! org
[Download RAW message or body]

--===============3953470750183263613==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127445/
-----------------------------------------------------------

(Updated March 21, 2016, 9:41 p.m.)


Status
------

This change has been marked as submitted.


Review request for Extra Cmake Modules.


Bugs: 360734
    http://bugs.kde.org/show_bug.cgi?id=360734


Repository: extra-cmake-modules


Description
-------

Avoid creation of a "share" directory owned by root in the source location.

At "make install" stage, project icons are installed in their correct place.  However \
a new folder is created (owned by root, typically) in the current directory, \
typically in the home directory.

This is often inconvenient, since the user is then unable to remove such directory \
without root priviledges, and could also lead to an error at "make install" stage.
One example of this is when the home directory of the user is an NFS mount from a \
remote NFS server, in which case all NFS requests by "root" are remapped on the \
server to the "nfsnobody" which would typically prevent root from creating files in \
the home directory.

The cause seems to be in file modules/ECMInstallIcons.cmake:

        file(WRITE \"${installdir}/${theme}/temp.txt\" \"update\")
        file(REMOVE \"${installdir}/${theme}/temp.txt\")

because the standard value or ${installdir} is the relative path "share/icons"


Diffs
-----

  modules/ECMInstallIcons.cmake 3923636 

Diff: https://git.reviewboard.kde.org/r/127445/diff/


Testing
-------


Thanks,

Maurizio Paolini


--===============3953470750183263613==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127445/">https://git.reviewboard.kde.org/r/127445/</a>
  </td>
    </tr>
   </table>
   <br />



<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as \
submitted.</h1>  </td>
 </tr>
</table>
<br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Extra Cmake Modules.</div>
<div>By Maurizio Paolini.</div>


<p style="color: grey;"><i>Updated March 21, 2016, 9:41 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=360734">360734</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
extra-cmake-modules
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Avoid creation of a "share" directory owned by root in \
the source location.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">At "make install" stage, project icons \
are installed in their correct place.  However a new folder is created (owned by \
root, typically) in the current directory, typically in the home directory.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">This is often inconvenient, since the user is then unable to remove such \
directory without root priviledges, and could also lead to an error at "make install" \
stage. One example of this is when the home directory of the user is an NFS mount \
from a remote NFS server, in which case all NFS requests by "root" are remapped on \
the server to the "nfsnobody" which would typically prevent root from creating files \
in the home directory.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">The cause seems to be in file \
modules/ECMInstallIcons.cmake:</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" \
style="background: #f8f8f8"><pre style="line-height: 125%">    file(WRITE \
\&quot;<span style="color: #BC7A00">${</span>installdir<span style="color: \
#BC7A00">}</span>/<span style="color: #BC7A00">${</span>theme<span style="color: \
#BC7A00">}</span>/temp.txt\&quot; \&quot;update\&quot;)  file(REMOVE \&quot;<span \
style="color: #BC7A00">${</span>installdir<span style="color: #BC7A00">}</span>/<span \
style="color: #BC7A00">${</span>theme<span style="color: \
#BC7A00">}</span>/temp.txt\&quot;) </pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">because the standard value or ${installdir} is the \
relative path "share/icons"</p></pre>  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>modules/ECMInstallIcons.cmake <span style="color: grey">(3923636)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127445/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>


--===============3953470750183263613==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic