Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902751 - app-metrics/prometheus-2.43.0-r2: fails in prepare phase (with sys-apps/coreutils-9.2?)
Summary: app-metrics/prometheus-2.43.0-r2: fails in prepare phase (with sys-apps/coreu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-22 17:58 UTC by Toralf Förster
Modified: 2023-03-27 22:01 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.93 KB, text/plain)
2023-03-22 17:58 UTC, Toralf Förster
Details
app-metrics:prometheus-2.41.0:20230321-222329.log (app-metrics:prometheus-2.41.0:20230321-222329.log,1.75 KB, text/plain)
2023-03-22 17:58 UTC, Toralf Förster
Details
emerge-history.txt.bz2 (emerge-history.txt.bz2,72.28 KB, application/x-bzip)
2023-03-22 17:58 UTC, Toralf Förster
Details
environment (environment,74.09 KB, text/plain)
2023-03-22 17:58 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,714 bytes, application/x-bzip)
2023-03-22 17:58 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,21.46 KB, application/x-bzip)
2023-03-22 17:58 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,10.90 KB, application/x-bzip)
2023-03-22 17:58 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,18.81 KB, application/x-bzip)
2023-03-22 17:58 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-03-22 17:58:20 UTC
>>> Unpacking prometheus-2.41.0-deps.tar.xz to /var/tmp/portage/app-metrics/prometheus-2.41.0/work
>>> Unpacking prometheus-2.41.0-assets.tar.xz to /var/tmp/portage/app-metrics/prometheus-2.41.0/work
go mod verify
all modules verified
>>> Source unpacked in /var/tmp/portage/app-metrics/prometheus-2.41.0/work
>>> Preparing source in /var/tmp/portage/app-metrics/prometheus-2.41.0/work/prometheus-2.41.0 ...
 * ERROR: app-metrics/prometheus-2.41.0::gentoo failed (prepare phase):
 *   (no error message)
 * 

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib-j5-20230316-050014

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 16.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.0
Python 3.10.10
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.68.0
  [2]   rust-1.68.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.18_p10 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.6_p10 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.362_p09 [openjdk-bin-8]
4)	Eclipse Temurin JRE 17.0.6_p10 [openjdk-jre-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17  system-vm
  [4]   openjdk-jre-bin-17 

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):

  HEAD of ::gentoo
commit ce4aef0ec6972b2be67c49c8bdb1e28295c54ee5
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Mar 21 21:17:00 2023 +0000

    2023-03-21 21:17:00 UTC

emerge -qpvO app-metrics/prometheus
[ebuild  N    ] app-metrics/prometheus-2.41.0
Comment 1 Toralf Förster gentoo-dev 2023-03-22 17:58:21 UTC
Created attachment 858597 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-03-22 17:58:22 UTC
Created attachment 858599 [details]
app-metrics:prometheus-2.41.0:20230321-222329.log
Comment 3 Toralf Förster gentoo-dev 2023-03-22 17:58:24 UTC
Created attachment 858601 [details]
emerge-history.txt.bz2
Comment 4 Toralf Förster gentoo-dev 2023-03-22 17:58:25 UTC
Created attachment 858603 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-03-22 17:58:26 UTC
Created attachment 858605 [details]
etc.clang.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-03-22 17:58:28 UTC
Created attachment 858607 [details]
etc.portage.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2023-03-22 17:58:29 UTC
Created attachment 858609 [details]
logs.tar.bz2
Comment 8 Toralf Förster gentoo-dev 2023-03-22 17:58:29 UTC
Created attachment 858611 [details]
temp.tar.bz2
Comment 9 Toralf Förster gentoo-dev 2023-03-25 20:29:45 UTC
still a problem for 2.43
Comment 10 Jan Breig 2023-03-26 21:31:06 UTC
I can confirm for 2.43.0.

The command that fails is
cp -a -n "${WORKDIR}"/web/ui web || die

That's because some files that should be copied from "${WORKDIR}"/web/ui already exist in /var/tmp/portage/app-metrics/prometheus-2.43.0/work/prometheus-2.43.0/web/ui

Some examples are
- build_ui.sh
- ui.go
- react-app/public/manifest.json
- react-app/public/favicon.ico
- ...
Comment 11 Agostino Sarubbo gentoo-dev 2023-03-27 06:46:23 UTC
ci has reproduced this issue with version 2.43.0-r2 - Updating summary.
Comment 12 Gabriel Linder 2023-03-27 09:16:46 UTC
All ebuilds (even stables one) fails with sys-apps/coreutils>= 9.2

I downgraded to sys-apps/coreutils-9.1-r2, and can now build prometheus-2.43.0-r2.ebuild without problem.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-27 14:15:05 UTC
(In reply to Gabriel Linder from comment #12)
> All ebuilds (even stables one) fails with sys-apps/coreutils>= 9.2
> 
> I downgraded to sys-apps/coreutils-9.1-r2, and can now build
> prometheus-2.43.0-r2.ebuild without problem.

Gabriel, could you apply https://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=093a8b4bfaba60005f14493ce7ef11ed665a0176 to coreutils and let me know if it helps?
Comment 14 Gabriel Linder 2023-03-27 14:26:45 UTC
(In reply to Sam James from comment #13)
> (In reply to Gabriel Linder from comment #12)
> > All ebuilds (even stables one) fails with sys-apps/coreutils>= 9.2
> > 
> > I downgraded to sys-apps/coreutils-9.1-r2, and can now build
> > prometheus-2.43.0-r2.ebuild without problem.
> 
> Gabriel, could you apply
> https://git.savannah.gnu.org/cgit/coreutils.git/patch/
> ?id=093a8b4bfaba60005f14493ce7ef11ed665a0176 to coreutils and let me know if
> it helps?

I did (I had to strip the NEWS patch and keep only the src/copy.c part) but `ebuild prometheus-2.43.0-r2.ebuild clean install` failed as previously (tried with sys-apps/coreutils-9.2-r1).
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-27 14:35:57 UTC
9.2 release notes say:
   'cp -n' and 'mv -n' now exit with nonzero status if they skip their
   action because the destination exists, and likewise for 'cp -i',
   'ln -i', and 'mv -i' when the user declines.  (POSIX specifies this
   for 'cp -i' and 'mv -i'.)

I suspect the ebuild should be using -u.
Comment 16 Gabriel Linder 2023-03-27 14:45:11 UTC
(In reply to Sam James from comment #15)
> 9.2 release notes say:
>    'cp -n' and 'mv -n' now exit with nonzero status if they skip their
>    action because the destination exists, and likewise for 'cp -i',
>    'ln -i', and 'mv -i' when the user declines.  (POSIX specifies this
>    for 'cp -i' and 'mv -i'.)
> 
> I suspect the ebuild should be using -u.

Indeed, this works :

-    cp -a -n "${WORKDIR}"/web/ui web || die
+    cp -a -u "${WORKDIR}"/web/ui web || die
Comment 17 Larry the Git Cow gentoo-dev 2023-03-27 22:01:50 UTC
The bug has been closed via the following commit(s):

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

commit 9d5ea8a4db03baefcbd382952f42cc8cbe382809
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2023-03-27 22:00:44 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2023-03-27 22:00:44 +0000

    app-metrics/prometheus:  fix cp in prepare phase
    
    The cp call needs to use -u instead of -n to work with >=coreutils-9.2.
    
    Closes: https://bugs.gentoo.org/902751
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 app-metrics/prometheus/prometheus-2.43.0-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)