[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1034244: marked as done (unblock (pre-approval): lua-readline/3.2-2)



Your message dated Thu, 13 Apr 2023 07:46:12 +0000
with message-id <E1pmrem-00FHr6-5C@respighi.debian.org>
and subject line unblock lua-readline
has caused the Debian Bug report #1034244,
regarding unblock (pre-approval): lua-readline/3.2-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1034244: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034244
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: lua-readline@packages.debian.org
Control: affects -1 + src:lua-readline

I'd like to upload lua-readline with a bugfix for #1034078 (see [1]).

[ Reason ]
This upload fixes #1034078. The patch is made upstream and taken
from newly released version 3.3.

[ Impact ]
This bug is a regression in version 3.2 which significantly
worsens user experience (standard Ctrl+D isn't interpreted as EOF).

[ Tests ]
There aren't automated tests, but manual testing using upstream test
code doesn't reveal any other regressions/bugs.

[ Risks ]
The code change is trivial, the bug currently affects the prosody
packhage in a way that its admin cannot simply exit from the
prosody server management console.

[ Checklist ]
  [+] all changes are documented in the d/changelog
  [+] I reviewed all changes and I approve them
  [+] attach debdiff against the package in testing

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034078

unblock lua-readline/3.2-2
diff --git a/debian/changelog b/debian/changelog
index 4456e53..7450934 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+lua-readline (3.2-2) unstable; urgency=medium
+
+  * Fix regression which does not allow to use Ctrl-D (EOF) to close
+    readline session (closes: #1034078).
+
+ -- Sergei Golovan <sgolovan@debian.org>  Sun, 09 Apr 2023 12:28:12 +0300
+
 lua-readline (3.2-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/patches/eof.patch b/debian/patches/eof.patch
new file mode 100644
index 0000000..2ac8eeb
--- /dev/null
+++ b/debian/patches/eof.patch
@@ -0,0 +1,39 @@
+Author: Upstream
+Description: Patch restores processing EOF (Ctrl+D), when readline()
+ returns NULL, distinguishable from an empty string.
+Debian-Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034078
+
+--- a/C-readline.c
++++ b/C-readline.c
+@@ -65,7 +65,13 @@
+ 	/* rl_cleanup_after_signal(); rl_clear_signals();  no effect :-( 1.3 */
+ 	/* lua_pushstring(L, line); */
+ 	/* 3.2 did lua_pushstring create a copy of the string ? */
+-	lua_pushfstring(L, "%s", line);   /* 3.2 */
++	/* lua_pushfstring(L, "%s", line);   3.2 */
++	if (line == NULL) { /* 3.3 fix by zash.se, Prosody developer */
++		lua_pushnil(L);
++	} else {
++		lua_pushfstring(L, "%s", line);
++		// lua_pushstring(L, line); should be fine as well
++	}
+ 	if (tty_stream != NULL) { fclose(tty_stream); }
+ 	free(line);  /* 3.2 fixes memory leak */
+ 	return 1;
+@@ -135,13 +141,15 @@
+ 	return 0;
+ }
+ 
+-static int c_write_history(lua_State *L) {  /* filename in, returncode out */
++/* unused ...
++static int c_write_history(lua_State *L) {  //  filename in, returncode out
+ 	size_t len;
+ 	const char *filename  = lua_tolstring(L, 1, &len);
+     lua_Integer rc = write_history(filename);
+ 	lua_pushinteger(L, rc);
+ 	return 1;
+ }
++*/
+ 
+ static int c_history_truncate_file(lua_State *L) { /* filename,num in rc out */
+ 	size_t len;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..84626e5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+eof.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: