Check-in [f44c5c32ff]
Overview
Comment:Updated email addresses, cleaned up Mac OS X build script, and modified the Mac OS X build script to work on a build host running Mac OS X 10.10 (Yosemite).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f44c5c32ffeb8e2fc74b401c5ec6e5cbb4d8b664
User & Date: kvanals on 2014-10-21 23:01:27
Other Links: manifest | tags
Context
2015-03-05
15:48
Added debugging to ASN.1 X.509 parser, added support for gzip'd certificates, and fixed a possible non-deterministic case with realloc(0) check-in: e4a2e1c560 user: rkeene tags: trunk
2014-10-21
23:01
Updated email addresses, cleaned up Mac OS X build script, and modified the Mac OS X build script to work on a build host running Mac OS X 10.10 (Yosemite). check-in: f44c5c32ff user: kvanals tags: trunk
2014-07-28
20:14
Updated build_osx.sh to reflect testing on Mac OS X 10.10 (Yosemite). No build script or sources changes were required. It Just Works. check-in: 21f0b8b137 user: kvanals tags: trunk
Changes

Modified build/cackey_osx_build/Template_pmbuild/index.xml.in from [6bfcbad535] to [6d6f116270].

    30     30   {\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
    31     31   {\colortbl;\red255\green255\blue255;}
    32     32   \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
    33     33   
    34     34   \f0\fs26 \cf0 Release information:\
    35     35       pkg: CACKey\
    36     36    author: US Army Corps of Engineers\
    37         -Mac build contact: Kenneth Van Alstyne <Kenneth.VanAlstyne@associates.hq.dhs.gov>\
    38         -                   US Department of Homeland Security\
    39         -contact: Roy Keene <DC1-UNIX@hq.dhs.gov>\
           37  +Mac build contact: Kenneth Van Alstyne <kenny@coreadaptive.com>\
           38  +                   Core Adaptive, LLC\
           39  +contact: Roy Keene <rkeene@coreadaptive.com>\
    40     40   ------------------------------------------------\
    41     41   \
    42     42   The PKCS11.tokend connector module included in this package is licensed under\
    43     43   the APSL. See: http://devel.kvanals.org/PKCS11_Tokend\
    44     44   \
    45     45   The following files in the source directory are the intellectual property of the\
    46     46   Free Software Foundation and are licensed under the terms of the GNU General\

Modified build/cackey_osx_build/build_osx.sh from [119116f02b] to [353b3acaa2].

     1      1   #!/bin/bash
     2      2   # Shell Script to make Mac OS X Releases of CACKey
     3      3   # Kenneth Van Alstyne
     4         -# DC1SAN_SUPPORT@hq.dhs.gov
            4  +# kenny@coreadaptive.com
     5      5   CACKEY_VERSION=`cat configure.ac | grep AC_INIT | cut -d " " -f 2 | sed 's_)__'`
     6      6   
     7         -# Check to see if we're building on Mac OS X 10.7 "Lion"
     8         -if [ "`uname -r | cut -d . -f 1`" = "11" ]; then
            7  +# Check to see if we're building on Mac OS X 10.7 "Lion" or newer
            8  +if [ "`uname -r | cut -d . -f 1`" -ge "11" ]; then
     9      9   	LIONBUILD=1
    10     10   fi
    11     11   
    12     12   # Usage function
    13     13   usage() {
    14     14   	echo "Usage: build_osx.sh <target>"
    15     15   	echo Where target is one of:
    16     16   	echo "    leopard  - (Builds Universal 10.5 Library for PPCG4/i386)"
    17         -	echo "    snowleopard  - (Builds Universal 10.6 Library for i386/x86_64)"
    18         -	echo "    lion  - (Builds Universal 10.7 Library for i386/x86_64)"
    19     17   	echo "    sltoyos - (Builds Universal 10.6/10.7/10.8/10.9/10.10 Library for i386/x86_64)"
    20     18   	echo "    all - (Builds for all supported targets)"
    21     19   	echo "    clean - (Cleans up)"
    22     20   	echo "Run from CACKey Build Root."
           21  +	echo ""
           22  +	echo "NOTE:  Leopard build requires legacy XCode 3 components in"
           23  +	echo "       /Developer because of PowerPC support."
           24  +	echo "       All builds require gnutar, automake, and autoconf."
           25  +	echo "       If your newer release of XCode does not include these"
           26  +	echo "       components, I recommend installing them from MacPorts."
    23     27   	exit $?
    24     28   }
    25     29   
    26     30   # Clean up function
    27     31   clean() {
    28     32   	rm -f build/cackey_osx_build/cackey.dylib
    29     33   	rm -rf build/cackey_osx_build/PKCS11.tokend
................................................................................
    39     43   		LIBTOOLDIR=/Developer/usr/share/libtool
    40     44   	else
    41     45   		LIBTOOLDIR=/Developer/usr/share/libtool/config
    42     46   	fi
    43     47   	if [ ! -d macbuild ]; then
    44     48   		mkdir macbuild
    45     49   		mkdir macbuild/Leopard
    46         -		mkdir macbuild/Snowleopard
    47         -		mkdir macbuild/Lion
    48     50   		mkdir macbuild/Sltoyos
    49     51   		mkdir macbuild/pkg
    50     52   	fi
    51     53   	if [ ! -f config.guess ]; then
    52     54   		cp ${LIBTOOLDIR}/config.guess .
    53     55   	fi
    54     56   	if [ ! -f config.sub ]; then
................................................................................
    74     76   	for HOST in powerpc-apple-darwin9 i386-apple-darwin9; do
    75     77   		genbuild
    76     78   	done
    77     79   	libbuild
    78     80   	pkgbuild
    79     81   }
    80     82   
    81         -# Build function for Snow Leopard
    82         -snowleopard() {
    83         -	makedir
    84         -	HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    85         -	LIBRARY=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    86         -	LIB=""
    87         -	ARCHLIST=""
    88         -	DLIB=""
    89         -	DARCHLIST=""
    90         -	OSX=Snowleopard
    91         -	PKTARGETOS=3
    92         -	CUROSXVER=10.6
    93         -	for HOST in i386-apple-darwin10 x86_64-apple-darwin10; do
    94         -		genbuild
    95         -	done
    96         -	libbuild
    97         -	pkgbuild
    98         -}
    99         -
   100         -# Build function for Lion
   101         -lion() {
   102         -	makedir
   103         -	HEADERS=/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   104         -	LIBRARY=/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   105         -	LIB=""
   106         -	ARCHLIST=""
   107         -	DLIB=""
   108         -	DARCHLIST=""
   109         -	OSX=Lion
   110         -	PKTARGETOS=3
   111         -	CUROSXVER=10.7
   112         -	for HOST in i386-apple-darwin11 x86_64-apple-darwin11; do
   113         -		genbuild
   114         -	done
   115         -	libbuild
   116         -	pkgbuild
   117         -}
   118         -
   119         -# Build function for Snow Leopard/Lion/Mountain Lion
   120         -sltoyos() {
   121         -	makedir
   122         -	HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   123         -	LIBRARY=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   124         -	LIB=""
   125         -	ARCHLIST=""
   126         -	DLIB=""
   127         -	DARCHLIST=""
   128         -	OSX=Sltoyos
   129         -	PKTARGETOS=3
   130         -	CUROSXVER=10.6
   131         -	for HOST in i386-apple-darwin10 x86_64-apple-darwin10; do
   132         -		genbuild
   133         -	done
   134         -	libbuild
   135         -	pkgbuild
   136         -}
   137         -
   138         -# Build function for Snow Leopard/Lion/Mountain Lion
           83  +# Build function for Snow Leopard/Lion/Mountain Lion/Mavericks/Yosemite
   139     84   sltoyos() {
   140     85   	makedir
   141     86   	HEADERS=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   142     87   	LIBRARY=/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   143     88   	LIB=""
   144     89   	ARCHLIST=""
   145     90   	DLIB=""
................................................................................
   155    100   }
   156    101   
   157    102   # Generic build function
   158    103   genbuild() {
   159    104   	make distclean
   160    105   	ARCH=`echo ${HOST} | cut -d "-" -f 1`
   161    106   	if [ ${ARCH} == "powerpc" ]; then
   162         -		if [ ${OSX} == "Leopard" ]; then
   163         -			ARCH="ppc -mcpu=G4"
   164         -		else
   165         -			ARCH="ppc -mcpu=G3"
   166         -		fi
          107  +		ARCH="ppc -mcpu=G4"
   167    108   	fi
   168    109   	if [ "${LIONBUILD}" = 1 ]; then
   169    110   		if [ "${ARCH}" == "ppc -mcpu=G4" ]; then
   170         -			CC=powerpc-apple-darwin11-gcc-4.2.1 CPP=powerpc-apple-darwin11-cpp-4.2.1 CFLAGS="-m32 -I/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include -isysroot /Developer/SDKs/MacOSX10.5.sdk" CPPFLAGS="-D_LIBC_LIMITS_H_" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST} --enable-dod-certs-on-hw-slots
          111  +			CC=/Developer/usr/bin/powerpc-apple-darwin10-gcc-4.2.1 CXX=/Developer/usr/bin/powerpc-apple-darwin10-g++-4.2.1 CFLAGS="-m32 -mcpu=G4 -I/Developer/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include -isysroot /Developer/SDKs/MacOSX10.5.sdk" CPPFLAGS="-D_LIBC_LIMITS_H_" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST} --enable-dod-certs-on-hw-slots
   171    112   		else
   172    113   			CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST} --enable-dod-certs-on-hw-slots
   173    114   		fi
   174    115   	else
   175    116   		CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST} --enable-dod-certs-on-hw-slots
   176    117   	fi
   177    118   	make
