Skip to content

Commit

Permalink
First stage in "delivery/" creation
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed Feb 3, 2015
1 parent 91a63df commit caba602
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 1,000 deletions.
17 changes: 9 additions & 8 deletions CHANGE_LOG
@@ -1,21 +1,22 @@
2.2.18 2015-01-21T17:45:35-0700
2.2.18
Library (udunits2(3)):
Eliminate the use of <unistd.h> on Windows.
Eliminated the use of <unistd.h> on Windows.

Improved support for static builds.
Improved support for static builds (i.e., builds that don't produce a
sharable library).

Units Database:
Correct definition of "dram" and add "fluid_dram".
Corrected the definition of "dram" and added "fluid_dram".

Change definition of "molecule" to "1/avogadro_constant".
Changed the definition of "molecule" to "1/avogadro_constant".

Add comments and human-readable definitions.
Added comments and human-readable definitions.

Program (udunits2(1)):
Remove latent bug on Windows in determining the name of the program.
Removed latent bug on Windows in determining the name of the program.

Misc:
Remove lint discovered by Coverity.
Removed lint discovered by Coverity.

2.2.17 2014-11-18T11:32:32-0700
Modified the lexical scanner to accept the use of "ref" in an offset
Expand Down
72 changes: 44 additions & 28 deletions acceptance_test_linux.sh
@@ -1,10 +1,14 @@
# Performs an acceptance-test of a package on a Linux system. Creates a binary
# distribution file and a documentation distribution file. The current directory
# must contain the source-distribution file and the release-variables file.
# distribution file and a documentation distribution file. The directory that
# contains this script must also contain the files
# - release-vars.sh
# - Vagrantfile
# - repo_add
#
# Usage: $0 vmName vmCpu generator ext install [binRepoDir]
# Usage: $0 tarball vmName vmCpu generator ext install [binRepoDir]
#
# where:
# tarball Pathname of the source distribution file.
# vmName Name of the Vagrant virtual machine (e.g.,
# "centos64_64", "precise32")
# vmCpu Type of VM CPU (e.g., "x86_64")
Expand All @@ -25,34 +29,42 @@ set -e # terminate on error

# Parse the command-line.
#
VM_NAME=${1:?Name of Vagrant virtual-machine not specified}
VM_CPU=${2:?Virtual-machine CPU not specified}
GENERATOR=${3:?Name of CPack package-generator not specified}
EXT=${4:?Package extension not specified}
INSTALL=${5:?Installation command not specified}
binRepoDir=${6:?Platform-specific binary-repository directory not specified}

# Get the static release variables.
#
. ./release-vars.sh
tarball=${1:?Pathname of tarball not specified}
vmName=${2:?Name of Vagrant virtual-machine not specified}
vmCpu=${3:?Virtual-machine CPU not specified}
generator=${4:?Name of CPack package-generator not specified}
ext=${5:?Package extension not specified}
install=${6:?Installation command not specified}
binRepoDir=${7:?Platform-specific binary-repository directory not specified}

binDistroName="$PKG_ID.$vmCpu"
binDistroFilename=$binDistroName.$ext

binDistroName="$PKG_ID.$VM_CPU"
binDistroFilename=$binDistroName.$EXT
# Set the build directory to the directory that contains this script.
builddir=`dirname $0`

# Move the tarball to the build directory so that it appears in the "/vagrant"
# directory.
#
mv $tarball $builddir

# Make the directory that contains this script be the current working directory.
# Make the build directory the current working directory.
#
cd `dirname $0`
cd $builddir

# Set the release-variables.
. ./release-vars.sh

# Start the virtual machine. Ensure that each virtual machine is started
# separately because vagrant(1) doesn't support concurrent "vagrant up"
# invocations.
# invocations in the same directory.
#
trap "vagrant destroy --force $VM_NAME; `trap -p EXIT`" EXIT
flock "$SOURCE_DISTRO_NAME" -c "vagrant up \"$VM_NAME\""
trap "vagrant destroy --force $vmName; `trap -p EXIT`" EXIT
flock "$SOURCE_DISTRO_NAME" -c "vagrant up \"$vmName\""

# On the virtual machine,
#
vagrant ssh $VM_NAME -- -T <<EOF
vagrant ssh $vmName -- -T <<EOF
set -e # terminate on error
# Unpack the source distribution.
Expand All @@ -68,7 +80,7 @@ vagrant ssh $VM_NAME -- -T <<EOF
# and create a binary distribution.
#
cmake -DCMAKE_INSTALL_PREFIX=$ABSPATH_DEFAULT_INSTALL_PREFIX \
-DCPACK_PACKAGE_FILE_NAME=$binDistroName -DCPACK_GENERATOR=$GENERATOR
-DCPACK_PACKAGE_FILE_NAME=$binDistroName -DCPACK_GENERATOR=$generator
make all test
sudo make install install_test package
Expand All @@ -81,21 +93,25 @@ EOF
#
# Restart the virtual machine.
#
vagrant destroy --force $VM_NAME
flock "$SOURCE_DISTRO_NAME" -c "vagrant up \"$VM_NAME\""
vagrant destroy --force $vmName
flock "$SOURCE_DISTRO_NAME" -c "vagrant up \"$vmName\""

# On the virtual machine,
#
vagrant ssh $VM_NAME -- -T <<EOF
vagrant ssh $vmName -- -T <<EOF
set -e # terminate on error
# Verify that the package installs correctly from the binary distribution.
#
sudo $INSTALL /vagrant/$binDistroFilename
sudo $install /vagrant/$binDistroFilename
$ABSPATH_DEFAULT_INSTALL_PREFIX/bin/udunits2 -A -H km -W m
# Add the binary-distribution to the yum(1) binary-repository.
#
bash -x /vagrant/repo_add /repo $binRepoDir/$VM_CPU \
bash -x /vagrant/repo_add /repo $binRepoDir/$vmCpu \
/vagrant/$binDistroFilename
EOF
EOF

# Move the binary distribution to the workspace.
#
mv $binDistroFilename ../..
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -9,7 +9,7 @@
#

AC_PREREQ(2.59)
AC_INIT(UDUNITS, 2.2.18, support-udunits@unidata.ucar.edu)
AC_INIT([UDUNITS], [2.2.18], [support-udunits@unidata.ucar.edu])
AC_CONFIG_SRCDIR([lib/converter.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
Expand Down
1 change: 1 addition & 0 deletions delivery/.gitignore
@@ -0,0 +1 @@
release-vars.sh.tmp
1 change: 1 addition & 0 deletions prog/.gitignore
Expand Up @@ -19,3 +19,4 @@ udunits2prog.pdf
.vimrc
*.vr
*.t2p
Makefile.in
3 changes: 3 additions & 0 deletions prog/Makefile.am
Expand Up @@ -30,3 +30,6 @@ EXTRA_DIST = \
debug: udunits2
UDUNITS2_XML_PATH=$(top_srcdir)/lib/udunits2.xml libtool \
--mode=execute gdb udunits2

check-local: udunits2
./udunits2 $(top_srcdir)/lib/udunits2.xml </dev/null

0 comments on commit caba602

Please sign in to comment.