Re: Bring enbd back in Debian?
"Peter T. Breuer" <[email protected]> Thu, 16 Mar 2006 16:02:11 +0100 (MET)
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
"Also sprach Bas van Schaik:"
> >I could split off a common library too, if that helps.
> >
> >
> It's of course not necessary, but if it prevents code duplication: don't
> hesitate, just do it! Since there'll be an common-package anyway, you
> can refactor any duplicate code into one library.
OK.
> >At the moment I have made it easy for you to change the sitings of
> >things via this stuff passed to the compiler ...
> >
> > gcc -DCONFDIR="\"/etc\"" -DPIDDIR="\"/var/run\"" -DSTATEDIR="\"/var/state/enbd\"" ...
> >
> >That's produced in the Makefile (which comes from Makefile.in) and that
> >needs patching. It produces those values based on sysconfdir,
> >localstatedir from ./configure, but you probably want to edit the
> >Makefile.
> >
> >
> I'm not I understand this fully. I think it's the easiest way for me to
> configure such things in the "main" Makefile, which is extracted in the
> package root. To be sure we're talking about the same file, here's the
> directory structure after extracting:
I'm talking about the nbd/Makefile[.in], which is responsible for making
the userspace code. The top level Makefile calls that under the utils:
target:
utils: $(BUILD)/Makefile
$(MAKE) -C $(BUILD) VPATH=$(VPATH)/nbd \
^^^^^^^^^^ by this time the nbd/Makefile has been copied to there
CFLAGS="$(CFLAGS) \
-I$(BUILD) \
-I$(VPATH)/kernel/linux-$(KERNELMAJOR).x/include \
-I$(LINUXDIR)/include \
$(EXTRA_CFLAGS) \
-DDEBUG=$(DEBUG)" \
EXTRA_LIBS="$(EXTRA_LDFLAGS) \
$(LIBS) $(EXTRA_LIBS)"
and I suppose one could override some settings by calling the sub-make with
different parameters. It looks to me as though ...
STATEDIR (/var/state/enbd)
PIDDIR (/var/run)
SYSCONFDIR (/etc)
are what possibly need overriding.
However, in my opinion it would likely be neater to patch Makefile.in
so that the overrides were not necessary.
> Until now, this Makefile was the only file which needed editing (not
> much anyway), so if it's possible to put those CONFDIR, PIDDIR and
> STATEDIR-parameters in there (also), it would save me some patching!
It is that one that you can use to do the eoverrides in, but I'm not sure
how to avoid patching IT.
> By the way, I think the "debian"-directory in the archive is not really
> needed for anything anymore. It would be easier if this directory was
> removed, because the Debian buildscripts are complaining about a
> duplicate "debian" directory (my own build config, and the pre-existing
> one). I've extracted all the needed information from it (and it'll stay
> old archives anyway), so I think there's no reason to keep it there.
Please make a proper "debian" dir and I will take the prototype from you
and put it there. Meanwhile you can move that one out the way. Is
there a protocol for this? WOuld it help if I named it "DEBIAN" or
debian.botch?
> I'm currently testing enbd from packages on real hardware, and it seems
> to work great! Today I'll try to package all stuff from /etc in the
> common-package with some configuration examples. Do you want me to split
> the manpages for the client and server? It's not that much work and I
The client and server conf man page (enbd.conf), you mean? That needs
two man pages pointing at it, enbd_server.conf and enbd_client.conf (as
I remember). I don't recall how to do pointers in nroff.
> think it'll save you some time. Just let me know.
Please set up the debian part as best you can! I've forgotten how to
define what goes where in a debian package (though of course I can figure
it if need be).
Peter