pkgsrc-Users archive

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

Patch problem for www/ap-auth-external package



Hi list,

Today, I tried building the www/ap-auth-external package, for apache2, in pkgsrc-current. Unfortunately, it fails upon patching:

# make install
[snip]
2 out of 2 hunks failed--saving rejects to mod_auth_external.c.rej
Patch /usr/pkgsrc/www/ap-auth-external/patches/patch-aa failed
ERROR: Patching failed due to modified or broken patch file(s):
ERROR:  /usr/pkgsrc/www/ap-auth-external/patches/patch-aa
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/www/ap-auth-external
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/www/ap-auth-external

Seems that the patch step failed, for patch-aa. When looking deeper, I found that the patch has been done against the Apache 1.3 API (looking for ap_pstrcat routine), whereas the Apache 2 API uses apr_pstrcat (notice the "r"). As a consequence, the patch fails during make, as it can not fix mod_auth_external.c (version 2.2.11 - API apache 2) properly.

Possible fix: just proposing a possible patch for the apache2 API module:

--- mod_auth_external.c.orig    2006-02-15 23:44:53.000000000 +0100
+++ mod_auth_external.c 2007-11-10 20:49:51.000000000 +0100
@@ -242,6 +242,7 @@
#define ENV_PASS       "PASS"
#define ENV_GROUP      "GROUP"
#define ENV_URI                "URI"
+#define ENV_METHOD     "METHOD"
#define ENV_IP         "IP"
#define ENV_HOST       "HOST"          /* Remote Host */
#define ENV_HTTP_HOST   "HTTP_HOST"    /* Local Host */
@@ -506,6 +507,9 @@
       if (r->uri)
           child_env[i++]= apr_pstrcat(r->pool, ENV_URI"=", r->uri, NULL);

+       if (r->method)
+ child_env[i++]= apr_pstrcat(r->pool, ENV_METHOD"=", r->method, NULL);
+
       if ((host= lookup_header(r,"Host")) != NULL)
child_env[i++]= apr_pstrcat(r->pool, ENV_HTTP_HOST"=", host, NULL);


I do not know if a PR is required for that. I will fill one if you say so.

Best regards

--
Jean-Yves Migeon
4e annee - ESPCI - www.espci.fr
jean-yves.migeon%espci.fr@localhost





Home | Main Index | Thread Index | Old Index