rpms/minicom/devel minicom-2.1-esc.patch, NONE, 1.1 minicom-2.1-rh.patch, NONE, 1.1 minicom-2.1-staticbuf.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 minicom.spec, 1.16, 1.17 sources, 1.4, 1.5 minicom-1.81-config.patch, 1.1, NONE minicom-1.83-badlocales.patch, 1.1, NONE minicom-1.83.1-disable-message.patch, 1.1, NONE minicom-1.83.1-make.patch, 1.1, NONE minicom-1.83.1-rh.patch, 1.2, NONE minicom-1.83.1-time.patch, 1.1, NONE minicom-2.00.0-esc.patch, 1.1, NONE minicom-2.00.0-staticbuf.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jul 15 12:35:57 UTC 2005
Author: stransky
Update of /cvs/dist/rpms/minicom/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20977
Modified Files:
.cvsignore minicom.spec sources
Added Files:
minicom-2.1-esc.patch minicom-2.1-rh.patch
minicom-2.1-staticbuf.patch
Removed Files:
minicom-1.81-config.patch minicom-1.83-badlocales.patch
minicom-1.83.1-disable-message.patch minicom-1.83.1-make.patch
minicom-1.83.1-rh.patch minicom-1.83.1-time.patch
minicom-2.00.0-esc.patch minicom-2.00.0-staticbuf.patch
Log Message:
New upstream version
minicom-2.1-esc.patch:
vt100.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE minicom-2.1-esc.patch ---
--- minicom-2.1/src/vt100.c.old 2003-04-04 22:23:47.000000000 +0200
+++ minicom-2.1/src/vt100.c 2005-07-15 11:02:29.000000000 +0200
@@ -1021,7 +1021,7 @@
fputc(P_CONVCAP[0]=='Y'? vt_inmap[c]: c, vt_capfp);
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) {
if (vt_insert)
winschar2(vt_win, vt_trans[vt_charset][c], 1);
else
minicom-2.1-rh.patch:
main.c | 39 ++++++++++++++++++++++++++++++++++-----
minicom.c | 2 +-
minicom.h | 4 +++-
updown.c | 8 +++++++-
4 files changed, 45 insertions(+), 8 deletions(-)
--- NEW FILE minicom-2.1-rh.patch ---
--- minicom-2.1/src/main.c.old 2003-05-10 20:20:19.000000000 +0200
+++ minicom-2.1/src/main.c 2005-07-14 16:54:36.000000000 +0200
@@ -80,7 +80,7 @@
close(portfd);
}
set_privs();
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
if (P_CALLIN[0]) (void) fastsystem(P_CALLIN, CNULL, CNULL, CNULL);
if (real_uid) chown(dial_tty, (uid_t)portuid, (gid_t)portgid);
fprintf(stderr, "%s", s);
@@ -152,10 +152,13 @@
int doinit;
{
struct stat stt;
+#ifdef NOTNOW
char buf[128];
- int fd, n = 0;
+ int fd;
int pid;
int mask;
+#endif
+ int n = 0;
#ifdef HAVE_ERRNO_H
int s_errno;
#endif
@@ -163,6 +166,8 @@
/* Upgrade our status. */
set_privs();
+#ifdef NOTNOW
+
/* First see if the lock file directory is present. */
if (P_LOCK[0] && stat(P_LOCK, &stt) == 0) {
@@ -228,12 +233,36 @@
close(fd);
}
+#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 != NIL_WIN) wclose(stdwin, 1);
+ drop_privs();
+ return(-1);
+ }
+ }
+#endif
+
/* Run a special program to disable callin if needed. */
if (doinit > 0 && P_CALLOUT[0]) {
if(fastsystem(P_CALLOUT, CNULL, CNULL, CNULL) < 0) {
if (stdwin != NIL_WIN) wclose(stdwin, 1);
fprintf(stderr, _("Could not setup for dial out.\n"));
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
drop_privs();
return(-1);
}
@@ -290,11 +319,11 @@
#else
fprintf(stderr, _("minicom: cannot open %s. Sorry.\n"), dial_tty);
#endif
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
drop_privs();
return(-1);
}
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
werror(_("Cannot open %s!"), dial_tty);
drop_privs();
return(-1);
--- minicom-2.1/src/minicom.h.old 2003-04-26 09:31:06.000000000 +0200
+++ minicom-2.1/src/minicom.h 2005-07-14 16:50:43.000000000 +0200
@@ -29,6 +29,8 @@
#include "vt100.h"
#include "libport.h"
+#include <baudboy.h>
+
#ifdef USE_SOCKET
#include <sys/socket.h>
#include <sys/un.h>
@@ -104,7 +106,7 @@
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? */
--- minicom-2.1/src/minicom.c.old 2005-07-14 14:34:42.000000000 +0200
+++ minicom-2.1/src/minicom.c 2005-07-14 16:47:06.000000000 +0200
@@ -1530,7 +1530,7 @@
wclose(stdwin, 1);
set_privs();
keyboard(KUNINSTALL, 0);
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
close(portfd);
/* Please - if your system doesn't have uid_t and/or gid_t, define 'em
* conditionally in "port.h".
--- minicom-2.1/src/updown.c.old 2003-04-13 00:52:20.000000000 +0200
+++ minicom-2.1/src/updown.c 2005-07-14 16:49:28.000000000 +0200
@@ -379,8 +379,10 @@
{
int status;
int pid, n;
+#ifdef NOTNOW
char buf[81];
int fd;
+#endif
/* Clear screen, set keyboard modes etc. */
wleave();
@@ -393,7 +395,7 @@
case 0: /* Child */
/* Remove lockfile */
set_privs();
- if (lockfile[0]) unlink(lockfile);
+ if (lockfile[0]) ttyunlock(lockfile);
setgid((gid_t)real_gid);
setuid((uid_t)real_uid);
@@ -413,6 +415,7 @@
/* Re-create lockfile */
if (lockfile[0]) {
set_privs();
+#ifdef NOTNOW
n = umask(022);
/* Create lockfile compatible with UUCP-1.2 */
if ((fd = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) < 0) {
@@ -424,6 +427,9 @@
close(fd);
}
(void) umask(n);
+#else
+ (void) ttylock(lockfile);
+#endif
drop_privs();
}
m_flush(portfd);
minicom-2.1-staticbuf.patch:
updown.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 112 insertions(+), 36 deletions(-)
--- NEW FILE minicom-2.1-staticbuf.patch ---
--- minicom-2.1/src/updown.c.old 2005-07-14 16:57:42.000000000 +0200
+++ minicom-2.1/src/updown.c 2005-07-15 10:56:36.000000000 +0200
@@ -88,41 +88,84 @@
* 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(s)
char *s;
{
- static char buf[128];
- char str_portfd[8]; /* kino */
- int i;
-
- for(i = 0; *s && i < 127; i++, s++) {
- if (*s != '%') {
- buf[i] = *s;
- continue;
- }
- switch(*++s) {
- case 'l':
- strncpy(buf + i, dial_tty, sizeof(buf)-i);
- i += strlen(dial_tty) - 1;
- break;
- case 'b':
- strncpy(buf + i, P_BAUDRATE, sizeof(buf)-i);
- i += strlen(P_BAUDRATE) - 1;
- break;
- case 'f':
- sprintf(str_portfd, "%d", portfd);
- strncpy(buf + i, str_portfd, sizeof(buf)-i);
- i += strlen(str_portfd) - 1;
- break;
- default:
- buf[i++] = '%';
- buf[i] = *s;
- break;
- }
- }
- buf[i] = 0;
- return(buf);
+ 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;
+ }
+
+ /* now copy and translate s into the allocated buffer */
+ for (ptr = translation; *s != '\0'; s++) {
+ if (*s != '%') {
+ *ptr++ = *s;
+ continue;
+ }
+ switch(*++s) {
+ case 'l': /* tty port */
+ strcpy(ptr, dial_tty);
+ ptr += strlen(dial_tty);
+ break;
+
+ case 'b': /* baud rate (bbp) */
+ strcpy(ptr, P_BAUDRATE);
+ ptr += strlen(P_BAUDRATE);
+ break;
+
+ case 'f': /* serial port file descriptor */
+ sprintf(str_portfd, "%d", portfd);
+ strcpy(ptr, str_portfd);
+ ptr += strlen(str_portfd);
+ break;
+
+ default: /* treat all other escape sequences literally */
+ *ptr++ = '%';
+ *ptr++ = *s;
+ break;
+ }
+ }
+ *ptr = '\0';
+
+ return translation;
}
/*
@@ -184,7 +227,8 @@
char *s ="";
int pipefd[2];
int n, status;
- char cmdline[128];
+ char * cmdline = NULL;
+ char * translated_cmdline = NULL;
WIN *win = (WIN *)NULL;
#if VC_MUSIC
_PROTO(void music, (void));
@@ -216,6 +260,7 @@
#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? */
@@ -237,7 +282,14 @@
}
/* 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
@@ -263,6 +315,8 @@
} else
wreturn();
(void) mcd("");
+ if(cmdline)
+ free(cmdline);
return;
case 0: /* Child */
if (P_PIORED(g) == 'Y') {
@@ -279,11 +333,22 @@
set_privs();
setgid((gid_t)real_gid);
setuid((uid_t)real_uid);
- (void) fastexec(translate(cmdline));
+
+ translated_cmdline = translate(cmdline);
+ if (translated_cmdline != NULL) {
+ (void) fastexec(translated_cmdline);
+ free(translated_cmdline);
+ }
+ if(cmdline)
+ free(cmdline);
exit(1);
default: /* Parent */
break;
}
+
+ if(cmdline)
+ free(cmdline);
+
if (win) {
(void) setcbreak(1); /* Cbreak, no echo. */
enab_sig(1, 0); /* But enable SIGINT */
@@ -383,6 +448,7 @@
char buf[81];
int fd;
#endif
+ char * translated_cmdline;
/* Clear screen, set keyboard modes etc. */
wleave();
@@ -401,7 +467,11 @@
for(n = 0; n < _NSIG; n++) signal(n, SIG_DFL);
- (void) fastexec(translate(P_KERMIT));
+ translated_cmdline = translate(P_KERMIT);
+ if (translated_cmdline != NULL) {
+ (void) fastexec(translated_cmdline);
+ free(translated_cmdline);
+ }
exit(1);
default: /* Parent */
break;
@@ -517,6 +587,7 @@
char buf[81];
char scr_lines[5];
char cmdline[128];
+ char *translated_cmdline;
char *ptr;
WIN *w;
int done = 0;
@@ -619,7 +690,12 @@
mc_setenv("LOGIN", scr_user);
mc_setenv("PASS", scr_passwd);
mc_setenv("TERMLIN", scr_lines); /* jl 13.09.97 */
- (void) fastexec(translate(cmdline));
+
+ translated_cmdline = translate(cmdline);
+ if (translated_cmdline != NULL) {
+ (void) fastexec(translated_cmdline);
+ free(translated_cmdline);
+ }
exit(1);
default: /* Parent */
break;
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/minicom/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 9 Sep 2004 08:33:32 -0000 1.4
+++ .cvsignore 15 Jul 2005 12:35:55 -0000 1.5
@@ -1 +1,2 @@
minicom-2.00.0.src.tar.bz2
+minicom-2.1.tar.gz
Index: minicom.spec
===================================================================
RCS file: /cvs/dist/rpms/minicom/devel/minicom.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- minicom.spec 7 Mar 2005 15:27:28 -0000 1.16
+++ minicom.spec 15 Jul 2005 12:35:55 -0000 1.17
@@ -2,8 +2,8 @@
Summary: A text-based modem control and terminal emulation program.
Name: minicom
-Version: 2.00.0
-Release: 21
+Version: 2.1
+Release: 1
License: GPL
Group: Applications/Communications
ExcludeArch: s390 s390x
@@ -13,19 +13,14 @@
Requires: lockdev
URL: http://alioth.debian.org/projects/minicom/
-Source: ftp://metalab.unc.edu/pub/Linux/apps/serialcomm/dialout/minicom-%{version}.src.tar.bz2
+Source: ftp://metalab.unc.edu/pub/Linux/apps/serialcomm/dialout/minicom-%{version}.tar.gz
Source1: minicom.desktop
-Patch0: minicom-1.81-config.patch
-Patch1: minicom-1.83.1-make.patch
Patch2: minicom-drop-privs.patch
-Patch3: minicom-1.83.1-time.patch
Patch4: minicom-umask.patch
-Patch7: minicom-1.83.1-disable-message.patch
-Patch8: minicom-1.83.1-rh.patch
-Patch9: minicom-1.83-badlocales.patch
-Patch10: minicom-2.00.0-staticbuf.patch
-Patch11: minicom-2.00.0-esc.patch
+Patch8: minicom-2.1-rh.patch
+Patch10: minicom-2.1-staticbuf.patch
+Patch11: minicom-2.1-esc.patch
Patch12: minicom-2.00.0-inssp.patch
Patch13: minicom-2.00.0-gotodir.patch
Patch14: minicom-2.00.0-offby1.patch
@@ -39,14 +34,9 @@
%prep
%setup -q
-###%patch0 -p1 -b .config Appears unneeded in 2.00.0
-###%patch1 -p1 -b .make Appears unneeded in 2.00.0
%patch2 -p1 -b .privs
-###%patch3 -p1 -b .time Appears unneeded in 2.00.0
%patch4 -p1 -b .umask
-###%patch7 -p0 -b .disable-message Stay or go? We'll wait and see...
%patch8 -p1 -b .rh
-###%patch9 -p1 Needs removal, or repair
%patch10 -p1 -b .staticbuf
%patch11 -p1 -b .esc
%patch12 -p1 -b .ins
@@ -91,6 +81,9 @@
%endif
%changelog
+* Thu Jul 14 2005 Martin Stransky <stransky at redhat.com> 2.1-1
+- New upstream version
+
* Mon Mar 7 2005 Martin Stransky <stransky at redhat.com>
- gcc4 patch
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/minicom/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources 9 Sep 2004 08:33:32 -0000 1.4
+++ sources 15 Jul 2005 12:35:55 -0000 1.5
@@ -1 +1 @@
-abc0bd2ec856cca633d764635f80ee41 minicom-2.00.0.src.tar.bz2
+1c8f3b247c38fb16c3c2170df9fc102a minicom-2.1.tar.gz
--- minicom-1.81-config.patch DELETED ---
--- minicom-1.83-badlocales.patch DELETED ---
--- minicom-1.83.1-disable-message.patch DELETED ---
--- minicom-1.83.1-make.patch DELETED ---
--- minicom-1.83.1-rh.patch DELETED ---
--- minicom-1.83.1-time.patch DELETED ---
--- minicom-2.00.0-esc.patch DELETED ---
--- minicom-2.00.0-staticbuf.patch DELETED ---
More information about the fedora-cvs-commits
mailing list