Bug 1841851
Summary: | error: lua script failed: [string "%prein(crypto-policies-20200527-3.gitb234a47.fc33.noarch)"]:19: attempt to call a nil value | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> |
Component: | crypto-policies | Assignee: | Red Hat Crypto Team <crypto-team> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | crypto-team, igor.raits, lef, nmavrogi, tmraz |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | crypto-policies-20200527-4.gitb234a47.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-05-29 17:14:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Miro Hrončok
2020-05-29 16:14:39 UTC
crypto-policies-20200527-3.gitb234a47.fc33 has been untagged. $ ilua Jupyter console 6.1.0 ILua 0.2.1 In [1]: policy = "DEFAULT" In [2]: posix.files("%{_datarootdir}/crypto-policies/"..policy) Out[2]: nil "%{_datarootdir}/crypto-policies/DEFAULT: No such file or directory" 2.0 The %{_datarootdir} macro is not expanded. Nor defined BTW: In [3]: posix.files(rpm.expand("%{_datarootdir}/crypto-policies/"..policy)) Out[3]: nil "%{_datarootdir}/crypto-policies/DEFAULT: No such file or directory" 2.0 In [4]: rpm.expand("%{_datarootdir}") Out[4]: "%{_datarootdir}" Scratch that, the macro is expanded during build. I think the problem simply is that /usr/share/crypto-policies/ is part of crypto-policies package and when the package is installed for the first time, the files are missing. The %pre script should only run on update and/or should do nothing if the files are not present yet. No, the script actually should just be moved to %post. Just a stupid mistake. There were a few more changes needed but now I tested installing it in mock chroot without crypto-policies already installed, so hopefully no more buildroot breakage. |