proftpd/proftpd.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

michael@182 1 Index: mod_otp/mod_otp.c
michael@182 2 --- mod_otp/mod_otp.c.orig 2006-12-06 17:13:06 +0100
michael@182 3 +++ mod_otp/mod_otp.c 2009-01-27 08:33:56 +0100
michael@182 4 @@ -79,7 +79,7 @@
michael@182 5 CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
michael@182 6
michael@182 7 bool = get_boolean(cmd, 1);
michael@182 8 - if ((bool == -1)
michael@182 9 + if (bool == -1)
michael@182 10 CONF_ERROR(cmd, "expecting Boolean parameter");
michael@182 11
michael@182 12 c = add_config_param(cmd->argv[0], 1, NULL);
michael@182 13 @@ -128,7 +128,7 @@
michael@182 14 ": error generating challenge for user '%s': %s", cmd->argv[1], str);
michael@182 15
michael@182 16 } else
michael@182 17 - pr_add_response_dup(R_DUP, "Challenge: [ %s ]", challenge);
michael@182 18 + pr_response_add(R_DUP, "Challenge: [ %s ]", challenge);
michael@182 19
michael@182 20 return DECLINED(cmd);
michael@182 21 }
michael@182 22 Index: mod_sql_odbc/mod_sql_odbc.c
michael@182 23 --- mod_sql_odbc/mod_sql_odbc.c.orig 2007-04-17 17:05:18 +0200
michael@182 24 +++ mod_sql_odbc/mod_sql_odbc.c 2009-01-27 19:16:56 +0100
michael@182 25 @@ -890,8 +890,8 @@
michael@182 26
michael@182 27 /* Set up our timer, if necessary. */
michael@182 28 if (entry->ttl > 0) {
michael@182 29 - entry->timer = add_timer(entry->ttl, -1, &sql_odbc_module,
michael@182 30 - sqlodbc_timer_cb);
michael@182 31 + entry->timer = pr_timer_add(entry->ttl, -1, &sql_odbc_module,
michael@182 32 + sqlodbc_timer_cb, "mod_sql_odbc TTL");
michael@182 33
michael@182 34 sql_log(DEBUG_INFO, "'%s' connection: %d second timer started",
michael@182 35 entry->name, entry->ttl);
michael@182 36 Index: mod_sql_sqlite/mod_sql_sqlite.c
michael@182 37 --- mod_sql_sqlite/mod_sql_sqlite.c.orig 2007-05-21 17:37:11 +0200
michael@182 38 +++ mod_sql_sqlite/mod_sql_sqlite.c 2009-01-27 19:15:57 +0100
michael@182 39 @@ -236,8 +236,8 @@
michael@182 40
michael@182 41 /* Set up our timer, if necessary. */
michael@182 42 if (entry->ttl > 0) {
michael@182 43 - entry->timer = add_timer(entry->ttl, -1, &sql_sqlite_module,
michael@182 44 - sql_sqlite_timer_cb);
michael@182 45 + entry->timer = pr_timer_add(entry->ttl, -1, &sql_sqlite_module,
michael@182 46 + sql_sqlite_timer_cb, "mod_sql_sqlite TTL");
michael@182 47
michael@182 48 sql_log(DEBUG_INFO, "'%s' connection: %d second timer started",
michael@182 49 entry->name, entry->ttl);
michael@182 50 Index: mod_time/mod_time.c
michael@182 51 --- mod_time/mod_time.c.orig 2004-05-12 20:57:06 +0200
michael@182 52 +++ mod_time/mod_time.c 2009-01-27 08:33:56 +0100
michael@182 53 @@ -146,7 +146,7 @@
michael@182 54 /* If we don't have a password file, we create an empty array and punt.
michael@182 55 */
michael@182 56 if (!pw) {
michael@182 57 - if (!name || !(pw = (struct passwd *) auth_getpwnam(p, name))) {
michael@182 58 + if (!name || !(pw = (struct passwd *) pr_auth_getpwnam(p, name))) {
michael@182 59 *gids = make_array(p, 2, sizeof(gid_t));
michael@182 60 *groups = make_array(p, 2, sizeof(char *));
michael@182 61 return;
michael@182 62 @@ -172,7 +172,7 @@
michael@182 63 /* Now populate the names of the groups.
michael@182 64 */
michael@182 65 for (i = 0; i < total; i++) {
michael@182 66 - if ((gr = (struct group *) auth_getgrgid(p, ((gid_t *) xgids->elts)[i])))
michael@182 67 + if ((gr = (struct group *) pr_auth_getgrgid(p, ((gid_t *) xgids->elts)[i])))
michael@182 68 *((char **) push_array(xgroups)) = pstrdup(p, gr->gr_name);
michael@182 69 }
michael@182 70
michael@182 71 @@ -188,7 +188,7 @@
michael@182 72 /* Nothing there...punt.
michael@182 73 */
michael@182 74 if (!pw) {
michael@182 75 - if (!name || !(pw = (struct passwd *) auth_getpwnam(p, name))) {
michael@182 76 + if (!name || !(pw = (struct passwd *) pr_auth_getpwnam(p, name))) {
michael@182 77 *gids = xgids;
michael@182 78 *groups = xgroups;
michael@182 79 return;
michael@182 80 @@ -197,16 +197,16 @@
michael@182 81
michael@182 82 /* Populate the first group name.
michael@182 83 */
michael@182 84 - if ((gr = auth_getgrgid(p, pw->pw_gid)) != NULL)
michael@182 85 + if ((gr = pr_auth_getgrgid(p, pw->pw_gid)) != NULL)
michael@182 86 *((char **) push_array(xgroups)) = pstrdup(p, gr->gr_name);
michael@182 87
michael@182 88 - auth_setgrent(p);
michael@182 89 + pr_auth_setgrent(p);
michael@182 90
michael@182 91 /* This is where things get slow, expensive, and ugly.
michael@182 92 * Loop through everything, checking to make sure we haven't already added
michael@182 93 * it. This is why we have getgroups() and company.
michael@182 94 */
michael@182 95 - while ((gr = auth_getgrent(p)) != NULL && gr->gr_mem)
michael@182 96 + while ((gr = pr_auth_getgrent(p)) != NULL && gr->gr_mem)
michael@182 97 for (gr_mem = gr->gr_mem; *gr_mem; gr_mem++) {
michael@182 98 if (strcmp(*gr_mem, pw->pw_name) == 0) {
michael@182 99 *((int *) push_array(xgids)) = (int) gr->gr_gid;
michael@182 100 @@ -634,7 +634,7 @@
michael@182 101 if (!session.user) {
michael@182 102 /* Populate the pw struct, check for a NULL return value. */
michael@182 103
michael@182 104 - if ((pw = auth_getpwnam(cmd->tmp_pool, user)) == NULL)
michael@182 105 + if ((pw = pr_auth_getpwnam(cmd->tmp_pool, user)) == NULL)
michael@182 106 return NULL;
michael@182 107
michael@182 108 time_user = pstrdup(session.pool, pw->pw_name);
michael@182 109 @@ -1603,7 +1603,7 @@
michael@182 110 "%R", (session.c && session.c->remote_name ? session.c->remote_name : "(unknown)"),
michael@182 111 "%L", main_server->ServerFQDN,
michael@182 112 "%U", user,
michael@182 113 - "%u", session.ident_user,
michael@182 114 + "%u", session.user,
michael@182 115 "%M", mesg_max,
michael@182 116 "%N", mesg_cur,
michael@182 117 "%E", main_server->ServerAdmin,

mercurial