!16 [sync] PR-11: 22.03 LTS选型 升级到1.3.7c
From: @openeuler-sync-bot Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
630adfc354
@ -37,4 +37,4 @@
|
||||
+#!/usr/bin/perl
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Copyright (C) 2008-2012 TJ Saunders <tj@castaglia.org>
|
||||
# Copyright (C) 2008-2020 TJ Saunders <tj@castaglia.org>
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From ca74554f6f30ffea6842f375204736fd6bde78f4 Mon Sep 17 00:00:00 2001
|
||||
From: TJ Saunders <tj@castaglia.org>
|
||||
Date: Sat, 20 Mar 2021 09:53:11 -0700
|
||||
Subject: [PATCH] Issue #1201: Adjusting unit test timeouts for the GitHub
|
||||
Actions environment.
|
||||
|
||||
---
|
||||
tests/api/netaddr.c | 3 +++
|
||||
1 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/tests/api/netaddr.c b/tests/api/netaddr.c
|
||||
index 6144c70695..60dbb29319 100644
|
||||
--- a/tests/api/netaddr.c
|
||||
+++ b/tests/api/netaddr.c
|
||||
@@ -1464,6 +1464,9 @@ Suite *tests_get_netaddr_suite(void) {
|
||||
tcase_add_test(testcase, netaddr_disable_ipv6_test);
|
||||
tcase_add_test(testcase, netaddr_enable_ipv6_test);
|
||||
|
||||
+ /* Some of the DNS-related tests may take a little longer. */
|
||||
+ tcase_set_timeout(testcase, 60);
|
||||
+
|
||||
suite_add_tcase(suite, testcase);
|
||||
return suite;
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
--- tests/api/env.c
|
||||
+++ tests/api/env.c
|
||||
@@ -61,11 +61,11 @@ START_TEST (env_get_test) {
|
||||
pr_env_unset(p, key);
|
||||
|
||||
res = pr_env_get(p, key);
|
||||
- fail_unless(res == NULL);
|
||||
+ fail_unless(res == NULL, "Unexpectedly found foo in environment");
|
||||
|
||||
/* XXX PATH should always be set in the environment, right? */
|
||||
res = pr_env_get(p, "PATH");
|
||||
- fail_unless(res != NULL);
|
||||
+ fail_unless(res != NULL, "Failed to find PATH in environment");
|
||||
|
||||
#else
|
||||
res = pr_env_get(p, key);
|
||||
--- tests/api/sets.c
|
||||
+++ tests/api/sets.c
|
||||
@@ -97,20 +97,20 @@ START_TEST (set_create_test) {
|
||||
fail_unless(errno == EPERM, "Failed to set errno to EPERM");
|
||||
|
||||
res = xaset_create(p, NULL);
|
||||
- fail_unless(res != NULL);
|
||||
+ fail_unless(res != NULL, "Failed with valid pool and NULL compare item");
|
||||
fail_unless(res->pool == p, "Expected %p, got %p", p, res->pool);
|
||||
|
||||
permanent_pool = make_sub_pool(p);
|
||||
|
||||
res = xaset_create(NULL, NULL);
|
||||
- fail_unless(res != NULL);
|
||||
+ fail_unless(res != NULL, "Failed to handle null arguments");
|
||||
fail_unless(res->pool == permanent_pool, "Expected %p, got %p",
|
||||
permanent_pool, res->pool);
|
||||
fail_unless(res->xas_compare == NULL, "Expected NULL, got %p",
|
||||
res->xas_compare);
|
||||
|
||||
res = xaset_create(p, (XASET_COMPARE) item_cmp);
|
||||
- fail_unless(res != NULL);
|
||||
+ fail_unless(res != NULL, "Failed with valid pool and compare items");
|
||||
fail_unless(res->pool == p, "Expected %p, got %p", p, res->pool);
|
||||
fail_unless(res->xas_compare == (XASET_COMPARE) item_cmp,
|
||||
"Expected %p, got %p", item_cmp, res->xas_compare);
|
||||
@@ -355,12 +355,12 @@ START_TEST (set_remove_test) {
|
||||
fail_unless(res == 0, "Failed to add item2");
|
||||
|
||||
member = (xasetmember_t *) item1;
|
||||
- fail_unless(member->next == NULL);
|
||||
- fail_unless(member->prev != NULL);
|
||||
+ fail_unless(member->next == NULL, "Next pointer is not NULL");
|
||||
+ fail_unless(member->prev != NULL, "Previous pointer is NULL");
|
||||
|
||||
member = (xasetmember_t *) item2;
|
||||
- fail_unless(member->next != NULL);
|
||||
- fail_unless(member->prev == NULL);
|
||||
+ fail_unless(member->next != NULL, "Next pointer is NULL");
|
||||
+ fail_unless(member->prev == NULL, "Previous pointer is not NULL");
|
||||
|
||||
member = set->xas_list;
|
||||
fail_unless(member == (xasetmember_t *) item2,
|
||||
@@ -371,8 +371,8 @@ START_TEST (set_remove_test) {
|
||||
strerror(errno));
|
||||
|
||||
member = (xasetmember_t *) item2;
|
||||
- fail_unless(member->next == NULL);
|
||||
- fail_unless(member->prev == NULL);
|
||||
+ fail_unless(member->next == NULL, "Next pointer is not NULL");
|
||||
+ fail_unless(member->prev == NULL, "Previous pointer is not NULL");
|
||||
|
||||
member = set->xas_list;
|
||||
fail_unless(member == (xasetmember_t *) item1,
|
||||
@@ -383,8 +383,8 @@ START_TEST (set_remove_test) {
|
||||
strerror(errno));
|
||||
|
||||
member = (xasetmember_t *) item1;
|
||||
- fail_unless(member->next == NULL);
|
||||
- fail_unless(member->prev == NULL);
|
||||
+ fail_unless(member->next == NULL, "Next pointer is not NULL");
|
||||
+ fail_unless(member->prev == NULL, "Previous pointer is not NULL");
|
||||
|
||||
member = set->xas_list;
|
||||
fail_unless(member == NULL, "Expected list to be empty, got %p", member);
|
||||
--- tests/api/str.c
|
||||
+++ tests/api/str.c
|
||||
@@ -1539,10 +1539,10 @@ START_TEST (uid2str_test) {
|
||||
const char *res;
|
||||
|
||||
res = pr_uid2str(NULL, (uid_t) 1);
|
||||
- fail_unless(strcmp(res, "1") == 0);
|
||||
+ fail_unless(strcmp(res, "1") == 0, "Failed to handle uid of 1");
|
||||
|
||||
res = pr_uid2str(NULL, (uid_t) -1);
|
||||
- fail_unless(strcmp(res, "-1") == 0);
|
||||
+ fail_unless(strcmp(res, "-1") == 0, "Failed to handle uid of -1");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
@@ -1550,10 +1550,10 @@ START_TEST (gid2str_test) {
|
||||
const char *res;
|
||||
|
||||
res = pr_gid2str(NULL, (gid_t) 1);
|
||||
- fail_unless(strcmp(res, "1") == 0);
|
||||
+ fail_unless(strcmp(res, "1") == 0, "Failed to handle gid of 1");
|
||||
|
||||
res = pr_gid2str(NULL, (gid_t) -1);
|
||||
- fail_unless(strcmp(res, "-1") == 0);
|
||||
+ fail_unless(strcmp(res, "-1") == 0, "Failed to handle gid of -1");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
--- tests/api/timers.c
|
||||
+++ tests/api/timers.c
|
||||
@@ -157,7 +157,7 @@ START_TEST (timer_remove_test) {
|
||||
int res;
|
||||
|
||||
res = pr_timer_remove(0, NULL);
|
||||
- fail_unless(res == 0);
|
||||
+ fail_unless(res == 0, "Non-zero response for removal with timer ID 0");
|
||||
|
||||
res = pr_timer_add(1, 0, NULL, timers_test_cb, "test");
|
||||
fail_unless(res == 0, "Failed to add timer (%d): %s", res, strerror(errno));
|
||||
@ -1,84 +0,0 @@
|
||||
diff -ruNa proftpd-1.3.7a/tests/api/netacl.c proftpd-1.3.7a-fix/tests/api/netacl.c
|
||||
--- proftpd-1.3.7a/tests/api/netacl.c 2020-07-22 01:25:51.000000000 +0800
|
||||
+++ proftpd-1.3.7a-fix/tests/api/netacl.c 2021-01-13 14:44:00.679322360 +0800
|
||||
@@ -773,8 +773,10 @@
|
||||
|
||||
res = pr_netacl_match(acl, addr);
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
- fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
|
||||
- strerror(errno));
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!have_localdomain) {
|
||||
@@ -790,8 +790,10 @@
|
||||
|
||||
res = pr_netacl_match(acl, addr);
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
- fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
|
||||
- strerror(errno));
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
acl_str = "!www.google.com";
|
||||
@@ -816,8 +816,10 @@
|
||||
|
||||
res = pr_netacl_match(acl, addr);
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
- fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
|
||||
- strerror(errno));
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(res == 1, "Failed to positively match ACL to addr: %s",
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!have_localdomain) {
|
||||
@@ -833,8 +835,10 @@
|
||||
|
||||
res = pr_netacl_match(acl, addr);
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
- fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
|
||||
- strerror(errno));
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(res == -1, "Failed to negatively match ACL to addr: %s",
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
acl_str = "!www.g*g.com";
|
||||
diff -ruNa proftpd-1.3.7a/tests/api/netaddr.c proftpd-1.3.7a-fix/tests/api/netaddr.c
|
||||
--- proftpd-1.3.7a/tests/api/netaddr.c 2021-01-13 14:30:47.467322360 +0800
|
||||
+++ proftpd-1.3.7a-fix/tests/api/netaddr.c 2021-01-13 14:42:45.851322360 +0800
|
||||
@@ -417,7 +417,9 @@
|
||||
res = pr_netaddr_fnmatch(addr, "LOCAL*", flags);
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
/* This test is sensitive the environment. */
|
||||
- fail_unless(res == TRUE, "Expected TRUE, got %d", res);
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(res == TRUE, "Expected TRUE, got %d", res);
|
||||
+ }
|
||||
}
|
||||
|
||||
flags = PR_NETADDR_MATCH_IP;
|
||||
@@ -879,9 +881,11 @@
|
||||
*/
|
||||
if (getenv("TRAVIS") == NULL) {
|
||||
/* This test is sensitive the environment. */
|
||||
- fail_unless(strcmp(res, "localhost") == 0 ||
|
||||
- strcmp(res, "localhost.localdomain") == 0,
|
||||
- "Expected '%s', got '%s'", "localhost or localhost.localdomain", res);
|
||||
+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) {
|
||||
+ fail_unless(strcmp(res, "localhost") == 0 ||
|
||||
+ strcmp(res, "localhost.localdomain") == 0,
|
||||
+ "Expected '%s', got '%s'", "localhost or localhost.localdomain", res);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
END_TEST
|
||||
@ -1,22 +0,0 @@
|
||||
--- tests/api/netaddr.c
|
||||
+++ tests/api/netaddr.c
|
||||
@@ -135,7 +135,8 @@ START_TEST (netaddr_get_addr_test) {
|
||||
|
||||
res = pr_netaddr_get_addr(p, name, NULL);
|
||||
fail_unless(res == NULL, "Unexpected got address for '%s'", name);
|
||||
- fail_unless(errno == ENOENT, "Expected ENOENT (%d), got %s (%d)", ENOENT,
|
||||
+ fail_unless(errno == ENOENT || errno == EAGAIN,
|
||||
+ "Expected ENOENT (%d) or EAGAIN (%d), got %s (%d)", ENOENT, EAGAIN,
|
||||
strerror(errno), errno);
|
||||
|
||||
name = "localhost";
|
||||
@@ -190,7 +191,8 @@ START_TEST (netaddr_get_addr_test) {
|
||||
|
||||
res = pr_netaddr_get_addr(p, name, NULL);
|
||||
fail_unless(res == NULL, "Resolved '%s' unexpectedly", name);
|
||||
- fail_unless(errno == ENOENT, "Expected ENOENT (%d), got %s (%d)", ENOENT,
|
||||
+ fail_unless(errno == ENOENT || errno == EAGAIN,
|
||||
+ "Expected ENOENT (%d) or EAGAIN (%d), got %s (%d)", ENOENT, EAGAIN,
|
||||
strerror(errno), errno);
|
||||
|
||||
#if defined(PR_USE_IPV6)
|
||||
Binary file not shown.
38
proftpd.spec
38
proftpd.spec
@ -16,11 +16,11 @@
|
||||
# Dynamic modules contain references to symbols in main dæmon, so we need to disable linker checks for undefined symbols
|
||||
%undefine _strict_symbol_defs_build
|
||||
|
||||
%global mod_vroot_version 0.9.5
|
||||
%global mod_vroot_version 0.9.9
|
||||
|
||||
Name: proftpd
|
||||
Version: 1.3.7a
|
||||
Release: 2
|
||||
Version: 1.3.7c
|
||||
Release: 1
|
||||
Summary: Flexible, stable and highly-configurable FTP server
|
||||
License: GPLv2+
|
||||
URL: http://www.proftpd.org/
|
||||
@ -42,11 +42,7 @@ Patch3: proftpd-1.3.4rc1-mod_vroot-test.patch
|
||||
Patch4: proftpd-1.3.6-no-mod-wrap.patch
|
||||
Patch5: proftpd-1.3.6-no-mod-geoip.patch
|
||||
Patch6: proftpd-1.3.7rc3-logging-not-systemd.patch
|
||||
Patch7: proftpd-1.3.7a-check-api.patch
|
||||
Patch8: proftpd-1.3.7a-netaddr-test.patch
|
||||
Patch9: proftpd-1.3.7a-fix-environment-sensitive-tests-failure.patch
|
||||
Patch10: proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netaddr.patch
|
||||
Patch11: proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch
|
||||
Patch7: proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch
|
||||
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: gcc
|
||||
@ -60,6 +56,7 @@ BuildRequires: openldap-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pcre-devel >= 7.0
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: postgresql-devel
|
||||
@ -176,6 +173,9 @@ Summary: ProFTPD - Additional utilities
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: perl-interpreter
|
||||
|
||||
BuildRequires: perl(Crypt::Cracklib)
|
||||
Requires: perl(Crypt::Cracklib)
|
||||
|
||||
%description utils
|
||||
This package contains additional utilities for monitoring and configuring the
|
||||
ProFTPD server:
|
||||
@ -233,16 +233,8 @@ sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
|
||||
%patch6
|
||||
%endif
|
||||
|
||||
# Handle changed API in check 0.15
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1850198
|
||||
%patch7
|
||||
%patch7 -p1
|
||||
|
||||
# getaddrinfo() can return EAGAIN in netaddr api test
|
||||
# https://github.com/proftpd/proftpd/pull/1075
|
||||
%patch8
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
# Avoid docfile dependencies
|
||||
chmod -c -x contrib/xferstats.holger-preiss
|
||||
|
||||
@ -260,6 +252,7 @@ SMOD3=mod_ldap:mod_ban:mod_ctrls_admin:mod_facl:mod_load:mod_vroot
|
||||
SMOD4=mod_radius:mod_ratio:mod_rewrite:mod_site_misc:mod_exec:mod_shaper
|
||||
SMOD5=mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_copy:mod_deflate:mod_ifversion:mod_qos
|
||||
SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache
|
||||
SMOD7=mod_unique_id
|
||||
|
||||
%configure \
|
||||
--libexecdir="%{_libexecdir}/proftpd" \
|
||||
@ -278,7 +271,7 @@ SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache
|
||||
--with-libraries="%{_libdir}/%{mysql_lib}" \
|
||||
--with-includes="%{_includedir}/mysql" \
|
||||
--with-modules=mod_readme:mod_auth_pam:mod_tls \
|
||||
--with-shared=${SMOD1}:${SMOD2}:${SMOD3}:${SMOD4}:${SMOD5}:${SMOD6}:mod_ifsession
|
||||
--with-shared=${SMOD1}:${SMOD2}:${SMOD3}:${SMOD4}:${SMOD5}:${SMOD6}:${SMOD7}:mod_ifsession
|
||||
%make_build
|
||||
|
||||
%install
|
||||
@ -333,7 +326,7 @@ echo "%{_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
ln ftpdctl tests/
|
||||
make check
|
||||
%else
|
||||
# API tests should always be OK
|
||||
#API tests should always be OK
|
||||
export HOSTNAME=`cat /etc/hosts | grep 127.0.0.1 | head -1| awk '{print $2}'`
|
||||
if ! make -C tests api-tests; then
|
||||
# Diagnostics to report upstream
|
||||
@ -456,6 +449,7 @@ fi
|
||||
%{_libexecdir}/proftpd/mod_facl.so
|
||||
%{_libexecdir}/proftpd/mod_ifsession.so
|
||||
%{_libexecdir}/proftpd/mod_ifversion.so
|
||||
%{_libexecdir}/proftpd/mod_unique_id.so
|
||||
%{_libexecdir}/proftpd/mod_load.so
|
||||
%{_libexecdir}/proftpd/mod_qos.so
|
||||
%{_libexecdir}/proftpd/mod_quotatab.so
|
||||
@ -517,6 +511,12 @@ fi
|
||||
%{_mandir}/man1/ftpwho.1*
|
||||
|
||||
%changelog
|
||||
* Sat Dec 04 2021 quanhongfei <quanhongfei@huawei.com> - 1.3.7c-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update proftpd to 1.3.7c
|
||||
|
||||
* Tue Sep 07 2021 gaihuiying <gaihuiying1@huawei.com> - 1.3.7a-2
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
|
||||
BIN
v0.9.5.tar.gz
BIN
v0.9.5.tar.gz
Binary file not shown.
BIN
v0.9.9.tar.gz
Normal file
BIN
v0.9.9.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user