[singular] 01/01: Imported Debian patch 4.0.3-p3+ds-2: RC #840481 fix

Jerome Benoit calculus-guest at moszumanska.debian.org
Fri Oct 14 23:11:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository singular.

commit 7af9f30dfc909250c83c1b90ac2a80a928d7a682
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Sat Oct 15 00:10:17 2016 +0100

    Imported Debian patch 4.0.3-p3+ds-2: RC #840481 fix
---
 debian/changelog                                   |   8 +-
 debian/patches/series                              |   1 +
 .../upstream-bug-840481-readline6TWO7.patch        | 107 +++++++++++++++++++++
 debian/rules                                       |   4 +-
 debian/singular-ui.links                           |   2 +
 5 files changed, 117 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 390ee39..8208253 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
-singular (4.0.3-p3+ds-2) UNRELEASED; urgency=medium
+singular (4.0.3-p3+ds-2) unstable; urgency=medium
 
-  * Do not compress singular.hlp (for sagemath).
+  * RC fix (Closes: #840481), fix readline 6 to 7 migration issue.
+  * Debianization:
+    - debian/rules, do not compress .hlp data files (for now).
 
- -- Tobias Hansen <thansen at debian.org>  Mon, 10 Oct 2016 11:05:03 +0100
+ -- Jerome Benoit <calculus at rezozer.net>  Fri, 14 Oct 2016 22:41:33 +0000
 
 singular (4.0.3-p3+ds-1) unstable; urgency=medium
 
diff --git a/debian/patches/series b/debian/patches/series
index 231c1a5..b80acc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+upstream-bug-840481-readline6TWO7.patch
 upstream-bug-837016-doxygen-ax-update.patch
 upstream-lintian-spelling-error-silence.patch
 upstream-tests-omalloc-getlucky.patch
diff --git a/debian/patches/upstream-bug-840481-readline6TWO7.patch b/debian/patches/upstream-bug-840481-readline6TWO7.patch
new file mode 100644
index 0000000..fb70171
--- /dev/null
+++ b/debian/patches/upstream-bug-840481-readline6TWO7.patch
@@ -0,0 +1,107 @@
+Description: Fix RC #840481 caused by readline 6to7 migration
+Bug: https://github.com/Singular/Sources/issues/799
+Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
+Last-Update: 2016-10-13
+
+--- a/kernel/oswrapper/feread.cc
++++ b/kernel/oswrapper/feread.cc
+@@ -341,19 +341,28 @@
+     #ifdef atarist
+       rl_outstream = fopen( "/dev/tty", "w" );
+     #else
+-      rl_outstream = fopen( ttyname(fileno(stdin)), "w" );
++      char *fn=ttyname(fileno(stdin));
++      if (fn!=NULL) rl_outstream = fopen( fn, "w" );
+     #endif
+   }
+ 
+-  /* try to read a history */
+-  using_history();
+-  char *p = getenv("SINGULARHIST");
+-  if (p != NULL)
++  if(isatty(fileno(stdin)))
++	{
++    /* try to read a history */
++    using_history();
++    char *p = getenv("SINGULARHIST");
++    if (p != NULL)
++    {
++      read_history (p);
++    }
++    fe_fgets_stdin=fe_fgets_stdin_rl;
++    return(fe_fgets_stdin_rl(pr,s,size));
++	}
++	else
+   {
+-    read_history (p);
+-  }
+-  fe_fgets_stdin=fe_fgets_stdin_rl;
+-  return(fe_fgets_stdin_rl(pr,s,size));
++    fe_fgets_stdin=fe_fgets;
++		return(fe_fgets(pr,s,size));
++	}
+ #endif
+ #ifdef HAVE_DYN_RL
+   /* do dynamic loading */
+@@ -373,7 +382,7 @@
+     #endif
+     return fe_fgets_stdin(pr,s,size);
+   }
+-  else /* could load libreadline: */
++  else if (isatty(STDIN_FILENO))/*and could load libreadline: */
+   {
+     /* Allow conditional parsing of the ~/.inputrc file. */
+     *fe_rl_readline_name = "Singular";
+@@ -386,20 +395,25 @@
+     {
+       (*fe_read_history) (p);
+     }
+-  }
+ 
+-  /* set the output stream */
+-  if(!isatty(STDOUT_FILENO))
++    /* set the output stream */
++    if(!isatty(STDOUT_FILENO))
++    {
++      #ifdef atarist
++        *fe_rl_outstream = fopen( "/dev/tty", "w" );
++      #else
++        char *fn=ttyname(fileno(stdin));
++				if (fn!=NULL) *fe_rl_outstream = fopen( fn, "w" );
++      #endif
++    }
++    fe_fgets_stdin=fe_fgets_stdin_drl;
++    return fe_fgets_stdin_drl(pr,s,size);
++  }
++  else
+   {
+-    #ifdef atarist
+-      *fe_rl_outstream = fopen( "/dev/tty", "w" );
+-    #else
+-      *fe_rl_outstream = fopen( ttyname(fileno(stdin)), "w" );
+-    #endif
++    fe_fgets_stdin=fe_fgets;
++    return fe_fgets(pr,s,size);
+   }
+-
+-  fe_fgets_stdin=fe_fgets_stdin_drl;
+-  return fe_fgets_stdin_drl(pr,s,size);
+ #else
+   #if !defined(HAVE_READLINE) && defined(HAVE_FEREAD)
+     fe_fgets_stdin=fe_fgets_stdin_emu;
+--- a/kernel/oswrapper/fereadl.c
++++ b/kernel/oswrapper/fereadl.c
+@@ -793,10 +793,10 @@
+     if (fe_using_history==NULL) { res=13; break; }
+     fe_read_history=dynl_sym(fe_rl_hdl,"read_history");
+     if (fe_read_history==NULL) { res=14; break; }
+-    return 0;
++    break;
+   }
+-  dynl_close(fe_rl_hdl);
+-  if (res==0)
++  if (res!=0) dynl_close(fe_rl_hdl);
++  else
+   {
+     char *p;
+     /* more init stuff: */
diff --git a/debian/rules b/debian/rules
index 12206b6..3722ccc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,9 +28,9 @@ override_dh_auto_install-indep:
 	$(MAKE) install $(DEB_AUTO_INSTALL_MAKEFLAGS)
 	$(MAKE) -C dox install-html $(DEB_AUTO_INSTALL_MAKEFLAGS)
 
-# Don't compress singular.hlp, so sagemath can access it.
+## WARNING: documentation might not be clean
 override_dh_compress-indep:
-	dh_compress --exclude=singular.hlp
+	dh_compress -X.hlp
 
 override_dh_link-arch:
 	dh_link -p libsingular4-dev \
diff --git a/debian/singular-ui.links b/debian/singular-ui.links
new file mode 100644
index 0000000..418cea2
--- /dev/null
+++ b/debian/singular-ui.links
@@ -0,0 +1,2 @@
+usr/bin/Singular usr/bin/singular
+usr/share/man/man1/Singular.1.gz usr/share/man/man1/singular.1.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/singular.git



More information about the debian-science-commits mailing list