Package: yafc
Version: 1.1.1.dfsg.1-4
Severity: normal
Tags: patch

Dear maintainer,

I've prepared an NMU for yafc (versioned as 1.1.1.dfsg.1-4.1) to fix #553874,
#601758 and #604190. The NMU can be found at [1] and the debdiff is attached.
I'll be seeking a sponsor on debian-mentors@l.d.o to get it uploaded to
DELAYED/10.

Kind regards

[1] http://mentors.debian.net/debian/pool/main/y/yafc/yafc_1.1.1.dfsg.1-4.1.dsc

diff -u yafc-1.1.1.dfsg.1/debian/control yafc-1.1.1.dfsg.1/debian/control
--- yafc-1.1.1.dfsg.1/debian/control
+++ yafc-1.1.1.dfsg.1/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Decklin Foster <deck...@red-bean.com>
 Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 4.0.0), quilt, texinfo, libncurses5-dev, 
libreadline5-dev
+Build-Depends: debhelper (>= 4.0.0), quilt, texinfo, libncurses5-dev, 
libreadline-dev
 
 Package: yafc
 Architecture: any
diff -u yafc-1.1.1.dfsg.1/debian/changelog yafc-1.1.1.dfsg.1/debian/changelog
--- yafc-1.1.1.dfsg.1/debian/changelog
+++ yafc-1.1.1.dfsg.1/debian/changelog
@@ -1,3 +1,14 @@
+yafc (1.1.1.dfsg.1-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Change Build-Dep libreadline5-dev to libreadline-dev. (Closes: #553874)
+  * Add patch from Mats Erik Andersson to fix FTBFS on GNU/kFreeBSD. (Closes:
+    #601758)
+  * Add patch from Lionel Landwerlin to fix wrong usage of strcpy. (Closes:
+    #604190)
+
+ -- Sebastian Ramacher <s.ramac...@gmx.at>  Thu, 04 Aug 2011 16:55:52 +0200
+
 yafc (1.1.1.dfsg.1-4) unstable; urgency=low
 
   * Fix segfault on completing a line of whitespace (Closes: #418171)
diff -u yafc-1.1.1.dfsg.1/debian/patches/series 
yafc-1.1.1.dfsg.1/debian/patches/series
--- yafc-1.1.1.dfsg.1/debian/patches/series
+++ yafc-1.1.1.dfsg.1/debian/patches/series
@@ -7,0 +8,2 @@
+use-termios.patch
+fix-strcpy.patch
only in patch2:
unchanged:
--- yafc-1.1.1.dfsg.1.orig/debian/patches/fix-strcpy.patch
+++ yafc-1.1.1.dfsg.1/debian/patches/fix-strcpy.patch
@@ -0,0 +1,26 @@
+Description: fix wrong usage of strcpy in strpull
+Author: Lionel Landwerlin <llandwer...@gmail.com>
+Bug-Debian: http://bugs.debian.org/604190
+Last-Update: 2011-08-04
+
+diff --git a/src/libmhe/strq.c b/src/libmhe/strq.c
+index 00b51c7..f303d84 100644
+--- a/src/libmhe/strq.c
++++ b/src/libmhe/strq.c
+@@ -96,9 +96,10 @@ void strpush(char *s, int n)
+ 
+ void strpull(char *s, int n)
+ {
+-      if(n > strlen(s))
+-              n = strlen(s);
+-      strcpy(s, s+n);
++      int l = strlen(s);
++      if (n > l)
++              n = l;
++      memmove(s, s+n, l-n+1);
+ }
+ 
+ /* returns number of C in STR */
+-- 
+1.7.2.3
+
only in patch2:
unchanged:
--- yafc-1.1.1.dfsg.1.orig/debian/patches/use-termios.patch
+++ yafc-1.1.1.dfsg.1/debian/patches/use-termios.patch
@@ -0,0 +1,73 @@
+Description: Use termios for terminal settings.
+ A migration to <termios.h> will prepare adaptions
+ for GNU/kFreeBSD. The old <termio.h> is obsolete.
+ .
+ The ioctl-calls have different names in GNU/Linux
+ and GNU/kFreeBSD, so they must be redefined.
+ .
+ The implementation in FreeBSD and GNU/kFreeBSD lacks
+ IUCLC and OLCUC, as they are not POSIX specified.
+Author: Mats Erik Andersson <deb...@gisladisker.se>
+Forwarded: no
+Last-Update: 2011-08-04
+Bug-Debian: http://bugs.debian.org/601758
+
+--- yafc-1.1.1.dfsg.1/src/input.c.orig
++++ yafc-1.1.1.dfsg.1/src/input.c
+@@ -76,7 +76,20 @@
+ 
+ # include <fcntl.h> 
+ # include <sys/ioctl.h> 
+-# include <termio.h> 
++# include <termios.h> 
++
++# if __FreeBSD_kernel__
++#  ifndef IUCLC
++    /* Not implemented in FreeBSD 8.0!  */
++#   define IUCLC 0
++#  endif
++#  ifndef TCGETS
++#   define TCGETS TIOCGETA
++#  endif
++#  ifndef TCSETS
++#   define TCSETS TIOCGETA
++#  endif
++# endif /* __FreeBSD_kernel__ */
+ 
+ char *getpass_hook(const char *prompt)
+ {
+@@ -89,14 +102,14 @@
+ #else
+       int c, n = 0;
+       char tmp[1024];
+-      struct termio tbuf, tbufsave;
++      struct termios tbuf, tbufsave;
+       FILE *fd;
+ 
+       if((fd = fopen("/dev/tty", "rb")) == NULL) {
+               perror("fopen /dev/tty");
+               return NULL;
+       }
+-      if (ioctl(fileno(fd), TCGETA, &tbuf) < 0) {
++      if (ioctl(fileno(fd), TCGETS, &tbuf) < 0) {
+               perror("ioctl get");
+               fclose(fd);
+               return NULL;
+@@ -105,7 +118,7 @@
+       tbuf.c_iflag &= ~(IUCLC | ISTRIP | IXON | IXOFF);
+       tbuf.c_lflag &= ~(ICANON | ISIG | ECHO);
+       tbuf.c_cc[4] = 1; /* MIN */
+-      if (ioctl(fileno(fd), TCSETA, &tbuf) < 0) {
++      if (ioctl(fileno(fd), TCSETS, &tbuf) < 0) {
+               perror("ioctl set");
+               fclose(fd);
+               return NULL;
+@@ -132,7 +145,7 @@
+               fflush(stderr);
+       }
+       tmp[n] = '\0';
+-      if (ioctl(fileno(fd), TCSETA, &tbufsave) < 0) {
++      if (ioctl(fileno(fd), TCSETS, &tbufsave) < 0) {
+               perror("ioctl restore");
+               fclose(fd);
+               return NULL;



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to