Remove automake autoconf vars 57/13357/2
authorAndrew Deason <adeason@sinenomine.net>
Thu, 11 Oct 2018 05:18:17 +0000 (00:18 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 16 Oct 2018 16:18:08 +0000 (12:18 -0400)
Commit 4706854f (autoconf: updates and cleanup) removed our invocation
of AM_INIT_AUTOMAKE, which defines the output variables PACKAGE and
VERSION. Several files in our build system are still referencing
@PACKAGE@ and @VERSION@, though, leaving them un-substituted. This
most easily is seen as the AFSVersion version string remaining as
"@VERSION@" when the tree is built without git, but it also affects
some packaging in the tree.

Remove references to @VERSION@ and @PACKAGE@, replacing them with
their autoconf equivalents @PACKAGE_VERSION@ and @PACKAGE_TARNAME@.

Change-Id: I6c6a09a46c4af4259009a4a60cfdaee63d6258c2
Reviewed-on: https://gerrit.openafs.org/13357
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/config/Makefile.version-CML.in
src/config/Makefile.version-NOCML.in
src/packaging/MacOS/OpenAFS-debug.Description.plist.in
src/packaging/MacOS/OpenAFS.Description.plist.in
src/packaging/MacOS/OpenAFS.info.in
src/packaging/MacOS/buildpkg.sh.in
src/packaging/MacOS/pkgbuild.sh.in
src/packaging/RedHat/openafs.spec.in
src/tests/run-tests.in

index 45c4b84..0a08a92 100644 (file)
@@ -5,8 +5,8 @@
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
 
-PACKAGE=@PACKAGE@
-VERSION=@VERSION@
+PACKAGE=@PACKAGE_TARNAME@
+VERSION=@PACKAGE_VERSION@
 
 AFS_component_version_number.o: AFS_component_version_number.c $(TOP_SRCDIR)/config/mkvers
 version.xml version.txt: $(TOP_SRCDIR)/config/mkvers
index c65cfe9..8a11ee8 100644 (file)
@@ -5,12 +5,12 @@
 # License.  For details, see the LICENSE file in the top-level source
 # directory or online at http://www.openafs.org/dl/license10.html
 
-PACKAGE=@PACKAGE@
+PACKAGE=@PACKAGE_TARNAME@
 
 AFS_component_version_number.o: AFS_component_version_number.c
 
 AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
-       ( VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@VERSION@"` && \
+       ( VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@PACKAGE_VERSION@"` && \
        if [ "$$SOURCE_DATE_EPOCH" ]; then \
             echo 'char cml_version_number[]="@(#)OpenAFS '$$VERSION `date -u -d "@$$SOURCE_DATE_EPOCH" +"%Y-%m-%d" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" +"%Y-%m-%d"`'";'; \
        else \
@@ -22,7 +22,7 @@ AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
        rm -f AFS_component_version_number.c.NEW
 
 version.xml:
-       VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@VERSION@"` && \
+       VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@PACKAGE_VERSION@"` && \
        echo '<?xml version="1.0" encoding="UTF-8"?>' >version.xml && \
        echo '<revision>' >>version.xml && \
        echo '<revnumber>'$$VERSION'</revnumber>' >>version.xml && \
index 2667452..dfbb4dc 100644 (file)
@@ -9,6 +9,6 @@
        <key>IFPkgDescriptionTitle</key>
        <string>OpenAFS debug extension</string>
        <key>IFPkgDescriptionVersion</key>
-       <string>@VERSION@</string>
+       <string>@PACKAGE_VERSION@</string>
 </dict>
 </plist>
index 8dece17..3cab1f7 100644 (file)
@@ -9,6 +9,6 @@
        <key>IFPkgDescriptionTitle</key>
        <string>OpenAFS</string>
        <key>IFPkgDescriptionVersion</key>
-       <string>@VERSION@</string>
+       <string>@PACKAGE_VERSION@</string>
 </dict>
 </plist>
index a3d04a5..ac40126 100644 (file)
@@ -1,5 +1,5 @@
 Title OpenAFS
-Version @VERSION@
+Version @PACKAGE_VERSION@
 Description The OpenAFS distributed filesystem. This package installs a ready-to-run client for OpenAFS. See http://www.openafs.org for more information.
 DefaultLocation /
 Diskname (null)
index 143bda7..ec3711c 100644 (file)
@@ -306,14 +306,14 @@ if [ $secondpass = yes ]; then
     if [ $majorvers -ge 8 ]; then
        mv $CURDIR/OpenAFS-debug-extension.pkg $CURDIR/dmg
     fi
-    rm -rf $CURDIR/OpenAFS-@VERSION@-$RELNAME.dmg
+    rm -rf $CURDIR/OpenAFS-@PACKAGE_VERSION@-$RELNAME.dmg
     cp $RESSRC/Uninstall $CURDIR/dmg/Uninstall.command
     cp $RESSRC/DS_Store $CURDIR/dmg/.DS_Store
     mkdir $CURDIR/dmg/.background
     cp $RESSRC/afslogo.jpg $CURDIR/dmg/.background
 #    hdiutil create -srcfolder $CURDIR/dmg -volname OpenAFS -anyowners $CURDIR/OpenAFS.dmg
     hdiutil makehybrid -hfs -hfs-volume-name OpenAFS -hfs-openfolder $CURDIR/dmg $CURDIR/dmg -o $CURDIR/TMP.dmg
-    hdiutil convert -format UDZO $CURDIR/TMP.dmg -o $CURDIR/OpenAFS-@VERSION@-$RELNAME.dmg
+    hdiutil convert -format UDZO $CURDIR/TMP.dmg -o $CURDIR/OpenAFS-@PACKAGE_VERSION@-$RELNAME.dmg
     rm $CURDIR/TMP.dmg
     rm -rf $CURDIR/dmg
     # Unfortunately, sudo sets $USER to root, so I can't chown the 
index 3570d7a..d65f585 100644 (file)
@@ -426,7 +426,7 @@ if [ x"$PASS2" = x1 ]; then
 
     rm -rf "$CURDIR"/OpenAFS-debug-extension.pkg
     /usr/bin/pkgbuild --root "$DPKGROOT" --id org.openafs.OpenAFS-debug.pkg \
-                     --version '@VERSION@' \
+                     --version '@PACKAGE_VERSION@' \
             "$CURDIR"/OpenAFS-debug-extension.pkg
 
     cd "$RESSRC"
@@ -445,7 +445,7 @@ if [ x"$PASS2" = x1 ]; then
 
     rm -rf "$CURDIR"/OpenAFS-dist.pkg
     /usr/bin/pkgbuild --root "$PKGROOT" --id org.openafs.OpenAFS.pkg \
-                     --version '@VERSION@' \
+                     --version '@PACKAGE_VERSION@' \
                      --scripts "$PKGRES" "$CURDIR"/OpenAFS-dist.pkg
 
     rm -rf "$PKGRES"
@@ -466,7 +466,7 @@ if [ x"$PASS2" = x1 ]; then
     sed -e "s/%%OSX_MAJOR_CUR%%/$THISREL/g" \
        -e "s/%%OSX_MAJOR_NEXT%%/$(( $THISREL + 1 ))/g" \
        -e "s,%%PRES_EXTRA%%,$PRES_EXTRA,g" \
-       -e "s/%%OPENAFS_VERSION%%/@VERSION@/g" \
+       -e "s/%%OPENAFS_VERSION%%/@PACKAGE_VERSION@/g" \
        < Distribution.xml.in > Distribution.xml
 
     rm -rf "$CURDIR/prod"
@@ -484,7 +484,7 @@ if [ x"$PASS2" = x1 ]; then
 
     rm -rf "$CURDIR/dmg"
     rm -f "$CURDIR/TMP.dmg"
-    rm -rf "$CURDIR/OpenAFS-@VERSION@-$RELNAME.dmg"
+    rm -rf "$CURDIR/OpenAFS-@PACKAGE_VERSION@-$RELNAME.dmg"
 
     mkdir "$CURDIR"/dmg
     mv "$CURDIR"/OpenAFS.pkg "$CURDIR"/dmg
@@ -500,8 +500,8 @@ if [ x"$PASS2" = x1 ]; then
     hdiutil create -srcfolder "$CURDIR"/dmg -volname OpenAFS \
            -o "$CURDIR"/TMP.dmg
     hdiutil convert -format UDZO "$CURDIR"/TMP.dmg \
-           -o "$CURDIR/OpenAFS-@VERSION@-$RELNAME".dmg
+           -o "$CURDIR/OpenAFS-@PACKAGE_VERSION@-$RELNAME".dmg
 
     echo
-    echo "Created $CURDIR/OpenAFS-@VERSION@-$RELNAME".dmg
+    echo "Created $CURDIR/OpenAFS-@PACKAGE_VERSION@-$RELNAME".dmg
 fi
index d650d6c..56af286 100644 (file)
@@ -1,6 +1,6 @@
 # Openafs Spec $Revision$
 
-%define afsvers @VERSION@
+%define afsvers @PACKAGE_VERSION@
 %define pkgvers @LINUX_PKGVER@
 # for beta/rc releases make pkgrel 0.<tag>
 # for real releases make pkgrel 1 (or more for extra releases)
index d0fc73d..1ab12ad 100755 (executable)
@@ -28,8 +28,8 @@ srcdir=@srcdir@
 objdir=`pwd`
 SHELL=/bin/sh
 SHELLVERBOSE=
-VERSION=@VERSION@
-PACKAGE=@PACKAGE@
+VERSION=@PACKAGE_VERSION@
+PACKAGE=@PACKAGE_TARNAME@
 host=@host@
 RUNAS=
 FS=${AFSSRVBINDIR}/fs