Bug 1973011
Summary: | akmods does not pass through environment variables set to /usr/bin/kernel-install | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | rmnscnce <rmnscnce> | ||||
Component: | akmods | Assignee: | Nicolas Chauvet (kwizart) <kwizart> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 34 | CC: | hdegoede, hobbes1069, kwizart, leigh123linux, negativo17, nicolas.vieville, rmnscnce, sergio | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-06-21 06:55:18 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: | |||||||
Attachments: |
|
Description
rmnscnce@ya.ru
2021-06-17 05:51:04 UTC
Successful akmods build log upon manual env variable invocation can be seen here: https://paste.centos.org/view/5b1b424b Line that sets the required env variable inside the kernel-xanmod-exptl spec file: https://pagure.io/kernel-xanmod/blob/edge/f/rpmsrc/kernel-xanmod-exptl.spec#_330 Line that applies the env variable: https://pagure.io/kernel-xanmod/blob/edge/f/rpmsrc/kernel-xanmod-exptl.spec#_338 I'm not interested in supporting non-default tool chain, it works fine with gcc. How are you setting the env variable needed to pass the compiler ? is it system wide variable or user defined variable ? akmods uses a dedicated user to build so you obviously have to propagate the variable to this user. This is basic sysadmin skill. The correct fix would be to set a rpm macro. So this environment would be purposely propagated, but so far this is only targeted for fedora 35: https://fedoraproject.org/wiki/Changes/CompilerPolicy If the f35 way of doing doesn't work. You will have to send the patch. I see. There's a mistake on my end to how I set the environment variables. I will close this ticket now. Thank you for the responses ``` rmnscnce I'm not expert on clang kernel/kmod building. But I think the best way is probably to enforce the CC to default to clang into the kernel-devel makefile as soon as the kernel is built with clang. (so the module would also). That way you will build the kmod with clang without enforcing others compilations work to clang. As Fedora is targeting to (optionally) build the kernel with clang, maybe it would worth to defer the question to the fedora kernel team... (I let you raise the issue, please mention it there as relevant). Reopening this ticket since apparently it still doesn't work even after changing the environment variable invocation method to the 'sh' standard. (`VARIABLE=value ; export VARIABLE`) (Log file: https://paste.centos.org/view/811aa553) Using akmods from terminal and having environment variable set using `env` or exporting to the session works as usual (https://paste.centos.org/view/737066eb) I suspect the problem lies within `/usr/lib/kernel/install.d/95-akmodsposttrans.install` (provided by package `akmods`), but I haven't figured out the problem (yet...) >maybe it would worth to defer the question to the fedora kernel team I don't think I will since I use a different kernel RPM spec than the one written by the Fedora kernel team. But maybe if the issue raises some general (in context of RPM packaging as a whole) concerns, I will raise the issue then ``` rmnscnce Please refrain from re-opening As already explained, the problem lies with your method to set the compiler in post kernel install. Doing so will miss the situation where the given akmod is updated. There it will miss the temporary environment variable in such context. Instead I would suggest to patch the top level kernel-devel Makefile to default to clang instead of gcc. But as I said, please forward the question to fedora kernel team. I'm not going to comment until it's done. |