[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Intend to package, create OSS/Free



Hi,
>>"Hamish" == Hamish Moffatt <hamish@debian.org> writes:

 >> Why do you get the kernel version from files? make-kpkg
 >> provides the kernel version in the environment var KVERS, as well as
 >> the location of the kernel source, and the maintainers name and email
 >> address.

 Hamish> What if someone switches in to /usr/src/modules/blah and runs
 Hamish> "debian/rules binary" by hand?

	Then ask them to provide the location and version of the
 kernel sources. Most kernel modules do need access to the kernel
 sources, and you can't assume /usr/src/linux as being present or the
 correct version if it is.

	However, since one needs to do automated builds, I guess that
 a published default location is not a bad idea. Hmm. I guess then you
 can use what kernel-package uses to get the version number (grabbing
 it from the Makefile). I would resort to this only if the version
 were not explicitly provided. 

	I would think that using make-kpkg to create the modules
 packages is not a bad idea anyway. 

 Hamish> Does this call the "kdist_image" target? Never heard of it?

	Yes. And you have never heard of since it is not yet
 documented, though pccia_cs has been sing this for an year or so
 (maybe more).

	kernel-package provides for three targets for the use of
 atand-alone kernel modules packages. The way this works is that all
 co-operating add on modules unpack into /usr/src/modules/<mod-name>/.

	Given a module specific target, namely, 
 a) modules-image modules_image:   only generate module image packages
 b) modules:                       generate the modules packages and
                                   sign them with dchanges 
 c) modules-config modules_config: only configure the module

	make-kpkg arranges to cd into each modules top directory,
 /usr/src/modules/<mod-name>/, and runs ./debian/rules <target>. 
 Additionally, the following information is provided in the
 environment:
 a) KVERS  Contains the kernel version
 b) KSRC   Contains the location of the kernel sources 
 c) KMAINT Contains the Name of the maintainer to pass to PGP
 d) KEMAIL Caontains the email address of the maintainer


	Please ask if anything more is required from kernel package.

	The make rules that are used by make-kpkg are included below.

	manoj

______________________________________________________________________
======================================================================
# only generate module image packages
modules-image modules_image: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules_image
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" KEMAIL="<$email>" \
                             kdist_image; ); \
        done
endif

# generate the modules packages and sign them with dchanges
modules: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" KEMAIL="<$email>" kdist; ); \
        done
endif

modules-config modules_config: configure
ifndef MODULES_ENABLED
        @echo Modules not configured, so not making modules_config
else
        -for module in $(MODULE_LOC)/* ; do \
            (cd $$module; \
              ./debian/rules KVERS="$(version)" KSRC="$(SRCTOP)" \
                             KMAINT="$(pgp)" KEMAIL="<$email>" \
                             kdist_configure; ); \
        done
endif



-- 
 Women want their men to be cops.  They want you to punish them and
 tell them what the limits are.  The only thing that women hate worse
 from a man than being slapped is when you get on your knees and say
 you're sorry. Mort Sahl
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: