From e5b173fd966fc71adc572781040c8e7b9c7ad267 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 10 Jan 2004 21:12:32 +0000 Subject: [PATCH] Merge changes between 1.2.10 and 1.2.11 --- Makefile.in | 32 ++++++++++++++++++++++++------- debian/patch.devname_e2fslibs-dev | 17 ---------------- src/afs/Makefile.in | 23 ++++++++++++++++------ src/afsd/afs.rc.darwin.plist | 2 +- src/afsmonitor/afsmonitor.c | 6 ++++-- src/lwp/Makefile.in | 4 +++- src/ptserver/Makefile.in | 4 +++- src/rxkad/Makefile.in | 4 +++- src/sys/Makefile.in | 4 +++- src/vol/devname.c | 8 ++------ src/vol/partition.c | 15 ++++++++++++++- 11 files changed, 75 insertions(+), 44 deletions(-) delete mode 100644 debian/patch.devname_e2fslibs-dev diff --git a/Makefile.in b/Makefile.in index 6082a665f..1d91c7be5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. SHELL=/bin/sh DEST=@DEST@ @@ -89,7 +91,7 @@ dest_only_libafs: all dest_dirs packages: dest @case ${SYS_NAME} in \ - ppc_darwin* ) \ + *_darwin_* ) \ ${COMPILE_PART1} packaging/MacOS && sh ./buildpkg.sh ${DEST} ;; \ hp_ux110 ) \ ${COMPILE_PART1} packaging/HP-UX && swpackage -s psf-1.2.10-transarc-paths-11.00 ;; \ @@ -256,6 +258,10 @@ tviced: project viced vlserver libafsrpc libafsauthent case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*_5*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \ + *_darwin_[1-6][0-9]) \ + echo Not building MT viced for ${SYS_NAME} ;; \ + *_darwin_*) \ + ${COMPILE_PART1} tviced ${COMPILE_PART2} ;; \ *) \ echo Not building MT viced for ${SYS_NAME} ;; \ esac @@ -275,7 +281,7 @@ null: project gtx: project null auth # kauth rxkad ? case ${SYS_NAME} in \ - rs_aix* | sun*_5? | sgi_6? | *linux* | ppc_darwin* | *fbsd* | ia64_hpux*) \ + rs_aix* | sun*_5? | sgi_6? | *linux* | *_darwin_* | *fbsd* | ia64_hpux*) \ $(RM) -f ${TOP_LIBDIR}/libtermlib.a; \ ln -s libnull.a ${TOP_LIBDIR}/libtermlib.a; \ ${COMPILE_PART1} gtx ${COMPILE_PART2};; \ @@ -306,7 +312,7 @@ bozo: project ntp audit vfsck: vol set -x; \ case ${SYS_NAME} in \ - sgi_* | *linux* | rs_aix42 | ppc_darwin* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | sun*_4* ) \ + sgi_* | *linux* | rs_aix42 | *_darwin_* | hp_ux* | ia64_hpux* | *fbsd* | *_obsd* | sun*_4* ) \ echo skip vfsck for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} vfsck ${COMPILE_PART2} ;; \ @@ -331,7 +337,7 @@ login: project kauth rxkad else \ echo Skipping pam for ${SYS_NAME} ; \ fi ;; \ - ppc_darwin* | *_obsd* ) \ + *_darwin_* | *_obsd* ) \ echo Skipping login for ${SYS_NAME} ;; \ * ) \ ${COMPILE_PART1} login ${COMPILE_PART2} ;; \ @@ -454,6 +460,10 @@ libafsrpc: rx rxkad des case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \ ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \ + *_darwin_[1-6][0-9]) \ + echo Not building MT libafsrpc for ${SYS_NAME} ;; \ + *_darwin_*) \ + ${COMPILE_PART1} libafsrpc ${COMPILE_PART2} ;; \ *) \ echo Not building MT libafsrpc for ${SYS_NAME} ;; \ esac @@ -462,8 +472,12 @@ libafsauthent: ubik auth kauth libafsrpc case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*|*fbsd*) \ ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \ + *_darwin_[1-6][0-9]) \ + echo Not building MT libafsauthent for ${SYS_NAME} ;; \ + *_darwin_*) \ + ${COMPILE_PART1} libafsauthent ${COMPILE_PART2} ;; \ *) \ - echo Not building MT libafsrpc for ${SYS_NAME} ;; \ + echo Not building MT libafsauthent for ${SYS_NAME} ;; \ esac shlibafsrpc: rx rxkad des @@ -483,7 +497,7 @@ shlibafsauthent: ubik auth kauth shlibafsrpc alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ ${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \ *) \ - echo Not building shared libafsrpc for ${SYS_NAME} ;; \ + echo Not building shared libafsauthent for ${SYS_NAME} ;; \ esac libadmin_real: @@ -502,6 +516,10 @@ libadmin: libafsauthent bozo case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \ $(MAKE) libadmin_real ;; \ + *_darwin_[1-6][0-9]) \ + echo Not building MT libadmin for ${SYS_NAME} ;; \ + *_darwin_*) \ + $(MAKE) libadmin_real ;; \ *) \ echo Not building MT libadmin for ${SYS_NAME} ;; \ esac @@ -784,7 +802,7 @@ package.files: package ntp: project volser @case ${WITH_OBSOLETE} in \ YES) case ${SYS_NAME} in \ - sun*_5[89] | *linux* | *fbsd* | ppc_darwin* ) echo skipping ntp for ${SYS_NAME} ;; \ + sun*_5[89] | *linux* | *fbsd* | *_darwin_* ) echo skipping ntp for ${SYS_NAME} ;; \ * ) ${COMPILE_PART1} ntp ${COMPILE_PART2} ;; \ esac ;; \ *) echo skipping deprecated target: ntp ;; \ diff --git a/debian/patch.devname_e2fslibs-dev b/debian/patch.devname_e2fslibs-dev deleted file mode 100644 index 5b772b8c4..000000000 --- a/debian/patch.devname_e2fslibs-dev +++ /dev/null @@ -1,17 +0,0 @@ -Index: src/vol/devname.c -=================================================================== -RCS file: /afs/sipb.mit.edu/project/openafs/debian/cvs/openafs/src/vol/devname.c,v -retrieving revision 1.1.1.8 -diff -u -r1.1.1.8 devname.c ---- src/vol/devname.c 14 Oct 2001 18:07:21 -0000 1.1.1.8 -+++ src/vol/devname.c 20 Nov 2003 21:03:46 -0000 -@@ -86,8 +86,7 @@ - #endif /* ITIMER_REAL */ - #include "partition.h" - #ifdef AFS_LINUX22_ENV --#include --#include -+#include - #define ROOTINO EXT2_ROOT_INO /* Assuming we do this on ext2, of course. */ - #endif - diff --git a/src/afs/Makefile.in b/src/afs/Makefile.in index 99d72bd4a..e2d11baff 100644 --- a/src/afs/Makefile.in +++ b/src/afs/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ @@ -30,7 +32,7 @@ UKERNELDIR = ../libuafs include ../config/Makefile.${SYS_NAME} -all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h +all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h ${TOP_INCDIR}/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \ @@ -56,7 +58,7 @@ afszcm.cat: afs_trace.msf /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* | *_umlinux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ - ppc_darwin* | i386_fbsd*) \ + *_darwin_* | i386_fbsd*) \ echo No gencat for ${SYS_NAME} ;; \ * ) \ gencat afszcm.cat afs_trace.msf ;; \ @@ -74,7 +76,7 @@ ukinstall: ${UKERNELDIR}/afs AFS_component_version_number.c afs_trace.h ${UKERNELDIR}/afs: mkdir -p $@ -install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h +install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \ @@ -117,11 +119,20 @@ ${DEST}/include/afs/afs_stats.h: afs_stats.h ${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ - ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ +${DEST}/include/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + +${DESTDIR}${includedir}/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + +${TOP_INCDIR}/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + + ${DEST}/include/afs/exporter.h: exporter.h ${INSTALL} $? $@ @@ -144,13 +155,13 @@ ${TOP_INCDIR}/afs/nfsclient.h: nfsclient.h ${INSTALL} $? $@ -dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h +dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \ esac case ${SYS_NAME} in \ - next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \ + next_mach30 | vax_ul43 | *_darwin_* | i386_fbsd* ) \ echo skipping afszcm.cat install for ${SYS_NAME} ;; \ * ) \ ${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \ diff --git a/src/afsd/afs.rc.darwin.plist b/src/afsd/afs.rc.darwin.plist index 4c05dd1f0..5e3054e26 100644 --- a/src/afsd/afs.rc.darwin.plist +++ b/src/afsd/afs.rc.darwin.plist @@ -1,7 +1,7 @@ { Description = "OpenAFS network file system"; Provides = ("AFS"); - Requires = ("Resolver"); + Requires = ("Resolver", "Disks"); OrderPreference = "None"; Messages = { diff --git a/src/afsmonitor/afsmonitor.c b/src/afsmonitor/afsmonitor.c index 948c3b304..50c068546 100644 --- a/src/afsmonitor/afsmonitor.c +++ b/src/afsmonitor/afsmonitor.c @@ -5,6 +5,8 @@ * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* @@ -16,7 +18,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/afsmonitor/afsmonitor.c,v 1.2 2003/01/02 03:55:49 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/afsmonitor/afsmonitor.c,v 1.3 2004/01/10 21:12:32 hartmans Exp $"); #include #include @@ -274,7 +276,7 @@ extern char *cm_categories[]; /* cache manager data category names */ -#ifndef AFS_FBSD_ENV +#if !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN70_ENV) /* strcasestr(): Return first occurence of pattern s2 in s1, case insensitive. diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index 46c0f7bcc..f635e6892 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ @@ -75,7 +77,7 @@ process.o : process.s process.c /lib/cpp -P -I${TOP_INCDIR} process.s >process.ss; \ ${AS} -ahlns process.ss -o process.o >process.lst; \ $(RM) process.ss ;; \ - ppc_darwin* ) \ + *_darwin_* ) \ $(CC) -c ${XCFLAGS} -I${TOP_INCDIR} process.s;; \ i386_fbsd* ) \ /usr/bin/cpp -P process.fbsd.s > process.ss; \ diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index 1600aadda..368ad6044 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ TOP_LIBDIR=@TOP_LIBDIR@ @@ -142,7 +144,7 @@ readpwd.o: readpwd.c ${LINCLS} AFS_component_version_number.c testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) case "$(SYS_NAME)" in \ - ppc_darwin_12 ) \ + *_darwin_12 ) \ $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \ * ) \ $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \ diff --git a/src/rxkad/Makefile.in b/src/rxkad/Makefile.in index c81a041e0..83c025908 100644 --- a/src/rxkad/Makefile.in +++ b/src/rxkad/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. # */ @@ -37,7 +39,7 @@ CFLAGS=${OPTMZ} -I${TOP_SRCDIR}/config -I${TOP_INCDIR} -I. ${XCFLAGS} INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \ rxkad.h v5gen.h -OBJS=rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o \ +OBJS=rxkad_client.o rxkad_server.o rxkad_common.o rxkad_errs.o \ fcrypt.o crypt_conn.o ticket.o ticket5.o crc.o diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index bfe6fc08e..85b42a21f 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -4,6 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +# +# Portions Copyright (c) 2003 Apple Computer, Inc. # System calls. @@ -112,7 +114,7 @@ syscall.o: syscall.s /usr/ccs/lib/cpp ${SFLAGS} syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ - sgi_* |ppc_darwin* ) \ + sgi_* |*_darwin_* ) \ ${CC} ${CFLAGS} -c syscall.s;; \ alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER syscall.s; \ diff --git a/src/vol/devname.c b/src/vol/devname.c index f50dd4042..bed3cc799 100644 --- a/src/vol/devname.c +++ b/src/vol/devname.c @@ -10,7 +10,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.2 2003/11/20 21:43:49 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.3 2004/01/10 21:12:32 hartmans Exp $"); #include #include @@ -85,10 +85,6 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/vol/devname.c,v 1.2 2003/11/20 21:43:49 #include #endif /* ITIMER_REAL */ #include "partition.h" -#ifdef AFS_LINUX22_ENV -#include -#define ROOTINO EXT2_ROOT_INO /* Assuming we do this on ext2, of course. */ -#endif /* ensure that we don't have a "/" instead of a "/dev/rxd0a" type of device. * returns pointer to static storage; copy it out quickly! @@ -179,7 +175,7 @@ dev_t adev; { if (stat(part, &status) == -1) { continue; } -#ifndef AFS_SGI_XFS_IOPS_ENV +#if !defined(AFS_SGI_XFS_IOPS_ENV) && !defined(AFS_LINUX22_ENV) if ((status.st_ino != ROOTINO) /*|| ((status.st_mode & S_IFMT) != S_IFBLK)*/) { continue; } diff --git a/src/vol/partition.c b/src/vol/partition.c index b72b709e5..42669ae6f 100644 --- a/src/vol/partition.c +++ b/src/vol/partition.c @@ -5,6 +5,8 @@ * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* @@ -18,7 +20,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/vol/partition.c,v 1.13 2003/01/02 03:55:53 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/vol/partition.c,v 1.14 2004/01/10 21:12:32 hartmans Exp $"); #include #ifdef AFS_NT40_ENV @@ -1033,6 +1035,9 @@ void VLockPartition_r(char *name) unsigned int *globalMask; int globalMaskIndex; #endif /* defined(AFS_HPUX_ENV) */ +#if defined(AFS_DARWIN_ENV) + char lockfile[MAXPATHLEN]; +#endif /* defined(AFS_DARWIN_ENV) */ if (!dp) return; /* no partition, will fail later */ if (dp->lock_fd != -1) return; @@ -1040,13 +1045,21 @@ void VLockPartition_r(char *name) #if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) partitionName = dp->devName; code = O_RDWR; +#elif defined(AFS_DARWIN_ENV) + strlcpy((partitionName = lockfile), dp->name, sizeof(lockfile)); + strlcat(lockfile, "/.lock.afs", sizeof(lockfile)); + code = O_RDONLY | O_CREAT; #else partitionName = dp->name; code = O_RDONLY; #endif for (retries=25; retries; retries--) { +#if defined(AFS_DARWIN_ENV) + dp->lock_fd = open(partitionName, code, 0600); +#else /* ! defined(AFS_DARWIN_ENV) */ dp->lock_fd = open(partitionName, code); +#endif /* defined(AFS_DARWIN_ENV) */ if (dp->lock_fd != -1) break; pausing.tv_sec = 0; pausing.tv_usec = 500000; -- 2.39.5