Check-in [059330a9a5]
Overview
Comment:Fixed bug in UUID of package

Added PKCS11.tokend package to CACKey on Mac OS X

Removed legacy (pre-Mac OS X 10.5) build support

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:059330a9a588e166039075cb32e1e9e45767de54
User & Date: rkeene on 2011-08-25 04:00:27
Other Links: manifest | tags
Context
2011-08-25
04:01
CACKey 0.6.0 check-in: 21d6e16ab8 user: rkeene tags: trunk, 0.6.0
04:00
Fixed bug in UUID of package

Added PKCS11.tokend package to CACKey on Mac OS X

Removed legacy (pre-Mac OS X 10.5) build support check-in: 059330a9a5 user: rkeene tags: trunk

2011-08-24
03:44
Removed incomplete and never-used SPM implementation check-in: 6723914ef9 user: rkeene tags: trunk
Changes

Modified build/cackey_osx_build/Template_pmbuild/03libcackey.xml.in from [fe50c1df7a] to [b6742d933b].

     1         -<pkgref spec="1.12" uuid="@@OSXVERSION@@">
            1  +<pkgref spec="1.12" uuid="@@UUID@@">
     2      2   	<config>
     3      3   		<identifier>mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.cackey.pkg</identifier>
     4      4   		<version>1</version>
     5      5   		<description></description>
     6      6   		<post-install type="none"/>
     7      7   		<requireAuthorization/>
     8      8   		<installFrom relative="true" mod="true">cackey.dylib</installFrom>

Added build/cackey_osx_build/Template_pmbuild/04pkcs11tokend-contents.xml.in version [e88a608a73].

            1  +<pkg-contents spec="1.12">
            2  +	<d n="PKCS11.tokend" o="root" g="wheel" p="33261" pt="@@BUILDROOTDIR@@/build/cackey_osx_build/PKCS11.tokend" m="true" t="file">
            3  +		<mod>owner</mod>
            4  +		<mod>mode</mod>
            5  +		<mod>group</mod>
            6  +	</d>
            7  +</pkg-contents>

Added build/cackey_osx_build/Template_pmbuild/04pkcs11tokend.xml.in version [793db41bea].

            1  +<pkgref spec="1.12" uuid="@@UUID@@">
            2  +	<config>
            3  +		<identifier>mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.PKCS11.pkg</identifier>
            4  +		<version>1</version>
            5  +		<description></description>
            6  +		<post-install type="none"/>
            7  +		<requireAuthorization/>
            8  +		<installFrom relative="true" mod="true">PKCS11.tokend</installFrom>
            9  +		<installTo mod="true" relocatable="true">/System/Library/Security/tokend/PKCS11.tokend</installTo>
           10  +		<flags></flags>
           11  +		<packageStore type="internal"></packageStore>
           12  +		<mod>parent</mod>
           13  +		<mod>scripts.postinstall.path</mod>
           14  +		<mod>scripts.scriptsDirectoryPath.isRelativeType</mod>
           15  +		<mod>scripts.scriptsDirectoryPath.path</mod>
           16  +		<mod>installTo.isAbsoluteType</mod>
           17  +		<mod>installTo.isRelativeType</mod>
           18  +		<mod>scripts.postflight.path</mod>
           19  +		<mod>relocatable</mod>
           20  +		<mod>version</mod>
           21  +		<mod>installTo.path</mod>
           22  +		<mod>installFrom.path</mod>
           23  +		<mod>installTo</mod>
           24  +	</config>
           25  +	<scripts>
           26  +		<postinstall mod="true">@@BUILDROOTDIR@@/build/cackey_osx_build/Template_pmbuild/scripts/04pkcs11tokend-post.sh</postinstall>
           27  +		<scripts-dir mod="true">@@BUILDROOTDIR@@/build/cackey_osx_build/Template_pmbuild/scripts</scripts-dir>
           28  +	</scripts>
           29  +	<contents>
           30  +		<file-list>04pkcs11tokend-contents.xml</file-list>
           31  +		<filter>/CVS$</filter>
           32  +		<filter>/\.svn$</filter>
           33  +		<filter>/\.cvsignore$</filter>
           34  +		<filter>/\.cvspass$</filter>
           35  +		<filter>/\.DS_Store$</filter>
           36  +	</contents>
           37  +</pkgref>

