Bug 2343113 - which breakage in Rawhide
Summary: which breakage in Rawhide
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: which
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Than Ngo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-01-30 23:31 UTC by Jerry James
Modified: 2025-02-01 23:16 UTC (History)
1 user (show)

Fixed In Version: which-2.22-2.fc42
Clone Of:
Environment:
Last Closed: 2025-02-01 23:16:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jerry James 2025-01-30 23:31:17 UTC
Koschei reports that several packages I maintain have started failing to build in the last few days.  Each of these packages invokes which at some point during the build.  The latest version of which behaves oddly.  For example, the 4ti2 package has a subdirectory named doc.  During the build, the current directory is changed to doc, and the command `../src/zsolve/hilbert --help` is invoked to get the help text for the hilbert command.

The hilbert command is a script that starts with:

SCRIPT=`which "$0"`
SCRIPTDIR=`dirname "$SCRIPT"`

With which 2.21, the values were:

SCRIPT=/builddir/build/BUILD/4ti2-1.6.10-build/4ti2-1.6.10/doc/../src/zsolve/hilbert
SCRIPTDIR=/builddir/build/BUILD/4ti2-1.6.10-build/4ti2-1.6.10/doc/../src/zsolve

With which 2.22, they are instead:

SCRIPT=/builddir/build/BUILD/4ti2-1.6.10-build/4ti2-1.6.10/docsrc/zsolve/hilbert
SCRIPTDIR=/builddir/build/BUILD/4ti2-1.6.10-build/4ti2-1.6.10/docsrc/zsolve

That SCRIPTDIR doesn't exist, causing the build to fail.  What happened to the "/../" between "doc" and "src"?

Reproducible: Always

Steps to Reproduce:
1. fedpkg clone 4ti2
2. cd 4ti2
3. fedpkg srpm
4. mock -r fedora-rawhide-x86_64 --rebuild 4ti2-1.6.10-15.fc42.src.rpm
Actual Results:  
The build fails due to the which command returning a bogus value.

Expected Results:  
The which command should continue to return correct values, as it did in prior versions.

Comment 1 Than Ngo 2025-02-01 21:42:05 UTC
I can reproduce your reported issue. Thanks for your report

Comment 2 Fedora Update System 2025-02-01 21:44:32 UTC
FEDORA-2025-6cb996b82c (which-2.22-2.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-6cb996b82c

Comment 3 Fedora Update System 2025-02-01 23:16:52 UTC
FEDORA-2025-6cb996b82c (which-2.22-2.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.