[DRBD-user] [BUG] errors in Debian packaging of drbd module

Matthew Vernon mcv21 at cam.ac.uk
Wed Aug 5 16:34:49 CEST 2015

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hi,

I needed to build the drbd 8.4.6 kernel module for my Debian stable
("jessie") boxes. As a result of which, I found 2 bugs:

1) the built drbd module package ends up depending on drbd8-utils, which
is now incorrect - that should be drbd-utils. This requires a trivial patch:

diff --git a/debian/control.modules.in b/debian/control.modules.in
index b42484f..3b7e135 100644
--- a/debian/control.modules.in
+++ b/debian/control.modules.in
@@ -8,7 +8,7 @@ Standards-Version: 3.6.1

 Package: drbd8-module-_KVERS_
 Architecture: any
-Depends: drbd8-utils
+Depends: drbd-utils
 Conflicts: drbd-module-_KVERS_
 Provides: drbd-module-_KVERS_
 Replaces: drbd-module-_KVERS_

2) the drbd8-module-source_8.4.6-1_all.deb isn't actually buildable -
module-assistant auto-install drbd8
fails to build drbd_buildtag.c

The relevant bit of Kbuild for this file is ll 123 et seq, mangling a
bit to try and reduce line-wrap-damage:
        if test -e $(src)/../.git &&
            GITHEAD=$$(cd $(src) && git rev-parse HEAD); then
                GITDIFF=$$(cd $(src)/.. && git diff --name-only HEAD |
                        tr -s '\t\n' '  ' |
                        sed -e 's/^/ /;s/ *$$//');
                echo -e "\treturn \"GIT-hash: $$GITHEAD$$GITDIFF\"";
        elif test -e $(src)/.drbd_git_revision ; then
                echo -e "\treturn \"$$(cat $(src)/.drbd_git_revision)\"";
        elif test -e $@ ; then
                grep return $@ ;
        else
                echo >&2 "Your DRBD source tree is broken. Unpack again.";
                exit 1;

The source package doesn't contain .git (obviously, it's not a git
checkout), but nor does it contain .drbd_git_revision nor
drbd_buildtag.c . I worked around this by pinching .drbd_git_revision
from the 8.4.6 tarball and copying that into place, but this is clearly
not really the right answer - so should the build process for the
module-source package create a .drbd_git_revision file, perhaps?

Regards,

Matthew



More information about the drbd-user mailing list