[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging mod_accel?



At 12:28 Uhr -0400 09.06.2002, Daniel Jacobowitz wrote:
I'd like to see how you did this.

When run as non-root user my code creates a directory in sticky world-writeable locations instead of the default place for root (which still is /var/run/apache/mm/). The following places are tried in that order: "/var/run/apache/mm.users", "/var/tmp", "/tmp". So by default (unless the /var/run/apache/mm.users folder is created by the admin or by a postinst script, with a+wt permissions) a non-root started apache will create a folder /var/tmp/mm-$EUID (or ../mm-$EUID-[1-5] or ../mm-$EUID-$randomnumber if it has to) and put the libmm files there. The reason one might want to use /var/run/apache/mm.users is when one runs a cronjob deleting stuff from /var/tmp.

The code should be safe against race conditions. I haven't done much testing though, it's also the first code I've written for apache.

I was unsure how to integrate the code into the package. I have created a new upstream/eapi-2.8.8.patch containing my changes, and have put it together with a patch to the debian/ directory files here (but *NOTE* that the code in the below eapi patch still contains 3 'fprintf(stderr,"DEBUG...' statements that should be removed before being used seriously, but read on first):

  http://pflanze.mine.nu/~chris/debian/apache/eapi-2.8.8.cjmodified.patch
  http://pflanze.mine.nu/~chris/debian/apache/debianfolder-p3.patch

so you'd have to replace the eapi patch in the unpacked debian source package with my one, and apply debianfolder-p3.patch, then do dpkg-buildpackage.

But I suspect that making a new eapi patch is not a (politically or whatever) clean solution (though I think the code should go to the upstream author(s) so in the future it could be there), but instead should have made a file going to debian/patches/. You surely know better than me how to do this so I just provide my changes to the apache httpd.h and alloc.c files here:

( http://pflanze.mine.nu/~chris/debian/apache/debianfolder.patch )
  http://pflanze.mine.nu/~chris/debian/apache/checkcreatemmdir.patch

The checkcreatemmdir.patch should be applied after the eapi patch during the build process. (Unlike in the eapi patch I have removed the debugging statements here.)

Cheers
Christian.


--
To UNSUBSCRIBE, email to debian-apache-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: