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?
That way, the POST_INSTALL step will silently bail on DKMS >= 2.2.1 (because the existence check for ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build would fail), and POST_BUILD would copy the files over, while on DKMS < 2.2.1, POST_INSTALL would happily succeed? Something like POST_INSTALL="if [ -d \"${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build\" ]; then cp ...;fi" POST_BUILD="cp ..." ? - Rich On Sat, Sep 24, 2016 at 1:20 AM, Petter Reinholdtsen <p...@hungry.com> wrote: > > Hi, and thank you for bringing up this issue. > > [Rich] > > I tried building and installing the new spl-dkms from testing/unstable > on my > > Jessie system, which built fine, and reportedly installed fine. > > > > Unfortunately, the fix for #836578 breaks the package for DKMS < 2.2.1.0, > > resulting in an apparently successful install, but the zfs-dkms package > will > > spin forever waiting for .../module/spl_config.h to exist. > > > > Please either include a workaround for DKMS < 2.2.1.0 (I'd offer one but > I > > don't know enough about how these systems function to guess how it might > > work) or mark the package as requiring DKMS > 2.2.1.0. > > I expected the small change applied to fix > <URL: https://bugs.debian.org/836578 > to work also on older dkms > versions, but I do not really know the inner workings of dkms. > > Perhaps one of the dkms maintainers can explain how the following patch > can be made to work with both new and old dkms versions? > > --- usr/src/spl-0.6.5.7/dkms.conf 2016-05-25 15:42:03.000000000 +1000 > +++ usr/src/spl-0.6.5.7/dkms.conf.orig 2016-09-09 10:37:43.482388086 > +1000 > @@ -20,7 +20,7 @@ > esac) > --with-linux-obj=${kernel_source_dir} > " > -POST_INSTALL="cp > +POST_BUILD="cp > ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/spl_config.h > ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/ > module/Module.symvers > ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/ > -- > Happy hacking > Petter Reinholdtsen >