Questions about port revision numbers, portsnap, csup

John Levine johnl at iecc.com
Mon Apr 19 18:53:01 UTC 2010


I have the same problem, recently upgraded to PHP 5.3.2 and Apache
was crashing whenever I tried to use a mediawiki page until I commented
out the apc library.  (Apache is 2.0, Freebsd is still 7.0, if that
matters.)

>cd /usr/ports
>fetch http://people.freebsd.org/~glarkin/diffs/pecl-APC-3.1.3p1.diff
>patch < pecl-APC-3.1.3p1.diff

Didn't work, because pecl-APC is www/pecl-APC, not devel/pecl-APC.  I
edited the patch to be www/ rather than devel/ at which point the
patch applied but make failed due to one of the other patches:

===>  Patching for pecl-APC-3.1.3.p1
===>  Applying FreeBSD patches for pecl-APC-3.1.3.p1
1 out of 2 hunks failed--saving rejects to apc_sem.c.rej
=> Patch patch-apc_sem.c failed to apply cleanly.
*** Error code 1


Here's what's in apc_sem.c.rej


***************
*** 82,93 ****
          }
      }
      
-     if ((semid = semget(key, 1, IPC_CREAT | IPC_EXCL | perms)) >= 0) {
          /* sempahore created for the first time, initialize now */
          arg.val = initval;
          if (semctl(semid, 0, SETVAL, arg) < 0) {
              apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
          }
      }
      else if (errno == EEXIST) {
          /* sempahore already exists, don't initialize */
--- 82,97 ----
          }
      }
      
+     if ((semid = semget(key, 2, IPC_CREAT | IPC_EXCL | perms)) >= 0) {
          /* sempahore created for the first time, initialize now */
          arg.val = initval;
          if (semctl(semid, 0, SETVAL, arg) < 0) {
              apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
          }
+         arg.val = getpid();
+         if (semctl(semid, 1, SETVAL, arg) < 0) {
+             apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
+         }
      }
      else if (errno == EEXIST) {
          /* sempahore already exists, don't initialize */




R's,
John


More information about the freebsd-questions mailing list