From 7254af1dbc2dd5d757efddc99a17e6161127cd3c Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Thu, 27 Jun 2019 12:14:45 -0700 Subject: [WIP] libauthen-radius-perl: upgrade 0.22 -> 0.30 * ptest still needs work * Upstream author has changed from MANOWAR to PORTAONE * Update HOMEPAGE and SRC_URI * Drop redundant DEPENDS on perl * Drop redundant RDEPENDS on PN * Drop patch for test.pl script, no longer applicable * Add ptest dependencies * Inherit ptest-perl.bbclass Upstream release notes: 0.30 Mon Jun 10 17:21:42 2019 - Fixed warning when NodeList parameter used without Host 0.29 Fri Nov 30 11:54:42 2018 - Fix tests if FreeRADIUS dictionary not available 0.28 Thu Nov 29 14:24:42 2018 - Fixed tagged integer attribute encoding (reported by Alexander Bechikov) 0.27 Fri Jul 06 12:28:42 2018 - Force FreeRADIUS dictionary format when BEGIN-VENDOR directive is found - Load included files using the requested format - Added full support for octets type 0.26 Mon Dec 12 13:12:32 2016 - Tag 0.25.1 as 0.26, because 0.25.1 is considered as 0.025001 (less than existing 0.25) 0.25.1 Thu Dec 08 14:38:44 2016 - Require Perl v5.10+ - Fixed warnings in tests - Fix sublist attribute type encoding 0.25 Tue Dec 06 12:25:00 2016 - Added support for Status-Server requests (RFC 5997) - Added support for IPv6 (RFC 3162) - Added support for integer64 type (RFC 6929) - Fixed warning of using uninitialized value $vendor_name (RT 99161) - Added support for date and time types (RT 91408) - Improved support for FreeRADIUS and GNU Radius dictionary files - Added support for tagged attributes (RFC 2868) 0.24 Wed Oct 30 13:21:00 2013 - Added support for changing I/O activity timeouts, so that custom retransmission policies can be implemented - Added ACCESS_CHALLENGE packet type definition (thanks to Stephane Billiart for the patch) - Fix the excessive wait on processing broadcasts when at least one of the nodes in node list did not listen on the requested port (a side-effect is that it is now possible to set timeout in floating seconds since the epoch) 0.23 Sat Aug 17 21:48:00 2013 - Clear authenticator as a part of clear_attibutes(), so multiple requests, sent using the same object, will have different authenticators (as they should) Signed-off-by: Tim Orling --- .../libauthen/libauthen-radius-perl/run-ptest | 18 ++++- .../test.pl-adjust-for-ptest.patch | 90 ---------------------- 2 files changed, 16 insertions(+), 92 deletions(-) delete mode 100644 meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch (limited to 'meta-perl/recipes-perl/libauthen/libauthen-radius-perl') diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest index f1c833e6ca..5bc8b625bd 100644 --- a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest +++ b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/run-ptest @@ -13,8 +13,22 @@ systemctl restart radiusd || /etc/init.d/radiusd restart || { exit 1 } -# run teests -perl test.pl +# run tests +# FIXME: this is from ptest-perl.bbclass and might not be correct +for case in `find t -type f -name '*.t'`; do + perl $case >$case.output 2>&1 + ret=$? + cat $case.output + if [ $ret -ne 0 ]; then + echo "FAIL: ${case%.t}" + elif grep -i 'SKIP' $case.output; then + echo "SKIP: ${case%.t}" + else + echo "PASS: ${case%.t}" + fi + + rm -f $case.output +done # restore the config and restart mv ${CONF_USERS}_orig ${CONF_USERS} diff --git a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch b/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch deleted file mode 100644 index 9798af497c..0000000000 --- a/meta-perl/recipes-perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 829302792bf0e4935d29efc23ca1f2e9e7ee7dfd Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Thu, 7 Jan 2016 03:12:38 -0500 -Subject: [PATCH] test.pl: adjust for ptest - -* Don't use interactive inputs, set default test - settings instead. -* Change the test results output to the ptest format - -Upstream-Status: Inappropriate [OE ptest specific] - -Signed-off-by: Jackie Huang ---- - test.pl | 31 ++++++++++++++++++------------- - 1 file changed, 18 insertions(+), 13 deletions(-) - -diff --git a/test.pl b/test.pl -index cfd1c1e..9b4f10e 100644 ---- a/test.pl -+++ b/test.pl -@@ -7,11 +7,11 @@ - # Change 1..1 below to 1..last_test_to_print . - # (It may become useful if the test is moved to ./t subdirectory.) - --BEGIN {print "1..5\n";} --END {print "not ok 1\n" unless $loaded;} -+BEGIN {print "Start testing for libauthen-radius-perl\n";} -+END {print "\nFAIL: test1\n" unless $loaded;} - use Authen::Radius; - $loaded = 1; --print "ok 1\n"; -+print "\nPASS: test1\n"; - - ######################### End of black magic. - -@@ -19,26 +19,31 @@ print "ok 1\n"; - # (correspondingly "not ok 13") depending on the success of chunk 13 - # of the test code): - -+$host = "127.0.0.1"; -+$secret = "testing123"; -+$user = "testing"; -+$pwd = "testpassword"; -+ - print "Make sure this machine is in your Radius clients file!\n"; --print "Enter hostname[:port] of your Radius server: "; chomp ($host = ); --print "Enter shared-secret of your Radius server: "; chomp ($secret = ); --print "Enter a username to be validated: "; chomp ($user = ); --print "Enter this user's password: "; chomp ($pwd = ); -+print "hostname of your Radius server: $host\n"; -+print "shared-secret of your Radius server: $secret\n"; -+print "The username to be validated: $user\n"; -+print "The user's password: $pwd\n"; - - $t = 2; - if ($host ne '') { - $r = new Authen::Radius(Host => $host, Secret => $secret, Debug => 1); -- print defined($r) ? "" : "not ", "ok $t\n"; $t++; -+ print defined($r) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++; - #Authen::Radius->load_dictionary; -- print $r->check_pwd($user, $pwd) ? "" : "not ", "ok $t\n"; $t++; -+ print $r->check_pwd($user, $pwd) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++; - @a = $r->get_attributes; -- print $#a != -1 ? "" : "not ", "ok $t\n"; $t++; -+ print $#a != -1 ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++; - #for $a (@a) { - # print "attr: name=$a->{'Name'} value=$a->{'Value'}\n"; - #} - } else { - foreach my $t (2..4) { -- print "skipped $t\n"; -+ print "\nSKIP test$t\n"; - } - } - -@@ -53,9 +58,9 @@ my $data = "what do ya want for nothing?"; - my $etalon_digest = hex_to_ascii("750c783e6ab0b503eaa86e310a5db738"); - my $digest = Authen::Radius::hmac_md5(undef, $data, $key); - if ($etalon_digest eq $digest) { -- print "ok 5\n"; -+ print "\nPASS: test5\n"; - } else { -- print "not ok 5\n"; -+ print "\nFAIL: test5\n"; - } - - exit; --- -1.9.1 - -- cgit 1.2.3-korg