Add upstream patch to fix nbdsh (for nbdkit tests).
This commit is contained in:
parent
2f41901700
commit
52e6bd7cc3
30
0001-nbdsh-Fix-behaviour-of-globals.patch
Normal file
30
0001-nbdsh-Fix-behaviour-of-globals.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From d6cbd130101add28431bd6e67aa2ea0430a9234e Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Wed, 11 Sep 2019 22:25:57 +0100
|
||||||
|
Subject: [PATCH] nbdsh: Fix behaviour of globals.
|
||||||
|
|
||||||
|
https://stackoverflow.com/a/11754346
|
||||||
|
---
|
||||||
|
python/nbdsh.py | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python/nbdsh.py b/python/nbdsh.py
|
||||||
|
index bb0db64..553e632 100644
|
||||||
|
--- a/python/nbdsh.py
|
||||||
|
+++ b/python/nbdsh.py
|
||||||
|
@@ -57,8 +57,10 @@ help (nbd) # Display documentation
|
||||||
|
if not args.command:
|
||||||
|
code.interact (banner = banner, local = locals(), exitmsg = '')
|
||||||
|
else:
|
||||||
|
+ # https://stackoverflow.com/a/11754346
|
||||||
|
+ d = dict (locals(), **globals())
|
||||||
|
for c in args.command:
|
||||||
|
if c != '-':
|
||||||
|
- exec (c)
|
||||||
|
+ exec (c, d, d)
|
||||||
|
else:
|
||||||
|
- exec (sys.stdin.read ())
|
||||||
|
+ exec (sys.stdin.read (), d, d)
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
Name: libnbd
|
Name: libnbd
|
||||||
Version: 1.1.1
|
Version: 1.1.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: NBD client library in userspace
|
Summary: NBD client library in userspace
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -22,6 +22,9 @@ Source1: http://libguestfs.org/download/libnbd/%{source_directory}/%{name
|
|||||||
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
|
# https://pgp.key-server.io/pks/lookup?search=rjones%40redhat.com&fingerprint=on&op=vindex
|
||||||
Source2: libguestfs.keyring
|
Source2: libguestfs.keyring
|
||||||
|
|
||||||
|
# Upstream patch to fix nbdsh.
|
||||||
|
Patch0001: 0001-nbdsh-Fix-behaviour-of-globals.patch
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool
|
BuildRequires: autoconf, automake, libtool
|
||||||
%endif
|
%endif
|
||||||
@ -219,6 +222,9 @@ make %{?_smp_mflags} check || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 12 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-2
|
||||||
|
- Add upstream patch to fix nbdsh (for nbdkit tests).
|
||||||
|
|
||||||
* Sun Sep 08 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-1
|
* Sun Sep 08 2019 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-1
|
||||||
- New development version 1.1.1.
|
- New development version 1.1.1.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user