Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 790305 - app-eselect/eselect-rust: use relative symlinks
Summary: app-eselect/eselect-rust: use relative symlinks
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-05-15 02:19 UTC by David Michael
Modified: 2021-07-03 07:59 UTC (History)
3 users (show)

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


Attachments
fix.patch (0001-Stop-using-absolute-symlinks.patch,1.97 KB, patch)
2021-05-15 02:19 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2021-05-15 02:19:43 UTC
Created attachment 708648 [details, diff]
fix.patch

The Rust eselect module should be using relative symlinks like everything else.  It breaks paths when link targets contain $EROOT.

I think this patch should be applied to the upstream repo, then it needs to be tagged, then the ebuild can be updated to that version.  (The metadata also has an invalid upstream reference.)  I can just add this patch to the current ebuild version if that's preferred.
Comment 1 Larry the Git Cow gentoo-dev 2021-07-03 07:49:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/eselect-rust.git/commit/?id=7ac58a21d2fd6e66852c7ae2e6c09f3b836b73a1

commit 7ac58a21d2fd6e66852c7ae2e6c09f3b836b73a1
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2021-05-14 14:16:57 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-07-03 07:48:56 +0000

    Stop using absolute symlinks
    
    Prefixing everything with ${EROOT} produces invalid paths on the
    target system.  All of the symlinks point to files in the same
    directory, so there is no reason to specify directories at all.
    
    Bug: https://bugs.gentoo.org/790305
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 README.md       | 4 ----
 rust.eselect.in | 8 ++++----
 2 files changed, 4 insertions(+), 8 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2021-07-03 07:55:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4670cf696811fc39fdefe224901d06bc04e874d

commit c4670cf696811fc39fdefe224901d06bc04e874d
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-07-03 07:52:57 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-07-03 07:55:35 +0000

    app-eselect/eselect-rust: add 20210703, unkeyworded for testing
    
    Bug: https://bugs.gentoo.org/790305
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 app-eselect/eselect-rust/Manifest                  |  1 +
 .../eselect-rust/eselect-rust-20210703.ebuild      | 33 ++++++++++++++++++++++
 app-eselect/eselect-rust/metadata.xml              |  3 --
 3 files changed, 34 insertions(+), 3 deletions(-)
Comment 3 Georgy Yakovlev archtester gentoo-dev 2021-07-03 07:59:17 UTC
thanks, added in unkeyworded state.

I really want to get rid of ugly symlinks  /usr/lib/rust

used to be

drwxr-xr-x  6 root root  6 Jun 18 02:10 1.53.0                                                                                                                                                                                                                
lrwxrwxrwx  1 root root 24 Jul  3 00:42 lib -> /usr/lib/rust/lib-1.53.0                                                                                                                                                                                       
lrwxrwxrwx  1 root root 10 Jun 18 13:29 lib-1.53.0 -> 1.53.0/lib                                                                                                                                                                                              
lrwxrwxrwx  1 root root 28 Jul  3 00:42 libexec -> /usr/lib/rust/libexec-1.53.0                                                                                                                                                                               
lrwxrwxrwx  1 root root 14 Jun 18 13:29 libexec-1.53.0 -> 1.53.0/libexec                                                                                                                                                                                      
lrwxrwxrwx  1 root root 24 Jul  3 00:42 man -> /usr/lib/rust/man-1.53.0                                                                                                                                                                                       
lrwxrwxrwx  1 root root 16 Jun 18 13:29 man-1.53.0 -> 1.53.0/share/man  


with your patch

rwxr-xr-x 6 root root  6 Jun 18 02:10 1.53.0
lrwxrwxrwx 1 root root 10 Jul  3 00:44 lib -> lib-1.53.0
lrwxrwxrwx 1 root root 10 Jun 18 13:29 lib-1.53.0 -> 1.53.0/lib
lrwxrwxrwx 1 root root 14 Jul  3 00:44 libexec -> libexec-1.53.0
lrwxrwxrwx 1 root root 14 Jun 18 13:29 libexec-1.53.0 -> 1.53.0/libexec
lrwxrwxrwx 1 root root 10 Jul  3 00:44 man -> man-1.53.0
lrwxrwxrwx 1 root root 16 Jun 18 13:29 man-1.53.0 -> 1.53.0/share/ma

should be just lib libexec and man ideally. but it may need more changes.
I'll test a bit, and restore keywords.