From: Russ Allbery Date: Tue, 6 Apr 2010 21:30:15 +0000 (-0700) Subject: Change how the upstream tarball is generated X-Git-Tag: debian/1.5.73.3-1~18 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=74d7f2ed664ea7ccdce6b88483d9aa5b65b4ec9f;p=packages%2Fo%2Fopenafs.git Change how the upstream tarball is generated * 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. --- diff --git a/debian/README.source b/debian/README.source index 5f336802a..c02634816 100644 --- a/debian/README.source +++ b/debian/README.source @@ -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_.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_.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 is the corresponding tag from the upstream Git repository, and is of the form upstream/ where 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 , Tue, 19 Jan 2010 20:34:36 -0800 + -- Russ Allbery , Tue, 6 Apr 2010 14:27:11 -0700 diff --git a/debian/changelog b/debian/changelog index fac4621ef..adcd7bfa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 21 Aug 2009 22:19:03 -0700 diff --git a/debian/copyright b/debian/copyright index 5016a6dcc..402a9da5c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,25 +1,17 @@ This package was debianized by Sam Hartman 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. diff --git a/debian/rules b/debian/rules index d9deef8c2..3e1fd0b1e 100755 --- a/debian/rules +++ b/debian/rules @@ -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