security/py-zope.password: remove leaf zope port

This port has no consumers and has no use/value as a standalone package
This commit is contained in:
Ruslan Makhmatkhanov
2024-10-08 15:32:46 +03:00
parent 01ac4fab4e
commit a073dee348
6 changed files with 1 additions and 232 deletions

1
MOVED
View File

@@ -3520,3 +3520,4 @@ audio/libechonest||2024-10-05|Removed, Abandonware and service no longer availab
net/fbzmq||2024-10-05|Repository was archived by facebook and the last version doesn't build
x11-toolkits/wlroots016||2024-10-07|No consumers in ports
japanese/prn|japanese/prn-ps|2024-10-07|Allow cloning the repository on Windows
security/py-zope.password||2024-10-08|Has no value as standalone package

View File

@@ -1091,7 +1091,6 @@
SUBDIR += py-yara-python-dex
SUBDIR += py-yubikey-manager
SUBDIR += py-zkg
SUBDIR += py-zope.password
SUBDIR += py-zxcvbn
SUBDIR += pygost
SUBDIR += qt-sudo

View File

@@ -1,22 +0,0 @@
PORTNAME= zope.password
PORTVERSION= 3.6.1
PORTREVISION= 1
CATEGORIES= security python zope
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DIST_SUBDIR= zope
MAINTAINER= zope@FreeBSD.org
COMMENT= Password encoding and checking utilities
WWW= https://pypi.org/project/zope.password/
LICENSE= ZPL21
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}zope.component>=0:devel/py-zope.component@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zope.configuration>=0:devel/py-zope.configuration@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}zope.interface>=0:devel/py-zope.interface@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
.include <bsd.port.mk>

View File

@@ -1,2 +0,0 @@
SHA256 (zope/zope.password-3.6.1.tar.gz) = 27e3cbb4ec8450eb35fcc27d8913b527d61118ffaa0e3e1bfc7f265e05e6ee23
SIZE (zope/zope.password-3.6.1.tar.gz) = 14633

View File

