Current shebang mangling changed: /bin/env python3 to: #!/bin/python3 While /bin/python3 (without /usr) does exist as a command, it is not *provided* by the python3 RPM, which only provides /usr/bin/python3. So, rpmbuild uses the shebang to auto-generate a dependency that can't be satisfied. The mangling should probably prepend /usr in this case. See log: https://copr-be.cloud.fedoraproject.org/results/abbra/cockpit-apps/fedora-28-x86_64/00758206-cockpit-app-samba/build.log.gz
The log is gone, so just to preserve it: + /usr/lib/rpm/redhat/brp-mangle-shebangs '' '' mangling shebang in /usr/libexec/cockpit-app-samba-ad-check-install from /bin/env python3 to #!/bin/python3
https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/29
I'd rather not touch this in F28, but please reopen if you need it.
Guys, you can't just go mangling ALL /bin paths to /usr/bin because some things, notably /bin/sh is, well, special.
This change broke our tests. In our test we are creating dummy rpm with file which has shebang: #!/bin/sh echo "TEST" The script is now changed after rpmbuild to this: #!/usr/bin/sh echo "TEST" Could you please look on this and fix this issue?
Hmm okay bash has actually been usrmove-converted with /bin/sh being just a provide. Still, it's quite a sledgehammer and a source of incompatibilities across distros. Certainly not F28 material.
> The script is now changed after rpmbuild to this... Could you please describe how is this a problem exactly?
We are doing rpm extraction to get kernel modules for the driver disk feature. This is a test to check if the extraction works correctly. I can change those tests but this is more question if it should behave this way. It is a regression from F28. In short if RPM team will agree that this behavior is correct than we can close this and I'll change our test. If not please make this correct.
Please tell me exactly how the changed shebang breaks your tests to help me understand what's wrong.
We are testing that the content of the file won't change by the extraction process. It is not hard to change the test to work correctly. Those tests are just the example. The point is if the /bin/* shebang should automatically change everywhere. I understand why it is useful for '/bin/env python' but I'm not that sure this should works for everything in '/bin'. Even from bug name this looks like a not planned side effect.
So you take a file, put it in rpm by building it, extract the rpm and compare the contents? Any buildroot policy could change that and relying on the fact that is unchanged is not very bulletproof. Sorry but I think your test is too naive. > The point is if the /bin/* shebang should automatically change everywhere. They should, unless we find a case where it is broken. We should fix that case in there. /bin hasn't been a thing for years. > Even from bug name this looks like a not planned side effect. The side effect was discussed in https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/29 I suggest you go trough the discussion in there and please let me know where we are breaking normal things (other than your naive test, sorry).
In that case I will change our tests. Thanks for looking into that.
Panu, give me some example of what's wrong so we can fix it. Yes, this is a sledgehammer. No, I don't agree that we "can't just go mangling ALL /bin paths to /usr/bin because some things are special". The special things need to be fixed. But we found none.
Perhaps I'm just surprised to see such a massive distro-wide change go in as a kind of side-effect of something much smaller, without going through the change process, and without wider discussion. OTOH I was on vacation at the time this went in so I might've missed something. Shrug.
I'll go with change propsal next time every time we change this buidroot policy script.