diff options
author | Simon McVittie <smcv@debian.org> | 2023-09-18 10:15:16 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2023-09-18 10:15:16 +0100 |
commit | 24fe0443d4ae7ef74ca721e3729a1287f5ec31c2 (patch) | |
tree | fa504f8dc6c1858e80cc9b4fe9c325f477cb8ecf | |
parent | 3cfd31913dac5bb5dd488c2d2b7487fe28eb97d7 (diff) |
d/patches: Drop all patches, included in new upstream release
11 files changed, 0 insertions, 440 deletions
diff --git a/debian/patches/Correct-parameter-name-when-documenting-psplash-pipe-in-t.patch b/debian/patches/Correct-parameter-name-when-documenting-psplash-pipe-in-t.patch deleted file mode 100644 index 42d6846..0000000 --- a/debian/patches/Correct-parameter-name-when-documenting-psplash-pipe-in-t.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Wed, 3 Feb 2021 09:15:05 +0000 -Subject: Correct parameter name when documenting --psplash-pipe in the man - page - -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/80 -Applied-upstream: 3.7, commit:15e6a6366d16f11e836754f147635fb963340719 ---- - docs/man1/bmaptool.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/man1/bmaptool.1 b/docs/man1/bmaptool.1 -index dedff9b..6d4ddc2 100644 ---- a/docs/man1/bmaptool.1 -+++ b/docs/man1/bmaptool.1 -@@ -209,7 +209,7 @@ IMAGE matches the checksums. - .RE - - .PP --\-\-no-sig-verify -+\-\-psplash\-pipe PATH - .RS 2 - Write progress to a psplash pipe. - .RE diff --git a/debian/patches/Do-not-use-subprocess-pipe.patch b/debian/patches/Do-not-use-subprocess-pipe.patch deleted file mode 100644 index 33bbd20..0000000 --- a/debian/patches/Do-not-use-subprocess-pipe.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> -Date: Wed, 10 Mar 2021 14:50:59 +0200 -Subject: Do not use subprocess pipe - -We use the 'subprocess' module for running external processes, and in -few places we create sub-processes with the 'stderr=subprocess.PIPE' -argument. Howerver, we never read from the pipe, which means that it may -get filled and block the external program. This is dangerous and may -lead to deadlock situations. - -This patch fixes the issue by removing the argument. If we do not read -sub-process's 'stderr', it is OK for it to inherit it from the main -program, so the error message will just go to bmaptool's standare error -stream. - -Origin: upstream, 3.7, commit:d77f3e9a6e496ba8d460f27bfef02aec45181b78 -Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> ---- - bmaptools/TransRead.py | 6 ++---- - tests/test_api_base.py | 4 +--- - 2 files changed, 3 insertions(+), 7 deletions(-) - -diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py -index 1d0b582..cdfd37e 100644 ---- a/bmaptools/TransRead.py -+++ b/bmaptools/TransRead.py -@@ -419,8 +419,7 @@ class TransRead(object): - child_process = subprocess.Popen(args, shell=True, - bufsize=1024 * 1024, - stdin=child_stdin, -- stdout=subprocess.PIPE, -- stderr=subprocess.PIPE) -+ stdout=subprocess.PIPE) - - if child_stdin == subprocess.PIPE: - # A separate reader thread is created only when we are reading via -@@ -490,8 +489,7 @@ class TransRead(object): - # host - command = "test -f " + path + " && test -r " + path - child_process = subprocess.Popen(popen_args + [command], -- bufsize=1024 * 1024, -- stdout=subprocess.PIPE) -+ bufsize=1024 * 1024) - child_process.wait() - if child_process.returncode != 0: - raise Error("\"%s\" on \"%s\" cannot be read: make sure it " -diff --git a/tests/test_api_base.py b/tests/test_api_base.py -index ea996c7..11adeaa 100644 ---- a/tests/test_api_base.py -+++ b/tests/test_api_base.py -@@ -116,9 +116,7 @@ def _generate_compressed_files(file_path, delete=True): - args = archiver + " " + options + " " + file_path - else: - args = decompressor + " " + options + " " + file_path -- child_process = subprocess.Popen(args, shell=True, -- stderr=subprocess.PIPE, -- stdout=tmp_file_obj) -+ child_process = subprocess.Popen(args, shell=True, stdout=tmp_file_obj) - child_process.wait() - tmp_file_obj.flush() - yield tmp_file_obj.name diff --git a/debian/patches/Expand-documentation-of-psplash-pipe-to-specify-what-is-r.patch b/debian/patches/Expand-documentation-of-psplash-pipe-to-specify-what-is-r.patch deleted file mode 100644 index 6e51bb1..0000000 --- a/debian/patches/Expand-documentation-of-psplash-pipe-to-specify-what-is-r.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Wed, 3 Feb 2021 09:15:31 +0000 -Subject: Expand documentation of --psplash-pipe to specify what is reported - -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/80 -Applied-upstream: 3.7, commit:a8a8a2adfcd816d253cf203c6079ced8bbbbb4e7 ---- - docs/man1/bmaptool.1 | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/docs/man1/bmaptool.1 b/docs/man1/bmaptool.1 -index 6d4ddc2..e6bbb2f 100644 ---- a/docs/man1/bmaptool.1 -+++ b/docs/man1/bmaptool.1 -@@ -211,7 +211,9 @@ IMAGE matches the checksums. - .PP - \-\-psplash\-pipe PATH - .RS 2 --Write progress to a psplash pipe. -+Write periodic machine-readable progress reports to a fifo in the format -+used by \fBpsplash\fR. Each progress report consists of "PROGRESS" followed -+by a space, an integer percentage and a newline. - .RE - .RE - diff --git a/debian/patches/TransRead-hide-useless-message.patch b/debian/patches/TransRead-hide-useless-message.patch deleted file mode 100644 index a243730..0000000 --- a/debian/patches/TransRead-hide-useless-message.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> -Date: Wed, 10 Mar 2021 15:33:48 +0200 -Subject: TransRead: hide useless message - -The previous patch (stop using 'subprocess.PIPE') addes a side-effect - -now we see 'tar' the following tar message: - -tar: Removing leading `/' from member names' - -This patch gets rid of them. - -Origin: upstream, 3.7, commit:f41e5529471ff94fc84280338a0e13e4862daa63 -Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> ---- - bmaptools/TransRead.py | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py -index cdfd37e..37bda8b 100644 ---- a/bmaptools/TransRead.py -+++ b/bmaptools/TransRead.py -@@ -395,6 +395,11 @@ class TransRead(object): - self.size = os.fstat(self._f_objs[-1].fileno()).st_size - return - -+ if archiver == "tar": -+ # This will get rid of messages like: -+ # tar: Removing leading `/' from member names'. -+ args += " -P -C /" -+ - # Make sure decompressor and the archiver programs are available - if not BmapHelpers.program_is_available(decompressor): - raise Error("the \"%s\" program is not available but it is " diff --git a/debian/patches/TransRead-kill-subprocesses.patch b/debian/patches/TransRead-kill-subprocesses.patch deleted file mode 100644 index d8a7474..0000000 --- a/debian/patches/TransRead-kill-subprocesses.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> -Date: Wed, 10 Mar 2021 14:09:34 +0200 -Subject: TransRead: kill subprocesses - -Kill and wait for subprocesses when destroying TransRead objects. This -gets rid of the following warning (observed when running self-tests): - -/usr/lib64/python3.9/subprocess.py:1048: ResourceWarning: subprocess 140912 is still running - _warn("subprocess %s is still running" % self.pid, - -Origin: upstream, 3.7, commit:d17e2eaea318444c7370298739da3c5a3969cc6d -Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> ---- - bmaptools/TransRead.py | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py -index da3c8b5..1d0b582 100644 ---- a/bmaptools/TransRead.py -+++ b/bmaptools/TransRead.py -@@ -188,14 +188,21 @@ class TransRead(object): - """The class destructor which closes opened files.""" - self._done = True - -- for child in self._child_processes: -- child.kill() -+ if getattr(self, "_f_objs"): -+ for file_obj in self._f_objs: -+ file_obj.close() -+ self._f_objs = None - -- if self._rthread: -+ if getattr(self, "_rthread"): - self._rthread.join() -- -- for file_obj in self._f_objs: -- file_obj.close() -+ self._rthread = None -+ -+ if getattr(self, "_child_processes"): -+ for child in self._child_processes: -+ if child.poll() is None: -+ child.kill() -+ child.wait() -+ self._child_processes = [] - - def _read_thread(self, f_from, f_to): - """ diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index f849c9d..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,10 +0,0 @@ -Correct-parameter-name-when-documenting-psplash-pipe-in-t.patch -Expand-documentation-of-psplash-pipe-to-specify-what-is-r.patch -TransRead-kill-subprocesses.patch -Do-not-use-subprocess-pipe.patch -TransRead-hide-useless-message.patch -tests-fix-test_bmap_helpers-on-non-ZFS.patch -tests-Use-unittest.mock-from-Python-standard-library-if-p.patch -tests-Try-to-use-TemporaryDirectory-from-Python-standard-.patch -tests-Pass-c-k-options-to-zstd-too.patch -tests-Fix-import-pattern-for-mock-objects.patch diff --git a/debian/patches/tests-Fix-import-pattern-for-mock-objects.patch b/debian/patches/tests-Fix-import-pattern-for-mock-objects.patch deleted file mode 100644 index 3bffe68..0000000 --- a/debian/patches/tests-Fix-import-pattern-for-mock-objects.patch +++ /dev/null @@ -1,89 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Thu, 28 Oct 2021 12:23:30 +0100 -Subject: tests: Fix import pattern for mock objects - -The legacy mock module contains a mock.mock submodule, but unittest.mock -does not contain a redundant unittest.mock.mock. This bug was masked by -the transparent fallback to the legacy mock module. - -The actual test only uses mock.patch(), so we can simplify by just -importing the one member that we need. - -Fixes: a1ca1172 "tests: Use unittest.mock from Python standard library if possible" -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/89 -Applied-upstream: 3.7, commit:47908b5389d1f3de9306c0030856b3d3180ade86 ---- - tests/test_bmap_helpers.py | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/tests/test_bmap_helpers.py b/tests/test_bmap_helpers.py -index 56b079e..36c4557 100644 ---- a/tests/test_bmap_helpers.py -+++ b/tests/test_bmap_helpers.py -@@ -22,9 +22,9 @@ import os - import sys - import tempfile - try: -- from unittest.mock import patch, mock -+ from unittest.mock import patch - except ImportError: # for Python < 3.3 -- from mock import patch, mock -+ from mock import patch - try: - from tempfile import TemporaryDirectory - except ImportError: # for Python < 3.2 -@@ -76,7 +76,7 @@ class TestBmapHelpers(unittest.TestCase): - delete=True, dir=".", suffix=".txt") as fobj: - fobj.write("1") - fobj.flush() -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) - with mockobj: - self.assertTrue(BmapHelpers.is_zfs_configuration_compatible()) - -@@ -88,7 +88,7 @@ class TestBmapHelpers(unittest.TestCase): - delete=True, dir=".", suffix=".txt") as fobj: - fobj.write("0") - fobj.flush() -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) - with mockobj: - self.assertFalse(BmapHelpers.is_zfs_configuration_compatible()) - -@@ -97,7 +97,7 @@ class TestBmapHelpers(unittest.TestCase): - - with tempfile.NamedTemporaryFile("a", prefix="testfile_", - delete=True, dir=".", suffix=".txt") as fobj: -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) - with self.assertRaises(BmapHelpers.Error): - with mockobj: - BmapHelpers.is_zfs_configuration_compatible() -@@ -116,7 +116,7 @@ class TestBmapHelpers(unittest.TestCase): - - directory = os.path.dirname(__file__) - filepath = os.path.join(directory, "BmapHelpers/file/does/not/exist") -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", filepath) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", filepath) - with mockobj: - self.assertFalse(BmapHelpers.is_zfs_configuration_compatible()) - -@@ -128,7 +128,7 @@ class TestBmapHelpers(unittest.TestCase): - delete=True, dir=".", suffix=".img") as fobj: - fobj.write("1") - fobj.flush() -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) - with mockobj: - self.assertTrue(BmapHelpers.is_compatible_file_system(fobj.name)) - -@@ -140,7 +140,7 @@ class TestBmapHelpers(unittest.TestCase): - delete=True, dir=".", suffix=".img") as fobj: - fobj.write("0") - fobj.flush() -- mockobj = mock.patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) -+ mockobj = patch.object(BmapHelpers, "ZFS_COMPAT_PARAM_PATH", fobj.name) - with mockobj: - self.assertFalse(BmapHelpers.is_compatible_file_system(fobj.name)) - diff --git a/debian/patches/tests-Pass-c-k-options-to-zstd-too.patch b/debian/patches/tests-Pass-c-k-options-to-zstd-too.patch deleted file mode 100644 index fbca319..0000000 --- a/debian/patches/tests-Pass-c-k-options-to-zstd-too.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Thu, 28 Oct 2021 11:16:39 +0100 -Subject: tests: Pass -c -k options to zstd, too - -Otherwise we get interactive prompts during testing, like this: - - zstd: /*stdin*\: unexpected end of file - zstd: /*stdin*\: unexpected end of file - zstd: /*stdin*\: unexpected end of file - zstd: /*stdin*\: unexpected end of file - zstd: .../.pybuild/cpython3_3.9/build/4Khole_idts5mgb.img.zst already exists; overwrite (y/n) ? - -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/88 -Applied-upstream: 3.7, commit:18f21738a89a30b335421dc1292bde81e56853de ---- - tests/test_api_base.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_api_base.py b/tests/test_api_base.py -index 11adeaa..39b83fa 100644 ---- a/tests/test_api_base.py -+++ b/tests/test_api_base.py -@@ -91,7 +91,7 @@ def _generate_compressed_files(file_path, delete=True): - ("xz", None, ".xz", "-c -k"), - ("lzop", None, ".lzo", "-c -k"), - ("lz4", None, ".lz4", "-c -k"), -- ("zstd", None, ".zst", ""), -+ ("zstd", None, ".zst", "-c -k"), - # The "-P -C /" trick is used to avoid silly warnings: - # "tar: Removing leading `/' from member names" - ("bzip2", "tar", ".tar.bz2", "-c -j -O -P -C /"), diff --git a/debian/patches/tests-Try-to-use-TemporaryDirectory-from-Python-standard-.patch b/debian/patches/tests-Try-to-use-TemporaryDirectory-from-Python-standard-.patch deleted file mode 100644 index b32aa50..0000000 --- a/debian/patches/tests-Try-to-use-TemporaryDirectory-from-Python-standard-.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Thu, 28 Oct 2021 11:05:52 +0100 -Subject: tests: Try to use TemporaryDirectory from Python standard library - -This avoids an unnecessary external dependency with Python >= 3.2. - -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/87 -Applied-upstream: 3.7, commit:dfba9f9c664c240bbf339189bf7abd7314bcafbc ---- - requirements-test.txt | 2 +- - tests/test_bmap_helpers.py | 7 +++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/requirements-test.txt b/requirements-test.txt -index cea340a..f83802d 100644 ---- a/requirements-test.txt -+++ b/requirements-test.txt -@@ -1,4 +1,4 @@ - six - nose --backports.tempfile -+backports.tempfile ; python_version < '3.2' - mock ; python_version < '3.3' -diff --git a/tests/test_bmap_helpers.py b/tests/test_bmap_helpers.py -index 47b3862..56b079e 100644 ---- a/tests/test_bmap_helpers.py -+++ b/tests/test_bmap_helpers.py -@@ -25,7 +25,10 @@ try: - from unittest.mock import patch, mock - except ImportError: # for Python < 3.3 - from mock import patch, mock --from backports import tempfile as btempfile -+try: -+ from tempfile import TemporaryDirectory -+except ImportError: # for Python < 3.2 -+ from backports.tempfile import TemporaryDirectory - from bmaptools import BmapHelpers - - -@@ -58,7 +61,7 @@ class TestBmapHelpers(unittest.TestCase): - def test_get_file_system_type_symlink(self): - """Check a file system type is returned when used with a symlink""" - -- with btempfile.TemporaryDirectory(prefix="testdir_", dir=".") as directory: -+ with TemporaryDirectory(prefix="testdir_", dir=".") as directory: - fobj = tempfile.NamedTemporaryFile("r", prefix="testfile_", delete=False, - dir=directory, suffix=".img") - lnk = os.path.join(directory, "test_symlink") diff --git a/debian/patches/tests-Use-unittest.mock-from-Python-standard-library-if-p.patch b/debian/patches/tests-Use-unittest.mock-from-Python-standard-library-if-p.patch deleted file mode 100644 index 5506a44..0000000 --- a/debian/patches/tests-Use-unittest.mock-from-Python-standard-library-if-p.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Simon McVittie <smcv@debian.org> -Date: Thu, 28 Oct 2021 11:03:09 +0100 -Subject: tests: Use unittest.mock from Python standard library if possible - -This avoids an unnecessary external dependency when using Python >= 3.3. - -Signed-off-by: Simon McVittie <smcv@debian.org> -Forwarded: https://github.com/intel/bmap-tools/pull/87 -Applied-upstream: 3.7, commit:a1ca1172f259f32ff9eb0469567be1a9085cca88 ---- - requirements-test.txt | 2 +- - tests/test_bmap_helpers.py | 5 ++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/requirements-test.txt b/requirements-test.txt -index 1cc6bbb..cea340a 100644 ---- a/requirements-test.txt -+++ b/requirements-test.txt -@@ -1,4 +1,4 @@ - six - nose - backports.tempfile --mock -\ No newline at end of file -+mock ; python_version < '3.3' -diff --git a/tests/test_bmap_helpers.py b/tests/test_bmap_helpers.py -index 1617957..47b3862 100644 ---- a/tests/test_bmap_helpers.py -+++ b/tests/test_bmap_helpers.py -@@ -21,7 +21,10 @@ This test verifies 'BmapHelpers' module functionality. - import os - import sys - import tempfile --from mock import patch, mock -+try: -+ from unittest.mock import patch, mock -+except ImportError: # for Python < 3.3 -+ from mock import patch, mock - from backports import tempfile as btempfile - from bmaptools import BmapHelpers - diff --git a/debian/patches/tests-fix-test_bmap_helpers-on-non-ZFS.patch b/debian/patches/tests-fix-test_bmap_helpers-on-non-ZFS.patch deleted file mode 100644 index 29ff1e4..0000000 --- a/debian/patches/tests-fix-test_bmap_helpers-on-non-ZFS.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> -Date: Thu, 11 Mar 2021 10:48:38 +0200 -Subject: tests: fix test_bmap_helpers on non-ZFS - -One test failed when running with on a system that does not have ZFS. - -Origin: upstream, 3.7, commit:3a84ba28364c5686b6b1ce0742a4b70d8f8b37c3 -Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> ---- - tests/test_bmap_helpers.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tests/test_bmap_helpers.py b/tests/test_bmap_helpers.py -index 8516164..1617957 100644 ---- a/tests/test_bmap_helpers.py -+++ b/tests/test_bmap_helpers.py -@@ -102,7 +102,8 @@ class TestBmapHelpers(unittest.TestCase): - - mock_open.side_effect = IOError - with self.assertRaises(BmapHelpers.Error): -- BmapHelpers.is_zfs_configuration_compatible() -+ if not BmapHelpers.is_zfs_configuration_compatible(): -+ raise BmapHelpers.Error - - def test_is_zfs_configuration_compatible_notinstalled(self): - """Check compatiblilty check passes when zfs not installed""" |