Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518898 - sys-apps/util-linux: please review prefix changes
Summary: sys-apps/util-linux: please review prefix changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: Inclusion, PATCH
: 489730 (view as bug list)
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2014-08-03 01:34 UTC by Christoph Junghans (RETIRED)
Modified: 2015-05-11 07:23 UTC (History)
2 users (show)

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


Attachments
patch against gx86 version (util-linux-2.24.2.ebuild.patch,551 bytes, patch)
2014-08-03 01:34 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2014-08-03 01:34:20 UTC
Created attachment 382126 [details, diff]
patch against gx86 version

Changes:
- prefixed paths in enable-fs-paths-extra
- explicitly specify libdir

util-linux contain some auto-magic, which fails if --libdir is explicitly specified and does NOT start with /usr, '${prefix}' or '${exec_prefix}':
<https://github.com/karelzak/util-linux/pull/109>

libdir='${prefix}/'"$(get_libdir)" doesn't change anything from our defaults.
Comment 1 SpanKY gentoo-dev 2014-08-03 22:53:20 UTC
enable-fs-paths-extra is fine

i'm not groking why libdir is needed ... isn't this the same as the default ?
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2014-08-03 23:39:28 UTC
(In reply to SpanKY from comment #1)
> enable-fs-paths-extra is fine
> 
> i'm not groking why libdir is needed ... isn't this the same as the default ?
util-linux configure's contains:
AS_CASE([$libdir],
 ['${exec_prefix}/'* | '${prefix}/'* | /usr/*],
   [usrlib_execdir=$libdir],
 [usrlib_execdir='${exec_prefix}'$libdir]
)
AC_SUBST([usrlib_execdir])

It basically means that $libdir is consider as a sub-directory if is don't match  '${exec_prefix}/'* | '${prefix}/'* | /usr/*. So for normal installs (prefix=/usr/*) everything is fine, but for prefix one ends up with a double prefix. prefix=${EPREFIX}/usr && libdir= ${EPREFIX}/lib-> libdir=${EPREFIX}/usr/$libidr = ${EPREFIX}/usr/${EPREFIX}/lib

libdir='${prefix}/'"$(get_libdir)" works around that issue.
libdir=$(get_libdir) would work, too.
Comment 3 SpanKY gentoo-dev 2014-08-05 11:03:20 UTC
ok, should add a comment above the econf else it might get cleaned up

# We manually set --libdir to the default since on prefix, econf will set it to
# a value which the configure script does not recognize.  This makes it set the
# usrlib_execdir to a bad value.
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2014-08-05 14:29:05 UTC
+  05 Aug 2014; Christoph Junghans <ottxor@gentoo.org> util-linux-2.24.2.ebuild:
+  added prefix support (bug #518898)
+

BTW <https://github.com/karelzak/util-linux/pull/109> got merged, so we can drop the --libdir hack for >2.25 (noted in the comment!)
Comment 5 Benda Xu gentoo-dev 2015-05-11 07:23:16 UTC
*** Bug 489730 has been marked as a duplicate of this bug. ***