From: Derrick Brashear Date: Sun, 15 Jul 2012 07:03:00 +0000 (-0400) Subject: macos: next version support X-Git-Tag: openafs-stable-1_8_0pre1~2213 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=73ff09513013ae3c6b29b1b7b0a6e76b4fd260f7 macos: next version support support things beyond 10.7 Change-Id: I7a50f569fd43e0e1ed3c74f0480a8e2521df1bc5 Reviewed-on: http://gerrit.openafs.org/7763 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index f3ccfe0..ff4ea92 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -581,6 +581,14 @@ else AFS_SYSNAME="x86_darwin_110" OSXSDK="macosx10.7" ;; + x86_64-apple-darwin12.*) + AFS_SYSNAME="x86_darwin_120" + OSXSDK="macosx10.8" + ;; + i?86-apple-darwin12.*) + AFS_SYSNAME="x86_darwin_120" + OSXSDK="macosx10.8" + ;; sparc-sun-solaris2.8) AFS_SYSNAME="sun4x_58" ;; diff --git a/src/afs/DARWIN/osi_module.c b/src/afs/DARWIN/osi_module.c index f254ccf..9029253 100644 --- a/src/afs/DARWIN/osi_module.c +++ b/src/afs/DARWIN/osi_module.c @@ -56,7 +56,7 @@ afs_modload(struct kmod_info *kmod_info, void *data) afs_global_lock = lck_mtx_alloc_init(openafs_lck_grp, 0); if (ret = vfs_fsadd(&afs_vfsentry, &afs_vfstable)) { - printf("AFS: vfs_fsadd failed. aborting: %d\n", ret); + afs_warn("AFS: vfs_fsadd failed. aborting: %d\n", ret); afs_vfstable = NULL; goto fsadd_out; } @@ -65,14 +65,14 @@ afs_modload(struct kmod_info *kmod_info, void *data) afs_cdev.d_ioctl = &afs_cdev_ioctl; afs_cdev_major = cdevsw_add(-1, &afs_cdev); if (afs_cdev_major == -1) { - printf("AFS: cdevsw_add failed. aborting\n"); + afs_warn("AFS: cdevsw_add failed. aborting\n"); goto cdevsw_out; } afs_cdev_devfs_handle = devfs_make_node(makedev(afs_cdev_major, 0), DEVFS_CHAR, UID_ROOT, GID_WHEEL, 0666, "openafs_ioctl", 0); if (!afs_cdev_devfs_handle) { - printf("AFS: devfs_make_node failed. aborting\n"); + afs_warn("AFS: devfs_make_node failed. aborting\n"); cdevsw_remove(afs_cdev_major, &afs_cdev); cdevsw_out: vfs_fsremove(afs_vfstable); @@ -88,11 +88,11 @@ afs_modload(struct kmod_info *kmod_info, void *data) afs_vfsconf.vfc_typenum = maxvfsconf++; /* oddly not VT_AFS */ afs_vfsconf.vfc_flags = MNT_NODEV; if (vfsconf_add(&afs_vfsconf)) { - printf("AFS: vfsconf_add failed. aborting\n"); + afs_warn("AFS: vfsconf_add failed. aborting\n"); return KERN_FAILURE; } if (sysent[AFS_SYSCALL].sy_call != nosys) { - printf("AFS_SYSCALL in use. aborting\n"); + afs_warn("AFS_SYSCALL in use. aborting\n"); return KERN_FAILURE; } sysent[SYS_setgroups].sy_call = Afs_xsetgroups; @@ -103,7 +103,7 @@ afs_modload(struct kmod_info *kmod_info, void *data) sysent[AFS_SYSCALL].sy_funnel = KERNEL_FUNNEL; #endif #endif - printf("%s kext loaded; %u pages at 0x%lx (load tag %u).\n", + afs_warn("%s kext loaded; %u pages at 0x%lx (load tag %u).\n", kmod_info->name, (unsigned)kmod_info->size / PAGE_SIZE, (unsigned long)kmod_info->address, (unsigned)kmod_info->id); @@ -135,7 +135,7 @@ afs_modunload(struct kmod_info * kmod_info, void *data) MUTEX_FINISH(); lck_mtx_free(afs_global_lock, openafs_lck_grp); #endif - printf("%s kext unloaded; (load tag %u).\n", + afs_warn("%s kext unloaded; (load tag %u).\n", kmod_info->name, (unsigned)kmod_info->id); return KERN_SUCCESS; } diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index f97bbc9..29e1c8e 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -357,7 +357,7 @@ case $AFS_SYSNAME in XLIBS="${LIB_AFSDB} ${XBSA_XLIBS} -framework CoreFoundation" ;; - *_darwin_100 | *_darwin_110 ) + *_darwin_100 | *_darwin_110 | *_darwin_120 ) AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation" MT_CFLAGS="-D_REENTRANT" MT_LIBS='${XLIBS}' diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 81ec4c9..e42f519 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -70,6 +70,9 @@ #define SYS_NAME_ID_x86_darwin_110 517 #define SYS_NAME_ID_amd64_darwin_110 518 #define SYS_NAME_ID_arm_darwin_110 519 +#define SYS_NAME_ID_x86_darwin_120 520 +#define SYS_NAME_ID_amd64_darwin_120 521 +#define SYS_NAME_ID_arm_darwin_120 522 #define SYS_NAME_ID_next_mach20 601 #define SYS_NAME_ID_next_mach30 602 diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index 50f0e4b..46b04c2 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -49,9 +49,9 @@ KOPTS_DBUG=-ggdb KOPTS_DBUG=-gdwarf-2 -KOPTS_ppc=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns -force_cpusubtype_ALL -KOPTS_x86=-static -nostdinc -nostdlib -fmessage-length=0 -pipe -nostdinc -fno-builtin -Wno-trigraphs -force_cpusubtype_ALL -msoft-float -O0 -fno-common -mkernel -finline -fno-keep-inline-functions -fasm-blocks -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -KOPTS_amd64=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch x86_64 -Damd64 -DAMD64 -D__AMD64__ -DPAGE_SIZE_FIXED -march=x86-64 -mpreferred-stack-boundary=4 -falign-functions=4 -m64 -mkernel -mno-red-zone +KOPTS_ppc=-static -nostdinc -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns -force_cpusubtype_ALL +KOPTS_x86=-static -nostdinc -fmessage-length=0 -pipe -nostdinc -fno-builtin -Wno-trigraphs -force_cpusubtype_ALL -msoft-float -O0 -fno-common -mkernel -finline -fno-keep-inline-functions -fasm-blocks -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED +KOPTS_amd64=-static -nostdinc -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch x86_64 -Damd64 -DAMD64 -D__AMD64__ -DPAGE_SIZE_FIXED -march=x86-64 -mpreferred-stack-boundary=4 -falign-functions=4 -m64 -mkernel -mno-red-zone ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w ppc && echo yes) ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w i386 && echo yes) ARCH_amd64=$(shell echo "${ARCHFLAGS}" | grep -q -w x86_64 && echo yes || echo ${ARCHFLAGS} | egrep -q -w -v 'ppc|i386|x86_64' && arch | grep -q -w x86_64 && echo yes) @@ -105,7 +105,6 @@ CRULE_OPT_amd64=$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_amd64 CRULE_OPT=$(shell echo "${ARCH_ppc}" | grep -q -w yes && echo "${CRULE_OPT_ppc} && "; echo "${ARCH_x86}" | grep -q -w yes && echo "${CRULE_OPT_x86} && "; echo "${ARCH_amd64}" | grep -q -w yes && echo "${CRULE_OPT_amd64} && ";echo "lipo -create ${OBJ_ppc} ${OBJ_x86} ${OBJ_amd64} -output $@ && true") -MODLD=$(LD) CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch diff --git a/src/libafs/afs.x86_darwin_120.plist.in b/src/libafs/afs.x86_darwin_120.plist.in new file mode 100644 index 0000000..a138571 --- /dev/null +++ b/src/libafs/afs.x86_darwin_120.plist.in @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 8.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + @MACOS_VERSION@ + CFBundleSignature + ???? + CFBundleVersion + @MACOS_VERSION@ + OSBundleLibraries + + com.apple.kpi.bsd + 8.0.0 + com.apple.kpi.mach + 8.0.0 + com.apple.kpi.libkern + 8.0 + + + diff --git a/src/packaging/MacOS/InstallationCheck.12 b/src/packaging/MacOS/InstallationCheck.12 new file mode 100644 index 0000000..28a6e1f --- /dev/null +++ b/src/packaging/MacOS/InstallationCheck.12 @@ -0,0 +1,19 @@ +#!/bin/sh +majorvers=`uname -r | sed 's/\..*//'` +if [ $majorvers -ne 12 ]; then + exit 112 +fi + +# check for temporary versions of ThisCell and CellAlias +# and move them aside +tmpthiscell=/private/tmp/org.OpenAFS.Install.ThisCell.$USER +tmpcellalias=/private/tmp/org.OpenAFS.Install.CellAlias.$USER +date=`date +%Y%m%d%H%M` +if [ -e $tmpthiscell ]; then + mv -f $tmpthiscell $tmpthiscell.$date +fi +if [ -e $tmpcellalias ]; then + mv -f $tmpcellalias $tmpcellalias.$date +fi + +exit 0 diff --git a/src/packaging/MacOS/InstallationCheck.strings.12 b/src/packaging/MacOS/InstallationCheck.strings.12 new file mode 100644 index 0000000..f25b14d --- /dev/null +++ b/src/packaging/MacOS/InstallationCheck.strings.12 @@ -0,0 +1 @@ +"16" = "This OpenAFS release requires Mountain Lion (10.8)"; diff --git a/src/packaging/MacOS/ReadMe.rtf.12 b/src/packaging/MacOS/ReadMe.rtf.12 new file mode 100644 index 0000000..3e8c9d6 --- /dev/null +++ b/src/packaging/MacOS/ReadMe.rtf.12 @@ -0,0 +1,7 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh9000\viewkind0 +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f0\fs24 \cf0 This release of OpenAFS is targeted at MacOS 10.8 (Mountain Lion) and is not recommended for use with any other version.} \ No newline at end of file diff --git a/src/packaging/MacOS/buildpkg.sh.in b/src/packaging/MacOS/buildpkg.sh.in index cdd9509..8de2041 100644 --- a/src/packaging/MacOS/buildpkg.sh.in +++ b/src/packaging/MacOS/buildpkg.sh.in @@ -40,6 +40,9 @@ fi if [ $majorvers -eq 11 ]; then RELNAME="Lion" fi +if [ $majorvers -eq 12 ]; then + RELNAME="MountainLion" +fi PKGROOT=$CURDIR/pkgroot PKGRES=$CURDIR/pkgres