................................................................................
   204    145   	rm -rf build/cackey_osx_build/PKCS11.tokend
   205    146   	if [ "${LIONBUILD}" = 1 ]; then
   206    147   		TAR=gnutar
   207    148   	else
   208    149   		TAR=tar
   209    150   	fi
   210    151   	if [ "${OSX}" = "Leopard" ]; then
   211         -		curl http://devel.kvanals.org/PKCS11_Tokend/PKCS11_tokend-latest.tar.gz | ${TAR} --strip-components 3 --wildcards -x -z -f - "PKCS11_tokend-*/prebuilt/leopard/PKCS11.tokend"
          152  +		curl http://devel.kvanals.org/PKCS11_Tokend/PKCS11_tokend-latest.tar.gz | gzip -d -c | ${TAR} --strip-components 3 --wildcards -x -f - "PKCS11_tokend-*/prebuilt/leopard/PKCS11.tokend"
   212    153   		mv PKCS11.tokend build/cackey_osx_build/PKCS11.tokend
   213    154   	else
   214         -		curl http://devel.kvanals.org/PKCS11_Tokend/PKCS11_tokend-latest.tar.gz | ${TAR} --strip-components 3 --wildcards -x -z -f - "PKCS11_tokend-*/prebuilt/snowleopard/PKCS11.tokend"
          155  +		curl http://devel.kvanals.org/PKCS11_Tokend/PKCS11_tokend-latest.tar.gz | gzip -d -c | ${TAR} --strip-components 3 --wildcards -x -f - "PKCS11_tokend-*/prebuilt/snowleopard/PKCS11.tokend"
   215    156   		mv PKCS11.tokend build/cackey_osx_build/PKCS11.tokend
   216    157   	fi
   217    158   	for PMDOC in build/cackey_osx_build/Template_pmbuild/*.in; do
   218    159   		PMDOC="`echo "${PMDOC}" | sed 's|l.in|l|g' | sed 's|build/cackey_osx_build/Template_pmbuild/||g'`"
   219    160   		UUID="`python -c 'import uuid; print uuid.uuid1()' | dd conv=ucase 2>/dev/null`"
   220    161   		mkdir -p build/cackey_osx_build/${OSX}_pmbuild.pmdoc
   221    162   		sed "s|@@BUILDROOTDIR@@|$(pwd)|g" build/cackey_osx_build/Template_pmbuild/${PMDOC}.in > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
................................................................................
   224    165   		sed "s|@@TARGETOS@@|${PKTARGETOS}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   225    166   		sed "s|@@CUROSXVER@@|${CUROSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   226    167   		sed "s|@@LIBCACKEYG@@|${LIBCACKEYG}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   227    168   		cp build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   228    169   		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   229    170   	done
   230    171   	EXT=pkg
   231         -	if [ ${OSX} == "Snowleopard" ]; then
   232         -		cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | sed 's|for Mac OS X Snowleopard|for Mac OS X SnowLeopard|g' > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
   233         -		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
   234         -	fi
   235    172   	if [ ${OSX} == "Sltoyos" ]; then
   236    173   		cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | sed 's|for Mac OS X Sltoyos|for Mac OS X SLtoYos|g' > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
   237    174   		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
   238    175   	fi
   239    176   	/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -d build/cackey_osx_build/${OSX}_pmbuild.pmdoc -o macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   240    177   	tar --create --directory macbuild/pkg/ --file macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   241    178   	gzip -9 macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar
................................................................................
   254    191   
   255    192   	"leopard")
   256    193   		./autogen.sh
   257    194   		leopard
   258    195   		exit $?
   259    196   	;;
   260    197   
   261         -	"snowleopard")
   262         -		./autogen.sh
   263         -		snowleopard
   264         -		exit $?
   265         -	;;
   266         -	
   267         -	"lion")
   268         -		./autogen.sh
   269         -		lion
   270         -		exit $?
   271         -	;;
   272         -	
   273    198   	"sltoyos")
   274    199   		./autogen.sh
   275    200   		sltoyos
   276    201   		exit $?
   277    202   	;;
   278    203   
   279    204   	"all")