Bug 1691825 - dash not switched to UsrMove in F29/F30 leads to broken RPM Requires due to rpmbuild shebang mangling
Summary: dash not switched to UsrMove in F29/F30 leads to broken RPM Requires due to r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dash
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Huzaifa S. Sidhpurwala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-22 15:30 UTC by Japheth Cleaver
Modified: 2020-05-28 01:59 UTC (History)
6 users (show)

Fixed In Version: dash-0.5.10.2-6.fc32 dash-0.5.10.2-5.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-21 02:52:11 UTC
Type: Bug


Attachments (Terms of Use)

Description Japheth Cleaver 2019-03-22 15:30:50 UTC
Description of problem: 
Other shells in Fedora have moved their canonical location to /usr/bin/ to reflect UsrMove, but dash is still at /bin/dash. This causes problems in Fedora 29 because brp-mangle-shebangs now hits "#!/bin/dash" when building RPMs with shebang dependencies, converting it to #!/usr/bin/dash, which DNF can't find. BZ #1541318


Version-Release number of selected component (if applicable):
dash-0.5.10.2-1.fc29

How reproducible:
Always

Steps to Reproduce:
See: https://bugzilla.redhat.com/show_bug.cgi?id=1541318#c51

1. Build RPM with a source script using /bin/dash
2. brp-mangle-shebangs mangles shebang in /usr/bin/testdash.sh from /bin/dash to #!/usr/bin/dash
3. Attempt to dnf localinstall the RPM

Actual results:
Error: 
 Problem: conflicting requests
  - nothing provides /usr/bin/dash needed by testdash-1-1.fc29.x86_64

Expected results:
Smooth install


Additional info:
Most altshells in RHEL7 are still in /bin/, so this might only be a Fedora 29+ thing in practice. Have not checked RHEL8.

Scriptlet for /etc/shells adjustment will probably need to have both locations.

Comment 1 Japheth Cleaver 2019-03-22 17:16:56 UTC
To clarify: The change to brp-mangle-shebangs was made in Fedora 29; Fedora 28 is not affected.

Comment 2 Japheth Cleaver 2019-04-30 21:03:54 UTC
This is still present in Fedora 30. I'm setting this to rawhide since I presume it must be fixed there and then applied to the supported distros.

The only workaround is to %define __brp_mangle_shebangs %{nil}, which is not ideal.

Comment 3 Japheth Cleaver 2019-07-09 03:48:14 UTC
Bumping. Can this please be fixed prior to the F31 branch at least?

Comment 4 Miro Hrončok 2019-07-09 08:24:13 UTC
Huzaifa, are you responsive?

Comment 5 Huzaifa S. Sidhpurwala 2019-07-09 09:38:10 UTC
(In reply to Miro Hrončok from comment #4)
> Huzaifa, are you responsive?

Yes, let me see what i can do.

Comment 6 Fedora Update System 2019-07-10 15:38:22 UTC
FEDORA-2019-c05e4425d1 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c05e4425d1

Comment 7 Fedora Update System 2019-07-11 00:50:43 UTC
dash-0.5.10.2-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c05e4425d1

Comment 8 Ben Cotton 2019-08-13 17:12:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 9 Ben Cotton 2019-08-13 19:03:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 10 Japheth Cleaver 2019-08-19 22:22:07 UTC
One issue I've noted is that any packages that previously had depended on "/bin/dash" as a requirement now fail.

An F30 RPM built for the previous package release of "dash" without the rewrite ends up with "/bin/dash" as a dependency. The new dash RPM doesn't provide this, so installing my previous package keeps forcing DNF to downgrade the fedora-testing 'dash' package back to the one in the production repo.

I suppose this is yet another impossible-to-avoid annoyance of UsrMove to begin with, but if there were any way to cope with this by now in RPM that would be helpful here so that this doesn't have to be timed with dependent packages being rebuilt.

Comment 11 Miro Hrončok 2019-08-19 22:32:38 UTC
Add this to dash:

Provides:   /bin/dash

Comment 12 Japheth Cleaver 2019-09-03 01:14:07 UTC
Can this be added in prior to release of this update?

Comment 13 Miro Hrončok 2019-09-03 07:30:49 UTC
yes

Comment 14 Japheth Cleaver 2019-09-13 18:41:03 UTC
Not to prod, but now that we're in F31 Beta can this be added in? This affects upgrades from F29 and F30 for anything previously dependent on the unmangled path through the workaround above.

F29:  Problem 2: package xymon-client-4.3.30-1.fc29.x86_64 requires /bin/dash, but none of the providers can be installed
  - dash-0.5.10.2-1.fc29.x86_64 does not belong to a distupgrade repository

F30:  Problem: package xymon-client-4.4-0.0.0.fc30.x86_64 requires /bin/dash, but none of the providers can be installed
  - dash-0.5.10.2-2.fc30.x86_64 does not belong to a distupgrade repository

Comment 15 Japheth Cleaver 2019-10-22 12:38:08 UTC
(In reply to Miro Hrončok from comment #11)
> Add this to dash:
> 
> Provides:   /bin/dash

Any update? Would still like this to be corrected back to F29 before it goes EOL.

Comment 16 Japheth Cleaver 2020-01-20 22:27:41 UTC
This problem still exists.

Error: 
 Problem: conflicting requests
  - nothing provides /bin/dash needed by xxxxx.fc31.x86_64

Comment 17 Kamil Páral 2020-05-11 07:11:50 UTC
Huzaifa, can you please respond to comments both here and in the Bodhi bug? Thank you.

Comment 18 Fedora Update System 2020-05-12 06:04:49 UTC
FEDORA-2020-f57290bd78 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f57290bd78

Comment 19 Fedora Update System 2020-05-12 06:04:51 UTC
FEDORA-2020-e13b2bb631 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e13b2bb631

Comment 20 Fedora Update System 2020-05-12 06:04:51 UTC
FEDORA-2020-f13a2ad8be has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-f13a2ad8be

Comment 21 Huzaifa S. Sidhpurwala 2020-05-12 06:05:20 UTC
Let me know if these work for you!

Comment 22 Fedora Update System 2020-05-13 03:55:32 UTC
FEDORA-2020-f13a2ad8be has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f13a2ad8be`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f13a2ad8be

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2020-05-13 05:20:21 UTC
FEDORA-2020-f57290bd78 has been pushed to the Fedora 30 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-f57290bd78`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-f57290bd78

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2020-05-13 05:51:38 UTC
FEDORA-2020-e13b2bb631 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e13b2bb631`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e13b2bb631

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2020-05-21 02:52:11 UTC
FEDORA-2020-f13a2ad8be has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2020-05-28 01:59:28 UTC
FEDORA-2020-e13b2bb631 has been pushed to the Fedora 31 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.