summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch53
-rw-r--r--0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch78
-rw-r--r--PKGBUILD16
4 files changed, 4 insertions, 149 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f6bf81c1ec81..4259890cadec 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-pysim-git
pkgdesc = A python tool to program SIMs / USIMs / ISIMs
- pkgver = 1.0.r442.g4e64e727
+ pkgver = 1.0.r520.g219a5f36
pkgrel = 1
url = https://osmocom.org/projects/pysim/wiki
arch = any
@@ -21,11 +21,7 @@ pkgbase = python-pysim-git
depends = python-yaml>=5.1
provides = python-pysim
source = git+https://git.osmocom.org/pysim
- source = 0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch
- source = 0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch
sha256sums = SKIP
- sha256sums = 2eb84bfbd29c8cda42b53d5523e71be8beada766b1fd4970d3ce527852797716
- sha256sums = b9daf3e3ec027731afeecba8b0d501963944403e6d770a127d35f70c1bacf97c
pkgname = python-pysim-git
install = python-pysim-git.install
diff --git a/0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch b/0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch
deleted file mode 100644
index f8f8d9044bc5..000000000000
--- a/0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d5c1bec8697ee0a9fd93ba8a9c2ba1e161a1724b Mon Sep 17 00:00:00 2001
-From: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
-Date: Sun, 13 Feb 2022 22:25:16 +0600
-Subject: [PATCH 1/2] pySim-shell.py: make it work with cmd2 >= v2.0.0
-
-* Argument 'use_ipython' was renamed to 'use_ipython'.
-* Class 'Settable' requires the reference to the object that holds
- the settable attribute.
-
-See https://github.com/python-cmd2/cmd2/releases/tag/2.0.0.
-
-Change-Id: Ia38f0ca5c3f41395f8fe850adae37f5af4e3fe19
----
- pySim-shell.py | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/pySim-shell.py b/pySim-shell.py
-index ef6a2b1..8759cc2 100755
---- a/pySim-shell.py
-+++ b/pySim-shell.py
-@@ -134,7 +134,7 @@ class PysimApp(cmd2.Cmd):
-
- def __init__(self, card, rs, sl, ch, script=None):
- super().__init__(persistent_history_file='~/.pysim_shell_history', allow_cli_args=False,
-- use_ipython=True, auto_load_commands=False, startup_script=script)
-+ auto_load_commands=False, startup_script=script)
- self.intro = style('Welcome to pySim-shell!', fg=fg.red)
- self.default_category = 'pySim-shell built-in commands'
- self.card = None
-@@ -145,16 +145,16 @@ class PysimApp(cmd2.Cmd):
- self.ch = ch
-
- self.numeric_path = False
-- self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File IDs instead of names',
-+ self.add_settable(cmd2.Settable('numeric_path', bool, 'Print File IDs instead of names', self,
- onchange_cb=self._onchange_numeric_path))
- self.conserve_write = True
-- self.add_settable(cmd2.Settable('conserve_write', bool, 'Read and compare before write',
-+ self.add_settable(cmd2.Settable('conserve_write', bool, 'Read and compare before write', self,
- onchange_cb=self._onchange_conserve_write))
- self.json_pretty_print = True
- self.add_settable(cmd2.Settable('json_pretty_print',
-- bool, 'Pretty-Print JSON output'))
-+ bool, 'Pretty-Print JSON output', self))
- self.apdu_trace = False
-- self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and display APDUs exchanged with card',
-+ self.add_settable(cmd2.Settable('apdu_trace', bool, 'Trace and display APDUs exchanged with card', self,
- onchange_cb=self._onchange_apdu_trace))
-
- self.equip(card, rs)
---
-2.37.3
-
diff --git a/0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch b/0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch
deleted file mode 100644
index 535d65fcd849..000000000000
--- a/0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 8f388006431fc1cc9cf6b6ce5c19f4ff455b754d Mon Sep 17 00:00:00 2001
-From: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
-Date: Thu, 14 Jul 2022 19:06:54 +0700
-Subject: [PATCH 2/2] pySim-shell.py: make it work with cmd2 >= v2.4.0
-
-In v2.3.0 both cmd2.{fg,bg} have been deprecated in favour of cmd2.{Fg,Bg}.
-In v2.4.0 both cmd2.{fg,bg} have been removed.
-
-See https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md
-
-Change-Id: I7ca95e85fc45ba66fd9ba6bea1fec2bae0e892c0
----
- pySim-shell.py | 32 ++++++++++++++++----------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/pySim-shell.py b/pySim-shell.py
-index 8759cc2..831c775 100755
---- a/pySim-shell.py
-+++ b/pySim-shell.py
-@@ -23,7 +23,7 @@ import json
- import traceback
-
- import cmd2
--from cmd2 import style, fg
-+from cmd2 import style, Fg
- from cmd2 import CommandSet, with_default_category, with_argparser
- import argparse
-
-@@ -135,7 +135,7 @@ class PysimApp(cmd2.Cmd):
- def __init__(self, card, rs, sl, ch, script=None):
- super().__init__(persistent_history_file='~/.pysim_shell_history', allow_cli_args=False,
- auto_load_commands=False, startup_script=script)
-- self.intro = style('Welcome to pySim-shell!', fg=fg.red)
-+ self.intro = style('Welcome to pySim-shell!', fg=Fg.RED)
- self.default_category = 'pySim-shell built-in commands'
- self.card = None
- self.rs = None
-@@ -287,23 +287,23 @@ class PysimApp(cmd2.Cmd):
- sys.stderr = self._stderr_backup
-
- def _show_failure_sign(self):
-- self.poutput(style(" +-------------+", fg=fg.bright_red))
-- self.poutput(style(" + ## ## +", fg=fg.bright_red))
-- self.poutput(style(" + ## ## +", fg=fg.bright_red))
-- self.poutput(style(" + ### +", fg=fg.bright_red))
-- self.poutput(style(" + ## ## +", fg=fg.bright_red))
-- self.poutput(style(" + ## ## +", fg=fg.bright_red))
-- self.poutput(style(" +-------------+", fg=fg.bright_red))
-+ self.poutput(style(" +-------------+", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" + ## ## +", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" + ## ## +", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" + ### +", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" + ## ## +", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" + ## ## +", fg=Fg.LIGHT_RED))
-+ self.poutput(style(" +-------------+", fg=Fg.LIGHT_RED))
- self.poutput("")
-
- def _show_success_sign(self):
-- self.poutput(style(" +-------------+", fg=fg.bright_green))
-- self.poutput(style(" + ## +", fg=fg.bright_green))
-- self.poutput(style(" + ## +", fg=fg.bright_green))
-- self.poutput(style(" + # ## +", fg=fg.bright_green))
-- self.poutput(style(" + ## # +", fg=fg.bright_green))
-- self.poutput(style(" + ## +", fg=fg.bright_green))
-- self.poutput(style(" +-------------+", fg=fg.bright_green))
-+ self.poutput(style(" +-------------+", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" + ## +", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" + ## +", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" + # ## +", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" + ## # +", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" + ## +", fg=Fg.LIGHT_GREEN))
-+ self.poutput(style(" +-------------+", fg=Fg.LIGHT_GREEN))
- self.poutput("")
-
- def _process_card(self, first, script_path):
---
-2.37.3
-
diff --git a/PKGBUILD b/PKGBUILD
index 54f91e073f31..4e02fd0ac11d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=python-pysim-git
_pyname=${pkgname#python-}
_pyname=${_pyname%-git}
-pkgver=1.0.r442.g4e64e727
+pkgver=1.0.r520.g219a5f36
pkgrel=1
pkgdesc='A python tool to program SIMs / USIMs / ISIMs'
arch=('any')
@@ -23,24 +23,14 @@ depends=('python'
'python-yaml>=5.1')
makedepends=('python-setuptools' 'git')
provides=('python-pysim')
-source=('git+https://git.osmocom.org/pysim'
- '0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch'
- '0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch')
-sha256sums=('SKIP'
- '2eb84bfbd29c8cda42b53d5523e71be8beada766b1fd4970d3ce527852797716'
- 'b9daf3e3ec027731afeecba8b0d501963944403e6d770a127d35f70c1bacf97c')
+source=('git+https://git.osmocom.org/pysim')
+sha256sums=('SKIP')
pkgver() {
cd ${_pyname}
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^\(v\)\1*//'
}
-prepare() {
- # apply patches for compatibility with newer cmd2 versions
- patch --directory="${_pyname}" -p1 -i "$srcdir/0001-pySim-shell.py-make-it-work-with-cmd2-v2.0.0.patch"
- patch --directory="${_pyname}" -p1 -i "$srcdir/0002-pySim-shell.py-make-it-work-with-cmd2-v2.4.0.patch"
-}
-
package() {
install=$pkgname.install
cd "${srcdir}/${_pyname}"