OpenAFS

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

This is a silent installer for OpenAFS for Windows.

This depends upon Heimdal

Populating %SOFTWARE%/openafs/[edit]


Configuration[edit]

Note that some of the variables below will want setting (particularly realm/cell!)

<!--
As of 2014-05-29 this file has been tested, and appears to work with:
        Windows XP 32-bit SP3 [English]
        Windows 7 32-bit SP1 [English]
        Windows 7 64-bit SP1 [English]

Note that http://www.openafs.org/dl/openafs/1.7.31/winxp/ReleaseNotes/html/#chap_7.html 
suggests using MSI transforms. Instead we are specifying msiexec options.
-->
<package
        id="openafs"
        name="OpenAFS for Windows"
        revision="%version%"
        priority="100" >
        <!-- We could set this to "postponed", but "false" will completely prevent reboot -->
        <variable name="afsreboot" value="false" />

        <depends package-id="secure_endpoints_heimdal" />

        <!-- 1.7.31 full version number is (1.7.3100). -->
        <variable name="version" value="1.7.3100" />
        <variable name="filename_version" value="1-7-3100" />
        <variable name="afscellname" value="example.com" />
        <variable name="realmname" value="EXAMPLE.COM" />
        <!--
                Comma delimited list of features. Potentially useful values:
                        feaAfsCreds      - deprecated afscreds.exe tool http://docs.openafs.org/ReleaseNotesWindows/ch03s07.html
                        feaAfsConfig     - afs_config.exe tool
                        feaCredsStartup  - sets integrated login. http://docs.openafs.org/ReleaseNotesWindows/ch03s06.html
                        feaDocumentation - Link added to start menu
                Note that the default appears to be:
                        addlocal=feaClient,feaClientDriver,feaAfsConfig,feaNetIDMgrPlugin,feaOpenAFS
                        remove=feaLoopback,feaAfsCreds,feaAfsCredsDebug
        -->
        <variable name="addlocal" value="feaCredsStartup,feaDocumentation,feaClient,feaClientDriver,feaAfsConfig,feaNetIDMgrPlugin,feaOpenAFS" />
        <variable name="remove" value="feaLoopback,feaAfsCreds,feaAfsCredsDebug" />
        <variable name="logonoptions" value="1" />

        <check type="logical" condition="or">
                <check type="uninstall" condition="versiongreaterorequal" path="OpenAFS for Windows" value="%version%" />
                <check type="uninstall" condition="versiongreaterorequal" path="OpenAFS for Windows (64-bit)" value="%version%" />
        </check>

        <!-- 32 bit -->
        <install cmd='msiexec /qn /norestart /i "%SOFTWARE%\openafs\openafs-en_US-%filename_version%.msi" AFSCELLNAME="%afscellname%" ADDLOCAL="%addlocal%" REMOVE="%remove%" ' >
                <exit code='0'/>
                <exit code='1640' reboot='%afsreboot%' />
                <exit code='3010' reboot='%afsreboot%' />
                <condition>
                        <check type="host" condition="architecture" value="x86" />
                </condition>
        </install>

        <!-- 64 bit -->
        <install cmd='msiexec /qn /norestart /i "%SOFTWARE%\openafs\openafs-en_US-64bit-%filename_version%.msi" AFSCELLNAME="%afscellname%" ADDLOCAL="%addlocal%" REMOVE="%remove%" ' >
                <exit code='0'/>
                <exit code='1640' reboot='%afsreboot%' />
                <exit code='3010' reboot='%afsreboot%' />
                <condition>
                        <check type="host" condition="architecture" value="x64" />
                </condition>
        </install>
        <!--This is not a typo. x64 windows requires 32bit-tools-->
        <install cmd='msiexec /qn /norestart /i "%SOFTWARE%\openafs\openafs-32bit-tools-en_US-%filename_version%.msi" AFSCELLNAME="%afscellname%" ' >
                <exit code='0'/>
                <exit code='1640' reboot='%afsreboot%' />
                <exit code='3010' reboot='%afsreboot%' />
                <condition>
                        <check type="host" condition="architecture" value="x64" />
                </condition>
        </install>

        <!--Apparently, AFSCELLNAME is accepted by msiexec above, but later overwritten by grand.central.org-->
        <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters"            /v Cell         /t REG_SZ    /d  "%afscellname%" /f' />
        <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" /v Realm  /t REG_SZ    /d  "%realmname%" /f' />
        <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider"       /v LogonOptions /t REG_DWORD /d "%logonoptions%" /f' />
        <!--We won't annoy users with the integrated login failure popup, but we will log to the event log-->
        <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" /v FailLoginsSilently /t REG_DWORD /d "1" /f' />
        <install cmd='reg add "HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" /v Debug /t REG_DWORD /d "1" /f' />

        <upgrade include="install"/>

        <remove cmd='msiexec /qn /norestart /x {CE0304E4-C045-4786-B029-107772E09C1A}' >
                <condition>
                        <check type="host" condition="architecture" value="x86" />
                </condition>
                <exit code='0'/>
                <exit code='1640' reboot='%afsreboot%' />
                <exit code='3010' reboot='%afsreboot%' />
        </remove>

        <remove cmd='msiexec /qn /norestart /x {2BF69D53-032B-424F-A98D-AA0596FBCB16}' >
                <condition>
                        <check type="host" condition="architecture" value="x64" />
                </condition>
                <exit code='0'/>
                <exit code='1640' reboot='%afsreboot%' />
                <exit code='3010' reboot='%afsreboot%' />
        </remove>
</package>