]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
First cut at debhelper 7 support
authorRuss Allbery <rra@debian.org>
Thu, 12 Feb 2009 21:23:20 +0000 (13:23 -0800)
committerRuss Allbery <rra@debian.org>
Thu, 12 Feb 2009 21:23:20 +0000 (13:23 -0800)
* Update to debhelper compatibility level V7.
  - Use dh where possible in debian/rules.
  - Use dh_lintian to install Lintian overrides.
  - Eliminate the configure target and do all the work in build.
  - Do more in the install target and less in binary, matching the
    default command stacks in dh.
  - Use a debian/clean configuration file to let dh clean do more of the
    work rather than using rm commands in debian/rules.

debian/changelog
debian/clean [new file with mode: 0644]
debian/compat
debian/control
debian/openafs-client.lintian [deleted file]
debian/openafs-client.lintian-overrides [new file with mode: 0644]
debian/openafs-dbserver.lintian [deleted file]
debian/openafs-dbserver.lintian-overrides [new file with mode: 0644]
debian/openafs-fileserver.lintian [deleted file]
debian/openafs-fileserver.lintian-overrides [new file with mode: 0644]
debian/rules

index 15f29d964ac0e63bca790e88baa9986dd0ba9904..3e28ed36905a2b59c38ce134ab50c6a42bcf194a 100644 (file)
@@ -32,6 +32,14 @@ openafs (1.4.8.dfsg1-1) UNRELEASED; urgency=low
     Kaseorg and Lutz Goehring for suggestions.  (LP: #295897)
   * Allow time-daemon to satisfy the openafs-fileserver recommends in
     addition to ntp, allowing for openntpd.  (Closes: #508258)
+  * Update to debhelper compatibility level V7.
+    - Use dh where possible in debian/rules.
+    - Use dh_lintian to install Lintian overrides.
+    - Eliminate the configure target and do all the work in build.
+    - Do more in the install target and less in binary, matching the
+      default command stacks in dh.
+    - Use a debian/clean configuration file to let dh clean do more of the
+      work rather than using rm commands in debian/rules.
   * Add ${misc:Depends} to all dependencies.
   * Add explanations for the Lintian overrides.
   * Use set -e instead of #!/bin/sh -e in maintainer scripts.
diff --git a/debian/clean b/debian/clean
new file mode 100644 (file)
index 0000000..9c2b667
--- /dev/null
@@ -0,0 +1,8 @@
+aclocal.m4
+configure
+configure-libafs
+doc/man-pages/man1/*.1
+doc/man-pages/man5/*.5
+doc/man-pages/man8/*.8
+src/kauth/ka-forwarder
+src/packaging/RedHat/openafs.spec
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..7f8f011eb73d6043d2e6db9d2c101195ae2801f2 100644 (file)
@@ -1 +1 @@
-5
+7
index 514900e90045acc479d5269d1ad3faa82b305015..342b658919af6897c1e4e09094319a20ae7f3ddb 100644 (file)
@@ -3,8 +3,8 @@ Section: net
 Priority: optional
 Maintainer: Russ Allbery <rra@debian.org>
 Uploaders: Sam Hartman <hartmans@debian.org>
-Build-Depends: debhelper (>= 5), libncurses5-dev, libpam0g-dev, bison,
- flex, perl, comerr-dev, libkrb5-dev, autoconf, automake
+Build-Depends: debhelper (>= 7), autoconf, automake, bison, comerr-dev,
+ flex, libkrb5-dev, libncurses5-dev, libpam0g-dev, perl
 Standards-Version: 3.8.0
 Homepage: http://www.openafs.org/
 Vcs-Git: git://git.debian.org/git/pkg-k5-afs/openafs.git
diff --git a/debian/openafs-client.lintian b/debian/openafs-client.lintian
deleted file mode 100644 (file)
index ef9985f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# The AFS client cache should not be world-readable, since it may contain
-# files only readable by some of the local users based on their tokens.
-openafs-client: non-standard-dir-perm /var/cache/openafs/ 0700 != 0755
diff --git a/debian/openafs-client.lintian-overrides b/debian/openafs-client.lintian-overrides
new file mode 100644 (file)
index 0000000..ef9985f
--- /dev/null
@@ -0,0 +1,3 @@
+# The AFS client cache should not be world-readable, since it may contain
+# files only readable by some of the local users based on their tokens.
+openafs-client: non-standard-dir-perm /var/cache/openafs/ 0700 != 0755
diff --git a/debian/openafs-dbserver.lintian b/debian/openafs-dbserver.lintian
deleted file mode 100644 (file)
index cf65ecb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# The database directory should be kept locked down to prevent reading
-# database information that may not be accessible without authentication.
-openafs-dbserver: non-standard-dir-perm var/lib/openafs/db/ 0700 != 0755
diff --git a/debian/openafs-dbserver.lintian-overrides b/debian/openafs-dbserver.lintian-overrides
new file mode 100644 (file)
index 0000000..cf65ecb
--- /dev/null
@@ -0,0 +1,3 @@
+# The database directory should be kept locked down to prevent reading
+# database information that may not be accessible without authentication.
+openafs-dbserver: non-standard-dir-perm var/lib/openafs/db/ 0700 != 0755
diff --git a/debian/openafs-fileserver.lintian b/debian/openafs-fileserver.lintian
deleted file mode 100644 (file)
index f77b31f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# /etc/openafs/server contains the KeyFile for the server, so it's kept
-# locked down as an extra precaution.
-openafs-fileserver: non-standard-dir-perm etc/openafs/server/ 0700 != 0755
diff --git a/debian/openafs-fileserver.lintian-overrides b/debian/openafs-fileserver.lintian-overrides
new file mode 100644 (file)
index 0000000..f77b31f
--- /dev/null
@@ -0,0 +1,3 @@
+# /etc/openafs/server contains the KeyFile for the server, so it's kept
+# locked down as an extra precaution.
+openafs-fileserver: non-standard-dir-perm etc/openafs/server/ 0700 != 0755
index d6c198b84761e96b1db131344a461e1153631ef5..f662632b22e5433706c08c795ed5d29db9e6703c 100755 (executable)
@@ -32,9 +32,6 @@ SYS_NAME  := $(shell sh debian/sysname)
 package    = openafs
 srcpkg     = openafs-modules-source
 
-# These packages have lintian overrides.
-LINTIAN_PACKAGES = openafs-dbserver openafs-client openafs-fileserver
-
 # The /usr/share/doc directory for these packages should be a symlink to
 # /usr/share/doc/openafs-client.  Any package on this list must depend on
 # openafs-client.
@@ -83,10 +80,12 @@ get-orig-source:
 
 # Handle the renaming of the up man page to afs-up here since the man pages
 # are generated from POD source by regen.sh.
-configure: configure-stamp
-configure-stamp:
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep:
+build-stamp:
        @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
-       dh_testdir
+       dh build --before configure
        mv doc/man-pages/pod1/up.pod doc/man-pages/pod1/afs-up.pod
        rm -f doc/man-pages/man1/up.1
        sh regen.sh
@@ -101,37 +100,57 @@ configure-stamp:
            --enable-debug --enable-lwp-debug \
            $(DEBIAN_OPT_FLAGS) $(SYSTEM)
        chmod a+x src/libafs/make_kbuild_makefile.pl
-       touch $@
-
-build: build-arch build-indep
-build-arch: configure-stamp build-stamp
-build-indep:
-build-stamp:
-       dh_testdir
-       mkdir -p $(CURDIR)/debian/tmp
-       $(MAKE) install_nolibafs DESTDIR=$(CURDIR)/debian/tmp
-       rm -f debian/tmp/usr/bin/klog.krb
-       chmod +x debian/afs-rootvol debian/afs-newcell
+       dh build --after configure
        touch $@
 
 clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp install-stamp
        [ ! -f doc/man-pages/pod1/afs-up.pod ] \
            || mv doc/man-pages/pod1/afs-up.pod doc/man-pages/pod1/up.pod
-       [ ! -f Makefile ] || $(MAKE) distclean
-       dh_clean aclocal.m4 configure configure-libafs doc/man-pages/man1/*.1 \
-           doc/man-pages/man5/*.5 doc/man-pages/man8/*.8 \
-           src/kauth/ka-forwarder src/packaging/RedHat/openafs.spec
+       dh clean
 
-install: install-stamp
-install-stamp: DH_OPTIONS=
-install-stamp: build-stamp
+# Rules for building the openafs-modules-source package.
+install-source-stamp:
        dh_testdir
        dh_testroot
+       rm -rf debian/$(srcpkg)
+       install -d debian/$(srcpkg)/usr/src/modules/$(package)
+       find . \( -name \*.o -o -path ./debian -o -path \*/.svn \
+           -o -path ./src/WINNT -o -path ./doc -o -path ./obj \
+           -o -path ./$(SYS_NAME) -o -path ./.pc \) -prune -o -print | \
+               cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
+       mkdir -p debian/$(srcpkg)/usr/src/modules/$(package)/debian
+       cp debian/changelog debian/copyright debian/module/* \
+           debian/$(srcpkg)/usr/src/modules/$(package)/debian/
+       chmod 755 debian/$(srcpkg)/usr/src/modules/$(package)/debian/rules
+       rm -f debian/$(srcpkg)/usr/src/modules/$(package)/*-stamp
+       cd debian/$(srcpkg)/usr/src/modules/$(package) && \
+           $(MAKE) distclean
+       -cd debian/$(srcpkg)/usr/src/modules/$(package) && \
+           rm -rf src/libafs/rx src/libafs/afs src/libafs/afsint
+       chown -R root.src debian/$(srcpkg)
+       find debian/$(srcpkg) -type d | xargs chmod 755
+       find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
+       find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
+       chmod 775 debian/$(srcpkg)/usr/src/modules
+       cd debian/$(srcpkg)/usr/src && \
+           tar cf $(package).tar modules && \
+           rm -r modules
+       gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
+       chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
+       touch $@
+
+install: install-stamp
+install-stamp: DH_OPTIONS=
+install-stamp: build-stamp install-source-stamp
+       dh install --until dh_prep
+       mkdir -p $(CURDIR)/debian/tmp
+       $(MAKE) install_nolibafs DESTDIR=$(CURDIR)/debian/tmp
+       rm -f debian/tmp/usr/bin/klog.krb
+       chmod +x debian/afs-rootvol debian/afs-newcell
        dh_installdirs
        dh_install --fail-missing $(IGNORE)
+       dh_installinit -popenafs-client -r -- defaults 25 20
+       dh_installinit -popenafs-fileserver -r
 
        set -e; for pkg in $(LINTIAN_PACKAGES) ; do \
            install -d debian/$$pkg/usr/share/lintian/overrides; \
@@ -166,95 +185,32 @@ install-stamp: build-stamp
            afs-newcell ) \
            >debian/openafs-dbserver/usr/share/man/man8/afs-newcell.8
 
-       touch $@
-
-# Rules for building the openafs-modules-source package.
-binary-source:
-       dh_testdir
-       dh_testroot
-       -rm -rf debian/$(srcpkg) debian/substvars
-       install -d debian/$(srcpkg)/usr/src/modules/$(package)
-       find . \( -name \*.o -o -path ./debian -o -path \*/.svn \
-           -o -path ./src/WINNT -o -path ./doc -o -path ./obj \
-           -o -path ./$(SYS_NAME) -o -path ./.pc \) -prune -o -print | \
-               cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
-       mkdir -p debian/$(srcpkg)/usr/src/modules/$(package)/debian
-       cp debian/changelog debian/copyright debian/module/* \
-           debian/$(srcpkg)/usr/src/modules/$(package)/debian/
-       chmod 755 debian/$(srcpkg)/usr/src/modules/$(package)/debian/rules
-       rm -f debian/$(srcpkg)/usr/src/modules/$(package)/*-stamp
-       cd debian/$(srcpkg)/usr/src/modules/$(package) && \
-           $(MAKE) distclean
-       -cd debian/$(srcpkg)/usr/src/modules/$(package) && \
-           rm -rf src/libafs/rx src/libafs/afs src/libafs/afsint
-       chown -R root.src debian/$(srcpkg)
-       find debian/$(srcpkg) -type d | xargs chmod 755
-       find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
-       find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
-       chmod 775 debian/$(srcpkg)/usr/src/modules
-       cd debian/$(srcpkg)/usr/src && \
-           tar cf $(package).tar modules && \
-           rm -r modules
-       gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
-       chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
-
-# Build architecture-independent files here.  Pass -i to all debhelper
-# commands in this target to reduce clutter.
-#
-# Also install debian/openafs-client.NEWS in the openafs-modules-source
-# package.
-binary-indep: DH_OPTIONS=-i
-binary-indep: install-stamp binary-source
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs NEWS
        install -m 644 debian/openafs-client.NEWS \
            debian/$(srcpkg)/usr/share/doc/$(srcpkg)/NEWS.Debian
-       dh_installdocs -XAdminReference -XQuickStartWindows -Xwinnotes
-       dh_installexamples
-       dh_link
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
 
-# Build architecture-dependent files here.  Pass -a to all debhelper commands
-# in this target to reduce clutter.
-#
+       dh install --after dh_install
+       chmod 700 debian/openafs-client/var/cache/openafs
+       chmod 700 debian/openafs-dbserver/var/lib/openafs/db
+       chmod 700 debian/openafs-fileserver/etc/openafs/server
+       touch $@
+
+binary-indep: install-stamp
+       dh binary-indep
+
 # Only include debugging information for the servers installed into
 # /usr/lib/openafs rather than for all binaries.  The servers are where
 # debugging backtraces really matter, and a 10MB debugging package is
 # overkill.
-binary-arch: DH_OPTIONS=-a
 binary-arch: install-stamp
-       dh_testdir
-       dh_testroot
-       dh_installchangelogs NEWS
-       dh_installdocs
-       dh_installdebconf
-       DH_OPTIONS= dh_installinit -popenafs-client -r -- defaults 25 20
-       DH_OPTIONS= dh_installinit -popenafs-fileserver -r
-       dh_link
+       dh binary-arch --before dh_strip
        dh_strip --dbg-package=openafs-dbg
        rm -rf debian/openafs-dbg/usr/lib/debug/lib
        rm -rf debian/openafs-dbg/usr/lib/debug/sbin
        rm -rf debian/openafs-dbg/usr/lib/debug/usr/bin
        rm -rf debian/openafs-dbg/usr/lib/debug/usr/sbin
-       dh_compress
-       dh_fixperms
-       chmod 700 debian/openafs-client/var/cache/openafs
-       chmod 700 debian/openafs-dbserver/var/lib/openafs/db
-       chmod 700 debian/openafs-fileserver/etc/openafs/server
-       dh_perl
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+       dh binary-arch --remaining
 
 binary: binary-indep binary-arch
 
-.PHONY: binary binary-arch binary-indep binary-source build build-arch
-.PHONY: build-indep clean configure install
+.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
+.PHONY: install