diff --git a/proftpd-1.3.4rc1-netaddr-localhost.patch b/proftpd-1.3.4rc1-netaddr-localhost.patch new file mode 100644 index 0000000..3dffc5c --- /dev/null +++ b/proftpd-1.3.4rc1-netaddr-localhost.patch @@ -0,0 +1,36 @@ +--- proftpd-1.3.4rc1/tests/api/netaddr.c 2008/10/06 18:16:50 1.1 ++++ proftpd-1.3.4rc1/tests/api/netaddr.c 2010/12/27 05:17:59 1.2 +@@ -1,6 +1,6 @@ + /* + * ProFTPD - FTP server testsuite +- * Copyright (c) 2008 The ProFTPD Project team ++ * Copyright (c) 2008-2010 The ProFTPD Project team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -24,7 +24,7 @@ + + /* + * NetAddr API tests +- * $Id: netaddr.c,v 1.1 2008/10/06 18:16:50 castaglia Exp $ ++ * $Id: netaddr.c,v 1.2 2010/12/27 05:17:59 castaglia Exp $ + */ + + #include "tests.h" +@@ -334,8 +334,14 @@ + res = pr_netaddr_get_dnsstr(addr); + fail_unless(res != NULL, "Failed to get DNS str for addr: %s", + strerror(errno)); +- fail_unless(strcmp(res, "localhost") == 0, "Expected '%s', got '%s'", +- "localhost", res); ++ ++ /* Depending on the contents of /etc/hosts, resolving 127.0.0.1 could ++ * return either "localhost" or "localhost.localdomain". Perhaps even ++ * other variations, although these should be the most common. ++ */ ++ fail_unless(strcmp(res, "localhost") == 0 || ++ strcmp(res, "localhost.localdomain") == 0, ++ "Expected '%s', got '%s'", "localhost or localhost.localdomain", res); + } + END_TEST + diff --git a/proftpd.spec b/proftpd.spec index c33eb4b..f3e8c1b 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -43,6 +43,7 @@ Source13: http://search.cpan.org/CPAN/authors/id/C/CL/CLEMBURG/Test-Unit-0.14.t Patch0: proftpd-1.3.2rc3-nostrip.patch Patch1: proftpd-1.3.4rc1-tests.patch Patch2: proftpd-1.3.4rc1-netacl-localhost.patch +Patch3: proftpd-1.3.4rc1-netaddr-localhost.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): /sbin/chkconfig Requires(preun): /sbin/service, /sbin/chkconfig, coreutils, findutils @@ -123,10 +124,12 @@ Module to add PostgreSQL support to the ProFTPD FTP server. # Upstream patch (http://bugs.proftpd.org/3568), modified slightly, to fix the API tests %patch1 -p1 -b .tests -# Upstream patch handling localhost.localdomain as alternative to just localhost +# Upstream patches handling localhost.localdomain as alternative to just localhost # when looking up name of 127.0.0.1 for testing purposes # http://proftp.cvs.sourceforge.net/viewvc/proftp/proftpd/tests/api/netacl.c?r1=1.2&r2=1.3 -%patch2 -p1 -b .localdomain +# http://proftp.cvs.sourceforge.net/viewvc/proftp/proftpd/tests/api/netaddr.c?r1=1.1&r2=1.2 +%patch2 -p1 -b .netacl +%patch3 -p1 -b .netaddr # Avoid documentation name conflicts %{__mv} contrib/README contrib/README.contrib @@ -360,7 +363,7 @@ fi %changelog * Wed Jan 5 2011 Paul Howarth 1.3.4-0.2.rc1 - Update mod_vroot to 0.9.1 -- Add upstream patch making netacl unit test work on systems where 127.0.0.1 +- Add upstream patches making unit tests work on systems where 127.0.0.1 maps to localhost.localdomain rather than just localhost * Fri Dec 24 2010 Paul Howarth 1.3.4-0.1.rc1