@@ -1,205 +0,0 @@
--- src/zope/password/tests/test_zpasswd.py.orig 2010-05-27 08:08:11 UTC
+++ src/zope/password/tests/test_zpasswd.py
@@ -19,7 +19,7 @@ $Id: test_zpasswd.py 112138 2010-05-07 15:23:02Z ulif
import os
import sys
import unittest, doctest
-from StringIO import StringIO
+from io import StringIO
from zope.password import password, zpasswd
@@ -51,23 +51,23 @@ class ArgumentParsingTestCase(TestBase):
argv = ["foo/bar.py"] + args
options = zpasswd.parse_args(argv)
self.assertEqual(options.program, "bar.py")
- self.assert_(options.version)
+ self.assertTrue(options.version)
return options
def check_stdout_content(self, args):
try:
options = self.parse_args(args)
- except SystemExit, e:
+ except SystemExit as e:
self.assertEqual(e.code, 0)
- self.assert_(self.stdout.getvalue())
- self.failIf(self.stderr.getvalue())
+ self.assertTrue(self.stdout.getvalue())
+ self.assertFalse(self.stderr.getvalue())
else:
self.fail("expected SystemExit")
def test_no_arguments(self):
options = self.parse_args([])
- self.assert_(options.managers)
- self.assert_(not options.destination)
+ self.assertTrue(options.managers)
+ self.assertTrue(not options.destination)
def test_version_long(self):
self.check_stdout_content(["--version"])
@@ -88,11 +88,11 @@ class ArgumentParsingTestCase(TestBase):
def test_config_short(self):
options = self.parse_args(["-c", self.config])
- self.assert_(options.managers)
+ self.assertTrue(options.managers)
def test_config_long(self):
options = self.parse_args(["--config", self.config])
- self.assert_(options.managers)
+ self.assertTrue(options.managers)
class ControlledInputApplication(zpasswd.Application):
@@ -123,19 +123,19 @@ class InputCollectionTestCase(TestBase):
def check_principal(self, expected):
output = self.stdout.getvalue()
- self.failUnless(output)
+ self.assertTrue(output)
principal_lines = output.splitlines()[-(len(expected) + 1):-1]
for line, expline in zip(principal_lines, expected):
- self.failUnlessEqual(line.strip(), expline)
+ self.assertEqual(line.strip(), expline)
def test_principal_information(self):
options = self.createOptions()
app = ControlledInputApplication(options,
["id", "title", "login", "1", "passwd", "passwd", "description"])
app.process()
- self.failUnless(not self.stderr.getvalue())
- self.failUnless(app.all_input_consumed())
+ self.assertTrue(not self.stderr.getvalue())
+ self.assertTrue(app.all_input_consumed())
self.check_principal([
'<principal',
'id="id"',
--- src/zope/password/zpasswd.py.orig 2010-05-27 08:08:11 UTC
+++ src/zope/password/zpasswd.py
@@ -29,7 +29,7 @@ def main(argv=None):
argv = sys.argv
try:
options = parse_args(argv)
- except SystemExit, e:
+ except SystemExit as e:
if e.code:
return 2
else:
@@ -39,7 +39,7 @@ def main(argv=None):
return app.process()
except KeyboardInterrupt:
return 1
- except SystemExit, e:
+ except SystemExit as e:
return e.code
class Principal(object):
@@ -135,7 +135,7 @@ class Application(object):
def read_input_line(self, prompt):
# The tests replace this to make sure the right things happen.
- return raw_input(prompt)
+ return input(prompt)
def read_password(self, prompt):
# The tests replace this to make sure the right things happen.
@@ -145,7 +145,7 @@ class Application(object):
except KeyboardInterrupt:
# The cursor was left on the same line as the prompt,
# which we don't like. Print a blank line.
- print
+ print()
raise
def process(self):
@@ -159,9 +159,9 @@ class Application(object):
principal = self.get_principal()
if destination is sys.stdout:
- print self.title
- print >>destination, principal
- print
+ print(self.title)
+ print(principal, file=destination)
+ print()
return 0
@@ -185,21 +185,21 @@ class Application(object):
while True:
value = self.read_input_line(prompt).strip()
if not value and error:
- print >>sys.stderr, error
+ print(error, file=sys.stderr)
continue
return value
def get_password_manager(self):
default = 0
self.print_message("Password manager:")
- print
+ print()
managers = self.options.managers
for i, (name, manager) in enumerate(managers):
- print "% i. %s" % (i + 1, name)
+ print("% i. %s" % (i + 1, name))
if name == 'SSHA':
default = i
- print
+ print()
self.need_blank_line = True
while True:
password_manager = self.read_input_line(
@@ -212,8 +212,8 @@ class Application(object):
if index > 0 and index <= len(managers):
index -= 1
break
- print >>sys.stderr, "You must select a password manager"
- print "%s password manager selected" % managers[index][0]
+ print("You must select a password manager", file=sys.stderr)
+ print("%s password manager selected" % managers[index][0])
return managers[index]
def get_password(self):
@@ -221,23 +221,23 @@ class Application(object):
while True:
password = self.read_password("Password: ")
if not password:
- print >>sys.stderr, "Password may not be empty"
+ print("Password may not be empty", file=sys.stderr)
continue
if password != password.strip() or password.split() != [password]:
- print >>sys.stderr, "Password may not contain spaces"
+ print("Password may not contain spaces", file=sys.stderr)
continue
break
again = self.read_password("Verify password: ")
if again != password:
- print >>sys.stderr, "Password not verified!"
+ print("Password not verified!", file=sys.stderr)
sys.exit(1)
return password
def print_message(self, message):
if self.need_blank_line:
- print
+ print()
self.need_blank_line = False
- print message
+ print(message)
def get_password_managers(config_path=None):
if not config_path:
@@ -247,7 +247,7 @@ def get_password_managers(config_path=None):
from zope.component import getUtilitiesFor
from zope.password.interfaces import IPasswordManager
- print "Loading configuration..."
+ print("Loading configuration...")
config = xmlconfig.file(config_path)
managers = []
for name, manager in getUtilitiesFor(IPasswordManager):

View File

@@ -1,2 +0,0 @@
This package provides a password manager mechanism. Password manager is
an utility object that can encode and check encoded passwords.