[pve-devel] [PATCH access-control] don't import 'RFC' from MIME::Base32

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Jul 25 08:33:29 CEST 2016


call encode_rfc3548 explicitly instead as newer versions of
the base32 package will drop this import scheme (stretch)
---
One less breakage to worry about when we move to newer debian
releases in the future.

Note that in the code in PVE/AccessControl.pm I had already used the
explicit call, so only the import line was updated in that file.

Tested successfully with both jessie's libmime-base32-perl=1.02a-1
as well as stretch's version 1.301-1.

 PVE/AccessControl.pm | 2 +-
 oathkeygen           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/AccessControl.pm b/PVE/AccessControl.pm
index 0b64374..ea4245c 100644
--- a/PVE/AccessControl.pm
+++ b/PVE/AccessControl.pm
@@ -8,7 +8,7 @@ use Crypt::OpenSSL::RSA;
 use Net::SSLeay;
 use Net::IP;
 use MIME::Base64;
-use MIME::Base32 qw(RFC); #libmime-base32-perl
+use MIME::Base32; #libmime-base32-perl
 use Digest::SHA;
 use URI::Escape;
 use LWP::UserAgent;
diff --git a/oathkeygen b/oathkeygen
index 84b6441..89e385a 100755
--- a/oathkeygen
+++ b/oathkeygen
@@ -2,10 +2,10 @@
 
 use strict;
 use warnings;
-use MIME::Base32 qw(RFC); #libmime-base32-perl
+use MIME::Base32; #libmime-base32-perl
 
 my $test;
 open(RND, "/dev/urandom");
 sysread(RND, $test, 10) == 10 || die "read randon data failed\n";
-print MIME::Base32::encode($test) . "\n";
+print MIME::Base32::encode_rfc3548($test) . "\n";
 
-- 
2.1.4




More information about the pve-devel mailing list