From 01a0a917de323cbf5c3906ce2a4d6000ebc9c89c Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Mon, 28 Sep 2020 20:22:02 +0800 Subject: [PATCH] fix FTBFS on gcc10 this change has given better compatible with both gcc8 and gcc10 toolchain, should be maintained util upstream fixes Signed-off-by: weitao zhou --- ...of-an-enumerator-of-a-different-type.patch | 33 +++++++++++++++++++ vsftpd.spec | 11 ++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 1001-Fix-assignment-of-an-enumerator-of-a-different-type.patch diff --git a/1001-Fix-assignment-of-an-enumerator-of-a-different-type.patch b/1001-Fix-assignment-of-an-enumerator-of-a-different-type.patch new file mode 100644 index 0000000..e20404a --- /dev/null +++ b/1001-Fix-assignment-of-an-enumerator-of-a-different-type.patch @@ -0,0 +1,33 @@ +From 8882c5f7788fc2ea7cae824a7fa09b82782fc81e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Fri, 7 Feb 2020 11:51:46 +0100 +Subject: [PATCH] Fix assignment of an enumerator of a different type + +The kVSFSysStrOpenUnknown enumerator is not part of the +EVSFSysUtilOpenMode enum. The assignment causes a build failure with +gcc 10. + +The open_mode variable need not be initialized, because the switch +statement either sets the variable or causes us to exit. + +Resolves: rhbz#1800239 +--- + sysstr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysstr.c b/sysstr.c +index d86cdf1..ff2671b 100644 +--- a/sysstr.c ++++ b/sysstr.c +@@ -74,7 +74,7 @@ str_chdir(const struct mystr* p_str) + int + str_open(const struct mystr* p_str, const enum EVSFSysStrOpenMode mode) + { +- enum EVSFSysUtilOpenMode open_mode = kVSFSysStrOpenUnknown; ++ enum EVSFSysUtilOpenMode open_mode; + switch (mode) + { + case kVSFSysStrOpenReadOnly: +-- +2.24.1 + diff --git a/vsftpd.spec b/vsftpd.spec index 523454b..2ae7675 100644 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -1,8 +1,9 @@ +%define anolis_release .0.1 %global _generatorsdir %{_prefix}/lib/systemd/system-generators Name: vsftpd Version: 3.0.3 -Release: 35%{?dist} +Release: 35%{anolis_release}%{?dist} Summary: Very Secure Ftp Daemon Group: System Environment/Daemons @@ -98,6 +99,11 @@ Patch66: 0001-Remove-a-hint-about-the-ftp_home_dir-SELinux-boolean.patch Patch67: vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch Patch68: vsftpd-3.0.3-option_to_disable_TLSv1_3.patch +# Begin: Anolis customized patches +# Backport from fc32 to fix FTBFS on gcc10 +Patch1001: 1001-Fix-assignment-of-an-enumerator-of-a-different-type.patch +# End: Anolis customized patches + %description vsftpd is a Very Secure FTP daemon. It was written completely from scratch. @@ -165,6 +171,9 @@ mkdir -p $RPM_BUILD_ROOT/%{_var}/ftp/pub %{_var}/ftp %changelog +* Tue Apr 19 2022 Weitao Zhou - 3.0.3-35.0.1 +- Fix FTBFS on gcc10 + * Fri Dec 03 2021 Artem Egorenkov - 3.0.3-35 - add option to disable TLSv1.3 - Resolves: rhbz#1638375 -- Gitee