[Pkg-iscsi-maintainers] Bug#632837:

Ritesh Raj Sarraf rrs at researchut.com
Wed Sep 14 13:01:07 UTC 2011


Hi,

I haven't been using the modass based package for some time. The newer
dkms package is more convenient. It takes care of auto-rebuilding the
modules on new kernel image installs and upgrades.


Are you guys still using the old package for a reason?
I was thinking of getting rid of it.


On 09/11/2011 09:33 AM, James Harper wrote:
> The following patch gets the build going for me. I'm sure there is a
> better way than calling out to printf though. It accomplishes two things
> - expand kernel version to a canonical string instead of making the
> assumption that the revision is 2 digits, and uses .ko for anything
> greater or equal than 2.6, rather than exactly 2.6. With this patch the
> module compiles and loads under 3.0.0, and ietd starts up, although I
> haven't actually tested that it works yet.
>
> diff -ur modules.old/iscsitarget/debian/rules
> modules/iscsitarget/debian/rules
> --- modules.old/iscsitarget/debian/rules        2011-08-07
> 06:41:19.000000000 +1000
> +++ modules/iscsitarget/debian/rules    2011-09-11 13:52:35.000000000
> +1000
> @@ -49,9 +49,6 @@
>
>  # module-assistant stuff
>  MAJOR=$(shell echo $(KVERS) | sed -e 's/\(...\).*/\1/')
> -ifeq ($(MAJOR),2.6)
> -KO=k
> -endif
>
>  KERN_VER=$(shell echo $(KVERS) | cut -d "-" -f1)
>
> @@ -63,18 +60,22 @@
>  KREV := $(shell echo $(KERN_VER) | \
>         sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/')
>
> -kver_eq = $(shell [ $(KMAJ)$(KMIN)$(KREV) -eq $(1)$(2)$(3) ] && \
> +kver_eq = $(shell [ `/usr/bin/printf "%03d%03d%03d" $(KMAJ) $(KMIN)
> $(KREV)` -eq `/usr/bin/printf "%03d%03d%03d" $(1) $(2) $(3)` ] && \
>         echo 1 || echo 0)
> -kver_lt = $(shell [ $(KMAJ)$(KMIN)$(KREV) -lt $(1)$(2)$(3) ] && \
> +kver_lt = $(shell [ `/usr/bin/printf "%03d%03d%03d" $(KMAJ) $(KMIN)
> $(KREV)` -lt `/usr/bin/printf "%03d%03d%03d" $(1) $(2) $(3)` ] && \
>         echo 1 || echo 0)
> -kver_le = $(shell [ $(KMAJ)$(KMIN)$(KREV) -le $(1)$(2)$(3) ] && \
> +kver_le = $(shell [ `/usr/bin/printf "%03d%03d%03d" $(KMAJ) $(KMIN)
> $(KREV)` -le `/usr/bin/printf "%03d%03d%03d" $(1) $(2) $(3)` ] && \
>         echo 1 || echo 0)
> -kver_gt = $(shell [ $(KMAJ)$(KMIN)$(KREV) -gt $(1)$(2)$(3) ] && \
> +kver_gt = $(shell [ `/usr/bin/printf "%03d%03d%03d" $(KMAJ) $(KMIN)
> $(KREV)` -gt `/usr/bin/printf "%03d%03d%03d" $(1) $(2) $(3)` ] && \
>         echo 1 || echo 0)
> -kver_ge = $(shell [ $(KMAJ)$(KMIN)$(KREV) -ge $(1)$(2)$(3) ] && \
> +kver_ge = $(shell [ `/usr/bin/printf "%03d%03d%03d" $(KMAJ) $(KMIN)
> $(KREV)` -ge `/usr/bin/printf "%03d%03d%03d" $(1) $(2) $(3)` ] && \
>         echo 1 || echo 0)
>  kver_lk = $(shell [ `echo $(KERN_VER) | egrep $(1)` ] && echo 1 || echo
> 0)
>
> +ifeq ($(call kver_ge,2,6,0),1)
> +KO=k
> +endif
> +
>  # Compatibility patch for kernels >= 2.6.36  <= 2.6.38
>  ifeq ($(call kver_le,2,6,38),1)
>         PATCHES := $(PATCHES) compat-2.6.36-2.6.37.patch
>
>
>
>


-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-iscsi-maintainers/attachments/20110914/c37bb01c/attachment.pgp>


More information about the Pkg-iscsi-maintainers mailing list