From fa93f75e3826611d911b64e40d00fa68bfb51988 Mon Sep 17 00:00:00 2001 From: Christian Heim Date: Wed, 14 Mar 2007 19:17:40 +0000 Subject: [PATCH] Finally fixing #170352, thanks to Xavier again (for pointing me at the upstream patch, that removed the weird apr_shm_remove stuff). Package-Manager: portage-2.1.2.2 --- www-apache/mod_fcgid/ChangeLog | 7 +- www-apache/mod_fcgid/Manifest | 28 +++--- .../files/mod_fcgid-2.1-apr_shm_remove.patch | 98 +++++++++++++++++++ www-apache/mod_fcgid/mod_fcgid-2.1.ebuild | 14 ++- 4 files changed, 129 insertions(+), 18 deletions(-) create mode 100644 www-apache/mod_fcgid/files/mod_fcgid-2.1-apr_shm_remove.patch diff --git a/www-apache/mod_fcgid/ChangeLog b/www-apache/mod_fcgid/ChangeLog index 604ac4b6c33d..ce6130ea5fc8 100644 --- a/www-apache/mod_fcgid/ChangeLog +++ b/www-apache/mod_fcgid/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for www-apache/mod_fcgid # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/ChangeLog,v 1.26 2007/03/13 16:19:35 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/ChangeLog,v 1.27 2007/03/14 19:17:40 phreak Exp $ + + 14 Mar 2007; Christian Heim + +files/mod_fcgid-2.1-apr_shm_remove.patch, mod_fcgid-2.1.ebuild: + Finally fixing #170352, thanks to Xavier again (for pointing me at the + upstream patch, that removed the weird apr_shm_remove stuff). 13 Mar 2007; Christian Heim mod_fcgid-2.1.ebuild: Looks like newer fcgid needs a newer version of apr, thus forcing diff --git a/www-apache/mod_fcgid/Manifest b/www-apache/mod_fcgid/Manifest index a9b566f875d1..a537cbc58e25 100644 --- a/www-apache/mod_fcgid/Manifest +++ b/www-apache/mod_fcgid/Manifest @@ -5,6 +5,10 @@ AUX 20_mod_fcgid.conf 192 RMD160 ddec2de99f2c3a56021d1bac3e2249914d78919f SHA1 d MD5 afcfa360a9a77fd3bdb6c2ec89efa594 files/20_mod_fcgid.conf 192 RMD160 ddec2de99f2c3a56021d1bac3e2249914d78919f files/20_mod_fcgid.conf 192 SHA256 eb0cf50fdb8434dae0751f9578ce55067876d29d1fb6bdd85b300651ad6b058d files/20_mod_fcgid.conf 192 +AUX mod_fcgid-2.1-apr_shm_remove.patch 2478 RMD160 481ba7c2b1228173d2e99b24650bfc969fb22281 SHA1 2646671841db3f0da64065effc1331fab464bd2a SHA256 8d9c87aee1663688112ac771ff4f7dff13dee54377aa610695a86ed9ace93362 +MD5 5d1637c1ddc4d6929ab67123edf6aa98 files/mod_fcgid-2.1-apr_shm_remove.patch 2478 +RMD160 481ba7c2b1228173d2e99b24650bfc969fb22281 files/mod_fcgid-2.1-apr_shm_remove.patch 2478 +SHA256 8d9c87aee1663688112ac771ff4f7dff13dee54377aa610695a86ed9ace93362 files/mod_fcgid-2.1-apr_shm_remove.patch 2478 DIST mod_fcgid.1.10.tar.gz 51547 RMD160 17ff09a4006ee10f5c47e045df34985d0c53880b SHA1 e762889d046ddec3aa52361e5996c30973ea9079 SHA256 13b1e2197aff37f14c05cfb4e795cfe77ca36fc25d59b5ccfbe7ac8917fc705a DIST mod_fcgid.2.0.tar.gz 274974 RMD160 6e62c6c1a828489d3faa5b074e21688a449f9ca3 SHA1 386f1c6f44bbbdd599392ae2fbf0170a8f8d5e80 SHA256 714e2eac93807e768a8a81c9d157e02fd674eab472302211a137657c9241cef1 DIST mod_fcgid.2.1.tar.gz 54359 RMD160 cf8ec344ad2e108ad0b47085b0509e2c13a062c1 SHA1 4d69edaadaed11753254bd8b37a355c1151d8225 SHA256 9d847f66f8067c5b8de06088a04356d22cee9ced2db7d04be6d6a7613c6b83df @@ -16,14 +20,14 @@ EBUILD mod_fcgid-2.0.ebuild 941 RMD160 9d3e744de350acc25de0f77a49937a7d5554eae8 MD5 fe346b671f71d842a2295fa1148f8e1b mod_fcgid-2.0.ebuild 941 RMD160 9d3e744de350acc25de0f77a49937a7d5554eae8 mod_fcgid-2.0.ebuild 941 SHA256 5057ff5a53826bbd96c10c458a2169396be9f4682bcd11b69b18bf2bd077452a mod_fcgid-2.0.ebuild 941 -EBUILD mod_fcgid-2.1.ebuild 965 RMD160 65101576a873a194cf673f04b54bfd90a5683bad SHA1 922150840241d67ae87832b8dc2ffa9a50da0071 SHA256 6c766c309bd9dcb1e44ba77784d0a32ca329a6eab7e70834f226c8ddb88d1a7c -MD5 5c56ac890d45d061b7b206053092dd89 mod_fcgid-2.1.ebuild 965 -RMD160 65101576a873a194cf673f04b54bfd90a5683bad mod_fcgid-2.1.ebuild 965 -SHA256 6c766c309bd9dcb1e44ba77784d0a32ca329a6eab7e70834f226c8ddb88d1a7c mod_fcgid-2.1.ebuild 965 -MISC ChangeLog 4501 RMD160 27395e5abd2ee2ae4c37f7484136f850a86cbf8c SHA1 d8b9d35d47fbf233c92d0c977814ff47bdce0e74 SHA256 a0de605adf3157d6373859e7d805182fa73df76b5d6b34c58240f25474aab739 -MD5 e4f62c752f04e02a31b505c8669f3e38 ChangeLog 4501 -RMD160 27395e5abd2ee2ae4c37f7484136f850a86cbf8c ChangeLog 4501 -SHA256 a0de605adf3157d6373859e7d805182fa73df76b5d6b34c58240f25474aab739 ChangeLog 4501 +EBUILD mod_fcgid-2.1.ebuild 1016 RMD160 799799c8966bfd85f55888a68265a079a932955a SHA1 42faaa977a6a032936b8a1a3f32b2db179b5e8cd SHA256 338f5b96bb6813ee188619bc45b6f2926ec18808ccec5876542ae84a449bf3fc +MD5 1b1d0551adf19fe518db556778e25001 mod_fcgid-2.1.ebuild 1016 +RMD160 799799c8966bfd85f55888a68265a079a932955a mod_fcgid-2.1.ebuild 1016 +SHA256 338f5b96bb6813ee188619bc45b6f2926ec18808ccec5876542ae84a449bf3fc mod_fcgid-2.1.ebuild 1016 +MISC ChangeLog 4756 RMD160 3fbc0d07fcc58455ad27fc10174dca0d8094dbe6 SHA1 4867c1331edefbeaa59a920a75f0ac3cc4612ada SHA256 07308aa930372caebe9db77bca6410fc34d52927fc102810ed536ed272ae1f39 +MD5 958778313b7b7324a7546b94bd6c3d87 ChangeLog 4756 +RMD160 3fbc0d07fcc58455ad27fc10174dca0d8094dbe6 ChangeLog 4756 +SHA256 07308aa930372caebe9db77bca6410fc34d52927fc102810ed536ed272ae1f39 ChangeLog 4756 MISC metadata.xml 483 RMD160 56be90c965ab5663636d639624c7778409e72347 SHA1 4704b1f7b6e558722c8613e66df8d148165d7a64 SHA256 9acd2c7ac26a99c1ba655aa7912526906c3e5d03529aeadcb08f9b40373244bc MD5 b04c3f93349f84b2bc615931f1c1d6c9 metadata.xml 483 RMD160 56be90c965ab5663636d639624c7778409e72347 metadata.xml 483 @@ -38,9 +42,9 @@ MD5 c332373544b3839233ac7199b1b3048c files/digest-mod_fcgid-2.1 238 RMD160 b8344a3f713ccefee2f752a5b31259a52f19d67d files/digest-mod_fcgid-2.1 238 SHA256 cc68ac5febecd1750373fb497c2f00536f093a83f0f19efd5d7b174d3c2d97fa files/digest-mod_fcgid-2.1 238 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.2 (GNU/Linux) +Version: GnuPG v2.0.3 (GNU/Linux) -iD8DBQFF9s8cyuNVb5qfaOYRAqAWAKCTnb17FUZQbV9uH4/Lvb9cHXKpcACguTjQ -ujn7Rtz1IM5JeTGVPI29svs= -=5p47 +iD8DBQFF+EpbyuNVb5qfaOYRAgUCAJ9M0o+zhKdZ+FeLoymi2x1Ys14rGgCgzfmT +7K8Bnkv+qOD5uFGJLGVGRig= +=ksNr -----END PGP SIGNATURE----- diff --git a/www-apache/mod_fcgid/files/mod_fcgid-2.1-apr_shm_remove.patch b/www-apache/mod_fcgid/files/mod_fcgid-2.1-apr_shm_remove.patch new file mode 100644 index 000000000000..45dba362b2f8 --- /dev/null +++ b/www-apache/mod_fcgid/files/mod_fcgid-2.1-apr_shm_remove.patch @@ -0,0 +1,98 @@ +--- arch/unix/fcgid_proctbl_unix.c.prev 2007-02-16 03:34:41.000000000 +0100 ++++ arch/unix/fcgid_proctbl_unix.c 2007-03-14 19:05:54.000000000 +0100 +@@ -1,4 +1,5 @@ + #include "fcgid_proctbl.h" ++#include "apr_version.h" + #include "apr_shm.h" + #include "apr_global_mutex.h" + #include "fcgid_global.h" +@@ -18,6 +19,89 @@ + static fcgid_global_share *g_global_share = NULL; /* global information */ + static size_t g_table_size = FCGID_PROC_TABLE_SIZE; + ++/* apr version 0.x not support apr_shm_remove, I have to copy it from apr version 1.x */ ++#if (APR_MAJOR_VERSION < 1) ++#ifdef HAVE_SYS_MMAN_H ++#include ++#endif ++#ifdef HAVE_SYS_IPC_H ++#include ++#endif ++#ifdef HAVE_SYS_MUTEX_H ++#include ++#endif ++#ifdef HAVE_SYS_SHM_H ++#include ++#endif ++#if !defined(SHM_R) ++#define SHM_R 0400 ++#endif ++#if !defined(SHM_W) ++#define SHM_W 0200 ++#endif ++#ifdef HAVE_SYS_FILE_H ++#include ++#endif ++ ++static apr_status_t apr_shm_remove(const char *filename, apr_pool_t * pool) ++{ ++#if APR_USE_SHMEM_SHMGET ++ apr_status_t status; ++ apr_file_t *file; ++ key_t shmkey; ++ int shmid; ++#endif ++ ++#if APR_USE_SHMEM_MMAP_TMP ++ return apr_file_remove(filename, pool); ++#endif ++#if APR_USE_SHMEM_MMAP_SHM ++ if (shm_unlink(filename) == -1) { ++ return errno; ++ } ++ return APR_SUCCESS; ++#endif ++#if APR_USE_SHMEM_SHMGET ++ /* Presume that the file already exists; just open for writing */ ++ status = apr_file_open(&file, filename, APR_WRITE, ++ APR_OS_DEFAULT, pool); ++ if (status) { ++ return status; ++ } ++ ++ /* ftok() (on solaris at least) requires that the file actually ++ * exist before calling ftok(). */ ++ shmkey = ftok(filename, 1); ++ if (shmkey == (key_t) - 1) { ++ goto shm_remove_failed; ++ } ++ ++ apr_file_close(file); ++ ++ if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) < 0) { ++ goto shm_remove_failed; ++ } ++ ++ /* Indicate that the segment is to be destroyed as soon ++ * as all processes have detached. This also disallows any ++ * new attachments to the segment. */ ++ if (shmctl(shmid, IPC_RMID, NULL) == -1) { ++ goto shm_remove_failed; ++ } ++ return apr_file_remove(filename, pool); ++ ++ shm_remove_failed: ++ status = errno; ++ /* ensure the file has been removed anyway. */ ++ apr_file_remove(filename, pool); ++ return status; ++#endif ++ ++ /* No support for anonymous shm */ ++ return APR_ENOTIMPL; ++} ++#endif /* APR_MAJOR_VERSION<1 */ ++ + apr_status_t + proctable_post_config(server_rec * main_server, apr_pool_t * configpool) + { diff --git a/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild b/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild index d3f7bf733628..8bcc017df64c 100644 --- a/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild +++ b/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild,v 1.2 2007/03/13 16:19:35 phreak Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_fcgid/mod_fcgid-2.1.ebuild,v 1.3 2007/03/14 19:17:40 phreak Exp $ -inherit apache-module +inherit apache-module eutils KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" @@ -13,9 +13,6 @@ LICENSE="GPL-2" SLOT="0" IUSE="" -DEPEND="=dev-libs/apr-1*" -RDEPEND="${DEPEND}" - S="${WORKDIR}/${PN}.${PV}" APACHE2_MOD_CONF="20_${PN}" @@ -32,3 +29,10 @@ APXS2_ARGS="-I ${S} -c ${PN}.c fcgid_bridge.c \ DOCFILES="AUTHOR ChangeLog" need_apache2 + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-apr_shm_remove.patch +} -- 2.26.2