From nobody Fri Mar 25 13:50:51 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9DFE51A3490E; Fri, 25 Mar 2022 13:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3QN0MzSz3h3M; Fri, 25 Mar 2022 13:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4p2JKNgCLUhtJdt2Fk90GSQNYdF/84L97R3fBoKwyBk=; b=br1999n5rvmRxmDZEo+8jOlSkO/6XOpyYOPj2iDyKZjVt2yXySSuG2u3VhWW8zxMwkKAVe O3rzsg/K1erJUgo6V23q48w39+pWqz8HEHLi4mfMOd1kxwqeqfZZWqjA/y+ueFAaQdhXHk cEsW/rAJJhWjjMuLGGK+BiIsRf4ixQurAyFiIy6MCa276y6/Z+VaL255+47zPOUAU1Rhyb CMEqh5ReUE/wDWCRcqK7uvmkaEwFxhNGDbSUtZQL9+PvjI8DNqNbf8ISiA5QldyTVJR2n1 A8Fd57tBHtmKX/OrXpw+E3mVHD3+OWye21tj6PZ+dWstKHflbm4hIMVQXthvFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2996B595B; Fri, 25 Mar 2022 13:50:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDopnu037489; Fri, 25 Mar 2022 13:50:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDopn7037488; Fri, 25 Mar 2022 13:50:51 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:50:51 GMT Message-Id: <202203251350.22PDopn7037488@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: df77f2009a30 - main - security/belier: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df77f2009a300fea2e9e282164a0b33261f62d1d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4p2JKNgCLUhtJdt2Fk90GSQNYdF/84L97R3fBoKwyBk=; b=l1gfb9OHoAA/kVJ3qq45q6WAaGkTbsnTElNUb9HmpaOoqqB0tuZIUHjRIwUOWVxjgWuvcx 6Y01aL2lrGfy0NRdkZdWmKgRwWqiaR1f6hvAqnSJOdliEQyZLVoPaQX9Z8XY2qkbosmdON UD61lIZp0W6DPWtYQ/I4SDrFm8na97OZqJw0iAWRi1owbNOxwXOFW3nJZ+hYqdUHLZKcKQ PMJx8njFbFRWCBOeSaxB4NZKwrapYtxgNLpKmdSHbB5E3qzqli0KmnqTXynQNogSHvAxs1 uIXWcjzfQpMLTYgBpxyS9DxNlutlW3Eq7e50XkTYm7xvqQFHATEeyU48NtKwfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216253; a=rsa-sha256; cv=none; b=gOW+Hsft4+A3PFI7GmTo/IP2MdWPJsrXWIbvYMPotuuFmKjuLu3V0WDt5UtNdslV9Yn59u JPHLHMaT+p8jaFXO/E0z+Xm6M4pbuPQvIWr4aJaJzK8LYRtKro0UaPHP8YOXHTcPWnA445 P2Km8LVS6bhtMfbx28kbEV1ZUGeFWNDob0rclIPx97UL+Z+ddcCk4HcGt4ouON2+7RxgdA fssNXcUrYFEuQ4SUeyKx58cDoHHsd75eRn1sj2drKHEiG/elK76+GdOubd16OMknx+RwMF 8D0LS26a+gUVE3/cIPMZDI7VoRo4fMFCCqM5Nr0Le2g/Q1GJ3YX/54rsAkLn4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=df77f2009a300fea2e9e282164a0b33261f62d1d commit df77f2009a300fea2e9e282164a0b33261f62d1d Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:33:44 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:20 +0000 security/belier: Fix build with setuptools 58.0.0+ With hat: python --- security/belier/files/patch-2to3 | 141 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/security/belier/files/patch-2to3 b/security/belier/files/patch-2to3 new file mode 100644 index 000000000000..6b9777cc8793 --- /dev/null +++ b/security/belier/files/patch-2to3 @@ -0,0 +1,141 @@ +--- belier/options.py.orig 2009-11-01 20:35:14 UTC ++++ belier/options.py +@@ -51,10 +51,10 @@ class Options: + if self._options[0].nomfichier is not None: + fichierentree = abspath(expanduser(self._options[0].nomfichier)) + if not exists(fichierentree): +- print _("%s : no such file") % fichierentree ++ print(_("%s : no such file") % fichierentree) + sys.exit(1) + elif not isfile(fichierentree): +- print _("%s is not a file") % fichierentree ++ print(_("%s is not a file") % fichierentree) + sys.exit(1) + else: + self._options[0].nomfichier = fichierentree +@@ -62,19 +62,19 @@ class Options: + if self._options[0].repsortie is not None: + repertoiresortie = abspath(expanduser(self._options[0].repsortie)) + if not exists(repertoiresortie): +- print _("%s : no such directory") % repertoiresortie ++ print(_("%s : no such directory") % repertoiresortie) + sys.exit(1) + elif not isdir(repertoiresortie): +- print _("%s is not a directory") % repertoiresortie ++ print(_("%s is not a directory") % repertoiresortie) + sys.exit(1) + else: + self._options[0].repsortie = repertoiresortie + + if self._options[0].delai is not None: + if self._options[0].delai < -1 or \ +- self._options[0].delai > sys.maxint: +- print _("The given value is not valid%sThe delay value \ +-must be >= -1 and <= value of an integer on your system" % linesep) ++ self._options[0].delai > sys.maxsize: ++ print(_("The given value is not valid%sThe delay value \ ++must be >= -1 and <= value of an integer on your system" % linesep)) + sys.exit(1) + + def lesoptions(self): +--- belier/optionstunnel.py.orig 2009-11-01 20:35:14 UTC ++++ belier/optionstunnel.py +@@ -30,15 +30,15 @@ class OptionsTunnel: + def parse_ligne(self, ligne): + """Parse la ligne qui indique les numéros de ports""" + if len(ligne.split()) != 2: +- print _('You should have two tunnel options arguments \ +-(source port and destination port)') ++ print(_('You should have two tunnel options arguments \ ++(source port and destination port)')) + sys.exit(1) + for port in ligne.split(): + if not port.isdigit(): +- print _('A port number should only contain digits') ++ print(_('A port number should only contain digits')) + sys.exit(1) + if int(port) > 65535: +- print _('A port number can not exceed 65535') ++ print(_('A port number can not exceed 65535')) + sys.exit(1) + self._source, self._destination = ligne.split() + +--- belier/terminal.py.orig 2009-11-01 20:35:14 UTC ++++ belier/terminal.py +@@ -21,7 +21,7 @@ import stat + from os import linesep, chmod, sep + from os.path import expanduser, abspath, join + +-from optionstunnel import OptionsTunnel ++from .optionstunnel import OptionsTunnel + + SSHOPTS = '-o NoHostAuthenticationForLocalhost=yes -o StrictHostKeyChecking=no' + +@@ -60,41 +60,41 @@ class Terminal: + self._ordres = open(expanduser(nomfichier), 'r').readlines() + else: + self._ordres = sys.stdin.readlines() +- except IOError, message: +- print message ++ except IOError as message: ++ print(message) + sys.exit(1) + except KeyboardInterrupt: +- print _("Belier has been stopped manually by the user") ++ print(_("Belier has been stopped manually by the user")) + sys.exit(1) + # deux passes pour étudier les ordres +- for boucle in xrange(2): +- for num in xrange(len(self._ordres)): ++ for boucle in range(2): ++ for num in range(len(self._ordres)): + # 1ère passe : on écarte les erreurs banales + if boucle == 0 and self._ordres[num] != linesep: + if '\0' in self._ordres[num]: +- print _("The file format is invalid \ +-It may be a binary file ?") ++ print(_("The file format is invalid \ ++It may be a binary file ?")) + sys.exit(1) + self._ordres[num] = self.remplace_guillemets_motdepasse( + self._ordres[num]) + if len(self._ordres[num].split(' ')) > 5: +- print _("Incorrect argument number \ +-on the order file line") ++ print(_("Incorrect argument number \ ++on the order file line")) + sys.exit(1) + identifiant = self._ordres[num].split(' ')[0] + if len(identifiant) <= 2 and identifiant != linesep: +- print _("A hostname must contain at \ +-least two characters (rfc952)") ++ print(_("A hostname must contain at \ ++least two characters (rfc952)")) + sys.exit(1) + ipoudns = identifiant.split('@')[-1] + if len(ipoudns) > 255: +- print _('Your domain name size \ +-exceeds 255 characters') ++ print(_('Your domain name size \ ++exceeds 255 characters')) + sys.exit(1) + for hostname in ipoudns.split('.'): + if len(hostname) > 64: +- print _("Your hostname size \ +-exceeds 64 characters") ++ print(_("Your hostname size \ ++exceeds 64 characters")) + sys.exit(1) + if self._ordres[num].split()[-1] == '-c'+ linesep or \ + self._ordres[num].split()[-1] == '-c': +@@ -175,8 +175,8 @@ exceeds 64 characters") + try: + open(resultat, 'w').writelines(self._script) + chmod(resultat, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR ) +- except IOError, message: +- print message ++ except IOError as message: ++ print(message) + sys.exit(1) + # compteur à zéro pour le prochain bloc d'ordres + self._script = [self._entetel1, self._entetel2]