[Pkg-freeradius-maintainers] Bug#710895: freeradius: Added autopkgtests
Nishanth Aravamudan
nish.aravamudan at canonical.com
Thu Nov 17 19:33:57 UTC 2016
Package: freeradius
Version: 3.0.12+dfsg-3
Followup-For: Bug #710895
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu zesty ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* d/t: update tests for 3.x (Closes: #710895)
- Password must be provided as 'User-Password'.
- Configuration is stored in /etc/freeradius/3.0/.
- Response strings do not contain 'code X' any longer.
* d/freeradius.postinst: revert incorrect removal of /var/log file creation
- 42abc545 ('Remove all use of dpkg-statoverride') included a
non-dpkg-statoverride-related removal.
Thanks for considering the patch.
*** /tmp/tmpu9VegU/freeradius_3.0.12+dfsg-3ubuntu2.debdiff
diff -Nru freeradius-3.0.12+dfsg/debian/freeradius.postinst freeradius-3.0.12+dfsg/debian/freeradius.postinst
--- freeradius-3.0.12+dfsg/debian/freeradius.postinst 2016-11-11 17:09:56.000000000 -0800
+++ freeradius-3.0.12+dfsg/debian/freeradius.postinst 2016-11-17 11:04:24.000000000 -0800
@@ -11,6 +11,10 @@
# start after services which may be used and stop before them.
update-rc.d freeradius start 50 2 3 4 5 . stop 19 0 1 6 . >/dev/null
+ for file in radius.log radwtmp; do
+ [ ! -f "/var/log/freeradius/${file}" ] && install -o freerad -g freerad -m 644 /dev/null /var/log/freeradius/${file}
+ done
+
action="start"
else
action="restart"
diff -Nru freeradius-3.0.12+dfsg/debian/tests/test-freeradius.py freeradius-3.0.12+dfsg/debian/tests/test-freeradius.py
--- freeradius-3.0.12+dfsg/debian/tests/test-freeradius.py 2016-11-11 17:09:56.000000000 -0800
+++ freeradius-3.0.12+dfsg/debian/tests/test-freeradius.py 2016-11-17 11:04:09.000000000 -0800
@@ -47,11 +47,11 @@
def setUp(self):
'''Set up prior to each test_* function'''
self.tmpdir = tempfile.mkdtemp(prefix='freeradius-', dir='/tmp')
- self.auth_approved = "code 2"
- self.auth_denied = "code 3"
+ self.auth_approved = "Access-Accept"
+ self.auth_denied = "Access-Reject"
# Add a default user
- self.users_file = "/etc/freeradius/users"
+ self.users_file = "/etc/freeradius/3.0/users"
self.test_user = "testuser"
self.test_pass = "testpassword"
config_line = '%s Cleartext-Password := "%s"' % (self.test_user, self.test_pass)
@@ -70,7 +70,7 @@
def _test_auth(self, username, password, expected_string, expected_rc=0):
'''Tests authentication'''
- handle, tmpname = testlib.mkstemp_fill("User-Name=%s,Password=%s" % (username, password), dir=self.tmpdir)
+ handle, tmpname = testlib.mkstemp_fill("User-Name=%s,User-Password=%s" % (username, password), dir=self.tmpdir)
# can't use radtest as there's no way to set a timeout or number of retries
rc, report = testlib.cmd(['/usr/bin/radclient', '-r', '2', '-f', tmpname, '-s', 'localhost:1812', 'auth', 'testing123'])
-- System Information:
Debian Release: stretch/sid
APT prefers yakkety-updates
APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety'), (400, 'yakkety-proposed'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-27-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd
More information about the Pkg-freeradius-maintainers
mailing list