summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-devtools
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2019-06-07 23:18:22 +0300
committerKhem Raj <raj.khem@gmail.com>2019-06-15 16:45:33 -0700
commitd7ea637358f3840ff442f983d37bd0ccfd829737 (patch)
treee67ff0fb84848d4a08e1e1883aa29505394baccc /meta-networking/recipes-devtools
parent2ab13510874809a4d44cf07ae82a408c08607a41 (diff)
downloadmeta-openembedded-d7ea637358f3840ff442f983d37bd0ccfd829737.tar.gz
recipes-devtools: Move back from meta-networking to meta-perl
It needs both freeradius and perl-module-data-dumper, so neither place would fulfill all dependencies. In general meta-perl looks like the more appropriate place. The location in meta-networking also had the problem that it was one directory too deep and therefore not included in BBFILES. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-devtools')
-rw-r--r--meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest21
-rw-r--r--meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch90
-rw-r--r--meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb39
3 files changed, 0 insertions, 150 deletions
diff --git a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest b/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
deleted file mode 100644
index f1c833e6c..000000000
--- a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/run-ptest
+++ /dev/null
@@ -1,21 +0,0 @@
1#!/bin/sh
2#
3
4# prepare testing config
5CONF_USERS=`readlink -f /etc/raddb/users`
6mv ${CONF_USERS} ${CONF_USERS}_orig
7echo "testing Cleartext-Password := \"testpassword\"" > ${CONF_USERS}
8cat ${CONF_USERS}_orig >> ${CONF_USERS}
9
10# restart radiusd server
11systemctl restart radiusd || /etc/init.d/radiusd restart || {
12 echo "FAIL: Start radiusd service."
13 exit 1
14}
15
16# run teests
17perl test.pl
18
19# restore the config and restart
20mv ${CONF_USERS}_orig ${CONF_USERS}
21systemctl restart radiusd || /etc/init.d/radiusd restart
diff --git a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch b/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
deleted file mode 100644
index 9798af497..000000000
--- a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl/test.pl-adjust-for-ptest.patch
+++ /dev/null
@@ -1,90 +0,0 @@
1From 829302792bf0e4935d29efc23ca1f2e9e7ee7dfd Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 7 Jan 2016 03:12:38 -0500
4Subject: [PATCH] test.pl: adjust for ptest
5
6* Don't use interactive inputs, set default test
7 settings instead.
8* Change the test results output to the ptest format
9
10Upstream-Status: Inappropriate [OE ptest specific]
11
12Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
13---
14 test.pl | 31 ++++++++++++++++++-------------
15 1 file changed, 18 insertions(+), 13 deletions(-)
16
17diff --git a/test.pl b/test.pl
18index cfd1c1e..9b4f10e 100644
19--- a/test.pl
20+++ b/test.pl
21@@ -7,11 +7,11 @@
22 # Change 1..1 below to 1..last_test_to_print .
23 # (It may become useful if the test is moved to ./t subdirectory.)
24
25-BEGIN {print "1..5\n";}
26-END {print "not ok 1\n" unless $loaded;}
27+BEGIN {print "Start testing for libauthen-radius-perl\n";}
28+END {print "\nFAIL: test1\n" unless $loaded;}
29 use Authen::Radius;
30 $loaded = 1;
31-print "ok 1\n";
32+print "\nPASS: test1\n";
33
34 ######################### End of black magic.
35
36@@ -19,26 +19,31 @@ print "ok 1\n";
37 # (correspondingly "not ok 13") depending on the success of chunk 13
38 # of the test code):
39
40+$host = "127.0.0.1";
41+$secret = "testing123";
42+$user = "testing";
43+$pwd = "testpassword";
44+
45 print "Make sure this machine is in your Radius clients file!\n";
46-print "Enter hostname[:port] of your Radius server: "; chomp ($host = <STDIN>);
47-print "Enter shared-secret of your Radius server: "; chomp ($secret = <STDIN>);
48-print "Enter a username to be validated: "; chomp ($user = <STDIN>);
49-print "Enter this user's password: "; chomp ($pwd = <STDIN>);
50+print "hostname of your Radius server: $host\n";
51+print "shared-secret of your Radius server: $secret\n";
52+print "The username to be validated: $user\n";
53+print "The user's password: $pwd\n";
54
55 $t = 2;
56 if ($host ne '') {
57 $r = new Authen::Radius(Host => $host, Secret => $secret, Debug => 1);
58- print defined($r) ? "" : "not ", "ok $t\n"; $t++;
59+ print defined($r) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
60 #Authen::Radius->load_dictionary;
61- print $r->check_pwd($user, $pwd) ? "" : "not ", "ok $t\n"; $t++;
62+ print $r->check_pwd($user, $pwd) ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
63 @a = $r->get_attributes;
64- print $#a != -1 ? "" : "not ", "ok $t\n"; $t++;
65+ print $#a != -1 ? "\nPASS: test$t\n" : "\nFAIL: test$t\n"; $t++;
66 #for $a (@a) {
67 # print "attr: name=$a->{'Name'} value=$a->{'Value'}\n";
68 #}
69 } else {
70 foreach my $t (2..4) {
71- print "skipped $t\n";
72+ print "\nSKIP test$t\n";
73 }
74 }
75
76@@ -53,9 +58,9 @@ my $data = "what do ya want for nothing?";
77 my $etalon_digest = hex_to_ascii("750c783e6ab0b503eaa86e310a5db738");
78 my $digest = Authen::Radius::hmac_md5(undef, $data, $key);
79 if ($etalon_digest eq $digest) {
80- print "ok 5\n";
81+ print "\nPASS: test5\n";
82 } else {
83- print "not ok 5\n";
84+ print "\nFAIL: test5\n";
85 }
86
87 exit;
88--
891.9.1
90
diff --git a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb b/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb
deleted file mode 100644
index ea5bb1b0c..000000000
--- a/meta-networking/recipes-devtools/perl/libauthen/libauthen-radius-perl_0.22.bb
+++ /dev/null
@@ -1,39 +0,0 @@
1SUMMARY = "Authen::Radius - provide simple Radius client facilities"
2DESCRIPTION = "The Authen::Radius module provides a simple class that \
3 allows you to send/receive Radius requests/responses to/from a \
4 Radius server. \
5"
6
7HOMEPAGE = "http://search.cpan.org/~manowar/RadiusPerl"
8SECTION = "libs"
9
10LICENSE = "Artistic-2.0"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=78ab6ea0cba1f1ec1680ebb149e3bc11"
12
13DEPENDS = "perl"
14
15SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MANOWAR/RadiusPerl-${PV}.tar.gz \
16 file://test.pl-adjust-for-ptest.patch \
17 file://run-ptest \
18"
19SRC_URI[md5sum] = "d1fe2d6ecf7ea99299e4e3a8f945aad8"
20SRC_URI[sha256sum] = "3b276506986ccaa4949d92b13ce053a0017ad11562a991cc753364923fe81ca7"
21
22S = "${WORKDIR}/Authen-Radius-${PV}"
23
24inherit cpan ptest
25
26do_install_ptest() {
27 install -m 0755 ${S}/test.pl ${D}${PTEST_PATH}
28}
29
30RDEPENDS_${PN} += "\
31 libdata-hexdump-perl \
32 perl-module-digest-md5 \
33 perl-module-data-dumper \
34 perl-module-io-select \
35 perl-module-io-socket \
36"
37RDEPENDS_${PN}-ptest += "${PN} freeradius"
38
39BBCLASSEXTEND = "native"