Bug#997994: Incompatibility between Net::FTP and IO::Socket::SSL

2022-04-17 Thread Dominic Hargreaves
Control: forwarded -1 https://github.com/steve-m-hay/perl-libnet/pull/40

On Thu, Oct 28, 2021 at 01:42:15PM +0200, Nathan MALO wrote:
> Package: perl-modules-5.32
> Version: 5.32.1-4+deb11u2
> 
> Hello,
> 
> I use backup-manager (conf attached) to upload tarballs to a FTPS
> destination.
> backup-manager use the perl package Net::FTP to handle ftp connections.
> It seems that the Net::FTP v3.11 perl package is incompatible with the
> IO::Socket:SSL perl package provided by the libio-socket-ssl-perl v2.069-1
> debian package.
> This version of Net::FTP uses a custom SSL_session_cache which lacks a
> 'del_session' routine invoked by IO::Socket:SSL.

...

> Net::FTP=GLOB(0x5646f37d5218)<<< 227 Entering Passive Mode
> (xx,xxx,xxx,xxx,xxx,xxx)
> Net::FTP=GLOB(0x5646f37d5218)>>> NLST
> Can't locate object method "del_session" via package
> "Net::FTP::_SSL_SingleSessionCache" at /usr/share/perl5/IO/Socket/SSL.pm
> line 3042.
> 
> 
> It seems to have been fixed in Net::FTP v3.13 by this commit :
> https://github.com/steve-m-hay/perl-libnet/commit/67281c8f29f081962cb7702a87c16a4473b936e8#diff-506ff1e09133b22009f33a185017deec1c04bce8e645f818c7c4fb2665c57ec3
> 
> This commit is present in perl 5.34, but I have not tested it.
> 
> Do you think that perl 5.34 could arrive in bullseye-backports ?
> 
> I am available for testing.
> I am using Debian GNU/Linux 11.1, kernel 5.10.0-9, and libc6
> 2.31-13+deb11u2.

Sorry for the delay in replying. Yes, I think this could be added to
a stable release. It looks like we should also include
https://github.com/steve-m-hay/perl-libnet/pull/41 too. I've enquired
about whether that can be released to CPAN.



Bug#997994: Incompatibility between Net::FTP and IO::Socket::SSL

2021-10-28 Thread Nathan MALO
Package: perl-modules-5.32
Version: 5.32.1-4+deb11u2

Hello,

I use backup-manager (conf attached) to upload tarballs to a FTPS
destination.
backup-manager use the perl package Net::FTP to handle ftp connections.
It seems that the Net::FTP v3.11 perl package is incompatible with the
IO::Socket:SSL perl package provided by the libio-socket-ssl-perl v2.069-1
debian package.
This version of Net::FTP uses a custom SSL_session_cache which lacks a
'del_session' routine invoked by IO::Socket:SSL.

Thus I end up with the following fault :

