Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 799758 - app-eselect/eselect-fontconfig: stop using absolute symlinks
Summary: app-eselect/eselect-fontconfig: stop using absolute symlinks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-07-01 19:42 UTC by David Michael
Modified: 2022-04-04 17:07 UTC (History)
1 user (show)

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


Attachments
fontconfig.eselect (fontconfig.eselect,3.73 KB, text/plain)
2021-07-01 19:42 UTC, David Michael
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2021-07-01 19:42:33 UTC
Created attachment 720846 [details]
fontconfig.eselect

This eselect module writes its links with absolute paths which include ${EROOT} prefixes.  This results in broken links when using the file system mounted at ${ROOT} natively.

I don't know where this module is hosted, so I'll just attach an entire updated file.  The main fix is using the --relative argument to ln, which has been available for about a decade in coreutils.  If that's not portable enough, I'd recommend dropping the ES_FONTCONFIG_DIRS variable so paths are predictable.  It doesn't appear to be documented anywhere anyway.

The file also updates syntax a bit to simplify it and adhere to modern Gentoo style conventions.  I dropped its behavior of overriding system files if a file with the same name is in the current working directory, since it seems dangerous.  That behavior could still be used by prefixing files with the "./" path (but I'd prefer to drop support for specifying directories as well so it only accepts the file names/indices as they are printed).
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-02 02:53:16 UTC
Can you add your signed-off-by in a comment so I can add this? I've just created a git repo for it too.
Comment 2 David Michael 2022-04-02 13:16:09 UTC
Signed-off-by: David Michael <fedora.dm0@gmail.com>
Comment 3 Larry the Git Cow gentoo-dev 2022-04-03 00:28:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/eselect-fontconfig.git/commit/?id=f57b6d44c764b18c1bf9c8ceb0574aa7103f760d

commit f57b6d44c764b18c1bf9c8ceb0574aa7103f760d
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2021-07-01 19:42:33 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-03 00:27:54 +0000

    Use relative symlinks
    
    This eselect module writes its links with absolute paths which include ${EROOT}
    prefixes. This results in broken links when using the file system
    mounted at ${ROOT} natively.
    
    The main fix is using the --relative argument to ln, which has been available
    for about a decade in coreutils.
    
    (If that's not portable enough, I'd recommend dropping the
    ES_FONTCONFIG_DIRS variable so paths are predictable.
    It doesn't appear to be documented anywhere anyway.)
    
    The file also updates syntax a bit to simplify it and adhere to modern
    Gentoo style conventions. I dropped its behavior of overriding system
    files if a file with the same name is in the current working directory,
    since it seems dangerous. That behavior could still be used by prefixing
    files with the "./" path (but I'd prefer to drop support for specifying
    directories as well so it only accepts the file names/indices as they are
    printed).
    
    [sam: reformatted/gitified git message from Bugzilla comment]
    
    Closes: https://bugs.gentoo.org/799758
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 fontconfig.eselect | 106 ++++++++++++++++++++---------------------------------
 1 file changed, 40 insertions(+), 66 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2022-04-03 00:31:16 UTC
The bug has been closed via the following commit(s):

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

commit 6a055eb96660122f43c15c32463d2aedd7580234
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-04-03 00:30:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-04-03 00:30:58 +0000

    app-eselect/eselect-fontconfig: add 20220403
    
    Closes: https://bugs.gentoo.org/799758
    Thanks-to: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-eselect/eselect-fontconfig/Manifest             |  1 +
 .../eselect-fontconfig-20220403.ebuild              | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)