fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/29227 )
Change subject: Bump minimum required construct version to v2.9.51
......................................................................
Bump minimum required construct version to v2.9.51
With this version I can get all unittests passing:
python -m unittest discover tests/
We're passing argument 'path' to stream_read_entire(), which was
added in [1] and become available since v2.9.51.
Change-Id: I4223c83570d333ad8d79bc2aa2d8bcc580156cff
Related: [1] bfe71315b027e18e62f00ec4de75043992fd2316 construct.git
Related: OS#5666
---
M setup.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/27/29227/1
diff --git a/setup.py b/setup.py
index ec1a76a..b9ad1bf 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@
"pytlv",
"cmd2 >= 1.3.0, < 2.0.0",
"jsonpath-ng",
- "construct >= 2.9",
+ "construct >= 2.9.51",
"bidict",
"gsm0338",
"termcolor",
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29227
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4223c83570d333ad8d79bc2aa2d8bcc580156cff
Gerrit-Change-Number: 29227
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/29226 )
Change subject: construct: use Python's API for int<->bytes conversion
......................................................................
construct: use Python's API for int<->bytes conversion
Argument 'signed' was added in [1] and become available since v2.10.63.
Therefore using bytes2integer() and integer2bytes() from construct.core
bumps the minimum required version of construct to v2.10.63. For
instance, debian:bullseye currently ships v2.10.58.
There is no strict requirement to use construct's API, so let's use
Python's API instead. This allows using older construct versions
from the v2.9.xx family.
Change-Id: I613dbfebe993f9c19003635371941710fc1b1236
Related: [1] 660ddbe2d9a351731ad7976351adbf413809a715 construct.git
Related: OS#5666
---
M pySim/construct.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/26/29226/1
diff --git a/pySim/construct.py b/pySim/construct.py
index 4910a7f..97af235 100644
--- a/pySim/construct.py
+++ b/pySim/construct.py
@@ -2,7 +2,7 @@
from construct.core import EnumIntegerString
import typing
from construct import *
-from construct.core import evaluate, bytes2integer, integer2bytes, BitwisableString
+from construct.core import evaluate, BitwisableString
from construct.lib import integertypes
from pySim.utils import b2h, h2b, swap_nibbles
import gsm0338
@@ -219,7 +219,7 @@
if evaluate(self.swapped, context):
data = swapbytes(data)
try:
- return bytes2integer(data, self.signed)
+ return int.from_bytes(data, byteorder='big', signed=self.signed)
except ValueError as e:
raise IntegerError(str(e), path=path)
@@ -248,7 +248,7 @@
raise IntegerError(f"value {obj} is not an integer", path=path)
length = self.__bytes_required(obj, self.minlen)
try:
- data = integer2bytes(obj, length, self.signed)
+ data = obj.to_bytes(length, byteorder='big', signed=self.signed)
except ValueError as e:
raise IntegerError(str(e), path=path)
if evaluate(self.swapped, context):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/29226
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I613dbfebe993f9c19003635371941710fc1b1236
Gerrit-Change-Number: 29226
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: msuraev.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29224 )
Change subject: Ignore .deb build byproducts
......................................................................
Patch Set 2:
(1 comment)
File .gitignore:
https://gerrit.osmocom.org/c/osmo-ggsn/+/29224/comment/46016d64_0dea5044
PS2, Line 27: # debian
I suggest to move your new entries here, so that we have all debian stuff in one place.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iec63ef5ea0acfc5e6621054926be15ae4754d65d
Gerrit-Change-Number: 29224
Gerrit-PatchSet: 2
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:53:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29225 )
Change subject: Set working directory in systemd service file
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29225
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I40b5d50470cb55ca94af5e17f21658181a02d4c2
Gerrit-Change-Number: 29225
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:48:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
to look at the new patch set (#2).
Change subject: Set working directory in systemd service file
......................................................................
Set working directory in systemd service file
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system
instance) instead.
Related: OS#4821
Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
---
M contrib/systemd/osmo-ggsn.service
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/23/29223/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
Gerrit-Change-Number: 29223
Gerrit-PatchSet: 2
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29223 )
Change subject: Set working directory in systemd service file
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29223
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Idffc115c21cac77f6f43356333de538ba549fc6a
Gerrit-Change-Number: 29223
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:01:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/29224 )
Change subject: Ignore .deb build byproducts
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/29224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Iec63ef5ea0acfc5e6621054926be15ae4754d65d
Gerrit-Change-Number: 29224
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 29 Aug 2022 12:00:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment