Re: latest

"Peter T. Breuer" <[email protected]> Sat, 13 May 2006 16:48:06 +0200 (MET DST)
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
"Also sprach Bas van Schaik:"
> The "debian"-dir is attached. Feel free to post some remarks!

OK .. make -f debian/rules binary goes fine for me until just after it
has made the modules, when it hits:

   ... nux-2.6.x/drivers/block/enbd/enbd_ioctl.o /tmp/linux-2.6.x/drivers/block/enbd/enbd_ioctl.mod.o
  make[2]: Leaving directory `/usr/local/src/linux-2.6.15.4'
  make[1]: Leaving directory `/home/oboe/ptb/lang/c/nbd/enbd-2.4.33'
  make module-install KERNELRELEASE=2.6.8-3-386
  DESTDIR=/home/oboe/ptb/lang/c/nbd/enbd-2.4.33/debian/enbd
  make[1]: Entering directory `/home/oboe/ptb/lang/c/nbd/enbd-2.4.33'
  mkdir -p //lib/modules/2.6.8-3-386/misc; \
  for m in enbd.ko enbd_ioctl.ko; do \
          install /tmp/$m //lib/modules/2.6.8-3-386/misc/$m; \
          done
  mkdir: cannot create directory `//lib/modules/2.6.8-3-386': Permission denied
  install: cannot create regular file
  `//lib/modules/2.6.8-3-386/misc/enbd.ko': No such file or directory
  install: cannot create regular file
  `//lib/modules/2.6.8-3-386/misc/enbd_ioctl.ko': No such file or directory
  make[1]: *** [module-install] Error 1
  make[1]: Leaving directory `/home/oboe/ptb/lang/c/nbd/enbd-2.4.33'

(I'm not running as root)

It's trying  to make //lib/modules/foo/bar/gum.o. In my opinion it shouldn't
do that ... it should be installing into a temp dir instead. One wants
to set MODDIR, not DESTDIR, for that, I think:

  $(MAKE) module-install KERNELRELEASE=2.6.8-3-k7-smp MODDIR=$(CURDIR)/debian/enbd


Also, it is building in /tmp, in general. I don't think it should do
that, should it? Shouldn't one set BUILD to `pwd`/debian/build
or something like that?

     $(MAKE) utils SYSTEM=debian BUILD=$(CURDIR)/debian/build

etc. in build-arch.

That gets one as far as ...

  dh_testdir
  dh_testroot
  dh_testroot: You must run this as root (or use fakeroot).
  make: *** [install-arch] Error 1

so now I'll try fakeroot.

That seems satisfactory.

  ...
  dh_md5sums
        (cd debian/enbd-common >/dev/null ; find . -type f ! -path
  "./etc/init.d/enbd"  ! -regex '.*/DEBIAN/.*' -printf '%P\0' | xargs -r0
  md5sum > DEBIAN/md5sums) >/dev/null
        chmod 644 debian/enbd-common/DEBIAN/md5sums
        chown 0:0 debian/enbd-common/DEBIAN/md5sums
  dh_builddeb
        dpkg-deb --build debian/enbd-common ..
  dpkg-deb: building package ènbd-common' in
  `../enbd-common_2.4.32+2.4.33pre-1_all.deb'.
  make[1]: Leaving directory `/home/oboe/ptb/lang/c/nbd/enbd-2.4.33'

That seems to make:

  -rw-r--r--   1 ptb     8880 May 13 16:46 enbd-common_2.4.32+2.4.33pre-1_all.deb
  -rw-r--r--   1 ptb     1458 May 13 16:46 enbd-client-modules-2.6.8-3-386_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb    73470 May 13 16:46 enbd-server_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb    92218 May 13 16:46 enbd-client_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb     1656 May 13 16:46 enbd-client-source_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb     1456 May 13 16:46 enbd-client-modules-2.6.8-3-k7_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb     1458 May 13 16:46 enbd-client-modules-2.6.8-3-k7-smp_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb     1454 May 13 16:46 enbd-client-modules-2.6.8-3-686_2.4.32+2.4.33pre-1_i386.deb
  -rw-r--r--   1 ptb     1464 May 13 16:46 enbd-client-modules-2.6.8-3-686-smp_2.4.32+2.4.33pre-1_i386.deb

Well done!

Peter