module-assistant support for zaptel
Tzafrir Cohen
tzafrir.cohen@xorcom.com
Fri, 01 Apr 2005 18:22:38 +0300
--Boundary_(ID_LfefkCplT9d+ab8eEEGtQQ)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: QUOTED-PRINTABLE
Content-disposition: inline
On Tue, Mar 29, 2005 at 11:21:36PM +0200, Jose Carlos Garcia Sogo wro=
te:
> El lun, 28-03-2005 a las 09:23 +0200, Tzafrir Cohen escribi=F3:
> > On Sun, Mar 27, 2005 at 11:37:29PM +0200, Jose Carlos Garcia Sogo=
wrote:
> > > El dom, 27-03-2005 a las 23:06 +0200, Tzafrir Cohen escribi=
=F3:
> > > > [ This post still does not refer to the issues rased by Eduar=
d Bloch]
> > > >=20
> > > > On Sun, Mar 27, 2005 at 02:13:44AM +0200, Tzafrir Cohen wrote=
:
> > > > > After playing with m-a a bit, I still don't see it saving m=
e work with
> > > > > automated builds. It requires quite a lot of initial setup,=
and most of
> > > > > it appears to be the job of root.=20
> > >=20
> > > Yes, for running in /usr/src you have to run m-a as root. Bas=
ically #
> > > m-a a-i zaptel should do the trick.=20
> >=20
> > However for multiple kernels you basically have to extract the tr=
ees.
>=20
> Yes, or have kernel-sources-* packages around. With that it is eno=
ugh.
> You only have to pass -l $kvers-1,$kvers-2,... to m-a to get the mo=
dule
> compiled for every kernel version (see my other reply)
>=20
> >=20
> > >=20
> > > > >=20
> > > > > In addition, packaging the files in an internat tgz bypasse=
s any sanity=20
> > > > > check lintian and others would do to them.
> > >=20
> > > But there is no check that lintian can make to those files. L=
intian
> > > could only work in user generated zaptel-modules package. If yo=
u check
> > > any other kernel modules package, you will see that source is a=
lso
> > > placed in a tar.gz file.
> >=20
> > Did you notice you add -m 644 to almost every install (you actual=
ly
> > forgot it with some, and used plain cp). lintian won't check file=
modes
> > inside a tarball.
>=20
> Wooops. That's a fault on my part. And while you're right on this,=
I am
> not sure lintian will fail on that, and having the source as a tar.=
gz is
> better in my opinion.
OK. Finally got it working. This was done by replacing the bogus
/usr/share/modass/packages/zaptel-source with a "standard" one. I did=
n't
put any "override" as I don't believe we need to fix in zaptel-source=
a
bug of module-assistant. For now I'd recommend the user to manually:
rm /usr/share/modass/packages/zaptel-source=20
ln -s default.sh /usr/share/modass/packages/zaptel-source=20
I don't see why such file should exist in modass if the source for
zaptel is not available in the first place. It should be provided by
zaptel-source and not exist if zaptel-source is not installed. At the
moment ModAss reports of many shource packages I have "available" whe=
n I
actually have almost none of them.
Anyway, my rules file is attached. It has very few rapid-specific par=
ts,
but I believe that both those changes should come into Debian:
1. There should not be a default /etc/zaptel.conf . It is documented =
in
the example. If you want to satisfy ztcfg, touch /etc/zaptel.conf on
postinst it there is no such file. However there is no point in being
asked ot upgrade it by dpkg when upgrading the package.
2. genzaptelconf is not yet in Debin. Do I need to file a bug to have=
it
included?
--=20
Tzafrir Cohen icq#16849755 +972-50-7952406
tzafrir.cohen@xorcom.com http://www.xorcom.com
--Boundary_(ID_LfefkCplT9d+ab8eEEGtQQ)
Content-type: text/plain; NAME=rules; charset=us-ascii
Content-transfer-encoding: QUOTED-PRINTABLE
Content-disposition: attachment; filename=rules
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# This version can build kernel modules via make-kpkg as=20
# well as with module-assistant. It also serves to build packages for
# userspace utils and for modules source.
# It is based on ipw2100 package rules file.
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=3D1
# This is the debhelper compatibility version to use.
export DH_COMPAT=3D3
-include /usr/share/dpatch/dpatch.make
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
=09CFLAGS +=3D -g
endif
## MODULE-ASSISTANT STUFF
# prefix of the target package name
PREFIX:=3Dzaptel
SKPG:=3D$(PREFIX)-source
PACKAGE:=3D$(PREFIX)-modules
# modifieable for experiments or debugging m-a
MA_DIR ?=3D /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules
-include $(MA_DIR)/include/common-rules.make
kdist_clean: clean-unpatched
kdist_config: prep-deb-files
binary-modules: prep-deb-files
=09dh_testdir
=09dh_testroot
=09dh_clean -k
=09make modules KERNEL_SOURCES=3D$(KSRC) MODVERSIONS=3Ddetect KERNEL=
=3Dlinux-$(KVERS)
=09make install-modules DESTDIR=3D$(CURDIR)/debian/$(PKGNAME)
ifeq (2.6,$(subst $(wordlist 1,2,$(subst $(KVERS),., )), ,.))
=09# The 2.6 modules are way too big. This is only in kernel 2.6
=09find debian/$(PKGNAME)/lib/modules -name '*.ko' |xargs strip -g
endif
#=09dh_installdocs
=09dh_installdebconf
=09dh_installchangelogs
=09dh_compress
=09dh_fixperms
=09dh_installdeb
=09dh_gencontrol -- -v$(VERSION)
=09dh_md5sums
=09dh_builddeb --destdir=3D$(DEB_DESTDIR)
## END OF M-A SECTION
configure: configure-stamp
configure-stamp: patch-stamp
=09dh_testdir
=09touch $@
build: build-indep-stamp build-arch-stamp
build-arch-stamp: configure-stamp=20
=09dh_testdir
=09$(MAKE) programs
=09touch $@
build-indep-stamp:
=09touch $@
clean: clean-unpatched unpatch
clean-unpatched:
=09dh_testdir
=09dh_testroot
=09rm -f build-*-stamp configure-stamp
=09
=09# Add here commands to clean up after the build process.
=09-$(MAKE) clean
=09
=09dh_clean
install: install-arch install-indep
install-arch: build-arch-stamp
=09dh_testdir
=09dh_testroot
=09dh_clean -k -a
=09dh_installdirs -a
=09
=09# Add here commands to install the package into debian/tmp
=09
=09$(MAKE) install-programs DESTDIR=3Ddebian/$(PREFIX)
=09dh_install -a --sourcedir=3Ddebian/tmp
=09
=09dh_install -a debian/$(PREFIX).lintian \
=09 usr/share/lintian/overrides/$(PREFIX)
TARPARDIR=3Ddebian/tmp
TARDIR=3D$(TARPARDIR)/modules/$(PREFIX)
install-indep: build-indep-stamp
=09dh_testdir
=09dh_testroot
=09dh_clean -k -i
=09dh_installdirs -i
=09
=09# driver source code
=09mkdir -p $(TARDIR)/debian
=09cp Makefile *.c *.h *.rbt $(TARDIR)/
=09cp -r zaphfc qozap $(TARDIR)/
=09dh_install -i zaptel.h torisa.h usr/include/linux/
=09# Packaging infrastructure
=09cp -r debian/*-modules.* debian/rules debian/changelog \
=09 debian/copyright debian/control \
=09 $(TARDIR)/debian/
=09dh_install -i debian/control.modules.in $(TARDIR)/debian/
=09tar cjf debian/$(PREFIX)-source/usr/src/$(PREFIX).tar.bz2 \
=09 -C $(TARPARDIR) modules
=09#rm -rf modules
=09# TODO: this rmdir should not be required! (Tzafrir)
=09#rmdir debian/zaptel-source/usr/share/modass/overrides/zaptel
=09#dh_install -i debian/$(PREFIX)-source.modass \
=09# usr/share/modass/overrides/$(PREFIX)
=09
# Build architecture-independent files here.
binary-indep: build install-indep
=09dh_testdir
=09dh_testroot
=09
=09dh_installdocs -i
=09dh_installchangelogs -i ChangeLog
=09dh_link -i
=09dh_compress -i
=09dh_fixperms -i
=09dh_installdeb -i
=09dh_gencontrol -i
=09dh_md5sums -i
=09dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install-arch
=09dh_testdir
=09dh_testroot
=09#install -m644 debian/$(PREFIX).modprobe.d debian/$(PREFIX)/etc/mo=
dprobe.d/$(PREFIX)
=09dh_installdocs -a
=09dh_installman -a debian/ztmonitor.8 debian/ztcfg.8 debian/zttool.8=
\
=09 debian/genzaptelconf.8
=09# should be removed, eventually. Still left for compatibility
=09dh_installinit --update-rcd-params=3D"defaults 15 30"
=09dh_installexamples -a zaphfc/*.conf* qozap/*.conf*=20
=09dh_installmodules -a
=09dh_installchangelogs -a ChangeLog
=09dh_link -a
=09dh_strip -a
=09dh_compress -a
=09dh_fixperms -a
=09dh_makeshlibs -a -V
=09dh_installdeb -a
=09dh_shlibdeps -a -ldebian/libtonezone1/usr/lib
=09dh_gencontrol -a
=09dh_md5sums -a
=09dh_builddeb -a
binary: binary-indep binary-arch
=2EPHONY: build clean binary-indep binary-arch binary install configu=
re patch unpatch
--Boundary_(ID_LfefkCplT9d+ab8eEEGtQQ)--