Modified build/cackey_osx_build/Template_pmbuild/index.xml.in from [eb9bc49ba6] to [9543623cb4].

    15     15   		<choice title="CACKey PKCS#11 Library (Core)" id="cackey" starts_selected="true" starts_enabled="true" starts_hidden="false">
    16     16   			<pkgref id="mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.libcackey.pkg"/>
    17     17   			<pkgref id="mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.cackey.pkg"/>
    18     18   		</choice>
    19     19   		<choice title="CACKey PKCS#11 Library (Debug)" id="cackeydebug" starts_selected="true" starts_enabled="true" starts_hidden="false">
    20     20   			<pkgref id="mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.@@LIBCACKEYG@@"/>
    21     21   		</choice>
           22  +		<choice title="PKCS11 Tokend Connector" id="PKCS11" starts_selected="true" starts_enabled="true" starts_hidden="false">
           23  +			<pkgref id="mil.army.usace.cackeyForMacOsX@@OSXVERSION@@.PKCS11.pkg"/>
           24  +		</choice>
    22     25   	</contents>
    23     26   	<resources bg-scale="none" bg-align="topleft">
    24     27   		<locale lang="en">
    25     28   			<resource mime-type="text/rtf" kind="embedded" type="license">
    26     29   				<![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
    27     30   {\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
    28     31   {\colortbl;\red255\green255\blue255;}
................................................................................
    31     34   \f0\fs26 \cf0 Release information:\
    32     35       pkg: CACKey\
    33     36    author: US Army Corps of Engineers\
    34     37   Mac build contact: Kenneth Van Alstyne <kenneth.vanalstyne@hq.dhs.gov>\
    35     38                      US Department of Homeland Security\
    36     39   contact: Roy Keene <roy.s.keene@usace.army.mil>\
    37     40   ------------------------------------------------\
           41  +\
           42  +The PKCS11.tokend connector module included in this package is licensed under\
           43  +the APSL. See: http://devel.kvanals.org/PKCS11_Tokend\
    38     44   \
    39     45   The following files in the source directory are the intellectual property of the\
    40     46   Free Software Foundation and are licensed under the terms of the GNU General\
    41     47   Public License (GPL):\
    42     48   	config.guess, config.sub, install-sh\
    43     49   \
    44     50   The files in the source directory and the "leakcheck" directory are the intellectual\
................................................................................
    60     66   {\colortbl;\red255\green255\blue255;}
    61     67   \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
    62     68   
    63     69   \f0\fs26 \cf0 Thank you for choosing to install CACKey.\
    64     70   \
    65     71   To use CACKey, install /Library/CACKey/libcackey.dylib or\
    66     72   /usr/lib/pkcs11/cackey.dylib as a security module into any application that can use a PKCS#11 provider.\
           73  +\
           74  +A PKCS11 Connector for Tokend (Keychain Access) will be installed in /System/Library/Security/tokend.\
           75  +To use, be sure to import the certificate authorities into Keychain Access.\
    67     76   \
    68     77   A debug version, /Library/CACKey/libcackey_g.dylib is provided if debug output is necessary.}]]>
    69     78   			</resource>
    70     79   		</locale>
    71     80   	</resources>
    72     81   	<requirements>
    73     82   		<requirement id="tosv" operator="lt" value="'@@NEXTOSXVER@@'">
................................................................................
    77     86   			<message>This CACKey release requires Mac OS X @@CUROSXVER@@.</message>
    78     87   		</requirement>
    79     88   	</requirements>
    80     89   	<flags/>
    81     90   	<item type="file">01libcackey.xml</item>
    82     91   	<item type="file">02libcackey.xml</item>
    83     92   	<item type="file">03libcackey.xml</item>
           93  +	<item type="file">04pkcs11tokend.xml</item>
    84     94   	<mod>properties.customizeOption</mod>
    85     95   	<mod>properties.title</mod>
    86     96   	<mod>description</mod>
    87     97   	<mod>properties.systemDomain</mod>
    88     98   	<mod>properties.anywhereDomain</mod>
    89     99   </pkmkdoc>

Added build/cackey_osx_build/Template_pmbuild/scripts/04pkcs11tokend-post.sh version [1f1313960f].

            1  +#!/bin/bash
            2  +chmod -R go+rX /System/Library/Security/tokend/PKCS11.tokend
            3  +chown -R root:wheel /System/Library/Security/tokend/PKCS11.tokend