$ backup-manager -d -c backup-manager.conf
Backup Manager 0.7.14 - Copyright (c) 2004-2016 Alexis Sukrieh
Process started at 2021-10-28   13:14:11
DEBUG: Sanitizing the configuration file.
DEBUG: replace_deprecated_booleans()
DEBUG: confkey_require (BM_LOGGER, true)
DEBUG: confkey_handle_deprecated (BM_ARCHIVES_REPOSITORY,
BM_REPOSITORY_ROOT)
DEBUG: confkey_require (BM_REPOSITORY_ROOT, /var/archives)
DEBUG: confkey_require (BM_TEMP_DIR, /tmp)
DEBUG: confkey_require (BM_REPOSITORY_SECURE, true)
DEBUG: confkey_handle_deprecated (BM_USER, BM_REPOSITORY_USER)
DEBUG: confkey_require (BM_REPOSITORY_USER, root)
DEBUG: confkey_handle_deprecated (BM_GROUP, BM_REPOSITORY_GROUP)
DEBUG: confkey_require (BM_REPOSITORY_GROUP, root)
DEBUG: confkey_require (BM_REPOSITORY_CHMOD, 770)
DEBUG: confkey_require (BM_ARCHIVE_CHMOD, 660)
DEBUG: confkey_require (BM_REPOSITORY_RECURSIVEPURGE, false)
DEBUG: confkey_handle_deprecated (BM_MAX_TIME_TO_LIVE, BM_ARCHIVE_TTL)
DEBUG: confkey_require (BM_ARCHIVE_TTL, 5)
DEBUG: confkey_handle_deprecated (BM_PURGE_DUPLICATES, BM_ARCHIVE_PURGEDUPS)
DEBUG: confkey_require (BM_ARCHIVE_PURGEDUPS, true)
DEBUG: confkey_handle_deprecated (BM_ARCHIVES_PREFIX, BM_ARCHIVE_PREFIX)
DEBUG: confkey_require (BM_ARCHIVE_PREFIX, server_hostname)
DEBUG: confkey_handle_deprecated (BM_BACKUP_METHOD, BM_ARCHIVE_METHOD)
DEBUG: confkey_require (BM_ARCHIVE_METHOD, tarball)
DEBUG: confkey_require (BM_ARCHIVE_NICE_LEVEL, 10)
DEBUG: confkey_require (BM_TARBALL_FILETYPE, tar.gz)
DEBUG: confkey_require (BM_TARBALL_NAMEFORMAT, long)
DEBUG: confkey_require (BM_TARBALL_DUMPSYMLINKS, false)
DEBUG: confkey_handle_deprecated (BM_FILETYPE, BM_TARBALL_FILETYPE)
DEBUG: confkey_handle_deprecated (BM_NAME_FORMAT, BM_TARBALL_NAMEFORMAT)
DEBUG: confkey_handle_deprecated (BM_DIRECTORIES_BLACKLIST,
BM_TARBALL_BLACKLIST)
DEBUG: confkey_handle_deprecated (BM_DUMP_SYMLINKS, BM_TARBALL_DUMPSYMLINKS)
DEBUG: confkey_require (BM_UPLOAD_FTP_TIMEOUT, 120)
DEBUG: confkey_warning (BM_UPLOAD_FTP_TIMEOUT, 120)
The configuration key BM_UPLOAD_FTP_TIMEOUT is not set, using "120".
When validating the configuration file backup-manager.conf, 1 warnings were
found.
DEBUG: Initializing environment
DEBUG: bm_init_env()
DEBUG: Checking if logger is available
DEBUG: Getting lock
DEBUG: get_lock()
Getting lock for backup-manager 3919206 with backup-manager.conf
DEBUG: check_filetypes()
DEBUG: Running pre-command
DEBUG: exec_pre_command()
DEBUG: create_directories()
DEBUG: Purging the repository
DEBUG: clean_repositories
Cleaning /var/archives/
DEBUG: clean_directory (/var/archives/)
DEBUG: Building archives
DEBUG: make_archives()
DEBUG: backup_method_tarball (tarball-incremental)
Using method "tarball-incremental".
DEBUG: __get_flags_tar_dump_symlinks
DEBUG: __make_local_tarball_archives
DEBUG: __make_local_tarball_token (/usr/share/backup-manager)
DEBUG: get_dir_name (/usr/share/backup-manager, long)
DEBUG: __get_flags_tar_incremental (-usr-share-backup-manager)
DEBUG: cp
/var/archives/server_hostname-usr-share-backup-manager.incremental.bin
/var/archives/server_hostname-usr-share-backup-manager.incremental.bin.orig
DEBUG: __get_master_day ()
DEBUG: __init_masterdatevalue ()
DEBUG: __build_local_archive (/usr/share/backup-manager,
-usr-share-backup-manager)
DEBUG: __get_file_to_create (/usr/share/backup-manager)
DEBUG: get_dir_name (/usr/share/backup-manager, long)
DEBUG: __get_backup_tarball_command ()
DEBUG: __get_flags_tar_blacklist (/usr/share/backup-manager)
DEBUG: __get_flags_relative_blacklist (--exclude=,
/usr/share/backup-manager)
File
/var/archives/server_hostname-usr-share-backup-manager.20211028.tar.gpg
already exists, skipping.
DEBUG: rm -f
/var/archives/server_hostname-usr-share-backup-manager.incremental.bin.orig
DEBUG: Running the upload methods
DEBUG: upload_files()
Using the upload method "ftp".
Trying to upload files with ftp
Logged on ftp_server:ftp_port, in /path/to/backup/ (FTP binary mode)
Cleaning remote directory through FTP
Error reported by backup-manager-upload for method "ftp", check
"/tmp/bmu-log.Mw8hYw".
DEBUG: exec_post_command()
Releasing lock
DEBUG: release_lock()

$ cat /tmp/bmu-log.Mw8hYw
Net::FTP>>> Net::FTP(3.11)
Net::FTP>>>   Exporter(5.74)
Net::FTP>>>   Net::Cmd(3.11)
Net::FTP>>>   IO::Socket::SSL(2.069)
Net::FTP>>> IO::Socket::IP(0.39)
Net::FTP>>>   IO::Socket(1.43)
Net::FTP>>> IO::Handle(1.42)
Net::FTP=GLOB(0x5646f37d5218)<<< 220 ftp_server FTP server ready.