Bug#301666: Acknowledgement (fails to build with no dpatch installed)
Eduard Bloch
Eduard Bloch <edi@gmx.de>, 301666@bugs.debian.org
Sun, 27 Mar 2005 19:05:15 +0200
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mailgate1.uni-kl.de id j2RHd3rm031923
#include <hallo.h>
* Debian Bug Tracking System [Sun, Mar 27 2005, 07:48:32AM]:
> Thank you for the problem report you have sent regarding Debian.
> This is an automatically generated reply, to let you know your message =
has
Sorry, the original description was wrong, and the case was kinda
constructed. However, there is really no point in depending on dpatch if
it is not used at all in the binary-modules target, and not required for
clean (in short: anything that the user would run trough make-kpkg &
Co.).
So I propose the attached change. See changelog diff for the summary, I
basicaly removed the old kernel setup crap from dh-make and switched it
to use module-assistant.
Regards,
Eduard.
--=20
Chemie ist Natur zu stark herabgesetzten Preisen
-- J=FCrgen von Manger
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="zaptel-fixes.diff"
diff -u zaptel-1.0.7/debian/changelog zaptel-1.0.7/debian/changelog
--- zaptel-1.0.7/debian/changelog
+++ zaptel-1.0.7/debian/changelog
@@ -1,3 +1,14 @@
+zaptel (1:1.0.7-2) unstable; urgency=low
+
+ * fixes
+ * removed the requirement of dpatch in the driver source (reason?!)
+ * removed zaptel-source.files (dh_movefile is obsolete and there is really
+ no point in copying stuff MANUALLY to tmp in order to move it few secs
+ later with another tool)
+ * using bzip2 for the source now
+
+ -- Eduard Bloch <blade@debian.org> Sun, 27 Mar 2005 17:43:11 +0200
+
zaptel (1:1.0.7-1) unstable; urgency=low
* New upstream version.
diff -u zaptel-1.0.7/debian/control zaptel-1.0.7/debian/control
--- zaptel-1.0.7/debian/control
+++ zaptel-1.0.7/debian/control
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Uploaders: Kilian Krause <kk@verfaction.de>, Jose Carlos Garcia Sogo <jsogo@debian.org>, Mark Purcell <msp@debian.org>, Santiago Garcia Mantinan <manty@debian.org>, Santiago Ruano Rincon <santiago@unicauca.edu.co>
-Build-Depends: debhelper (>> 3.0.0), libnewt-dev, dpatch
+Build-Depends: debhelper (>> 3.0.0), libnewt-dev, dpatch, bzip2
Standards-Version: 3.6.1.1
Package: zaptel
@@ -31,8 +31,8 @@
Package: zaptel-source
Section: devel
Architecture: all
-Depends: debhelper, dpatch
-Recommends: dpkg-dev, libc6-dev | libc-dev, gcc, make, zaptel
+Depends: debhelper, module-assistant, bzip2
+Recommends: zaptel
Description: Zapata telephony interface (source code for kernel driver)
This package contains the source code for zaptel, a kernel module providing
the Zapata telephony API, and device drivers for various telephony hardware,
diff -u zaptel-1.0.7/debian/rules zaptel-1.0.7/debian/rules
--- zaptel-1.0.7/debian/rules
+++ zaptel-1.0.7/debian/rules
@@ -8,100 +8,13 @@
# This is the debhelper compatibility version to use.
export DH_COMPAT=3
-include /usr/share/dpatch/dpatch.make
-
-export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-### KERNEL SETUP
-### Setup the stuff needed for making kernel module packages
-### taken from /usr/share/kernel-package/sample.module.rules
-
-# Name of package
-package = zaptel
-# KSRC is the location of the kernel source. This is the default value,
-# when make-kpkg is used it will supply to real value
-KSRC = /usr/src/linux
-# KDREV is the package-revision, as given to make-kpkg by the user.
-# Just put a simply default value in here which we use when we test
-# the packagebuilding without make-kpkg
-ifeq ($(strip $(KDREV)),)
-KDREV = "test1.0"
-endif
-
-## Now to determine the kernel version, normally supplied by make-kpkg
-ifeq ($(strip $(KVERS)),)
-# Now we need to get the kernel-version somehow (we are not running
-# under make-kpkg?)
-ifeq ($(strip $(KSRC)),)
-$(error Error. I do not know how to determine the kernel version)
-else
-kversion :=$(shell egrep '^VERSION +=' $(KSRC)/Makefile 2>/dev/null | \
- sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-kplevel :=$(shell egrep '^PATCHLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
- sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-ksublevel:=$(shell egrep '^SUBLEVEL +=' $(KSRC)/Makefile 2>/dev/null | \
- sed -e 's/[^0-9]*\([0-9]*\)/\1/')
-EXTRA_VERSION:=$(shell egrep '^EXTRAVERSION +=' $(KSRC)/Makefile 2>/dev/null | \
- sed -e 's/EXTRAVERSION[\t ]*=[\t ]*\(.*\)/\1/')
-kextra:=$(strip $(EXTRA_VERSION))
-HAVE_NEW_MODLIB:=$(shell egrep '\(INSTALL_MOD_PATH\)' \
- $(KSRC)/Makefile 2>/dev/null )
-
-ifneq ($(strip $(APPEND_TO_VERSION)),)
-iatv := $(strip $(APPEND_TO_VERSION))
-EXTRAV_ARG := EXTRAVERSION=${EXTRA_VERSION}${iatv}
-else
-iatv :=
-EXTRAV_ARG :=
-endif
-
-KVERS = $(kversion).$(kplevel).$(ksublevel)$(kextra)$(iatv)$(INT_FLAV)
-
-endif
-endif
-
-non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
-epoch=$(shell echo $(KVERS) | perl -ne 'm/^(\d+:)/ && print $$1')
-
-# We also need the package version
-pversion = $(shell sed -ne '1s/.*\((.*)\).*/\1/' debian/changelog)
-pversion = $(shell sed -ne '1s/.*(\(.*\)).*/\1/p' debian/changelog)
-
-# MODDIR is the place where the final .deb package should be made. This is the
-# default value, when make-kpkg is used it will supply to real value
-MODDIR = ..
-
-pmodules = $(package)-modules-$(non_epoch_version)
-psource = $(package)-source
-
-# Prepares the package for distribution. Intended for the kernel
-# maintainer.
-kdist: kdist_clean kdist_config kdist_image
-
-# The kdist_configure target is called by make-kpkg modules_config. It
-# should configure the module so it is ready for compilation (mostly
-# useful for calling configure)
-kdist_config:
- @echo Nothing to configure
-
-# the kdist_image target is called by make-kpkg modules_image. It is
-# responsible for compiling the module and creating the package. It
-# should also clean up after making the module. Please note we use a
-# seperate binary-modules target to make testing the package building
-# easier
-kdist_image:
- $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
- $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
-
-# the kdist_clean target is called by make-kpkg modules_clean. It is
-# responsible for cleaning up any changes that have been made by the
-# other kdist_commands (except for the .deb files created).
-kdist_clean:
- $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
-
-### end KERNEL SETUP
-
+-include /usr/share/dpatch/dpatch.make
+PREFIX=zaptel
+SPKG=$(PREFIX)-source
+PACKAGE=$(PREFIX)-modules
+MA_DIR ?= /usr/share/modass
+-include $(MA_DIR)/include/generic.mk
+-include $(MA_DIR)/include/common-rules.mk
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
@@ -132,41 +45,21 @@
dh_clean
-# the binary-modules target prepares the $(pmodules) package.
+
# It is called by make-kpkg and *not* during a normal build
+kdist_config: prep-deb-files
+kdist_clean: clean-unpatched
binary-modules:
- export DH_OPTIONS='-p$(pmodules)'
-
- echo "kpkg:Kernel-Version=$(non_epoch_version)" > \
- debian/$(pmodules).substvars
-
- # The substvars mechanism seems slightly broken, hack to get around it
- # stolen from the qce-ga package. Yaaaa!
- sed -e 's/$${kpkg\:Kernel\-Version}/$(non_epoch_version)/' \
- debian/control.in > debian/control
-
- dh_testdir
dh_testroot
dh_clean -k
-
- # Build the module
- $(MAKE) modules
-
- # Install the module
- $(MAKE) install-modules DESTDIR=$(CURDIR)/debian/$(pmodules)
-
+ $(MAKE) modules KERNEL_SOURCE="$(KSRC)"
+ $(MAKE) install-modules DESTDIR=$(CURDIR)/debian/$(pmodules) KERNEL_SOURCE="$(KSRC)"
dh_installdebconf
- # FIXME dh_installdocs README
dh_installchangelogs
-
- # We're not using this yet
- #dh_installmodules
-
dh_installdeb
- #dh_gencontrol -- -v$(epoch)$(pversion)+$(non_epoch_version)+$(KDREV)
- dh_gencontrol -- -v$(epoch)$(pversion)
+ dh_gencontrol -- -v$(VERSION)
dh_md5sums
- dh_builddeb --destdir=$(MODDIR)
+ dh_builddeb --destdir=$(DEB_DESTDIR)
install: install-arch install-indep
@@ -176,7 +69,7 @@
dh_clean -k -a
dh_installdirs -a
- # Add here commands to install the package into debian/tmp
+ # Add here commands to install the PACKAGE into debian/tmp
$(MAKE) install-programs DESTDIR=debian/tmp
@@ -200,35 +93,30 @@
dh_clean -k -i
dh_installdirs -i
- # Build module source package
- mkdir -p debian/tmp/usr/src/modules/$(package)/debian
- mkdir -p debian/tmp/usr/include/linux/
+ # Build module source PACKAGE
+ mkdir -p debian/$(SPKG)/usr/src/modules/$(PREFIX)/debian
+ mkdir -p debian/$(SPKG)/usr/include/linux/
# driver source code
- cp Makefile *.c *.h *.rbt debian/tmp/usr/src/modules/$(package)
- cp -r zaphfc qozap debian/tmp/usr/src/modules/$(package)
- ln -s ../../src/modules/$(package)/zaptel.h debian/tmp/usr/include/linux/
- ln -s ../../src/modules/$(package)/torisa.h debian/tmp/usr/include/linux/
+ cp Makefile *.c *.h *.rbt debian/$(SPKG)/usr/src/modules/$(PREFIX)
+ cp -r zaphfc qozap debian/$(SPKG)/usr/src/modules/$(PREFIX)
+ ln -sf ../../src/modules/$(PREFIX)/zaptel.h ../../src/modules/$(PREFIX)/torisa.h debian/$(SPKG)/usr/include/linux/
# Packaging infrastructure
- cp debian/*-modules.* debian/rules debian/changelog debian/copyright \
- debian/tmp/usr/src/modules/$(package)/debian
- cp debian/control.modules.in \
- debian/tmp/usr/src/modules/$(package)/debian/control.in
+ cp debian/*modules.* debian/control debian/rules debian/changelog debian/copyright \
+ debian/$(SPKG)/usr/src/modules/$(PREFIX)/debian
# make sure we do ship some documentation on how to deal with zaphfc
- mkdir -p debian/tmp/usr/share/doc/zaptel-source/examples/zaphfc
- mkdir -p debian/tmp/usr/share/doc/zaptel-source/examples/qozap
- cp zaphfc/*.conf* debian/tmp/usr/share/doc/zaptel-source/examples/zaphfc
- cp qozap/*.conf* debian/tmp/usr/share/doc/zaptel-source/examples/qozap
-
- dh_movefiles -i
+ mkdir -p debian/$(SPKG)/usr/share/doc/$(SPKG)/examples/zaphfc
+ mkdir -p debian/$(SPKG)/usr/share/doc/$(SPKG)/examples/qozap
+ cp zaphfc/*.conf* debian/$(SPKG)/usr/share/doc/$(SPKG)/examples/zaphfc
+ cp qozap/*.conf* debian/$(SPKG)/usr/share/doc/$(SPKG)/examples/qozap
+ cd debian/$(SPKG)/usr/src && tar c modules | bzip2 -9 > zaptel.tar.bz2 && rm -rf modules
# Build architecture-independent files here.
binary-indep: build install-indep
dh_testdir
dh_testroot
-
dh_installdocs -i
dh_installchangelogs -i ChangeLog
dh_link -i
diff -u zaptel-1.0.7/debian/control.modules.in zaptel-1.0.7/debian/control.modules.in
--- zaptel-1.0.7/debian/control.modules.in
+++ zaptel-1.0.7/debian/control.modules.in
@@ -6,14 +6,14 @@
Build-Depends: debhelper (>> 3.0.0)
Standards-Version: 3.6.1.1
-Package: zaptel-modules-${kpkg:Kernel-Version}
+Package: zaptel-modules-_KVERS_
Architecture: any
Provides: zaptel-modules
-Description: zaptel modules for Linux (kernel ${kpkg:Kernel-Version}).
+Description: zaptel modules for Linux (kernel _KVERS_).
This package contains the set of loadable kernel modules for the
zapata telephony API.
.
- This package contains the compiled kernel modules for ${kpkg:Kernel-Version}
+ This package contains the compiled kernel modules for _KVERS.
.
If you have compiled your own kernel, you will most likely need to build
your own zaptel-modules. The zaptel-source package has been
reverted:
--- zaptel-1.0.7/debian/zaptel-source.files
+++ zaptel-1.0.7.orig/debian/zaptel-source.files
@@ -1,3 +0,0 @@
-usr/src/modules/zaptel
-usr/share/doc/zaptel-source/examples
-usr/include
--pf9I7BMVVzbSWLtt--