]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Change how the upstream tarball is generated
authorRuss Allbery <rra@debian.org>
Tue, 6 Apr 2010 21:30:15 +0000 (14:30 -0700)
committerRuss Allbery <rra@debian.org>
Tue, 6 Apr 2010 21:30:15 +0000 (14:30 -0700)
* Upstream no longer includes files covered by the Apple Public Source
  License, so we no longer have to repackage the upstream source to
  remove those files.  Drop Debian patches to the build system that were
  compensating for the removal of those files.
* Switch to generating upstream tarballs from the upstream Git tag
  rather than from tarball releases.  There's no reason to include all
  the generated files when we're going to regenerate them anyway, and
  this saves effort combining the doc and src tarballs.

debian/README.source
debian/changelog
debian/copyright
debian/rules

index 5f336802aa3141a01ce1e833a98c8efc6a3246f2..c02634816adba647a79766496244c7ea775b79bb 100644 (file)
@@ -38,20 +38,15 @@ Importing a New Upstream Release
     1. Update the package version in debian/changelog to match the new
        upstream version.  If the new upstream version is a release
        candidate, don't forget to add "~" before "rc" so that the versions
-       will sort property.  Add "+dfsg" to the upstream version to
-       indicate that we are repacking the upstream release tarball.  You
-       will need to commit this change before continuing.
+       will sort property.
 
-    2. Update debian/rules to change the UPSTREAM variable if obtaining
-       the upstream tarballs from a different location.  If you do not run
-       AFS on the system from which you're preparing a release, you'll
-       also need to change this to a URL and use wget instead of cp.  You
-       will need to commit this change before continuing.
+    2. Double-check the TAG setting in debian/rules to be sure it's going
+       to retrieve the correct Git tag.
 
-    3. Run debian/rules get-orig-source.  This will repack the upstream
-       tarball, remove non-DFSG files and the WINNT directory, and create
-       a file named openafs_<version>.orig.tar.gz in the current
-       directory.
+    3. Run debian/rules get-orig-source.  This will generate a tarball
+       from the upstream Git tag using git archive, remove the WINNT
+       directory, and create a file named openafs_<version>.orig.tar.gz in
+       the current directory.
 
     4. Ensure that you have the OpenAFS upstream Git repository available
        as a remote in the Git repository where you're doing the packaging
@@ -81,8 +76,8 @@ Importing a New Upstream Release
        <upstream-tag> is the corresponding tag from the upstream Git
        repository, and <local-tag> is of the form upstream/<version> where
        <version> is the non-Debian portion of the package version number.
-       (In other words, including any tildes and the "+dfsg" part, but not
-       the dash and the Debian revision.)
+       (In other words, including any tildes, but not the dash and the
+       Debian revision.)
 
     7. Commit the tarball to the repository with pristine-tar, using the
        new local tag as the reference:
@@ -138,4 +133,4 @@ Pulling Upstream Changes
        edited as necessary to keep the length of the changelog lines
        down.
 
- -- Russ Allbery <rra@debian.org>, Tue, 19 Jan 2010 20:34:36 -0800
+ -- Russ Allbery <rra@debian.org>, Tue,  6 Apr 2010 14:27:11 -0700
index fac4621ef5627cd2eeeb8b17f24103f87d53794f..adcd7bfa487af60852ef3545bc11e29092c7e52f 100644 (file)
@@ -30,6 +30,14 @@ openafs (1.5.72+dfsg-1) UNRELEASED; urgency=low
     same location.
   * Upstream builds specific files with -fno-strict-aliasing where needed,
     so we no longer need to build the whole source with that flag.
+  * Upstream no longer includes files covered by the Apple Public Source
+    License, so we no longer have to repackage the upstream source to
+    remove those files.  Drop Debian patches to the build system that were
+    compensating for the removal of those files.
+  * Switch to generating upstream tarballs from the upstream Git tag
+    rather than from tarball releases.  There's no reason to include all
+    the generated files when we're going to regenerate them anyway, and
+    this saves effort combining the doc and src tarballs.
 
  -- Russ Allbery <rra@debian.org>  Fri, 21 Aug 2009 22:19:03 -0700
 
