* Fix path to afsd in /etc/init.d/openafs-client
* Build openafs module packages
- --
+ -- <hartmans@mit.edu> Mon, 6 Nov 2000 09:39:11 -0500
openafs (1.0.snap20001103-1) unstable; urgency=low
Package: openafs-client
Architecture: any
-Depends: ${shlibs:Depends}, debconf
+Depends: ${shlibs:Depends}, debconf, openafs-modules
Description: The AFS distributed filesystem- client support
AFS is a distributed filesystem allowing cross-platform sharing of
files among multiple computers. Facilities are provided for access
--- /dev/null
+Source: openafs
+Section: non-us
+Priority: optional
+Maintainer: Sam Hartman <hartmans@mit.edu>
+Standards-Version: 3.1.1
+
+Package: openafs-modules-=KVERS
+Conflicts: openafs-client (= 1.0.snap20001103-1)
+Provides: openafs-modules
+Architecture: any
+Description: The AFS distributed filesystem- Kernel Module
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers. Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides the kernel module for the filesystem
--- /dev/null
+Source: openafs
+Section: non-us
+Priority: optional
+Maintainer: Sam Hartman <hartmans@mit.edu>
+Standards-Version: 3.1.1
+
+Package: openafs-modules-=KVERS
+Conflicts: openafs-client (= 1.0.snap20001103-1)
+Provides: openafs-modules
+Architecture: any
+Recommends: kernel-image-=KVERS (= =KREVS)
+Description: The AFS distributed filesystem- Kernel Module
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers. Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides the kernel module for the filesystem
--- /dev/null
+#!/bin/sh
+# genchanges.sh - generate a changes file for a deb file generated via
+# the make-kpkg utility
+
+# KSRC KMAINT and KEMAIL are expected to be passed through the environment
+
+set -e
+umask 022
+
+#KVERS=`cat debian/KVERS`
+MODVERS=`cat debian/VERSION | sed s/:/\+/`
+ARCH=`dpkg --print-architecture`
+
+mprefix=`grep Package: debian/control.module | cut -d' ' -f 2 | cut -d= -f 1`
+
+# the changes file's name
+chfile="$KSRC/../$mprefix${KVERS}_${MODVERS}_${ARCH}.changes"
+
+dpkg-genchanges -b ${KMAINT:+-m"$KMAINT <$KEMAIL>"} -u"$KSRC/.." \
+ -cdebian/control > "$chfile.pt"
+pgp -fast ${KMAINT:+-u"$KMAINT"} < "$chfile.pt" > "$chfile"
+rm "$chfile.pt"
+afs
var/cache/openafs
etc/openafs
etc/init.d
--- /dev/null
+#!/bin/sh -e
+
+depmod -a
+update-modules
+
+exit 0
--- /dev/null
+#! /bin/sh
+
+set -e
+
+if [ $# -ne 2 ]; then
+ echo Usage: $0 kernelsource-location control-template
+ exit 1
+fi
+
+
+changelog="$1/debian/changelog"
+if [ -n "$KVERS" ] && [ -n "$KDREV" ]; then
+ linuxversion=$KVERS
+ kernversion=$KDREV
+
+elif [ ! -f $changelog ]; then
+ linuxversion=`awk '{ if (NR==1) v=$3; else if (NR==2) p=$3; else if (NR==3) s=$3; \
+ else if (NR==4) { e=$3; exit; } } \
+ END { printf("%s.%s.%s%s\n",v,p,s,e); }' $1/Makefile`
+
+ if [ -z "$KDREV" ]; then
+ kernversion=$linuxversion-0
+ else
+ kernversion=$KDREV
+ fi
+
+else
+ linuxversion=`head -1 $changelog | \
+ sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'`
+ kernversion=`head -1 $changelog | \
+ sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'`
+fi
+
+pkgversion=`head -1 debian/changelog | \
+ sed -e 's/.*(\([^)]*\)).*/\1/'`
+
+pkgupversion=`echo $pkgversion | cut -d- -f 1`
+pkgupversion2=`perl -e "\"$pkgupversion\" =~ /(.*?)(\d+)\D*$/;"'printf $1 . ($2+1);'`
+
+sed -e s/=KVERS/$linuxversion/g -e s/=KREVS/$kernversion/g -e s/=AVERS/$pkgupversion/g -e s/=2AVERS/$pkgupversion2/g $2
+
+mprefix=`grep Package: $2 | cut -d' ' -f 2 | cut -d= -f 1`
+
+rm -f debian/tmp/usr/share/doc/$mprefix$linuxversion
+
+
+epochversion=`echo $kernversion | sed -n -e 's/^\([0-9]*\):.*/\1/p' -e 's/.*//'`
+kernversion="$pkgversion+`echo $kernversion | sed -e 's/^[0-9]*://'`"
+
+if [ -n "$epochversion" ]; then
+ kernversion=$epochversion:$kernversion
+fi
+echo "$kernversion" > debian/VERSION
+echo "$linuxversion" > debian/KVERS
--- /dev/null
+#!/bin/sh -e
+exit 0
# The AFS sysname is determined by a script
SYS_NAME=$(shell debian/sysname)
package=openafs
-srcpkg = openafs-module-source
-modulepkg=openafs-module-$(KVERS)
+srcpkg = openafs-modules-source
+modulepkg=$(shell echo openafs-modules-$(KVERS))
ifndef KSRC
KSRC=/usr/src/linux
endif
else if (NR==4) { e=$$3; exit; } } \
END { printf("%s.%s.%s%s\n",v,p,s,e); }' $(KSRC)/Makefile`
+export KSRC
+export KVERS
configure: configure-stamp
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
-binary-indep: build install
+binary-indep: build install binary-source
# Need this version of debhelper for DH_OPTIONS to work.
dh_testversion 1.1.17
dh_testdir
dh_md5sums
dh_builddeb
-binary: binary-arch
+binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install configure
############################Module package support
-kdist_image: build
+kdist_image: build-modules
$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. binary-modules
$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
-kdist: build
+kdist: build-modules
$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. KERNEL_DEPENDS=y binary-modules
KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
sh -v debian/genchanges.sh
install -d debian/$(srcpkg)
# Clean up the sources
install -d debian/$(srcpkg)/usr/src/modules/$(package)
- find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS \) -prune -o -print | \
+ find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS -o -path ./src/WINNT \
+ -o -path ./obj -o -path ./$(SYS_NAME) \) -prune -o -print | \
cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
( cd debian/$(srcpkg)/usr/src/modules/$(package); \
$(MAKE) -f debian/rules clean)
sed -e 's#debian/$(modulepkg)/##' > debian/$(modulepkg)/DEBIAN/md5sums
dpkg-gencontrol -isp \
- -p`\ls -1 debian/$(modulepkg)/usr/share/doc` \
+ -p$(modulepkg) \
-v`cat debian/VERSION` \
-Pdebian/$(modulepkg)
chown -R root.root debian/$(modulepkg)