ports/161405: [patch] [maintainer] net/openafs: catch up to sys_ kernel API change
Ben Kaduk
kaduk at mit.edu
Sat Oct 8 22:00:05 UTC 2011
>Number: 161405
>Category: ports
>Synopsis: [patch] [maintainer] net/openafs: catch up to sys_ kernel API change
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 08 22:00:04 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Ben Kaduk
>Release: 9-beta 3
>Organization:
MIT SIPB
>Environment:
n/a
>Description:
In r225617, kmacy renamed a bunch of kernel functions, in effect changing the API. The OpenAFS kernel module needs to be updated for that API change, preferably before the 9.0 release actually happens.
>How-To-Repeat:
try to build net/openafs on 9-stable or 10-current
>Fix:
Patch attached with submission follows:
diff -ruN openafs.old/Makefile openafs.submit/Makefile
--- openafs.old/Makefile 2011-10-08 17:35:31.000000000 -0400
+++ openafs.submit/Makefile 2011-10-08 17:52:17.000000000 -0400
@@ -8,6 +8,7 @@
PORTNAME= openafs
DISTVERSION= ${AFS_DISTVERSION}.${DBVERSION:S/-//g}
+PORTREVISION= 1
CATEGORIES= net kld
MASTER_SITES= http://dl.central.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
http://dl.openafs.org/dl/openafs/${AFS_DISTVERSION}/:openafs \
diff -ruN openafs.old/files/patch-src__afs__FBSD__osi_groups.c openafs.submit/files/patch-src__afs__FBSD__osi_groups.c
--- openafs.old/files/patch-src__afs__FBSD__osi_groups.c 1969-12-31 19:00:00.000000000 -0500
+++ openafs.submit/files/patch-src__afs__FBSD__osi_groups.c 2011-10-08 17:44:37.000000000 -0400
@@ -0,0 +1,22 @@
+diff --git a/src/afs/FBSD/osi_groups.c b/src/afs/FBSD/osi_groups.c
+index ef62478..e897f46 100644
+--- a/src/afs/FBSD/osi_groups.c
++++ b/src/afs/FBSD/osi_groups.c
+@@ -48,9 +48,17 @@ Afs_xsetgroups(struct thread *td, struct setgroups_args *uap)
+ AFS_GUNLOCK();
+ crfree(cr);
+ if (code)
++#if (__FreeBSD_version >= 900044)
++ return sys_setgroups(td, uap); /* afs has shut down */
++#else
+ return setgroups(td, uap); /* afs has shut down */
++#endif
+
++#if (__FreeBSD_version >= 900044)
++ code = sys_setgroups(td, uap);
++#else
+ code = setgroups(td, uap);
++#endif
+ /* Note that if there is a pag already in the new groups we don't
+ * overwrite it with the old pag.
+ */
diff -ruN openafs.old/files/patch-src__afs__afs_pioctl.c openafs.submit/files/patch-src__afs__afs_pioctl.c
--- openafs.old/files/patch-src__afs__afs_pioctl.c 1969-12-31 19:00:00.000000000 -0500
+++ openafs.submit/files/patch-src__afs__afs_pioctl.c 2011-10-08 17:44:50.000000000 -0400
@@ -0,0 +1,16 @@
+diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
+index cf432d6..2589b79 100644
+--- a/src/afs/afs_pioctl.c
++++ b/src/afs/afs_pioctl.c
+@@ -874,7 +874,11 @@ afs_xioctl(afs_proc_t *p, const struct ioctl_args *uap, register_t *retval)
+
+ if (!ioctlDone) {
+ # if defined(AFS_FBSD_ENV)
++# if (__FreeBSD_version >= 900044)
++ return sys_ioctl(td, uap);
++# else
+ return ioctl(td, uap);
++# endif
+ # elif defined(AFS_OBSD_ENV)
+ code = sys_ioctl(p, uap, retval);
+ # elif defined(AFS_NBSD_ENV)
diff -ruN openafs.old/files/patch-src__afs__afs_prototypes.h openafs.submit/files/patch-src__afs__afs_prototypes.h
--- openafs.old/files/patch-src__afs__afs_prototypes.h 1969-12-31 19:00:00.000000000 -0500
+++ openafs.submit/files/patch-src__afs__afs_prototypes.h 2011-10-08 17:45:08.000000000 -0400
@@ -0,0 +1,16 @@
+diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
+index 04f13ad..4135ebb 100644
+--- a/src/afs/afs_prototypes.h
++++ b/src/afs/afs_prototypes.h
+@@ -935,8 +935,9 @@ extern int copyin_afs_ioctl(caddr_t cmarg, struct afs_ioctl *dst);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+ #ifdef AFS_DARWIN100_ENV
+ extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval);
+-#elif defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
+-/* afs3_syscall prototype is in sys/sysproto.h */
++#elif (defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)) && (__FreeBSD_version < 900044)
++/* afs3_syscall prototype is in sys/sysproto.h
++ Yes, they put it in, then took it out again (renamed with a sys_ prefix) */
+ #elif defined(AFS_FBSD_ENV)
+ extern int afs3_syscall(struct thread *p, void *args);
+ #elif defined(AFS_NBSD50_ENV)
diff -ruN openafs.old/files/patch-src__rx__FBSD__rx_knet.c openafs.submit/files/patch-src__rx__FBSD__rx_knet.c
--- openafs.old/files/patch-src__rx__FBSD__rx_knet.c 1969-12-31 19:00:00.000000000 -0500
+++ openafs.submit/files/patch-src__rx__FBSD__rx_knet.c 2011-10-08 17:45:24.000000000 -0400
@@ -0,0 +1,16 @@
+diff --git a/src/rx/FBSD/rx_knet.c b/src/rx/FBSD/rx_knet.c
+index c6d2d84..ded3f7c 100644
+--- a/src/rx/FBSD/rx_knet.c
++++ b/src/rx/FBSD/rx_knet.c
+@@ -92,7 +92,11 @@ osi_StopListener(void)
+ p = pfind(rxk_ListenerPid);
+ if (p) {
+ afs_warn("osi_StopListener: rxk_ListenerPid %u\n", rxk_ListenerPid);
++#if (__FreeBSD_version >= 90004)
++ kern_psignal(p, SIGUSR1);
++#else
+ psignal(p, SIGUSR1);
++#endif
+ PROC_UNLOCK(p);
+ } else
+ afs_warn("osi_StopListener: rxk_Listener not found (pid %u)\n",
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list