Okay, I'm going to jump into the middle of this bug and see if I can make
sense out of what's going on here.  :)

First off, Jonas, thank you for the KPKG_DEST_DIR patch.  That looks good
to me and has been applied to Subversion (although I still need to test
it).  That's a separate issue than KVERS.

On KVERS, after peering at this for a while, I must admit to being as
baffled as Sam over exactly what problem this is fixing.  The syntax of
the debian/rules is fine; I've used exactly that technique (`` in makefile
variable settings) in various projects for years, so I'm rather familiar
with how it works and what the limitations are.

Pip, if you could provide more details on exactly what happens when you
try to build a 2.4.27 module on a 2.6.8 system, I'd really appreciate it.
As near as I can tell from the code, with or without using $(shell) the
KVERS variable is going to get set to whatever is computed from
linux/version.h in the source tree in KSRC.  So if KSRC is set correctly,
I don't understand why you would be having problems.

Jonas, let me answer a couple of your other questions:

 * What if you want to override KVERS?  Well, unfortunately, you can't.
   OpenAFS isn't like other kernel modules.  It doesn't let a simple
   Makefile or the kernel build machinery drive its build.  It has an
   Autoconf script which is going to go off and figure out the kernel
   version for itself and ignore anything that KVERS is set to, no matter
   what we do in debian/rules.

   It's possible that this could be fixed, but it means upstream work, not
   just debian/rules hackery.  I've not looked to see how hard it is, but
   it's not really high on the list of things I want to try to work out.
   OpenAFS Autoconf should get the right information from the kernel
   headers it looks at, which are the ones in KSRC, which should be set
   properly by make-kpkg, so it shouldn't be necessary to worry about this
   for the common case, *including* building a module for a different
   kernel version than the /usr/src/linux one.

 * How can you use shell syntax in a Makefile?  Well, what happens is that
   KVERS gets set to that whole string, backticks and all, and that whole
   string is substituted into the Makefile everywhere $(KVERS) is used.
   This breaks if $(KVERS) is ever used in a context other than a shell
   command, but looking over debian/rules, it's not.  This perhaps isn't
   as efficient as running the command just once, but it should work fine.

So, I realize that something is still broken for folks, and something
about this patch fixes it, and I'd really like to understand both what
that is and how the patch helps.  I certainly want to solve your problems;
I just don't want to change things I don't understand because they seem to
work.  :)

Could you provide a really detailed description of what breaks without
this change, including error messages or descriptions of what the
incorrect results are?

Thanks!

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to