Modified build/cackey_osx_build/build_osx.sh from [0757f2f9f0] to [b98bcd81f7].

     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         -	echo "    panther  - (Builds 10.3 Library for PPCG3) (LEGACY)"
    17         -	echo "    tiger  - (Builds Universal 10.4 Library for PPCG3/i386) (LEGACY)"
    18     16   	echo "    leopard  - (Builds Universal 10.5 Library for PPCG4/i386)"
    19     17   	echo "    snowleopard  - (Builds Universal 10.6 Library for i386/x86_64)"
    20     18   	echo "    lion  - (Builds Universal 10.7 Library for i386/x86_64)"
    21     19   	echo "    all - (Builds for all supported targets)"
    22         -	echo "    legacy - (Builds for all supported targets older than 10.7)"
    23     20   	echo "    clean - (Cleans up)"
    24     21   	echo "Run from CACKey Build Root."
    25     22   	exit $?
    26     23   }
    27     24   
    28     25   # Clean up function
    29     26   clean() {
    30     27   	rm -f build/cackey_osx_build/cackey.dylib
           28  +	rm -rf build/cackey_osx_build/PKCS11.tokend
           29  +	rm -rf PKCS11.tokend
    31     30   	rm -rf macbuild
    32     31   	rm -rf build/cackey_osx_build/*.pmdoc
    33     32   	make distclean
    34     33   }
    35     34   
    36     35   # Directory creation function
    37     36   makedir() {
................................................................................
    38     37   	if [ "`uname -r | cut -d . -f 1`" -lt "10" ]; then
    39     38   		LIBTOOLDIR=/Developer/usr/share/libtool
    40     39   	else
    41     40   		LIBTOOLDIR=/Developer/usr/share/libtool/config
    42     41   	fi
    43     42   	if [ ! -d macbuild ]; then
    44     43   		mkdir macbuild
    45         -		mkdir macbuild/Panther
    46         -		mkdir macbuild/Tiger
    47     44   		mkdir macbuild/Leopard
    48     45   		mkdir macbuild/Snowleopard
    49     46   		mkdir macbuild/Lion
    50     47   		mkdir macbuild/pkg
    51     48   	fi
    52     49   	if [ ! -f config.guess ]; then
    53     50   		cp ${LIBTOOLDIR}/config.guess .
................................................................................
    56     53   		cp ${LIBTOOLDIR}/config.sub .
    57     54   	fi
    58     55   	if [ ! -f install-sh ]; then
    59     56   		cp ${LIBTOOLDIR}/install-sh .
    60     57   	fi
    61     58   }
    62     59   
    63         -# Build function for Panther
    64         -panther() {
    65         -	makedir
    66         -	HEADERS=/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    67         -	LIBRARY=/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    68         -	OSX=Panther
    69         -	PKTARGETOS=1
    70         -	NEXTOSXVER=10.4
    71         -	CUROSXVER=10.3
    72         -	HOST=powerpc-apple-darwin7
    73         -	make distclean
    74         -	ARCH="ppc -mcpu=G3"
    75         -	CFLAGS="-arch ${ARCH}" ./configure --with-pcsc-headers=${HEADERS} --with-pcsc-libs=${LIBRARY} --host=${HOST}
    76         -	make
    77         -	cp libcackey.dylib macbuild/${OSX}/libcackey.dylib
    78         -	cp libcackey_g.dylib macbuild/${OSX}/libcackey_g.dylib
    79         -	pkgbuild
    80         -}
    81         -
    82         -# Build function for Tiger
    83         -tiger() {
    84         -	makedir
    85         -	HEADERS=/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
    86         -	LIBRARY=/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/PCSC.framework/PCSC
    87         -	LIB=""
    88         -	ARCHLIST=""
    89         -	DLIB=""
    90         -	DARCHLIST=""
    91         -	OSX=Tiger
    92         -	PKTARGETOS=2
    93         -	NEXTOSXVER=10.5
    94         -	CUROSXVER=10.4
    95         -	for HOST in powerpc-apple-darwin8 i386-apple-darwin8; do
    96         -		genbuild
    97         -	done
    98         -	libbuild
    99         -	pkgbuild
   100         -}
   101         -
   102     60   # Build function for Leopard
   103     61   leopard() {
   104     62   	makedir
   105     63   	HEADERS=/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/PCSC.framework/Versions/A/Headers/
   106     64   	LIBRARY=/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/PCSC.framework/PCSC
   107     65   	LIB=""
   108     66   	ARCHLIST=""
................................................................................
   202    160   	if [ "`uname -r | cut -d . -f 1`" -lt "10" ]; then
   203    161   		LIBCACKEYG=libcackeyg.pkg
   204    162   	else
   205    163   		LIBCACKEYG=libcackey_g.pkg
   206    164   	fi
   207    165   	rm -f build/cackey_osx_build/cackey.dylib
   208    166   	ln macbuild/${OSX}/libcackey.dylib build/cackey_osx_build/cackey.dylib
          167  +	rm -rf build/cackey_osx_build/PKCS11.tokend
          168  +	if [ "${LIONBUILD}" = 1 ]; then
          169  +		TAR=gnutar
          170  +	else
          171  +		TAR=tar
          172  +	fi
          173  +	if [ "${OSX}" = "Leopard" ]; then
          174  +		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"
          175  +		mv PKCS11.tokend build/cackey_osx_build/PKCS11.tokend
          176  +	else
          177  +		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"
          178  +		mv PKCS11.tokend build/cackey_osx_build/PKCS11.tokend
          179  +	fi
   209    180   	for PMDOC in build/cackey_osx_build/Template_pmbuild/*.in; do
   210    181   		PMDOC="`echo "${PMDOC}" | sed 's|l.in|l|g' | sed 's|build/cackey_osx_build/Template_pmbuild/||g'`"
   211    182   		UUID="`python -c 'import uuid; print uuid.uuid1()' | dd conv=ucase 2>/dev/null`"
   212    183   		mkdir -p build/cackey_osx_build/${OSX}_pmbuild.pmdoc
   213    184   		sed "s|@@BUILDROOTDIR@@|$(pwd)|g" build/cackey_osx_build/Template_pmbuild/${PMDOC}.in > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   214    185   		sed "s|@@OSXVERSION@@|${OSX}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   215    186   		sed "s|@@UUID@@|${UUID}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
................................................................................
   216    187   		sed "s|@@TARGETOS@@|${PKTARGETOS}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   217    188   		sed "s|@@NEXTOSXVER@@|${NEXTOSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   218    189   		sed "s|@@CUROSXVER@@|${CUROSXVER}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   219    190   		sed "s|@@LIBCACKEYG@@|${LIBCACKEYG}|g" build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   220    191   		cp build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC} build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1
   221    192   		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}.1 build/cackey_osx_build/${OSX}_pmbuild.pmdoc/${PMDOC}
   222    193   	done
   223         -	if [ ${OSX} == "Panther" ]; then
   224         -		EXT=mpkg
   225         -		cat build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml | grep -v -i require > build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new
   226         -		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
   227         -	else
   228         -		EXT=pkg
   229         -	fi
          194  +	EXT=pkg
   230    195   	if [ ${OSX} == "Snowleopard" ]; then
   231    196   		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
   232    197   		mv build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml.new build/cackey_osx_build/${OSX}_pmbuild.pmdoc/index.xml
   233    198   	fi
   234    199   	/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -d build/cackey_osx_build/${OSX}_pmbuild.pmdoc -o macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   235    200   	tar --create --directory macbuild/pkg/ --file macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   236    201   	gzip -9 macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}.tar
   237    202   	rm -rf macbuild/pkg/CACKey_${CACKEY_VERSION}_${OSX}.${EXT}
   238    203   	rm -f build/cackey_osx_build/cackey.dylib
          204  +	rm -rf build/cackey_osx_build/PKCS11.tokend
   239    205   	echo "${OSX} build complete"
   240    206   }
   241    207   
   242    208   # Take command line arguments and execute
   243    209   case "$1" in
   244    210   	"")
   245    211   		usage
   246         -		exit $?
   247         -	;;
   248         -
   249         -	"panther")
   250         -		if [ "${LIONBUILD}" = "1" ]; then
   251         -			echo "Building for platforms older than Mac OS X 10.5 (Leopard) is not supported on Lion..."
   252         -			exit 1
   253         -		fi
   254         -		./autogen.sh
   255         -		panther
   256         -		exit $?
   257         -	;;
   258         -
   259         -	"tiger")
   260         -		if [ "${LIONBUILD}" = "1" ]; then
   261         -			echo "Building for platforms older than Mac OS X 10.5 (Leopard) is not supported on Lion..."
   262         -			exit 1
   263         -		fi
   264         -		./autogen.sh
   265         -		tiger
   266    212   		exit $?
   267    213   	;;
   268    214   
   269    215   	"leopard")
   270    216   		./autogen.sh
   271    217   		leopard
   272    218   		exit $?
................................................................................
   290    236   		snowleopard
   291    237   		lion
   292    238   		echo ""
   293    239   		echo "All builds complete."
   294    240   		exit $?
   295    241   	;;
   296    242   
   297         -	"legacy")
   298         -		if [ "${LIONBUILD}" = "1" ]; then
   299         -			echo "Building for platforms older than Mac OS X 10.5 (Leopard) is not supported on Lion..."
   300         -			exit 1
   301         -		fi
   302         -		./autogen.sh
   303         -		panther
   304         -		tiger
   305         -		leopard
   306         -		snowleopard
   307         -		echo ""
   308         -		echo "All LEGACY builds complete."
   309         -		exit $?
   310         -	;;
   311         -
   312    243   	"clean")
   313    244   		clean
   314    245   		exit $?
   315    246   	;;
   316    247   
   317    248   	*)
   318    249   		usage
   319    250   		exit $?
   320    251   	;;
   321    252   esac