Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699470 - sci-mathematics/rstudio: dosym with paths starting with ${ROOT} or ${EROOT} or ${ED}
Summary: sci-mathematics/rstudio: dosym with paths starting with ${ROOT} or ${EROOT} o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Mark Wright
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-06 19:57 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2020-01-06 08:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2019-11-06 19:57:04 UTC
sci-mathematics/rstudio calls dosym with paths starting with ${ROOT} or ${EROOT} which is incorrect.
Using ${ROOT} or ${EROOT} (in any way in src_* phases) results in broken binary packages when different values of ${ROOT} are used.
dosym internally prepends ${ED%/} to second path (symbolic link itself) when calling ln.


sci-mathematics/rstudio is the only package which prepends first path (target of symbolic link) with ${ROOT} or ${EROOT}:

$ grep -E "dosym \"?\\\${?E?ROOT" */*/*.ebuild
sci-mathematics/rstudio/rstudio-1.1.383-r1.ebuild:      dosym "${ROOT}etc/conf.d/rstudio-server.conf" "${ROOT}etc/rstudio/rserver.conf"
sci-mathematics/rstudio/rstudio-1.1.453.ebuild: dosym "${ROOT}etc/conf.d/rstudio-server.conf" "${ROOT}etc/rstudio/rserver.conf"
sci-mathematics/rstudio/rstudio-1.1.463-r1.ebuild:      dosym "${EROOT}/etc/conf.d/rstudio-server.conf" "/etc/rstudio/rserver.conf"
sci-mathematics/rstudio/rstudio-1.1.463.ebuild: dosym "${ROOT}etc/conf.d/rstudio-server.conf" "${ROOT}etc/rstudio/rserver.conf"


The following command would create a correct, relative symbolic link:

dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-11-07 01:34:29 UTC
sci-mathematics/rstudio/rstudio-1.2.1335.ebuild:  dosym "${ED}/etc/conf.d/rstudio-server.conf" "/etc/rstudio/rserver.conf"


Problems with above dosym command:

1. Initial ${D} or ${ED} is unnecessary in first argument (target of symbolic link), and PMS-compliant package managers will issue QA notice.
   PMS (https://projects.gentoo.org/pms/7/pms.html#x1-14800013.4.1):
   """
   13.4.1 Rewriting

   Any absolute symlink whose link starts with D must be rewritten with
   the leading D removed. The package manager should issue a notice when doing this. 
   """

2. Target of symbolic link could be made relative, instead of absolute.


Solution:

dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
Comment 2 Mark Wright gentoo-dev 2020-01-06 08:58:25 UTC
Thanks for reporting and for the fix.  It was fixed by soap (thanks) in this commit:

commit 67ed6069f634a03a21ce4c6f82b75827318756a5
Author: David Seifert <soap@gentoo.org>
Date:   Sat Dec 7 22:54:58 2019 +0100

    sci-mathematics/rstudio: [QA] Fix AbsoluteSymlink
    
    Package-Manager: Portage-2.3.81, Repoman-2.3.20
    Signed-off-by: David Seifert <soap@gentoo.org>

diff --git a/sci-mathematics/rstudio/rstudio-1.1.463-r1.ebuild b/sci-mathematics/rstudio/rstudio-1.1.463-r1.ebuild
index c26f7f5c3001..09f22605f334 100644
--- a/sci-mathematics/rstudio/rstudio-1.1.463-r1.ebuild
+++ b/sci-mathematics/rstudio/rstudio-1.1.463-r1.ebuild
@@ -225,7 +225,7 @@ src_install() {
        dodir /etc/rstudio
        insinto /etc/rstudio
        doins "${FILESDIR}"/rsession.conf
-       dosym "${EROOT}/etc/conf.d/rstudio-server.conf" "/etc/rstudio/rserver.conf"
+       dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
        if use dedicated || use server; then
                dopamd src/cpp/server/extras/pam/rstudio
                newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
diff --git a/sci-mathematics/rstudio/rstudio-1.2.1335.ebuild b/sci-mathematics/rstudio/rstudio-1.2.1335.ebuild
index 2e857a99a3a5..9d0dfd64d7d1 100644
--- a/sci-mathematics/rstudio/rstudio-1.2.1335.ebuild
+++ b/sci-mathematics/rstudio/rstudio-1.2.1335.ebuild
@@ -223,7 +223,7 @@ src_install() {
        dodir /etc/rstudio
        insinto /etc/rstudio
        doins "${FILESDIR}"/rsession.conf
-       dosym "${ED}/etc/conf.d/rstudio-server.conf" "/etc/rstudio/rserver.conf"
+       dosym ../conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
        if use dedicated || use server; then
                dopamd src/cpp/server/extras/pam/rstudio
                newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server