<div dir="ltr">If the issue is that only POST_INSTALL runs on DKMS < 2.2.1 and both run on DKMS >= 2.2.1, couldn't we modify POST_INSTALL to include an existence check for the build dir before attempting the cp, and then include both POST_INSTALL and POST_BUILD steps?<div><br></div><div>That way, the POST_INSTALL step will silently bail on DKMS >= 2.2.1 (because the existence check for <span style="font-size:12.8px">${dkms_tree}/${PACKAGE_NAME}/$</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">{PACKAGE_VERSION}/build would fail), and POST_BUILD would copy the files over, while on DKMS < 2.2.1, POST_INSTALL would happily succeed?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Something like</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">POST_INSTALL="if [ -d \"</span><span style="font-size:12.8px">${dkms_tree}/${PACKAGE_NAME}/$</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">{PACKAGE_VERSION}/build\" ]; then </span><span style="font-size:12.8px">cp ...;fi"</span></div><div><span style="font-size:12.8px">POST_BUILD="cp ..."</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">- Rich</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 24, 2016 at 1:20 AM, Petter Reinholdtsen <span dir="ltr"><<a href="mailto:pere@hungry.com" target="_blank">pere@hungry.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi, and thank you for bringing up this issue.<br>
<br>
[Rich]<br>
> I tried building and installing the new spl-dkms from testing/unstable on my<br>
> Jessie system, which built fine, and reportedly installed fine.<br>
><br>
> Unfortunately, the fix for #836578 breaks the package for DKMS < 2.2.1.0,<br>
> resulting in an apparently successful install, but the zfs-dkms package will<br>
> spin forever waiting for .../module/spl_config.h to exist.<br>
><br>
> Please either include a workaround for DKMS < 2.2.1.0 (I'd offer one but I<br>
> don't know enough about how these systems function to guess how it might<br>
> work) or mark the package as requiring DKMS > 2.2.1.0.<br>
<br>
I expected the small change applied to fix<br>
<URL: <a href="https://bugs.debian.org/836578" rel="noreferrer" target="_blank">https://bugs.debian.org/836578</a> > to work also on older dkms<br>
versions, but I do not really know the inner workings of dkms.<br>
<br>
Perhaps one of the dkms maintainers can explain how the following patch<br>
can be made to work with both new and old dkms versions?<br>
<br>
--- usr/src/spl-0.6.5.7/dkms.conf       2016-05-25 15:42:03.000000000 +1000<br>
+++ usr/src/spl-0.6.5.7/dkms.conf.<wbr>orig  2016-09-09 10:37:43.482388086 +1000<br>
@@ -20,7 +20,7 @@<br>
                  esac)<br>
   --with-linux-obj=${kernel_<wbr>source_dir}<br>
 "<br>
-POST_INSTALL="cp<br>
+POST_BUILD="cp<br>
   ${dkms_tree}/${PACKAGE_NAME}/$<wbr>{PACKAGE_VERSION}/build/spl_<wbr>config.h<br>
   ${dkms_tree}/${PACKAGE_NAME}/$<wbr>{PACKAGE_VERSION}/build/<wbr>module/Module.symvers<br>
   ${dkms_tree}/${PACKAGE_NAME}/$<wbr>{PACKAGE_VERSION}/${kernelver}<wbr>/${arch}/<br>
<span class="HOEnZb"><font color="#888888">--<br>
Happy hacking<br>
Petter Reinholdtsen<br>
</font></span></blockquote></div><br></div>