Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627824 - app-portage/elt-patches-20170815 stablereq (was: broken for EPREFIX installations)
Summary: app-portage/elt-patches-20170815 stablereq (was: broken for EPREFIX installat...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: ALLARCHES
: 628006 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-08-14 12:39 UTC by Jens Lindenmeier
Modified: 2017-11-04 18:35 UTC (History)
2 users (show)

See Also:
Package list:
app-portage/elt-patches-20170815
Runtime testing required: Yes
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Lindenmeier 2017-08-14 12:39:49 UTC
eltpatch script from the app-portage/elt-patches package is broken for EPREFIX installations.

Seems with the commit from 22nd April the new include was added:
https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=ec76f6e000bdfdc91f4b5da7fa05c57a39cc3f27

I do not know why I only run into it know, I am using and updating this EPREFIX install frequently?

in usr/lib/eltpatch, simply adding the ${EPREFIX} fixed for me the issue.
Not sure if this is the right exact right way though.

patch:
gentoo@destgd0d05678-tcsh(1:1032)$ diff -p  $EPREFIX/usr/bin/eltpatch $EPREFIX/usr/bin/eltpatch.orig
*** /tools/ocs/gentoo/usr/bin/eltpatch  Mon Aug 14 13:53:11 2017
--- /tools/ocs/gentoo/usr/bin/eltpatch.orig     Mon Aug 14 14:37:48 2017
***************
*** 2,8 ****
  # Copyright 1999-2017 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
! source "${EPREFIX}/lib/gentoo/functions.sh" || exit 1
  
  die() {
        eerror "${@}"
--- 2,8 ----
  # Copyright 1999-2017 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
! source "/lib/gentoo/functions.sh" || exit 1
  
  die() {
        eerror "${@}"
Comment 1 Jens Lindenmeier 2017-08-14 12:44:28 UTC
Forgot to mention:

This led to many errors when updating packages using elibtoolize:
For example:

>>> Messages generated by process 26480 on 2017-08-14 13:38:50 CEST for package sys-libs/gdbm-1.13:

ERROR: prepare
ERROR: sys-libs/gdbm-1.13::gentoo failed (prepare phase):
  eltpatch failed

Call stack:
    ebuild.sh, line  115:  Called src_prepare
  environment, line 2762:  Called elibtoolize
  environment, line  688:  Called die
The specific snippet of code:
      ELT_LOGDIR=${T} LD=$(tc-getLD) eltpatch "${@}" || die "eltpatch failed"

If you need support, post the output of `emerge --info '=sys-libs/gdbm-1.13::gentoo'`,
the complete build log and the output of `emerge -pqv '=sys-libs/gdbm-1.13::gentoo'`.
The complete build log is located at '/local/user_data/gentoo/var/tmp/portage/sys-libs/gdbm-1.13/temp/build.log'.
The ebuild environment file is located at '/local/user_data/gentoo/var/tmp/portage/sys-libs/gdbm-1.13/temp/environment'.
Working directory: '/local/user_data/gentoo/var/tmp/portage/sys-libs/gdbm-1.13/work/gdbm-1.13'
S: '/local/user_data/gentoo/var/tmp/portage/sys-libs/gdbm-1.13/work/gdbm-1.13'
Comment 2 Fabian Groffen gentoo-dev 2017-08-14 12:54:57 UTC
Is this RAP by chance?  In my case eltpatch isn't called, so the problem doesn't show.
Comment 3 Jens Lindenmeier 2017-08-14 15:24:14 UTC
Yes, this is a RAP prefix. I even now realized that bootstraping RAP does not work for me, since elibtoolize is used in many packages.

It fails for example app-arch/xz-utils-5.2.3.

I tried to manually patch the tmp/usr/bin/eltpatch script, but then it does not even find the tmp/lib/gentoo/functions.sh file, because it is not available.

Fabian, maybe you can confirm that RAP bootstraping is even affected? 

Example after I patched tmp/usr/bin/eltpatch as described above:
-----------------------------------------------------------------

>>> Preparing source in /tools/ocs.rhel3/gentoo32/tmp/var/tmp/portage/app-arch/xz-utils-5.2.3/work/xz-5.2.3 ...
/tools/ocs.rhel3/gentoo32/tmp/usr/bin/eltpatch: line 5: /tools/ocs.rhel3/gentoo32/tmp/lib/gentoo/functions.sh: No such file or directory
 * ERROR: app-arch/xz-utils-5.2.3::gentoo failed (prepare phase):
 *   eltpatch failed
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_prepare
 *   environment, line 2476:  Called elibtoolize
 *   environment, line  580:  Called die
 * The specific snippet of code:
 *       ELT_LOGDIR=${T} LD=$(tc-getLD) eltpatch "${@}" || die "eltpatch failed"
Comment 4 Benda Xu gentoo-dev 2017-08-15 01:39:56 UTC
Thanks for reporting.

The commit timestamp is misleading, it has not been added on April 22 but just recently about 4 days ago.

@mgorny, I am sorry to mention that this update of elt-patches breaks Prefix, in that the bin/eltpatch script cannot find functions.sh correctly.  Could you please refer to locale-gen of glibc or gcc-confg to add a similar housekeeping code?


EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
    EPREFIX=""
fi

FUNCTIONS_SH="/lib/gentoo/functions.sh"
source "${EPREFIX}"${FUNCTIONS_SH}
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-15 07:26:08 UTC
I'm sorry, I've included EPREFIX for datadir but failed to notice that /lib case.

commit 6e4e568125f19049cb4ec9b30710244616dde8ec
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Tue Aug 15 09:21:57 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Tue Aug 15 09:25:21 2017

    app-portage/elt-patches: Bump to fix Prefix, #627824
    
    Fix the Gentoo functions.sh file path to include EPREFIX.


Please note i've added it with ~arch keywords. I'd appreciate if you could upgrade and confirm that this fixes all the issues. I will stabilize it afterwards.
Comment 6 Guilherme Amadio gentoo-dev 2017-08-15 09:01:42 UTC
Thanks Michał, this fixed it. Feel free to stabilize wrt this bug.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-15 09:05:49 UTC
Arch teams, please test the new version and mark it stable. The only difference from the previous one is fixed functions.sh path for EPREFIX.

To test it, just install the new version and build any package calling elibtoolize.
Comment 8 Jens Lindenmeier 2017-08-16 11:56:15 UTC
I confirm that the problem is fixed, tested with:
app-portage/elt-patches-20170815:0

Now usr/bin/eltpatch has the include with the $EPREFIX replaced:
source "/tools/ocs/gentoo/lib/gentoo/functions.sh" || exit 1

I verified by re-emerging the media-libs/libwebp-0.6.0, works, failed before!
Thx for the fast fix!
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-08-16 13:53:27 UTC
*** Bug 628006 has been marked as a duplicate of this bug. ***
Comment 10 Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-17 20:19:45 UTC
ia64 stable
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-19 15:17:27 UTC
ppc/ppc64 stable
Comment 12 Matt Turner gentoo-dev 2017-08-25 22:35:25 UTC
alpha stable
Comment 13 Markus Meier gentoo-dev 2017-09-08 05:04:54 UTC
arm stable
Comment 14 Raymond Jennings 2017-10-22 06:05:01 UTC
https://github.com/gentoo/gentoo/pull/6009

I tested by emerging subversion-1.8.18 within an x86 chroot.
Comment 15 Raymond Jennings 2017-10-22 06:05:23 UTC
oh btw my PR is for stabilizing for x86
Comment 16 Thomas Deutschmann (RETIRED) gentoo-dev 2017-11-04 18:35:39 UTC
x86 stable (via user contribution).

All arches marked stable applying requested ALLARCHES policy, closing ...