[blfs] branch trunk updated: ruby: prevent installing files owned by root in user home

"Git Owner" ([email protected] via blfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.book
Message-ID <177844928665.2189.3155205584611861801@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository blfs.

The following commit(s) were added to refs/heads/trunk by this push:
     new 63cfa1c7e1 ruby: prevent installing files owned by root in user home
63cfa1c7e1 is described below

commit 63cfa1c7e13fb1aa7f9759e62fc5539bd4df7400
Author: Pierre Labastie <[email protected]>
AuthorDate: Sun May 10 23:39:52 2026 +0200

    ruby: prevent installing files owned by root in user home
    
    Fixes #23276
---
 general/prog/ruby.xml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/general/prog/ruby.xml b/general/prog/ruby.xml
index bff3d65cef..bef23bfcce 100644
--- a/general/prog/ruby.xml
+++ b/general/prog/ruby.xml
@@ -135,7 +135,7 @@ make</userinput></screen>
       Now, as the <systemitem class="username">root</systemitem> user:
     </para>
 
-<screen role="root"><userinput>make install</userinput></screen>
+    <screen role="root"><userinput>XDG_DATA_HOME=/tmp make install</userinput></screen>
 
     <note>
       <para>
@@ -204,6 +204,16 @@ bundle update rake</userinput></screen>
       and installing C API documents.
     </para>
 
+    <para>
+      <command>XDG_DATA_HOME=/tmp ...</command>: If
+      <envar>XDG_DATA_HOME</envar> is not set, the installation process
+      creates the <filename class='directory'>$HOME/.local/share</filename>
+      directory if it does not exist. Depending on the way root privileges
+      have been acquired, this may create files owned by &root; in the user
+      home directory, or in <filename class='directory'>/root</filename>,
+      which is not desirable either.
+    </para>
+
   </sect2>
 
   <sect2 role="content">

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.