From nobody Mon Feb 19 00:29:15 2024 X-Original-To: dev-commits-ports-all@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 4TdNhD4l4cz5C9KT; Mon, 19 Feb 2024 00:29:16 +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 4TdNhD2Tynz4XN9; Mon, 19 Feb 2024 00:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708302556; 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=lAhiwvunuF6UgAcQmLR29PeX5a3a8YLVS6HYPr5W/2o=; b=wIPlIXHTqJqex6TZuk0+8m9Ba3ZG/fEF4QhIGJd1saGvsjAZicVl1d5JGayYInI1TsTiF6 e+QccCm8awmOwEpTBXbE7FS1z9sh/qdBwPd39zq1i3hnj3wgKiy6x/JxgP1msz/TGjFU0f j6o+tFG/EyFiCJyLHjEsw7unIIG+qNGJ7r5BDfmrTCLjPBmeBKsjB+Q/ko78v5KDp/j2/E brVLEwfVwymggSWUkptcEjJiOumrzKl1xGsAZNlNvKzEBTLmkXvqH7aXUpY3pIhSi3DrB8 XAlw9CF/C05IMykIi1n/aM9DmIL9Vm/jI7+mNantF8OZvt4NmV/mQvggKeANaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708302556; 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=lAhiwvunuF6UgAcQmLR29PeX5a3a8YLVS6HYPr5W/2o=; b=K6eu80Jn2SLQW5vgpKfzIuqkyu8H+cnVyY8F18KUn4uwpYoeR77NnO2brilzNSiBjCV+kF hV4L85D5vxh2nQZztjpA/q+y3FWBUlmuiU/MNs2yB/LJOIMuW8bIBCl8xVv8rdLwmu0cjF IRafboyTuSaWpJ8GjW/XLG/TsKaLddJ5OPzSAX54ZCw00h6830r4ikR4kpEEl7BTqyrKJI PvKQawHW+Z79q5/XEEva1XeAAHS4yc7j1XITwonLKA32aC7Q6VtPPhD+MnKLJup011DQV1 4D3wFRQJQ6sZHc2mLelYw3u53OysojlzGDPZyUTBqUaEcqK5Bj8A+blyd5g6Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708302556; a=rsa-sha256; cv=none; b=uJJ+GIerhpFmqcJO/ij64h4SnPzcHhASIHraB7/gLNKZ6/eWCQjAR6fpQCIqwFlYy0MDvy RtBbiEOT3MCg97lAytKlTtzSSVJwVereF6pT4kseeGpclNz0eBE3WYVfpQHYWIMnYwcheI spRFTz9Oc/PALUbQW9AE0k+4d8PS0HHxigixtPwd7BtPSzUqcJ80VLawOcuFiUCqTtF1Wu waWJUXGSkLCAjuvDKfMzBy2SYjoIrXhokxIPImIevq6AVu6kBCL/GQBas07J8r5i/FHoL8 KINcg8emiM7BgXy10ImBtEyQOATS+6odSiwp4xZV1gZ/0mL4VnycCadhcw5XQA== 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 4TdNhC6XMNz1Bmj; Mon, 19 Feb 2024 00:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41J0TFYL038505; Mon, 19 Feb 2024 00:29:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41J0TF11038502; Mon, 19 Feb 2024 00:29:15 GMT (envelope-from git) Date: Mon, 19 Feb 2024 00:29:15 GMT Message-Id: <202402190029.41J0TF11038502@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 1472a559157f - main - devel/py-pnio-dcp: New port: Library to PROFINET Discovery and basic DCP protocol List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1472a559157fb57b848ecf1db367bde505d0f4bb Auto-Submitted: auto-generated The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=1472a559157fb57b848ecf1db367bde505d0f4bb commit 1472a559157fb57b848ecf1db367bde505d0f4bb Author: Jose Alonso Cardenas Marquez AuthorDate: 2024-02-19 00:28:12 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2024-02-19 00:28:12 +0000 devel/py-pnio-dcp: New port: Library to PROFINET Discovery and basic DCP protocol A simple Python library to send and receive messages with the Profinet Discovery and basic Configuration Protocol (DCP) protocol. It can send requests and parse the corresponding responses to identify devices over the network, get and set their parameters or reset them to factory settings. --- devel/Makefile | 1 + devel/py-pnio-dcp/Makefile | 29 ++++++++++++++++++++++ devel/py-pnio-dcp/distinfo | 3 +++ .../files/patch-pnio__dcp_l2socket_____init____.py | 10 ++++++++ .../py-pnio-dcp/files/patch-pnio__dcp_pnio__dcp.py | 22 ++++++++++++++++ devel/py-pnio-dcp/files/patch-setup.py | 11 ++++++++ devel/py-pnio-dcp/pkg-descr | 4 +++ 7 files changed, 80 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index ad7ed6b60dd3..2eaae82d05a3 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5220,6 +5220,7 @@ SUBDIR += py-pluginbase SUBDIR += py-plux SUBDIR += py-ply + SUBDIR += py-pnio-dcp SUBDIR += py-pockets SUBDIR += py-podcastparser SUBDIR += py-poetry diff --git a/devel/py-pnio-dcp/Makefile b/devel/py-pnio-dcp/Makefile new file mode 100644 index 000000000000..d782d3252520 --- /dev/null +++ b/devel/py-pnio-dcp/Makefile @@ -0,0 +1,29 @@ +PORTNAME= pnio-dcp +PORTVERSION= 1.2.0 +CATEGORIES= devel python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= acm@FreeBSD.org +COMMENT= Library to PROFINET Discovery and basic DCP protocol +WWW= https://gitlab.com/pyshacks/pnio_dcp + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psutil>=0:sysutils/py-psutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist distutils + +USE_GITLAB= yes +GL_ACCOUNT= pyshacks +GL_PROJECT= ${PORTNAME:S/-/_/} +GL_COMMIT= 6156aa9c10bca35a118a58a02837b97a7e5a829e + +NO_ARCH= yes + +post-patch: + ${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/setup.py + +.include diff --git a/devel/py-pnio-dcp/distinfo b/devel/py-pnio-dcp/distinfo new file mode 100644 index 000000000000..a012c6cdcc58 --- /dev/null +++ b/devel/py-pnio-dcp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1708286638 +SHA256 (pyshacks-pnio_dcp-6156aa9c10bca35a118a58a02837b97a7e5a829e_GL0.tar.gz) = c5aa5822faf78cae39ae1c7dc9010528acd322cef5d7037c6b71522e03f601e5 +SIZE (pyshacks-pnio_dcp-6156aa9c10bca35a118a58a02837b97a7e5a829e_GL0.tar.gz) = 32613 diff --git a/devel/py-pnio-dcp/files/patch-pnio__dcp_l2socket_____init____.py b/devel/py-pnio-dcp/files/patch-pnio__dcp_l2socket_____init____.py new file mode 100644 index 000000000000..5201c36f362e --- /dev/null +++ b/devel/py-pnio-dcp/files/patch-pnio__dcp_l2socket_____init____.py @@ -0,0 +1,10 @@ +--- pnio_dcp/l2socket/__init__.py.orig 2024-02-18 23:35:44 UTC ++++ pnio_dcp/l2socket/__init__.py +@@ -10,5 +10,7 @@ if sys.platform == 'win32': + L2Socket = L2PcapSocket + elif sys.platform.startswith('linux'): + L2Socket = L2LinuxSocket ++elif sys.platform.startswith('freebsd'): ++ L2Socket = L2LinuxSocket + else: + raise NotImplementedError(f"Platform {sys.platform} is currently not supported.") diff --git a/devel/py-pnio-dcp/files/patch-pnio__dcp_pnio__dcp.py b/devel/py-pnio-dcp/files/patch-pnio__dcp_pnio__dcp.py new file mode 100644 index 000000000000..18e68a4ce8c6 --- /dev/null +++ b/devel/py-pnio-dcp/files/patch-pnio__dcp_pnio__dcp.py @@ -0,0 +1,22 @@ +--- pnio_dcp/pnio_dcp.py.orig 2024-02-18 23:53:00 UTC ++++ pnio_dcp/pnio_dcp.py +@@ -49,7 +49,7 @@ class DCP: + available through this instance. + """ + +- def __init__(self, ip): ++ def __init__(self, ip, timeout=7): + """ + Create a new instance, use the given ip to select the network interface. + :param ip: The ip address used to select the network interface. +@@ -57,8 +57,8 @@ class DCP: + """ + self.src_mac, network_interface = self.__get_network_interface_and_mac_address(ip) + +- self.default_timeout = 7 # default timeout for requests (in seconds) +- self.identify_all_timeout = 7 # timeout to receive all responses for identify_all ++ self.default_timeout = timeout # default timeout for requests (in seconds) ++ self.identify_all_timeout = timeout # timeout to receive all responses for identify_all + + # the XID is the id of the current transaction and can be used to identify the responses to a request + self.__xid = int(random.getrandbits(32)) # initialize it with a random value diff --git a/devel/py-pnio-dcp/files/patch-setup.py b/devel/py-pnio-dcp/files/patch-setup.py new file mode 100644 index 000000000000..02a992f8b10c --- /dev/null +++ b/devel/py-pnio-dcp/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2023-10-04 11:20:39 UTC ++++ setup.py +@@ -30,7 +30,7 @@ classifiers = [ + ] + + setup(name="pnio_dcp", +- use_scm_version={"local_scheme": "no-local-version"}, ++ version='1.2.0', + setup_requires=['setuptools_scm'], + description='Discover and configure PROFINET devices with the PROFINET Discovery and basic Configuration Protocol (DCP) ' + 'protocol.', diff --git a/devel/py-pnio-dcp/pkg-descr b/devel/py-pnio-dcp/pkg-descr new file mode 100644 index 000000000000..454a8a2d8ae9 --- /dev/null +++ b/devel/py-pnio-dcp/pkg-descr @@ -0,0 +1,4 @@ +A simple Python library to send and receive messages with the Profinet +Discovery and basic Configuration Protocol (DCP) protocol. It can send requests +and parse the corresponding responses to identify devices over the network, get +and set their parameters or reset them to factory settings.