index 5016a6dcc056abb4e9373f6113b5b8792e4ddaf1..402a9da5c04e379ea282a42d64a66a2436e2c31b 100644 (file)
@@ -1,25 +1,17 @@
 This package was debianized by Sam Hartman <hartmans@debian.org> on
 Fri,  3 Nov 2000 23:41:41 -0500.
 
-It was downloaded from either:
+It was downloaded via Git from:
 
-    http://www.openafs.org/release/
-    /afs/grand.central.org/software/openafs/
+    git://git.openafs.org/openafs.git
 
 Upstream Maintainers:
 
     openafs-gatekeepers@openafs.org
 
-The upstream source has been repackaged to remove the src/packaging/MacOS
-and src/platform/DARWIN directories and the files src/afs/sysctl.h and
-src/util/fstab.c.  These directories and files are only used for building
-on MacOS X and contained content covered by the Apple Public Source
-License 2.0.  This license is not considered DFSG-free.  Since the
-repackaging was needed anyway, the WINNT directory was also dropped,
-reducing the size of the upstream tarball by 8MB.
-
-The upstream openafs-src and openafs-doc tarballs have been combined into
-one source tarball.
+The upstream source is generated from a Git tag for the corresponding
+upstream release, but with the WINNT directory removed to reduces the size
+of the upstream tarball by about 8MB.
 
 The source package contains the OpenAFS documentation as distributed by
 the OpenAFS project, some of which does not include the original source.
index d9deef8c26627601b2b0831e931fb51ccd2ec7bd..3e1fd0b1ebdd753143a38fd05b011707df6032e7 100755 (executable)
@@ -54,27 +54,29 @@ IGNORE = -XAuthLog -Xcompile_et -Xcopyauth -Xdlog -Xdpass -Xfms.log     \
 IGNORE += -Xpam_afs
 
 # These variables are used by get-orig-source and to construct dkms.conf.
-DEBVERS  := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
+# You will need to change TAG to package stable releases instead of
+# experimental releases.
+DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \
                | cut -d- -f1)
-VERSION  := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
-UPSTREAM  = /afs/grand.central.org/software/openafs/$(VERSION)
-
-# Download the upstream source, merge in the doc tarball, and do the
-# repackaging that we have to do for DFSG reasons.  This assumes AFS is
-# mounted, as it's generally only used by the package maintainers.
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
+TAG     := $(shell echo 'openafs-devel-$(VERSION)' | sed 's/\./_/g')
+REPO    := git://git.openafs.org/openafs.git
+
+# Upstream does tarball releases for major releases, but not for point
+# relesaes, and the tarball releases are split into src and doc and contain
+# the WINNT directory.  Dropping WINNT, which is not used on Debian, saves a
+# substantial amount of space in the source package, and there's no reason
+# to include the files generated by regen.sh when we're going to run it
+# again ourselves anyway.
+#
+# This rule therefore generates an upstream tarball from the upstream Git
+# tag, rather than the tarball release, without the generated files that are
+# not in Git and without the WINNT directory.  It assumes that git-core is
+# installed and there's network connectivity to the upstream repository.
 get-orig-source:
-       cp $(UPSTREAM)/openafs-$(VERSION)-src.tar.bz2 .
-       tar xjf openafs-$(VERSION)-src.tar.bz2
-       rm openafs-$(VERSION)-src.tar.bz2
-       cp $(UPSTREAM)/openafs-$(VERSION)-doc.tar.bz2 .
-       tar xjf openafs-$(VERSION)-doc.tar.bz2
-       rm openafs-$(VERSION)-doc.tar.bz2
-       rm -r openafs-$(VERSION)/src/packaging/MacOS
-       rm -r openafs-$(VERSION)/src/platform/DARWIN
-       rm -r openafs-$(VERSION)/src/WINNT
-       rm openafs-$(VERSION)/src/afs/sysctl.h
-       rm openafs-$(VERSION)/src/util/fstab.c
-       mv openafs-$(VERSION) openafs_$(DEBVERS).orig
+       git archive --remote='$(REPO)' --prefix='openafs_$(DEBVERS).orig/' \
+           --format=tar '$(TAG)' | tar xf
+       rm -r openafs_$(DEBVERS).orig/src/WINNT
        tar cf openafs_$(DEBVERS).orig.tar openafs_$(DEBVERS).orig
        rm -r openafs_$(DEBVERS).orig
        gzip -9 openafs_$(DEBVERS).orig.tar