madonuko created an issue (rpm-software-management/rpm#3691)
**Describe the bug**
`glibc` is not present during `%pre` (which requires bash). This causes `error:
failed to exec scriptlet interpreter /bin/sh: No such file or directory`.
While you may wonder in what case does `glibc` not exist: we (Ultramarine
Linux) build our images from scratch with
[dnf4](https://github.com/Ultramarine-Linux/images/actions/runs/14074642779/job/39415343794#step:6:5446)
and
[dnf5](https://github.com/Ultramarine-Linux/images/actions/runs/14074642779/job/39415343869#step:6:4280),
both fails to install `glibc` before `crypto-policies` and `dbus-common`.
Fortunately libsolv is deterministic given the same packages, so this issue
wasn't discovered in upstream Fedora and other distributions simply due to pure
luck ;)
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2354992
> I don't know what %prein is.
### ME TOO
> Nothing about the report makes any sense to me.
### I KNOW I'M SORRY?
Jokes asideā¦
**To Reproduce**
Steps to reproduce the behavior:
1. Download glibc-common [from
here](https://koji.fedoraproject.org/koji/buildinfo?buildID=2663025)
2. `rpmrebuild -enp glibc-common-2.41-1.fc42.x86_64.rpm` then add something
like `Requires(pre): crypto-policies`
3. `sudo dnf in -y --installroot=/newroot --use-host-config
./glibc-common-2.41-1.fc42.x86_64.rpm --nogpgcheck --releasever=42`
4. Alternatively `sudo dnf4 in -y --installroot=/newroot
./glibc-common-2.41-1.fc42.x86_64.rpm --nogpgcheck --releasever=42`
Please link or attach the packages or spec files involved.
-
https://src.fedoraproject.org/rpms/crypto-policies/blob/f42/f/crypto-policies.spec#_224
**Expected behavior**
The depsolver should install `glibc` before any package that requires the
scripts.
**Output**
```
[17/62] Installing glibc-minimal-langpack-0:2.41-1.fc42.x86_64
[18/62] Installing glibc-gconv-extra-0:2.41-1.fc42.x86_64
[19/62] Installing bash-0:5.2.37-1.fc42.x86_64
>>> Running pre-install scriptlet:
>>> crypto-policies-0:20250214-1.gitff7551b.fc42.noarch
>>>
>>>
>>> Error in pre-install scriptlet:
>>> crypto-policies-0:20250214-1.gitff7551b.fc42.noarch
>>>
>>>
>>> [RPM] %prein(crypto-policies-20250214-1.gitff7551b.fc42.noarch) scriptlet
>>> failed, exit status 127
>>>
>>>
>>> Running pre-install scriptlet: glibc-0:2.41-1.fc42.x86_64
>>>
>>>
>>>
>>> Finished pre-install scriptlet: glibc-0:2.41-1.fc42.x86_64
>>>
>>>
>>>
>>> [RPM] crypto-policies-20250214-1.gitff7551b.fc42.noarch: install failed
>>>
>>>
>>>
[20/62] Installing glibc-0:2.41-1.fc42.x86_64
[21/62] Installing glibc-common-0:2.41-1.fc42.x86_64
```
```
Installing : glibc-gconv-extra-2.41-1.fc42.x86_64
Running scriptlet: glibc-gconv-extra-2.41-1.fc42.x86_64
Installing : glibc-minimal-langpack-2.41-1.fc42.x86_64
Installing : bash-5.2.37-1.fc42.x86_64
Running scriptlet: bash-5.2.37-1.fc42.x86_64
Running scriptlet: crypto-policies-20250214-1.gitff7551b.fc42.noarch
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
error: %prein(crypto-policies-20250214-1.gitff7551b.fc42.noarch) scriptlet
failed, exit status 127
Error in PREIN scriptlet in rpm package crypto-policies
Running scriptlet: glibc-2.41-1.fc42.x86_64
error: crypto-policies-20250214-1.gitff7551b.fc42.noarch: install failed
Installing : glibc-2.41-1.fc42.x86_64
Running scriptlet: glibc-2.41-1.fc42.x86_64
Installing : glibc-common-2.41-1.fc42.x86_64
Running scriptlet: glibc-common-2.41-1.fc42.x86_64
```
**Environment**
- OS / Distribution: Fedora 42
- Version 4.20.1
**Possible solutions**
- Automatically add glibc as a dependency for packages with scriptlets (that
uses anything but <lua>) in `rpmbuild`?
- Install `glibc` with the highest possible priority in the depsolver?
- Find `/bin/sh` properly?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3691
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint