rpms/minicom/devel minicom-2.4-config.patch, NONE, 1.1 minicom-2.4-esc.patch, NONE, 1.1 minicom-2.4-rh.patch, NONE, 1.1 minicom-2.4-staticbuf.patch, NONE, 1.1 minicom-2.4-umask.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 minicom.spec, 1.35, 1.36 sources, 1.7, 1.8 minicom-2.2-umask.patch, 1.1, NONE minicom-2.3-drop-privs.patch, 1.1, NONE minicom-2.3-esc.patch, 1.1, NONE minicom-2.3-getline.patch, 1.1, NONE minicom-2.3-ncurses.patch, 1.1, NONE minicom-2.3-rh.patch, 1.1, NONE minicom-2.3-staticbuf.patch, 1.1, NONE

Jan Görig jgorig at fedoraproject.org
Wed Mar 10 15:08:26 UTC 2010


Author: jgorig

Update of /cvs/pkgs/rpms/minicom/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31017

Modified Files:
	.cvsignore minicom.spec sources 
Added Files:
	minicom-2.4-config.patch minicom-2.4-esc.patch 
	minicom-2.4-rh.patch minicom-2.4-staticbuf.patch 
	minicom-2.4-umask.patch 
Removed Files:
	minicom-2.2-umask.patch minicom-2.3-drop-privs.patch 
	minicom-2.3-esc.patch minicom-2.3-getline.patch 
	minicom-2.3-ncurses.patch minicom-2.3-rh.patch 
	minicom-2.3-staticbuf.patch 
Log Message:
- update to 2.4
- /etc/minicom.users removed by upstream
- add minicom-2.4-config.patch
- remove minicom-2.3-getline.patch - fixed in upstream
- remove minicom-2.3-drop-privs.patch - permissions handling removed by upstream
- remove minicom-2.3-ncurses.patch - deprecated
- modify minicom-2.4-rh.patch - wrong doinit checking (#519637)


minicom-2.4-config.patch:
 config.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- NEW FILE minicom-2.4-config.patch ---
diff -up minicom-2.4/src/config.c.orig minicom-2.4/src/config.c
--- minicom-2.4/src/config.c.orig	2010-03-10 12:41:42.000000000 +0100
+++ minicom-2.4/src/config.c	2010-03-10 13:16:16.233368251 +0100
@@ -52,6 +52,12 @@ void read_parms(void)
 
   /* Read global parameters */
   if ((fp = fopen(parfile, "r")) == NULL) {
+    if (dosetup) {
+      fputs(_("minicom: WARNING: configuration file not found, using defaults\n"),stderr);
+      sleep(2);
+      return;
+    }
+    
     fprintf(stderr,
             _("minicom: there is no global configuration file %s\n"), parfile);
     fputs(_("Ask your sysadmin to create one (with minicom -s).\n"), stderr);

minicom-2.4-esc.patch:
 vt100.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE minicom-2.4-esc.patch ---
diff -up minicom-2.4/src/vt100.c.orig minicom-2.4/src/vt100.c
--- minicom-2.4/src/vt100.c.orig	2009-12-12 16:47:47.000000000 +0100
+++ minicom-2.4/src/vt100.c	2010-03-10 10:53:23.338369299 +0100
@@ -1012,7 +1012,7 @@ void vt_out(int ch)
       if (!using_iconv()) {
       c = vt_inmap[c];    /* conversion 04.09.97 / jl */
 #if TRANSLATE
-      if (vt_type == VT100 && vt_asis == 0)
+      if (vt_type == VT100 && vt_trans[vt_charset] && vt_asis == 0)
         c = vt_trans[vt_charset][c];
 #endif
       }

minicom-2.4-rh.patch:
 main.c    |   30 +++++++++++++++++++++++++++++-
 minicom.c |    2 +-
 minicom.h |    4 +++-
 updown.c  |    6 +++++-
 4 files changed, 38 insertions(+), 4 deletions(-)

--- NEW FILE minicom-2.4-rh.patch ---
diff -up minicom-2.4/src/main.c.orig minicom-2.4/src/main.c
--- minicom-2.4/src/main.c.orig	2009-12-12 16:47:47.000000000 +0100
+++ minicom-2.4/src/main.c	2010-03-10 11:43:12.588243671 +0100
@@ -154,13 +154,18 @@ void term_socket_close(void)
 int open_term(int doinit, int show_win_on_error)
 {
   struct stat stt;
+#ifdef NOTNOW
   char buf[128];
-  int fd, n = 0;
+  int fd;
   int pid;
+#endif
+  int n = 0;
 #ifdef HAVE_ERRNO_H
   int s_errno;
 #endif
 
+#ifdef NOTNOW
+
   /* First see if the lock file directory is present. */
   if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) {
 
@@ -212,6 +217,29 @@ int open_term(int doinit, int show_win_o
   if (doinit > 0)
     lockfile_create();
 
+#else
+  lockfile[0] = 0;
+  if (doinit > 0) {
+       int rc = ttylock(dial_tty);
+       if (rc < 0) {
+               if (access(dial_tty, W_OK) == -1)
+                       fprintf(stderr, _("Device %s access failed: %s.\n"),
+                               dial_tty, strerror(errno));
+               else
+                       fprintf(stderr, _("Device %s lock failed: %s.\n"),
+                               dial_tty, strerror(-rc));
+       } else if (rc > 0) {
+               fprintf(stderr, _("Device %s is locked.\n"), dial_tty);
+       } else if (rc == 0) {
+               snprintf(lockfile, sizeof(lockfile), "%s", dial_tty);
+       }
+       if (rc) {
+               if (stdwin) mc_wclose(stdwin, 1);
+               return(-1);
+       }
+  }
+#endif
+
   /* Run a special program to disable callin if needed. */
     if (doinit > 0 && P_CALLOUT[0]) {
       if (fastsystem(P_CALLOUT, NULL, NULL, NULL) < 0) {
diff -up minicom-2.4/src/minicom.c.orig minicom-2.4/src/minicom.c
--- minicom-2.4/src/minicom.c.orig	2009-12-12 16:47:47.000000000 +0100
+++ minicom-2.4/src/minicom.c	2010-03-10 11:39:32.406244215 +0100
@@ -1555,7 +1555,7 @@ dirty_goto:
   mc_wclose(stdwin, 1);
   keyboard(KUNINSTALL, 0);
   if (lockfile[0])
-    unlink(lockfile);
+    ttyunlock(lockfile);
   close(portfd);
 
   if (quit != NORESET && P_CALLIN[0])
diff -up minicom-2.4/src/minicom.h.orig minicom-2.4/src/minicom.h
--- minicom-2.4/src/minicom.h.orig	2009-12-12 16:47:47.000000000 +0100
+++ minicom-2.4/src/minicom.h	2010-03-10 11:39:32.406244215 +0100
@@ -35,6 +35,8 @@
 
 #include <time.h>
 
+#include <baudboy.h>
+
 #ifdef USE_SOCKET
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -82,7 +84,7 @@ EXTERN int tempst;	/* Status line is tem
 EXTERN int escape;	/* Escape code. */
 EXTERN int disable_online_time; /* disable online time display */
 
-EXTERN char lockfile[128]; /* UUCP lock file of terminal */
+EXTERN char lockfile[1024]; /* UUCP lock file of terminal */
 EXTERN char homedir[256];  /* Home directory of user */
 EXTERN char logfname[PARS_VAL_LEN]; /* Name of the logfile */
 EXTERN char username[16];  /* Who is using minicom? */
diff -up minicom-2.4/src/updown.c.orig minicom-2.4/src/updown.c
--- minicom-2.4/src/updown.c.orig	2009-12-13 16:20:34.000000000 +0100
+++ minicom-2.4/src/updown.c	2010-03-10 11:54:05.519368852 +0100
@@ -378,11 +378,12 @@ void updown(int what, int nr)
 void lockfile_remove(void)
 {
   if (lockfile[0])
-    unlink(lockfile);
+    ttyunlock(lockfile);
 }
 
 void lockfile_create(void)
 {
+#ifdef NOTNOW
   int fd, n;
   char buf[81];
 
@@ -399,6 +400,9 @@ void lockfile_create(void)
     close(fd);
   }
   umask(n);
+#else
+  ttylock(lockfile);
+#endif
 }
 
 /*

minicom-2.4-staticbuf.patch:
 updown.c |  126 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 100 insertions(+), 26 deletions(-)

--- NEW FILE minicom-2.4-staticbuf.patch ---
diff -up minicom-2.4/src/updown.c.staticbuf minicom-2.4/src/updown.c
--- minicom-2.4/src/updown.c.staticbuf	2009-12-13 16:20:34.000000000 +0100
+++ minicom-2.4/src/updown.c	2010-03-10 10:43:14.570243745 +0100
@@ -89,40 +89,83 @@ static void udcatch(int dummy)
  * Translate %b to the current bps rate, and
  *           %l to the current tty port.
  *           %f to the serial port file descriptor
+ *
+ * Caller must free the returned string
  */
 static char *translate(char *s)
 {
-  static char buf[128];
-  char str_portfd[8];     /* kino */
-  int i;
+  char * ptr;
+  char * translation;
+  size_t translation_length;
+  char   str_portfd[8];     /* kino */
+
+  /* determine how many bytes we'll need for the translated version */
+  translation_length = 0;
+  for (ptr = s; *ptr != '\0'; ptr++) {
+    if (*ptr != '%') {
+      translation_length++;
+    }
+    else {
+      switch(*++ptr) {
+
+        case 'l': /* tty port */
+          translation_length += strlen(dial_tty);
+          break;
+
+        case 'b': /* baud rate (bbp) */
+          translation_length += strlen(P_BAUDRATE);
+          break;
+
+        case 'f': /* serial port file descriptor */
+          sprintf(str_portfd, "%d", portfd);
+          translation_length += strlen(str_portfd);
+          break;
+
+        default: /* treat all other escape sequences literally */
+          translation_length += 2;
+          break;
+      }
+    }
+  }
+
+  translation = malloc(translation_length + 1);
+  if (translation == NULL) {
+    do_log("out of memory");
+    return NULL;
+  }
 
-  for (i = 0; *s && i < 127; i++, s++) {
+  /* now copy and translate s into the allocated buffer */
+  for (ptr = translation; *s != '\0'; s++) {
     if (*s != '%') {
-      buf[i] = *s;
+      *ptr++ = *s;
       continue;
     }
-    switch (*++s) {
-      case 'l':
-        strncpy(buf + i, dial_tty, sizeof(buf)-i);
-        i += strlen(dial_tty) - 1;
+    switch(*++s) {
+      case 'l': /* tty port */
+        strcpy(ptr, dial_tty);
+        ptr += strlen(dial_tty);
         break;
-      case 'b':
-        strncpy(buf + i, P_BAUDRATE, sizeof(buf)-i);
-        i += strlen(P_BAUDRATE) - 1;
+
+      case 'b': /* baud rate (bbp) */
+        strcpy(ptr, P_BAUDRATE);
+        ptr += strlen(P_BAUDRATE);
         break;
-      case 'f':
+
+      case 'f': /* serial port file descriptor */
         sprintf(str_portfd, "%d", portfd);
-        strncpy(buf + i, str_portfd, sizeof(buf)-i);
-        i += strlen(str_portfd) - 1;
+        strcpy(ptr, str_portfd);
+        ptr += strlen(str_portfd);
         break;
-      default:
-        buf[i++] = '%';
-        buf[i] = *s;
+
+      default: /* treat all other escape sequences literally */
+        *ptr++ = '%';
+        *ptr++ = *s;
         break;
     }
   }
-  buf[i] = 0;
-  return buf;
+  *ptr = '\0';
+
+  return translation;
 }
 
 /*
@@ -183,7 +226,8 @@ void updown(int what, int nr)
   const char *s  ="";
   int pipefd[2];
   int n, status;
-  char cmdline[128];
+  char * cmdline = NULL;
+  char * translated_cmdline = NULL;
   WIN *win = (WIN *)NULL;
 
   if (mcd(what == 'U' ? P_UPDIR : P_DOWNDIR) < 0)
@@ -215,6 +259,7 @@ void updown(int what, int nr)
 #if 1
   {
     int multiple; /* 0:only directory, 1:one file, -1:any number */
+    size_t cmdline_length;
 
     if (P_MUL(g)=='Y')
       /* need file(s), or just a directory? */
@@ -234,7 +279,13 @@ void updown(int what, int nr)
     }
 
     /* discard directory if "multiple" == 0 */
-    snprintf(cmdline, sizeof(cmdline), "%s %s", P_PPROG(g), multiple == 0? "" : s);
+    cmdline_length = strlen(P_PPROG(g)) + strlen((char*) (multiple == 0 ? "" : s)) + 1; /* + 1 for ' ' */
+    cmdline = malloc(cmdline_length + 1); /* + 1 for NUL */
+    if (cmdline == NULL) {
+      werror(_("Out of memory: could allocate buffer for command line"));
+      return;
+    }
+    snprintf(cmdline, cmdline_length + 1, "%s %s", P_PPROG(g), multiple == 0 ? "" : s);
   }
 #endif
 
@@ -260,6 +311,8 @@ void updown(int what, int nr)
       } else
         mc_wreturn();
       mcd("");
+      if(cmdline)
+        free(cmdline);
       return;
     case 0: /* Child */
       if (P_PIORED(g) == 'Y') {
@@ -278,11 +331,21 @@ void updown(int what, int nr)
       for (n = 1; n < _NSIG; n++)
         signal(n, SIG_DFL);
 
-      fastexec(translate(cmdline));
+      translated_cmdline = translate(cmdline);
+      if (translated_cmdline != NULL) {
+        fastexec(translated_cmdline);
+        free(translated_cmdline);
+      }
+      if(cmdline)
+        free(cmdline);
       exit(1);
     default: /* Parent */
       break;
   }
+ 
+  if(cmdline)
+    free(cmdline);
+
   if (win) {
     setcbreak(1);         /* Cbreak, no echo. */
     enab_sig(1, 0);       /* But enable SIGINT */
@@ -409,7 +472,8 @@ void lockfile_create(void)
 void kermit(void)
 {
   int status, pid, n;
-  char *kermit_path = translate(P_KERMIT);
+  char * translated_cmdline;
+  char *kermit_path = P_KERMIT;
 
   if (!kermit_path || !*kermit_path) {
     werror("No kermit path defined!");
@@ -433,7 +497,11 @@ void kermit(void)
       for (n = 0; n < _NSIG; n++)
         signal(n, SIG_DFL);
 
-      fastexec(kermit_path);
+      translated_cmdline = translate(P_KERMIT);
+      if (translated_cmdline != NULL) {
+        fastexec(translated_cmdline);
+        free(translated_cmdline);
+      }
       exit(1);
     default: /* Parent */
       break;
@@ -531,6 +599,7 @@ void runscript(int ask, const char *s, c
   char scr_lines[5];
   char cmdline[128];
   struct pollfd fds[2];
+  char *translated_cmdline;
   char *ptr;
   WIN *w;
   int done = 0;
@@ -633,7 +702,12 @@ void runscript(int ask, const char *s, c
       mc_setenv("LOGIN", scr_user);
       mc_setenv("PASS", scr_passwd);
       mc_setenv("TERMLIN", scr_lines);	/* jl 13.09.97 */
-      fastexec(translate(cmdline));
+      translated_cmdline = translate(cmdline);
+
+      if (translated_cmdline != NULL) {
+        fastexec(translated_cmdline);
+        free(translated_cmdline);
+      }
       exit(1);
     default: /* Parent */
       break;

minicom-2.4-umask.patch:
 config.c |    2 ++
 1 file changed, 2 insertions(+)

--- NEW FILE minicom-2.4-umask.patch ---
diff -up ./minicom-2.4/src/config.c.umask ./minicom-2.4/src/config.c
--- minicom-2.4/src/config.c.umask	2010-03-09 16:32:14.876153489 +0100
+++ minicom-2.4/src/config.c	2010-03-09 16:33:17.789153650 +0100
@@ -1245,6 +1245,8 @@ int dodflsave(void)
   }
   writepars(fp, dosetup);
   fclose(fp);
+  if(dosetup)
+    chmod(fname, (mode_t) 0644);
   werror(_("Configuration saved"));
 
   return domacsave() < 0 ? -1 : 0;


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- .cvsignore	24 Feb 2008 20:34:38 -0000	1.7
+++ .cvsignore	10 Mar 2010 15:08:24 -0000	1.8
@@ -1 +1 @@
-minicom-2.3.tar.gz
+minicom-2.4.tar.gz


Index: minicom.spec
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/minicom.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- minicom.spec	25 Jul 2009 14:33:28 -0000	1.35
+++ minicom.spec	10 Mar 2010 15:08:25 -0000	1.36
@@ -1,7 +1,7 @@
 Summary: A text-based modem control and terminal emulation program
 Name: minicom
-Version: 2.3
-Release: 6%{?dist}
+Version: 2.4
+Release: 1%{?dist}
 URL: http://alioth.debian.org/projects/minicom/
 License: GPLv2+
 Group: Applications/Communications
@@ -10,17 +10,15 @@ BuildRoot: %{_tmppath}/%{name}-%{version
 BuildRequires: lockdev-devel ncurses-devel
 Requires: lockdev lrzsz
 
-Source0: http://alioth.debian.org/frs/download.php/2332/minicom-2.3.tar.gz
+Source0: http://alioth.debian.org/frs/download.php/3195/minicom-2.4.tar.gz
 
-Patch1: minicom-2.3-ncurses.patch
-Patch2: minicom-2.3-drop-privs.patch
-Patch4: minicom-2.2-umask.patch
-Patch6: minicom-2.2-spaces.patch
-Patch7: minicom-2.3-gotodir.patch
-Patch8: minicom-2.3-rh.patch
-Patch9: minicom-2.3-esc.patch
-Patch10: minicom-2.3-staticbuf.patch
-Patch11: minicom-2.3-getline.patch
+Patch1: minicom-2.4-umask.patch
+Patch2: minicom-2.2-spaces.patch
+Patch3: minicom-2.3-gotodir.patch
+Patch4: minicom-2.4-rh.patch
+Patch5: minicom-2.4-esc.patch
+Patch6: minicom-2.4-staticbuf.patch
+Patch7: minicom-2.4-config.patch
 
 %description
 Minicom is a simple text-based modem control and terminal emulation
@@ -30,15 +28,13 @@ language, and other features.
 
 %prep
 %setup -q
-%patch1 -p1 -b .ncurses
-%patch2 -p1 -b .drop-privs
-%patch4 -p1 -b .umask
-%patch6 -p1 -b .spaces
-%patch7 -p1 -b .gotodir
-%patch8 -p1 -b .rh
-%patch9 -p1 -b .esc
-%patch10 -p1 -b .staticbuf
-%patch11 -p1 -b .getline
+%patch1 -p1 -b .umask
+%patch2 -p1 -b .spaces
+%patch3 -p1 -b .gotodir
+%patch4 -p1 -b .rh
+%patch5 -p1 -b .esc
+%patch6 -p1 -b .staticbuf
+%patch7 -p1 -b .config
 
 cp -pr doc doc_
 rm -f doc_/Makefile*
@@ -51,7 +47,6 @@ make %{?_smp_mflags}
 rm -rf $RPM_BUILD_ROOT
 make DESTDIR=$RPM_BUILD_ROOT install
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
-install -p -m 644 doc/minicom.users $RPM_BUILD_ROOT%{_sysconfdir}/minicom.users
 
 %find_lang %{name}
 
@@ -61,7 +56,6 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(-,root,root)
 %doc ChangeLog AUTHORS NEWS TODO doc_/*
-%config(noreplace) %{_sysconfdir}/minicom.users
 # DO NOT MAKE minicom SUID/SGID anything.
 %{_bindir}/minicom
 %{_bindir}/runscript
@@ -70,6 +64,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Tue Mar 9 2010 Jan Görig <jgorig at redhat.com> 2.4-1
+- update to 2.4
+- /etc/minicom.users removed by upstream
+- add minicom-2.4-config.patch
+- remove minicom-2.3-getline.patch - fixed in upstream
+- remove minicom-2.3-drop-privs.patch - permissions handling removed by upstream
+- remove minicom-2.3-ncurses.patch - deprecated
+- modify minicom-2.4-rh.patch - wrong doinit checking (#519637)
+
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
@@ -85,7 +88,7 @@ rm -rf $RPM_BUILD_ROOT
 - rediff patches with fuzz
 
 * Thu Mar 13 2008 Lubomir Kundrak <lkundrak at redhat.com> 2.3-2
-- Add ChangeLog to %doc
+- Add ChangeLog to %%doc
 
 * Sun Feb 24 2008 Lubomir Kundrak <lkundrak at redhat.com> 2.3-1
 - 2.3


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/minicom/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- sources	24 Feb 2008 20:34:38 -0000	1.7
+++ sources	10 Mar 2010 15:08:26 -0000	1.8
@@ -1 +1 @@
-0ebe7a91898384ca906787cc4e2c3f25  minicom-2.3.tar.gz
+700976a3c2dcc8bbd50ab9bb1c08837b  minicom-2.4.tar.gz


--- minicom-2.2-umask.patch DELETED ---


--- minicom-2.3-drop-privs.patch DELETED ---


--- minicom-2.3-esc.patch DELETED ---


--- minicom-2.3-getline.patch DELETED ---


--- minicom-2.3-ncurses.patch DELETED ---


--- minicom-2.3-rh.patch DELETED ---


--- minicom-2.3-staticbuf.patch DELETED ---



More information about the scm-commits mailing list