Autogenerate a Debian changelog for correct package versioning
authorRuss Allbery <rra@stanford.edu>
Tue, 13 Apr 2010 23:32:49 +0000 (16:32 -0700)
committerDerrick Brashear <shadow@dementia.org>
Thu, 15 Apr 2010 02:05:16 +0000 (19:05 -0700)
The Debian packaging infrastructure takes the package version from the
most recent entry in the changelog file.  Change the changelog file to
a template and add an entry to the top that will be set to the current
version of OpenAFS, with a Debian revision that will sort before any
official package.

Change-Id: Ic7fb1d30be10210b7d032cdc49a963410997db82
Reviewed-on: http://gerrit.openafs.org/1749
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

configure.in
src/packaging/Debian/.gitignore [new file with mode: 0644]
src/packaging/Debian/changelog.in [moved from src/packaging/Debian/changelog with 99% similarity]

index 3ae36aa..022dcac 100644 (file)
@@ -6,9 +6,18 @@ LINUX_PKGVER=1.5.73.3
 #LINUX_PKGREL=0.pre3
 LINUX_PKGREL=1.1
 
+dnl Debian wants the release candidate version in the main upstream version,
+dnl and wants ~ before it.
+if echo "$LINUX_PKGREL" | grep pre >/dev/null 2>/dev/null ; then
+    DEB_PKGVER="$LINUX_PKGVER"`echo "$LINUX_PKGREL" | sed 's/0.pre/~rc/'`
+else
+    DEB_PKGVER="$LINUX_PKGVER"
+fi
+
 AC_SUBST(MACOS_VERSION)
 AC_SUBST(LINUX_PKGVER)
 AC_SUBST(LINUX_PKGREL)
+AC_SUBST(DEB_PKGVER)
 
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC
@@ -107,6 +116,7 @@ src/log/Makefile \
 src/log/test/Makefile \
 src/lwp/Makefile \
 src/lwp/test/Makefile \
+src/packaging/Debian/changelog \
 src/packaging/MacOS/OpenAFS-debug.Description.plist \
 src/packaging/MacOS/OpenAFS-debug.Info.plist \
 src/packaging/MacOS/OpenAFS.Description.plist \
diff --git a/src/packaging/Debian/.gitignore b/src/packaging/Debian/.gitignore
new file mode 100644 (file)
index 0000000..19da35d
--- /dev/null
@@ -0,0 +1,5 @@
+# After changing this file, please run
+#     git ls-files -i --exclude-standard
+# to check that you haven't inadvertently ignored any tracked files.
+
+/changelog
similarity index 99%
rename from src/packaging/Debian/changelog
rename to src/packaging/Debian/changelog.in
index ddd325c..d2ce64d 100644 (file)
@@ -1,3 +1,17 @@
+openafs (@DEB_PKGVER@-1~openafs) unstable; urgency=low
+
+  * Local package built from OpenAFS source.
+  * This Debian package was generated using the packaging files included
+    in the OpenAFS release, provided as a convenience for users who would
+    like to quickly build Debian packages based on the current OpenAFS
+    code.  For production use, the packages included in Debian and Ubuntu
+    should normally be used instead.  The version of this package is set
+    so that it will be automatically upgraded to the official Debian or
+    Ubuntu versions when packages for at least this version of OpenAFS are
+    available.
+
+ -- Russ Allbery <rra@debian.org>  Thu, 08 Apr 2010 13:20:50 -0700
+
 openafs (1.5.73.3-1) experimental; urgency=low
 
   * New upstream testing release.