Fedora Account System
Red Hat Associate
Red Hat Customer
I recently got this error when updating with dnf... >>> Running %posttrans scriptlet: memtest86+-0:8.10-1.fc44.x86_64 >>> Finished %posttrans scriptlet: memtest86+-0:8.10-1.fc44.x86_64 >>> Scriptlet output: >>> /usr/lib64/memtest86+/memtest86+.kernel-install-plugin succeeded with exit status 77, not executing remaining executables. Reproducible: Didn't try Steps to Reproduce: 1. run dnf update (with metest86+ already installed) 2. 3. Actual Results: >>> Running %posttrans scriptlet: memtest86+-0:8.10-1.fc44.x86_64 >>> Finished %posttrans scriptlet: memtest86+-0:8.10-1.fc44.x86_64 >>> Scriptlet output: >>> /usr/lib64/memtest86+/memtest86+.kernel-install-plugin succeeded with exit status 77, not executing remaining executables. Expected Results: No error.
This is actually the intended exit code. We are using the kernel-install plumbing to manage the bootloader configuration. Exit code 77 short circuits the running of plugins successfully. KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \ kernel-install add %{version} %{_libdir}/%{name}/${MEMTEST_IMAGE} The plugin code in memtest86+.kernel-install-plugin is specifically returning 77. I interpreted the docs (which appear to be down right now https://www.freedesktop.org/software/systemd/man/kernel-install.html) to ask for return code 77 to indicate success and don't proceed processing any other plugins. We can likely return 0 as long as the setting of `KERNEL_INSTALL_PLUGINS` keeps all other plugins from running. @jskarvad This exit code seemed the most appropriate as we only want to run our custom plugin. However, I think it's safe to switch to 0 to suppress this confusing output. What do you think?
According to Fedora packaging guidelines <https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax> "All scriptlets MUST exit with the zero exit status." Otherwise the rpm transaction effectively fails & dnf (if used) fails to appropriately record it's transaction as successful. If that occurs in an upgrade/update where more than one package is being updated then that means everything has failed to dnf. Not true perhaps in this case but that seems to be what rpm/dnf act like. On the doc, https://www.freedesktop.org/software/systemd/man/kernel-install.html I'm wondering, 6 bits ie. 77 (I'm old & assuming it's octal) is not really -1 in an 8 bit error mask or 16 or 32 or 64 (or 128 - when will we need 128 bit processors?) bit mask. So what exactly is 77 supposed to mean? Is this a typo in the doco? I always (even in Version 6/7 when I started playing Unix) thought that exit status was, 8-bit unsigned integer, allowing for values from 0 to 255 (dec). I get that -1 (377) might be a useful exit code in some cases, but??? it ain't that in the above doc. Maybe we need a bug filed against the manual or the kernel???
(In reply to John Dodson from comment #2) > According to Fedora packaging guidelines <https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax> "All scriptlets MUST exit with the zero exit status." Technically, the scriptlet return code is 0 as returned by the kernel-install command. The plugin code is returning 77 to kernel-install, telling it to not continue processing plugins and that things were successful. This is where the log message comes from and why the transaction completes successfully. I need to re-read the code and make sure that since we are setting a specific plugin it's safe to just return 0. This will stop the confusing transaction log message. When I originally wrote it, I went with what appeared to be the safest way to make sure we don't run any other plugins when calling kernel-install. All of that code makes a lot of assumptions that we are actually installing a kernel. I was also hedging against a `KERNEL_INSTALL_PLUGINS` behavior change that I might not notice.
Ok, thanks, if the exit really is zero (to rpm/dnf) then it should be ok. I really would though be questioning the 77 exit status, really does look like a typo in the doc. But if the message is just informational & the message is actually coming from kernel-install-plugin >>> Scriptlet output: >>> /usr/lib64/memtest86+/memtest86+.kernel-install-plugin succeeded with exit status 77, not executing remaining executables. & the exit status really is 0 it should be ok & I'm sorry for bothering you. At the moment I've removed memtest while trying to eliminate all errors that are occurring when dnf does an upgrade (43->44) & getting things "back to normal" with dnf in fc44. I have found memtest useful in the past, so I'd like to feel confident before putting it back that it won't result in dnf thinking it failed to be updated.